@cloudscape-design/components-themeable 3.0.1022 → 3.0.1024

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 (165) hide show
  1. package/lib/internal/manifest.json +1 -1
  2. package/lib/internal/scss/collection-preferences/content-display/content-display-option.scss +2 -14
  3. package/lib/internal/scss/flashbar/collapsible.scss +20 -8
  4. package/lib/internal/scss/internal/components/drag-handle/styles.scss +2 -6
  5. package/lib/internal/scss/internal/components/sortable-area/styles.scss +1 -0
  6. package/lib/internal/scss/internal/components/structured-item/styles.scss +46 -0
  7. package/lib/internal/scss/internal/components/structured-item/test-classes/styles.scss +11 -0
  8. package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +1 -1
  9. package/lib/internal/scss/list/styles.scss +39 -0
  10. package/lib/internal/scss/list/test-classes/styles.scss +9 -0
  11. package/lib/internal/template/collection-preferences/content-display/content-display-option.d.ts +0 -2
  12. package/lib/internal/template/collection-preferences/content-display/content-display-option.d.ts.map +1 -1
  13. package/lib/internal/template/collection-preferences/content-display/content-display-option.js +1 -4
  14. package/lib/internal/template/collection-preferences/content-display/content-display-option.js.map +1 -1
  15. package/lib/internal/template/collection-preferences/content-display/index.d.ts.map +1 -1
  16. package/lib/internal/template/collection-preferences/content-display/index.js +17 -24
  17. package/lib/internal/template/collection-preferences/content-display/index.js.map +1 -1
  18. package/lib/internal/template/collection-preferences/interfaces.d.ts +2 -7
  19. package/lib/internal/template/collection-preferences/interfaces.d.ts.map +1 -1
  20. package/lib/internal/template/collection-preferences/interfaces.js.map +1 -1
  21. package/lib/internal/template/collection-preferences/styles.css.js +36 -38
  22. package/lib/internal/template/collection-preferences/styles.scoped.css +39 -51
  23. package/lib/internal/template/collection-preferences/styles.selectors.js +36 -38
  24. package/lib/internal/template/flashbar/collapsible-flashbar.d.ts +0 -8
  25. package/lib/internal/template/flashbar/collapsible-flashbar.d.ts.map +1 -1
  26. package/lib/internal/template/flashbar/collapsible-flashbar.js +3 -50
  27. package/lib/internal/template/flashbar/collapsible-flashbar.js.map +1 -1
  28. package/lib/internal/template/flashbar/flash.d.ts.map +1 -1
  29. package/lib/internal/template/flashbar/flash.js +5 -27
  30. package/lib/internal/template/flashbar/flash.js.map +1 -1
  31. package/lib/internal/template/flashbar/interfaces.d.ts +51 -9
  32. package/lib/internal/template/flashbar/interfaces.d.ts.map +1 -1
  33. package/lib/internal/template/flashbar/interfaces.js.map +1 -1
  34. package/lib/internal/template/flashbar/style.d.ts +36 -0
  35. package/lib/internal/template/flashbar/style.d.ts.map +1 -0
  36. package/lib/internal/template/flashbar/style.js +105 -0
  37. package/lib/internal/template/flashbar/style.js.map +1 -0
  38. package/lib/internal/template/flashbar/styles.css.js +50 -50
  39. package/lib/internal/template/flashbar/styles.scoped.css +153 -152
  40. package/lib/internal/template/flashbar/styles.selectors.js +50 -50
  41. package/lib/internal/template/i18n/messages/all.all.js +1 -1
  42. package/lib/internal/template/i18n/messages/all.all.json +1 -1
  43. package/lib/internal/template/i18n/messages/all.ar.js +1 -1
  44. package/lib/internal/template/i18n/messages/all.ar.json +1 -1
  45. package/lib/internal/template/i18n/messages/all.de.js +1 -1
  46. package/lib/internal/template/i18n/messages/all.de.json +1 -1
  47. package/lib/internal/template/i18n/messages/all.en-GB.js +1 -1
  48. package/lib/internal/template/i18n/messages/all.en-GB.json +1 -1
  49. package/lib/internal/template/i18n/messages/all.en.js +1 -1
  50. package/lib/internal/template/i18n/messages/all.en.json +1 -1
  51. package/lib/internal/template/i18n/messages/all.es.js +1 -1
  52. package/lib/internal/template/i18n/messages/all.es.json +1 -1
  53. package/lib/internal/template/i18n/messages/all.fr.js +1 -1
  54. package/lib/internal/template/i18n/messages/all.fr.json +1 -1
  55. package/lib/internal/template/i18n/messages/all.id.js +1 -1
  56. package/lib/internal/template/i18n/messages/all.id.json +1 -1
  57. package/lib/internal/template/i18n/messages/all.it.js +1 -1
  58. package/lib/internal/template/i18n/messages/all.it.json +1 -1
  59. package/lib/internal/template/i18n/messages/all.ja.js +1 -1
  60. package/lib/internal/template/i18n/messages/all.ja.json +1 -1
  61. package/lib/internal/template/i18n/messages/all.ko.js +1 -1
  62. package/lib/internal/template/i18n/messages/all.ko.json +1 -1
  63. package/lib/internal/template/i18n/messages/all.pt-BR.js +1 -1
  64. package/lib/internal/template/i18n/messages/all.pt-BR.json +1 -1
  65. package/lib/internal/template/i18n/messages/all.th.js +1 -1
  66. package/lib/internal/template/i18n/messages/all.th.json +1 -1
  67. package/lib/internal/template/i18n/messages/all.tr.js +1 -1
  68. package/lib/internal/template/i18n/messages/all.tr.json +1 -1
  69. package/lib/internal/template/i18n/messages/all.zh-CN.js +1 -1
  70. package/lib/internal/template/i18n/messages/all.zh-CN.json +1 -1
  71. package/lib/internal/template/i18n/messages/all.zh-TW.js +1 -1
  72. package/lib/internal/template/i18n/messages/all.zh-TW.json +1 -1
  73. package/lib/internal/template/i18n/messages-types.d.ts +20 -0
  74. package/lib/internal/template/i18n/messages-types.d.ts.map +1 -1
  75. package/lib/internal/template/i18n/messages-types.js.map +1 -1
  76. package/lib/internal/template/index.d.ts +1 -0
  77. package/lib/internal/template/index.d.ts.map +1 -1
  78. package/lib/internal/template/index.js +1 -0
  79. package/lib/internal/template/index.js.map +1 -1
  80. package/lib/internal/template/internal/base-component/styles.scoped.css +1 -1
  81. package/lib/internal/template/internal/components/drag-handle/button.d.ts.map +1 -1
  82. package/lib/internal/template/internal/components/drag-handle/button.js +2 -2
  83. package/lib/internal/template/internal/components/drag-handle/button.js.map +1 -1
  84. package/lib/internal/template/internal/components/drag-handle/index.d.ts.map +1 -1
  85. package/lib/internal/template/internal/components/drag-handle/index.js +2 -2
  86. package/lib/internal/template/internal/components/drag-handle/index.js.map +1 -1
  87. package/lib/internal/template/internal/components/drag-handle/interfaces.d.ts +1 -0
  88. package/lib/internal/template/internal/components/drag-handle/interfaces.d.ts.map +1 -1
  89. package/lib/internal/template/internal/components/drag-handle/interfaces.js.map +1 -1
  90. package/lib/internal/template/internal/components/drag-handle/styles.css.js +13 -12
  91. package/lib/internal/template/internal/components/drag-handle/styles.scoped.css +18 -21
  92. package/lib/internal/template/internal/components/drag-handle/styles.selectors.js +13 -12
  93. package/lib/internal/template/internal/components/sortable-area/index.d.ts.map +1 -1
  94. package/lib/internal/template/internal/components/sortable-area/index.js +5 -1
  95. package/lib/internal/template/internal/components/sortable-area/index.js.map +1 -1
  96. package/lib/internal/template/internal/components/sortable-area/interfaces.d.ts +1 -0
  97. package/lib/internal/template/internal/components/sortable-area/interfaces.d.ts.map +1 -1
  98. package/lib/internal/template/internal/components/sortable-area/interfaces.js.map +1 -1
  99. package/lib/internal/template/internal/components/sortable-area/styles.css.js +8 -8
  100. package/lib/internal/template/internal/components/sortable-area/styles.scoped.css +18 -17
  101. package/lib/internal/template/internal/components/sortable-area/styles.selectors.js +8 -8
  102. package/lib/internal/template/internal/components/sortable-area/use-live-announcements.d.ts +5 -0
  103. package/lib/internal/template/internal/components/sortable-area/use-live-announcements.d.ts.map +1 -1
  104. package/lib/internal/template/internal/components/sortable-area/use-live-announcements.js +8 -0
  105. package/lib/internal/template/internal/components/sortable-area/use-live-announcements.js.map +1 -1
  106. package/lib/internal/template/internal/components/structured-item/index.d.ts +5 -0
  107. package/lib/internal/template/internal/components/structured-item/index.d.ts.map +1 -0
  108. package/lib/internal/template/internal/components/structured-item/index.js +16 -0
  109. package/lib/internal/template/internal/components/structured-item/index.js.map +1 -0
  110. package/lib/internal/template/internal/components/structured-item/interfaces.d.ts +9 -0
  111. package/lib/internal/template/internal/components/structured-item/interfaces.d.ts.map +1 -0
  112. package/lib/internal/template/internal/components/structured-item/interfaces.js +4 -0
  113. package/lib/internal/template/internal/components/structured-item/interfaces.js.map +1 -0
  114. package/lib/internal/template/internal/components/structured-item/styles.css.js +11 -0
  115. package/lib/internal/template/internal/components/structured-item/styles.scoped.css +212 -0
  116. package/lib/internal/template/internal/components/structured-item/styles.selectors.js +12 -0
  117. package/lib/internal/template/internal/components/structured-item/test-classes/styles.css.js +9 -0
  118. package/lib/internal/template/internal/components/structured-item/test-classes/styles.scoped.css +10 -0
  119. package/lib/internal/template/internal/components/structured-item/test-classes/styles.selectors.js +10 -0
  120. package/lib/internal/template/internal/environment.js +2 -2
  121. package/lib/internal/template/internal/environment.json +2 -2
  122. package/lib/internal/template/list/index.d.ts +5 -0
  123. package/lib/internal/template/list/index.d.ts.map +1 -0
  124. package/lib/internal/template/list/index.js +12 -0
  125. package/lib/internal/template/list/index.js.map +1 -0
  126. package/lib/internal/template/list/interfaces.d.ts +83 -0
  127. package/lib/internal/template/list/interfaces.d.ts.map +1 -0
  128. package/lib/internal/template/list/interfaces.js +4 -0
  129. package/lib/internal/template/list/interfaces.js.map +1 -0
  130. package/lib/internal/template/list/internal.d.ts +7 -0
  131. package/lib/internal/template/list/internal.d.ts.map +1 -0
  132. package/lib/internal/template/list/internal.js +62 -0
  133. package/lib/internal/template/list/internal.js.map +1 -0
  134. package/lib/internal/template/list/styles.css.js +10 -0
  135. package/lib/internal/template/list/styles.scoped.css +202 -0
  136. package/lib/internal/template/list/styles.selectors.js +11 -0
  137. package/lib/internal/template/list/test-classes/styles.css.js +7 -0
  138. package/lib/internal/template/list/test-classes/styles.scoped.css +8 -0
  139. package/lib/internal/template/list/test-classes/styles.selectors.js +8 -0
  140. package/lib/internal/template/package.json +1 -0
  141. package/lib/internal/template/test-utils/dom/collection-preferences/content-display-preference.d.ts +2 -0
  142. package/lib/internal/template/test-utils/dom/collection-preferences/content-display-preference.js +17 -6
  143. package/lib/internal/template/test-utils/dom/collection-preferences/content-display-preference.js.map +1 -1
  144. package/lib/internal/template/test-utils/dom/index.d.ts +20 -0
  145. package/lib/internal/template/test-utils/dom/index.js +13 -2
  146. package/lib/internal/template/test-utils/dom/index.js.map +1 -1
  147. package/lib/internal/template/test-utils/dom/internal/structured-item.d.ts +8 -0
  148. package/lib/internal/template/test-utils/dom/internal/structured-item.js +23 -0
  149. package/lib/internal/template/test-utils/dom/internal/structured-item.js.map +1 -0
  150. package/lib/internal/template/test-utils/dom/list/index.d.ts +23 -0
  151. package/lib/internal/template/test-utils/dom/list/index.js +41 -0
  152. package/lib/internal/template/test-utils/dom/list/index.js.map +1 -0
  153. package/lib/internal/template/test-utils/selectors/collection-preferences/content-display-preference.d.ts +2 -0
  154. package/lib/internal/template/test-utils/selectors/collection-preferences/content-display-preference.js +13 -6
  155. package/lib/internal/template/test-utils/selectors/collection-preferences/content-display-preference.js.map +1 -1
  156. package/lib/internal/template/test-utils/selectors/index.d.ts +18 -0
  157. package/lib/internal/template/test-utils/selectors/index.js +13 -2
  158. package/lib/internal/template/test-utils/selectors/index.js.map +1 -1
  159. package/lib/internal/template/test-utils/selectors/internal/structured-item.d.ts +8 -0
  160. package/lib/internal/template/test-utils/selectors/internal/structured-item.js +23 -0
  161. package/lib/internal/template/test-utils/selectors/internal/structured-item.js.map +1 -0
  162. package/lib/internal/template/test-utils/selectors/list/index.d.ts +23 -0
  163. package/lib/internal/template/test-utils/selectors/list/index.js +41 -0
  164. package/lib/internal/template/test-utils/selectors/list/index.js.map +1 -0
  165. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"collapsible-flashbar.js","sourceRoot":"","sources":["../../../src/flashbar/collapsible-flashbar.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAa,WAAW,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAClG,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAC5E,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEl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C,CAAC;AAEF,MAAM,qBAAqB,GAAG,CAAC,EAC7B,QAAQ,EACR,KAAK,EACL,KAAK,GAKN,EAAE,EAAE;IACH,OAAO,CACL,8BAAM,SAAS,EAAE,MAAM,CAAC,YAAY,CAAC;QACnC,8BAAM,KAAK,EAAE,KAAK;YAChB,oBAAC,YAAY,IAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,GAAI,CAC7C;QACP,8BAAM,SAAS,EAAE,MAAM,CAAC,cAAc,CAAC,IAAG,KAAK,CAAQ,CAClD,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAgD,EAAE,EAAE,CAC7F,UAAU,CAAC,CAAC,CAAC,oBAAC,eAAe,IAAC,SAAS,EAAE,IAAI,IAAG,QAAQ,CAAmB,CAAC,CAAC,CAAC,0CAAG,QAAQ,CAAI,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { ReactNode, useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';\nimport { TransitionGroup } from 'react-transition-group';\nimport clsx from 'clsx';\n\nimport { findUpUntil } from '@cloudscape-design/component-toolkit/dom';\nimport { useUniqueId } from '@cloudscape-design/component-toolkit/internal';\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { useInternalI18n } from '../i18n/context';\nimport { IconProps } from '../icon/interfaces';\nimport InternalIcon from '../icon/internal';\nimport { animate, getDOMRects } from '../internal/animate';\nimport { Transition } from '../internal/components/transition';\nimport { getVisualContextClassname } from '../internal/components/visual-context';\nimport customCssProps from '../internal/generated/custom-css-properties';\nimport { useEffectOnUpdate } from '../internal/hooks/use-effect-on-update';\nimport { scrollElementIntoView } from '../internal/utils/scrollable-containers';\nimport { throttle } from '../internal/utils/throttle';\nimport {\n GeneratedAnalyticsMetadataFlashbarCollapse,\n GeneratedAnalyticsMetadataFlashbarExpand,\n} from './analytics-metadata/interfaces';\nimport { getComponentsAnalyticsMetadata, getItemAnalyticsMetadata } from './analytics-metadata/utils';\nimport { useFlashbar } from './common';\nimport { Flash, focusFlashById } from './flash';\nimport { FlashbarProps } from './interfaces';\nimport { counterTypes, getFlashTypeCount, getItemColor, getVisibleCollapsedItems, StackableItem } from './utils';\n\nimport styles from './styles.css.js';\n\n// If the number of items is equal or less than this value,\n// the toggle element will not be displayed and the Flashbar will look like a regular single-item Flashbar.\nconst maxNonCollapsibleItems = 1;\n\nconst resizeListenerThrottleDelay = 100;\n\nexport default function CollapsibleFlashbar({ items, style, ...restProps }: FlashbarProps) {\n const [enteringItems, setEnteringItems] = useState<ReadonlyArray<FlashbarProps.MessageDefinition>>([]);\n const [exitingItems, setExitingItems] = useState<ReadonlyArray<FlashbarProps.MessageDefinition>>([]);\n const [isFlashbarStackExpanded, setIsFlashbarStackExpanded] = useState(false);\n\n const getElementsToAnimate = useCallback(() => {\n const flashElements = isFlashbarStackExpanded ? expandedItemRefs.current : collapsedItemRefs.current;\n return { ...flashElements, notificationBar: notificationBarRef.current };\n }, [isFlashbarStackExpanded]);\n\n const prepareAnimations = useCallback(() => {\n const rects = getDOMRects(getElementsToAnimate());\n setInitialAnimationState(rects);\n }, [getElementsToAnimate]);\n\n const { baseProps, isReducedMotion, isVisualRefresh, mergedRef, ref } = useFlashbar({\n items,\n ...restProps,\n onItemsAdded: newItems => {\n setEnteringItems([...enteringItems, ...newItems]);\n },\n onItemsChanged: options => {\n // If not all items have ID, we can still animate collapse/expand transitions\n // because we can rely on each item's index in the original array,\n // but we can't do that when elements are added or removed, since the index changes.\n if (options?.allItemsHaveId && !options?.isReducedMotion) {\n prepareAnimations();\n }\n },\n onItemsRemoved: removedItems => {\n setExitingItems([...exitingItems, ...removedItems]);\n },\n });\n\n const collapsedItemRefs = useRef<Record<string, HTMLElement | null>>({});\n const expandedItemRefs = useRef<Record<string, HTMLElement | null>>({});\n const [initialAnimationState, setInitialAnimationState] = useState<Record<string, DOMRect> | null>(null);\n const listElementRef = useRef<HTMLUListElement | null>(null);\n const notificationBarRef = useRef<HTMLDivElement | null>(null);\n const [transitioning, setTransitioning] = useState(false);\n const flashbarElementId = useUniqueId('flashbar');\n const itemCountElementId = useUniqueId('item-count');\n\n if (items.length <= maxNonCollapsibleItems && isFlashbarStackExpanded) {\n setIsFlashbarStackExpanded(false);\n }\n\n const animateFlash = !isReducedMotion;\n\n function toggleCollapseExpand() {\n if (!isReducedMotion) {\n prepareAnimations();\n }\n setIsFlashbarStackExpanded(prev => !prev);\n }\n\n useLayoutEffect(() => {\n if (isFlashbarStackExpanded && items?.length) {\n const mostRecentItem = items[0];\n if (mostRecentItem.id !== undefined) {\n focusFlashById(ref.current, mostRecentItem.id);\n }\n }\n // Run this after expanding, but not every time the items change.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isFlashbarStackExpanded]);\n\n // When collapsing, scroll up if necessary to avoid losing track of the focused button\n useEffectOnUpdate(() => {\n if (!isFlashbarStackExpanded && notificationBarRef.current) {\n scrollElementIntoView(notificationBarRef.current);\n }\n }, [isFlashbarStackExpanded]);\n\n const updateBottomSpacing = useMemo(\n () =>\n throttle(() => {\n // Allow vertical space between Flashbar and page bottom only when the Flashbar is reaching the end of the page,\n // otherwise avoid spacing with eventual sticky elements below.\n const listElement = listElementRef?.current;\n const flashbar = listElement?.parentElement;\n if (listElement && flashbar) {\n // Make sure the bottom padding is present when we make the calculations,\n // then we might decide to remove it or not.\n flashbar.classList.remove(styles.floating);\n const windowHeight = window.innerHeight;\n // Take the parent region into account if using the App Layout, because it might have additional margins.\n // Otherwise we use the Flashbar component for this calculation.\n const outerElement = findUpUntil(flashbar, element => element.getAttribute('role') === 'region') || flashbar;\n const applySpacing =\n isFlashbarStackExpanded && Math.ceil(outerElement.getBoundingClientRect().bottom) >= windowHeight;\n if (!applySpacing) {\n flashbar.classList.add(styles.floating);\n }\n }\n }, resizeListenerThrottleDelay),\n [isFlashbarStackExpanded]\n );\n\n useLayoutEffect(() => {\n window.addEventListener('resize', updateBottomSpacing);\n return () => {\n window.removeEventListener('resize', updateBottomSpacing);\n updateBottomSpacing.cancel();\n };\n }, [updateBottomSpacing]);\n\n const { i18nStrings } = restProps;\n\n const i18n = useInternalI18n('flashbar');\n const ariaLabel = i18n('i18nStrings.ariaLabel', i18nStrings?.ariaLabel);\n const notificationBarText = i18n('i18nStrings.notificationBarText', i18nStrings?.notificationBarText);\n const notificationBarAriaLabel = i18n('i18nStrings.notificationBarAriaLabel', i18nStrings?.notificationBarAriaLabel);\n const iconAriaLabels = {\n errorIconAriaLabel: i18n('i18nStrings.errorIconAriaLabel', i18nStrings?.errorIconAriaLabel),\n inProgressIconAriaLabel: i18n('i18nStrings.inProgressIconAriaLabel', i18nStrings?.inProgressIconAriaLabel),\n infoIconAriaLabel: i18n('i18nStrings.infoIconAriaLabel', i18nStrings?.infoIconAriaLabel),\n successIconAriaLabel: i18n('i18nStrings.successIconAriaLabel', i18nStrings?.successIconAriaLabel),\n warningIconAriaLabel: i18n('i18nStrings.warningIconAriaLabel', i18nStrings?.warningIconAriaLabel),\n };\n\n useLayoutEffect(() => {\n // When `useLayoutEffect` is called, the DOM is updated but has not been painted yet,\n // so it's a good moment to trigger animations that will make calculations based on old and new DOM state.\n // The old state is kept in `initialAnimationState`\n // and the new state can be retrieved from the current DOM elements.\n\n if (initialAnimationState) {\n updateBottomSpacing();\n\n animate({\n elements: getElementsToAnimate(),\n oldState: initialAnimationState,\n newElementInitialState: ({ top }) => ({ scale: 0.9, y: -0.2 * top }),\n onTransitionsEnd: () => setTransitioning(false),\n });\n\n setTransitioning(true);\n setInitialAnimationState(null);\n }\n }, [updateBottomSpacing, getElementsToAnimate, initialAnimationState, isFlashbarStackExpanded]);\n\n const isCollapsible = items.length > maxNonCollapsibleItems;\n\n const countByType = getFlashTypeCount(items);\n\n const numberOfColorsInStack = new Set(items.map(getItemColor)).size;\n const maxSlots = Math.max(numberOfColorsInStack, 3);\n const stackDepth = Math.min(maxSlots, items.length);\n\n const itemsToShow = isFlashbarStackExpanded\n ? items.map((item, index) => ({ ...item, expandedIndex: index }))\n : getVisibleCollapsedItems(items, stackDepth).map((item: StackableItem, index: number) => ({\n ...item,\n collapsedIndex: index,\n }));\n\n const getItemId = (item: StackableItem | FlashbarProps.MessageDefinition) =>\n item.id ?? (item as StackableItem).expandedIndex ?? 0;\n\n // This check allows us to use the standard \"enter\" Transition only when the notification was not existing before.\n // If instead it was moved to the top of the stack but was already present in the array\n // (e.g, after dismissing another notification),\n // we need to use different, more custom and more controlled animations.\n const hasEntered = (item: StackableItem | FlashbarProps.MessageDefinition) =>\n enteringItems.some(_item => _item.id && _item.id === item.id);\n const hasLeft = (item: StackableItem | FlashbarProps.MessageDefinition) => !('expandedIndex' in item);\n const hasEnteredOrLeft = (item: StackableItem | FlashbarProps.MessageDefinition) => hasEntered(item) || hasLeft(item);\n\n const showInnerContent = (item: StackableItem | FlashbarProps.MessageDefinition) =>\n isFlashbarStackExpanded || hasLeft(item) || ('expandedIndex' in item && item.expandedIndex === 0);\n\n const shouldUseStandardAnimation = (item: StackableItem, index: number) => index === 0 && hasEnteredOrLeft(item);\n\n const getAnimationElementId = (item: StackableItem) => `flash-${getItemId(item)}`;\n\n const getNotificationBarStyles = () => {\n return {\n borderRadius: style?.notificationBar?.root.borderRadius,\n borderWidth: style?.notificationBar?.root.borderWidth,\n ...(style?.notificationBar?.root?.background?.active && {\n [customCssProps.styleBackgroundActive]: style.notificationBar.root.background.active,\n }),\n ...(style?.notificationBar?.root?.background?.default && {\n [customCssProps.styleBackgroundDefault]: style.notificationBar.root.background.default,\n }),\n ...(style?.notificationBar?.root?.background?.hover && {\n [customCssProps.styleBackgroundHover]: style.notificationBar.root.background.hover,\n }),\n ...(style?.notificationBar?.root?.borderColor?.active && {\n [customCssProps.styleBorderColorActive]: style.notificationBar.root.borderColor.active,\n }),\n ...(style?.notificationBar?.root?.borderColor?.default && {\n [customCssProps.styleBorderColorDefault]: style.notificationBar.root.borderColor.default,\n }),\n ...(style?.notificationBar?.root?.borderColor?.hover && {\n [customCssProps.styleBorderColorHover]: style.notificationBar.root.borderColor.hover,\n }),\n ...(style?.notificationBar?.root?.color?.active && {\n [customCssProps.styleColorActive]: style.notificationBar.root.color.active,\n }),\n ...(style?.notificationBar?.root?.color?.default && {\n [customCssProps.styleColorDefault]: style.notificationBar.root.color.default,\n }),\n ...(style?.notificationBar?.root?.color?.hover && {\n [customCssProps.styleColorHover]: style.notificationBar.root.color.hover,\n }),\n };\n };\n\n const renderList = () => (\n <ul\n ref={listElementRef}\n className={clsx(\n styles['flash-list'],\n isFlashbarStackExpanded ? styles.expanded : styles.collapsed,\n transitioning && styles['animation-running'],\n initialAnimationState && styles['animation-ready'],\n isVisualRefresh && styles['visual-refresh']\n )}\n id={flashbarElementId}\n aria-label={ariaLabel}\n aria-describedby={isCollapsible ? itemCountElementId : undefined}\n style={\n !isFlashbarStackExpanded || transitioning\n ? {\n [customCssProps.flashbarStackDepth]: stackDepth,\n }\n : undefined\n }\n >\n <ListWrapper withMotion={!isReducedMotion}>\n {itemsToShow.map((item: StackableItem, index: number) => (\n <Transition\n key={getItemId(item)}\n in={!hasLeft(item)}\n onStatusChange={status => {\n if (status === 'entered') {\n setEnteringItems([]);\n } else if (status === 'exited') {\n setExitingItems([]);\n }\n }}\n >\n {(state: string, transitionRootElement: React.Ref<HTMLDivElement> | undefined) => (\n <li\n aria-hidden={!showInnerContent(item)}\n className={\n showInnerContent(item)\n ? clsx(\n styles['flash-list-item'],\n !isFlashbarStackExpanded && styles.item,\n !collapsedItemRefs.current[getAnimationElementId(item)] && styles['expanded-only']\n )\n : clsx(styles.flash, styles[`flash-type-${item.type ?? 'info'}`], styles.item)\n }\n ref={element => {\n if (isFlashbarStackExpanded) {\n expandedItemRefs.current[getAnimationElementId(item)] = element;\n } else {\n collapsedItemRefs.current[getAnimationElementId(item)] = element;\n }\n }}\n style={{\n ...(index > 0 && !isFlashbarStackExpanded && style && getItemStyles(style, item.type)),\n ...((!isFlashbarStackExpanded || transitioning) && {\n [customCssProps.flashbarStackIndex]:\n (item as StackableItem).collapsedIndex ?? (item as StackableItem).expandedIndex ?? index,\n }),\n }}\n key={getItemId(item)}\n {...getAnalyticsMetadataAttribute(getItemAnalyticsMetadata(index + 1, item.type || 'info', item.id))}\n >\n {showInnerContent(item) && (\n <Flash\n // eslint-disable-next-line react/forbid-component-props\n className={clsx(\n animateFlash && styles['flash-with-motion'],\n isVisualRefresh && styles['flash-refresh']\n )}\n key={getItemId(item)}\n ref={shouldUseStandardAnimation(item, index) ? transitionRootElement : undefined}\n transitionState={shouldUseStandardAnimation(item, index) ? state : undefined}\n i18nStrings={iconAriaLabels}\n style={style}\n {...item}\n />\n )}\n </li>\n )}\n </Transition>\n ))}\n </ListWrapper>\n </ul>\n );\n\n return (\n <div\n {...baseProps}\n className={clsx(\n baseProps.className,\n styles.flashbar,\n styles.stack,\n isCollapsible && styles.collapsible,\n items.length === 2 && styles['short-list'],\n isFlashbarStackExpanded && styles.expanded,\n isVisualRefresh && styles['visual-refresh']\n )}\n ref={mergedRef}\n {...getAnalyticsMetadataAttribute(getComponentsAnalyticsMetadata(items.length, true, isFlashbarStackExpanded))}\n >\n {isFlashbarStackExpanded && renderList()}\n {isCollapsible && (\n <div\n className={clsx(\n styles['notification-bar'],\n isVisualRefresh && styles['visual-refresh'],\n isFlashbarStackExpanded ? styles.expanded : styles.collapsed,\n transitioning && styles['animation-running'],\n items.length === 2 && styles['short-list'],\n getVisualContextClassname('flashbar') // Visual context is needed for focus ring to be white\n )}\n onClick={toggleCollapseExpand}\n ref={notificationBarRef}\n style={{ ...getNotificationBarStyles() }}\n {...getAnalyticsMetadataAttribute({\n action: !isFlashbarStackExpanded ? 'expand' : 'collapse',\n detail: {\n label: 'h2',\n },\n } as GeneratedAnalyticsMetadataFlashbarExpand | GeneratedAnalyticsMetadataFlashbarCollapse)}\n >\n <span aria-live=\"polite\" className={styles.status} role=\"status\" id={itemCountElementId}>\n {notificationBarText && <h2 className={styles.header}>{notificationBarText}</h2>}\n <span className={styles['item-count']}>\n {counterTypes.map(({ type, labelName, iconName }) => (\n <NotificationTypeCount\n key={type}\n iconName={iconName}\n label={iconAriaLabels[labelName]}\n count={countByType[type]}\n />\n ))}\n </span>\n </span>\n <button\n aria-controls={flashbarElementId}\n aria-describedby={itemCountElementId}\n aria-expanded={isFlashbarStackExpanded}\n aria-label={notificationBarAriaLabel}\n className={clsx(styles.button, isFlashbarStackExpanded && styles.expanded)}\n >\n <InternalIcon className={styles.icon} size=\"normal\" name=\"angle-down\" />\n </button>\n </div>\n )}\n {!isFlashbarStackExpanded && renderList()}\n </div>\n );\n}\n\nexport const getItemStyles = (style: FlashbarProps.Style, type: string = 'info') => {\n const background =\n style?.item?.root?.background &&\n (type === 'in-progress'\n ? style?.item?.root?.background.inProgress\n : style?.item?.root?.background[type as keyof typeof style.item.root.background]);\n\n const borderColor =\n style?.item?.root?.borderColor &&\n (type === 'in-progress'\n ? style?.item?.root?.borderColor.inProgress\n : style?.item?.root?.borderColor[type as keyof typeof style.item.root.borderColor]);\n\n const borderRadius = style?.item?.root?.borderRadius;\n\n const borderWidth = style?.item?.root?.borderWidth;\n\n const borderStyle = style?.item?.root?.borderWidth && 'solid';\n\n const color =\n style?.item?.root?.color &&\n (type === 'in-progress'\n ? style?.item?.root?.color.inProgress\n : style?.item?.root?.color[type as keyof typeof style.item.root.color]);\n\n return {\n background,\n borderColor,\n borderRadius,\n borderStyle,\n borderWidth,\n color,\n };\n};\n\nconst NotificationTypeCount = ({\n iconName,\n label,\n count,\n}: {\n iconName: IconProps.Name;\n label?: string;\n count: number;\n}) => {\n return (\n <span className={styles['type-count']}>\n <span title={label}>\n <InternalIcon name={iconName} ariaLabel={label} />\n </span>\n <span className={styles['count-number']}>{count}</span>\n </span>\n );\n};\n\nconst ListWrapper = ({ children, withMotion }: { children: ReactNode; withMotion: boolean }) =>\n withMotion ? <TransitionGroup component={null}>{children}</TransitionGroup> : <>{children}</>;\n"]}
