@12-apps/ui 6.25.0 → 6.26.0

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 (45) hide show
  1. package/dist/_internal/components/data-display/Alert/Alert.helpers.js +5 -1
  2. package/dist/_internal/components/data-display/Alert/Alert.js +3 -3
  3. package/dist/_internal/components/data-display/Alert/Alert.styles.js +2 -2
  4. package/dist/_internal/components/data-display/CardKit/card-actions-context.js +4 -4
  5. package/dist/_internal/components/data-display/CardKit/use-remove-confirm.js +5 -5
  6. package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +5 -5
  7. package/dist/_internal/components/data-display/DataViews/data-views-table-parts.js +4 -4
  8. package/dist/_internal/components/data-display/index.js +3 -3
  9. package/dist/_internal/components/index.js +3 -3
  10. package/dist/{chunk-WNMYWQ7D.js → chunk-4Y6SPFKW.js} +10 -8
  11. package/dist/chunk-4Y6SPFKW.js.map +1 -0
  12. package/dist/{chunk-KM5O4ICK.js → chunk-7LCXGJN5.js} +2 -2
  13. package/dist/{chunk-57Z2ND3N.js → chunk-CXLAJZSE.js} +2 -2
  14. package/dist/{chunk-N3QUEBNS.js → chunk-L7VH6IMR.js} +14 -1
  15. package/dist/chunk-L7VH6IMR.js.map +1 -0
  16. package/dist/{chunk-WM6Y2S6W.js → chunk-TWY5FOBY.js} +2 -2
  17. package/dist/{chunk-6ZY5XU4J.js → chunk-UIZH4DAE.js} +2 -2
  18. package/dist/{chunk-SYJMI2NP.js → chunk-VNTOBLIB.js} +2 -2
  19. package/dist/data-display/Alert.js +3 -3
  20. package/dist/data-display/CardKit.js +5 -5
  21. package/dist/data-display/DataViews.js +5 -5
  22. package/dist/native/data-display/Alert.js +18 -3
  23. package/dist/native/data-display/Alert.js.map +1 -1
  24. package/dist/types/components/data-display/Alert/Alert.base.d.ts +28 -2
  25. package/dist/types/components/data-display/Alert/Alert.base.d.ts.map +1 -1
  26. package/dist/types/components/data-display/Alert/Alert.helpers.d.ts +39 -0
  27. package/dist/types/components/data-display/Alert/Alert.helpers.d.ts.map +1 -1
  28. package/dist/types-native/components/data-display/Alert/Alert.base.d.ts +28 -2
  29. package/dist/types-native/components/data-display/Alert/Alert.base.d.ts.map +1 -1
  30. package/dist/types-native/components/data-display/Alert/Alert.helpers.d.ts +39 -0
  31. package/dist/types-native/components/data-display/Alert/Alert.helpers.d.ts.map +1 -1
  32. package/dist/types-native/components/data-display/Alert/Alert.native.d.ts.map +1 -1
  33. package/package.json +1 -1
  34. package/src/components/data-display/Alert/Alert.base.ts +29 -2
  35. package/src/components/data-display/Alert/Alert.helpers.ts +50 -0
  36. package/src/components/data-display/Alert/Alert.md +29 -1
  37. package/src/components/data-display/Alert/Alert.native.tsx +8 -4
  38. package/src/components/data-display/Alert/Alert.tsx +5 -5
  39. package/dist/chunk-N3QUEBNS.js.map +0 -1
  40. package/dist/chunk-WNMYWQ7D.js.map +0 -1
  41. /package/dist/{chunk-KM5O4ICK.js.map → chunk-7LCXGJN5.js.map} +0 -0
  42. /package/dist/{chunk-57Z2ND3N.js.map → chunk-CXLAJZSE.js.map} +0 -0
  43. /package/dist/{chunk-WM6Y2S6W.js.map → chunk-TWY5FOBY.js.map} +0 -0
  44. /package/dist/{chunk-6ZY5XU4J.js.map → chunk-UIZH4DAE.js.map} +0 -0
  45. /package/dist/{chunk-SYJMI2NP.js.map → chunk-VNTOBLIB.js.map} +0 -0
@@ -1,16 +1,20 @@
1
1
  import {
2
2
  ALERT_DEFAULTS,
3
+ ANNOUNCE_ROLE,
3
4
  VARIANT_ICON,
4
5
  defaultAriaLive,
5
6
  resolveAlertProps,
7
+ resolveAnnouncement,
6
8
  testIdFor
7
- } from "../../../../chunk-N3QUEBNS.js";
9
+ } from "../../../../chunk-L7VH6IMR.js";
8
10
  import "../../../../chunk-PZ5AY32C.js";
9
11
  export {
10
12
  ALERT_DEFAULTS,
13
+ ANNOUNCE_ROLE,
11
14
  VARIANT_ICON,
12
15
  defaultAriaLive,
13
16
  resolveAlertProps,
17
+ resolveAnnouncement,
14
18
  testIdFor
15
19
  };
16
20
  //# sourceMappingURL=Alert.helpers.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  ALERT_ONLY_PROPS,
3
3
  Alert
4
- } from "../../../../chunk-WNMYWQ7D.js";
5
- import "../../../../chunk-57Z2ND3N.js";
6
- import "../../../../chunk-N3QUEBNS.js";
4
+ } from "../../../../chunk-4Y6SPFKW.js";
5
+ import "../../../../chunk-CXLAJZSE.js";
6
+ import "../../../../chunk-L7VH6IMR.js";
7
7
  import "../../../../chunk-TXKZEKJN.js";
8
8
  import "../../../../chunk-TYJR4GOF.js";
9
9
  import "../../../../chunk-NQN5Z36J.js";
@@ -8,8 +8,8 @@ import {
8
8
  iconRotate,
9
9
  pulseAnimation,
10
10
  shimmerAnimation
11
- } from "../../../../chunk-57Z2ND3N.js";
12
- import "../../../../chunk-N3QUEBNS.js";
11
+ } from "../../../../chunk-CXLAJZSE.js";
12
+ import "../../../../chunk-L7VH6IMR.js";
13
13
  import "../../../../chunk-TXKZEKJN.js";
14
14
  import "../../../../chunk-NQN5Z36J.js";
15
15
  import "../../../../chunk-AG66JBNH.js";
