@cloudscape-design/components 3.0.1064 → 3.0.1066

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 (256) hide show
  1. package/alert/index.d.ts.map +1 -1
  2. package/alert/internal-do-not-use-core.js +7 -5
  3. package/alert/internal-do-not-use-core.js.map +1 -1
  4. package/alert/internal.d.ts +1 -1
  5. package/alert/internal.js +1 -1
  6. package/alert/internal.js.map +1 -1
  7. package/alert/style.js +3 -3
  8. package/alert/style.js.map +1 -1
  9. package/alert/styles.css.js +27 -27
  10. package/alert/styles.scoped.css +46 -46
  11. package/alert/styles.selectors.js +27 -27
  12. package/anchor-navigation/internal.d.ts.map +1 -1
  13. package/anchor-navigation/internal.js +1 -1
  14. package/anchor-navigation/internal.js.map +1 -1
  15. package/annotation-context/annotation/styles.css.js +24 -24
  16. package/annotation-context/annotation/styles.scoped.css +32 -32
  17. package/annotation-context/annotation/styles.selectors.js +24 -24
  18. package/app-layout/index.js.map +1 -1
  19. package/app-layout/notifications/styles.css.js +3 -3
  20. package/app-layout/notifications/styles.scoped.css +7 -7
  21. package/app-layout/notifications/styles.selectors.js +3 -3
  22. package/app-layout/visual-refresh/styles.css.js +86 -86
  23. package/app-layout/visual-refresh/styles.scoped.css +258 -258
  24. package/app-layout/visual-refresh/styles.selectors.js +86 -86
  25. package/app-layout/visual-refresh-toolbar/drawer/styles.css.js +17 -17
  26. package/app-layout/visual-refresh-toolbar/drawer/styles.scoped.css +39 -39
  27. package/app-layout/visual-refresh-toolbar/drawer/styles.selectors.js +17 -17
  28. package/app-layout/visual-refresh-toolbar/navigation/styles.css.js +4 -4
  29. package/app-layout/visual-refresh-toolbar/navigation/styles.scoped.css +7 -7
  30. package/app-layout/visual-refresh-toolbar/navigation/styles.selectors.js +4 -4
  31. package/app-layout/visual-refresh-toolbar/skeleton/styles.css.js +23 -23
  32. package/app-layout/visual-refresh-toolbar/skeleton/styles.scoped.css +46 -46
  33. package/app-layout/visual-refresh-toolbar/skeleton/styles.selectors.js +23 -23
  34. package/app-layout-toolbar/index.js.map +1 -1
  35. package/area-chart/internal.d.ts.map +1 -1
  36. package/area-chart/internal.js +1 -1
  37. package/area-chart/internal.js.map +1 -1
  38. package/attribute-editor/internal.js +1 -1
  39. package/attribute-editor/internal.js.map +1 -1
  40. package/attribute-editor/styles.css.js +15 -15
  41. package/attribute-editor/styles.scoped.css +28 -28
  42. package/attribute-editor/styles.selectors.js +15 -15
  43. package/box/internal.d.ts.map +1 -1
  44. package/box/internal.js +1 -1
  45. package/box/internal.js.map +1 -1
  46. package/breadcrumb-group/item/styles.css.js +7 -7
  47. package/breadcrumb-group/item/styles.scoped.css +28 -28
  48. package/breadcrumb-group/item/styles.selectors.js +7 -7
  49. package/breadcrumb-group/skeleton.d.ts +1 -1
  50. package/button/internal.d.ts +2 -2
  51. package/button/internal.d.ts.map +1 -1
  52. package/button/internal.js +1 -1
  53. package/button/internal.js.map +1 -1
  54. package/button/styles.css.js +22 -22
  55. package/button/styles.scoped.css +212 -212
  56. package/button/styles.selectors.js +22 -22
  57. package/button-dropdown/item-element/styles.css.js +16 -16
  58. package/button-dropdown/item-element/styles.scoped.css +27 -27
  59. package/button-dropdown/item-element/styles.selectors.js +16 -16
  60. package/button-group/internal.js +1 -1
  61. package/button-group/internal.js.map +1 -1
  62. package/checkbox/styles.css.js +3 -3
  63. package/checkbox/styles.scoped.css +11 -11
  64. package/checkbox/styles.selectors.js +3 -3
  65. package/container/internal.d.ts.map +1 -1
  66. package/container/internal.js +1 -1
  67. package/container/internal.js.map +1 -1
  68. package/content-layout/styles.css.js +14 -14
  69. package/content-layout/styles.scoped.css +27 -27
  70. package/content-layout/styles.selectors.js +14 -14
  71. package/copy-to-clipboard/internal.d.ts.map +1 -1
  72. package/copy-to-clipboard/internal.js +1 -1
  73. package/copy-to-clipboard/internal.js.map +1 -1
  74. package/date-input/internal.d.ts +1 -1
  75. package/date-input/internal.js +1 -1
  76. package/date-input/internal.js.map +1 -1
  77. package/file-dropzone/internal.d.ts.map +1 -1
  78. package/file-dropzone/internal.js +1 -1
  79. package/file-dropzone/internal.js.map +1 -1
  80. package/file-input/internal.d.ts +1 -1
  81. package/file-input/internal.d.ts.map +1 -1
  82. package/file-input/internal.js +1 -1
  83. package/file-input/internal.js.map +1 -1
  84. package/file-upload/internal.d.ts +1 -1
  85. package/file-upload/internal.js +1 -1
  86. package/file-upload/internal.js.map +1 -1
  87. package/flashbar/styles.css.js +50 -50
  88. package/flashbar/styles.scoped.css +187 -187
  89. package/flashbar/styles.selectors.js +50 -50
  90. package/form/index.d.ts.map +1 -1
  91. package/form/index.js +6 -5
  92. package/form/index.js.map +1 -1
  93. package/form-field/interfaces.d.ts +1 -1
  94. package/form-field/interfaces.d.ts.map +1 -1
  95. package/form-field/interfaces.js.map +1 -1
  96. package/form-field/internal.d.ts.map +1 -1
  97. package/form-field/internal.js +6 -4
  98. package/form-field/internal.js.map +1 -1
  99. package/grid/internal.js +1 -1
  100. package/grid/internal.js.map +1 -1
  101. package/header/internal.d.ts.map +1 -1
  102. package/header/internal.js +1 -1
  103. package/header/internal.js.map +1 -1
  104. package/help-panel/styles.css.js +6 -6
  105. package/help-panel/styles.scoped.css +73 -73
  106. package/help-panel/styles.selectors.js +6 -6
  107. package/icon/internal.js +1 -1
  108. package/icon/internal.js.map +1 -1
  109. package/internal/base-component/styles.scoped.css +1 -1
  110. package/internal/components/drag-handle/button.d.ts +1 -1
  111. package/internal/components/drag-handle/button.d.ts.map +1 -1
  112. package/internal/components/drag-handle/button.js +8 -4
  113. package/internal/components/drag-handle/button.js.map +1 -1
  114. package/internal/components/drag-handle/index.d.ts +1 -1
  115. package/internal/components/drag-handle/index.d.ts.map +1 -1
  116. package/internal/components/drag-handle/index.js +3 -3
  117. package/internal/components/drag-handle/index.js.map +1 -1
  118. package/internal/components/drag-handle/interfaces.d.ts +3 -0
  119. package/internal/components/drag-handle/interfaces.d.ts.map +1 -1
  120. package/internal/components/drag-handle/interfaces.js.map +1 -1
  121. package/internal/components/drag-handle/styles.css.js +14 -13
  122. package/internal/components/drag-handle/styles.scoped.css +22 -18
  123. package/internal/components/drag-handle/styles.selectors.js +14 -13
  124. package/internal/components/drag-handle-wrapper/index.d.ts +1 -0
  125. package/internal/components/drag-handle-wrapper/index.d.ts.map +1 -1
  126. package/internal/components/drag-handle-wrapper/index.js +10 -9
  127. package/internal/components/drag-handle-wrapper/index.js.map +1 -1
  128. package/internal/components/drag-handle-wrapper/interfaces.d.ts +2 -1
  129. package/internal/components/drag-handle-wrapper/interfaces.d.ts.map +1 -1
  130. package/internal/components/drag-handle-wrapper/interfaces.js.map +1 -1
  131. package/internal/components/drag-handle-wrapper/styles.css.js +21 -21
  132. package/internal/components/drag-handle-wrapper/styles.scoped.css +44 -44
  133. package/internal/components/drag-handle-wrapper/styles.selectors.js +21 -21
  134. package/internal/components/dropdown/styles.css.js +20 -20
  135. package/internal/components/dropdown/styles.scoped.css +38 -38
  136. package/internal/components/dropdown/styles.selectors.js +20 -20
  137. package/internal/components/sortable-area/index.d.ts.map +1 -1
  138. package/internal/components/sortable-area/index.js +20 -5
  139. package/internal/components/sortable-area/index.js.map +1 -1
  140. package/internal/components/sortable-area/keyboard-sensor/index.d.ts +23 -6
  141. package/internal/components/sortable-area/keyboard-sensor/index.d.ts.map +1 -1
  142. package/internal/components/sortable-area/keyboard-sensor/index.js +60 -36
  143. package/internal/components/sortable-area/keyboard-sensor/index.js.map +1 -1
  144. package/internal/components/sortable-area/keyboard-sensor/utilities/events.d.ts +2 -0
  145. package/internal/components/sortable-area/keyboard-sensor/utilities/events.d.ts.map +1 -1
  146. package/internal/components/sortable-area/keyboard-sensor/utilities/events.js +2 -0
  147. package/internal/components/sortable-area/keyboard-sensor/utilities/events.js.map +1 -1
  148. package/internal/components/sortable-area/keyboard-sensor/utilities/scroll.d.ts +1 -1
  149. package/internal/components/sortable-area/keyboard-sensor/utilities/scroll.d.ts.map +1 -1
  150. package/internal/components/sortable-area/keyboard-sensor/utilities/scroll.js +4 -9
  151. package/internal/components/sortable-area/keyboard-sensor/utilities/scroll.js.map +1 -1
  152. package/internal/components/sortable-area/styles.css.js +8 -8
  153. package/internal/components/sortable-area/styles.scoped.css +15 -19
  154. package/internal/components/sortable-area/styles.selectors.js +8 -8
  155. package/internal/components/sortable-area/use-drag-and-drop-reorder.d.ts +4 -2
  156. package/internal/components/sortable-area/use-drag-and-drop-reorder.d.ts.map +1 -1
  157. package/internal/components/sortable-area/use-drag-and-drop-reorder.js +36 -40
  158. package/internal/components/sortable-area/use-drag-and-drop-reorder.js.map +1 -1
  159. package/internal/components/token-list/styles.css.js +10 -10
  160. package/internal/components/token-list/styles.scoped.css +25 -25
  161. package/internal/components/token-list/styles.selectors.js +10 -10
  162. package/internal/environment.js +2 -2
  163. package/internal/environment.json +2 -2
  164. package/internal/generated/custom-css-properties/index.d.ts +4 -0
  165. package/internal/generated/custom-css-properties/index.d.ts.map +1 -1
  166. package/internal/generated/custom-css-properties/index.js +79 -75
  167. package/internal/generated/custom-css-properties/index.js.map +1 -1
  168. package/internal/generated/theming/index.cjs +14 -0
  169. package/internal/generated/theming/index.cjs.d.ts +63 -0
  170. package/internal/generated/theming/index.d.ts +63 -0
  171. package/internal/generated/theming/index.js +14 -0
  172. package/internal/hooks/use-base-component/index.d.ts +5 -5
  173. package/internal/hooks/use-base-component/index.d.ts.map +1 -1
  174. package/internal/hooks/use-base-component/index.js.map +1 -1
  175. package/internal/manifest.json +1 -1
  176. package/link/internal.d.ts +1 -1
  177. package/link/internal.d.ts.map +1 -1
  178. package/link/internal.js +2 -4
  179. package/link/internal.js.map +1 -1
  180. package/link/styles.css.js +20 -20
  181. package/link/styles.scoped.css +103 -103
  182. package/link/styles.selectors.js +20 -20
  183. package/list/internal.d.ts.map +1 -1
  184. package/list/internal.js +1 -1
  185. package/list/internal.js.map +1 -1
  186. package/mixed-line-bar-chart/internal.d.ts.map +1 -1
  187. package/mixed-line-bar-chart/internal.js +1 -1
  188. package/mixed-line-bar-chart/internal.js.map +1 -1
  189. package/modal/internal.js +1 -1
  190. package/modal/internal.js.map +1 -1
  191. package/multiselect/internal.d.ts +1 -1
  192. package/multiselect/internal.d.ts.map +1 -1
  193. package/multiselect/internal.js +1 -1
  194. package/multiselect/internal.js.map +1 -1
  195. package/package.json +1 -1
  196. package/pagination/internal.d.ts.map +1 -1
  197. package/pagination/internal.js +1 -1
  198. package/pagination/internal.js.map +1 -1
  199. package/popover/internal.js +1 -1
  200. package/popover/internal.js.map +1 -1
  201. package/prompt-input/internal.js +1 -1
  202. package/prompt-input/internal.js.map +1 -1
  203. package/property-filter/interfaces.d.ts +2 -1
  204. package/property-filter/interfaces.d.ts.map +1 -1
  205. package/property-filter/interfaces.js.map +1 -1
  206. package/property-filter/internal.d.ts +1 -1
  207. package/property-filter/internal.d.ts.map +1 -1
  208. package/radio-group/internal.d.ts +1 -1
  209. package/radio-group/internal.d.ts.map +1 -1
  210. package/radio-group/internal.js +1 -1
  211. package/radio-group/internal.js.map +1 -1
  212. package/radio-group/styles.css.js +10 -10
  213. package/radio-group/styles.scoped.css +22 -22
  214. package/radio-group/styles.selectors.js +10 -10
  215. package/segmented-control/internal.d.ts.map +1 -1
  216. package/segmented-control/internal.js +1 -1
  217. package/segmented-control/internal.js.map +1 -1
  218. package/select/internal.js +1 -1
  219. package/select/internal.js.map +1 -1
  220. package/slider/internal.d.ts.map +1 -1
  221. package/slider/internal.js +1 -1
  222. package/slider/internal.js.map +1 -1
  223. package/slider/styles.css.js +26 -26
  224. package/slider/styles.scoped.css +86 -86
  225. package/slider/styles.selectors.js +26 -26
  226. package/space-between/internal.d.ts +1 -1
  227. package/space-between/internal.d.ts.map +1 -1
  228. package/spinner/styles.css.js +13 -13
  229. package/spinner/styles.scoped.css +39 -39
  230. package/spinner/styles.selectors.js +13 -13
  231. package/steps/internal.d.ts +1 -1
  232. package/steps/internal.d.ts.map +1 -1
  233. package/steps/internal.js.map +1 -1
  234. package/tag-editor/styles.css.js +3 -3
  235. package/tag-editor/styles.scoped.css +13 -13
  236. package/tag-editor/styles.selectors.js +3 -3
  237. package/text-content/styles.css.js +1 -1
  238. package/text-content/styles.scoped.css +66 -66
  239. package/text-content/styles.selectors.js +1 -1
  240. package/text-filter/internal.d.ts +1 -1
  241. package/text-filter/internal.d.ts.map +1 -1
  242. package/tiles/internal.d.ts +1 -1
  243. package/tiles/internal.d.ts.map +1 -1
  244. package/tiles/internal.js +1 -1
  245. package/tiles/internal.js.map +1 -1
  246. package/time-input/internal.d.ts +1 -1
  247. package/time-input/internal.d.ts.map +1 -1
  248. package/time-input/internal.js +1 -1
  249. package/time-input/internal.js.map +1 -1
  250. package/toggle/internal.js +1 -1
  251. package/toggle/internal.js.map +1 -1
  252. package/toggle/styles.css.js +10 -10
  253. package/toggle/styles.scoped.css +23 -23
  254. package/toggle/styles.selectors.js +10 -10
  255. package/wizard/wizard-form.js +5 -3
  256. package/wizard/wizard-form.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/alert/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAYzC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAK1C,OAAO,EAAE,UAAU,EAAE,CAAC;AAEtB,QAAA,MAAM,KAAK,mFAmGV,CAAC;AAGF,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/alert/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAYjD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAK1C,OAAO,EAAE,UAAU,EAAE,CAAC;AAEtB,QAAA,MAAM,KAAK,mFAuGV,CAAC;AAGF,eAAe,KAAK,CAAC"}