1
+ {"version":3,"file":"collapsible-flashbar.js","sourceRoot":"","sources":["../../../src/flashbar/collapsible-flashbar.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAa,WAAW,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAClG,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAC5E,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,cAAc,MAAM,6CAA6C,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAKtD,OAAO,EAAE,8BAA8B,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtG,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEhD,OAAO,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAC9E,OAA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ACrB,uBAAuB,gBAC1B,wBAAwB,EACpC,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,uBAAuB,IAAI,MAAM,CAAC,QAAQ,CAAC;gBAE1E,oBAAC,YAAY,IAAC,SAAS,EAAE,MAAM,CAAC,IAAI,EAAE,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,YAAY,GAAG,CACjE,CACL,CACP;QACA,CAAC,uBAAuB,IAAI,UAAU,EAAE,CACrC,CACP,CAAC;AACJ,CAAC;AAED,MAAM,qBAAqB,GAAG,CAAC,EAC7B,QAAQ,EACR,KAAK,EACL,KAAK,GAKN,EAAE,EAAE;IACH,OAAO,CACL,8BAAM,SAAS,EAAE,MAAM,CAAC,YAAY,CAAC;QACnC,8BAAM,KAAK,EAAE,KAAK;YAChB,oBAAC,YAAY,IAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,GAAI,CAC7C;QACP,8BAAM,SAAS,EAAE,MAAM,CAAC,cAAc,CAAC,IAAG,KAAK,CAAQ,CAClD,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAgD,EAAE,EAAE,CAC7F,UAAU,CAAC,CAAC,CAAC,oBAAC,eAAe,IAAC,SAAS,EAAE,IAAI,IAAG,QAAQ,CAAmB,CAAC,CAAC,CAAC,0CAAG,QAAQ,CAAI,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { ReactNode, useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';\nimport { TransitionGroup } from 'react-transition-group';\nimport clsx from 'clsx';\n\nimport { findUpUntil } from '@cloudscape-design/component-toolkit/dom';\nimport { useUniqueId } from '@cloudscape-design/component-toolkit/internal';\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { useInternalI18n } from '../i18n/context';\nimport { IconProps } from '../icon/interfaces';\nimport InternalIcon from '../icon/internal';\nimport { animate, getDOMRects } from '../internal/animate';\nimport { Transition } from '../internal/components/transition';\nimport { getVisualContextClassname } from '../internal/components/visual-context';\nimport customCssProps from '../internal/generated/custom-css-properties';\nimport { useEffectOnUpdate } from '../internal/hooks/use-effect-on-update';\nimport { scrollElementIntoView } from '../internal/utils/scrollable-containers';\nimport { throttle } from '../internal/utils/throttle';\nimport {\n GeneratedAnalyticsMetadataFlashbarCollapse,\n GeneratedAnalyticsMetadataFlashbarExpand,\n} from './analytics-metadata/interfaces';\nimport { getComponentsAnalyticsMetadata, getItemAnalyticsMetadata } from './analytics-metadata/utils';\nimport { useFlashbar } from './common';\nimport { Flash, focusFlashById } from './flash';\nimport { FlashbarProps } from './interfaces';\nimport { getCollapsibleFlashStyles, getNotificationBarStyles } from './style';\nimport { counterTypes, getFlashTypeCount, getItemColor, getVisibleCollapsedItems, StackableItem } from './utils';\n\nimport styles from './styles.css.js';\n\n// If the number of items is equal or less than this value,\n// the toggle element will not be displayed and the Flashbar will look like a regular single-item Flashbar.\nconst maxNonCollapsibleItems = 1;\n\nconst resizeListenerThrottleDelay = 100;\n\nexport default function CollapsibleFlashbar({ items, style, ...restProps }: FlashbarProps) {\n const [enteringItems, setEnteringItems] = useState<ReadonlyArray<FlashbarProps.MessageDefinition>>([]);\n const [exitingItems, setExitingItems] = useState<ReadonlyArray<FlashbarProps.MessageDefinition>>([]);\n const [isFlashbarStackExpanded, setIsFlashbarStackExpanded] = useState(false);\n\n const getElementsToAnimate = useCallback(() => {\n const flashElements = isFlashbarStackExpanded ? expandedItemRefs.current : collapsedItemRefs.current;\n return { ...flashElements, notificationBar: notificationBarRef.current };\n }, [isFlashbarStackExpanded]);\n\n const prepareAnimations = useCallback(() => {\n const rects = getDOMRects(getElementsToAnimate());\n setInitialAnimationState(rects);\n }, [getElementsToAnimate]);\n\n const { baseProps, isReducedMotion, isVisualRefresh, mergedRef, ref } = useFlashbar({\n items,\n ...restProps,\n onItemsAdded: newItems => {\n setEnteringItems([...enteringItems, ...newItems]);\n },\n onItemsChanged: options => {\n // If not all items have ID, we can still animate collapse/expand transitions\n // because we can rely on each item's index in the original array,\n // but we can't do that when elements are added or removed, since the index changes.\n if (options?.allItemsHaveId && !options?.isReducedMotion) {\n prepareAnimations();\n }\n },\n onItemsRemoved: removedItems => {\n setExitingItems([...exitingItems, ...removedItems]);\n },\n });\n\n const collapsedItemRefs = useRef<Record<string, HTMLElement | null>>({});\n const expandedItemRefs = useRef<Record<string, HTMLElement | null>>({});\n const [initialAnimationState, setInitialAnimationState] = useState<Record<string, DOMRect> | null>(null);\n const listElementRef = useRef<HTMLUListElement | null>(null);\n const notificationBarRef = useRef<HTMLDivElement | null>(null);\n const [transitioning, setTransitioning] = useState(false);\n const flashbarElementId = useUniqueId('flashbar');\n const itemCountElementId = useUniqueId('item-count');\n\n if (items.length <= maxNonCollapsibleItems && isFlashbarStackExpanded) {\n setIsFlashbarStackExpanded(false);\n }\n\n const animateFlash = !isReducedMotion;\n\n function toggleCollapseExpand() {\n if (!isReducedMotion) {\n prepareAnimations();\n }\n setIsFlashbarStackExpanded(prev => !prev);\n }\n\n useLayoutEffect(() => {\n if (isFlashbarStackExpanded && items?.length) {\n const mostRecentItem = items[0];\n if (mostRecentItem.id !== undefined) {\n focusFlashById(ref.current, mostRecentItem.id);\n }\n }\n // Run this after expanding, but not every time the items change.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isFlashbarStackExpanded]);\n\n // When collapsing, scroll up if necessary to avoid losing track of the focused button\n useEffectOnUpdate(() => {\n if (!isFlashbarStackExpanded && notificationBarRef.current) {\n scrollElementIntoView(notificationBarRef.current);\n }\n }, [isFlashbarStackExpanded]);\n\n const updateBottomSpacing = useMemo(\n () =>\n throttle(() => {\n // Allow vertical space between Flashbar and page bottom only when the Flashbar is reaching the end of the page,\n // otherwise avoid spacing with eventual sticky elements below.\n const listElement = listElementRef?.current;\n const flashbar = listElement?.parentElement;\n if (listElement && flashbar) {\n // Make sure the bottom padding is present when we make the calculations,\n // then we might decide to remove it or not.\n flashbar.classList.remove(styles.floating);\n const windowHeight = window.innerHeight;\n // Take the parent region into account if using the App Layout, because it might have additional margins.\n // Otherwise we use the Flashbar component for this calculation.\n const outerElement = findUpUntil(flashbar, element => element.getAttribute('role') === 'region') || flashbar;\n const applySpacing =\n isFlashbarStackExpanded && Math.ceil(outerElement.getBoundingClientRect().bottom) >= windowHeight;\n if (!applySpacing) {\n flashbar.classList.add(styles.floating);\n }\n }\n }, resizeListenerThrottleDelay),\n [isFlashbarStackExpanded]\n );\n\n useLayoutEffect(() => {\n window.addEventListener('resize', updateBottomSpacing);\n return () => {\n window.removeEventListener('resize', updateBottomSpacing);\n updateBottomSpacing.cancel();\n };\n }, [updateBottomSpacing]);\n\n const { i18nStrings } = restProps;\n\n const i18n = useInternalI18n('flashbar');\n const ariaLabel = i18n('i18nStrings.ariaLabel', i18nStrings?.ariaLabel);\n const notificationBarText = i18n('i18nStrings.notificationBarText', i18nStrings?.notificationBarText);\n const notificationBarAriaLabel = i18n('i18nStrings.notificationBarAriaLabel', i18nStrings?.notificationBarAriaLabel);\n const iconAriaLabels = {\n errorIconAriaLabel: i18n('i18nStrings.errorIconAriaLabel', i18nStrings?.errorIconAriaLabel),\n inProgressIconAriaLabel: i18n('i18nStrings.inProgressIconAriaLabel', i18nStrings?.inProgressIconAriaLabel),\n infoIconAriaLabel: i18n('i18nStrings.infoIconAriaLabel', i18nStrings?.infoIconAriaLabel),\n successIconAriaLabel: i18n('i18nStrings.successIconAriaLabel', i18nStrings?.successIconAriaLabel),\n warningIconAriaLabel: i18n('i18nStrings.warningIconAriaLabel', i18nStrings?.warningIconAriaLabel),\n };\n\n useLayoutEffect(() => {\n // When `useLayoutEffect` is called, the DOM is updated but has not been painted yet,\n // so it's a good moment to trigger animations that will make calculations based on old and new DOM state.\n // The old state is kept in `initialAnimationState`\n // and the new state can be retrieved from the current DOM elements.\n\n if (initialAnimationState) {\n updateBottomSpacing();\n\n animate({\n elements: getElementsToAnimate(),\n oldState: initialAnimationState,\n newElementInitialState: ({ top }) => ({ scale: 0.9, y: -0.2 * top }),\n onTransitionsEnd: () => setTransitioning(false),\n });\n\n setTransitioning(true);\n setInitialAnimationState(null);\n }\n }, [updateBottomSpacing, getElementsToAnimate, initialAnimationState, isFlashbarStackExpanded]);\n\n const isCollapsible = items.length > maxNonCollapsibleItems;\n\n const countByType = getFlashTypeCount(items);\n\n const numberOfColorsInStack = new Set(items.map(getItemColor)).size;\n const maxSlots = Math.max(numberOfColorsInStack, 3);\n const stackDepth = Math.min(maxSlots, items.length);\n\n const itemsToShow = isFlashbarStackExpanded\n ? items.map((item, index) => ({ ...item, expandedIndex: index }))\n : getVisibleCollapsedItems(items, stackDepth).map((item: StackableItem, index: number) => ({\n ...item,\n collapsedIndex: index,\n }));\n\n const getItemId = (item: StackableItem | FlashbarProps.MessageDefinition) =>\n item.id ?? (item as StackableItem).expandedIndex ?? 0;\n\n // This check allows us to use the standard \"enter\" Transition only when the notification was not existing before.\n // If instead it was moved to the top of the stack but was already present in the array\n // (e.g, after dismissing another notification),\n // we need to use different, more custom and more controlled animations.\n const hasEntered = (item: StackableItem | FlashbarProps.MessageDefinition) =>\n enteringItems.some(_item => _item.id && _item.id === item.id);\n const hasLeft = (item: StackableItem | FlashbarProps.MessageDefinition) => !('expandedIndex' in item);\n const hasEnteredOrLeft = (item: StackableItem | FlashbarProps.MessageDefinition) => hasEntered(item) || hasLeft(item);\n\n const showInnerContent = (item: StackableItem | FlashbarProps.MessageDefinition) =>\n isFlashbarStackExpanded || hasLeft(item) || ('expandedIndex' in item && item.expandedIndex === 0);\n\n const shouldUseStandardAnimation = (item: StackableItem, index: number) => index === 0 && hasEnteredOrLeft(item);\n\n const getAnimationElementId = (item: StackableItem) => `flash-${getItemId(item)}`;\n\n const renderList = () => (\n <ul\n ref={listElementRef}\n className={clsx(\n styles['flash-list'],\n isFlashbarStackExpanded ? styles.expanded : styles.collapsed,\n transitioning && styles['animation-running'],\n initialAnimationState && styles['animation-ready'],\n isVisualRefresh && styles['visual-refresh']\n )}\n id={flashbarElementId}\n aria-label={ariaLabel}\n aria-describedby={isCollapsible ? itemCountElementId : undefined}\n style={\n !isFlashbarStackExpanded || transitioning\n ? {\n [customCssProps.flashbarStackDepth]: stackDepth,\n }\n : undefined\n }\n >\n <ListWrapper withMotion={!isReducedMotion}>\n {itemsToShow.map((item: StackableItem, index: number) => (\n <Transition\n key={getItemId(item)}\n in={!hasLeft(item)}\n onStatusChange={status => {\n if (status === 'entered') {\n setEnteringItems([]);\n } else if (status === 'exited') {\n setExitingItems([]);\n }\n }}\n >\n {(state: string, transitionRootElement: React.Ref<HTMLDivElement> | undefined) => (\n <li\n aria-hidden={!showInnerContent(item)}\n className={\n showInnerContent(item)\n ? clsx(\n styles['flash-list-item'],\n !isFlashbarStackExpanded && styles.item,\n !collapsedItemRefs.current[getAnimationElementId(item)] && styles['expanded-only']\n )\n : clsx(styles.flash, styles[`flash-type-${item.type ?? 'info'}`], styles.item)\n }\n ref={element => {\n if (isFlashbarStackExpanded) {\n expandedItemRefs.current[getAnimationElementId(item)] = element;\n } else {\n collapsedItemRefs.current[getAnimationElementId(item)] = element;\n }\n }}\n style={{\n ...(index > 0 && !isFlashbarStackExpanded && style && getCollapsibleFlashStyles(style, item.type)),\n ...((!isFlashbarStackExpanded || transitioning) && {\n [customCssProps.flashbarStackIndex]:\n (item as StackableItem).collapsedIndex ?? (item as StackableItem).expandedIndex ?? index,\n }),\n }}\n key={getItemId(item)}\n {...getAnalyticsMetadataAttribute(getItemAnalyticsMetadata(index + 1, item.type || 'info', item.id))}\n >\n {showInnerContent(item) && (\n <Flash\n // eslint-disable-next-line react/forbid-component-props\n className={clsx(\n animateFlash && styles['flash-with-motion'],\n isVisualRefresh && styles['flash-refresh']\n )}\n key={getItemId(item)}\n ref={shouldUseStandardAnimation(item, index) ? transitionRootElement : undefined}\n transitionState={shouldUseStandardAnimation(item, index) ? state : undefined}\n i18nStrings={iconAriaLabels}\n style={style}\n {...item}\n />\n )}\n </li>\n )}\n </Transition>\n ))}\n </ListWrapper>\n </ul>\n );\n\n return (\n <div\n {...baseProps}\n className={clsx(\n baseProps.className,\n styles.flashbar,\n styles.stack,\n isCollapsible && styles.collapsible,\n items.length === 2 && styles['short-list'],\n isFlashbarStackExpanded && styles.expanded,\n isVisualRefresh && styles['visual-refresh']\n )}\n ref={mergedRef}\n {...getAnalyticsMetadataAttribute(getComponentsAnalyticsMetadata(items.length, true, isFlashbarStackExpanded))}\n >\n {isFlashbarStackExpanded && renderList()}\n {isCollapsible && (\n <div\n className={clsx(\n styles['notification-bar'],\n isVisualRefresh && styles['visual-refresh'],\n isFlashbarStackExpanded ? styles.expanded : styles.collapsed,\n transitioning && styles['animation-running'],\n items.length === 2 && styles['short-list'],\n getVisualContextClassname('flashbar') // Visual context is needed for focus ring to be white\n )}\n onClick={toggleCollapseExpand}\n ref={notificationBarRef}\n style={{ ...(style && getNotificationBarStyles(style)) }}\n {...getAnalyticsMetadataAttribute({\n action: !isFlashbarStackExpanded ? 'expand' : 'collapse',\n detail: {\n label: 'h2',\n },\n } as GeneratedAnalyticsMetadataFlashbarExpand | GeneratedAnalyticsMetadataFlashbarCollapse)}\n >\n <span aria-live=\"polite\" className={styles.status} role=\"status\" id={itemCountElementId}>\n {notificationBarText && <h2 className={styles.header}>{notificationBarText}</h2>}\n <span className={styles['item-count']}>\n {counterTypes.map(({ type, labelName, iconName }) => (\n <NotificationTypeCount\n key={type}\n iconName={iconName}\n label={iconAriaLabels[labelName]}\n count={countByType[type]}\n />\n ))}\n </span>\n </span>\n <button\n aria-controls={flashbarElementId}\n aria-describedby={itemCountElementId}\n aria-expanded={isFlashbarStackExpanded}\n aria-label={notificationBarAriaLabel}\n className={clsx(styles.button, isFlashbarStackExpanded && styles.expanded)}\n >\n <InternalIcon className={styles.icon} size=\"normal\" name=\"angle-down\" />\n </button>\n </div>\n )}\n {!isFlashbarStackExpanded && renderList()}\n </div>\n );\n}\n\nconst NotificationTypeCount = ({\n iconName,\n label,\n count,\n}: {\n iconName: IconProps.Name;\n label?: string;\n count: number;\n}) => {\n return (\n <span className={styles['type-count']}>\n <span title={label}>\n <InternalIcon name={iconName} ariaLabel={label} />\n </span>\n <span className={styles['count-number']}>{count}</span>\n </span>\n );\n};\n\nconst ListWrapper = ({ children, withMotion }: { children: ReactNode; withMotion: boolean }) =>\n withMotion ? <TransitionGroup component={null}>{children}</TransitionGroup> : <>{children}</>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"flash.d.ts","sourceRoot":"","sources":["../../../src/flashbar/flash.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiB,MAAM,OAAO,CAAC;AA+BtC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAuD7C,eAAO,MAAM,cAAc,mEACf,WAAW,GAAG,IAAI,UAAU,MAAM,UAM7C,CAAC;AAEF,UAAU,UAAW,SAAQ,aAAa,CAAC,iBAAiB;IAC1D,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC;IACxC,KAAK,CAAC,EAAE,aAAa,CAAC,KAAK,CAAC;CAC7B;AAED,eAAO,MAAM,KAAK,mFAuLjB,CAAC"}
1
+ {"version":3,"file":"flash.d.ts","sourceRoot":"","sources":["../../../src/flashbar/flash.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiB,MAAM,OAAO,CAAC;AA6BtC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AA8C7C,eAAO,MAAM,cAAc,mEACf,WAAW,GAAG,IAAI,UAAU,MAAM,UAM7C,CAAC;AAEF,UAAU,UAAW,SAAQ,aAAa,CAAC,iBAAiB;IAC1D,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC;IACxC,KAAK,CAAC,EAAE,aAAa,CAAC,KAAK,CAAC;CAC7B;AAED,eAAO,MAAM,KAAK,mFA+KjB,CAAC"}
@@ -11,7 +11,6 @@ import InternalIcon from '../icon/internal';
11
11
  import { DATA_ATTR_ANALYTICS_FLASHBAR, DATA_ATTR_ANALYTICS_SUPPRESS_FLOW_EVENTS, } from '../internal/analytics/selectors';
12
12
  import { getVisualContextClassname } from '../internal/components/visual-context';
13
13
  import { PACKAGE_VERSION } from '../internal/environment';
14
- import customCssProps from '../internal/generated/custom-css-properties';
15
14
  import { isDevelopment } from '../internal/is-development';
16
15
  import { awsuiPluginsInternal } from '../internal/plugins/api';
17
16
  import { createUseDiscoveredAction, createUseDiscoveredContent } from '../internal/plugins/helpers';
@@ -19,7 +18,7 @@ import { throttle } from '../internal/utils/throttle';
19
18
  import useContainerWidth from '../internal/utils/use-container-width';
20
19
  import InternalLiveRegion from '../live-region/internal';
21
20
  import InternalSpinner from '../spinner/internal';
22
- import { getItemStyles } from './collapsible-flashbar';
21
+ import { getDismissButtonStyles, getFlashStyles } from './style';
23
22
  import { FOCUS_THROTTLE_DELAY } from './utils';
24
23
  import analyticsSelectors from './analytics-metadata/styles.css.js';
25
24
  import styles from './styles.css.js';
@@ -32,25 +31,11 @@ const ICON_TYPES = {
32
31
  };
33
32
  const useDiscoveredAction = createUseDiscoveredAction(awsuiPluginsInternal.flashbar.onActionRegistered);
34
33
  const useDiscoveredContent = createUseDiscoveredContent('flash', awsuiPluginsInternal.flashContent);
35
- function dismissButton(dismissLabel, onDismiss, style) {
36
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
34
+ function dismissButton(dismissLabel, onDismiss, style, type) {
37
35
  return (React.createElement("div", Object.assign({ className: styles['dismiss-button-wrapper'] }, getAnalyticsMetadataAttribute({
38
36
  action: 'dismiss',
39
37
  })),
40
- React.createElement(InternalButton, { onClick: onDismiss, className: styles['dismiss-button'], variant: "flashbar-icon", iconName: "close", formAction: "none", ariaLabel: dismissLabel, style: {
41
- root: {
42
- color: {
43
- active: (_c = (_b = (_a = style === null || style === void 0 ? void 0 : style.item) === null || _a === void 0 ? void 0 : _a.dismissButton) === null || _b === void 0 ? void 0 : _b.color) === null || _c === void 0 ? void 0 : _c.active,
44
- default: (_f = (_e = (_d = style === null || style === void 0 ? void 0 : style.item) === null || _d === void 0 ? void 0 : _d.dismissButton) === null || _e === void 0 ? void 0 : _e.color) === null || _f === void 0 ? void 0 : _f.default,
45
- hover: (_j = (_h = (_g = style === null || style === void 0 ? void 0 : style.item) === null || _g === void 0 ? void 0 : _g.dismissButton) === null || _h === void 0 ? void 0 : _h.color) === null || _j === void 0 ? void 0 : _j.hover,
46
- },
47
- focusRing: {
48
- borderColor: (_m = (_l = (_k = style === null || style === void 0 ? void 0 : style.item) === null || _k === void 0 ? void 0 : _k.dismissButton) === null || _l === void 0 ? void 0 : _l.focusRing) === null || _m === void 0 ? void 0 : _m.borderColor,
49
- borderRadius: (_q = (_p = (_o = style === null || style === void 0 ? void 0 : style.item) === null || _o === void 0 ? void 0 : _o.dismissButton) === null || _p === void 0 ? void 0 : _p.focusRing) === null || _q === void 0 ? void 0 : _q.borderRadius,
50
- borderWidth: (_t = (_s = (_r = style === null || style === void 0 ? void 0 : style.item) === null || _r === void 0 ? void 0 : _r.dismissButton) === null || _s === void 0 ? void 0 : _s.focusRing) === null || _t === void 0 ? void 0 : _t.borderWidth,
51
- },
52
- },
53
- } })));
38
+ React.createElement(InternalButton, { onClick: onDismiss, className: styles['dismiss-button'], variant: "flashbar-icon", iconName: "close", formAction: "none", ariaLabel: dismissLabel, style: Object.assign({}, (style && getDismissButtonStyles(style, type))) })));
54
39
  }
55
40
  export const focusFlashById = throttle((element, itemId) => {
56
41
  var _a;
@@ -58,7 +43,6 @@ export const focusFlashById = throttle((element, itemId) => {
58
43
  (_a = element === null || element === void 0 ? void 0 : element.querySelector(selector)) === null || _a === void 0 ? void 0 : _a.focus();
59
44
  }, FOCUS_THROTTLE_DELAY, { trailing: false });
60
45
  export const Flash = React.forwardRef((_a, ref) => {
61
- var _b, _c, _d, _e, _f, _g, _h, _j;
62
46
  var { id, header, content, dismissible, dismissLabel, loading, action, buttonText, onButtonClick, onDismiss, className, transitionState, ariaRole, i18nStrings, type = 'info', analyticsMetadata, style } = _a, props = __rest(_a, ["id", "header", "content", "dismissible", "dismissLabel", "loading", "action", "buttonText", "onButtonClick", "onDismiss", "className", "transitionState", "ariaRole", "i18nStrings", "type", "analyticsMetadata", "style"]);
63
47
  if (isDevelopment) {
64
48
  if (buttonText && !onButtonClick) {
@@ -101,13 +85,7 @@ export const Flash = React.forwardRef((_a, ref) => {
101
85
  [styles.exit]: transitionState === 'exit',
102
86
  [styles.exiting]: transitionState === 'exiting',
103
87
  [styles.exited]: transitionState === 'exited',
104
- }, getVisualContextClassname(type === 'warning' && !loading ? 'flashbar-warning' : 'flashbar'), initialHidden && styles['initial-hidden']), style: Object.assign(Object.assign(Object.assign({}, (style && getItemStyles(style, effectiveType))), (((_c = (_b = style === null || style === void 0 ? void 0 : style.item) === null || _b === void 0 ? void 0 : _b.root) === null || _c === void 0 ? void 0 : _c.focusRing) && {
105
- [customCssProps.styleFocusRingBorderColor]: (_d = style.item.root.focusRing) === null || _d === void 0 ? void 0 : _d.borderColor,
106
- [customCssProps.styleFocusRingBorderRadius]: (_e = style.item.root.focusRing) === null || _e === void 0 ? void 0 : _e.borderRadius,
107
- [customCssProps.styleFocusRingBorderWidth]: (_f = style.item.root.focusRing) === null || _f === void 0 ? void 0 : _f.borderWidth,
108
- })), (((_j = (_h = (_g = style === null || style === void 0 ? void 0 : style.item) === null || _g === void 0 ? void 0 : _g.root) === null || _h === void 0 ? void 0 : _h.focusRing) === null || _j === void 0 ? void 0 : _j.borderRadius) && {
109
- [customCssProps.styleFocusRingBorderRadius]: style.item.root.focusRing.borderRadius,
110
- })) }, analyticsAttributes),
88
+ }, getVisualContextClassname(type === 'warning' && !loading ? 'flashbar-warning' : 'flashbar'), initialHidden && styles['initial-hidden']), style: Object.assign({}, (style && getFlashStyles(style, effectiveType))) }, analyticsAttributes),
111
89
  React.createElement("div", { className: styles['flash-body'] },
112
90
  React.createElement("div", { className: styles['flash-focus-container'], tabIndex: -1, role: "group", "aria-labelledby": `${flashIconId} ${flashMessageId}` },
113
91
  React.createElement("div", { className: clsx(styles['flash-icon'], styles['flash-text']), id: flashIconId }, icon),
@@ -120,7 +98,7 @@ export const Flash = React.forwardRef((_a, ref) => {
120
98
  actionSlot: styles['action-slot'],
121
99
  actionButton: styles['action-button'],
122
100
  }, action: action, discoveredActions: discoveredActions, buttonText: buttonText, onButtonClick: onButtonClick, containerWidth: containerWidth, wrappedClass: styles['action-wrapped'] })),
123
- dismissible && dismissButton(dismissLabel, onDismiss, style),
101
+ dismissible && dismissButton(dismissLabel, onDismiss, style, effectiveType),
124
102
  ariaRole === 'status' && (React.createElement(InternalLiveRegion, { sources: [statusIconAriaLabel, headerRefObject, contentRefObject] }))));
