@cloudscape-design/components 3.0.128 → 3.0.130

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 (209) hide show
  1. package/annotation-context/annotation/annotation-popover.d.ts.map +1 -1
  2. package/annotation-context/annotation/annotation-popover.js +8 -2
  3. package/annotation-context/annotation/annotation-popover.js.map +1 -1
  4. package/annotation-context/annotation/annotation-trigger.d.ts +2 -0
  5. package/annotation-context/annotation/annotation-trigger.d.ts.map +1 -1
  6. package/annotation-context/annotation/annotation-trigger.js +2 -2
  7. package/annotation-context/annotation/annotation-trigger.js.map +1 -1
  8. package/annotation-context/annotation/closed-annotation.d.ts +3 -1
  9. package/annotation-context/annotation/closed-annotation.d.ts.map +1 -1
  10. package/annotation-context/annotation/closed-annotation.js +2 -2
  11. package/annotation-context/annotation/closed-annotation.js.map +1 -1
  12. package/annotation-context/annotation/open-annotation.d.ts.map +1 -1
  13. package/annotation-context/annotation/open-annotation.js +1 -1
  14. package/annotation-context/annotation/open-annotation.js.map +1 -1
  15. package/annotation-context/annotation/styles.css.js +24 -24
  16. package/annotation-context/annotation/styles.scoped.css +30 -30
  17. package/annotation-context/annotation/styles.selectors.js +24 -24
  18. package/annotation-context/index.d.ts.map +1 -1
  19. package/annotation-context/index.js +3 -1
  20. package/annotation-context/index.js.map +1 -1
  21. package/annotation-context/interfaces.d.ts +1 -1
  22. package/annotation-context/interfaces.d.ts.map +1 -1
  23. package/annotation-context/interfaces.js.map +1 -1
  24. package/app-layout/visual-refresh/main.d.ts.map +1 -1
  25. package/app-layout/visual-refresh/main.js +8 -3
  26. package/app-layout/visual-refresh/main.js.map +1 -1
  27. package/app-layout/visual-refresh/styles.css.js +60 -60
  28. package/app-layout/visual-refresh/styles.scoped.css +255 -237
  29. package/app-layout/visual-refresh/styles.selectors.js +60 -60
  30. package/area-chart/internal.d.ts.map +1 -1
  31. package/area-chart/internal.js +5 -0
  32. package/area-chart/internal.js.map +1 -1
  33. package/area-chart/model/index.d.ts +1 -0
  34. package/area-chart/model/index.d.ts.map +1 -1
  35. package/area-chart/model/index.js.map +1 -1
  36. package/area-chart/model/use-chart-model.d.ts.map +1 -1
  37. package/area-chart/model/use-chart-model.js +8 -1
  38. package/area-chart/model/use-chart-model.js.map +1 -1
  39. package/attribute-editor/row.d.ts.map +1 -1
  40. package/attribute-editor/row.js +4 -3
  41. package/attribute-editor/row.js.map +1 -1
  42. package/attribute-editor/styles.css.js +13 -12
  43. package/attribute-editor/styles.scoped.css +27 -23
  44. package/attribute-editor/styles.selectors.js +13 -12
  45. package/breadcrumb-group/interfaces.d.ts +1 -0
  46. package/breadcrumb-group/interfaces.d.ts.map +1 -1
  47. package/breadcrumb-group/interfaces.js.map +1 -1
  48. package/breadcrumb-group/internal.d.ts.map +1 -1
  49. package/breadcrumb-group/internal.js +1 -1
  50. package/breadcrumb-group/internal.js.map +1 -1
  51. package/breadcrumb-group/item/item.d.ts +1 -1
  52. package/breadcrumb-group/item/item.d.ts.map +1 -1
  53. package/breadcrumb-group/item/item.js +68 -8
  54. package/breadcrumb-group/item/item.js.map +1 -1
  55. package/breadcrumb-group/item/styles.css.js +9 -7
  56. package/breadcrumb-group/item/styles.scoped.css +26 -16
  57. package/breadcrumb-group/item/styles.selectors.js +9 -7
  58. package/code-editor/index.d.ts.map +1 -1
  59. package/code-editor/index.js +11 -16
  60. package/code-editor/index.js.map +1 -1
  61. package/code-editor/interfaces.d.ts +12 -1
  62. package/code-editor/interfaces.d.ts.map +1 -1
  63. package/code-editor/interfaces.js.map +1 -1
  64. package/code-editor/status-bar.d.ts.map +1 -1
  65. package/code-editor/status-bar.js +7 -1
  66. package/code-editor/status-bar.js.map +1 -1
  67. package/code-editor/util.js +1 -1
  68. package/code-editor/util.js.map +1 -1
  69. package/container/internal.d.ts.map +1 -1
  70. package/container/internal.js +7 -4
  71. package/container/internal.js.map +1 -1
  72. package/date-range-picker/calendar/grids/index.d.ts +0 -1
  73. package/date-range-picker/calendar/grids/index.d.ts.map +1 -1
  74. package/date-range-picker/calendar/grids/index.js +2 -14
  75. package/date-range-picker/calendar/grids/index.js.map +1 -1
  76. package/date-range-picker/calendar/index.d.ts +6 -4
  77. package/date-range-picker/calendar/index.d.ts.map +1 -1
  78. package/date-range-picker/calendar/index.js +111 -123
  79. package/date-range-picker/calendar/index.js.map +1 -1
  80. package/date-range-picker/calendar/utils.d.ts +4 -0
  81. package/date-range-picker/calendar/utils.d.ts.map +1 -0
  82. package/date-range-picker/calendar/utils.js +31 -0
  83. package/date-range-picker/calendar/utils.js.map +1 -0
  84. package/date-range-picker/dropdown.d.ts +2 -1
  85. package/date-range-picker/dropdown.d.ts.map +1 -1
  86. package/date-range-picker/dropdown.js +8 -6
  87. package/date-range-picker/dropdown.js.map +1 -1
  88. package/date-range-picker/index.d.ts.map +1 -1
  89. package/date-range-picker/index.js +2 -2
  90. package/date-range-picker/index.js.map +1 -1
  91. package/date-range-picker/interfaces.d.ts +14 -4
  92. package/date-range-picker/interfaces.d.ts.map +1 -1
  93. package/date-range-picker/interfaces.js.map +1 -1
  94. package/date-range-picker/styles.css.js +38 -38
  95. package/date-range-picker/styles.scoped.css +45 -50
  96. package/date-range-picker/styles.selectors.js +38 -38
  97. package/date-range-picker/utils.d.ts +2 -8
  98. package/date-range-picker/utils.d.ts.map +1 -1
  99. package/date-range-picker/utils.js +17 -12
  100. package/date-range-picker/utils.js.map +1 -1
  101. package/flashbar/styles.css.js +33 -33
  102. package/flashbar/styles.scoped.css +121 -121
  103. package/flashbar/styles.selectors.js +33 -33
  104. package/internal/components/dropdown/index.d.ts.map +1 -1
  105. package/internal/components/dropdown/index.js +2 -9
  106. package/internal/components/dropdown/index.js.map +1 -1
  107. package/internal/components/dropdown-status/index.d.ts +1 -4
  108. package/internal/components/dropdown-status/index.d.ts.map +1 -1
  109. package/internal/components/dropdown-status/index.js +3 -5
  110. package/internal/components/dropdown-status/index.js.map +1 -1
  111. package/internal/components/filtering-token/index.d.ts +2 -1
  112. package/internal/components/filtering-token/index.d.ts.map +1 -1
  113. package/internal/components/filtering-token/index.js +2 -2
  114. package/internal/components/filtering-token/index.js.map +1 -1
  115. package/internal/components/option/index.js +4 -4
  116. package/internal/components/option/index.js.map +1 -1
  117. package/internal/environment.js +1 -1
  118. package/internal/generated/custom-css-properties/index.d.ts.map +1 -1
  119. package/internal/generated/custom-css-properties/index.js +27 -26
  120. package/internal/generated/custom-css-properties/index.js.map +1 -1
  121. package/internal/hooks/use-analytics/index.d.ts +2 -0
  122. package/internal/hooks/use-analytics/index.d.ts.map +1 -0
  123. package/internal/hooks/use-analytics/index.js +16 -0
  124. package/internal/hooks/use-analytics/index.js.map +1 -0
  125. package/internal/manifest.json +1 -1
  126. package/internal/utils/date-time/format-date-time.d.ts +2 -0
  127. package/internal/utils/date-time/format-date-time.d.ts.map +1 -0
  128. package/internal/utils/date-time/format-date-time.js +8 -0
  129. package/internal/utils/date-time/format-date-time.js.map +1 -0
  130. package/internal/utils/date-time/index.d.ts +2 -1
  131. package/internal/utils/date-time/index.d.ts.map +1 -1
  132. package/internal/utils/date-time/index.js +2 -1
  133. package/internal/utils/date-time/index.js.map +1 -1
  134. package/internal/utils/date-time/join-date-time.d.ts +4 -0
  135. package/internal/utils/date-time/join-date-time.d.ts.map +1 -1
  136. package/internal/utils/date-time/join-date-time.js +4 -0
  137. package/internal/utils/date-time/join-date-time.js.map +1 -1
  138. package/mixed-line-bar-chart/chart-container.d.ts.map +1 -1
  139. package/mixed-line-bar-chart/chart-container.js +14 -5
  140. package/mixed-line-bar-chart/chart-container.js.map +1 -1
  141. package/package.json +1 -1
  142. package/pie-chart/index.d.ts.map +1 -1
  143. package/pie-chart/index.js +1 -4
  144. package/pie-chart/index.js.map +1 -1
  145. package/pie-chart/pie-chart.d.ts.map +1 -1
  146. package/pie-chart/pie-chart.js +10 -1
  147. package/pie-chart/pie-chart.js.map +1 -1
  148. package/popover/body.d.ts +2 -1
  149. package/popover/body.d.ts.map +1 -1
  150. package/popover/body.js +2 -2
  151. package/popover/body.js.map +1 -1
  152. package/property-filter/interfaces.d.ts +1 -0
  153. package/property-filter/interfaces.d.ts.map +1 -1
  154. package/property-filter/interfaces.js.map +1 -1
  155. package/property-filter/token.d.ts.map +1 -1
  156. package/property-filter/token.js +1 -1
  157. package/property-filter/token.js.map +1 -1
  158. package/select/parts/filter.d.ts +1 -1
  159. package/select/utils/use-select.d.ts +1 -7
  160. package/select/utils/use-select.d.ts.map +1 -1
  161. package/select/utils/use-select.js +1 -1
  162. package/select/utils/use-select.js.map +1 -1
  163. package/table/interfaces.d.ts +20 -0
  164. package/table/interfaces.d.ts.map +1 -1
  165. package/table/interfaces.js.map +1 -1
  166. package/table/internal.d.ts.map +1 -1
  167. package/table/internal.js +5 -3
  168. package/table/internal.js.map +1 -1
  169. package/table/styles.css.js +34 -34
  170. package/table/styles.scoped.css +42 -40
  171. package/table/styles.selectors.js +34 -34
  172. package/table/thead.js +1 -1
  173. package/table/thead.js.map +1 -1
  174. package/tabs/index.d.ts.map +1 -1
  175. package/tabs/index.js +9 -11
  176. package/tabs/index.js.map +1 -1
  177. package/tabs/styles.css.js +21 -21
  178. package/tabs/styles.scoped.css +48 -41
  179. package/tabs/styles.selectors.js +21 -21
  180. package/tabs/tab-header-bar.d.ts +4 -0
  181. package/tabs/tab-header-bar.d.ts.map +1 -1
  182. package/tabs/tab-header-bar.js +5 -1
  183. package/tabs/tab-header-bar.js.map +1 -1
  184. package/tag-editor/internal.d.ts.map +1 -1
  185. package/tag-editor/internal.js +6 -7
  186. package/tag-editor/internal.js.map +1 -1
  187. package/test-utils/tsconfig.tsbuildinfo +1 -1
  188. package/tutorial-panel/components/tutorial-detail-view/index.d.ts.map +1 -1
  189. package/tutorial-panel/components/tutorial-detail-view/index.js +3 -1
  190. package/tutorial-panel/components/tutorial-detail-view/index.js.map +1 -1
  191. package/tutorial-panel/components/tutorial-detail-view/task.d.ts.map +1 -1
  192. package/tutorial-panel/components/tutorial-detail-view/task.js +2 -1
  193. package/tutorial-panel/components/tutorial-detail-view/task.js.map +1 -1
  194. package/tutorial-panel/components/tutorial-list/index.d.ts.map +1 -1
  195. package/tutorial-panel/components/tutorial-list/index.js +2 -2
  196. package/tutorial-panel/components/tutorial-list/index.js.map +1 -1
  197. package/tutorial-panel/interfaces.d.ts +2 -0
  198. package/tutorial-panel/interfaces.d.ts.map +1 -1
  199. package/tutorial-panel/interfaces.js.map +1 -1
  200. package/wizard/index.d.ts.map +1 -1
  201. package/wizard/index.js +9 -5
  202. package/wizard/index.js.map +1 -1
  203. package/wizard/wizard-form.d.ts.map +1 -1
  204. package/wizard/wizard-form.js +7 -2
  205. package/wizard/wizard-form.js.map +1 -1
  206. package/date-range-picker/calendar/use-date-time.d.ts +0 -9
  207. package/date-range-picker/calendar/use-date-time.d.ts.map +0 -1
  208. package/date-range-picker/calendar/use-date-time.js +0 -16
  209. package/date-range-picker/calendar/use-date-time.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"annotation-popover.d.ts","sourceRoot":"","sources":["../../../../src/annotation-context/annotation/annotation-popover.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAQzC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAKvD,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IAEvB,SAAS,EAAE,YAAY,CAAC,WAAW,CAAC,CAAC;IAErC,iBAAiB,EAAE,OAAO,CAAC;IAC3B,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAE9B,QAAQ,EAAE,MAAM,IAAI,CAAC;IAErB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,qBAAqB,EAAE,MAAM,IAAI,CAAC;IAElC,kBAAkB,EAAE,MAAM,CAAC;IAE3B,eAAe,EAAE,MAAM,CAAC;IAExB,gBAAgB,EAAE,OAAO,CAAC;IAE1B,SAAS,EAAE,MAAM,IAAI,CAAC;IAEtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAEvC,WAAW,EAAE,sBAAsB,CAAC,aAAa,CAAC,CAAC;CACpD;AASD,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,OAAO,EACP,KAAK,EAEL,SAAiB,EAEjB,kBAAkB,EAElB,eAAe,EAEf,kBAAkB,EAClB,gBAAgB,EAEhB,SAAS,EAET,iBAAiB,EACjB,iBAAiB,EAEjB,QAAQ,EAER,QAAQ,EAER,qBAAqB,EACrB,qBAAqB,EACrB,WAAW,GACZ,EAAE,sBAAsB,eAsFxB"}