@@ -2,11 +2,11 @@
2
2
  import {
3
3
  CardActionsProvider,
4
4
  useCardActions
5
- } from "../../../../chunk-SYJMI2NP.js";
5
+ } from "../../../../chunk-VNTOBLIB.js";
6
6
  import "../../../../chunk-NUGT7LMR.js";
7
- import "../../../../chunk-WNMYWQ7D.js";
8
- import "../../../../chunk-57Z2ND3N.js";
9
- import "../../../../chunk-N3QUEBNS.js";
7
+ import "../../../../chunk-4Y6SPFKW.js";
8
+ import "../../../../chunk-CXLAJZSE.js";
9
+ import "../../../../chunk-L7VH6IMR.js";
10
10
  import "../../../../chunk-TXKZEKJN.js";
11
11
  import "../../../../chunk-TYJR4GOF.js";
12
12
  import "../../../../chunk-NQN5Z36J.js";
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import {
3
3
  useRemoveConfirm
4
- } from "../../../../chunk-KM5O4ICK.js";
5
- import "../../../../chunk-SYJMI2NP.js";
4
+ } from "../../../../chunk-7LCXGJN5.js";
5
+ import "../../../../chunk-VNTOBLIB.js";
6
6
  import "../../../../chunk-XCBQXSTR.js";
7
7
  import "../../../../chunk-CT5K725B.js";
8
8
  import "../../../../chunk-HJOABXKN.js";
@@ -10,9 +10,9 @@ import "../../../../chunk-3P4THDBM.js";
10
10
  import "../../../../chunk-QQS3GQYS.js";
11
11
  import "../../../../chunk-EMYESBIT.js";
12
12
  import "../../../../chunk-NUGT7LMR.js";
13
- import "../../../../chunk-WNMYWQ7D.js";
14
- import "../../../../chunk-57Z2ND3N.js";
15
- import "../../../../chunk-N3QUEBNS.js";
13
+ import "../../../../chunk-4Y6SPFKW.js";
14
+ import "../../../../chunk-CXLAJZSE.js";
15
+ import "../../../../chunk-L7VH6IMR.js";
16
16
  import "../../../../chunk-2IBFEHIX.js";
17
17
  import "../../../../chunk-BWB2MVWP.js";
18
18
  import "../../../../chunk-TXKZEKJN.js";
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  DataViewsTableBase
4
- } from "../../../../chunk-WM6Y2S6W.js";
4
+ } from "../../../../chunk-TWY5FOBY.js";
5
5
  import "../../../../chunk-ZZMZF7PZ.js";
6
6
  import "../../../../chunk-EQ7PWGBN.js";
7
7
  import "../../../../chunk-ZOLAYP2D.js";
@@ -39,7 +39,7 @@ import "../../../../chunk-SNR537TI.js";
39
39
  import "../../../../chunk-BH5BXLGI.js";
40
40
  import "../../../../chunk-ZPIMPOHV.js";
41
41
  import "../../../../chunk-OE2ZVL67.js";
42
- import "../../../../chunk-6ZY5XU4J.js";
42
+ import "../../../../chunk-UIZH4DAE.js";
43
43
  import "../../../../chunk-7KWBGMQC.js";
44
44
  import "../../../../chunk-2GI7ANEL.js";
45
45
  import "../../../../chunk-5M4TYFR3.js";
@@ -139,9 +139,9 @@ import "../../../../chunk-KZLLTOB2.js";
139
139
  import "../../../../chunk-E5LWJDI3.js";
140
140
  import "../../../../chunk-G3E66C6J.js";
141
141
  import "../../../../chunk-NUGT7LMR.js";
142
- import "../../../../chunk-WNMYWQ7D.js";
143
- import "../../../../chunk-57Z2ND3N.js";
144
- import "../../../../chunk-N3QUEBNS.js";
142
+ import "../../../../chunk-4Y6SPFKW.js";
143
+ import "../../../../chunk-CXLAJZSE.js";
144
+ import "../../../../chunk-L7VH6IMR.js";
145
145
  import "../../../../chunk-2IBFEHIX.js";
146
146
  import "../../../../chunk-BWB2MVWP.js";
147
147
  import "../../../../chunk-TXKZEKJN.js";
@@ -3,7 +3,7 @@ import {
3
3
  ViewDialogs,
4
4
  ViewMutationErrorAlert,
5
5
  ViewsMenuSlot
6
- } from "../../../../chunk-6ZY5XU4J.js";
6
+ } from "../../../../chunk-UIZH4DAE.js";
7
7
  import "../../../../chunk-7KWBGMQC.js";
8
8
  import "../../../../chunk-2GI7ANEL.js";
9
9
  import "../../../../chunk-5M4TYFR3.js";
@@ -43,9 +43,9 @@ import "../../../../chunk-5KEMPCW4.js";
43
43
  import "../../../../chunk-VM3HRSAU.js";
44
44
  import "../../../../chunk-GYXUCS37.js";
45
45
  import "../../../../chunk-NUGT7LMR.js";
46
- import "../../../../chunk-WNMYWQ7D.js";
47
- import "../../../../chunk-57Z2ND3N.js";
48
- import "../../../../chunk-N3QUEBNS.js";
46
+ import "../../../../chunk-4Y6SPFKW.js";
47
+ import "../../../../chunk-CXLAJZSE.js";
48
+ import "../../../../chunk-L7VH6IMR.js";
49
49
  import "../../../../chunk-2IBFEHIX.js";
50
50
  import "../../../../chunk-BWB2MVWP.js";
51
51
  import "../../../../chunk-TXKZEKJN.js";
@@ -191,9 +191,9 @@ import "../../../chunk-MWFSIB6K.js";
191
191
  import "../../../chunk-NUGT7LMR.js";
192
192
  import {
193
193
  Alert
194
- } from "../../../chunk-WNMYWQ7D.js";
195
- import "../../../chunk-57Z2ND3N.js";
196
- import "../../../chunk-N3QUEBNS.js";
194
+ } from "../../../chunk-4Y6SPFKW.js";
195
+ import "../../../chunk-CXLAJZSE.js";
196
+ import "../../../chunk-L7VH6IMR.js";
197
197
  import "../../../chunk-2IBFEHIX.js";