125
103
  });
126
104
  //# sourceMappingURL=flash.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"flash.js","sourceRoot":"","sources":["../../../src/flashbar/flash.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,EACL,oBAAoB,EACpB,YAAY,EACZ,WAAW,EACX,QAAQ,GACT,MAAM,+CAA+C,CAAC;AACvD,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAGjH,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EACL,4BAA4B,EAC5B,wCAAwC,GACzC,MAAM,iCAAiC,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,MAAM,CAAC,eAAe,CAAC,EACvB,sBAAsB,KAAK,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,kBAAkB,CAAC,cAAc,CAAC,CAC3F,EACD,GAAG,EAAE,UAAU,IAEd,OAAO,CACJ;oBACN,6BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,qBAAqB,CAAC,EAAE,sBAAsB,KAAK,UAAU,IAAI,MAAM,CAAC,MAAM,CAAC,EACtG,GAAG,EAAE,qBAAqB,GACrB,CACH,CACF;YACN,oBAAC,cAAc,IACb,SAAS,EAAE,MAAM,CAAC,uBAAuB,CAAC,EAC1C,eAAe,EAAE;oBACf,UAAU,EAAE,MAAM,CAAC,aAAa,CAAC;oBACjC,YAAY,EAAE,MAAM,CAAC,eAAe,CAAC;iBACtC,EACD,MAAM,EAAE,MAAM,EACd,iBAAiB,EAAE,iBAAiB,EACpC,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,cAAc,EAC9B,YAAY,EAAE,MAAM,CAAC,gBAAgB,CAAC,GACtC,CACE;QACL,WAAW,IAAI,aAAa,CAAC,YAAY,EAAE,SAAS,EAAE,KAAK,CAAC;QAC5D,QAAQ,KAAK,QAAQ,IAAI,CACxB,oBAAC,kBAAkB,IAAC,OAAO,EAAE,CAAC,mBAAmB,EAAE,eAAe,EAAE,gBAAgB,CAAC,GAAI,CAC1F,CACG,CACP,CAAC;AACJ,CAAC,CACF,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 {\n useComponentMetadata,\n useMergeRefs,\n useUniqueId,\n warnOnce,\n} from '@cloudscape-design/component-toolkit/internal';\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\nimport { AnalyticsMetadata } from '@cloudscape-design/component-toolkit/internal/base-component/metrics/interfaces';\n\nimport { ActionsWrapper } from '../alert/actions-wrapper';\nimport { InternalButton } from '../button/internal';\nimport InternalIcon from '../icon/internal';\nimport {\n DATA_ATTR_ANALYTICS_FLASHBAR,\n DATA_ATTR_ANALYTICS_SUPPRESS_FLOW_EVENTS,\n} from '../internal/analytics/selectors';\nimport { getVisualContextClassname } from '../internal/components/visual-context';\nimport { PACKAGE_VERSION } from '../internal/environment';\nimport customCssProps from '../internal/generated/custom-css-properties';\nimport { isDevelopment } from '../internal/is-development';\nimport { awsuiPluginsInternal } from '../internal/plugins/api';\nimport { createUseDiscoveredAction, createUseDiscoveredContent } from '../internal/plugins/helpers';\nimport { throttle } from '../internal/utils/throttle';\nimport useContainerWidth from '../internal/utils/use-container-width';\nimport InternalLiveRegion from '../live-region/internal';\nimport InternalSpinner from '../spinner/internal';\nimport { GeneratedAnalyticsMetadataFlashbarDismiss } from './analytics-metadata/interfaces';\nimport { getItemStyles } from './collapsible-flashbar';\nimport { FlashbarProps } from './interfaces';\nimport { FOCUS_THROTTLE_DELAY } from './utils';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\nimport styles from './styles.css.js';\n\nconst ICON_TYPES = {\n success: 'status-positive',\n warning: 'status-warning',\n info: 'status-info',\n error: 'status-negative',\n 'in-progress': 'status-in-progress',\n} as const;\n\nconst useDiscoveredAction = createUseDiscoveredAction(awsuiPluginsInternal.flashbar.onActionRegistered);\nconst useDiscoveredContent = createUseDiscoveredContent('flash', awsuiPluginsInternal.flashContent);\n\nfunction dismissButton(\n dismissLabel: FlashbarProps.MessageDefinition['dismissLabel'],\n onDismiss: FlashbarProps.MessageDefinition['onDismiss'],\n style?: FlashbarProps.Style\n) {\n return (\n <div\n className={styles['dismiss-button-wrapper']}\n {...getAnalyticsMetadataAttribute({\n action: 'dismiss',\n } as Partial<GeneratedAnalyticsMetadataFlashbarDismiss>)}\n >\n <InternalButton\n onClick={onDismiss}\n className={styles['dismiss-button']}\n variant=\"flashbar-icon\"\n iconName=\"close\"\n formAction=\"none\"\n ariaLabel={dismissLabel}\n style={{\n root: {\n color: {\n active: style?.item?.dismissButton?.color?.active,\n default: style?.item?.dismissButton?.color?.default,\n hover: style?.item?.dismissButton?.color?.hover,\n },\n focusRing: {\n borderColor: style?.item?.dismissButton?.focusRing?.borderColor,\n borderRadius: style?.item?.dismissButton?.focusRing?.borderRadius,\n borderWidth: style?.item?.dismissButton?.focusRing?.borderWidth,\n },\n },\n }}\n />\n </div>\n );\n}\n\nexport const focusFlashById = throttle(\n (element: HTMLElement | null, itemId: string) => {\n const selector = `[data-itemid=\"${CSS.escape(itemId)}\"] .${styles['flash-focus-container']}`;\n element?.querySelector<HTMLElement>(selector)?.focus();\n },\n FOCUS_THROTTLE_DELAY,\n { trailing: false }\n);\n\ninterface FlashProps extends FlashbarProps.MessageDefinition {\n className: string;\n transitionState?: string;\n i18nStrings?: FlashbarProps.I18nStrings;\n style?: FlashbarProps.Style;\n}\n\nexport const Flash = React.forwardRef(\n (\n {\n id,\n header,\n content,\n dismissible,\n dismissLabel,\n loading,\n action,\n buttonText,\n onButtonClick,\n onDismiss,\n className,\n transitionState,\n ariaRole,\n i18nStrings,\n type = 'info',\n analyticsMetadata,\n style,\n ...props\n }: FlashProps,\n ref: React.Ref<HTMLDivElement>\n ) => {\n if (isDevelopment) {\n if (buttonText && !onButtonClick) {\n warnOnce(\n 'Flashbar',\n `You provided a \\`buttonText\\` prop without an \\`onButtonClick\\` handler. This will render a non-interactive action button.`\n );\n }\n\n if (dismissible && !onDismiss) {\n warnOnce(\n 'Flashbar',\n `You have set the \\`dismissible\\` prop without an \\`onDismiss\\` handler. This will render a non-interactive dismiss button.`\n );\n }\n }\n\n const [containerWidth, containerMeasureRef] = useContainerWidth();\n\n const elementRef = useComponentMetadata('Flash', PACKAGE_VERSION, analyticsMetadata as AnalyticsMetadata);\n\n const mergedRef = useMergeRefs(ref, elementRef, containerMeasureRef);\n const flashIconId = useUniqueId('flash-icon');\n const flashMessageId = useUniqueId('flash-message');\n\n const headerRefObject = useRef<HTMLDivElement>(null);\n const contentRefObject = useRef<HTMLDivElement>(null);\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: content });\n\n const headerRef = useMergeRefs(headerRefAction, headerRefContent, headerRefObject);\n const contentRef = useMergeRefs(contentRefAction, contentRefContent, contentRefObject);\n\n const statusIconAriaLabel =\n props.statusIconAriaLabel ||\n i18nStrings?.[`${loading || type === 'in-progress' ? 'inProgress' : type}IconAriaLabel`];\n\n const iconType = ICON_TYPES[type];\n const icon = loading ? (\n <span role=\"img\" aria-label={statusIconAriaLabel}>\n <InternalSpinner />\n </span>\n ) : (\n <InternalIcon name={iconType} ariaLabel={statusIconAriaLabel} />\n );\n\n const effectiveType = loading ? 'info' : type;\n\n const analyticsAttributes: Record<string, string> = {\n [DATA_ATTR_ANALYTICS_FLASHBAR]: effectiveType,\n };\n\n if (analyticsMetadata?.suppressFlowMetricEvents) {\n analyticsAttributes[DATA_ATTR_ANALYTICS_SUPPRESS_FLOW_EVENTS] = 'true';\n }\n\n return (\n // We're not using \"polite\" or \"assertive\" here, just turning default behavior off.\n // eslint-disable-next-line @cloudscape-design/prefer-live-region\n <div\n ref={mergedRef}\n role={ariaRole}\n aria-live={ariaRole ? 'off' : undefined}\n data-itemid={id}\n className={clsx(\n styles.flash,\n styles[`flash-type-${effectiveType}`],\n className,\n transitionState && {\n [styles.enter]: transitionState === 'enter',\n [styles.entering]: transitionState === 'entering',\n [styles.entered]: transitionState === 'entered',\n [styles.exit]: transitionState === 'exit',\n [styles.exiting]: transitionState === 'exiting',\n [styles.exited]: transitionState === 'exited',\n },\n getVisualContextClassname(type === 'warning' && !loading ? 'flashbar-warning' : 'flashbar'),\n initialHidden && styles['initial-hidden']\n )}\n style={{\n ...(style && getItemStyles(style, effectiveType)),\n ...(style?.item?.root?.focusRing && {\n [customCssProps.styleFocusRingBorderColor]: style.item.root.focusRing?.borderColor,\n [customCssProps.styleFocusRingBorderRadius]: style.item.root.focusRing?.borderRadius,\n [customCssProps.styleFocusRingBorderWidth]: style.item.root.focusRing?.borderWidth,\n }),\n ...(style?.item?.root?.focusRing?.borderRadius && {\n [customCssProps.styleFocusRingBorderRadius]: style.item.root.focusRing.borderRadius,\n }),\n }}\n {...analyticsAttributes}\n >\n <div className={styles['flash-body']}>\n <div\n className={styles['flash-focus-container']}\n tabIndex={-1}\n role=\"group\"\n aria-labelledby={`${flashIconId} ${flashMessageId}`}\n >\n <div className={clsx(styles['flash-icon'], styles['flash-text'])} id={flashIconId}>\n {icon}\n </div>\n <div className={clsx(styles['flash-message'], styles['flash-text'])} id={flashMessageId}>\n <div\n className={clsx(\n styles['flash-header'],\n headerReplacementType !== 'original' ? styles.hidden : analyticsSelectors['flash-header']\n )}\n ref={headerRef}\n >\n {header}\n </div>\n <div\n className={clsx(styles['header-replacement'], headerReplacementType !== 'replaced' && styles.hidden)}\n ref={replacementHeaderRef}\n ></div>\n <div\n className={clsx(\n styles['flash-content'],\n contentReplacementType !== 'original' ? styles.hidden : analyticsSelectors['flash-header']\n )}\n ref={contentRef}\n >\n {content}\n </div>\n <div\n className={clsx(styles['content-replacement'], contentReplacementType !== 'replaced' && styles.hidden)}\n ref={replacementContentRef}\n ></div>\n </div>\n </div>\n <ActionsWrapper\n className={styles['action-button-wrapper']}\n testUtilClasses={{\n actionSlot: styles['action-slot'],\n actionButton: styles['action-button'],\n }}\n action={action}\n discoveredActions={discoveredActions}\n buttonText={buttonText}\n onButtonClick={onButtonClick}\n containerWidth={containerWidth}\n wrappedClass={styles['action-wrapped']}\n />\n </div>\n {dismissible && dismissButton(dismissLabel, onDismiss, style)}\n {ariaRole === 'status' && (\n <InternalLiveRegion sources={[statusIconAriaLabel, headerRefObject, contentRefObject]} />\n )}\n </div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AAE,eAAe,EAAE,gBAAgB,CAAC,GAAI,CAC1F,CACG,CACP,CAAC;AACJ,CAAC,CACF,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 {\n useComponentMetadata,\n useMergeRefs,\n useUniqueId,\n warnOnce,\n} from '@cloudscape-design/component-toolkit/internal';\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\nimport { AnalyticsMetadata } from '@cloudscape-design/component-toolkit/internal/base-component/metrics/interfaces';\n\nimport { ActionsWrapper } from '../alert/actions-wrapper';\nimport { InternalButton } from '../button/internal';\nimport InternalIcon from '../icon/internal';\nimport {\n DATA_ATTR_ANALYTICS_FLASHBAR,\n DATA_ATTR_ANALYTICS_SUPPRESS_FLOW_EVENTS,\n} from '../internal/analytics/selectors';\nimport { getVisualContextClassname } from '../internal/components/visual-context';\nimport { PACKAGE_VERSION } from '../internal/environment';\nimport { isDevelopment } from '../internal/is-development';\nimport { awsuiPluginsInternal } from '../internal/plugins/api';\nimport { createUseDiscoveredAction, createUseDiscoveredContent } from '../internal/plugins/helpers';\nimport { throttle } from '../internal/utils/throttle';\nimport useContainerWidth from '../internal/utils/use-container-width';\nimport InternalLiveRegion from '../live-region/internal';\nimport InternalSpinner from '../spinner/internal';\nimport { GeneratedAnalyticsMetadataFlashbarDismiss } from './analytics-metadata/interfaces';\nimport { FlashbarProps } from './interfaces';\nimport { getDismissButtonStyles, getFlashStyles } from './style';\nimport { FOCUS_THROTTLE_DELAY } from './utils';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\nimport styles from './styles.css.js';\n\nconst ICON_TYPES = {\n success: 'status-positive',\n warning: 'status-warning',\n info: 'status-info',\n error: 'status-negative',\n 'in-progress': 'status-in-progress',\n} as const;\n\nconst useDiscoveredAction = createUseDiscoveredAction(awsuiPluginsInternal.flashbar.onActionRegistered);\nconst useDiscoveredContent = createUseDiscoveredContent('flash', awsuiPluginsInternal.flashContent);\n\nfunction dismissButton(\n dismissLabel: FlashbarProps.MessageDefinition['dismissLabel'],\n onDismiss: FlashbarProps.MessageDefinition['onDismiss'],\n style?: FlashbarProps.Style,\n type?: string\n) {\n return (\n <div\n className={styles['dismiss-button-wrapper']}\n {...getAnalyticsMetadataAttribute({\n action: 'dismiss',\n } as Partial<GeneratedAnalyticsMetadataFlashbarDismiss>)}\n >\n <InternalButton\n onClick={onDismiss}\n className={styles['dismiss-button']}\n variant=\"flashbar-icon\"\n iconName=\"close\"\n formAction=\"none\"\n ariaLabel={dismissLabel}\n style={{\n ...(style && getDismissButtonStyles(style, type)),\n }}\n />\n </div>\n );\n}\n\nexport const focusFlashById = throttle(\n (element: HTMLElement | null, itemId: string) => {\n const selector = `[data-itemid=\"${CSS.escape(itemId)}\"] .${styles['flash-focus-container']}`;\n element?.querySelector<HTMLElement>(selector)?.focus();\n },\n FOCUS_THROTTLE_DELAY,\n { trailing: false }\n);\n\ninterface FlashProps extends FlashbarProps.MessageDefinition {\n className: string;\n transitionState?: string;\n i18nStrings?: FlashbarProps.I18nStrings;\n style?: FlashbarProps.Style;\n}\n\nexport const Flash = React.forwardRef(\n (\n {\n id,\n header,\n content,\n dismissible,\n dismissLabel,\n loading,\n action,\n buttonText,\n onButtonClick,\n onDismiss,\n className,\n transitionState,\n ariaRole,\n i18nStrings,\n type = 'info',\n analyticsMetadata,\n style,\n ...props\n }: FlashProps,\n ref: React.Ref<HTMLDivElement>\n ) => {\n if (isDevelopment) {\n if (buttonText && !onButtonClick) {\n warnOnce(\n 'Flashbar',\n `You provided a \\`buttonText\\` prop without an \\`onButtonClick\\` handler. This will render a non-interactive action button.`\n );\n }\n\n if (dismissible && !onDismiss) {\n warnOnce(\n 'Flashbar',\n `You have set the \\`dismissible\\` prop without an \\`onDismiss\\` handler. This will render a non-interactive dismiss button.`\n );\n }\n }\n\n const [containerWidth, containerMeasureRef] = useContainerWidth();\n\n const elementRef = useComponentMetadata('Flash', PACKAGE_VERSION, analyticsMetadata as AnalyticsMetadata);\n\n const mergedRef = useMergeRefs(ref, elementRef, containerMeasureRef);\n const flashIconId = useUniqueId('flash-icon');\n const flashMessageId = useUniqueId('flash-message');\n\n const headerRefObject = useRef<HTMLDivElement>(null);\n const contentRefObject = useRef<HTMLDivElement>(null);\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: content });\n\n const headerRef = useMergeRefs(headerRefAction, headerRefContent, headerRefObject);\n const contentRef = useMergeRefs(contentRefAction, contentRefContent, contentRefObject);\n\n const statusIconAriaLabel =\n props.statusIconAriaLabel ||\n i18nStrings?.[`${loading || type === 'in-progress' ? 'inProgress' : type}IconAriaLabel`];\n\n const iconType = ICON_TYPES[type];\n const icon = loading ? (\n <span role=\"img\" aria-label={statusIconAriaLabel}>\n <InternalSpinner />\n </span>\n ) : (\n <InternalIcon name={iconType} ariaLabel={statusIconAriaLabel} />\n );\n\n const effectiveType = loading ? 'info' : type;\n\n const analyticsAttributes: Record<string, string> = {\n [DATA_ATTR_ANALYTICS_FLASHBAR]: effectiveType,\n };\n\n if (analyticsMetadata?.suppressFlowMetricEvents) {\n analyticsAttributes[DATA_ATTR_ANALYTICS_SUPPRESS_FLOW_EVENTS] = 'true';\n }\n\n return (\n // We're not using \"polite\" or \"assertive\" here, just turning default behavior off.\n // eslint-disable-next-line @cloudscape-design/prefer-live-region\n <div\n ref={mergedRef}\n role={ariaRole}\n aria-live={ariaRole ? 'off' : undefined}\n data-itemid={id}\n className={clsx(\n styles.flash,\n styles[`flash-type-${effectiveType}`],\n className,\n transitionState && {\n [styles.enter]: transitionState === 'enter',\n [styles.entering]: transitionState === 'entering',\n [styles.entered]: transitionState === 'entered',\n [styles.exit]: transitionState === 'exit',\n [styles.exiting]: transitionState === 'exiting',\n [styles.exited]: transitionState === 'exited',\n },\n getVisualContextClassname(type === 'warning' && !loading ? 'flashbar-warning' : 'flashbar'),\n initialHidden && styles['initial-hidden']\n )}\n style={{\n ...(style && getFlashStyles(style, effectiveType)),\n }}\n {...analyticsAttributes}\n >\n <div className={styles['flash-body']}>\n <div\n className={styles['flash-focus-container']}\n tabIndex={-1}\n role=\"group\"\n aria-labelledby={`${flashIconId} ${flashMessageId}`}\n >\n <div className={clsx(styles['flash-icon'], styles['flash-text'])} id={flashIconId}>\n {icon}\n </div>\n <div className={clsx(styles['flash-message'], styles['flash-text'])} id={flashMessageId}>\n <div\n className={clsx(\n styles['flash-header'],\n headerReplacementType !== 'original' ? styles.hidden : analyticsSelectors['flash-header']\n )}\n ref={headerRef}\n >\n {header}\n </div>\n <div\n className={clsx(styles['header-replacement'], headerReplacementType !== 'replaced' && styles.hidden)}\n ref={replacementHeaderRef}\n ></div>\n <div\n className={clsx(\n styles['flash-content'],\n contentReplacementType !== 'original' ? styles.hidden : analyticsSelectors['flash-header']\n )}\n ref={contentRef}\n >\n {content}\n </div>\n <div\n className={clsx(styles['content-replacement'], contentReplacementType !== 'replaced' && styles.hidden)}\n ref={replacementContentRef}\n ></div>\n </div>\n </div>\n <ActionsWrapper\n className={styles['action-button-wrapper']}\n testUtilClasses={{\n actionSlot: styles['action-slot'],\n actionButton: styles['action-button'],\n }}\n action={action}\n discoveredActions={discoveredActions}\n buttonText={buttonText}\n onButtonClick={onButtonClick}\n containerWidth={containerWidth}\n wrappedClass={styles['action-wrapped']}\n />\n </div>\n {dismissible && dismissButton(dismissLabel, onDismiss, style, effectiveType)}\n {ariaRole === 'status' && (\n <InternalLiveRegion sources={[statusIconAriaLabel, headerRefObject, contentRefObject]} />\n )}\n </div>\n );\n }\n);\n"]}