1
+ {"version":3,"file":"annotation-popover.d.ts","sourceRoot":"","sources":["../../../../src/annotation-context/annotation/annotation-popover.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAQzC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAOvD,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IAEvB,SAAS,EAAE,YAAY,CAAC,WAAW,CAAC,CAAC;IAErC,iBAAiB,EAAE,OAAO,CAAC;IAC3B,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAE9B,QAAQ,EAAE,MAAM,IAAI,CAAC;IAErB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,qBAAqB,EAAE,MAAM,IAAI,CAAC;IAElC,kBAAkB,EAAE,MAAM,CAAC;IAE3B,eAAe,EAAE,MAAM,CAAC;IAExB,gBAAgB,EAAE,OAAO,CAAC;IAE1B,SAAS,EAAE,MAAM,IAAI,CAAC;IAEtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAEvC,WAAW,EAAE,sBAAsB,CAAC,aAAa,CAAC,CAAC;CACpD;AASD,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,OAAO,EACP,KAAK,EAEL,SAAiB,EAEjB,kBAAkB,EAElB,eAAe,EAEf,kBAAkB,EAClB,gBAAgB,EAEhB,SAAS,EAET,iBAAiB,EACjB,iBAAiB,EAEjB,QAAQ,EAER,QAAQ,EAER,qBAAqB,EACrB,qBAAqB,EACrB,WAAW,GACZ,EAAE,sBAAsB,eAuGxB"}
@@ -10,6 +10,8 @@ import PopoverContainer from '../../popover/container';
10
10
  import PopoverBody from '../../popover/body';
11
11
  import InternalAlert from '../../alert/internal';
12
12
  import { scrollElementIntoView } from '../../internal/utils/scrollable-containers';
13
+ import { useUniqueId } from '../../internal/hooks/use-unique-id/index.js';
14
+ import { joinStrings } from '../../internal/utils/strings/join-strings.js';
13
15
  var arrow = function (position) { return (React.createElement("div", { className: clsx(styles.arrow, styles["arrow-position-".concat(position)]) },
14
16
  React.createElement("div", { className: styles['arrow-outer'] }),
15
17
  React.createElement("div", { className: styles['arrow-inner'] }))); };
@@ -19,8 +21,12 @@ export function AnnotationPopover(_a) {
19
21
  var _a;
20
22
  scrollElementIntoView((_a = trackRef.current) !== null && _a !== void 0 ? _a : undefined);
21
23
  }, [trackRef]);
24
+ var popoverHeaderId = useUniqueId('poppver-header-');
25
+ var stepCounterId = useUniqueId('step-counter-');
22
26
  return (React.createElement(PopoverContainer, { size: "medium", fixedWidth: false, position: direction, trackRef: trackRef, trackKey: taskLocalStepIndex, variant: "annotation", arrow: arrow, zIndex: 1000 },
23
- React.createElement(PopoverBody, { dismissButton: true, dismissAriaLabel: i18nStrings.labelDismissAnnotation, header: React.createElement(InternalBox, { color: "text-body-secondary", fontSize: "body-s", margin: { top: 'xxxs' }, className: styles.header }, title), onDismiss: onDismiss, className: styles.annotation, variant: "annotation", overflowVisible: "content" },
27
+ React.createElement(PopoverBody, { dismissButton: true, dismissAriaLabel: i18nStrings.labelDismissAnnotation, header: React.createElement(InternalBox, { id: popoverHeaderId, color: "text-body-secondary", fontSize: "body-s", margin: { top: 'xxxs' }, className: styles.header }, title), onDismiss: onDismiss, className: styles.annotation, variant: "annotation", overflowVisible: "content",
28
+ // create new dialog to have the native dialog behavior of the screen readers
29
+ key: taskLocalStepIndex, ariaLabelledby: joinStrings(popoverHeaderId, stepCounterId) },
24
30
  React.createElement(InternalSpaceBetween, { size: "s" },
25
31
  React.createElement("div", { className: styles.description },
26
32
  React.createElement(InternalBox, { className: styles.content }, content)),
@@ -29,7 +35,7 @@ export function AnnotationPopover(_a) {
29
35
  React.createElement("div", { className: styles.divider }),
30
36
  React.createElement("div", { className: styles.actionBar },
31
37
  React.createElement("div", { className: styles.stepCounter },
32
- React.createElement(InternalBox, { className: styles['step-counter-content'], color: "text-body-secondary", fontSize: "body-s" }, i18nStrings.stepCounterText(taskLocalStepIndex !== null && taskLocalStepIndex !== void 0 ? taskLocalStepIndex : 0, totalLocalSteps !== null && totalLocalSteps !== void 0 ? totalLocalSteps : 0))),
38
+ React.createElement(InternalBox, { id: stepCounterId, className: styles['step-counter-content'], color: "text-body-secondary", fontSize: "body-s" }, i18nStrings.stepCounterText(taskLocalStepIndex !== null && taskLocalStepIndex !== void 0 ? taskLocalStepIndex : 0, totalLocalSteps !== null && totalLocalSteps !== void 0 ? totalLocalSteps : 0))),
33
39
  React.createElement(InternalSpaceBetween, { size: "xs", direction: "horizontal" },
34
40
  showPreviousButton && (React.createElement(InternalButton, { variant: "link", onClick: onPreviousButtonClick, disabled: !previousButtonEnabled, formAction: "none", ariaLabel: i18nStrings.previousButtonText, className: styles['previous-button'] }, i18nStrings.previousButtonText)),
35
41
  showFinishButton ? (React.createElement(InternalButton, { onClick: onFinish, formAction: "none", ariaLabel: i18nStrings.finishButtonText, className: styles['finish-button'] }, i18nStrings.finishButtonText)) : (React.createElement(InternalButton, { onClick: onNextButtonClick, disabled: !nextButtonEnabled, formAction: "none", ariaLabel: i18nStrings.nextButtonText, className: styles['next-button'] }, i18nStrings.nextButtonText)))))))));