198
198
  import {
199
199
  AlertDialog
@@ -695,9 +695,9 @@ import "../../chunk-MWFSIB6K.js";
695
695
  import "../../chunk-NUGT7LMR.js";
696
696
  import {
697
697
  Alert
698
- } from "../../chunk-WNMYWQ7D.js";
699
- import "../../chunk-57Z2ND3N.js";
700
- import "../../chunk-N3QUEBNS.js";
698
+ } from "../../chunk-4Y6SPFKW.js";
699
+ import "../../chunk-CXLAJZSE.js";
700
+ import "../../chunk-L7VH6IMR.js";
701
701
  import "../../chunk-2IBFEHIX.js";
702
702
  import {
703
703
  AlertDialog
@@ -5,12 +5,12 @@ import {
5
5
  fadeInScale,
6
6
  getColorFromTheme,
7
7
  getVariantIcon
8
- } from "./chunk-57Z2ND3N.js";
8
+ } from "./chunk-CXLAJZSE.js";
9
9
  import {
10
- defaultAriaLive,
11
10
  resolveAlertProps,
11
+ resolveAnnouncement,
12
12
  testIdFor
13
- } from "./chunk-N3QUEBNS.js";
13
+ } from "./chunk-L7VH6IMR.js";
14
14
  import {
15
15
  ACTIVE,
16
16
  ALERT_EASING,
@@ -231,13 +231,15 @@ var Alert = React.forwardRef((alertProps, ref) => {
231
231
  description,
232
232
  children,
233
233
  animate,
234
- role,
234
+ role: _role,
235
+ announce: _announce,
236
+ // resolved from `alertProps` — see `resolveAnnouncement`
235
237
  "aria-atomic": ariaAtomic,
236
238
  ...others
237
239
  } = resolveAlertProps(alertProps);
238
240
  const dataTestId = resolveTestId(others, "alert");
239
241
  const props = withoutAlertOnlyProps(withoutTestIdProps(others));
240
- const ariaLive = alertProps["aria-live"] ?? defaultAriaLive(variant);
242
+ const announcement = resolveAnnouncement(alertProps, variant);
241
243
  const [open, setOpen] = React.useState(true);
242
244
  const [isClosing, setIsClosing] = React.useState(false);
243
245
  const handleClose = () => {
@@ -262,8 +264,8 @@ var Alert = React.forwardRef((alertProps, ref) => {
262
264
  pulse,
263
265
  animate,
264
266
  icon: displayIcon,
265
- role,
266
- "aria-live": ariaLive,
267
+ role: announcement.role,
268
+ "aria-live": announcement["aria-live"],
267
269
  "aria-atomic": ariaAtomic,
268
270
  tabIndex: 0,
269
271
  action: dismissButton(alertProps, dataTestId, handleClose),
@@ -284,4 +286,4 @@ export {
284
286
  Alert,
285
287
  ALERT_ONLY_PROPS
286
288
  };
287
- //# sourceMappingURL=chunk-WNMYWQ7D.js.map
289
+ //# sourceMappingURL=chunk-4Y6SPFKW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/data-display/Alert/Alert.tsx"],"sourcesContent":["import Close from '@mui/icons-material/Close';\nimport MuiAlert from '@mui/material/Alert/index.js';\nimport AlertTitle from '@mui/material/AlertTitle/index.js';\nimport Box from '@mui/material/Box/index.js';\nimport Collapse from '@mui/material/Collapse/index.js';\nimport IconButton from '@mui/material/IconButton/index.js';\nimport { alpha, styled } from '@mui/material/styles/index.js';\nimport type { Theme } from '@mui/material/styles/index.js';\nimport React from 'react';\n\nimport { resolveAlertProps, resolveAnnouncement, testIdFor } from './Alert.helpers';\nimport type { AlertPalette } from './Alert.metrics';\nimport {\n ACTIVE,\n GLOW,\n ALERT_EASING,\n ALERT_RADIUS_UNITS,\n ALERT_TRANSITION_MS,\n CLOSE_BUTTON,\n CLOSE_DELAY_MS,\n COLLAPSE_MS,\n DESCRIPTION,\n FADE_IN,\n FOCUS,\n HOVER,\n seconds,\n TITLE,\n} from './Alert.metrics';\nimport {\n alertEmphasisStyles,\n alertLayoutStyles,\n alertVariantStyles,\n fadeInScale,\n getColorFromTheme,\n getVariantIcon,\n} from './Alert.styles';\nimport type { AlertColor } from '@mui/material/Alert/index.js';\nimport type { AlertProps } from './Alert.types';\nimport { resolveTestId, withoutTestIdProps } from '../../../platform/test-id';\nimport { px } from '../../../tokens/theme';\n\nconst transition = `all ${seconds(ALERT_TRANSITION_MS)} ${ALERT_EASING}`;\n\n// Define animations\n/**\n * The pointer states' shadow: a flat tint, plus the glow when the alert has one.\n *\n * The tint is an inset spread at 100vmax, which always exceeds the element, so\n * it covers the surface edge to edge. It paints ABOVE the background and BELOW\n * the content, which is what keeps the ink's own contrast out of these states\n * entirely — see `ACTIVE` in `Alert.metrics.ts` for why a layer replaced the\n * opacity dip and the brightness multiplier that each preceded it.\n *\n * The glow is COMPOSED rather than replaced, so hovering a glowing alert keeps\n * its glow; `glowStyles` gave up its `!important` for this.\n */\nfunction pointerShadow(\n theme: Theme,\n colorPalette: AlertPalette,\n glow: boolean,\n variant: string | undefined,\n): (alpha_: number) => string {\n // The tint moves the surface AWAY from its own ink, which is why this reads\n // the variant and not only the mode.\n //\n // `gradient` is the one variant where the two disagree: it paints a\n // mid-lightness sweep (L* 42–61) under WHITE ink in BOTH modes, so the\n // mode-keyed answer tinted it white in dark mode — toward the text. Measured:\n // white-on-gradient fell to 2.90:1 on hover and 2.41:1 pressed, under the 3:1\n // floor and below its own idle. Every other variant's surface tracks the mode,\n // so for them the two rules agree.\n const ink = variant === 'gradient' || theme.palette.mode === 'light' ? '#000000' : '#ffffff';\n const glowShadow = glow\n ? `0 0 ${GLOW.blur}px ${GLOW.spread}px ${alpha(colorPalette.main, GLOW.alpha)}`\n : null;\n return (alpha_) =>\n [`inset 0 0 0 100vmax ${alpha(ink, alpha_)}`, glowShadow].filter(Boolean).join(', ');\n}\n\nconst StyledAlert = styled(MuiAlert, {\n shouldForwardProp: (prop) =>\n !['customVariant', 'customColor', 'glow', 'pulse', 'animate'].includes(prop as string),\n})<{\n customVariant?: string;\n customColor?: string;\n glow?: boolean;\n pulse?: boolean;\n animate?: boolean;\n}>(({ theme, customVariant, customColor, glow, pulse, animate }) => {\n const colorPalette = getColorFromTheme(theme, customColor || customVariant || 'info');\n\n const withTint = pointerShadow(theme, colorPalette, Boolean(glow), customVariant);\n\n return {\n borderRadius: theme.spacing(ALERT_RADIUS_UNITS),\n transition: `${transition}, box-shadow ${seconds(ACTIVE.ms)} ${ALERT_EASING}`,\n position: 'relative',\n overflow: 'hidden',\n animation: animate ? `${fadeInScale} ${seconds(FADE_IN.ms)} ease-out` : 'none',\n willChange: 'transform, opacity',\n\n ...alertLayoutStyles(theme, colorPalette, animate),\n\n // Hover: one tint step, and nothing that moves. An alert is a surface\n // rather than a control, so the pointer only needs telling it is here. The\n // icon keeps its own place for the same reason — it is the variant's\n // meaning, not an affordance to animate.\n '&:hover': {\n boxShadow: withTint(HOVER.tintAlpha),\n\n '&::before': {\n opacity: 1,\n },\n },\n\n // Press: a 20% tint, landing at once and easing back. Still no geometry.\n //\n // `transition: none` here is what makes the dip INSTANT: a click's\n // `:active` lasts about as long as the finger is down, so easing into it\n // would be cut off in its first tenth and read as a flicker. The ease is on\n // the way back, governed by the root.\n //\n // Neither `:hover` nor `:focus-visible` may declare `transition`, and that\n // is not a style preference. `:active` under a mouse ALWAYS implies\n // `:hover`, so a bare shorthand in the hover block outranks the root's\n // (0,2,0 beats 0,1,0) and silently resets the timing this state rests on.\n //\n // The `:not(:has(…))` names CONTROLS, not any descendant. `:active`\n // matches an ancestor of whatever is pressed, so dismissing an alert\n // dimmed the alert being dismissed and pressing a call to action dimmed\n // the message explaining it. Excluding `:has(:active)` wholesale does not\n // work and was the first attempt: pressing the TEXT makes that text\n // `:active` too, so the guard matched on every press and the state never\n // fired at all.\n '&:active:not(:has(button:active, a:active, [role=\"button\"]:active))': {\n boxShadow: withTint(ACTIVE.tintAlpha),\n transition: 'none',\n },\n\n // Focus: `:focus-visible`, not `:focus-within`.\n //\n // The alert carries `tabIndex={0}`, so a MOUSE CLICK focused it and painted\n // the ring — a keyboard affordance answering a pointer, which is what made\n // clicking one look like an error state. `:focus-visible` is the browser's\n // own answer to \"did this focus come from the keyboard\": the ring stays for\n // whoever tabs here and never fires on a click.\n //\n // One ring, not three. It was a 3px outline at 3px offset UNDER a 6px halo,\n // and stacking two rings on one edge is what read as unfinished rather than\n // as emphasis.\n // It declares no `transition`: `outline-style` is discrete, so the ring\n // arrives at full width with only its COLOUR easing — from `currentcolor`,\n // the near-black alert ink, to the blue. That is a visible dark flash on\n // every keyboard focus, and it would also outrank the root's opacity\n // transition the way the hover block did.\n '&:focus-visible': {\n outline: `${FOCUS.ringWidth}px solid ${alpha(colorPalette.main, FOCUS.ringAlpha)}`,\n outlineOffset: `${FOCUS.offset}px`,\n },\n\n ...alertVariantStyles(theme, customVariant, colorPalette),\n ...alertEmphasisStyles(colorPalette, Boolean(glow), Boolean(pulse)),\n };\n});\n\n// glass and gradient are our own looks with no MUI severity of their own; both\n// borrow info's. danger is MUI's error.\nconst MUI_SEVERITY: Record<string, AlertColor> = {\n danger: 'error',\n glass: 'info',\n gradient: 'info',\n};\n\nconst toMuiSeverity = (variant: string): AlertColor =>\n MUI_SEVERITY[variant] ?? (variant as AlertColor);\n\nconst AlertContent: React.FC<{\n title?: AlertProps['title'];\n description?: AlertProps['description'];\n dataTestId?: string;\n children?: React.ReactNode;\n}> = ({ title, description, dataTestId, children }) => (\n <>\n {title && (\n <AlertTitle\n data-testid={testIdFor(dataTestId, 'title')}\n sx={{\n fontWeight: TITLE.fontWeight,\n fontSize: px(TITLE.fontSize),\n marginBottom: description ? TITLE.marginBottomUnits : 0,\n wordWrap: 'break-word',\n overflowWrap: 'break-word',\n wordBreak: 'break-word',\n }}\n >\n {title}\n </AlertTitle>\n )}\n {description && (\n <Box\n component=\"div\"\n data-testid={testIdFor(dataTestId, 'message')}\n sx={{\n opacity: DESCRIPTION.opacity,\n fontSize: px(DESCRIPTION.fontSize),\n wordWrap: 'break-word',\n overflowWrap: 'break-word',\n wordBreak: 'break-word',\n }}\n >\n {description}\n </Box>\n )}\n {children}\n </>\n);\n\nconst AlertCloseButton: React.FC<{ dataTestId?: string; label: string; onClose: () => void }> = ({\n dataTestId,\n label,\n onClose,\n}) => (\n <IconButton\n data-testid={testIdFor(dataTestId, 'close')}\n aria-label={label}\n color=\"inherit\"\n size=\"small\"\n onClick={onClose}\n sx={(theme) => ({\n transition,\n opacity: CLOSE_BUTTON.opacity,\n // Opacity and a wash only: the button used to spin 90deg and grow 1.1,\n // which drew the eye to the dismiss rather than to the message.\n '&:hover': {\n opacity: 1,\n backgroundColor: alpha(theme.palette.action.hover, CLOSE_BUTTON.washAlpha),\n },\n // A REAL ring, on the keyboard-only selector.\n //\n // This used to be `&:focus` setting `outline: 'none'` over a\n // `rgba(0,0,0,0.1)` wash — 1.25:1 against the info surface, and MUI's\n // ButtonBase already sets `outline: 0`, so there was no UA fallback\n // either. It went unnoticed while the ROOT still matched `:focus-within`\n // and drew a ring around the whole alert; moving the root to\n // `:focus-visible` took that away and left this button with no visible\n // focus at all. `Banner`'s dismiss already draws its own outline, so\n // this is also what keeps the two surfaces telling a keyboard user the\n // same thing.\n '&:focus-visible': {\n opacity: 1,\n // `currentColor` is the alert's own ink, inherited through\n // `color=\"inherit\"`, so the ring is drawn in whatever colour was\n // already chosen to be READ on this surface. Measured 11.2:1 on the\n // semantic variants and 5.7:1 on `gradient`.\n //\n // That is a reasoned choice, not a test-backed one, and the difference\n // matters: `alert-contrast.test.tsx` covers the ink of the four\n // semantic variants only — its `glass` case asserts the pane's alpha\n // rather than its ink, and `gradient` it does not render at all. A\n // translucent surface's contrast depends on what sits behind it, which\n // is why that test stops where it does and why this comment does not\n // borrow a guarantee it never made.\n outline: `${FOCUS.ringWidth}px solid currentColor`,\n outlineOffset: `${FOCUS.offset}px`,\n backgroundColor: alpha(theme.palette.action.focus, CLOSE_BUTTON.washAlpha),\n },\n })}\n >\n <Close fontSize=\"inherit\" />\n </IconButton>\n);\n\n/**\n * The dismiss button, or nothing.\n *\n * Reads `closeLabel` straight off the props rather than through the\n * `definedProps` merge, which would widen it to `string | undefined` and hand\n * the button an empty name. The UNION in `AlertProps` guarantees the label\n * wherever `closable` is true — that narrowing is gone inside the component,\n * which is why the fallback below exists and why it is unreachable.\n */\nfunction dismissButton(\n props: AlertProps,\n dataTestId: string | undefined,\n onClose: () => void,\n): React.JSX.Element | null {\n if (!props.closable) return null;\n return <AlertCloseButton dataTestId={dataTestId} label={props.closeLabel} onClose={onClose} />;\n}\n\nexport const Alert = React.forwardRef<HTMLDivElement, AlertProps>((alertProps, ref) => {\n const {\n variant,\n color,\n glow,\n pulse,\n icon,\n showIcon,\n onClose,\n title,\n description,\n children,\n animate,\n role: _role, announce: _announce, // resolved from `alertProps` — see `resolveAnnouncement`\n 'aria-atomic': ariaAtomic,\n ...others\n } = resolveAlertProps(alertProps);\n\n // Every spelling of the test id the shared contract allows, mapped to the\n // one the DOM reads and defaulted to `alert`; the native Alert does the same.\n const dataTestId = resolveTestId(others, 'alert');\n // Then the dismiss union, which `dismissButton` reads off `alertProps` rather\n // than through this destructure — so without this strip it rides `...props`\n // onto the DOM. `ALERT_DEFAULTS` supplies `closable: false`, so that happened\n // on EVERY alert, not only the closable ones.\n const props = withoutAlertOnlyProps(withoutTestIdProps(others));\n\n // Depends on `variant`, so it cannot live in the static defaults above.\n const announcement = resolveAnnouncement(alertProps, variant);\n const [open, setOpen] = React.useState(true);\n const [isClosing, setIsClosing] = React.useState(false);\n\n const handleClose = () => {\n setIsClosing(true);\n window.setTimeout(() => {\n setOpen(false);\n onClose?.();\n }, CLOSE_DELAY_MS);\n };\n\n const severity = toMuiSeverity(variant);\n\n const displayIcon = showIcon ? (\n <Box component=\"span\" data-testid={testIdFor(dataTestId, 'icon')}>\n {icon || getVariantIcon(variant)}\n </Box>\n ) : (\n false\n );\n\n const content = (\n <AlertContent title={title} description={description} dataTestId={dataTestId}>\n {children}\n </AlertContent>\n );\n\n return (\n <Collapse in={open && !isClosing} timeout={COLLAPSE_MS}>\n <StyledAlert\n ref={ref}\n data-testid={dataTestId}\n severity={severity}\n customVariant={variant}\n customColor={color}\n glow={glow}\n pulse={pulse}\n animate={animate}\n icon={displayIcon}\n role={announcement.role}\n aria-live={announcement['aria-live']}\n aria-atomic={ariaAtomic}\n tabIndex={0}\n action={dismissButton(alertProps, dataTestId, handleClose)}\n {...props}\n >\n {content}\n </StyledAlert>\n </Collapse>\n );\n});\n\n/**\n * The props `Alert` OWNS, which must never reach the DOM.\n *\n * `AlertProps` extends MUI's, whose rest-spread is how a host's real HTML\n * attributes get onto the root — so the same spread carries the alert's own\n * configuration unless it is named here. Everything else the component consumes\n * leaves through the destructure above; these two do not, because\n * `dismissButton` reads them off the original props to keep the dismiss union's\n * narrowing intact.\n *\n * Exported so a test can render an alert carrying every name on it and assert\n * none reaches the DOM — the check that would have caught `closable`.\n */\nexport const ALERT_ONLY_PROPS = ['closable', 'closeLabel'] as const;\n\nfunction withoutAlertOnlyProps<P extends object>(rest: P): P {\n const html = { ...rest } as Record<string, unknown>;\n for (const key of ALERT_ONLY_PROPS) delete html[key];\n return html as P;\n}\n\nAlert.displayName = 'Alert';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,WAAW;AAClB,OAAO,cAAc;AACrB,OAAO,gBAAgB;AACvB,OAAO,SAAS;AAChB,OAAO,cAAc;AACrB,OAAO,gBAAgB;AACvB,SAAS,OAAO,cAAc;AAE9B,OAAO,WAAW;AA8KhB,mBAEI,KAFJ;AA7IF,IAAM,aAAa,OAAO,QAAQ,mBAAmB,CAAC,IAAI,YAAY;AAetE,SAAS,cACP,OACA,cACA,MACA,SAC4B;AAU5B,QAAM,MAAM,YAAY,cAAc,MAAM,QAAQ,SAAS,UAAU,YAAY;AACnF,QAAM,aAAa,OACf,OAAO,KAAK,IAAI,MAAM,KAAK,MAAM,MAAM,MAAM,aAAa,MAAM,KAAK,KAAK,CAAC,KAC3E;AACJ,SAAO,CAAC,WACN,CAAC,uBAAuB,MAAM,KAAK,MAAM,CAAC,IAAI,UAAU,EAAE,OAAO,OAAO,EAAE,KAAK,IAAI;AACvF;AAEA,IAAM,cAAc,OAAO,UAAU;AAAA,EACnC,mBAAmB,CAAC,SAClB,CAAC,CAAC,iBAAiB,eAAe,QAAQ,SAAS,SAAS,EAAE,SAAS,IAAc;AACzF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AC,gBAAa,OAAc,aAA0B,YACnD,UACH;AAGF,SACE,oBAAC,YAAS,IAAI,QAAQ,CAAC,WAAW,SAAS,aACzC;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,eAAa;AAAA,MACb;AAAA,MACA,eAAe;AAAA,MACf,aAAa;AAAA,MACb;AAAA,MACA;AAAA,MACA;AAAA,MACA,MAAM;AAAA,MACN,MAAM,aAAa;AAAA,MACnB,aAAW,aAAa,WAAW;AAAA,MACnC,eAAa;AAAA,MACb,UAAU;AAAA,MACV,QAAQ,cAAc,YAAY,YAAY,WAAW;AAAA,MACxD,GAAG;AAAA,MAEH;AAAA;AAAA,EACH,GACF;AAEJ,CAAC;AAeM,IAAM,mBAAmB,CAAC,YAAY,YAAY;AAEzD,SAAS,sBAAwC,MAAY;AAC3D,QAAM,OAAO,EAAE,GAAG,KAAK;AACvB,aAAW,OAAO,iBAAkB,QAAO,KAAK,GAAG;AACnD,SAAO;AACT;AAEA,MAAM,cAAc;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useCardActions
3
- } from "./chunk-SYJMI2NP.js";
3
+ } from "./chunk-VNTOBLIB.js";
4
4
  import {
5
5
  ConfirmActionDialog
6
6
  } from "./chunk-QQS3GQYS.js";
@@ -50,4 +50,4 @@ function useRemoveConfirm({
50
50
  export {
51
51
  useRemoveConfirm
52
52
  };
53
- //# sourceMappingURL=chunk-KM5O4ICK.js.map
53
+ //# sourceMappingURL=chunk-7LCXGJN5.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VARIANT_ICON
3
- } from "./chunk-N3QUEBNS.js";
3
+ } from "./chunk-L7VH6IMR.js";
4
4
  import {
5
5
  ACTION_SLOT,
6
6
  ALERT_EASING,
@@ -266,4 +266,4 @@ export {
266
266
  alertVariantStyles,
267
267
  alertEmphasisStyles
268
268
  };
269
- //# sourceMappingURL=chunk-57Z2ND3N.js.map
269
+ //# sourceMappingURL=chunk-CXLAJZSE.js.map
@@ -14,6 +14,17 @@ var definedProps = (props) => Object.fromEntries(
14
14
  );
15
15
  var resolveAlertProps = (props) => ({ ...ALERT_DEFAULTS, ...definedProps(props) });
16
16
  var defaultAriaLive = (variant) => variant === "danger" ? "assertive" : "polite";
17
+ var ANNOUNCE_ROLE = {
18
+ assertive: "alert",
19
+ polite: "status"
20
+ };
21
+ var resolveAnnouncement = (props, variant) => {
22
+ const announce = props.announce;
23
+ return {
24
+ role: props.role ?? (announce === void 0 ? ALERT_DEFAULTS.role : ANNOUNCE_ROLE[announce]),
25
+ "aria-live": props["aria-live"] ?? announce ?? defaultAriaLive(variant)
26
+ };
27
+ };
17
28
  var testIdFor = (base, suffix) => base ? `${base}-${suffix}` : `alert-${suffix}`;
18
29
  var VARIANT_ICON = {
19
30
  info: "Info",
@@ -26,7 +37,9 @@ export {
26
37
  ALERT_DEFAULTS,
27
38
  resolveAlertProps,
28
39
  defaultAriaLive,
40
+ ANNOUNCE_ROLE,
41
+ resolveAnnouncement,
29
42
  testIdFor,
30
43
  VARIANT_ICON
31
44
  };
32
- //# sourceMappingURL=chunk-N3QUEBNS.js.map
45
+ //# sourceMappingURL=chunk-L7VH6IMR.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/data-display/Alert/Alert.helpers.ts"],"sourcesContent":["import type { AlertBaseFields, AlertVariant } from './Alert.base';\nimport type { IconName } from '../../../icons/Icon.types';\n\ntype AlertDefaultedKeys = 'variant' | 'glow' | 'pulse' | 'showIcon' | 'animate' | 'role' | 'aria-atomic';\n\nexport const ALERT_DEFAULTS: Required<Pick<AlertBaseFields, AlertDefaultedKeys>> & { closable: false } = {\n variant: 'info',\n glow: false,\n pulse: false,\n showIcon: true,\n closable: false,\n animate: true,\n role: 'alert',\n 'aria-atomic': 'true',\n};\n\n/**\n * Generic over the renderer's own props: the web and the native `Alert` pass\n * different extras through, and both come back out untouched.\n */\nexport type ResolvedAlertProps<P extends AlertBaseFields> = P &\n Required<Pick<AlertBaseFields, AlertDefaultedKeys>>;\n\n// Strips explicitly-undefined props before the merge so `prop={undefined}` still\n// falls back to the default, the way a destructuring default would.\nconst definedProps = <P extends AlertBaseFields>(props: P): Partial<P> =>\n Object.fromEntries(\n Object.entries(props).filter(([, value]) => value !== undefined),\n ) as Partial<P>;\n\n// Through `unknown`: `closable: false` in the defaults belongs to the dismiss\n// union rather than to `AlertBaseFields`, so TypeScript cannot see the merge as\n// comparable to `P` although every field of `P` survives it untouched.\nexport const resolveAlertProps = <P extends AlertBaseFields>(props: P): ResolvedAlertProps<P> =>\n ({ ...ALERT_DEFAULTS, ...definedProps(props) }) as unknown as ResolvedAlertProps<P>;\n\n/** `danger` announces itself; everything else waits its turn. */\nexport const defaultAriaLive = (variant: AlertVariant): 'polite' | 'assertive' =>\n variant === 'danger' ? 'assertive' : 'polite';\n\n/**\n * The ARIA role each `announce` level is spelled with.\n *\n * Both roles carry an IMPLICIT live setting, and that implicit one is what\n * assistive tech acts on — `alert` is assertive, `status` is polite. Pairing\n * them here is what stops `role` and `aria-live` from contradicting each\n * other, which they do by default: every alert is `role=\"alert\"` regardless of\n * variant, so an `info` alert asks to be polite in one attribute and to\n * interrupt in the other.\n */\nexport const ANNOUNCE_ROLE: Record<NonNullable<AlertBaseFields['announce']>, string> = {\n assertive: 'alert',\n polite: 'status',\n};\n\n/**\n * The two attributes that decide whether an alert interrupts, resolved TOGETHER.\n *\n * Both renderers therefore let `role` and `announce` leave their destructure\n * unused (`_role`, `_announce`) and call this instead — the first because the\n * defaults have already answered it, the second because it must never reach\n * the DOM.\n *\n * Reads the caller's own props rather than the defaulted ones, because the\n * whole question is which of them the caller actually spelled:\n * {@link ALERT_DEFAULTS} supplies `role: 'alert'` for everything, so after the\n * merge there is no longer any difference between an alert that asked to\n * interrupt and one that never mentioned it.\n *\n * Precedence, most specific first — an explicit `role` or `aria-live` beats\n * `announce`, so a call site that already spells either by hand is untouched:\n *\n * 1. `role` / `aria-live` as given;\n * 2. {@link AlertBaseFields.announce}, which supplies both;\n * 3. today's behaviour — `ALERT_DEFAULTS.role` and {@link defaultAriaLive}.\n *\n * With none of the three named, the result is byte-for-byte what it was before\n * `announce` existed.\n */\nexport const resolveAnnouncement = (\n props: Pick<AlertBaseFields, 'announce' | 'role' | 'aria-live'>,\n variant: AlertVariant,\n): { role: string; 'aria-live': 'polite' | 'assertive' | 'off' } => {\n const announce = props.announce;\n return {\n role: props.role ?? (announce === undefined ? ALERT_DEFAULTS.role : ANNOUNCE_ROLE[announce]),\n 'aria-live': props['aria-live'] ?? announce ?? defaultAriaLive(variant),\n };\n};\n\nexport const testIdFor = (base: string | undefined, suffix: string): string =>\n base ? `${base}-${suffix}` : `alert-${suffix}`;\n\n/**\n * The glyph each semantic variant carries, by the shared icon set's name.\n * `glass` and `gradient` carry none of their own: the web renders an empty\n * icon slot for them unless the caller passes an `icon`, and so does native.\n */\nexport const VARIANT_ICON: Partial<Record<AlertVariant, IconName>> = {\n info: 'Info',\n success: 'CheckCircle',\n warning: 'Warning',\n danger: 'Error',\n};\n"],"mappings":";AAKO,IAAM,iBAA4F;AAAA,EACvG,SAAS;AAAA,EACT,MAAM;AAAA,EACN,OAAO;AAAA,EACP,UAAU;AAAA,EACV,UAAU;AAAA,EACV,SAAS;AAAA,EACT,MAAM;AAAA,EACN,eAAe;AACjB;AAWA,IAAM,eAAe,CAA4B,UAC/C,OAAO;AAAA,EACL,OAAO,QAAQ,KAAK,EAAE,OAAO,CAAC,CAAC,EAAE,KAAK,MAAM,UAAU,MAAS;AACjE;AAKK,IAAM,oBAAoB,CAA4B,WAC1D,EAAE,GAAG,gBAAgB,GAAG,aAAa,KAAK,EAAE;AAGxC,IAAM,kBAAkB,CAAC,YAC9B,YAAY,WAAW,cAAc;AAYhC,IAAM,gBAA0E;AAAA,EACrF,WAAW;AAAA,EACX,QAAQ;AACV;AA0BO,IAAM,sBAAsB,CACjC,OACA,YACkE;AAClE,QAAM,WAAW,MAAM;AACvB,SAAO;AAAA,IACL,MAAM,MAAM,SAAS,aAAa,SAAY,eAAe,OAAO,cAAc,QAAQ;AAAA,IAC1F,aAAa,MAAM,WAAW,KAAK,YAAY,gBAAgB,OAAO;AAAA,EACxE;AACF;AAEO,IAAM,YAAY,CAAC,MAA0B,WAClD,OAAO,GAAG,IAAI,IAAI,MAAM,KAAK,SAAS,MAAM;AAOvC,IAAM,eAAwD;AAAA,EACnE,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AAAA,EACT,QAAQ;AACV;","names":[]}
@@ -10,7 +10,7 @@ import {
10
10
  import {
11
11
  ViewDialogs,
12
12
  ViewMutationErrorAlert
13
- } from "./chunk-6ZY5XU4J.js";
13
+ } from "./chunk-UIZH4DAE.js";
14
14
  import {
15
15
  useSavedViewsController
16
16
  } from "./chunk-HR7YTBR7.js";
@@ -178,4 +178,4 @@ function renderViewDialogs(ctl, fields, columns, views, testIdPrefix, onSaved) {
178
178
  export {
179
179
  DataViewsTableBase
180
180
  };
181
- //# sourceMappingURL=chunk-WM6Y2S6W.js.map
181
+ //# sourceMappingURL=chunk-TWY5FOBY.js.map
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk-EFEZWG4C.js";
13
13
  import {
14
14
  Alert
15
- } from "./chunk-WNMYWQ7D.js";
15
+ } from "./chunk-4Y6SPFKW.js";
16
16
 
17
17
  // src/components/data-display/DataViews/data-views-table-parts.tsx
18
18
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -121,4 +121,4 @@ export {
121
121
  ViewsMenuSlot,
122
122
  ViewDialogs
123
123
  };
124
- //# sourceMappingURL=chunk-6ZY5XU4J.js.map
124
+ //# sourceMappingURL=chunk-UIZH4DAE.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Alert
3
- } from "./chunk-WNMYWQ7D.js";
3
+ } from "./chunk-4Y6SPFKW.js";
4
4
 
5
5
  // src/components/data-display/CardKit/card-actions-context.tsx
6
6
  import { createContext, useCallback, useContext, useState } from "react";
@@ -54,4 +54,4 @@ export {
54
54
  CardActionsProvider,
55
55
  useCardActions
56
56
  };
57
- //# sourceMappingURL=chunk-SYJMI2NP.js.map
57
+ //# sourceMappingURL=chunk-VNTOBLIB.js.map
@@ -1,9 +1,9 @@
1
1
  import "../chunk-NUGT7LMR.js";
2
2
  import {
3
3
  Alert
4
- } from "../chunk-WNMYWQ7D.js";
5
- import "../chunk-57Z2ND3N.js";
6
- import "../chunk-N3QUEBNS.js";
4
+ } from "../chunk-4Y6SPFKW.js";
5
+ import "../chunk-CXLAJZSE.js";
6
+ import "../chunk-L7VH6IMR.js";
7
7
  import "../chunk-TXKZEKJN.js";
8
8
  import "../chunk-TYJR4GOF.js";
9
9
  import "../chunk-NQN5Z36J.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useRemoveConfirm
3
- } from "../chunk-KM5O4ICK.js";
3
+ } from "../chunk-7LCXGJN5.js";
4
4
  import {
5
5
  rowActionsToMenuItems
6
6
  } from "../chunk-ZBXG6RVJ.js";