@@ -60,26 +60,56 @@ export declare namespace FlashbarProps {
60
60
  warning?: string;
61
61
  };
62
62
  focusRing?: {
63
- borderColor?: string;
63
+ borderColor?: {
64
+ error?: string;
65
+ info?: string;
66
+ inProgress?: string;
67
+ success?: string;
68
+ warning?: string;
69
+ };
64
70
  borderRadius?: string;
65
71
  borderWidth?: string;
66
72
  };
67
73
  };
68
74
  dismissButton?: {
69
75
  color?: {
70
- active?: string;
71
- default?: string;
72
- hover?: string;
76
+ active?: {
77
+ error?: string;
78
+ info?: string;
79
+ inProgress?: string;
80
+ success?: string;
81
+ warning?: string;
82
+ };
83
+ default?: {
84
+ error?: string;
85
+ info?: string;
86
+ inProgress?: string;
87
+ success?: string;
88
+ warning?: string;
89
+ };
90
+ hover?: {
91
+ error?: string;
92
+ info?: string;
93
+ inProgress?: string;
94
+ success?: string;
95
+ warning?: string;
96
+ };
73
97
  };
74
98
  focusRing?: {
75
- borderColor?: string;
99
+ borderColor?: {
100
+ error?: string;
101
+ info?: string;
102
+ inProgress?: string;
103
+ success?: string;
104
+ warning?: string;
105
+ };
76
106
  borderRadius?: string;
77
107
  borderWidth?: string;
78
108
  };
79
109
  };