@@ -1 +1 @@
1
- {"version":3,"file":"annotation-popover.js","sourceRoot":"","sources":["../../../../src/annotation-context/annotation/annotation-popover.tsx"],"names":[],"mappings":"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","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect } from 'react';\nimport clsx from 'clsx';\nimport styles from './styles.css.js';\nimport InternalBox from '../../box/internal';\nimport { InternalButton } from '../../button/internal';\nimport InternalSpaceBetween from '../../space-between/internal';\nimport PopoverContainer from '../../popover/container';\nimport PopoverBody from '../../popover/body';\nimport { HotspotProps } from '../../hotspot/interfaces';\nimport { AnnotationContextProps } from '../interfaces';\nimport InternalAlert from '../../alert/internal';\nimport { InternalPosition } from '../../popover/interfaces';\nimport { scrollElementIntoView } from '../../internal/utils/scrollable-containers';\n\nexport interface AnnotationPopoverProps {\n title: string;\n content: React.ReactNode;\n alert: React.ReactNode;\n\n direction: HotspotProps['direction'];\n\n nextButtonEnabled: boolean;\n onNextButtonClick: () => void;\n\n onFinish: () => void;\n\n showPreviousButton: boolean;\n previousButtonEnabled: boolean;\n onPreviousButtonClick: () => void;\n\n taskLocalStepIndex: number;\n\n totalLocalSteps: number;\n\n showFinishButton: boolean;\n\n onDismiss: () => void;\n\n trackRef: React.RefObject<HTMLElement>;\n\n i18nStrings: AnnotationContextProps['i18nStrings'];\n}\n\nconst arrow = (position: InternalPosition | null) => (\n <div className={clsx(styles.arrow, styles[`arrow-position-${position}`])}>\n <div className={styles['arrow-outer']} />\n <div className={styles['arrow-inner']} />\n </div>\n);\n\nexport function AnnotationPopover({\n title,\n content,\n alert,\n\n direction = 'top',\n\n taskLocalStepIndex,\n\n totalLocalSteps,\n\n showPreviousButton,\n showFinishButton,\n\n onDismiss,\n\n nextButtonEnabled,\n onNextButtonClick,\n\n onFinish,\n\n trackRef,\n\n previousButtonEnabled,\n onPreviousButtonClick,\n i18nStrings,\n}: AnnotationPopoverProps) {\n useEffect(() => {\n scrollElementIntoView(trackRef.current ?? undefined);\n }, [trackRef]);\n\n return (\n <PopoverContainer\n size=\"medium\"\n fixedWidth={false}\n position={direction}\n trackRef={trackRef}\n trackKey={taskLocalStepIndex}\n variant=\"annotation\"\n arrow={arrow}\n zIndex={1000}\n >\n <PopoverBody\n dismissButton={true}\n dismissAriaLabel={i18nStrings.labelDismissAnnotation}\n header={\n <InternalBox color=\"text-body-secondary\" fontSize=\"body-s\" margin={{ top: 'xxxs' }} className={styles.header}>\n {title}\n </InternalBox>\n }\n onDismiss={onDismiss}\n className={styles.annotation}\n variant=\"annotation\"\n overflowVisible=\"content\"\n >\n <InternalSpaceBetween size=\"s\">\n <div className={styles.description}>\n <InternalBox className={styles.content}>{content}</InternalBox>\n </div>\n\n {alert && <InternalAlert type=\"warning\">{alert}</InternalAlert>}\n\n <InternalSpaceBetween size=\"s\">\n <div className={styles.divider} />\n\n <div className={styles.actionBar}>\n <div className={styles.stepCounter}>\n <InternalBox className={styles['step-counter-content']} color=\"text-body-secondary\" fontSize=\"body-s\">\n {i18nStrings.stepCounterText(taskLocalStepIndex ?? 0, totalLocalSteps ?? 0)}\n </InternalBox>\n </div>\n <InternalSpaceBetween size=\"xs\" direction=\"horizontal\">\n {showPreviousButton && (\n <InternalButton\n variant=\"link\"\n onClick={onPreviousButtonClick}\n disabled={!previousButtonEnabled}\n formAction=\"none\"\n ariaLabel={i18nStrings.previousButtonText}\n className={styles['previous-button']}\n >\n {i18nStrings.previousButtonText}\n </InternalButton>\n )}\n\n {showFinishButton ? (\n <InternalButton\n onClick={onFinish}\n formAction=\"none\"\n ariaLabel={i18nStrings.finishButtonText}\n className={styles['finish-button']}\n >\n {i18nStrings.finishButtonText}\n </InternalButton>\n ) : (\n <InternalButton\n onClick={onNextButtonClick}\n disabled={!nextButtonEnabled}\n formAction=\"none\"\n ariaLabel={i18nStrings.nextButtonText}\n className={styles['next-button']}\n >\n {i18nStrings.nextButtonText}\n </InternalButton>\n )}\n </InternalSpaceBetween>\n </div>\n </InternalSpaceBetween>\n </InternalSpaceBetween>\n </PopoverBody>\n </PopoverContainer>\n );\n}\n"]}
1
+ {"version":3,"file":"annotation-popover.js","sourceRoot":"","sources":["../../../../src/annotation-context/annotation/annotation-popover.tsx"],"names":[],"mappings":"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","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect } from 'react';\nimport clsx from 'clsx';\nimport styles from './styles.css.js';\nimport InternalBox from '../../box/internal';\nimport { InternalButton } from '../../button/internal';\nimport InternalSpaceBetween from '../../space-between/internal';\nimport PopoverContainer from '../../popover/container';\nimport PopoverBody from '../../popover/body';\nimport { HotspotProps } from '../../hotspot/interfaces';\nimport { AnnotationContextProps } from '../interfaces';\nimport InternalAlert from '../../alert/internal';\nimport { InternalPosition } from '../../popover/interfaces';\nimport { scrollElementIntoView } from '../../internal/utils/scrollable-containers';\nimport { useUniqueId } from '../../internal/hooks/use-unique-id/index.js';\nimport { joinStrings } from '../../internal/utils/strings/join-strings.js';\n\nexport interface AnnotationPopoverProps {\n title: string;\n content: React.ReactNode;\n alert: React.ReactNode;\n\n direction: HotspotProps['direction'];\n\n nextButtonEnabled: boolean;\n onNextButtonClick: () => void;\n\n onFinish: () => void;\n\n showPreviousButton: boolean;\n previousButtonEnabled: boolean;\n onPreviousButtonClick: () => void;\n\n taskLocalStepIndex: number;\n\n totalLocalSteps: number;\n\n showFinishButton: boolean;\n\n onDismiss: () => void;\n\n trackRef: React.RefObject<HTMLElement>;\n\n i18nStrings: AnnotationContextProps['i18nStrings'];\n}\n\nconst arrow = (position: InternalPosition | null) => (\n <div className={clsx(styles.arrow, styles[`arrow-position-${position}`])}>\n <div className={styles['arrow-outer']} />\n <div className={styles['arrow-inner']} />\n </div>\n);\n\nexport function AnnotationPopover({\n title,\n content,\n alert,\n\n direction = 'top',\n\n taskLocalStepIndex,\n\n totalLocalSteps,\n\n showPreviousButton,\n showFinishButton,\n\n onDismiss,\n\n nextButtonEnabled,\n onNextButtonClick,\n\n onFinish,\n\n trackRef,\n\n previousButtonEnabled,\n onPreviousButtonClick,\n i18nStrings,\n}: AnnotationPopoverProps) {\n useEffect(() => {\n scrollElementIntoView(trackRef.current ?? undefined);\n }, [trackRef]);\n\n const popoverHeaderId = useUniqueId('poppver-header-');\n const stepCounterId = useUniqueId('step-counter-');\n\n return (\n <PopoverContainer\n size=\"medium\"\n fixedWidth={false}\n position={direction}\n trackRef={trackRef}\n trackKey={taskLocalStepIndex}\n variant=\"annotation\"\n arrow={arrow}\n zIndex={1000}\n >\n <PopoverBody\n dismissButton={true}\n dismissAriaLabel={i18nStrings.labelDismissAnnotation}\n header={\n <InternalBox\n id={popoverHeaderId}\n color=\"text-body-secondary\"\n fontSize=\"body-s\"\n margin={{ top: 'xxxs' }}\n className={styles.header}\n >\n {title}\n </InternalBox>\n }\n onDismiss={onDismiss}\n className={styles.annotation}\n variant=\"annotation\"\n overflowVisible=\"content\"\n // create new dialog to have the native dialog behavior of the screen readers\n key={taskLocalStepIndex}\n ariaLabelledby={joinStrings(popoverHeaderId, stepCounterId)}\n >\n <InternalSpaceBetween size=\"s\">\n <div className={styles.description}>\n <InternalBox className={styles.content}>{content}</InternalBox>\n </div>\n\n {alert && <InternalAlert type=\"warning\">{alert}</InternalAlert>}\n\n <InternalSpaceBetween size=\"s\">\n <div className={styles.divider} />\n\n <div className={styles.actionBar}>\n <div className={styles.stepCounter}>\n <InternalBox\n id={stepCounterId}\n className={styles['step-counter-content']}\n color=\"text-body-secondary\"\n fontSize=\"body-s\"\n >\n {i18nStrings.stepCounterText(taskLocalStepIndex ?? 0, totalLocalSteps ?? 0)}\n </InternalBox>\n </div>\n <InternalSpaceBetween size=\"xs\" direction=\"horizontal\">\n {showPreviousButton && (\n <InternalButton\n variant=\"link\"\n onClick={onPreviousButtonClick}\n disabled={!previousButtonEnabled}\n formAction=\"none\"\n ariaLabel={i18nStrings.previousButtonText}\n className={styles['previous-button']}\n >\n {i18nStrings.previousButtonText}\n </InternalButton>\n )}\n\n {showFinishButton ? (\n <InternalButton\n onClick={onFinish}\n formAction=\"none\"\n ariaLabel={i18nStrings.finishButtonText}\n className={styles['finish-button']}\n >\n {i18nStrings.finishButtonText}\n </InternalButton>\n ) : (\n <InternalButton\n onClick={onNextButtonClick}\n disabled={!nextButtonEnabled}\n formAction=\"none\"\n ariaLabel={i18nStrings.nextButtonText}\n className={styles['next-button']}\n >\n {i18nStrings.nextButtonText}\n </InternalButton>\n )}\n </InternalSpaceBetween>\n </div>\n </InternalSpaceBetween>\n </InternalSpaceBetween>\n </PopoverBody>\n </PopoverContainer>\n );\n}\n"]}
@@ -4,6 +4,8 @@ export interface AnnotationTriggerProps {
4
4
  open: boolean;
5
5
  onClick: () => void;
6
6
  i18nStrings: AnnotationContextProps['i18nStrings'];
7
+ taskLocalStepIndex: number;
8
+ totalLocalSteps: number;
7
9
  }