@@ -14,7 +14,7 @@ import {
14
14
  import {
15
15
  CardActionsProvider,
16
16
  useCardActions
17
- } from "../chunk-SYJMI2NP.js";
17
+ } from "../chunk-VNTOBLIB.js";
18
18
  import {
19
19
  CardKebab
20
20
  } from "../chunk-MNXVXW4T.js";
@@ -30,9 +30,9 @@ import "../chunk-3P4THDBM.js";
30
30
  import "../chunk-QQS3GQYS.js";
31
31
  import "../chunk-EMYESBIT.js";
32
32
  import "../chunk-NUGT7LMR.js";
33
- import "../chunk-WNMYWQ7D.js";
34
- import "../chunk-57Z2ND3N.js";
35
- import "../chunk-N3QUEBNS.js";
33
+ import "../chunk-4Y6SPFKW.js";
34
+ import "../chunk-CXLAJZSE.js";
35
+ import "../chunk-L7VH6IMR.js";
36
36
  import "../chunk-2IBFEHIX.js";
37
37
  import "../chunk-BWB2MVWP.js";
38
38
  import "../chunk-TXKZEKJN.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "../chunk-JWW2Z3RH.js";
4
4
  import {
5
5
  DataViewsTableBase
6
- } from "../chunk-WM6Y2S6W.js";
6
+ } from "../chunk-TWY5FOBY.js";
7
7
  import "../chunk-ZZMZF7PZ.js";