80
110
  };
81
111
  notificationBar?: {
82
- root: {
112
+ root?: {
83
113
  background?: {
84
114
  active?: string;
85
115
  default?: string;
@@ -98,6 +128,13 @@ export declare namespace FlashbarProps {
98
128
  hover?: string;
99
129
  };
100
130
  };
131
+ expandButton?: {
132
+ focusRing?: {
133
+ borderColor?: string;
134
+ borderRadius?: string;
135
+ borderWidth?: string;
136
+ };
137
+ };
101
138
  };
102
139
  }
103
140
  type Type = 'success' | 'warning' | 'info' | 'error' | 'in-progress';
@@ -165,11 +202,13 @@ export interface FlashbarProps extends BaseComponentProps {
165
202
  * - `item.root.borderRadius` (string) - (Optional) Item border radius.
166
203
  * - `item.root.borderWidth` (string) - (Optional) Item border width.
167
204
  * - `item.root.color` {error, info, inProgress, success, warning} - (Optional) Color for item types.
168
- * - `item.root.focusRing.borderColor` (string) - (Optional) Item focus ring border color.
205
+ * - `item.root.focusRing.borderColor` {error, info, inProgress, success, warning} - (Optional) Item focus ring border color.
169
206
  * - `item.root.focusRing.borderRadius` (string) - (Optional) Item focus ring border radius.
170
207
  * - `item.root.focusRing.borderWidth` (string) - (Optional) Item focus ring border width.
171
- * - `item.dismissButton.color` {active, default, hover} - (Optional) Color for dismiss button states.
172
- * - `item.dismissButton.focusRing.borderColor` (string) - (Optional) Dismiss button focus ring border color.
208
+ * - `item.dismissButton.color.active` {error, info, inProgress, success, warning} - (Optional) Color for dismiss button active state.
209
+ * - `item.dismissButton.color.default` {error, info, inProgress, success, warning} - (Optional) Color for dismiss button default state.
210
+ * - `item.dismissButton.color.hover` {error, info, inProgress, success, warning} - (Optional) Color for dismiss button hover state.
211
+ * - `item.dismissButton.focusRing.borderColor` {error, info, inProgress, success, warning} - (Optional) Dismiss button focus ring border color.
173
212
  * - `item.dismissButton.focusRing.borderRadius` (string) - (Optional) Dismiss button focus ring border radius.
174
213
  * - `item.dismissButton.focusRing.borderWidth` (string) - (Optional) Dismiss button focus ring border width.
175
214
  * - `notificationBar.root.background` {active, default, hover} - (Optional) Background for notification bar states.
@@ -177,6 +216,9 @@ export interface FlashbarProps extends BaseComponentProps {
177
216
  * - `notificationBar.root.borderRadius` (string) - (Optional) Notification bar border radius.
178
217
  * - `notificationBar.root.borderWidth` (string) - (Optional) Notification bar border width.
179
218
  * - `notificationBar.root.color` {active, default, hover} - (Optional) Color for notification bar states.
219
+ * - `notificationBar.expandButton.focusRing.borderColor` (string) - (Optional) Border color for the expand button.
220
+ * - `notificationBar.expandButton.focusRing.borderRadius` (string) - (Optional) Border radius for the expand button.
221
+ * - `notificationBar.expandButton.focusRing.borderWidth` (string) - (Optional) Border width for the expand button.
180
222
  * @awsuiSystem core
181
223
  */
182
224
  style?: FlashbarProps.Style;
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/flashbar/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,MAA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":"","sources":["../../../src/flashbar/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { ButtonProps } from '../button/interfaces';\nimport { ErrorContext } from '../internal/analytics/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\n\nexport namespace FlashbarProps {\n export interface MessageDefinition {\n header?: React.ReactNode;\n content?: React.ReactNode;\n dismissible?: boolean;\n dismissLabel?: string;\n statusIconAriaLabel?: string;\n loading?: boolean;\n type?: FlashbarProps.Type;\n ariaRole?: FlashbarProps.AriaRole;\n action?: React.ReactNode;\n id?: string;\n buttonText?: ButtonProps['children'];\n onButtonClick?: ButtonProps['onClick'];\n onDismiss?: ButtonProps['onClick'];\n analyticsMetadata?: FlashbarProps.ItemAnalyticsMetadata;\n }\n\n export interface ItemAnalyticsMetadata {\n suppressFlowMetricEvents?: boolean;\n errorContext?: ErrorContext;\n }\n\n export interface I18nStrings {\n ariaLabel?: string;\n errorIconAriaLabel?: string;\n infoIconAriaLabel?: string;\n inProgressIconAriaLabel?: string;\n notificationBarAriaLabel?: string;\n notificationBarText?: string;\n successIconAriaLabel?: string;\n warningIconAriaLabel?: string;\n }\n\n export interface Style {\n item?: {\n root?: {\n background?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n borderColor?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n borderRadius?: string;\n borderWidth?: string;\n color?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n focusRing?: {\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n dismissButton?: {\n color?: {\n active?: string;\n default?: string;\n hover?: string;\n };\n focusRing?: {\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n };\n notificationBar?: {\n root: {\n background?: {\n active?: string;\n default?: string;\n hover?: string;\n };\n borderColor?: {\n active?: string;\n default?: string;\n hover?: string;\n };\n borderRadius?: string;\n borderWidth?: string;\n color?: {\n active?: string;\n default?: string;\n hover?: string;\n };\n };\n };\n }\n\n export type Type = 'success' | 'warning' | 'info' | 'error' | 'in-progress';\n export type AriaRole = 'alert' | 'status';\n}\n\nexport interface FlashbarProps extends BaseComponentProps {\n /**\n * Specifies flash messages that appear in the same order that they are listed.\n * The value is an array of flash message definition objects.\n *\n * A flash message object contains the following properties:\n * * `header` (ReactNode) - Specifies the heading text.\n * * `content` (ReactNode) - Specifies the primary text displayed in the flash element.\n * * `type` (string) - Indicates the type of the message to be displayed. Allowed values are as follows: `success, error, warning, info, in-progress`. The default is `info`.\n * * `loading` (boolean) - Replaces the status icon with a spinner and forces the type to `info`.\n * * `dismissible` (boolean) - Determines whether the component includes a close button icon. By default, the close button is not included.\n * When a user clicks on this button the `onDismiss` handler is called.\n * * `dismissLabel` (string) - Specifies an `aria-label` for to the dismiss icon button for improved accessibility.\n * * `statusIconAriaLabel` (string) - Specifies an `aria-label` for to the status icon for improved accessibility.\n * If not provided, `i18nStrings.{type}IconAriaLabel` will be used as a fallback.\n * * `ariaRole` (string) - For flash messages added after page load, specifies how this message is communicated to assistive\n * technology. Use \"status\" for status updates or informational content. Use \"alert\" for important messages that need the\n * user's attention.\n * * `action` (ReactNode) - Specifies an action for the flash message. Although it is technically possible to insert any content,\n * our UX guidelines only allow you to add a button.\n * * `buttonText` (string) - Specifies that an action button should be displayed, with the specified text.\n * When a user clicks on this button the `onButtonClick` handler is called.\n * If the `action` property is set, this property is ignored. **Deprecated**, replaced by `action`.\n * * `onButtonClick` (event => void) - Called when a user clicks on the action button. This is not called if you create a custom button\n * using the `action` property. **Deprecated**, replaced by `action`.\n * * `id` (string) - Specifies a unique flash message identifier. This property is used in two ways:\n * 1. As a [keys](https://reactjs.org/docs/lists-and-keys.html#keys) source for React rendering.\n * 2. To identify which flash message will be removed from the DOM when it is dismissed, to animate it out.\n * * `analyticsMetadata` (FlashbarProps.ItemAnalyticsMetadata) - (Optional) Specifies additional analytics-related metadata.\n * * `suppressFlowMetricEvents` - Prevent this item from generating events related to flow metrics.\n * @analytics\n */\n items: ReadonlyArray<FlashbarProps.MessageDefinition>;\n\n /**\n * Specifies whether flash messages should be stacked.\n */\n stackItems?: boolean;\n\n /**\n * An object containing all the necessary localized strings required by the component. The object should contain:\n *\n * * `ariaLabel` - Specifies the ARIA label for the list of notifications.\n *\n * If `stackItems` is set to `true`, it should also contain:\n *\n * * `notificationBarAriaLabel` - (optional) Specifies the ARIA label for the notification bar\n * * `notificationBarText` - (optional) Specifies the text shown in the notification bar\n * * `errorIconAriaLabel` - (optional) Specifies the ARIA label for the icon displayed next to the number of items of type `error`.\n * * `warningIconAriaLabel` - (optional) Specifies the ARIA label for the icon displayed next to the number of items of type `warning`.\n * * `infoIconAriaLabel` - (optional) Specifies the ARIA label for the icon displayed next to the number of items of type `info`.\n * * `successIconAriaLabel` - (optional) Specifies the ARIA label for the icon displayed next to the number of items of type `success`.\n * * `inProgressIconAriaLabel` - (optional) Specifies the ARIA label for the icon displayed next to the number of items of type `in-progress` or with `loading` set to `true`.\n * @i18n\n */\n i18nStrings?: FlashbarProps.I18nStrings;\n\n /**\n * Specifies an object of selectors and properties that are used to apply custom styles.\n *\n * - `item.root.background` {error, info, inProgress, success, warning} - (Optional) Background for item types.\n * - `item.root.borderColor` {error, info, inProgress, success, warning} - (Optional) Border color for item types.\n * - `item.root.borderRadius` (string) - (Optional) Item border radius.\n * - `item.root.borderWidth` (string) - (Optional) Item border width.\n * - `item.root.color` {error, info, inProgress, success, warning} - (Optional) Color for item types.\n * - `item.root.focusRing.borderColor` (string) - (Optional) Item focus ring border color.\n * - `item.root.focusRing.borderRadius` (string) - (Optional) Item focus ring border radius.\n * - `item.root.focusRing.borderWidth` (string) - (Optional) Item focus ring border width.\n * - `item.dismissButton.color` {active, default, hover} - (Optional) Color for dismiss button states.\n * - `item.dismissButton.focusRing.borderColor` (string) - (Optional) Dismiss button focus ring border color.\n * - `item.dismissButton.focusRing.borderRadius` (string) - (Optional) Dismiss button focus ring border radius.\n * - `item.dismissButton.focusRing.borderWidth` (string) - (Optional) Dismiss button focus ring border width.\n * - `notificationBar.root.background` {active, default, hover} - (Optional) Background for notification bar states.\n * - `notificationBar.root.borderColor` {active, default, hover} - (Optional) Border color for notification bar states.\n * - `notificationBar.root.borderRadius` (string) - (Optional) Notification bar border radius.\n * - `notificationBar.root.borderWidth` (string) - (Optional) Notification bar border width.\n * - `notificationBar.root.color` {active, default, hover} - (Optional) Color for notification bar states.\n * @awsuiSystem core\n */\n style?: FlashbarProps.Style;\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/flashbar/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { ButtonProps } from '../button/interfaces';\nimport { ErrorContext } from '../internal/analytics/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\n\nexport namespace FlashbarProps {\n export interface MessageDefinition {\n header?: React.ReactNode;\n content?: React.ReactNode;\n dismissible?: boolean;\n dismissLabel?: string;\n statusIconAriaLabel?: string;\n loading?: boolean;\n type?: FlashbarProps.Type;\n ariaRole?: FlashbarProps.AriaRole;\n action?: React.ReactNode;\n id?: string;\n buttonText?: ButtonProps['children'];\n onButtonClick?: ButtonProps['onClick'];\n onDismiss?: ButtonProps['onClick'];\n analyticsMetadata?: FlashbarProps.ItemAnalyticsMetadata;\n }\n\n export interface ItemAnalyticsMetadata {\n suppressFlowMetricEvents?: boolean;\n errorContext?: ErrorContext;\n }\n\n export interface I18nStrings {\n ariaLabel?: string;\n errorIconAriaLabel?: string;\n infoIconAriaLabel?: string;\n inProgressIconAriaLabel?: string;\n notificationBarAriaLabel?: string;\n notificationBarText?: string;\n successIconAriaLabel?: string;\n warningIconAriaLabel?: string;\n }\n\n export interface Style {\n item?: {\n root?: {\n background?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n borderColor?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n borderRadius?: string;\n borderWidth?: string;\n color?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n focusRing?: {\n borderColor?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n dismissButton?: {\n color?: {\n active?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n default?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n hover?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n };\n focusRing?: {\n borderColor?: {\n error?: string;\n info?: string;\n inProgress?: string;\n success?: string;\n warning?: string;\n };\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n };\n notificationBar?: {\n root?: {\n background?: {\n active?: string;\n default?: string;\n hover?: string;\n };\n borderColor?: {\n active?: string;\n default?: string;\n hover?: string;\n };\n borderRadius?: string;\n borderWidth?: string;\n color?: {\n active?: string;\n default?: string;\n hover?: string;\n };\n };\n expandButton?: {\n focusRing?: {\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n };\n }\n\n export type Type = 'success' | 'warning' | 'info' | 'error' | 'in-progress';\n export type AriaRole = 'alert' | 'status';\n}\n\nexport interface FlashbarProps extends BaseComponentProps {\n /**\n * Specifies flash messages that appear in the same order that they are listed.\n * The value is an array of flash message definition objects.\n *\n * A flash message object contains the following properties:\n * * `header` (ReactNode) - Specifies the heading text.\n * * `content` (ReactNode) - Specifies the primary text displayed in the flash element.\n * * `type` (string) - Indicates the type of the message to be displayed. Allowed values are as follows: `success, error, warning, info, in-progress`. The default is `info`.\n * * `loading` (boolean) - Replaces the status icon with a spinner and forces the type to `info`.\n * * `dismissible` (boolean) - Determines whether the component includes a close button icon. By default, the close button is not included.\n * When a user clicks on this button the `onDismiss` handler is called.\n * * `dismissLabel` (string) - Specifies an `aria-label` for to the dismiss icon button for improved accessibility.\n * * `statusIconAriaLabel` (string) - Specifies an `aria-label` for to the status icon for improved accessibility.\n * If not provided, `i18nStrings.{type}IconAriaLabel` will be used as a fallback.\n * * `ariaRole` (string) - For flash messages added after page load, specifies how this message is communicated to assistive\n * technology. Use \"status\" for status updates or informational content. Use \"alert\" for important messages that need the\n * user's attention.\n * * `action` (ReactNode) - Specifies an action for the flash message. Although it is technically possible to insert any content,\n * our UX guidelines only allow you to add a button.\n * * `buttonText` (string) - Specifies that an action button should be displayed, with the specified text.\n * When a user clicks on this button the `onButtonClick` handler is called.\n * If the `action` property is set, this property is ignored. **Deprecated**, replaced by `action`.\n * * `onButtonClick` (event => void) - Called when a user clicks on the action button. This is not called if you create a custom button\n * using the `action` property. **Deprecated**, replaced by `action`.\n * * `id` (string) - Specifies a unique flash message identifier. This property is used in two ways:\n * 1. As a [keys](https://reactjs.org/docs/lists-and-keys.html#keys) source for React rendering.\n * 2. To identify which flash message will be removed from the DOM when it is dismissed, to animate it out.\n * * `analyticsMetadata` (FlashbarProps.ItemAnalyticsMetadata) - (Optional) Specifies additional analytics-related metadata.\n * * `suppressFlowMetricEvents` - Prevent this item from generating events related to flow metrics.\n * @analytics\n */\n items: ReadonlyArray<FlashbarProps.MessageDefinition>;\n\n /**\n * Specifies whether flash messages should be stacked.\n */\n stackItems?: boolean;\n\n /**\n * An object containing all the necessary localized strings required by the component. The object should contain:\n *\n * * `ariaLabel` - Specifies the ARIA label for the list of notifications.\n *\n * If `stackItems` is set to `true`, it should also contain:\n *\n * * `notificationBarAriaLabel` - (optional) Specifies the ARIA label for the notification bar\n * * `notificationBarText` - (optional) Specifies the text shown in the notification bar\n * * `errorIconAriaLabel` - (optional) Specifies the ARIA label for the icon displayed next to the number of items of type `error`.\n * * `warningIconAriaLabel` - (optional) Specifies the ARIA label for the icon displayed next to the number of items of type `warning`.\n * * `infoIconAriaLabel` - (optional) Specifies the ARIA label for the icon displayed next to the number of items of type `info`.\n * * `successIconAriaLabel` - (optional) Specifies the ARIA label for the icon displayed next to the number of items of type `success`.\n * * `inProgressIconAriaLabel` - (optional) Specifies the ARIA label for the icon displayed next to the number of items of type `in-progress` or with `loading` set to `true`.\n * @i18n\n */\n i18nStrings?: FlashbarProps.I18nStrings;\n\n /**\n * Specifies an object of selectors and properties that are used to apply custom styles.\n *\n * - `item.root.background` {error, info, inProgress, success, warning} - (Optional) Background for item types.\n * - `item.root.borderColor` {error, info, inProgress, success, warning} - (Optional) Border color for item types.\n * - `item.root.borderRadius` (string) - (Optional) Item border radius.\n * - `item.root.borderWidth` (string) - (Optional) Item border width.\n * - `item.root.color` {error, info, inProgress, success, warning} - (Optional) Color for item types.\n * - `item.root.focusRing.borderColor` {error, info, inProgress, success, warning} - (Optional) Item focus ring border color.\n * - `item.root.focusRing.borderRadius` (string) - (Optional) Item focus ring border radius.\n * - `item.root.focusRing.borderWidth` (string) - (Optional) Item focus ring border width.\n * - `item.dismissButton.color.active` {error, info, inProgress, success, warning} - (Optional) Color for dismiss button active state.\n * - `item.dismissButton.color.default` {error, info, inProgress, success, warning} - (Optional) Color for dismiss button default state.\n * - `item.dismissButton.color.hover` {error, info, inProgress, success, warning} - (Optional) Color for dismiss button hover state.\n * - `item.dismissButton.focusRing.borderColor` {error, info, inProgress, success, warning} - (Optional) Dismiss button focus ring border color.\n * - `item.dismissButton.focusRing.borderRadius` (string) - (Optional) Dismiss button focus ring border radius.\n * - `item.dismissButton.focusRing.borderWidth` (string) - (Optional) Dismiss button focus ring border width.\n * - `notificationBar.root.background` {active, default, hover} - (Optional) Background for notification bar states.\n * - `notificationBar.root.borderColor` {active, default, hover} - (Optional) Border color for notification bar states.\n * - `notificationBar.root.borderRadius` (string) - (Optional) Notification bar border radius.\n * - `notificationBar.root.borderWidth` (string) - (Optional) Notification bar border width.\n * - `notificationBar.root.color` {active, default, hover} - (Optional) Color for notification bar states.\n * - `notificationBar.expandButton.focusRing.borderColor` (string) - (Optional) Border color for the expand button.\n * - `notificationBar.expandButton.focusRing.borderRadius` (string) - (Optional) Border radius for the expand button.\n * - `notificationBar.expandButton.focusRing.borderWidth` (string) - (Optional) Border width for the expand button.\n * @awsuiSystem core\n */\n style?: FlashbarProps.Style;\n}\n"]}
@@ -0,0 +1,36 @@
1
+ import { FlashbarProps } from './interfaces';
2
+ export declare function getCollapsibleFlashStyles(style: FlashbarProps.Style, type?: string): {
3
+ background: string | undefined;
4
+ borderColor: string | undefined;
5
+ borderRadius: string | undefined;
6
+ borderStyle: string | undefined;
7
+ borderWidth: string | undefined;
8
+ color: string | undefined;
9
+ };
10
+ export declare function getFlashStyles(style: FlashbarProps.Style, type?: string): {
11
+ background: string | undefined;
12
+ borderColor: string | undefined;
13
+ borderRadius: string | undefined;
14
+ borderStyle: string | undefined;
15
+ borderWidth: string | undefined;
16
+ color: string | undefined;
17
+ };
18
+ export declare function getDismissButtonStyles(style: FlashbarProps.Style, type?: string): {
19
+ root: {
20
+ color: {
21
+ active: string | undefined;
22
+ default: string | undefined;
23
+ hover: string | undefined;
24
+ };
25
+ focusRing: {
26
+ borderColor: string | undefined;
27
+ borderRadius: string | undefined;
28
+ borderWidth: string | undefined;
29
+ };
30
+ };
31
+ };
32
+ export declare function getNotificationBarStyles(style: FlashbarProps.Style): {
33
+ borderRadius: string | undefined;
34
+ borderWidth: string | undefined;
35
+ };
36
+ //# sourceMappingURL=style.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../src/flashbar/style.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,aAAa,CAAC,KAAK,EAAE,IAAI,GAAE,MAAe;;;;;;;EAiC1F;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,aAAa,CAAC,KAAK,EAAE,IAAI,GAAE,MAAe;;;;;;;EAkB/E;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,aAAa,CAAC,KAAK,EAAE,IAAI,GAAE,MAAe;;;;;;;;;;;;;EAyCvF;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,aAAa,CAAC,KAAK;;;EAwClE"}