@@ -2,8 +2,8 @@
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  'use client';
4
4
  import { __rest } from "tslib";
5
- import React, { useEffect } from 'react';
6
- import { useUniqueId } from '@cloudscape-design/component-toolkit/internal';
5
+ import React, { useEffect, useRef } from 'react';
6
+ import { useMergeRefs, useUniqueId } from '@cloudscape-design/component-toolkit/internal';
7
7
  import { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';
8
8
  import { FunnelMetrics } from '../internal/analytics';
9
9
  import { useFunnel, useFunnelStep, useFunnelSubStep } from '../internal/analytics/hooks/use-funnel';
@@ -19,6 +19,8 @@ const Alert = React.forwardRef((_a, ref) => {
19
19
  const baseComponentProps = useBaseComponent('Alert', {
20
20
  props: { type, visible, dismissible: props.dismissible },
21
21
  }, analyticsMetadata);
22
+ const rootRef = useRef(null);
23
+ const __internalRootRef = useMergeRefs(rootRef, baseComponentProps.__internalRootRef);
22
24
  const { funnelIdentifier, funnelInteractionId, funnelErrorContext, submissionAttempt, funnelState, errorCount } = useFunnel();
23
25
  const { stepNumber, stepNameSelector, stepIdentifier, subStepCount, stepErrorContext, subStepConfiguration } = useFunnelStep();
24
26
  const { subStepSelector, subStepNameSelector, subStepIdentifier, subStepErrorContext } = useFunnelSubStep();
@@ -30,7 +32,7 @@ const Alert = React.forwardRef((_a, ref) => {
30
32
  const subStepName = getTextFromSelector(subStepNameSelector);
31
33
  errorCount.current++;
32
34
  // We don't want to report an error if it is hidden, e.g. inside an Expandable Section.
33
- const errorIsVisible = ((_c = (_b = (_a = baseComponentProps.__internalRootRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.width) !== null && _c !== void 0 ? _c : 0) > 0;
35
+ const errorIsVisible = ((_c = (_b = (_a = rootRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.width) !== null && _c !== void 0 ? _c : 0) > 0;
34
36
  if (errorIsVisible) {
35
37
  if (subStepSelector) {
36
38
  FunnelMetrics.funnelSubStepError({
@@ -55,7 +57,7 @@ const Alert = React.forwardRef((_a, ref) => {
55
57
  stepNameSelector,
56
58
  stepName,
57
59
  stepIdentifier,
58
- currentDocument: (_d = baseComponentProps.__internalRootRef.current) === null || _d === void 0 ? void 0 : _d.ownerDocument,
60
+ currentDocument: (_d = rootRef.current) === null || _d === void 0 ? void 0 : _d.ownerDocument,
59
61
  totalSubSteps: subStepCount.current,
60
62
  funnelIdentifier,
61
63
  subStepAllSelector: getSubStepAllSelector(),
@@ -86,7 +88,7 @@ const Alert = React.forwardRef((_a, ref) => {
86
88
  type,
87
89
  },
88
90
  };
89
- return (React.createElement(InternalAlert, Object.assign({ type: type, visible: visible }, props, baseComponentProps, { ref: ref, messageSlotId: messageSlotId, style: style }, getAnalyticsMetadataAttribute({ component: componentAnalyticsMetadata }))));
91
+ return (React.createElement(InternalAlert, Object.assign({ type: type, visible: visible }, props, baseComponentProps, { __internalRootRef: __internalRootRef, ref: ref, messageSlotId: messageSlotId, style: style }, getAnalyticsMetadataAttribute({ component: componentAnalyticsMetadata }))));
90
92
  });
91
93
  applyDisplayName(Alert, 'Alert');
92
94
  export default Alert;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/alert/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,YAAY,CAAC;;AACb,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAC5E,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AACpG,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAC7F,OAAO,EAAkC,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACvG,OAAO,gBAAgB,MAAM,sCAA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,UAAU,CAAC,OAAO,EAAE,CAAC;YACvB,CAAC,CAAC;SACH;QAED,uDAAuD;IACzD,CAAC,EAAE,CAAC,mBAAmB,EAAE,OAAO,EAAE,iBAAiB,EAAE,UAAU,CAAC,CAAC,CAAC;IAElE,MAAM,0BAA0B,GAA6C;QAC3E,IAAI,EAAE,aAAa;QACnB,KAAK,EAAE,IAAI,kBAAkB,CAAC,MAAM,EAAE;QACtC,UAAU,EAAE;YACV,IAAI;SACL;KACF,CAAC;IAEF,OAAO,CACL,oBAAC,aAAa,kBACZ,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,IACZ,KAAK,EACL,kBAAkB,IACtB,GAAG,EAAE,GAAG,EACR,aAAa,EAAE,aAAa,EAC5B,KAAK,EAAE,KAAK,IACR,6BAA6B,CAAC,EAAE,SAAS,EAAE,0BAA0B,EAAE,CAAC,EAC5E,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,gBAAgB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AACjC,eAAe,KAAK,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n'use client';\nimport React, { useEffect } from 'react';\n\nimport { useUniqueId } from '@cloudscape-design/component-toolkit/internal';\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { FunnelMetrics } from '../internal/analytics';\nimport { useFunnel, useFunnelStep, useFunnelSubStep } from '../internal/analytics/hooks/use-funnel';\nimport { getSubStepAllSelector, getTextFromSelector } from '../internal/analytics/selectors';\nimport { BasePropsWithAnalyticsMetadata, getAnalyticsMetadataProps } from '../internal/base-component';\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport { GeneratedAnalyticsMetadataAlertComponent } from './analytics-metadata/interfaces';\nimport { AlertProps } from './interfaces';\nimport InternalAlert from './internal';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\n\nexport { AlertProps };\n\nconst Alert = React.forwardRef(\n ({ type = 'info', visible = true, style, ...props }: AlertProps, ref: React.Ref<AlertProps.Ref>) => {\n const analyticsMetadata = getAnalyticsMetadataProps(props as BasePropsWithAnalyticsMetadata);\n const baseComponentProps = useBaseComponent<HTMLDivElement>(\n 'Alert',\n {\n props: { type, visible, dismissible: props.dismissible },\n },\n analyticsMetadata\n );\n\n const { funnelIdentifier, funnelInteractionId, funnelErrorContext, submissionAttempt, funnelState, errorCount } =\n useFunnel();\n const { stepNumber, stepNameSelector, stepIdentifier, subStepCount, stepErrorContext, subStepConfiguration } =\n useFunnelStep();\n const { subStepSelector, subStepNameSelector, subStepIdentifier, subStepErrorContext } = useFunnelSubStep();\n\n const messageSlotId = useUniqueId('alert-');\n\n useEffect(() => {\n if (funnelInteractionId && visible && type === 'error' && funnelState.current !== 'complete') {\n const stepName = getTextFromSelector(stepNameSelector);\n const subStepName = getTextFromSelector(subStepNameSelector);\n\n errorCount.current++;\n\n // We don't want to report an error if it is hidden, e.g. inside an Expandable Section.\n const errorIsVisible = (baseComponentProps.__internalRootRef.current?.getBoundingClientRect()?.width ?? 0) > 0;\n\n if (errorIsVisible) {\n if (subStepSelector) {\n FunnelMetrics.funnelSubStepError({\n funnelInteractionId,\n funnelIdentifier,\n stepIdentifier,\n subStepSelector,\n subStepName,\n subStepNameSelector,\n stepNumber,\n stepName,\n stepNameSelector,\n subStepAllSelector: getSubStepAllSelector(),\n subStepIdentifier,\n errorContext: analyticsMetadata.errorContext || subStepErrorContext,\n });\n } else if (stepNameSelector) {\n FunnelMetrics.funnelStepError({\n funnelInteractionId,\n stepNumber,\n stepNameSelector,\n stepName,\n stepIdentifier,\n currentDocument: baseComponentProps.__internalRootRef.current?.ownerDocument,\n totalSubSteps: subStepCount.current,\n funnelIdentifier,\n subStepAllSelector: getSubStepAllSelector(),\n errorContext: analyticsMetadata.errorContext || stepErrorContext,\n subStepConfiguration: subStepConfiguration.current?.get(stepNumber),\n stepErrorSelector: '#' + messageSlotId,\n });\n } else {\n FunnelMetrics.funnelError({\n funnelIdentifier,\n funnelInteractionId,\n errorContext: analyticsMetadata.errorContext || funnelErrorContext,\n });\n }\n }\n\n return () => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n errorCount.current--;\n };\n }\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [funnelInteractionId, visible, submissionAttempt, errorCount]);\n\n const componentAnalyticsMetadata: GeneratedAnalyticsMetadataAlertComponent = {\n name: 'awsui.Alert',\n label: `.${analyticsSelectors.header}`,\n properties: {\n type,\n },\n };\n\n return (\n <InternalAlert\n type={type}\n visible={visible}\n {...props}\n {...baseComponentProps}\n ref={ref}\n messageSlotId={messageSlotId}\n style={style}\n {...getAnalyticsMetadataAttribute({ component: componentAnalyticsMetadata })}\n />\n );\n }\n);\n\napplyDisplayName(Alert, 'Alert');\nexport default Alert;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/alert/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,YAAY,CAAC;;AACb,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAC1F,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AACpG,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAC7F,OAAO,EAAkC,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACvG,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAGxE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AAO,GAAG,EAAE;gBACV,uDAAuD;gBACvD,UAAU,CAAC,OAAO,EAAE,CAAC;YACvB,CAAC,CAAC;SACH;QAED,uDAAuD;IACzD,CAAC,EAAE,CAAC,mBAAmB,EAAE,OAAO,EAAE,iBAAiB,EAAE,UAAU,CAAC,CAAC,CAAC;IAElE,MAAM,0BAA0B,GAA6C;QAC3E,IAAI,EAAE,aAAa;QACnB,KAAK,EAAE,IAAI,kBAAkB,CAAC,MAAM,EAAE;QACtC,UAAU,EAAE;YACV,IAAI;SACL;KACF,CAAC;IAEF,OAAO,CACL,oBAAC,aAAa,kBACZ,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,IACZ,KAAK,EACL,kBAAkB,IACtB,iBAAiB,EAAE,iBAAiB,EACpC,GAAG,EAAE,GAAG,EACR,aAAa,EAAE,aAAa,EAC5B,KAAK,EAAE,KAAK,IACR,6BAA6B,CAAC,EAAE,SAAS,EAAE,0BAA0B,EAAE,CAAC,EAC5E,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,gBAAgB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AACjC,eAAe,KAAK,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n'use client';\nimport React, { useEffect, useRef } from 'react';\n\nimport { useMergeRefs, useUniqueId } from '@cloudscape-design/component-toolkit/internal';\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { FunnelMetrics } from '../internal/analytics';\nimport { useFunnel, useFunnelStep, useFunnelSubStep } from '../internal/analytics/hooks/use-funnel';\nimport { getSubStepAllSelector, getTextFromSelector } from '../internal/analytics/selectors';\nimport { BasePropsWithAnalyticsMetadata, getAnalyticsMetadataProps } from '../internal/base-component';\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport { GeneratedAnalyticsMetadataAlertComponent } from './analytics-metadata/interfaces';\nimport { AlertProps } from './interfaces';\nimport InternalAlert from './internal';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\n\nexport { AlertProps };\n\nconst Alert = React.forwardRef(\n ({ type = 'info', visible = true, style, ...props }: AlertProps, ref: React.Ref<AlertProps.Ref>) => {\n const analyticsMetadata = getAnalyticsMetadataProps(props as BasePropsWithAnalyticsMetadata);\n\n const baseComponentProps = useBaseComponent(\n 'Alert',\n {\n props: { type, visible, dismissible: props.dismissible },\n },\n analyticsMetadata\n );\n const rootRef = useRef<HTMLElement>(null);\n const __internalRootRef = useMergeRefs(rootRef, baseComponentProps.__internalRootRef);\n\n const { funnelIdentifier, funnelInteractionId, funnelErrorContext, submissionAttempt, funnelState, errorCount } =\n useFunnel();\n const { stepNumber, stepNameSelector, stepIdentifier, subStepCount, stepErrorContext, subStepConfiguration } =\n useFunnelStep();\n const { subStepSelector, subStepNameSelector, subStepIdentifier, subStepErrorContext } = useFunnelSubStep();\n\n const messageSlotId = useUniqueId('alert-');\n\n useEffect(() => {\n if (funnelInteractionId && visible && type === 'error' && funnelState.current !== 'complete') {\n const stepName = getTextFromSelector(stepNameSelector);\n const subStepName = getTextFromSelector(subStepNameSelector);\n\n errorCount.current++;\n\n // We don't want to report an error if it is hidden, e.g. inside an Expandable Section.\n const errorIsVisible = (rootRef.current?.getBoundingClientRect()?.width ?? 0) > 0;\n\n if (errorIsVisible) {\n if (subStepSelector) {\n FunnelMetrics.funnelSubStepError({\n funnelInteractionId,\n funnelIdentifier,\n stepIdentifier,\n subStepSelector,\n subStepName,\n subStepNameSelector,\n stepNumber,\n stepName,\n stepNameSelector,\n subStepAllSelector: getSubStepAllSelector(),\n subStepIdentifier,\n errorContext: analyticsMetadata.errorContext || subStepErrorContext,\n });\n } else if (stepNameSelector) {\n FunnelMetrics.funnelStepError({\n funnelInteractionId,\n stepNumber,\n stepNameSelector,\n stepName,\n stepIdentifier,\n currentDocument: rootRef.current?.ownerDocument,\n totalSubSteps: subStepCount.current,\n funnelIdentifier,\n subStepAllSelector: getSubStepAllSelector(),\n errorContext: analyticsMetadata.errorContext || stepErrorContext,\n subStepConfiguration: subStepConfiguration.current?.get(stepNumber),\n stepErrorSelector: '#' + messageSlotId,\n });\n } else {\n FunnelMetrics.funnelError({\n funnelIdentifier,\n funnelInteractionId,\n errorContext: analyticsMetadata.errorContext || funnelErrorContext,\n });\n }\n }\n\n return () => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n errorCount.current--;\n };\n }\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [funnelInteractionId, visible, submissionAttempt, errorCount]);\n\n const componentAnalyticsMetadata: GeneratedAnalyticsMetadataAlertComponent = {\n name: 'awsui.Alert',\n label: `.${analyticsSelectors.header}`,\n properties: {\n type,\n },\n };\n\n return (\n <InternalAlert\n type={type}\n visible={visible}\n {...props}\n {...baseComponentProps}\n __internalRootRef={__internalRootRef}\n ref={ref}\n messageSlotId={messageSlotId}\n style={style}\n {...getAnalyticsMetadataAttribute({ component: componentAnalyticsMetadata })}\n />\n );\n }\n);\n\napplyDisplayName(Alert, 'Alert');\nexport default Alert;\n"]}
@@ -3,7 +3,7 @@ import { InternalBaseComponentProps } from '../internal/hooks/use-base-component
3
3
  import { AlertProps } from './interfaces';
4
4
  declare const InternalAlert: React.ForwardRefExoticComponent<AlertProps & {
5
5
  type: AlertProps.Type;
6
- } & InternalBaseComponentProps<HTMLDivElement> & {
6
+ } & InternalBaseComponentProps & {
7
7
  messageSlotId?: string | undefined;
8
8
  style?: AlertProps['style'];
9
9
  } & React.RefAttributes<AlertProps.Ref>>;
package/alert/internal.js CHANGED
@@ -32,7 +32,7 @@ const useDiscoveredAction = createUseDiscoveredAction(awsuiPluginsInternal.alert
32
32
  const useDiscoveredContent = createUseDiscoveredContent('alert', awsuiPluginsInternal.alertContent);
33
33
  const InternalAlert = React.forwardRef((_a, ref) => {
34
34
  var _b, _c;
35
- var { type, i18nStrings, visible = true, dismissible, children, header, buttonText, action, onDismiss, onButtonClick, __internalRootRef = null, statusIconAriaLabel: deprecatedStatusIconAriaLabel, dismissAriaLabel: deprecatedDismissAriaLabel, messageSlotId, style } = _a, rest = __rest(_a, ["type", "i18nStrings", "visible", "dismissible", "children", "header", "buttonText", "action", "onDismiss", "onButtonClick", "__internalRootRef", "statusIconAriaLabel", "dismissAriaLabel", "messageSlotId", "style"]);
35
+ var { type, i18nStrings, visible = true, dismissible, children, header, buttonText, action, onDismiss, onButtonClick, __internalRootRef, statusIconAriaLabel: deprecatedStatusIconAriaLabel, dismissAriaLabel: deprecatedDismissAriaLabel, messageSlotId, style } = _a, rest = __rest(_a, ["type", "i18nStrings", "visible", "dismissible", "children", "header", "buttonText", "action", "onDismiss", "onButtonClick", "__internalRootRef", "statusIconAriaLabel", "dismissAriaLabel", "messageSlotId", "style"]);
36
36
  const baseProps = getBaseProps(rest);
37
37
  const i18n = useInternalI18n('alert');
38
38
  const focusRef = useRef(null);
@@ -1 +1 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/alert/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAC7E,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,aAAa,MAAM,uCAAuC,CAAC;AAClE,OAAO,EAAE,yBAAyB,EAAE,MAA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UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,GAAG,EAAE,CAAC,sBAAsB,CAAC,aAAa,CAAC,EAC1D,cAAc,EAAE,cAAc,EAC9B,YAAY,EAAE,MAAM,CAAC,gBAAgB,CAAC,GACtC,CACE;oBACL,WAAW,IAAI,CACd,2CACE,SAAS,EAAE,MAAM,CAAC,OAAO,IACrB,6BAA6B,CAAC;wBAChC,MAAM,EAAE,SAAS;qBACiC,CAAC;wBAErD,oBAAC,cAAc,IACb,SAAS,EAAE,MAAM,CAAC,gBAAgB,CAAC,EACnC,OAAO,EAAC,MAAM,EACd,QAAQ,EAAC,OAAO,EAChB,UAAU,EAAC,MAAM,EACjB,SAAS,EAAE,gBAAgB,EAC3B,OAAO,EAAE,GAAG,EAAE,CAAC,sBAAsB,CAAC,SAAS,CAAC,EAChD,KAAK,EAAE,sBAAsB,CAAC,KAAK,CAAC,GACpC,CACE,CACP,CACG,CACQ,CACmB,CACjC,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,aAAa,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 clsx from 'clsx';\n\nimport { useMergeRefs } from '@cloudscape-design/component-toolkit/internal';\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { InternalButton } from '../button/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport { IconProps } from '../icon/interfaces';\nimport InternalIcon from '../icon/internal';\nimport { DATA_ATTR_ANALYTICS_ALERT } from '../internal/analytics/selectors';\nimport { getBaseProps } from '../internal/base-component';\nimport VisualContext from '../internal/components/visual-context';\nimport { LinkDefaultVariantContext } from '../internal/context/link-default-variant-context';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport useForwardFocus from '../internal/hooks/forward-focus';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { awsuiPluginsInternal } from '../internal/plugins/api';\nimport { createUseDiscoveredAction, createUseDiscoveredContent } from '../internal/plugins/helpers';\nimport { SomeRequired } from '../internal/types';\nimport useContainerWidth from '../internal/utils/use-container-width';\nimport { ActionsWrapper } from './actions-wrapper';\nimport { GeneratedAnalyticsMetadataAlertDismiss } from './analytics-metadata/interfaces';\nimport { AlertProps } from './interfaces';\nimport { getAlertStyles, getDismissButtonStyles } from './style';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\nimport styles from './styles.css.js';\n\nconst typeToIcon: Record<AlertProps.Type, IconProps['name']> = {\n error: 'status-negative',\n warning: 'status-warning',\n success: 'status-positive',\n info: 'status-info',\n};\n\ntype InternalAlertProps = SomeRequired<AlertProps, 'type'> &\n InternalBaseComponentProps<HTMLDivElement> & {\n messageSlotId?: string;\n style?: AlertProps['style'];\n };\n\nconst useDiscoveredAction = createUseDiscoveredAction(awsuiPluginsInternal.alert.onActionRegistered);\nconst useDiscoveredContent = createUseDiscoveredContent('alert', awsuiPluginsInternal.alertContent);\n\nconst InternalAlert = React.forwardRef(\n (\n {\n type,\n i18nStrings,\n visible = true,\n dismissible,\n children,\n header,\n buttonText,\n action,\n onDismiss,\n onButtonClick,\n __internalRootRef = null,\n statusIconAriaLabel: deprecatedStatusIconAriaLabel,\n dismissAriaLabel: deprecatedDismissAriaLabel,\n messageSlotId,\n style,\n ...rest\n }: InternalAlertProps,\n ref: React.Ref<AlertProps.Ref>\n ) => {\n const baseProps = getBaseProps(rest);\n const i18n = useInternalI18n('alert');\n\n const focusRef = useRef<HTMLDivElement>(null);\n useForwardFocus(ref, focusRef);\n\n const { discoveredActions, headerRef: headerRefAction, contentRef: contentRefAction } = useDiscoveredAction(type);\n const {\n initialHidden,\n headerReplacementType,\n contentReplacementType,\n headerRef: headerRefContent,\n contentRef: contentRefContent,\n replacementHeaderRef,\n replacementContentRef,\n } = useDiscoveredContent({ type, header, children });\n\n const [containerWidth, containerMeasureRef] = useContainerWidth();\n const containerRef = useMergeRefs(containerMeasureRef, __internalRootRef);\n const headerRef = useMergeRefs(headerRefAction, headerRefContent);\n const contentRef = useMergeRefs(contentRefAction, contentRefContent);\n\n const isRefresh = useVisualRefresh();\n const size = isRefresh\n ? 'normal'\n : headerReplacementType !== 'remove' && header && contentReplacementType !== 'remove' && children\n ? 'big'\n : 'normal';\n\n const hasAction = Boolean(action || buttonText || discoveredActions.length);\n\n const analyticsAttributes = {\n [DATA_ATTR_ANALYTICS_ALERT]: type,\n };\n\n const statusIconAriaLabel = i18n(\n `i18nStrings.${type}IconAriaLabel`,\n i18nStrings?.[`${type}IconAriaLabel`] ?? deprecatedStatusIconAriaLabel\n );\n\n const dismissAriaLabel = i18n(\n 'i18nStrings.dismissAriaLabel',\n i18nStrings?.dismissAriaLabel ?? i18n('dismissAriaLabel', deprecatedDismissAriaLabel)\n );\n\n return (\n <div\n {...baseProps}\n {...analyticsAttributes}\n aria-hidden={!visible}\n className={clsx(\n styles.root,\n { [styles.hidden]: !visible, [styles['initial-hidden']]: initialHidden },\n baseProps.className\n )}\n ref={containerRef}\n >\n <LinkDefaultVariantContext.Provider value={{ defaultVariant: 'primary' }}>\n <VisualContext contextName=\"alert\">\n <div\n className={clsx(\n styles.alert,\n styles[`type-${type}`],\n styles[`icon-size-${size}`],\n hasAction && styles['with-action'],\n dismissible && styles['with-dismiss']\n )}\n style={getAlertStyles(style)}\n >\n <div className={styles['alert-wrapper']}>\n <div className={styles['alert-focus-wrapper']} tabIndex={-1} ref={focusRef} role=\"group\">\n <div className={clsx(styles.icon, styles.text)}>\n <InternalIcon name={typeToIcon[type]} size={size} ariaLabel={statusIconAriaLabel} />\n </div>\n <div className={clsx(styles.message, styles.text)} id={messageSlotId}>\n <div\n className={clsx(\n header && styles.header,\n headerReplacementType !== 'original' ? styles.hidden : analyticsSelectors.header\n )}\n ref={headerRef}\n >\n {header}\n </div>\n <div\n className={clsx(\n styles['header-replacement'],\n headerReplacementType !== 'replaced' ? styles.hidden : analyticsSelectors.header\n )}\n ref={replacementHeaderRef}\n ></div>\n <div\n className={clsx(styles.content, contentReplacementType !== 'original' && styles.hidden)}\n ref={contentRef}\n >\n {children}\n </div>\n <div\n className={clsx(\n styles['content-replacement'],\n contentReplacementType !== 'replaced' && styles.hidden\n )}\n ref={replacementContentRef}\n ></div>\n </div>\n </div>\n <ActionsWrapper\n className={styles.action}\n testUtilClasses={{\n actionSlot: styles['action-slot'],\n actionButton: styles['action-button'],\n }}\n action={action}\n discoveredActions={discoveredActions}\n buttonText={buttonText}\n onButtonClick={() => fireNonCancelableEvent(onButtonClick)}\n containerWidth={containerWidth}\n wrappedClass={styles['action-wrapped']}\n />\n </div>\n {dismissible && (\n <div\n className={styles.dismiss}\n {...getAnalyticsMetadataAttribute({\n action: 'dismiss',\n } as Partial<GeneratedAnalyticsMetadataAlertDismiss>)}\n >\n <InternalButton\n className={styles['dismiss-button']}\n variant=\"icon\"\n iconName=\"close\"\n formAction=\"none\"\n ariaLabel={dismissAriaLabel}\n onClick={() => fireNonCancelableEvent(onDismiss)}\n style={getDismissButtonStyles(style)}\n />\n </div>\n )}\n </div>\n </VisualContext>\n </LinkDefaultVariantContext.Provider>\n </div>\n );\n }\n);\n\nexport default InternalAlert;\n"]}
1
+ {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/alert/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAC7E,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,YAAY,MAAM,kBAAkB,CAAC;A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,EACxB,eAAe,EAAE;gCACf,UAAU,EAAE,MAAM,CAAC,aAAa,CAAC;gCACjC,YAAY,EAAE,MAAM,CAAC,eAAe,CAAC;6BACtC,EACD,MAAM,EAAE,MAAM,EACd,iBAAiB,EAAE,iBAAiB,EACpC,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,GAAG,EAAE,CAAC,sBAAsB,CAAC,aAAa,CAAC,EAC1D,cAAc,EAAE,cAAc,EAC9B,YAAY,EAAE,MAAM,CAAC,gBAAgB,CAAC,GACtC,CACE;oBACL,WAAW,IAAI,CACd,2CACE,SAAS,EAAE,MAAM,CAAC,OAAO,IACrB,6BAA6B,CAAC;wBAChC,MAAM,EAAE,SAAS;qBACiC,CAAC;wBAErD,oBAAC,cAAc,IACb,SAAS,EAAE,MAAM,CAAC,gBAAgB,CAAC,EACnC,OAAO,EAAC,MAAM,EACd,QAAQ,EAAC,OAAO,EAChB,UAAU,EAAC,MAAM,EACjB,SAAS,EAAE,gBAAgB,EAC3B,OAAO,EAAE,GAAG,EAAE,CAAC,sBAAsB,CAAC,SAAS,CAAC,EAChD,KAAK,EAAE,sBAAsB,CAAC,KAAK,CAAC,GACpC,CACE,CACP,CACG,CACQ,CACmB,CACjC,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,aAAa,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 clsx from 'clsx';\n\nimport { useMergeRefs } from '@cloudscape-design/component-toolkit/internal';\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { InternalButton } from '../button/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport { IconProps } from '../icon/interfaces';\nimport InternalIcon from '../icon/internal';\nimport { DATA_ATTR_ANALYTICS_ALERT } from '../internal/analytics/selectors';\nimport { getBaseProps } from '../internal/base-component';\nimport VisualContext from '../internal/components/visual-context';\nimport { LinkDefaultVariantContext } from '../internal/context/link-default-variant-context';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport useForwardFocus from '../internal/hooks/forward-focus';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { awsuiPluginsInternal } from '../internal/plugins/api';\nimport { createUseDiscoveredAction, createUseDiscoveredContent } from '../internal/plugins/helpers';\nimport { SomeRequired } from '../internal/types';\nimport useContainerWidth from '../internal/utils/use-container-width';\nimport { ActionsWrapper } from './actions-wrapper';\nimport { GeneratedAnalyticsMetadataAlertDismiss } from './analytics-metadata/interfaces';\nimport { AlertProps } from './interfaces';\nimport { getAlertStyles, getDismissButtonStyles } from './style';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\nimport styles from './styles.css.js';\n\nconst typeToIcon: Record<AlertProps.Type, IconProps['name']> = {\n error: 'status-negative',\n warning: 'status-warning',\n success: 'status-positive',\n info: 'status-info',\n};\n\ntype InternalAlertProps = SomeRequired<AlertProps, 'type'> &\n InternalBaseComponentProps & {\n messageSlotId?: string;\n style?: AlertProps['style'];\n };\n\nconst useDiscoveredAction = createUseDiscoveredAction(awsuiPluginsInternal.alert.onActionRegistered);\nconst useDiscoveredContent = createUseDiscoveredContent('alert', awsuiPluginsInternal.alertContent);\n\nconst InternalAlert = React.forwardRef(\n (\n {\n type,\n i18nStrings,\n visible = true,\n dismissible,\n children,\n header,\n buttonText,\n action,\n onDismiss,\n onButtonClick,\n __internalRootRef,\n statusIconAriaLabel: deprecatedStatusIconAriaLabel,\n dismissAriaLabel: deprecatedDismissAriaLabel,\n messageSlotId,\n style,\n ...rest\n }: InternalAlertProps,\n ref: React.Ref<AlertProps.Ref>\n ) => {\n const baseProps = getBaseProps(rest);\n const i18n = useInternalI18n('alert');\n\n const focusRef = useRef<HTMLDivElement>(null);\n useForwardFocus(ref, focusRef);\n\n const { discoveredActions, headerRef: headerRefAction, contentRef: contentRefAction } = useDiscoveredAction(type);\n const {\n initialHidden,\n headerReplacementType,\n contentReplacementType,\n headerRef: headerRefContent,\n contentRef: contentRefContent,\n replacementHeaderRef,\n replacementContentRef,\n } = useDiscoveredContent({ type, header, children });\n\n const [containerWidth, containerMeasureRef] = useContainerWidth();\n const containerRef = useMergeRefs(containerMeasureRef, __internalRootRef);\n const headerRef = useMergeRefs(headerRefAction, headerRefContent);\n const contentRef = useMergeRefs(contentRefAction, contentRefContent);\n\n const isRefresh = useVisualRefresh();\n const size = isRefresh\n ? 'normal'\n : headerReplacementType !== 'remove' && header && contentReplacementType !== 'remove' && children\n ? 'big'\n : 'normal';\n\n const hasAction = Boolean(action || buttonText || discoveredActions.length);\n\n const analyticsAttributes = {\n [DATA_ATTR_ANALYTICS_ALERT]: type,\n };\n\n const statusIconAriaLabel = i18n(\n `i18nStrings.${type}IconAriaLabel`,\n i18nStrings?.[`${type}IconAriaLabel`] ?? deprecatedStatusIconAriaLabel\n );\n\n const dismissAriaLabel = i18n(\n 'i18nStrings.dismissAriaLabel',\n i18nStrings?.dismissAriaLabel ?? i18n('dismissAriaLabel', deprecatedDismissAriaLabel)\n );\n\n return (\n <div\n {...baseProps}\n {...analyticsAttributes}\n aria-hidden={!visible}\n className={clsx(\n styles.root,\n { [styles.hidden]: !visible, [styles['initial-hidden']]: initialHidden },\n baseProps.className\n )}\n ref={containerRef}\n >\n <LinkDefaultVariantContext.Provider value={{ defaultVariant: 'primary' }}>\n <VisualContext contextName=\"alert\">\n <div\n className={clsx(\n styles.alert,\n styles[`type-${type}`],\n styles[`icon-size-${size}`],\n hasAction && styles['with-action'],\n dismissible && styles['with-dismiss']\n )}\n style={getAlertStyles(style)}\n >\n <div className={styles['alert-wrapper']}>\n <div className={styles['alert-focus-wrapper']} tabIndex={-1} ref={focusRef} role=\"group\">\n <div className={clsx(styles.icon, styles.text)}>\n <InternalIcon name={typeToIcon[type]} size={size} ariaLabel={statusIconAriaLabel} />\n </div>\n <div className={clsx(styles.message, styles.text)} id={messageSlotId}>\n <div\n className={clsx(\n header && styles.header,\n headerReplacementType !== 'original' ? styles.hidden : analyticsSelectors.header\n )}\n ref={headerRef}\n >\n {header}\n </div>\n <div\n className={clsx(\n styles['header-replacement'],\n headerReplacementType !== 'replaced' ? styles.hidden : analyticsSelectors.header\n )}\n ref={replacementHeaderRef}\n ></div>\n <div\n className={clsx(styles.content, contentReplacementType !== 'original' && styles.hidden)}\n ref={contentRef}\n >\n {children}\n </div>\n <div\n className={clsx(\n styles['content-replacement'],\n contentReplacementType !== 'replaced' && styles.hidden\n )}\n ref={replacementContentRef}\n ></div>\n </div>\n </div>\n <ActionsWrapper\n className={styles.action}\n testUtilClasses={{\n actionSlot: styles['action-slot'],\n actionButton: styles['action-button'],\n }}\n action={action}\n discoveredActions={discoveredActions}\n buttonText={buttonText}\n onButtonClick={() => fireNonCancelableEvent(onButtonClick)}\n containerWidth={containerWidth}\n wrappedClass={styles['action-wrapped']}\n />\n </div>\n {dismissible && (\n <div\n className={styles.dismiss}\n {...getAnalyticsMetadataAttribute({\n action: 'dismiss',\n } as Partial<GeneratedAnalyticsMetadataAlertDismiss>)}\n >\n <InternalButton\n className={styles['dismiss-button']}\n variant=\"icon\"\n iconName=\"close\"\n formAction=\"none\"\n ariaLabel={dismissAriaLabel}\n onClick={() => fireNonCancelableEvent(onDismiss)}\n style={getDismissButtonStyles(style)}\n />\n </div>\n )}\n </div>\n </VisualContext>\n </LinkDefaultVariantContext.Provider>\n </div>\n );\n }\n);\n\nexport default InternalAlert;\n"]}
package/alert/style.js CHANGED
@@ -8,9 +8,9 @@ export function getAlertStyles(style) {
8
8
  return undefined;
9
9
  }
10
10
  return Object.assign({ background: (_a = style.root) === null || _a === void 0 ? void 0 : _a.background, borderColor: (_b = style.root) === null || _b === void 0 ? void 0 : _b.borderColor, borderRadius: (_c = style.root) === null || _c === void 0 ? void 0 : _c.borderRadius, borderWidth: (_d = style.root) === null || _d === void 0 ? void 0 : _d.borderWidth, color: (_e = style.root) === null || _e === void 0 ? void 0 : _e.color }, (((_f = style.root) === null || _f === void 0 ? void 0 : _f.focusRing) && {
11
- [customCssProps.styleFocusRingBorderColor]: (_g = style.root.focusRing) === null || _g === void 0 ? void 0 : _g.borderColor,
12
- [customCssProps.styleFocusRingBorderRadius]: (_h = style.root.focusRing) === null || _h === void 0 ? void 0 : _h.borderRadius,
13
- [customCssProps.styleFocusRingBorderWidth]: (_j = style.root.focusRing) === null || _j === void 0 ? void 0 : _j.borderWidth,
11
+ [customCssProps.alertFocusRingBorderColor]: (_g = style.root.focusRing) === null || _g === void 0 ? void 0 : _g.borderColor,
12
+ [customCssProps.alertFocusRingBorderRadius]: (_h = style.root.focusRing) === null || _h === void 0 ? void 0 : _h.borderRadius,
13
+ [customCssProps.alertFocusRingBorderWidth]: (_j = style.root.focusRing) === null || _j === void 0 ? void 0 : _j.borderWidth,
14
14
  }));
15
15
  }
16
16
  export function getDismissButtonStyles(style) {
@@ -1 +1 @@
1
- {"version":3,"file":"style.js","sourceRoot":"","sources":["../../../src/alert/style.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,cAAc,MAAM,6CAA6C,CAAC;AAGzE,MAAM,UAAU,cAAc,CAAC,KAA0B;;IACvD,IAAI,MAAM,KAAK,MAAM,IAAI,CAAC,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,CAAA,EAAE;QACrC,OAAO,SAAS,CAAC;KAClB;IAED,uBACE,UAAU,EAAE,MAAA,KAAK,CAAC,IAAI,0CAAE,UAAU,EAClC,WAAW,EAAE,MAAA,KAAK,CAAC,IAAI,0CAAE,WAAW,EACpC,YAAY,EAAE,MAAA,KAAK,CAAC,IAAI,0CAAE,YAAY,EACtC,WAAW,EAAE,MAAA,KAAK,CAAC,IAAI,0CAAE,WAAW,EACpC,KAAK,EAAE,MAAA,KAAK,CAAC,IAAI,0CAAE,KAAK,IACrB,CAAC,CAAA,MAAA,KAAK,CAAC,IAAI,0CAAE,SAAS,KAAI;QAC3B,CAAC,cAAc,CAAC,yBAAyB,CAAC,EAAE,MAAA,KAAK,CAAC,IAAI,CAAC,SAAS,0CAAE,WAAW;QAC7E,CAAC,cAAc,CAAC,0BAA0B,CAAC,EAAE,MAAA,KAAK,CAAC,IAAI,CAAC,SAAS,0CAAE,YAAY;QAC/E,CAAC,cAAc,CAAC,yBAAyB,CAAC,EAAE,MAAA,KAAK,CAAC,IAAI,CAAC,SAAS,0CAAE,WAAW;KAC9E,CAAC,EACF;AACJ,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,KAA0B;;IAC/D,IAAI,MAAM,KAAK,MAAM,IAAI,CAAC,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,aAAa,CAAA,EAAE;QAC9C,OAAO,SAAS,CAAC;KAClB;IAED,OAAO;QACL,IAAI,EAAE;YACJ,KAAK,EAAE;gBACL,MAAM,EAAE,MAAA,MAAA,KAAK,CAAC,aAAa,0CAAE,KAAK,0CAAE,MAAM;gBAC1C,OAAO,EAAE,MAAA,MAAA,KAAK,CAAC,aAAa,0CAAE,KAAK,0CAAE,OAAO;gBAC5C,KAAK,EAAE,MAAA,MAAA,KAAK,CAAC,aAAa,0CAAE,KAAK,0CAAE,KAAK;aACzC;YACD,SAAS,EAAE;gBACT,WAAW,EAAE,MAAA,MAAA,KAAK,CAAC,aAAa,0CAAE,SAAS,0CAAE,WAAW;gBACxD,YAAY,EAAE,MAAA,MAAA,KAAK,CAAC,aAAa,0CAAE,SAAS,0CAAE,YAAY;gBAC1D,WAAW,EAAE,MAAA,MAAA,KAAK,CAAC,aAAa,0CAAE,SAAS,0CAAE,WAAW;aACzD;SACF;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { SYSTEM } from '../internal/environment';\nimport customCssProps from '../internal/generated/custom-css-properties';\nimport { AlertProps } from './interfaces';\n\nexport function getAlertStyles(style: AlertProps['style']) {\n if (SYSTEM !== 'core' || !style?.root) {\n return undefined;\n }\n\n return {\n background: style.root?.background,\n borderColor: style.root?.borderColor,\n borderRadius: style.root?.borderRadius,\n borderWidth: style.root?.borderWidth,\n color: style.root?.color,\n ...(style.root?.focusRing && {\n [customCssProps.styleFocusRingBorderColor]: style.root.focusRing?.borderColor,\n [customCssProps.styleFocusRingBorderRadius]: style.root.focusRing?.borderRadius,\n [customCssProps.styleFocusRingBorderWidth]: style.root.focusRing?.borderWidth,\n }),\n };\n}\n\nexport function getDismissButtonStyles(style: AlertProps['style']) {\n if (SYSTEM !== 'core' || !style?.dismissButton) {\n return undefined;\n }\n\n return {\n root: {\n color: {\n active: style.dismissButton?.color?.active,\n default: style.dismissButton?.color?.default,\n hover: style.dismissButton?.color?.hover,\n },\n focusRing: {\n borderColor: style.dismissButton?.focusRing?.borderColor,\n borderRadius: style.dismissButton?.focusRing?.borderRadius,\n borderWidth: style.dismissButton?.focusRing?.borderWidth,\n },\n },\n };\n}\n"]}
1
+ {"version":3,"file":"style.js","sourceRoot":"","sources":["../../../src/alert/style.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,cAAc,MAAM,6CAA6C,CAAC;AAGzE,MAAM,UAAU,cAAc,CAAC,KAA0B;;IACvD,IAAI,MAAM,KAAK,MAAM,IAAI,CAAC,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,CAAA,EAAE;QACrC,OAAO,SAAS,CAAC;KAClB;IAED,uBACE,UAAU,EAAE,MAAA,KAAK,CAAC,IAAI,0CAAE,UAAU,EAClC,WAAW,EAAE,MAAA,KAAK,CAAC,IAAI,0CAAE,WAAW,EACpC,YAAY,EAAE,MAAA,KAAK,CAAC,IAAI,0CAAE,YAAY,EACtC,WAAW,EAAE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. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { SYSTEM } from '../internal/environment';\nimport customCssProps from '../internal/generated/custom-css-properties';\nimport { AlertProps } from './interfaces';\n\nexport function getAlertStyles(style: AlertProps['style']) {\n if (SYSTEM !== 'core' || !style?.root) {\n return undefined;\n }\n\n return {\n background: style.root?.background,\n borderColor: style.root?.borderColor,\n borderRadius: style.root?.borderRadius,\n borderWidth: style.root?.borderWidth,\n color: style.root?.color,\n ...(style.root?.focusRing && {\n [customCssProps.alertFocusRingBorderColor]: style.root.focusRing?.borderColor,\n [customCssProps.alertFocusRingBorderRadius]: style.root.focusRing?.borderRadius,\n [customCssProps.alertFocusRingBorderWidth]: style.root.focusRing?.borderWidth,\n }),\n };\n}\n\nexport function getDismissButtonStyles(style: AlertProps['style']) {\n if (SYSTEM !== 'core' || !style?.dismissButton) {\n return undefined;\n }\n\n return {\n root: {\n color: {\n active: style.dismissButton?.color?.active,\n default: style.dismissButton?.color?.default,\n hover: style.dismissButton?.color?.hover,\n },\n focusRing: {\n borderColor: style.dismissButton?.focusRing?.borderColor,\n borderRadius: style.dismissButton?.focusRing?.borderRadius,\n borderWidth: style.dismissButton?.focusRing?.borderWidth,\n },\n },\n };\n}\n"]}
@@ -1,32 +1,32 @@
1
1
 
2
2
  import './styles.scoped.css';
3
3
  export default {
4
- "alert": "awsui_alert_mx3cw_1iibl_193",
5
- "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_mx3cw_1iibl_1",
6
- "root": "awsui_root_mx3cw_1iibl_215",
7
- "hidden": "awsui_hidden_mx3cw_1iibl_250",
8
- "alert-wrapper": "awsui_alert-wrapper_mx3cw_1iibl_299",
9
- "initial-hidden": "awsui_initial-hidden_mx3cw_1iibl_311",
10
- "header": "awsui_header_mx3cw_1iibl_316",
11
- "header-replacement": "awsui_header-replacement_mx3cw_1iibl_317",
12
- "action": "awsui_action_mx3cw_1iibl_321",
13
- "action-slot": "awsui_action-slot_mx3cw_1iibl_325",
14
- "action-button": "awsui_action-button_mx3cw_1iibl_326",
15
- "alert-focus-wrapper": "awsui_alert-focus-wrapper_mx3cw_1iibl_330",
16
- "text": "awsui_text_mx3cw_1iibl_361",
17
- "icon": "awsui_icon_mx3cw_1iibl_368",
18
- "message": "awsui_message_mx3cw_1iibl_371",
19
- "action-wrapped": "awsui_action-wrapped_mx3cw_1iibl_375",
20
- "icon-size-medium": "awsui_icon-size-medium_mx3cw_1iibl_379",
21
- "icon-size-big": "awsui_icon-size-big_mx3cw_1iibl_383",
22
- "icon-size-normal": "awsui_icon-size-normal_mx3cw_1iibl_387",
23
- "content": "awsui_content_mx3cw_1iibl_391",
24
- "content-replacement": "awsui_content-replacement_mx3cw_1iibl_392",
25
- "dismiss": "awsui_dismiss_mx3cw_1iibl_396",
26
- "dismiss-button": "awsui_dismiss-button_mx3cw_1iibl_401",
27
- "type-error": "awsui_type-error_mx3cw_1iibl_405",
28
- "type-warning": "awsui_type-warning_mx3cw_1iibl_413",
29
- "type-success": "awsui_type-success_mx3cw_1iibl_421",
30
- "type-info": "awsui_type-info_mx3cw_1iibl_429"
4
+ "alert": "awsui_alert_mx3cw_10rwy_193",
5
+ "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_mx3cw_10rwy_1",
6
+ "root": "awsui_root_mx3cw_10rwy_215",
7
+ "hidden": "awsui_hidden_mx3cw_10rwy_250",
8
+ "alert-wrapper": "awsui_alert-wrapper_mx3cw_10rwy_299",
9
+ "initial-hidden": "awsui_initial-hidden_mx3cw_10rwy_311",
10
+ "header": "awsui_header_mx3cw_10rwy_316",
11
+ "header-replacement": "awsui_header-replacement_mx3cw_10rwy_317",
12
+ "action": "awsui_action_mx3cw_10rwy_321",
13
+ "action-slot": "awsui_action-slot_mx3cw_10rwy_325",
14
+ "action-button": "awsui_action-button_mx3cw_10rwy_326",
15
+ "alert-focus-wrapper": "awsui_alert-focus-wrapper_mx3cw_10rwy_330",
16
+ "text": "awsui_text_mx3cw_10rwy_361",
17
+ "icon": "awsui_icon_mx3cw_10rwy_368",
18
+ "message": "awsui_message_mx3cw_10rwy_371",
19
+ "action-wrapped": "awsui_action-wrapped_mx3cw_10rwy_375",
20
+ "icon-size-medium": "awsui_icon-size-medium_mx3cw_10rwy_379",
21
+ "icon-size-big": "awsui_icon-size-big_mx3cw_10rwy_383",
22
+ "icon-size-normal": "awsui_icon-size-normal_mx3cw_10rwy_387",
23
+ "content": "awsui_content_mx3cw_10rwy_391",
24
+ "content-replacement": "awsui_content-replacement_mx3cw_10rwy_392",
25
+ "dismiss": "awsui_dismiss_mx3cw_10rwy_396",
26
+ "dismiss-button": "awsui_dismiss-button_mx3cw_10rwy_401",
27
+ "type-error": "awsui_type-error_mx3cw_10rwy_405",
28
+ "type-warning": "awsui_type-warning_mx3cw_10rwy_413",
29
+ "type-success": "awsui_type-success_mx3cw_10rwy_421",
30
+ "type-info": "awsui_type-info_mx3cw_10rwy_429"
31
31
  };
32
32
 
@@ -190,10 +190,10 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
190
190
  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
191
191
  SPDX-License-Identifier: Apache-2.0
192
192
  */
193
- .awsui_alert_mx3cw_1iibl_193:not(#\9) {
194
- animation: awsui_awsui-motion-fade-in_mx3cw_1iibl_1 var(--motion-duration-show-paced-otsjh8, 180ms) var(--motion-easing-show-paced-ym6eyn, ease-out);
193
+ .awsui_alert_mx3cw_10rwy_193:not(#\9) {
194
+ animation: awsui_awsui-motion-fade-in_mx3cw_10rwy_1 var(--motion-duration-show-paced-otsjh8, 180ms) var(--motion-easing-show-paced-ym6eyn, ease-out);
195
195
  }
196
- @keyframes awsui_awsui-motion-fade-in_mx3cw_1iibl_1 {
196
+ @keyframes awsui_awsui-motion-fade-in_mx3cw_10rwy_1 {
197
197
  from {
198
198
  opacity: 0.2;
199
199
  }
@@ -202,17 +202,17 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
202
202
  }
203
203
  }
204
204
  @media (prefers-reduced-motion: reduce) {
205
- .awsui_alert_mx3cw_1iibl_193:not(#\9) {
205
+ .awsui_alert_mx3cw_10rwy_193:not(#\9) {
206
206
  animation: none;
207
207
  transition: none;
208
208
  }
209
209
  }
210
- .awsui-motion-disabled .awsui_alert_mx3cw_1iibl_193:not(#\9), .awsui-mode-entering .awsui_alert_mx3cw_1iibl_193:not(#\9) {
210
+ .awsui-motion-disabled .awsui_alert_mx3cw_10rwy_193:not(#\9), .awsui-mode-entering .awsui_alert_mx3cw_10rwy_193:not(#\9) {
211
211
  animation: none;
212
212
  transition: none;
213
213
  }
214
214
 
215
- .awsui_root_mx3cw_1iibl_215:not(#\9) {
215
+ .awsui_root_mx3cw_10rwy_215:not(#\9) {
216
216
  border-collapse: separate;
217
217
  border-spacing: 0;
218
218
  box-sizing: border-box;
@@ -247,11 +247,11 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
247
247
  overflow: hidden;
248
248
  display: block;
249
249
  }
250
- .awsui_root_mx3cw_1iibl_215.awsui_hidden_mx3cw_1iibl_250:not(#\9) {
250
+ .awsui_root_mx3cw_10rwy_215.awsui_hidden_mx3cw_10rwy_250:not(#\9) {
251
251
  display: none;
252
252
  }
253
253
 
254
- .awsui_alert_mx3cw_1iibl_193:not(#\9) {
254
+ .awsui_alert_mx3cw_10rwy_193:not(#\9) {
255
255
  border-collapse: separate;
256
256
  border-spacing: 0;
257
257
  box-sizing: border-box;
@@ -293,10 +293,10 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
293
293
  padding-block: var(--space-alert-vertical-dlp5wr, 8px);
294
294
  padding-inline: var(--space-alert-horizontal-ul364s, 16px);
295
295
  background-color: var(--color-background-container-content-6u8rvp, #ffffff);
296
- --awsui-style-focus-ring-box-shadow-kcc2gu: 0 0 0 var(--awsui-style-focus-ring-border-width-kcc2gu, 2px) var(--awsui-style-focus-ring-border-color-kcc2gu, var(--color-border-item-focused-uk47pl, #006ce0));
296
+ --awsui-alert-focus-ring-box-shadow-mdigke: 0 0 0 var(--awsui-alert-focus-ring-border-width-mdigke, 2px) var(--awsui-alert-focus-ring-border-color-mdigke, var(--color-border-item-focused-uk47pl, #006ce0));
297
297
  }
298
298
 
299
- .awsui_alert-wrapper_mx3cw_1iibl_299:not(#\9) {
299
+ .awsui_alert-wrapper_mx3cw_10rwy_299:not(#\9) {
300
300
  flex: 1;
301
301
  display: flex;
302
302
  flex-direction: row;
@@ -304,46 +304,46 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
304
304
  column-gap: var(--space-alert-action-left-4s8zo5, 12px);
305
305
  }
306
306
 
307
- .awsui_hidden_mx3cw_1iibl_250:not(#\9) {
307
+ .awsui_hidden_mx3cw_10rwy_250:not(#\9) {
308
308
  display: none;
309
309
  }
310
310
 
311
- .awsui_initial-hidden_mx3cw_1iibl_311:not(#\9) {
311
+ .awsui_initial-hidden_mx3cw_10rwy_311:not(#\9) {
312
312
  overflow: hidden;
313
313
  block-size: 0;
314
314
  }
315
315
 
316
- .awsui_header_mx3cw_1iibl_316:not(#\9),
317
- .awsui_header-replacement_mx3cw_1iibl_317:not(#\9) {
316
+ .awsui_header_mx3cw_10rwy_316:not(#\9),
317
+ .awsui_header-replacement_mx3cw_10rwy_317:not(#\9) {
318
318
  font-weight: 700;
319
319
  }
320
320
 
321
- .awsui_action_mx3cw_1iibl_321:not(#\9) {
321
+ .awsui_action_mx3cw_10rwy_321:not(#\9) {
322
322
  white-space: nowrap;
323
323
  }
324
324
 
325
- .awsui_action-slot_mx3cw_1iibl_325:not(#\9),
326
- .awsui_action-button_mx3cw_1iibl_326:not(#\9) {
325
+ .awsui_action-slot_mx3cw_10rwy_325:not(#\9),
326
+ .awsui_action-button_mx3cw_10rwy_326:not(#\9) {
327
327
  /* used in test-utils */
328
328
  }
329
329
 
330
- .awsui_alert-focus-wrapper_mx3cw_1iibl_330:not(#\9) {
330
+ .awsui_alert-focus-wrapper_mx3cw_10rwy_330:not(#\9) {
331
331
  flex: 1;
332
332
  min-inline-size: 70%;
333
333
  display: grid;
334
334
  grid-template-columns: min-content auto;
335
335
  }
336
- .awsui_alert-focus-wrapper_mx3cw_1iibl_330:not(#\9):focus {
336
+ .awsui_alert-focus-wrapper_mx3cw_10rwy_330:not(#\9):focus {
337
337
  outline: none;
338
338
  }
339
- body[data-awsui-focus-visible=true] .awsui_alert-focus-wrapper_mx3cw_1iibl_330:not(#\9):focus {
339
+ body[data-awsui-focus-visible=true] .awsui_alert-focus-wrapper_mx3cw_10rwy_330:not(#\9):focus {
340
340
  position: relative;
341
341
  }
342
- body[data-awsui-focus-visible=true] .awsui_alert-focus-wrapper_mx3cw_1iibl_330:not(#\9):focus {
342
+ body[data-awsui-focus-visible=true] .awsui_alert-focus-wrapper_mx3cw_10rwy_330:not(#\9):focus {
343
343
  outline: 2px dotted transparent;
344
344
  outline-offset: calc(var(--space-button-focus-outline-gutter-jj138g, 4px) - 1px);
345
345
  }
346
- body[data-awsui-focus-visible=true] .awsui_alert-focus-wrapper_mx3cw_1iibl_330:not(#\9):focus::before {
346
+ body[data-awsui-focus-visible=true] .awsui_alert-focus-wrapper_mx3cw_10rwy_330:not(#\9):focus::before {
347
347
  content: " ";
348
348
  display: block;
349
349
  position: absolute;
@@ -351,85 +351,85 @@ body[data-awsui-focus-visible=true] .awsui_alert-focus-wrapper_mx3cw_1iibl_330:n
351
351
  inset-block-start: calc(-1 * var(--space-button-focus-outline-gutter-jj138g, 4px));
352
352
  inline-size: calc(100% + var(--space-button-focus-outline-gutter-jj138g, 4px) + var(--space-button-focus-outline-gutter-jj138g, 4px));
353
353
  block-size: calc(100% + var(--space-button-focus-outline-gutter-jj138g, 4px) + var(--space-button-focus-outline-gutter-jj138g, 4px));
354
- border-start-start-radius: var(--awsui-style-focus-ring-border-radius-kcc2gu, var(--border-radius-control-default-focus-ring-1uabki, 4px));
355
- border-start-end-radius: var(--awsui-style-focus-ring-border-radius-kcc2gu, var(--border-radius-control-default-focus-ring-1uabki, 4px));
356
- border-end-start-radius: var(--awsui-style-focus-ring-border-radius-kcc2gu, var(--border-radius-control-default-focus-ring-1uabki, 4px));
357
- border-end-end-radius: var(--awsui-style-focus-ring-border-radius-kcc2gu, var(--border-radius-control-default-focus-ring-1uabki, 4px));
358
- box-shadow: var(--awsui-style-focus-ring-box-shadow-kcc2gu);
354
+ border-start-start-radius: var(--awsui-alert-focus-ring-border-radius-mdigke, var(--border-radius-control-default-focus-ring-1uabki, 4px));
355
+ border-start-end-radius: var(--awsui-alert-focus-ring-border-radius-mdigke, var(--border-radius-control-default-focus-ring-1uabki, 4px));
356
+ border-end-start-radius: var(--awsui-alert-focus-ring-border-radius-mdigke, var(--border-radius-control-default-focus-ring-1uabki, 4px));
357
+ border-end-end-radius: var(--awsui-alert-focus-ring-border-radius-mdigke, var(--border-radius-control-default-focus-ring-1uabki, 4px));
358
+ box-shadow: var(--awsui-alert-focus-ring-box-shadow-mdigke);
359
359
  }
360
360
 
361
- .awsui_text_mx3cw_1iibl_361:not(#\9) {
361
+ .awsui_text_mx3cw_10rwy_361:not(#\9) {
362
362
  min-inline-size: 0;
363
363
  padding-block: var(--border-width-button-jm0qg7, 2px);
364
364
  padding-inline: 0;
365
365
  margin-block: var(--space-scaled-xxs-pfm1nx, 4px);
366
366
  margin-inline: var(--space-xxs-hwfkai, 4px);
367
367
  }
368
- .awsui_text_mx3cw_1iibl_361.awsui_icon_mx3cw_1iibl_368:not(#\9) {
368
+ .awsui_text_mx3cw_10rwy_361.awsui_icon_mx3cw_10rwy_368:not(#\9) {
369
369
  margin-inline-start: 0;
370
370
  }
371
- .awsui_text_mx3cw_1iibl_361.awsui_message_mx3cw_1iibl_371:not(#\9) {
371
+ .awsui_text_mx3cw_10rwy_361.awsui_message_mx3cw_10rwy_371:not(#\9) {
372
372
  margin-inline-end: var(--space-alert-message-right-mrjbnn, 4px);
373
373
  }
374
374
 
375
- .awsui_action-wrapped_mx3cw_1iibl_375:not(#\9) {
375
+ .awsui_action-wrapped_mx3cw_10rwy_375:not(#\9) {
376
376
  margin-block-end: var(--space-xxs-hwfkai, 4px);
377
377
  }
378
378
 
379
- .awsui_icon-size-medium_mx3cw_1iibl_379 > .awsui_alert-wrapper_mx3cw_1iibl_299 > .awsui_action-wrapped_mx3cw_1iibl_375:not(#\9) {
379
+ .awsui_icon-size-medium_mx3cw_10rwy_379 > .awsui_alert-wrapper_mx3cw_10rwy_299 > .awsui_action-wrapped_mx3cw_10rwy_375:not(#\9) {
380
380
  margin-inline-start: calc(var(--size-icon-medium-uv8xcz, 20px) + var(--space-xs-ymlm0b, 8px));
381
381
  }
382
382
 
383
- .awsui_icon-size-big_mx3cw_1iibl_383 > .awsui_alert-wrapper_mx3cw_1iibl_299 > .awsui_action-wrapped_mx3cw_1iibl_375:not(#\9) {
383
+ .awsui_icon-size-big_mx3cw_10rwy_383 > .awsui_alert-wrapper_mx3cw_10rwy_299 > .awsui_action-wrapped_mx3cw_10rwy_375:not(#\9) {
384
384
  margin-inline-start: calc(var(--size-icon-big-7pq9l3, 32px) + var(--space-xs-ymlm0b, 8px));
385
385
  }
386
386
 
387
- .awsui_icon-size-normal_mx3cw_1iibl_387 > .awsui_alert-wrapper_mx3cw_1iibl_299 > .awsui_action-wrapped_mx3cw_1iibl_375:not(#\9) {
387
+ .awsui_icon-size-normal_mx3cw_10rwy_387 > .awsui_alert-wrapper_mx3cw_10rwy_299 > .awsui_action-wrapped_mx3cw_10rwy_375:not(#\9) {
388
388
  margin-inline-start: calc(var(--size-icon-normal-levt08, 16px) + var(--space-xs-ymlm0b, 8px));
389
389
  }
390
390
 
391
- .awsui_content_mx3cw_1iibl_391:not(#\9),
392
- .awsui_content-replacement_mx3cw_1iibl_392:not(#\9) {
391
+ .awsui_content_mx3cw_10rwy_391:not(#\9),
392
+ .awsui_content-replacement_mx3cw_10rwy_392:not(#\9) {
393
393
  /* used in test-utils */
394
394
  }
395
395
 
396
- .awsui_dismiss_mx3cw_1iibl_396:not(#\9) {
396
+ .awsui_dismiss_mx3cw_10rwy_396:not(#\9) {
397
397
  margin-inline-end: calc(-1 * var(--space-xxs-hwfkai, 4px));
398
398
  margin-inline-start: var(--space-s-tvghoh, 12px);
399
399
  }
400
400
 
401
- .awsui_dismiss-button_mx3cw_1iibl_401:not(#\9) {
401
+ .awsui_dismiss-button_mx3cw_10rwy_401:not(#\9) {
402
402
  /* used in test-utils */
403
403
  }
404
404
 
405
- .awsui_type-error_mx3cw_1iibl_405:not(#\9) {
405
+ .awsui_type-error_mx3cw_10rwy_405:not(#\9) {
406
406
  border-color: var(--color-border-status-error-j8acpp, #db0000);
407
407
  background-color: var(--color-background-status-error-mu3lcw, #fff5f5);
408
408
  }
409
- .awsui_type-error_mx3cw_1iibl_405 > .awsui_alert-wrapper_mx3cw_1iibl_299 > .awsui_alert-focus-wrapper_mx3cw_1iibl_330 > .awsui_icon_mx3cw_1iibl_368:not(#\9) {
409
+ .awsui_type-error_mx3cw_10rwy_405 > .awsui_alert-wrapper_mx3cw_10rwy_299 > .awsui_alert-focus-wrapper_mx3cw_10rwy_330 > .awsui_icon_mx3cw_10rwy_368:not(#\9) {
410
410
  color: var(--color-text-status-error-ksqavh, #db0000);
411
411
  }
412
412
 
413
- .awsui_type-warning_mx3cw_1iibl_413:not(#\9) {
413
+ .awsui_type-warning_mx3cw_10rwy_413:not(#\9) {
414
414
  border-color: var(--color-border-status-warning-j40pg7, #855900);
415
415
  background-color: var(--color-background-status-warning-cv83up, #fffef0);
416
416
  }
417
- .awsui_type-warning_mx3cw_1iibl_413 > .awsui_alert-wrapper_mx3cw_1iibl_299 > .awsui_alert-focus-wrapper_mx3cw_1iibl_330 > .awsui_icon_mx3cw_1iibl_368:not(#\9) {
417
+ .awsui_type-warning_mx3cw_10rwy_413 > .awsui_alert-wrapper_mx3cw_10rwy_299 > .awsui_alert-focus-wrapper_mx3cw_10rwy_330 > .awsui_icon_mx3cw_10rwy_368:not(#\9) {
418
418
  color: var(--color-text-status-warning-6meo06, #855900);
419
419
  }
420
420
 
421
- .awsui_type-success_mx3cw_1iibl_421:not(#\9) {
421
+ .awsui_type-success_mx3cw_10rwy_421:not(#\9) {
422
422
  border-color: var(--color-border-status-success-8z5f8u, #00802f);
423
423
  background-color: var(--color-background-status-success-h6b8bh, #effff1);
424
424
  }
425
- .awsui_type-success_mx3cw_1iibl_421 > .awsui_alert-wrapper_mx3cw_1iibl_299 > .awsui_alert-focus-wrapper_mx3cw_1iibl_330 > .awsui_icon_mx3cw_1iibl_368:not(#\9) {
425
+ .awsui_type-success_mx3cw_10rwy_421 > .awsui_alert-wrapper_mx3cw_10rwy_299 > .awsui_alert-focus-wrapper_mx3cw_10rwy_330 > .awsui_icon_mx3cw_10rwy_368:not(#\9) {
426
426
  color: var(--color-text-status-success-ybmii8, #00802f);
427
427
  }
428
428
 
429
- .awsui_type-info_mx3cw_1iibl_429:not(#\9) {
429
+ .awsui_type-info_mx3cw_10rwy_429:not(#\9) {
430
430
  border-color: var(--color-border-status-info-qf6jok, #006ce0);
431
431
  background-color: var(--color-background-status-info-sfobba, #f0fbff);
432
432
  }
433
- .awsui_type-info_mx3cw_1iibl_429 > .awsui_alert-wrapper_mx3cw_1iibl_299 > .awsui_alert-focus-wrapper_mx3cw_1iibl_330 > .awsui_icon_mx3cw_1iibl_368:not(#\9) {
433
+ .awsui_type-info_mx3cw_10rwy_429 > .awsui_alert-wrapper_mx3cw_10rwy_299 > .awsui_alert-focus-wrapper_mx3cw_10rwy_330 > .awsui_icon_mx3cw_10rwy_368:not(#\9) {
434
434
  color: var(--color-text-status-info-ue8bd2, #006ce0);
435
435
  }
@@ -2,32 +2,32 @@
2
2
  // es-module interop with Babel and Typescript
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  module.exports.default = {
5
- "alert": "awsui_alert_mx3cw_1iibl_193",
6
- "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_mx3cw_1iibl_1",
7
- "root": "awsui_root_mx3cw_1iibl_215",
8
- "hidden": "awsui_hidden_mx3cw_1iibl_250",
9
- "alert-wrapper": "awsui_alert-wrapper_mx3cw_1iibl_299",
10
- "initial-hidden": "awsui_initial-hidden_mx3cw_1iibl_311",
11
- "header": "awsui_header_mx3cw_1iibl_316",
12
- "header-replacement": "awsui_header-replacement_mx3cw_1iibl_317",
13
- "action": "awsui_action_mx3cw_1iibl_321",
14
- "action-slot": "awsui_action-slot_mx3cw_1iibl_325",
15
- "action-button": "awsui_action-button_mx3cw_1iibl_326",
16
- "alert-focus-wrapper": "awsui_alert-focus-wrapper_mx3cw_1iibl_330",
17
- "text": "awsui_text_mx3cw_1iibl_361",
18
- "icon": "awsui_icon_mx3cw_1iibl_368",
19
- "message": "awsui_message_mx3cw_1iibl_371",
20
- "action-wrapped": "awsui_action-wrapped_mx3cw_1iibl_375",
21
- "icon-size-medium": "awsui_icon-size-medium_mx3cw_1iibl_379",
22
- "icon-size-big": "awsui_icon-size-big_mx3cw_1iibl_383",
23
- "icon-size-normal": "awsui_icon-size-normal_mx3cw_1iibl_387",
24
- "content": "awsui_content_mx3cw_1iibl_391",
25
- "content-replacement": "awsui_content-replacement_mx3cw_1iibl_392",
26
- "dismiss": "awsui_dismiss_mx3cw_1iibl_396",
27
- "dismiss-button": "awsui_dismiss-button_mx3cw_1iibl_401",
28
- "type-error": "awsui_type-error_mx3cw_1iibl_405",
29
- "type-warning": "awsui_type-warning_mx3cw_1iibl_413",
30
- "type-success": "awsui_type-success_mx3cw_1iibl_421",
31
- "type-info": "awsui_type-info_mx3cw_1iibl_429"
5
+ "alert": "awsui_alert_mx3cw_10rwy_193",
6
+ "awsui-motion-fade-in": "awsui_awsui-motion-fade-in_mx3cw_10rwy_1",
7
+ "root": "awsui_root_mx3cw_10rwy_215",
8
+ "hidden": "awsui_hidden_mx3cw_10rwy_250",
9
+ "alert-wrapper": "awsui_alert-wrapper_mx3cw_10rwy_299",
10
+ "initial-hidden": "awsui_initial-hidden_mx3cw_10rwy_311",
11
+ "header": "awsui_header_mx3cw_10rwy_316",
12
+ "header-replacement": "awsui_header-replacement_mx3cw_10rwy_317",
13
+ "action": "awsui_action_mx3cw_10rwy_321",
14
+ "action-slot": "awsui_action-slot_mx3cw_10rwy_325",
15
+ "action-button": "awsui_action-button_mx3cw_10rwy_326",
16
+ "alert-focus-wrapper": "awsui_alert-focus-wrapper_mx3cw_10rwy_330",
17
+ "text": "awsui_text_mx3cw_10rwy_361",
18
+ "icon": "awsui_icon_mx3cw_10rwy_368",
19
+ "message": "awsui_message_mx3cw_10rwy_371",
20
+ "action-wrapped": "awsui_action-wrapped_mx3cw_10rwy_375",
21
+ "icon-size-medium": "awsui_icon-size-medium_mx3cw_10rwy_379",
22
+ "icon-size-big": "awsui_icon-size-big_mx3cw_10rwy_383",
23
+ "icon-size-normal": "awsui_icon-size-normal_mx3cw_10rwy_387",
24
+ "content": "awsui_content_mx3cw_10rwy_391",
25
+ "content-replacement": "awsui_content-replacement_mx3cw_10rwy_392",
26
+ "dismiss": "awsui_dismiss_mx3cw_10rwy_396",
27
+ "dismiss-button": "awsui_dismiss-button_mx3cw_10rwy_401",
28
+ "type-error": "awsui_type-error_mx3cw_10rwy_405",
29
+ "type-warning": "awsui_type-warning_mx3cw_10rwy_413",
30
+ "type-success": "awsui_type-success_mx3cw_10rwy_421",
31
+ "type-info": "awsui_type-info_mx3cw_10rwy_429"
32
32
  };
33
33
 
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/anchor-navigation/internal.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,0BAA0B,EAAE,MAAM,+CAA+C,CAAC;AAC3F,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAOrD,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAC,EAC/C,OAAO,EACP,cAAc,EACd,QAAQ,EACR,kBAAkB,EAClB,UAAe,EACf,iBAAwB,EACxB,eAAmB,EACnB,GAAG,KAAK,EACT,EAAE,qBAAqB,GAAG,0BAA0B,eAwCpD"}
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/anchor-navigation/internal.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,0BAA0B,EAAE,MAAM,+CAA+C,CAAC;AAC3F,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAOrD,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAC,EAC/C,OAAO,EACP,cAAc,EACd,QAAQ,EACR,kBAAkB,EAClB,UAAe,EACf,iBAAiB,EACjB,eAAmB,EACnB,GAAG,KAAK,EACT,EAAE,qBAAqB,GAAG,0BAA0B,eAwCpD"}
@@ -10,7 +10,7 @@ import { renderNestedAnchors } from './utils';
10
10
  import styles from './styles.css.js';
11
11
  import testUtilsStyles from './test-classes/styles.css.js';
12
12
  export default function InternalAnchorNavigation(_a) {
13
- var { anchors, ariaLabelledby, onFollow, onActiveHrefChange, activeHref = '', __internalRootRef = null, scrollSpyOffset = 0 } = _a, props = __rest(_a, ["anchors", "ariaLabelledby", "onFollow", "onActiveHrefChange", "activeHref", "__internalRootRef", "scrollSpyOffset"]);
13
+ var { anchors, ariaLabelledby, onFollow, onActiveHrefChange, activeHref = '', __internalRootRef, scrollSpyOffset = 0 } = _a, props = __rest(_a, ["anchors", "ariaLabelledby", "onFollow", "onActiveHrefChange", "activeHref", "__internalRootRef", "scrollSpyOffset"]);
14
14
  const baseProps = getBaseProps(props);
15
15
  const hrefs = useMemo(() => anchors.map(anchor => anchor.href), [anchors]);
16
16
  const onFollowHandler = useCallback((anchor, sourceEvent) => {