8
8
  import {
9
9
  DataViewsGrid
@@ -67,7 +67,7 @@ import {
67
67
  cardScaleForZoom
68
68
  } from "../chunk-ZPIMPOHV.js";
69
69
  import "../chunk-OE2ZVL67.js";
70
- import "../chunk-6ZY5XU4J.js";
70
+ import "../chunk-UIZH4DAE.js";
71
71
  import "../chunk-7KWBGMQC.js";
72
72
  import "../chunk-2GI7ANEL.js";
73
73
  import "../chunk-5M4TYFR3.js";
@@ -184,9 +184,9 @@ import "../chunk-G3E66C6J.js";
184
184
  import "../chunk-SNCSGLJ6.js";
185
185
  import "../chunk-M4LQRQFL.js";
186
186
  import "../chunk-NUGT7LMR.js";
187
- import "../chunk-WNMYWQ7D.js";
188
- import "../chunk-57Z2ND3N.js";
189
- import "../chunk-N3QUEBNS.js";
187
+ import "../chunk-4Y6SPFKW.js";
188
+ import "../chunk-CXLAJZSE.js";
189
+ import "../chunk-L7VH6IMR.js";
190
190
  import "../chunk-2IBFEHIX.js";
191
191
  import "../chunk-BWB2MVWP.js";
192
192
  import "../chunk-HI2OFZSZ.js";
@@ -53,6 +53,17 @@ var definedProps = (props) => Object.fromEntries(
53
53
  );
54
54
  var resolveAlertProps = (props) => ({ ...ALERT_DEFAULTS, ...definedProps(props) });
55
55
  var defaultAriaLive = (variant) => variant === "danger" ? "assertive" : "polite";
56
+ var ANNOUNCE_ROLE = {
57
+ assertive: "alert",
58
+ polite: "status"
59
+ };
60
+ var resolveAnnouncement = (props, variant) => {
61
+ const announce = props.announce;
62
+ return {
63
+ role: props.role ?? (announce === void 0 ? ALERT_DEFAULTS.role : ANNOUNCE_ROLE[announce]),
64
+ "aria-live": props["aria-live"] ?? announce ?? defaultAriaLive(variant)
65
+ };
66
+ };
56
67
  var testIdFor = (base, suffix) => base ? `${base}-${suffix}` : `alert-${suffix}`;
57
68
  var VARIANT_ICON = {
58
69
  info: "Info",
@@ -327,7 +338,10 @@ var Alert = React.forwardRef((alertProps, ref) => {
327
338
  description,
328
339
  children,
329
340
  animate,
330
- role,
341
+ // `role`, `announce` and `aria-live` all leave here and are resolved
342
+ // TOGETHER below, off `alertProps` — see `resolveAnnouncement`.
343
+ role: _role,
344
+ announce: _announce,
331
345
  "aria-atomic": ariaAtomic,
332
346
  "aria-live": _ariaLive,
333
347
  closable,
@@ -341,13 +355,14 @@ var Alert = React.forwardRef((alertProps, ref) => {
341
355
  const look = alertLook(theme, { variant, color, glow, pulse });
342
356
  const fadeIn = useFadeIn(animate);
343
357
  const dismiss = useDismiss(onClose);
358
+ const announcement = resolveAnnouncement(alertProps, variant);
344
359
  if (dismiss.gone) return null;
345
360
  return /* @__PURE__ */ jsx(Collapse, { open: dismiss.open, onCollapsed: dismiss.onCollapsed, children: /* @__PURE__ */ jsxs(
346
361
  Animated.View,
347
362
  {
348
363
  ref,
349
- role,
350
- "aria-live": alertProps["aria-live"] ?? defaultAriaLive(variant),
364
+ role: announcement.role,
365
+ "aria-live": announcement["aria-live"],
351
366
  ...webAria({ "aria-atomic": ariaAtomic }),
352
367
  tabIndex: 0,
353
368
  testID: testId,