8
10
  declare const _default: React.ForwardRefExoticComponent<AnnotationTriggerProps & React.RefAttributes<HTMLButtonElement>>;
9
11
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"annotation-trigger.d.ts","sourceRoot":"","sources":["../../../../src/annotation-context/annotation/annotation-trigger.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAI3C,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAEvD,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,OAAO,CAAC;IAEd,OAAO,EAAE,MAAM,IAAI,CAAC;IAEpB,WAAW,EAAE,sBAAsB,CAAC,aAAa,CAAC,CAAC;CACpD;;AAED,wBA0BG"}
1
+ {"version":3,"file":"annotation-trigger.d.ts","sourceRoot":"","sources":["../../../../src/annotation-context/annotation/annotation-trigger.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAI3C,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAEvD,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,OAAO,CAAC;IAEd,OAAO,EAAE,MAAM,IAAI,CAAC;IAEpB,WAAW,EAAE,sBAAsB,CAAC,aAAa,CAAC,CAAC;IACnD,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;CACzB;;AAED,wBA0BG"}
@@ -6,13 +6,13 @@ import styles from './styles.css.js';
6
6
  import { AnnotationIcon } from './annotation-icon';
7
7
  import useFocusVisible from '../../internal/hooks/focus-visible/index.js';
8
8
  export default React.forwardRef(function AnnotationTrigger(_a, ref) {
9
- var open = _a.open, onClickHandler = _a.onClick, i18nStrings = _a.i18nStrings;
9
+ var open = _a.open, onClickHandler = _a.onClick, i18nStrings = _a.i18nStrings, taskLocalStepIndex = _a.taskLocalStepIndex, totalLocalSteps = _a.totalLocalSteps;
10
10
  var focusVisible = useFocusVisible();
11
11
  var onClick = useCallback(function (event) {
12
12
  event.preventDefault();
13
13
  onClickHandler();
14
14
  }, [onClickHandler]);
15
- return (React.createElement("button", __assign({ ref: ref, className: styles.hotspot, "aria-haspopup": "dialog", "aria-label": i18nStrings.labelHotspot(open), onClick: onClick }, focusVisible),
15
+ return (React.createElement("button", __assign({ ref: ref, className: styles.hotspot, "aria-haspopup": "dialog", "aria-label": i18nStrings.labelHotspot(open, taskLocalStepIndex !== null && taskLocalStepIndex !== void 0 ? taskLocalStepIndex : 0, totalLocalSteps !== null && totalLocalSteps !== void 0 ? totalLocalSteps : 0), onClick: onClick }, focusVisible),
16
16
  React.createElement(AnnotationIcon, { open: open })));
17
17
  });
18
18
  //# sourceMappingURL=annotation-trigger.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"annotation-trigger.js","sourceRoot":"","sources":["../../../../src/annotation-context/annotation/annotation-trigger.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,eAAe,MAAM,6CAA6C,CAAC;AAW1E,eAAe,KAAK,CAAC,UAAU,CAA4C,SAAS,iBAAiB,CACnG,EAAsE,EACtE,GAAG;QADD,IAAI,UAAA,EAAW,cAAc,aAAA,EAAE,WAAW,iBAAA;IAG5C,IAAM,YAAY,GAAG,eAAe,EAAE,CAAC;IAEvC,IAAM,OAAO,GAAG,WAAW,CACzB,UAAC,KAAuB;QACtB,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB,cAAc,EAAE,CAAC;IACnB,CAAC,EACD,CAAC,cAAc,CAAC,CACjB,CAAC;IAEF,OAAO,CACL,yCACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,MAAM,CAAC,OAAO,mBACX,QAAQ,gBACV,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,EAC1C,OAAO,EAAE,OAAO,IACZ,YAAY;QAEhB,oBAAC,cAAc,IAAC,IAAI,EAAE,IAAI,GAAI,CACvB,CACV,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useCallback } from 'react';\nimport styles from './styles.css.js';\nimport { AnnotationIcon } from './annotation-icon';\nimport useFocusVisible from '../../internal/hooks/focus-visible/index.js';\nimport { AnnotationContextProps } from '../interfaces';\n\nexport interface AnnotationTriggerProps {\n open: boolean;\n\n onClick: () => void;\n\n i18nStrings: AnnotationContextProps['i18nStrings'];\n}\n\nexport default React.forwardRef<HTMLButtonElement, AnnotationTriggerProps>(function AnnotationTrigger(\n { open, onClick: onClickHandler, i18nStrings }: AnnotationTriggerProps,\n ref\n) {\n const focusVisible = useFocusVisible();\n\n const onClick = useCallback(\n (event: React.MouseEvent) => {\n event.preventDefault();\n onClickHandler();\n },\n [onClickHandler]\n );\n\n return (\n <button\n ref={ref}\n className={styles.hotspot}\n aria-haspopup=\"dialog\"\n aria-label={i18nStrings.labelHotspot(open)}\n onClick={onClick}\n {...focusVisible}\n >\n <AnnotationIcon open={open} />\n </button>\n );\n});\n"]}
1
+ {"version":3,"file":"annotation-trigger.js","sourceRoot":"","sources":["../../../../src/annotation-context/annotation/annotation-trigger.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,eAAe,MAAM,6CAA6C,CAAC;AAa1E,eAAe,KAAK,CAAC,UAAU,CAA4C,SAAS,iBAAiB,CACnG,EAA2G,EAC3G,GAAG;QADD,IAAI,UAAA,EAAW,cAAc,aAAA,EAAE,WAAW,iBAAA,EAAE,kBAAkB,wBAAA,EAAE,eAAe,qBAAA;IAGjF,IAAM,YAAY,GAAG,eAAe,EAAE,CAAC;IAEvC,IAAM,OAAO,GAAG,WAAW,CACzB,UAAC,KAAuB;QACtB,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB,cAAc,EAAE,CAAC;IACnB,CAAC,EACD,CAAC,cAAc,CAAC,CACjB,CAAC;IAEF,OAAO,CACL,yCACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,MAAM,CAAC,OAAO,mBACX,QAAQ,gBACV,WAAW,CAAC,YAAY,CAAC,IAAI,EAAE,kBAAkB,aAAlB,kBAAkB,cAAlB,kBAAkB,GAAI,CAAC,EAAE,eAAe,aAAf,eAAe,cAAf,eAAe,GAAI,CAAC,CAAC,EACzF,OAAO,EAAE,OAAO,IACZ,YAAY;QAEhB,oBAAC,cAAc,IAAC,IAAI,EAAE,IAAI,GAAI,CACvB,CACV,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useCallback } from 'react';\nimport styles from './styles.css.js';\nimport { AnnotationIcon } from './annotation-icon';\nimport useFocusVisible from '../../internal/hooks/focus-visible/index.js';\nimport { AnnotationContextProps } from '../interfaces';\n\nexport interface AnnotationTriggerProps {\n open: boolean;\n\n onClick: () => void;\n\n i18nStrings: AnnotationContextProps['i18nStrings'];\n taskLocalStepIndex: number;\n totalLocalSteps: number;\n}\n\nexport default React.forwardRef<HTMLButtonElement, AnnotationTriggerProps>(function AnnotationTrigger(\n { open, onClick: onClickHandler, i18nStrings, taskLocalStepIndex, totalLocalSteps }: AnnotationTriggerProps,\n ref\n) {\n const focusVisible = useFocusVisible();\n\n const onClick = useCallback(\n (event: React.MouseEvent) => {\n event.preventDefault();\n onClickHandler();\n },\n [onClickHandler]\n );\n\n return (\n <button\n ref={ref}\n className={styles.hotspot}\n aria-haspopup=\"dialog\"\n aria-label={i18nStrings.labelHotspot(open, taskLocalStepIndex ?? 0, totalLocalSteps ?? 0)}\n onClick={onClick}\n {...focusVisible}\n >\n <AnnotationIcon open={open} />\n </button>\n );\n});\n"]}
@@ -4,6 +4,8 @@ export interface AnnotationProps {
4
4
  onOpen: (stepId: number) => void;
5
5
  i18nStrings: AnnotationContextProps['i18nStrings'];
6
6
  focusOnRender: boolean;
7
+ totalLocalSteps: number;
8
+ taskLocalStepIndex: number;
7
9
  }
8
- export declare function ClosedAnnotation({ globalStepIndex, onOpen, i18nStrings, focusOnRender }: AnnotationProps): JSX.Element;
10
+ export declare function ClosedAnnotation({ globalStepIndex, onOpen, i18nStrings, focusOnRender, totalLocalSteps, taskLocalStepIndex, }: AnnotationProps): JSX.Element;
9
11
  //# sourceMappingURL=closed-annotation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"closed-annotation.d.ts","sourceRoot":"","sources":["../../../../src/annotation-context/annotation/closed-annotation.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAGvD,MAAM,WAAW,eAAe;IAC9B,eAAe,EAAE,MAAM,CAAC;IAExB,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAEjC,WAAW,EAAE,sBAAsB,CAAC,aAAa,CAAC,CAAC;IAEnD,aAAa,EAAE,OAAO,CAAC;CACxB;AAED,wBAAgB,gBAAgB,CAAC,EAAE,eAAe,EAAE,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,EAAE,eAAe,eAaxG"}
1
+ {"version":3,"file":"closed-annotation.d.ts","sourceRoot":"","sources":["../../../../src/annotation-context/annotation/closed-annotation.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAGvD,MAAM,WAAW,eAAe;IAC9B,eAAe,EAAE,MAAM,CAAC;IAExB,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAEjC,WAAW,EAAE,sBAAsB,CAAC,aAAa,CAAC,CAAC;IAEnD,aAAa,EAAE,OAAO,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,eAAe,EACf,MAAM,EACN,WAAW,EACX,aAAa,EACb,eAAe,EACf,kBAAkB,GACnB,EAAE,eAAe,eAsBjB"}
@@ -3,7 +3,7 @@
3
3
  import React, { useCallback, useEffect, useState } from 'react';
4
4
  import AnnotationTrigger from './annotation-trigger';
5
5
  export function ClosedAnnotation(_a) {
6
- var globalStepIndex = _a.globalStepIndex, onOpen = _a.onOpen, i18nStrings = _a.i18nStrings, focusOnRender = _a.focusOnRender;
6
+ var globalStepIndex = _a.globalStepIndex, onOpen = _a.onOpen, i18nStrings = _a.i18nStrings, focusOnRender = _a.focusOnRender, totalLocalSteps = _a.totalLocalSteps, taskLocalStepIndex = _a.taskLocalStepIndex;
7
7
  var _b = useState(null), hotspotRef = _b[0], setHotspotRef = _b[1];
8
8
  var onClick = useCallback(function () {
9
9
  onOpen(globalStepIndex);
@@ -13,6 +13,6 @@ export function ClosedAnnotation(_a) {
13
13
  hotspotRef.focus();
14
14
  }
15
15
  }, [focusOnRender, hotspotRef]);
16
- return React.createElement(AnnotationTrigger, { open: false, onClick: onClick, i18nStrings: i18nStrings, ref: setHotspotRef });
16
+ return (React.createElement(AnnotationTrigger, { open: false, onClick: onClick, i18nStrings: i18nStrings, ref: setHotspotRef, totalLocalSteps: totalLocalSteps, taskLocalStepIndex: taskLocalStepIndex }));
17
17
  }
18
18
  //# sourceMappingURL=closed-annotation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"closed-annotation.js","sourceRoot":"","sources":["../../../../src/annotation-context/annotation/closed-annotation.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEhE,OAAO,iBAAiB,MAAM,sBAAsB,CAAC;AAYrD,MAAM,UAAU,gBAAgB,CAAC,EAAwE;QAAtE,eAAe,qBAAA,EAAE,MAAM,YAAA,EAAE,WAAW,iBAAA,EAAE,aAAa,mBAAA;IAC9E,IAAA,KAA8B,QAAQ,CAA2B,IAAI,CAAC,EAArE,UAAU,QAAA,EAAE,aAAa,QAA4C,CAAC;IAC7E,IAAM,OAAO,GAAG,WAAW,CAAC;QAC1B,MAAM,CAAC,eAAe,CAAC,CAAC;IAC1B,CAAC,EAAE,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC,CAAC;IAE9B,SAAS,CAAC;QACR,IAAI,aAAa,IAAI,UAAU,EAAE;YAC/B,UAAU,CAAC,KAAK,EAAE,CAAC;SACpB;IACH,CAAC,EAAE,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC,CAAC;IAEhC,OAAO,oBAAC,iBAAiB,IAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,GAAG,EAAE,aAAa,GAAI,CAAC;AAC5G,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useCallback, useEffect, useState } from 'react';\nimport { AnnotationContextProps } from '../interfaces';\nimport AnnotationTrigger from './annotation-trigger';\n\nexport interface AnnotationProps {\n globalStepIndex: number;\n\n onOpen: (stepId: number) => void;\n\n i18nStrings: AnnotationContextProps['i18nStrings'];\n\n focusOnRender: boolean;\n}\n\nexport function ClosedAnnotation({ globalStepIndex, onOpen, i18nStrings, focusOnRender }: AnnotationProps) {\n const [hotspotRef, setHotspotRef] = useState<HTMLButtonElement | null>(null);\n const onClick = useCallback(() => {\n onOpen(globalStepIndex);\n }, [globalStepIndex, onOpen]);\n\n useEffect(() => {\n if (focusOnRender && hotspotRef) {\n hotspotRef.focus();\n }\n }, [focusOnRender, hotspotRef]);\n\n return <AnnotationTrigger open={false} onClick={onClick} i18nStrings={i18nStrings} ref={setHotspotRef} />;\n}\n"]}
1
+ {"version":3,"file":"closed-annotation.js","sourceRoot":"","sources":["../../../../src/annotation-context/annotation/closed-annotation.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEhE,OAAO,iBAAiB,MAAM,sBAAsB,CAAC;AAcrD,MAAM,UAAU,gBAAgB,CAAC,EAOf;QANhB,eAAe,qBAAA,EACf,MAAM,YAAA,EACN,WAAW,iBAAA,EACX,aAAa,mBAAA,EACb,eAAe,qBAAA,EACf,kBAAkB,wBAAA;IAEZ,IAAA,KAA8B,QAAQ,CAA2B,IAAI,CAAC,EAArE,UAAU,QAAA,EAAE,aAAa,QAA4C,CAAC;IAC7E,IAAM,OAAO,GAAG,WAAW,CAAC;QAC1B,MAAM,CAAC,eAAe,CAAC,CAAC;IAC1B,CAAC,EAAE,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC,CAAC;IAE9B,SAAS,CAAC;QACR,IAAI,aAAa,IAAI,UAAU,EAAE;YAC/B,UAAU,CAAC,KAAK,EAAE,CAAC;SACpB;IACH,CAAC,EAAE,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC,CAAC;IAEhC,OAAO,CACL,oBAAC,iBAAiB,IAChB,IAAI,EAAE,KAAK,EACX,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,WAAW,EACxB,GAAG,EAAE,aAAa,EAClB,eAAe,EAAE,eAAe,EAChC,kBAAkB,EAAE,kBAAkB,GACtC,CACH,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, useState } from 'react';\nimport { AnnotationContextProps } from '../interfaces';\nimport AnnotationTrigger from './annotation-trigger';\n\nexport interface AnnotationProps {\n globalStepIndex: number;\n\n onOpen: (stepId: number) => void;\n\n i18nStrings: AnnotationContextProps['i18nStrings'];\n\n focusOnRender: boolean;\n totalLocalSteps: number;\n taskLocalStepIndex: number;\n}\n\nexport function ClosedAnnotation({\n globalStepIndex,\n onOpen,\n i18nStrings,\n focusOnRender,\n totalLocalSteps,\n taskLocalStepIndex,\n}: AnnotationProps) {\n const [hotspotRef, setHotspotRef] = useState<HTMLButtonElement | null>(null);\n const onClick = useCallback(() => {\n onOpen(globalStepIndex);\n }, [globalStepIndex, onOpen]);\n\n useEffect(() => {\n if (focusOnRender && hotspotRef) {\n hotspotRef.focus();\n }\n }, [focusOnRender, hotspotRef]);\n\n return (\n <AnnotationTrigger\n open={false}\n onClick={onClick}\n i18nStrings={i18nStrings}\n ref={setHotspotRef}\n totalLocalSteps={totalLocalSteps}\n taskLocalStepIndex={taskLocalStepIndex}\n />\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"open-annotation.d.ts","sourceRoot":"","sources":["../../../../src/annotation-context/annotation/open-annotation.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiB,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAIvD,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAExB,SAAS,EAAE,YAAY,CAAC,WAAW,CAAC,CAAC;IAErC,iBAAiB,EAAE,OAAO,CAAC;IAC3B,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAE9B,QAAQ,EAAE,MAAM,IAAI,CAAC;IAErB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,qBAAqB,EAAE,MAAM,IAAI,CAAC;IAElC,kBAAkB,EAAE,OAAO,CAAC;IAC5B,gBAAgB,EAAE,OAAO,CAAC;IAE1B,kBAAkB,EAAE,MAAM,CAAC;IAE3B,eAAe,EAAE,MAAM,CAAC;IAExB,SAAS,EAAE,MAAM,IAAI,CAAC;IAEtB,WAAW,EAAE,sBAAsB,CAAC,aAAa,CAAC,CAAC;CACpD;AAED,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,OAAO,EACP,KAAK,EAEL,SAAS,EAET,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAElB,eAAe,EAEf,SAAS,EAET,iBAAiB,EACjB,iBAAiB,EAEjB,QAAQ,EAER,qBAAqB,EACrB,qBAAqB,EACrB,WAAW,GACZ,EAAE,eAAe,eA2BjB"}
1
+ {"version":3,"file":"open-annotation.d.ts","sourceRoot":"","sources":["../../../../src/annotation-context/annotation/open-annotation.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiB,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAIvD,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAExB,SAAS,EAAE,YAAY,CAAC,WAAW,CAAC,CAAC;IAErC,iBAAiB,EAAE,OAAO,CAAC;IAC3B,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAE9B,QAAQ,EAAE,MAAM,IAAI,CAAC;IAErB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,qBAAqB,EAAE,MAAM,IAAI,CAAC;IAElC,kBAAkB,EAAE,OAAO,CAAC;IAC5B,gBAAgB,EAAE,OAAO,CAAC;IAE1B,kBAAkB,EAAE,MAAM,CAAC;IAE3B,eAAe,EAAE,MAAM,CAAC;IAExB,SAAS,EAAE,MAAM,IAAI,CAAC;IAEtB,WAAW,EAAE,sBAAsB,CAAC,aAAa,CAAC,CAAC;CACpD;AAED,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,OAAO,EACP,KAAK,EAEL,SAAS,EAET,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAElB,eAAe,EAEf,SAAS,EAET,iBAAiB,EACjB,iBAAiB,EAEjB,QAAQ,EAER,qBAAqB,EACrB,qBAAqB,EACrB,WAAW,GACZ,EAAE,eAAe,eAkCjB"}
@@ -7,7 +7,7 @@ export function OpenAnnotation(_a) {
7
7
  var title = _a.title, content = _a.content, alert = _a.alert, direction = _a.direction, showPreviousButton = _a.showPreviousButton, showFinishButton = _a.showFinishButton, taskLocalStepIndex = _a.taskLocalStepIndex, totalLocalSteps = _a.totalLocalSteps, onDismiss = _a.onDismiss, nextButtonEnabled = _a.nextButtonEnabled, onNextButtonClick = _a.onNextButtonClick, onFinish = _a.onFinish, previousButtonEnabled = _a.previousButtonEnabled, onPreviousButtonClick = _a.onPreviousButtonClick, i18nStrings = _a.i18nStrings;
8
8
  var trackRef = useRef(null);
9
9
  return (React.createElement(React.Fragment, null,
10
- React.createElement(AnnotationTrigger, { open: true, onClick: onDismiss, i18nStrings: i18nStrings, ref: trackRef }),
10
+ React.createElement(AnnotationTrigger, { open: true, onClick: onDismiss, i18nStrings: i18nStrings, ref: trackRef, totalLocalSteps: totalLocalSteps, taskLocalStepIndex: taskLocalStepIndex }),
11
11
  React.createElement(AnnotationPopover, { trackRef: trackRef, previousButtonEnabled: previousButtonEnabled, showPreviousButton: showPreviousButton, showFinishButton: showFinishButton, totalLocalSteps: totalLocalSteps, i18nStrings: i18nStrings, nextButtonEnabled: nextButtonEnabled, onDismiss: onDismiss, onFinish: onFinish, onNextButtonClick: onNextButtonClick, onPreviousButtonClick: onPreviousButtonClick, taskLocalStepIndex: taskLocalStepIndex, direction: direction, title: title, content: content, alert: alert })));
12
12
  }
13
13
  //# sourceMappingURL=open-annotation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"open-annotation.js","sourceRoot":"","sources":["../../../../src/annotation-context/annotation/open-annotation.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAGtC,OAAO,iBAAiB,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AA6BzD,MAAM,UAAU,cAAc,CAAC,EAuBb;QAtBhB,KAAK,WAAA,EACL,OAAO,aAAA,EACP,KAAK,WAAA,EAEL,SAAS,eAAA,EAET,kBAAkB,wBAAA,EAClB,gBAAgB,sBAAA,EAChB,kBAAkB,wBAAA,EAElB,eAAe,qBAAA,EAEf,SAAS,eAAA,EAET,iBAAiB,uBAAA,EACjB,iBAAiB,uBAAA,EAEjB,QAAQ,cAAA,EAER,qBAAqB,2BAAA,EACrB,qBAAqB,2BAAA,EACrB,WAAW,iBAAA;IAEX,IAAM,QAAQ,GAAG,MAAM,CAAoB,IAAI,CAAC,CAAC;IAEjD,OAAO,CACL;QACE,oBAAC,iBAAiB,IAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,GAAG,EAAE,QAAQ,GAAI;QAE9F,oBAAC,iBAAiB,IAChB,QAAQ,EAAE,QAAQ,EAClB,qBAAqB,EAAE,qBAAqB,EAC5C,kBAAkB,EAAE,kBAAkB,EACtC,gBAAgB,EAAE,gBAAgB,EAClC,eAAe,EAAE,eAAe,EAChC,WAAW,EAAE,WAAW,EACxB,iBAAiB,EAAE,iBAAiB,EACpC,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,EAClB,iBAAiB,EAAE,iBAAiB,EACpC,qBAAqB,EAAE,qBAAqB,EAC5C,kBAAkB,EAAE,kBAAkB,EACtC,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,GACZ,CACD,CACJ,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport { HotspotProps } from '../../hotspot/interfaces';\nimport { AnnotationContextProps } from '../interfaces';\nimport AnnotationTrigger from './annotation-trigger';\nimport { AnnotationPopover } from './annotation-popover';\n\nexport interface AnnotationProps {\n title: string;\n content: React.ReactNode;\n alert?: React.ReactNode;\n\n direction: HotspotProps['direction'];\n\n nextButtonEnabled: boolean;\n onNextButtonClick: () => void;\n\n onFinish: () => void;\n\n previousButtonEnabled: boolean;\n onPreviousButtonClick: () => void;\n\n showPreviousButton: boolean;\n showFinishButton: boolean;\n\n taskLocalStepIndex: number;\n\n totalLocalSteps: number;\n\n onDismiss: () => void;\n\n i18nStrings: AnnotationContextProps['i18nStrings'];\n}\n\nexport function OpenAnnotation({\n title,\n content,\n alert,\n\n direction,\n\n showPreviousButton,\n showFinishButton,\n taskLocalStepIndex,\n\n totalLocalSteps,\n\n onDismiss,\n\n nextButtonEnabled,\n onNextButtonClick,\n\n onFinish,\n\n previousButtonEnabled,\n onPreviousButtonClick,\n i18nStrings,\n}: AnnotationProps) {\n const trackRef = useRef<HTMLButtonElement>(null);\n\n return (\n <>\n <AnnotationTrigger open={true} onClick={onDismiss} i18nStrings={i18nStrings} ref={trackRef} />\n\n <AnnotationPopover\n trackRef={trackRef}\n previousButtonEnabled={previousButtonEnabled}\n showPreviousButton={showPreviousButton}\n showFinishButton={showFinishButton}\n totalLocalSteps={totalLocalSteps}\n i18nStrings={i18nStrings}\n nextButtonEnabled={nextButtonEnabled}\n onDismiss={onDismiss}\n onFinish={onFinish}\n onNextButtonClick={onNextButtonClick}\n onPreviousButtonClick={onPreviousButtonClick}\n taskLocalStepIndex={taskLocalStepIndex}\n direction={direction}\n title={title}\n content={content}\n alert={alert}\n />\n </>\n );\n}\n"]}
1
+ {"version":3,"file":"open-annotation.js","sourceRoot":"","sources":["../../../../src/annotation-context/annotation/open-annotation.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAGtC,OAAO,iBAAiB,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AA6BzD,MAAM,UAAU,cAAc,CAAC,EAuBb;QAtBhB,KAAK,WAAA,EACL,OAAO,aAAA,EACP,KAAK,WAAA,EAEL,SAAS,eAAA,EAET,kBAAkB,wBAAA,EAClB,gBAAgB,sBAAA,EAChB,kBAAkB,wBAAA,EAElB,eAAe,qBAAA,EAEf,SAAS,eAAA,EAET,iBAAiB,uBAAA,EACjB,iBAAiB,uBAAA,EAEjB,QAAQ,cAAA,EAER,qBAAqB,2BAAA,EACrB,qBAAqB,2BAAA,EACrB,WAAW,iBAAA;IAEX,IAAM,QAAQ,GAAG,MAAM,CAAoB,IAAI,CAAC,CAAC;IAEjD,OAAO,CACL;QACE,oBAAC,iBAAiB,IAChB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,SAAS,EAClB,WAAW,EAAE,WAAW,EACxB,GAAG,EAAE,QAAQ,EACb,eAAe,EAAE,eAAe,EAChC,kBAAkB,EAAE,kBAAkB,GACtC;QAEF,oBAAC,iBAAiB,IAChB,QAAQ,EAAE,QAAQ,EAClB,qBAAqB,EAAE,qBAAqB,EAC5C,kBAAkB,EAAE,kBAAkB,EACtC,gBAAgB,EAAE,gBAAgB,EAClC,eAAe,EAAE,eAAe,EAChC,WAAW,EAAE,WAAW,EACxB,iBAAiB,EAAE,iBAAiB,EACpC,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,EAClB,iBAAiB,EAAE,iBAAiB,EACpC,qBAAqB,EAAE,qBAAqB,EAC5C,kBAAkB,EAAE,kBAAkB,EACtC,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,GACZ,CACD,CACJ,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport { HotspotProps } from '../../hotspot/interfaces';\nimport { AnnotationContextProps } from '../interfaces';\nimport AnnotationTrigger from './annotation-trigger';\nimport { AnnotationPopover } from './annotation-popover';\n\nexport interface AnnotationProps {\n title: string;\n content: React.ReactNode;\n alert?: React.ReactNode;\n\n direction: HotspotProps['direction'];\n\n nextButtonEnabled: boolean;\n onNextButtonClick: () => void;\n\n onFinish: () => void;\n\n previousButtonEnabled: boolean;\n onPreviousButtonClick: () => void;\n\n showPreviousButton: boolean;\n showFinishButton: boolean;\n\n taskLocalStepIndex: number;\n\n totalLocalSteps: number;\n\n onDismiss: () => void;\n\n i18nStrings: AnnotationContextProps['i18nStrings'];\n}\n\nexport function OpenAnnotation({\n title,\n content,\n alert,\n\n direction,\n\n showPreviousButton,\n showFinishButton,\n taskLocalStepIndex,\n\n totalLocalSteps,\n\n onDismiss,\n\n nextButtonEnabled,\n onNextButtonClick,\n\n onFinish,\n\n previousButtonEnabled,\n onPreviousButtonClick,\n i18nStrings,\n}: AnnotationProps) {\n const trackRef = useRef<HTMLButtonElement>(null);\n\n return (\n <>\n <AnnotationTrigger\n open={true}\n onClick={onDismiss}\n i18nStrings={i18nStrings}\n ref={trackRef}\n totalLocalSteps={totalLocalSteps}\n taskLocalStepIndex={taskLocalStepIndex}\n />\n\n <AnnotationPopover\n trackRef={trackRef}\n previousButtonEnabled={previousButtonEnabled}\n showPreviousButton={showPreviousButton}\n showFinishButton={showFinishButton}\n totalLocalSteps={totalLocalSteps}\n i18nStrings={i18nStrings}\n nextButtonEnabled={nextButtonEnabled}\n onDismiss={onDismiss}\n onFinish={onFinish}\n onNextButtonClick={onNextButtonClick}\n onPreviousButtonClick={onPreviousButtonClick}\n taskLocalStepIndex={taskLocalStepIndex}\n direction={direction}\n title={title}\n content={content}\n alert={alert}\n />\n </>\n );\n}\n"]}
@@ -1,29 +1,29 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "arrow": "awsui_arrow_1hpp3_12z9m_93",
5
- "arrow-outer": "awsui_arrow-outer_1hpp3_12z9m_97",
6
- "arrow-inner": "awsui_arrow-inner_1hpp3_12z9m_97",
7
- "arrow-position-right-top": "awsui_arrow-position-right-top_1hpp3_12z9m_128",
8
- "arrow-position-right-bottom": "awsui_arrow-position-right-bottom_1hpp3_12z9m_128",
9
- "arrow-position-left-top": "awsui_arrow-position-left-top_1hpp3_12z9m_131",
10
- "arrow-position-left-bottom": "awsui_arrow-position-left-bottom_1hpp3_12z9m_131",
11
- "arrow-position-top-center": "awsui_arrow-position-top-center_1hpp3_12z9m_134",
12
- "arrow-position-top-responsive": "awsui_arrow-position-top-responsive_1hpp3_12z9m_134",
13
- "arrow-position-bottom-center": "awsui_arrow-position-bottom-center_1hpp3_12z9m_137",
14
- "arrow-position-bottom-responsive": "awsui_arrow-position-bottom-responsive_1hpp3_12z9m_137",
15
- "annotation": "awsui_annotation_1hpp3_12z9m_145",
16
- "next-button": "awsui_next-button_1hpp3_12z9m_146",
17
- "previous-button": "awsui_previous-button_1hpp3_12z9m_147",
18
- "finish-button": "awsui_finish-button_1hpp3_12z9m_148",
19
- "header": "awsui_header_1hpp3_12z9m_149",
20
- "step-counter-content": "awsui_step-counter-content_1hpp3_12z9m_150",
21
- "content": "awsui_content_1hpp3_12z9m_151",
22
- "description": "awsui_description_1hpp3_12z9m_155",
23
- "actionBar": "awsui_actionBar_1hpp3_12z9m_160",
24
- "stepCounter": "awsui_stepCounter_1hpp3_12z9m_167",
25
- "divider": "awsui_divider_1hpp3_12z9m_171",
26
- "hotspot": "awsui_hotspot_1hpp3_12z9m_175",
27
- "icon": "awsui_icon_1hpp3_12z9m_213"
4
+ "arrow": "awsui_arrow_1hpp3_cgcuy_93",
5
+ "arrow-outer": "awsui_arrow-outer_1hpp3_cgcuy_97",
6
+ "arrow-inner": "awsui_arrow-inner_1hpp3_cgcuy_97",
7
+ "arrow-position-right-top": "awsui_arrow-position-right-top_1hpp3_cgcuy_128",
8
+ "arrow-position-right-bottom": "awsui_arrow-position-right-bottom_1hpp3_cgcuy_128",
9
+ "arrow-position-left-top": "awsui_arrow-position-left-top_1hpp3_cgcuy_131",
10
+ "arrow-position-left-bottom": "awsui_arrow-position-left-bottom_1hpp3_cgcuy_131",
11
+ "arrow-position-top-center": "awsui_arrow-position-top-center_1hpp3_cgcuy_134",
12
+ "arrow-position-top-responsive": "awsui_arrow-position-top-responsive_1hpp3_cgcuy_134",
13
+ "arrow-position-bottom-center": "awsui_arrow-position-bottom-center_1hpp3_cgcuy_137",
14
+ "arrow-position-bottom-responsive": "awsui_arrow-position-bottom-responsive_1hpp3_cgcuy_137",
15
+ "annotation": "awsui_annotation_1hpp3_cgcuy_145",
16
+ "next-button": "awsui_next-button_1hpp3_cgcuy_146",
17
+ "previous-button": "awsui_previous-button_1hpp3_cgcuy_147",
18
+ "finish-button": "awsui_finish-button_1hpp3_cgcuy_148",
19
+ "header": "awsui_header_1hpp3_cgcuy_149",
20
+ "step-counter-content": "awsui_step-counter-content_1hpp3_cgcuy_150",
21
+ "content": "awsui_content_1hpp3_cgcuy_151",
22
+ "description": "awsui_description_1hpp3_cgcuy_155",
23
+ "actionBar": "awsui_actionBar_1hpp3_cgcuy_160",
24
+ "stepCounter": "awsui_stepCounter_1hpp3_cgcuy_167",
25
+ "divider": "awsui_divider_1hpp3_cgcuy_171",
26
+ "hotspot": "awsui_hotspot_1hpp3_cgcuy_175",
27
+ "icon": "awsui_icon_1hpp3_cgcuy_213"
28
28
  };
29
29
 
@@ -90,11 +90,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
90
90
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
91
91
  SPDX-License-Identifier: Apache-2.0
92
92
  */
93
- .awsui_arrow_1hpp3_12z9m_93:not(#\9) {
93
+ .awsui_arrow_1hpp3_cgcuy_93:not(#\9) {
94
94
  width: 20px;
95
95
  height: 10px;
96
96
  }
97
- .awsui_arrow-outer_1hpp3_12z9m_97:not(#\9), .awsui_arrow-inner_1hpp3_12z9m_97:not(#\9) {
97
+ .awsui_arrow-outer_1hpp3_cgcuy_97:not(#\9), .awsui_arrow-inner_1hpp3_cgcuy_97:not(#\9) {
98
98
  position: absolute;
99
99
  overflow: hidden;
100
100
  width: 20px;
@@ -102,7 +102,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
102
102
  top: 0;
103
103
  left: 0;
104
104
  }
105
- .awsui_arrow-outer_1hpp3_12z9m_97:not(#\9)::after, .awsui_arrow-inner_1hpp3_12z9m_97:not(#\9)::after {
105
+ .awsui_arrow-outer_1hpp3_cgcuy_97:not(#\9)::after, .awsui_arrow-inner_1hpp3_cgcuy_97:not(#\9)::after {
106
106
  content: "";
107
107
  box-sizing: border-box;
108
108
  display: inline-block;
@@ -115,26 +115,26 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
115
115
  transform: rotate(45deg);
116
116
  transform-origin: 0 100%;
117
117
  }
118
- .awsui_arrow-outer_1hpp3_12z9m_97:not(#\9)::after {
118
+ .awsui_arrow-outer_1hpp3_cgcuy_97:not(#\9)::after {
119
119
  background-color: var(--color-border-status-info-546i7i, #0972d3);
120
120
  }
121
- .awsui_arrow-inner_1hpp3_12z9m_97:not(#\9) {
121
+ .awsui_arrow-inner_1hpp3_cgcuy_97:not(#\9) {
122
122
  top: 2px;
123
123
  }
124
- .awsui_arrow-inner_1hpp3_12z9m_97:not(#\9)::after {
124
+ .awsui_arrow-inner_1hpp3_cgcuy_97:not(#\9)::after {
125
125
  border-radius: 1px 0 0 0;
126
126
  background-color: var(--color-background-status-info-usb30e, #f2f8fd);
127
127
  }
128
- .awsui_arrow-position-right-top_1hpp3_12z9m_128 > .awsui_arrow-outer_1hpp3_12z9m_97:not(#\9)::after, .awsui_arrow-position-right-bottom_1hpp3_12z9m_128 > .awsui_arrow-outer_1hpp3_12z9m_97:not(#\9)::after {
128
+ .awsui_arrow-position-right-top_1hpp3_cgcuy_128 > .awsui_arrow-outer_1hpp3_cgcuy_97:not(#\9)::after, .awsui_arrow-position-right-bottom_1hpp3_cgcuy_128 > .awsui_arrow-outer_1hpp3_cgcuy_97:not(#\9)::after {
129
129
  box-shadow: -0.71px 0.71px 4px -2px var(--color-shadow-default-3se70f, rgba(0, 7, 22, 0.12));
130
130
  }
131
- .awsui_arrow-position-left-top_1hpp3_12z9m_131 > .awsui_arrow-outer_1hpp3_12z9m_97:not(#\9)::after, .awsui_arrow-position-left-bottom_1hpp3_12z9m_131 > .awsui_arrow-outer_1hpp3_12z9m_97:not(#\9)::after {
131
+ .awsui_arrow-position-left-top_1hpp3_cgcuy_131 > .awsui_arrow-outer_1hpp3_cgcuy_97:not(#\9)::after, .awsui_arrow-position-left-bottom_1hpp3_cgcuy_131 > .awsui_arrow-outer_1hpp3_cgcuy_97:not(#\9)::after {
132
132
  box-shadow: 0.71px -0.71px 4px -2px var(--color-shadow-default-3se70f, rgba(0, 7, 22, 0.12));
133
133
  }
134
- .awsui_arrow-position-top-center_1hpp3_12z9m_134 > .awsui_arrow-outer_1hpp3_12z9m_97:not(#\9)::after, .awsui_arrow-position-top-responsive_1hpp3_12z9m_134 > .awsui_arrow-outer_1hpp3_12z9m_97:not(#\9)::after {
134
+ .awsui_arrow-position-top-center_1hpp3_cgcuy_134 > .awsui_arrow-outer_1hpp3_cgcuy_97:not(#\9)::after, .awsui_arrow-position-top-responsive_1hpp3_cgcuy_134 > .awsui_arrow-outer_1hpp3_cgcuy_97:not(#\9)::after {
135
135
  box-shadow: -0.71px -0.71px 4px -2px var(--color-shadow-default-3se70f, rgba(0, 7, 22, 0.12));
136
136
  }
137
- .awsui_arrow-position-bottom-center_1hpp3_12z9m_137 > .awsui_arrow-outer_1hpp3_12z9m_97:not(#\9)::after, .awsui_arrow-position-bottom-responsive_1hpp3_12z9m_137 > .awsui_arrow-outer_1hpp3_12z9m_97:not(#\9)::after {
137
+ .awsui_arrow-position-bottom-center_1hpp3_cgcuy_137 > .awsui_arrow-outer_1hpp3_cgcuy_97:not(#\9)::after, .awsui_arrow-position-bottom-responsive_1hpp3_cgcuy_137 > .awsui_arrow-outer_1hpp3_cgcuy_97:not(#\9)::after {
138
138
  box-shadow: 0.71px 0.71px 4px -2px var(--color-shadow-default-3se70f, rgba(0, 7, 22, 0.12));
139
139
  }
140
140
 
@@ -142,37 +142,37 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
142
142
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
143
143
  SPDX-License-Identifier: Apache-2.0
144
144
  */
145
- .awsui_annotation_1hpp3_12z9m_145:not(#\9),
146
- .awsui_next-button_1hpp3_12z9m_146:not(#\9),
147
- .awsui_previous-button_1hpp3_12z9m_147:not(#\9),
148
- .awsui_finish-button_1hpp3_12z9m_148:not(#\9),
149
- .awsui_header_1hpp3_12z9m_149:not(#\9),
150
- .awsui_step-counter-content_1hpp3_12z9m_150:not(#\9),
151
- .awsui_content_1hpp3_12z9m_151:not(#\9) {
145
+ .awsui_annotation_1hpp3_cgcuy_145:not(#\9),
146
+ .awsui_next-button_1hpp3_cgcuy_146:not(#\9),
147
+ .awsui_previous-button_1hpp3_cgcuy_147:not(#\9),
148
+ .awsui_finish-button_1hpp3_cgcuy_148:not(#\9),
149
+ .awsui_header_1hpp3_cgcuy_149:not(#\9),
150
+ .awsui_step-counter-content_1hpp3_cgcuy_150:not(#\9),
151
+ .awsui_content_1hpp3_cgcuy_151:not(#\9) {
152
152
  /* used in test-utils */
153
153
  }
154
154
 
155
- .awsui_description_1hpp3_12z9m_155:not(#\9) {
155
+ .awsui_description_1hpp3_cgcuy_155:not(#\9) {
156
156
  overflow: hidden;
157
157
  margin-top: var(--space-xxs-ynfts5, 4px);
158
158
  }
159
159
 
160
- .awsui_actionBar_1hpp3_12z9m_160:not(#\9) {
160
+ .awsui_actionBar_1hpp3_cgcuy_160:not(#\9) {
161
161
  display: flex;
162
162
  justify-content: space-between;
163
163
  align-items: center;
164
164
  position: relative;
165
165
  }
166
166
 
167
- .awsui_stepCounter_1hpp3_12z9m_167:not(#\9) {
167
+ .awsui_stepCounter_1hpp3_cgcuy_167:not(#\9) {
168
168
  margin-right: 20px;
169
169
  }
170
170
 
171
- .awsui_divider_1hpp3_12z9m_171:not(#\9) {
171
+ .awsui_divider_1hpp3_cgcuy_171:not(#\9) {
172
172
  border-bottom: var(--border-divider-section-width-4wm2it, 2px) solid var(--color-border-divider-default-7s2wjw, #e9ebed);
173
173
  }
174
174
 
175
- .awsui_hotspot_1hpp3_12z9m_175:not(#\9) {
175
+ .awsui_hotspot_1hpp3_cgcuy_175:not(#\9) {
176
176
  /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
177
177
  border-collapse: separate;
178
178
  border-spacing: 0;
@@ -211,21 +211,21 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
211
211
  border: none;
212
212
  padding: 0;
213
213
  cursor: pointer;
214
- scroll-margin: var(--awsui-content-scroll-margin-f9jj7p, 40px 0 0 0);
214
+ scroll-margin: var(--awsui-content-scroll-margin-5mks97, 40px 0 0 0);
215
215
  width: 16px;
216
216
  height: 16px;
217
217
  }
218
- .awsui_hotspot_1hpp3_12z9m_175:not(#\9):focus {
218
+ .awsui_hotspot_1hpp3_cgcuy_175:not(#\9):focus {
219
219
  outline: none;
220
220
  }
221
- .awsui_hotspot_1hpp3_12z9m_175[data-awsui-focus-visible=true]:not(#\9):focus {
221
+ .awsui_hotspot_1hpp3_cgcuy_175[data-awsui-focus-visible=true]:not(#\9):focus {
222
222
  position: relative;
223
223
  }
224
- .awsui_hotspot_1hpp3_12z9m_175[data-awsui-focus-visible=true]:not(#\9):focus {
224
+ .awsui_hotspot_1hpp3_cgcuy_175[data-awsui-focus-visible=true]:not(#\9):focus {
225
225
  outline: 2px dotted transparent;
226
226
  outline-offset: calc(2px - 1px);
227
227
  }
228
- .awsui_hotspot_1hpp3_12z9m_175[data-awsui-focus-visible=true]:not(#\9):focus::before {
228
+ .awsui_hotspot_1hpp3_cgcuy_175[data-awsui-focus-visible=true]:not(#\9):focus::before {
229
229
  content: " ";
230
230
  display: block;
231
231
  position: absolute;
@@ -236,13 +236,13 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
236
236
  border-radius: var(--border-radius-control-circular-focus-ring-qawzn7, 4px);
237
237
  box-shadow: 0 0 0 2px var(--color-border-item-focused-ap3b6s, #0972d3);
238
238
  }
239
- .awsui_hotspot_1hpp3_12z9m_175 > .awsui_icon_1hpp3_12z9m_213:not(#\9) {
239
+ .awsui_hotspot_1hpp3_cgcuy_175 > .awsui_icon_1hpp3_cgcuy_213:not(#\9) {
240
240
  position: relative;
241
241
  stroke: var(--color-text-link-default-5f186r, #0972d3);
242
242
  }
243
- .awsui_hotspot_1hpp3_12z9m_175:not(#\9):hover > .awsui_icon_1hpp3_12z9m_213 {
243
+ .awsui_hotspot_1hpp3_cgcuy_175:not(#\9):hover > .awsui_icon_1hpp3_cgcuy_213 {
244
244
  stroke: var(--color-text-link-hover-kololx, #033160);
245
245
  }
246
- .awsui_hotspot_1hpp3_12z9m_175:not(#\9):active > .awsui_icon_1hpp3_12z9m_213 {
246
+ .awsui_hotspot_1hpp3_cgcuy_175:not(#\9):active > .awsui_icon_1hpp3_cgcuy_213 {
247
247
  stroke: var(--color-text-link-default-5f186r, #0972d3);
248
248
  }
@@ -2,29 +2,29 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "arrow": "awsui_arrow_1hpp3_12z9m_93",
6
- "arrow-outer": "awsui_arrow-outer_1hpp3_12z9m_97",
7
- "arrow-inner": "awsui_arrow-inner_1hpp3_12z9m_97",
8
- "arrow-position-right-top": "awsui_arrow-position-right-top_1hpp3_12z9m_128",
9
- "arrow-position-right-bottom": "awsui_arrow-position-right-bottom_1hpp3_12z9m_128",
10
- "arrow-position-left-top": "awsui_arrow-position-left-top_1hpp3_12z9m_131",
11
- "arrow-position-left-bottom": "awsui_arrow-position-left-bottom_1hpp3_12z9m_131",
12
- "arrow-position-top-center": "awsui_arrow-position-top-center_1hpp3_12z9m_134",
13
- "arrow-position-top-responsive": "awsui_arrow-position-top-responsive_1hpp3_12z9m_134",
14
- "arrow-position-bottom-center": "awsui_arrow-position-bottom-center_1hpp3_12z9m_137",
15
- "arrow-position-bottom-responsive": "awsui_arrow-position-bottom-responsive_1hpp3_12z9m_137",
16
- "annotation": "awsui_annotation_1hpp3_12z9m_145",
17
- "next-button": "awsui_next-button_1hpp3_12z9m_146",
18
- "previous-button": "awsui_previous-button_1hpp3_12z9m_147",
19
- "finish-button": "awsui_finish-button_1hpp3_12z9m_148",
20
- "header": "awsui_header_1hpp3_12z9m_149",
21
- "step-counter-content": "awsui_step-counter-content_1hpp3_12z9m_150",
22
- "content": "awsui_content_1hpp3_12z9m_151",
23
- "description": "awsui_description_1hpp3_12z9m_155",
24
- "actionBar": "awsui_actionBar_1hpp3_12z9m_160",
25
- "stepCounter": "awsui_stepCounter_1hpp3_12z9m_167",
26
- "divider": "awsui_divider_1hpp3_12z9m_171",
27
- "hotspot": "awsui_hotspot_1hpp3_12z9m_175",
28
- "icon": "awsui_icon_1hpp3_12z9m_213"
5
+ "arrow": "awsui_arrow_1hpp3_cgcuy_93",
6
+ "arrow-outer": "awsui_arrow-outer_1hpp3_cgcuy_97",
7
+ "arrow-inner": "awsui_arrow-inner_1hpp3_cgcuy_97",
8
+ "arrow-position-right-top": "awsui_arrow-position-right-top_1hpp3_cgcuy_128",
9
+ "arrow-position-right-bottom": "awsui_arrow-position-right-bottom_1hpp3_cgcuy_128",
10
+ "arrow-position-left-top": "awsui_arrow-position-left-top_1hpp3_cgcuy_131",
11
+ "arrow-position-left-bottom": "awsui_arrow-position-left-bottom_1hpp3_cgcuy_131",
12
+ "arrow-position-top-center": "awsui_arrow-position-top-center_1hpp3_cgcuy_134",
13
+ "arrow-position-top-responsive": "awsui_arrow-position-top-responsive_1hpp3_cgcuy_134",
14
+ "arrow-position-bottom-center": "awsui_arrow-position-bottom-center_1hpp3_cgcuy_137",
15
+ "arrow-position-bottom-responsive": "awsui_arrow-position-bottom-responsive_1hpp3_cgcuy_137",
16
+ "annotation": "awsui_annotation_1hpp3_cgcuy_145",
17
+ "next-button": "awsui_next-button_1hpp3_cgcuy_146",
18
+ "previous-button": "awsui_previous-button_1hpp3_cgcuy_147",
19
+ "finish-button": "awsui_finish-button_1hpp3_cgcuy_148",
20
+ "header": "awsui_header_1hpp3_cgcuy_149",
21
+ "step-counter-content": "awsui_step-counter-content_1hpp3_cgcuy_150",
22
+ "content": "awsui_content_1hpp3_cgcuy_151",
23
+ "description": "awsui_description_1hpp3_cgcuy_155",
24
+ "actionBar": "awsui_actionBar_1hpp3_cgcuy_160",
25
+ "stepCounter": "awsui_stepCounter_1hpp3_cgcuy_167",
26
+ "divider": "awsui_divider_1hpp3_cgcuy_171",
27
+ "hotspot": "awsui_hotspot_1hpp3_cgcuy_175",
28
+ "icon": "awsui_icon_1hpp3_cgcuy_213"
29
29
  };
30
30
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/annotation-context/index.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAOtD,OAAO,EAAE,sBAAsB,EAAE,CAAC;AAElC,wBAAgB,WAAW,CAAC,WAAW,EAAE,SAAS,sBAAsB,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,MAAM;;;;;;;;;;EAa7F;AAKD,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EACxC,eAAe,EACf,QAAQ,EACR,YAAY,EACZ,QAAQ,EAAE,eAAe,EACzB,eAAe,EACf,cAAc,EACd,WAAW,GACZ,EAAE,sBAAsB,GAAG,GAAG,CAAC,OAAO,CAsOtC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/annotation-context/index.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAOtD,OAAO,EAAE,sBAAsB,EAAE,CAAC;AAElC,wBAAgB,WAAW,CAAC,WAAW,EAAE,SAAS,sBAAsB,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,MAAM;;;;;;;;;;EAa7F;AAKD,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EACxC,eAAe,EACf,QAAQ,EACR,YAAY,EACZ,QAAQ,EAAE,eAAe,EACzB,eAAe,EACf,cAAc,EACd,WAAW,GACZ,EAAE,sBAAsB,GAAG,GAAG,CAAC,OAAO,CA0OtC"}
@@ -124,7 +124,8 @@ export default function AnnotationContext(_a) {
124
124
  return null;
125
125
  }
126
126
  if (!task || !step || !open || id !== currentId) {
127
- return (React.createElement(ClosedAnnotation, { globalStepIndex: globalStepIndex, i18nStrings: i18nStrings, onOpen: onOpen, focusOnRender: id === currentId }));
127
+ var _a = getStepInfo(annotations, globalStepIndex), currentTask = _a.task, currentStepIndex_1 = _a.localIndex;
128
+ return (React.createElement(ClosedAnnotation, { globalStepIndex: globalStepIndex, i18nStrings: i18nStrings, onOpen: onOpen, focusOnRender: id === currentId, totalLocalSteps: currentTask ? currentTask.steps.length : 0, taskLocalStepIndex: currentStepIndex_1 }));
128
129
  }
129
130
  return (React.createElement(OpenAnnotation, { i18nStrings: i18nStrings, direction: direction, title: i18nStrings.taskTitle(taskIndex, task.title), content: step.content, alert: step.warningAlert, showPreviousButton: currentStepIndex !== 0, showFinishButton: currentStepIndex + 1 === totalStepCount, taskLocalStepIndex: localIndex, totalLocalSteps: task.steps.length, nextButtonEnabled: nextHotspotIsAvailable, onNextButtonClick: openNextStep, onFinish: onFinish, previousButtonEnabled: previousHotspotIsAvailable, onPreviousButtonClick: openPreviousStep, onDismiss: onDismiss }));
130
131
  }, [
@@ -146,6 +147,7 @@ export default function AnnotationContext(_a) {
146
147
  openPreviousStep,
147
148
  onDismiss,
148
149
  onOpen,
150
+ annotations,
149
151
  ]);
150
152
  var registerHotspot = useCallback(function (id) {
151
153
  var _a;