@12-apps/ui 6.76.0 → 6.77.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 (90) hide show
  1. package/NATIVE.md +1 -1
  2. package/dist/_internal/components/data-display/Alert/Alert.content.js +20 -0
  3. package/dist/_internal/components/data-display/Alert/Alert.content.js.map +1 -0
  4. package/dist/_internal/components/data-display/Alert/Alert.js +5 -3
  5. package/dist/_internal/components/data-display/Alert/Alert.metrics.js +3 -1
  6. package/dist/_internal/components/data-display/Alert/Alert.placement.js +8 -0
  7. package/dist/_internal/components/data-display/Alert/Alert.placement.js.map +1 -0
  8. package/dist/_internal/components/data-display/Alert/Alert.styles.js +2 -2
  9. package/dist/_internal/components/data-display/Banner/Banner.js +3 -3
  10. package/dist/_internal/components/data-display/Banner/Banner.styles.js +2 -2
  11. package/dist/_internal/components/data-display/CardKit/card-actions-context.js +6 -4
  12. package/dist/_internal/components/data-display/CardKit/use-remove-confirm.js +7 -5
  13. package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +7 -5
  14. package/dist/_internal/components/data-display/DataViews/data-views-table-parts.js +6 -4
  15. package/dist/_internal/components/data-display/index.js +7 -5
  16. package/dist/_internal/components/feedback/NotificationStatusNotice/NotificationStatusNotice.js +6 -4
  17. package/dist/_internal/components/feedback/index.js +6 -4
  18. package/dist/_internal/components/index.js +8 -6
  19. package/dist/_internal/components/layout/SettingsLayout/SettingsLayout.items.js +1 -1
  20. package/dist/_internal/components/layout/SettingsLayout/SettingsLayout.js +3 -3
  21. package/dist/_internal/components/layout/SettingsLayout/SettingsLayout.rail.js +2 -2
  22. package/dist/{chunk-3VLVLZ6W.js → chunk-B34WHRKH.js} +2 -2
  23. package/dist/{chunk-JYAXTRNH.js → chunk-CCJJTLF7.js} +2 -2
  24. package/dist/{chunk-52CLMR47.js → chunk-ENXGWNCX.js} +2 -2
  25. package/dist/chunk-IVI574Y5.js +73 -0
  26. package/dist/chunk-IVI574Y5.js.map +1 -0
  27. package/dist/{chunk-3LHZCVGM.js → chunk-JNVUB2D4.js} +3 -1
  28. package/dist/chunk-JNVUB2D4.js.map +1 -0
  29. package/dist/{chunk-REEV7CLC.js → chunk-QDG6V7OC.js} +2 -2
  30. package/dist/chunk-QXUXO22M.js +9 -0
  31. package/dist/chunk-QXUXO22M.js.map +1 -0
  32. package/dist/{chunk-44AXT2SN.js → chunk-QZX43FIC.js} +2 -2
  33. package/dist/{chunk-4BLVVMY7.js → chunk-SL56MOKE.js} +27 -6
  34. package/dist/chunk-SL56MOKE.js.map +1 -0
  35. package/dist/{chunk-6KM3TL4Q.js → chunk-SO5OU2ZV.js} +7 -5
  36. package/dist/chunk-SO5OU2ZV.js.map +1 -0
  37. package/dist/{chunk-ZBOGZLX3.js → chunk-T2KONJ45.js} +3 -3
  38. package/dist/{chunk-SWQXAUUG.js → chunk-TJO4CBYT.js} +11 -3
  39. package/dist/{chunk-SWQXAUUG.js.map → chunk-TJO4CBYT.js.map} +1 -1
  40. package/dist/{chunk-LY7PBZ3Z.js → chunk-UFNXYOHZ.js} +2 -2
  41. package/dist/{chunk-ERI6JC4M.js → chunk-X2SJJZFH.js} +2 -2
  42. package/dist/{chunk-DQJFCVXW.js → chunk-ZSCKXOKE.js} +32 -47
  43. package/dist/chunk-ZSCKXOKE.js.map +1 -0
  44. package/dist/data-display/Alert.js +5 -3
  45. package/dist/data-display/Banner.js +3 -3
  46. package/dist/data-display/CardKit.js +7 -5
  47. package/dist/data-display/DataViews.js +7 -5
  48. package/dist/feedback/NotificationStatusNotice.js +6 -4
  49. package/dist/layout/SettingsLayout.js +3 -3
  50. package/dist/native/data-display/Alert.js.map +1 -1
  51. package/dist/types/components/data-display/Alert/Alert.content.d.ts +18 -0
  52. package/dist/types/components/data-display/Alert/Alert.content.d.ts.map +1 -0
  53. package/dist/types/components/data-display/Alert/Alert.d.ts.map +1 -1
  54. package/dist/types/components/data-display/Alert/Alert.metrics.d.ts +4 -0
  55. package/dist/types/components/data-display/Alert/Alert.metrics.d.ts.map +1 -1
  56. package/dist/types/components/data-display/Alert/Alert.placement.d.ts +37 -0
  57. package/dist/types/components/data-display/Alert/Alert.placement.d.ts.map +1 -0
  58. package/dist/types/components/data-display/Alert/Alert.types.d.ts +8 -0
  59. package/dist/types/components/data-display/Alert/Alert.types.d.ts.map +1 -1
  60. package/dist/types/components/data-display/Alert/index.d.ts +1 -1
  61. package/dist/types/components/data-display/Alert/index.d.ts.map +1 -1
  62. package/dist/types/components/layout/SettingsLayout/SettingsLayout.d.ts.map +1 -1
  63. package/dist/types/components/layout/SettingsLayout/SettingsLayout.items.d.ts +3 -1
  64. package/dist/types/components/layout/SettingsLayout/SettingsLayout.items.d.ts.map +1 -1
  65. package/dist/types/components/layout/SettingsLayout/SettingsLayout.rail.d.ts.map +1 -1
  66. package/dist/types-native/components/data-display/Alert/Alert.metrics.d.ts +4 -0
  67. package/dist/types-native/components/data-display/Alert/Alert.metrics.d.ts.map +1 -1
  68. package/package.json +1 -1
  69. package/src/components/data-display/Alert/Alert.content.tsx +79 -0
  70. package/src/components/data-display/Alert/Alert.md +19 -0
  71. package/src/components/data-display/Alert/Alert.metrics.ts +2 -0
  72. package/src/components/data-display/Alert/Alert.placement.ts +45 -0
  73. package/src/components/data-display/Alert/Alert.tsx +41 -61
  74. package/src/components/data-display/Alert/Alert.types.ts +10 -1
  75. package/src/components/data-display/Alert/index.ts +7 -1
  76. package/src/components/layout/SettingsLayout/SettingsLayout.items.tsx +38 -3
  77. package/src/components/layout/SettingsLayout/SettingsLayout.rail.tsx +6 -1
  78. package/src/components/layout/SettingsLayout/SettingsLayout.tsx +9 -3
  79. package/dist/chunk-3LHZCVGM.js.map +0 -1
  80. package/dist/chunk-4BLVVMY7.js.map +0 -1
  81. package/dist/chunk-6KM3TL4Q.js.map +0 -1
  82. package/dist/chunk-DQJFCVXW.js.map +0 -1
  83. /package/dist/{chunk-3VLVLZ6W.js.map → chunk-B34WHRKH.js.map} +0 -0
  84. /package/dist/{chunk-JYAXTRNH.js.map → chunk-CCJJTLF7.js.map} +0 -0
  85. /package/dist/{chunk-52CLMR47.js.map → chunk-ENXGWNCX.js.map} +0 -0
  86. /package/dist/{chunk-REEV7CLC.js.map → chunk-QDG6V7OC.js.map} +0 -0
  87. /package/dist/{chunk-44AXT2SN.js.map → chunk-QZX43FIC.js.map} +0 -0
  88. /package/dist/{chunk-ZBOGZLX3.js.map → chunk-T2KONJ45.js.map} +0 -0
  89. /package/dist/{chunk-LY7PBZ3Z.js.map → chunk-UFNXYOHZ.js.map} +0 -0
  90. /package/dist/{chunk-ERI6JC4M.js.map → chunk-X2SJJZFH.js.map} +0 -0
@@ -3,7 +3,7 @@ import {
3
3
  } from "../chunk-MBMZNSBP.js";
4
4
  import {
5
5
  DataViewsTableBase
6
- } from "../chunk-52CLMR47.js";
6
+ } from "../chunk-ENXGWNCX.js";
7
7
  import "../chunk-VWVA74JY.js";
8
8
  import {
9
9
  DataViewsGrid
@@ -50,7 +50,7 @@ import "../chunk-FJ3UZ4RC.js";
50
50
  import "../chunk-7D7CJRL7.js";
51
51
  import "../chunk-GCZJH4XL.js";
52
52
  import "../chunk-CBOB5AV6.js";
53
- import "../chunk-ERI6JC4M.js";
53
+ import "../chunk-X2SJJZFH.js";
54
54
  import "../chunk-BF3SGOWT.js";
55
55
  import "../chunk-LBEZ7A3F.js";
56
56
  import "../chunk-5M4TYFR3.js";
@@ -197,15 +197,17 @@ import "../chunk-G3E66C6J.js";
197
197
  import "../chunk-SNCSGLJ6.js";
198
198
  import "../chunk-UMICTXMP.js";
199
199
  import "../chunk-NUGT7LMR.js";
200
- import "../chunk-DQJFCVXW.js";
201
- import "../chunk-JYAXTRNH.js";
200
+ import "../chunk-ZSCKXOKE.js";
201
+ import "../chunk-CCJJTLF7.js";
202
+ import "../chunk-QXUXO22M.js";
203
+ import "../chunk-IVI574Y5.js";
202
204
  import "../chunk-L7VH6IMR.js";
203
205
  import "../chunk-2IBFEHIX.js";
204
206
  import "../chunk-RZCXYKY4.js";
205
207
  import "../chunk-BGTG7G54.js";
206
208
  import "../chunk-3UIDKLML.js";
207
209
  import "../chunk-PYC4CWCQ.js";
208
- import "../chunk-3LHZCVGM.js";
210
+ import "../chunk-JNVUB2D4.js";
209
211
  import "../chunk-6DPAWXZ3.js";
210
212
  import "../chunk-WEBEOBN5.js";
211
213
  import "../chunk-VUHLNYAE.js";
@@ -1,16 +1,18 @@
1
1
  import "../chunk-JQRKXMSH.js";
2
2
  import {
3
3
  NotificationStatusNotice
4
- } from "../chunk-REEV7CLC.js";
4
+ } from "../chunk-QDG6V7OC.js";
5
5
  import "../chunk-55FFONIV.js";
6
6
  import {
7
7
  detectNotificationBrowser,
8
8
  notificationUnblockSteps
9
9
  } from "../chunk-L7BRU4UF.js";
10
- import "../chunk-DQJFCVXW.js";
11
- import "../chunk-JYAXTRNH.js";
10
+ import "../chunk-ZSCKXOKE.js";
11
+ import "../chunk-CCJJTLF7.js";
12
+ import "../chunk-QXUXO22M.js";
13
+ import "../chunk-IVI574Y5.js";
12
14
  import "../chunk-L7VH6IMR.js";
13
- import "../chunk-3LHZCVGM.js";
15
+ import "../chunk-JNVUB2D4.js";
14
16
  import "../chunk-364NH2NY.js";
15
17
  import "../chunk-PPEHBI5O.js";
16
18
  import "../chunk-G2FUZALJ.js";
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  SettingsLayout
3
- } from "../chunk-6KM3TL4Q.js";
3
+ } from "../chunk-SO5OU2ZV.js";
4
4
  import "../chunk-BXC6GRLE.js";
5
5
  import "../chunk-LY5I3ZSV.js";
6
6
  import {
7
7
  SettingsSectionChips
8
8
  } from "../chunk-GBVNY2LG.js";
9
9
  import "../chunk-AJUSBPWG.js";
10
- import "../chunk-SWQXAUUG.js";
11
- import "../chunk-4BLVVMY7.js";
10
+ import "../chunk-TJO4CBYT.js";
11
+ import "../chunk-SL56MOKE.js";
12
12
  import {
13
13
  SettingsStatusMarker
14
14
  } from "../chunk-7Y2VWMGS.js";
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/data-display/Alert/Alert.native.tsx","../../../src/components/data-display/Alert/Alert.helpers.ts","../../../src/components/data-display/Alert/Alert.metrics.ts","../../../src/components/data-display/Alert/Alert.look.native.ts"],"sourcesContent":["import * as React from 'react';\nimport {\n Animated,\n Easing,\n type LayoutChangeEvent,\n Platform,\n Pressable,\n type Role,\n StyleSheet,\n Text as RNText,\n View,\n type ViewStyle,\n} from 'react-native';\n\nimport { resolveAlertProps, resolveAnnouncement, testIdFor, VARIANT_ICON } from './Alert.helpers';\nimport {\n actionSlotStyle,\n alertLook,\n closeButtonStyle,\n descriptionStyle,\n iconSlotStyle,\n messageSlotStyle,\n messageTextStyle,\n titleStyle,\n} from './Alert.look.native';\nimport { CLOSE_BUTTON, CLOSE_DELAY_MS, COLLAPSE_MS, FADE_IN, ICON_SLOT, ICON_SPIN, PULSE } from './Alert.metrics';\nimport type { AlertProps, AlertVariant } from './Alert.types.native';\nimport { Icon } from '../../../icons/Icon.native';\nimport { webAria } from '../../../platform/aria';\nimport { renderTextChildren } from '../../../platform/text-children';\nimport { resolveTestId, withoutTestIdProps } from '../../../platform/test-id';\nimport { useUiTheme } from '../../../provider/use-ui-theme.native';\n\ntype AnimatedStyle = Animated.WithAnimatedValue<ViewStyle>;\nconst nativeDriver = Platform.OS !== 'web';\n\n/** A 0→1 progress that starts on mount when `animate` is set, else sits at 1. */\nfunction useProgress(animate: boolean, duration: number): Animated.Value {\n const progress = React.useRef(new Animated.Value(animate ? 0 : 1)).current;\n React.useEffect(() => {\n if (!animate) return undefined;\n const timing = Animated.timing(progress, { toValue: 1, duration, easing: Easing.out(Easing.ease), useNativeDriver: nativeDriver });\n timing.start();\n return () => timing.stop();\n }, [animate, duration, progress]);\n return progress;\n}\n\n/** The web's `fadeInScale` keyframes: in from 0 opacity, 0.95 scale and 10px above, over 300ms. */\nfunction useFadeIn(animate: boolean): AnimatedStyle | undefined {\n const progress = useProgress(animate, FADE_IN.ms);\n if (!animate) return undefined;\n return {\n opacity: progress,\n transform: [\n { scale: progress.interpolate({ inputRange: [0, 1], outputRange: [FADE_IN.scale, 1] }) },\n { translateY: progress.interpolate({ inputRange: [0, 1], outputRange: [-FADE_IN.lift, 0] }) },\n ],\n };\n}\n\n/** The web's `iconRotate` keyframes: one full turn, 0.8 → 1.1 → 1, over 600ms. */\nfunction useIconSpin(animate: boolean): AnimatedStyle | undefined {\n const progress = useProgress(animate, ICON_SPIN.ms);\n if (!animate) return undefined;\n return {\n transform: [\n { rotate: progress.interpolate({ inputRange: [0, 1], outputRange: ['0deg', '360deg'] }) },\n { scale: progress.interpolate({ inputRange: [0, 0.5, 1], outputRange: [ICON_SPIN.from, ICON_SPIN.mid, 1] }) },\n ],\n };\n}\n\n/** The web's `::after` pulse: a wash of the hue over the card, fading out every two seconds, behind the words. */\nfunction Pulse({ color, radius, testID }: { color: string; radius: number; testID: string }): React.JSX.Element {\n const progress = React.useRef(new Animated.Value(0)).current;\n React.useEffect(() => {\n const loop = Animated.loop(\n Animated.timing(progress, { toValue: 1, duration: PULSE.ms, easing: Easing.linear, useNativeDriver: nativeDriver }),\n );\n loop.start();\n return () => loop.stop();\n }, [progress]);\n return (\n <Animated.View\n testID={testID}\n aria-hidden\n style={[\n StyleSheet.absoluteFill,\n {\n pointerEvents: 'none',\n borderRadius: radius,\n backgroundColor: color,\n opacity: progress.interpolate({ inputRange: [0, 0.7, 1], outputRange: [PULSE.alpha, 0, 0] }),\n },\n ]}\n />\n );\n}\n\n/**\n * MUI's `Collapse`: open, it is a plain wrapper with its overflow visible (so\n * a glow can escape); closing, it clips and shrinks over 300ms, then says so.\n */\nfunction Collapse({ open, onCollapsed, children }: { open: boolean; onCollapsed: () => void; children: React.ReactNode }): React.JSX.Element {\n const [height, setHeight] = React.useState<number | null>(null);\n const progress = React.useRef(new Animated.Value(1)).current;\n React.useEffect(() => {\n if (open) return undefined;\n const timing = Animated.timing(progress, { toValue: 0, duration: COLLAPSE_MS, easing: Easing.inOut(Easing.ease), useNativeDriver: false });\n timing.start(({ finished }) => {\n if (finished) onCollapsed();\n });\n return () => timing.stop();\n }, [open, onCollapsed, progress]);\n const onLayout = (event: LayoutChangeEvent): void => {\n if (open) setHeight(event.nativeEvent.layout.height);\n };\n const shrink: AnimatedStyle = height == null ? {} : { maxHeight: progress.interpolate({ inputRange: [0, 1], outputRange: [0, height] }) };\n return (\n <Animated.View style={[{ overflow: open ? 'visible' : 'hidden', opacity: progress }, shrink]}>\n <View onLayout={onLayout}>{children}</View>\n </Animated.View>\n );\n}\n\ninterface IconSlotProps {\n variant: AlertVariant;\n icon: React.ReactNode;\n color: string;\n animate: boolean;\n testID: string;\n}\n\n/** The icon slot; `glass` and `gradient` have no glyph of their own, so theirs is empty unless an `icon` is given — as on the web. */\nfunction IconSlot({ variant, icon, color, animate, testID }: IconSlotProps): React.JSX.Element {\n const theme = useUiTheme();\n const spin = useIconSpin(animate);\n const glyph = VARIANT_ICON[variant];\n return (\n <Animated.View testID={testID} style={[iconSlotStyle(theme), spin]}>\n {icon || (glyph ? <Icon name={glyph} size={ICON_SLOT.size} color={color} /> : null)}\n </Animated.View>\n );\n}\n\nfunction CloseButton({ label, ink, onPress, testID }: { label: string | undefined; ink: string; onPress: () => void; testID: string }): React.JSX.Element {\n const theme = useUiTheme();\n return (\n <Pressable role=\"button\" aria-label={label} testID={testID} onPress={onPress} style={({ pressed }) => closeButtonStyle(theme, pressed)}>\n <Icon name=\"Close\" size={CLOSE_BUTTON.iconSize} color={ink} />\n </Pressable>\n );\n}\n\ninterface ContentProps {\n title?: string;\n description?: string;\n children?: React.ReactNode;\n ink: string;\n testId: string;\n}\n\nfunction AlertContent({ title, description, children, ink, testId }: ContentProps): React.JSX.Element {\n const theme = useUiTheme();\n return (\n <View style={messageSlotStyle(theme)}>\n {title ? (\n <RNText testID={testIdFor(testId, 'title')} style={titleStyle(theme, ink, Boolean(description))}>\n {title}\n </RNText>\n ) : null}\n {description ? (\n <RNText testID={testIdFor(testId, 'message')} style={descriptionStyle(theme, ink)}>\n {description}\n </RNText>\n ) : null}\n {renderTextChildren(children, messageTextStyle(theme, ink))}\n </View>\n );\n}\n\n/** The dismiss sequence the web runs: mark closing, fire `onClose` 200ms in, stay until the collapse has run. */\nfunction useDismiss(onClose: (() => void) | undefined): { open: boolean; gone: boolean; close: () => void; onCollapsed: () => void } {\n const [closing, setClosing] = React.useState(false);\n const [gone, setGone] = React.useState(false);\n const timer = React.useRef<ReturnType<typeof setTimeout> | null>(null);\n React.useEffect(() => () => {\n if (timer.current) clearTimeout(timer.current);\n }, []);\n const close = (): void => {\n setClosing(true);\n timer.current = setTimeout(() => onClose?.(), CLOSE_DELAY_MS);\n };\n const onCollapsed = React.useCallback(() => setGone(true), []);\n return { open: !closing, gone, close, onCollapsed };\n}\n\nexport const Alert = React.forwardRef<View, AlertProps>((alertProps, ref) => {\n const {\n variant, color, glow, pulse, icon, showIcon, onClose, title, description, children, animate,\n // `role`, `announce` and `aria-live` all leave here and are resolved\n // TOGETHER below, off `alertProps` — see `resolveAnnouncement`.\n role: _role, announce: _announce,\n 'aria-atomic': ariaAtomic, 'aria-live': _ariaLive, closable, closeLabel, style, ...others\n } = resolveAlertProps(alertProps);\n const theme = useUiTheme();\n const testId = resolveTestId(others, 'alert') as string;\n const rest = withoutTestIdProps(others);\n const look = alertLook(theme, { variant, color, glow, pulse });\n const fadeIn = useFadeIn(animate);\n const dismiss = useDismiss(onClose);\n const announcement = resolveAnnouncement(alertProps, variant);\n\n if (dismiss.gone) return null;\n return (\n <Collapse open={dismiss.open} onCollapsed={dismiss.onCollapsed}>\n <Animated.View\n ref={ref}\n role={announcement.role as Role}\n aria-live={announcement['aria-live']}\n {...webAria({ 'aria-atomic': ariaAtomic })}\n tabIndex={0}\n testID={testId}\n style={[look.root, fadeIn, style]}\n {...rest}\n >\n {pulse ? <Pulse color={look.palette.main} radius={look.root.borderRadius as number} testID={testIdFor(testId, 'pulse')} /> : null}\n {showIcon ? <IconSlot variant={variant} icon={icon} color={look.iconColor} animate={animate} testID={testIdFor(testId, 'icon')} /> : null}\n <AlertContent title={title} description={description} ink={look.ink} testId={testId}>\n {children}\n </AlertContent>\n {closable ? (\n <View style={actionSlotStyle(theme)}>\n <CloseButton label={closeLabel} ink={look.ink} onPress={dismiss.close} testID={testIdFor(testId, 'close')} />\n </View>\n ) : null}\n </Animated.View>\n </Collapse>\n );\n});\n\nAlert.displayName = 'Alert';\n","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","import type { AlertVariant } from './Alert.base';\nimport { alpha, darken, lighten } from '../../../tokens/color';\nimport { NEUTRAL_RAMP } from '../../../tokens/ink.core';\nimport { contrastText, type UiGreyStep, type UiTheme } from '../../../tokens/theme';\n\n/**\n * THE NUMBERS BOTH `Alert` RENDERERS DRAW WITH.\n *\n * `Alert.styles.tsx` / `Alert.tsx` (MUI) and `Alert.native.tsx` (React\n * Native) read this one table. Spacing is in SPACING UNITS where the web\n * writes `theme.spacing(n)`; durations are ms (the web turns them into `s`\n * through {@link seconds} so its emitted CSS is byte-for-byte what it was);\n * everything else is px, a ratio or an alpha. The hover, active and focus\n * numbers are here too although only the DOM can honour them — a number the\n * web draws with belongs in the table whether or not native can reach it.\n */\n\n/** The root: 12px corners, 14px 16px of padding, one 300ms curve for everything. */\nexport const ALERT_RADIUS_UNITS = 1.5;\nexport const ALERT_PADDING_UNITS = { vertical: 1.75, horizontal: 2 } as const;\nexport const ALERT_TRANSITION_MS = 300;\nexport const ALERT_EASING = 'cubic-bezier(0.4, 0, 0.2, 1)';\n\n/** Mount: the web's `fadeInScale` keyframes and the icon's `iconRotate`. */\nexport const FADE_IN = { ms: 300, scale: 0.95, lift: 10 } as const;\nexport const ICON_SPIN = { ms: 600, from: 0.8, mid: 1.1 } as const;\n/** Dismiss: MUI `Collapse` runs 300ms; `onClose` fires 200ms in. */\nexport const COLLAPSE_MS = 300;\nexport const CLOSE_DELAY_MS = 200;\n\n/** The message column: 8px between title, description and children; 0.95rem body on 1.5. */\nexport const MESSAGE_GAP_UNITS = 1;\nexport const MESSAGE_FONT_SIZE = 15.2;\nexport const MESSAGE_LINE_HEIGHT = 1.5;\n/** A control inside the message gets an edge: 4px above, a hairline at 0.45 of the hue. */\nexport const MESSAGE_BUTTON = { marginTopUnits: 0.5, borderAlpha: 0.45 } as const;\n\n/** The title: 1.05rem at 600; MUI's `AlertTitle` lifts it 2px; 4px below it when a description follows. */\nexport const TITLE = { fontSize: 16.8, fontWeight: 600, marginTop: -2, marginBottomUnits: 0.5 } as const;\n/** The description: 0.925rem, slightly faded. */\nexport const DESCRIPTION = { fontSize: 14.8, opacity: 0.9 } as const;\n\n/** The icon slot: MUI's 22px glyph at 0.9, 14px from the words, 2px down (MUI's 7px stays below). */\nexport const ICON_SLOT = { size: 22, opacity: 0.9, marginRightUnits: 1.75, paddingTopUnits: 0.25, paddingBottom: 7 } as const;\n/** The action slot: MUI's `4px 0 0 16px` with the 16px ours, pushed right, 8px into the padding. */\nexport const ACTION_SLOT = { paddingLeftUnits: 2, paddingTop: 4, marginRight: -8 } as const;\n/** The close button: MUI's small `IconButton` (5px padding, 18px glyph) at 0.7. */\nexport const CLOSE_BUTTON = { padding: 5, iconSize: 18, opacity: 0.7, washAlpha: 0.1 } as const;\n\n/**\n * A semantic Alert's surface and ink: an OPAQUE tint of the hue with a dark\n * ink of the same hue — MUI's own `standard` recipe, at its ratios. See\n * `semanticSurface` in `Alert.styles.tsx` for why not `alpha(main, 0.1)`.\n */\nexport const SEMANTIC_SURFACE = { tint: { light: 0.9, dark: 0.8 }, ink: 0.6, borderAlpha: 0.35 } as const;\n/** `glass`: 85% paper under a 20px blur, a 0.4 divider hairline. */\nexport const GLASS = { backgroundAlpha: 0.85, borderAlpha: 0.4, blur: 20, saturatePercent: 180 } as const;\n/**\n * `gradient`: light→dark at 0.9 along 135°, a 0.2 white shimmer sweeping 1000px every 3s.\n *\n * It carries no hover of its own, and that is load-bearing rather than an\n * omission. `alertVariantStyles` is spread AFTER the root's `'&:hover'` in the\n * same object literal, so a second `'&:hover'` key does not merge with it — it\n * REPLACES it. While this variant had one, `gradient` was the only alert that\n * brightened on hover while every other variant darkened, and the only one to\n * lose the shimmer reveal the root's hover performs.\n */\nexport const GRADIENT = {\n angleDeg: 135,\n stopAlpha: 0.9,\n shimmerAlpha: 0.2,\n shimmerMs: 3000,\n shimmerTravel: 1000,\n} as const;\n\n/** Emphasis: the glow's shadow and brightness, the pulse's wash. */\nexport const GLOW = { blur: 20, spread: 5, alpha: 0.3, brightness: 1.05 } as const;\nexport const PULSE = { alpha: 0.2, ms: 2000, spread: 10 } as const;\n\n/**\n * Pointer states — DOM only, kept so the web derives them.\n *\n * HOVER and ACTIVE carry NO geometry, and that is the point rather than an\n * omission. They used to lift the card 3px, scale it 1.01, grow a 20px shadow\n * and spin the icon 10deg at 1.15 — four things moving at once on a surface\n * that is not a control, which made a page of alerts twitch under the pointer.\n *\n * Both are a TINT now: a flat inset layer over the surface. Two mechanisms\n * came before it and each failed on a case the next had to fix. Dropping the\n * element's `opacity` composites toward the PAGE, so it inverted the hover on\n * a light tint (L* 95.0 idle, 89.1 hovered, 91.1 pressed) and vanished on a\n * dark one. A `filter: brightness()` fixed the direction but is MULTIPLICATIVE,\n * so it moved a near-black `glass` by four counts (ΔE76 1.71, under the JND)\n * and Banner's 10%-alpha wash by ΔE76 0.44. A layer is additive: it reads the\n * same on an opaque tint, a translucent wash and a gradient, and because it\n * paints above the background and below the content the ink keeps its own\n * contrast.\n */\nexport const HOVER = { tintAlpha: 0.06 } as const;\n\n/**\n * The press: a 20% tint LAYER, eased back fast.\n *\n * The layer is the point. The first attempt dropped the whole element's\n * opacity, which composites toward the PAGE and so behaves differently on\n * every surface it is asked about. Measured: over a light page it made a light\n * tint LIGHTER (L* 95.0 idle, 89.1 hovered, 91.1 pressed), so pushing the\n * surface looked like the pointer leaving; over a dark page it landed back on\n * the idle surface (ΔE76 0.82 on `glass`); on `gradient` it washed white body\n * copy to 2.31:1, under AA; and it diluted the ink during a text-selection\n * drag. A `brightness()` step instead of it fixed the direction but not the\n * reach — a multiplier does nothing to a near-black `glass` in dark mode\n * (ΔE76 1.71) and nothing to Banner's 10%-alpha wash (ΔE76 0.44), because it\n * scales only what the element already paints.\n *\n * An inset shadow at 100vmax is a flat tint over the whole surface: ADDITIVE,\n * so it reads the same on an opaque tint, a translucent wash and a gradient;\n * painted above the background and below the content, so the ink keeps its\n * own contrast; and animatable, which `background-image` is not.\n *\n * `ms` is 250 and not the 1000 first asked for, and the reason is that ONE\n * property carries both states. CSS runs a transition from the DESTINATION\n * state's declaration, and entering hover and releasing a press share that\n * destination — so they cannot have different durations without a second\n * animatable property, and both free pseudo-elements are already spent on the\n * `gradient` shimmer and the `pulse` wash. At 1000ms the hover inherited the\n * second: crossing an alert in 300ms peaked at a ≈ 0.024, under the JND, and\n * for ~360ms the alert you had just LEFT was darker than the one under the\n * pointer. A fast press-return is the smaller loss, and it is the call the\n * product owner made when shown both.\n */\nexport const ACTIVE = { tintAlpha: 0.2, ms: 250 } as const;\n\nexport const FOCUS = { ringWidth: 2, ringAlpha: 1, offset: 2 } as const;\n\n/** `neutral` has no palette slot; the web has always drawn it from three greys. */\nexport const NEUTRAL_GREY: Record<'main' | 'light' | 'dark', UiGreyStep> = { main: 500, light: 300, dark: 700 };\n\n/** A duration as the CSS the web has always emitted: `2000` → `2s`, `300` → `0.3s`. */\nexport const seconds = (ms: number): string => `${ms / 1000}s`;\n\n/** The palette shape the web's `getColorFromTheme` returns — a main plus optional shades. */\nexport interface AlertPalette {\n main: string;\n light?: string;\n dark?: string;\n}\n\n/**\n * The renderer-free twin of the web's `getColorFromTheme`: a variant or\n * colour name to its palette, `neutral` from the greys, anything unknown\n * (`glass`, `gradient`) to `info`.\n */\nexport function alertPalette(theme: UiTheme, key: string | undefined): AlertPalette {\n switch (key) {\n case 'info':\n case 'success':\n case 'warning':\n case 'danger':\n case 'primary':\n case 'secondary':\n return theme.palette[key];\n case 'neutral':\n return {\n main: NEUTRAL_RAMP[NEUTRAL_GREY.main],\n light: NEUTRAL_RAMP[NEUTRAL_GREY.light],\n dark: NEUTRAL_RAMP[NEUTRAL_GREY.dark],\n };\n default:\n return theme.palette.info;\n }\n}\n\n/** What a variant paints: its fill, its ink, its hairline if any, and the colour of its glyph. */\nexport interface AlertSurface {\n backgroundColor: string;\n color: string;\n borderColor?: string;\n iconColor: string;\n}\n\nexport const SEMANTIC_VARIANTS: ReadonlySet<AlertVariant> = new Set(['info', 'success', 'warning', 'danger']);\n\n/** The opaque tint and same-hue ink, inverted for dark mode; the hairline keeps its alpha. */\nexport function semanticSurface(theme: UiTheme, palette: AlertPalette): AlertSurface {\n const dark = theme.mode === 'dark';\n return {\n backgroundColor: dark\n ? darken(palette.main, SEMANTIC_SURFACE.tint.dark)\n : lighten(palette.main, SEMANTIC_SURFACE.tint.light),\n color: dark ? lighten(palette.main, SEMANTIC_SURFACE.ink) : darken(palette.main, SEMANTIC_SURFACE.ink),\n borderColor: alpha(palette.main, SEMANTIC_SURFACE.borderAlpha),\n iconColor: palette.main,\n };\n}\n\nexport function glassSurface(theme: UiTheme): AlertSurface {\n return {\n backgroundColor: alpha(theme.palette.background.paper, GLASS.backgroundAlpha),\n color: theme.palette.text.primary,\n borderColor: alpha(theme.palette.divider, GLASS.borderAlpha),\n iconColor: theme.palette.primary.main,\n };\n}\n\n/** The gradient's two stops; a renderer with no gradient fill paints `from`. */\nexport function gradientStops(palette: AlertPalette): { from: string; to: string } {\n return {\n from: alpha(palette.light || palette.main, GRADIENT.stopAlpha),\n to: alpha(palette.dark || palette.main, GRADIENT.stopAlpha),\n };\n}\n\nexport function gradientSurface(palette: AlertPalette): AlertSurface {\n const ink = contrastText(palette.main);\n return { backgroundColor: gradientStops(palette).from, color: ink, iconColor: ink };\n}\n\n/** The surface for a variant, `glass` and `gradient` included. */\nexport function alertSurface(theme: UiTheme, variant: AlertVariant, palette: AlertPalette): AlertSurface {\n if (variant === 'glass') return glassSurface(theme);\n if (variant === 'gradient') return gradientSurface(palette);\n return semanticSurface(theme, palette);\n}\n","import type { TextStyle, ViewStyle } from 'react-native';\n\nimport type { AlertVariant } from './Alert.base';\nimport {\n ACTION_SLOT,\n ALERT_PADDING_UNITS,\n ALERT_RADIUS_UNITS,\n type AlertPalette,\n alertPalette,\n alertSurface,\n CLOSE_BUTTON,\n DESCRIPTION,\n GLOW,\n ICON_SLOT,\n MESSAGE_FONT_SIZE,\n MESSAGE_GAP_UNITS,\n MESSAGE_LINE_HEIGHT,\n TITLE,\n} from './Alert.metrics';\nimport { alpha } from '../../../tokens/color';\nimport { muiTypeStyle } from '../../../tokens/mui-type';\nimport type { UiTheme } from '../../../tokens/theme';\nimport type { ColorValue } from '../../../tokens/vocabulary';\n\n/**\n * THE PAINT, KEPT APART FROM THE STRUCTURE.\n *\n * `Alert.native.tsx` reads as what renders where; this file reads as\n * arithmetic — the same palette slots, alphas and px the web's\n * `Alert.styles.tsx` derives from `Alert.metrics.ts`.\n */\n\nexport interface AlertLookArgs {\n variant: AlertVariant;\n color: ColorValue | undefined;\n glow: boolean;\n pulse: boolean;\n}\n\nexport interface AlertLook {\n palette: AlertPalette;\n /** What the words are set in. */\n ink: string;\n iconColor: string;\n root: ViewStyle;\n}\n\n/**\n * The root's paint. The web keeps `overflow: hidden` (its pulse wash is\n * clipped to the card, as it is here); only the glow opens it, because a\n * view's own shadow is clipped by its own overflow on a device.\n */\nexport function alertLook(theme: UiTheme, a: AlertLookArgs): AlertLook {\n const palette = alertPalette(theme, a.color ?? a.variant);\n const surface = alertSurface(theme, a.variant, palette);\n const root: ViewStyle = {\n flexDirection: 'row',\n paddingVertical: theme.spacing(ALERT_PADDING_UNITS.vertical),\n paddingHorizontal: theme.spacing(ALERT_PADDING_UNITS.horizontal),\n borderRadius: theme.spacing(ALERT_RADIUS_UNITS),\n overflow: a.glow ? 'visible' : 'hidden',\n backgroundColor: surface.backgroundColor,\n ...(surface.borderColor ? { borderWidth: 1, borderColor: surface.borderColor } : {}),\n ...(a.glow\n ? {\n boxShadow: `0 0 ${GLOW.blur}px ${GLOW.spread}px ${alpha(palette.main, GLOW.alpha)}`,\n filter: `brightness(${GLOW.brightness})`,\n }\n : {}),\n };\n return { palette, ink: surface.color, iconColor: surface.iconColor, root };\n}\n\n/** The message column: 8px between its lines, allowed to shrink so long text wraps beside the icon. */\nexport const messageSlotStyle = (theme: UiTheme): ViewStyle => ({\n flexDirection: 'column',\n gap: theme.spacing(MESSAGE_GAP_UNITS),\n flexShrink: 1,\n minWidth: 0,\n});\n\n/** A string child: MUI's `body2` letter-spacing at 0.95rem on the message's 1.5. */\nexport const messageTextStyle = (theme: UiTheme, ink: string): TextStyle => ({\n ...muiTypeStyle(theme, 'body2', MESSAGE_FONT_SIZE),\n lineHeight: MESSAGE_FONT_SIZE * MESSAGE_LINE_HEIGHT,\n color: ink,\n});\n\n/** MUI's `AlertTitle` (a `body1` Typography) at 1.05rem and 600, lifted 2px, 4px above a description. */\nexport const titleStyle = (theme: UiTheme, ink: string, hasDescription: boolean): TextStyle => ({\n ...muiTypeStyle(theme, 'body1', TITLE.fontSize),\n fontWeight: `${TITLE.fontWeight}`,\n color: ink,\n marginTop: TITLE.marginTop,\n marginBottom: hasDescription ? theme.spacing(TITLE.marginBottomUnits) : 0,\n});\n\n/** The description: 0.925rem on the message's 1.5, faded to 0.9. */\nexport const descriptionStyle = (theme: UiTheme, ink: string): TextStyle => ({\n ...muiTypeStyle(theme, 'body2', DESCRIPTION.fontSize),\n lineHeight: DESCRIPTION.fontSize * MESSAGE_LINE_HEIGHT,\n color: ink,\n opacity: DESCRIPTION.opacity,\n});\n\n/** MUI's `.MuiAlert-icon` with the web's overrides: first-line aligned, 14px from the words, 2px down. */\nexport const iconSlotStyle = (theme: UiTheme): ViewStyle => ({\n alignSelf: 'flex-start',\n alignItems: 'center',\n marginRight: theme.spacing(ICON_SLOT.marginRightUnits),\n paddingTop: theme.spacing(ICON_SLOT.paddingTopUnits),\n paddingBottom: ICON_SLOT.paddingBottom,\n opacity: ICON_SLOT.opacity,\n});\n\n/** MUI's `.MuiAlert-action`: top-aligned, pushed to the right edge, 16px off the text. */\nexport const actionSlotStyle = (theme: UiTheme): ViewStyle => ({\n alignItems: 'flex-start',\n paddingTop: ACTION_SLOT.paddingTop,\n paddingLeft: theme.spacing(ACTION_SLOT.paddingLeftUnits),\n marginLeft: 'auto',\n marginRight: ACTION_SLOT.marginRight,\n});\n\n/** MUI's small `IconButton` at 0.7; pressed stands in for the web's hover (full opacity, a faint wash). */\nexport const closeButtonStyle = (theme: UiTheme, pressed: boolean): ViewStyle => ({\n padding: CLOSE_BUTTON.padding,\n borderRadius: theme.radius.full,\n opacity: pressed ? 1 : CLOSE_BUTTON.opacity,\n backgroundColor: pressed ? alpha(theme.palette.action.hover, CLOSE_BUTTON.washAlpha) : 'transparent',\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAY,WAAW;AACvB;AAAA,EACE;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EAEA;AAAA,EACA,QAAQ;AAAA,EACR;AAAA,OAEK;;;ACPA,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,IAA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AM,QAAQ,MAAM,aAAa,QAAQ,aACjD;AAAA,IAAC,SAAS;AAAA,IAAT;AAAA,MACC;AAAA,MACA,MAAM,aAAa;AAAA,MACnB,aAAW,aAAa,WAAW;AAAA,MAClC,GAAG,QAAQ,EAAE,eAAe,WAAW,CAAC;AAAA,MACzC,UAAU;AAAA,MACV,QAAQ;AAAA,MACR,OAAO,CAAC,KAAK,MAAM,QAAQ,KAAK;AAAA,MAC/B,GAAG;AAAA,MAEH;AAAA,gBAAQ,oBAAC,SAAM,OAAO,KAAK,QAAQ,MAAM,QAAQ,KAAK,KAAK,cAAwB,QAAQ,UAAU,QAAQ,OAAO,GAAG,IAAK;AAAA,QAC5H,WAAW,oBAAC,YAAS,SAAkB,MAAY,OAAO,KAAK,WAAW,SAAkB,QAAQ,UAAU,QAAQ,MAAM,GAAG,IAAK;AAAA,QACrI,oBAAC,gBAAa,OAAc,aAA0B,KAAK,KAAK,KAAK,QAClE,UACH;AAAA,QACC,WACC,oBAAC,QAAK,OAAO,gBAAgB,KAAK,GAChC,8BAAC,eAAY,OAAO,YAAY,KAAK,KAAK,KAAK,SAAS,QAAQ,OAAO,QAAQ,UAAU,QAAQ,OAAO,GAAG,GAC7G,IACE;AAAA;AAAA;AAAA,EACN,GACF;AAEJ,CAAC;AAED,MAAM,cAAc;","names":[]}
1
+ {"version":3,"sources":["../../../src/components/data-display/Alert/Alert.native.tsx","../../../src/components/data-display/Alert/Alert.helpers.ts","../../../src/components/data-display/Alert/Alert.metrics.ts","../../../src/components/data-display/Alert/Alert.look.native.ts"],"sourcesContent":["import * as React from 'react';\nimport {\n Animated,\n Easing,\n type LayoutChangeEvent,\n Platform,\n Pressable,\n type Role,\n StyleSheet,\n Text as RNText,\n View,\n type ViewStyle,\n} from 'react-native';\n\nimport { resolveAlertProps, resolveAnnouncement, testIdFor, VARIANT_ICON } from './Alert.helpers';\nimport {\n actionSlotStyle,\n alertLook,\n closeButtonStyle,\n descriptionStyle,\n iconSlotStyle,\n messageSlotStyle,\n messageTextStyle,\n titleStyle,\n} from './Alert.look.native';\nimport { CLOSE_BUTTON, CLOSE_DELAY_MS, COLLAPSE_MS, FADE_IN, ICON_SLOT, ICON_SPIN, PULSE } from './Alert.metrics';\nimport type { AlertProps, AlertVariant } from './Alert.types.native';\nimport { Icon } from '../../../icons/Icon.native';\nimport { webAria } from '../../../platform/aria';\nimport { renderTextChildren } from '../../../platform/text-children';\nimport { resolveTestId, withoutTestIdProps } from '../../../platform/test-id';\nimport { useUiTheme } from '../../../provider/use-ui-theme.native';\n\ntype AnimatedStyle = Animated.WithAnimatedValue<ViewStyle>;\nconst nativeDriver = Platform.OS !== 'web';\n\n/** A 0→1 progress that starts on mount when `animate` is set, else sits at 1. */\nfunction useProgress(animate: boolean, duration: number): Animated.Value {\n const progress = React.useRef(new Animated.Value(animate ? 0 : 1)).current;\n React.useEffect(() => {\n if (!animate) return undefined;\n const timing = Animated.timing(progress, { toValue: 1, duration, easing: Easing.out(Easing.ease), useNativeDriver: nativeDriver });\n timing.start();\n return () => timing.stop();\n }, [animate, duration, progress]);\n return progress;\n}\n\n/** The web's `fadeInScale` keyframes: in from 0 opacity, 0.95 scale and 10px above, over 300ms. */\nfunction useFadeIn(animate: boolean): AnimatedStyle | undefined {\n const progress = useProgress(animate, FADE_IN.ms);\n if (!animate) return undefined;\n return {\n opacity: progress,\n transform: [\n { scale: progress.interpolate({ inputRange: [0, 1], outputRange: [FADE_IN.scale, 1] }) },\n { translateY: progress.interpolate({ inputRange: [0, 1], outputRange: [-FADE_IN.lift, 0] }) },\n ],\n };\n}\n\n/** The web's `iconRotate` keyframes: one full turn, 0.8 → 1.1 → 1, over 600ms. */\nfunction useIconSpin(animate: boolean): AnimatedStyle | undefined {\n const progress = useProgress(animate, ICON_SPIN.ms);\n if (!animate) return undefined;\n return {\n transform: [\n { rotate: progress.interpolate({ inputRange: [0, 1], outputRange: ['0deg', '360deg'] }) },\n { scale: progress.interpolate({ inputRange: [0, 0.5, 1], outputRange: [ICON_SPIN.from, ICON_SPIN.mid, 1] }) },\n ],\n };\n}\n\n/** The web's `::after` pulse: a wash of the hue over the card, fading out every two seconds, behind the words. */\nfunction Pulse({ color, radius, testID }: { color: string; radius: number; testID: string }): React.JSX.Element {\n const progress = React.useRef(new Animated.Value(0)).current;\n React.useEffect(() => {\n const loop = Animated.loop(\n Animated.timing(progress, { toValue: 1, duration: PULSE.ms, easing: Easing.linear, useNativeDriver: nativeDriver }),\n );\n loop.start();\n return () => loop.stop();\n }, [progress]);\n return (\n <Animated.View\n testID={testID}\n aria-hidden\n style={[\n StyleSheet.absoluteFill,\n {\n pointerEvents: 'none',\n borderRadius: radius,\n backgroundColor: color,\n opacity: progress.interpolate({ inputRange: [0, 0.7, 1], outputRange: [PULSE.alpha, 0, 0] }),\n },\n ]}\n />\n );\n}\n\n/**\n * MUI's `Collapse`: open, it is a plain wrapper with its overflow visible (so\n * a glow can escape); closing, it clips and shrinks over 300ms, then says so.\n */\nfunction Collapse({ open, onCollapsed, children }: { open: boolean; onCollapsed: () => void; children: React.ReactNode }): React.JSX.Element {\n const [height, setHeight] = React.useState<number | null>(null);\n const progress = React.useRef(new Animated.Value(1)).current;\n React.useEffect(() => {\n if (open) return undefined;\n const timing = Animated.timing(progress, { toValue: 0, duration: COLLAPSE_MS, easing: Easing.inOut(Easing.ease), useNativeDriver: false });\n timing.start(({ finished }) => {\n if (finished) onCollapsed();\n });\n return () => timing.stop();\n }, [open, onCollapsed, progress]);\n const onLayout = (event: LayoutChangeEvent): void => {\n if (open) setHeight(event.nativeEvent.layout.height);\n };\n const shrink: AnimatedStyle = height == null ? {} : { maxHeight: progress.interpolate({ inputRange: [0, 1], outputRange: [0, height] }) };\n return (\n <Animated.View style={[{ overflow: open ? 'visible' : 'hidden', opacity: progress }, shrink]}>\n <View onLayout={onLayout}>{children}</View>\n </Animated.View>\n );\n}\n\ninterface IconSlotProps {\n variant: AlertVariant;\n icon: React.ReactNode;\n color: string;\n animate: boolean;\n testID: string;\n}\n\n/** The icon slot; `glass` and `gradient` have no glyph of their own, so theirs is empty unless an `icon` is given — as on the web. */\nfunction IconSlot({ variant, icon, color, animate, testID }: IconSlotProps): React.JSX.Element {\n const theme = useUiTheme();\n const spin = useIconSpin(animate);\n const glyph = VARIANT_ICON[variant];\n return (\n <Animated.View testID={testID} style={[iconSlotStyle(theme), spin]}>\n {icon || (glyph ? <Icon name={glyph} size={ICON_SLOT.size} color={color} /> : null)}\n </Animated.View>\n );\n}\n\nfunction CloseButton({ label, ink, onPress, testID }: { label: string | undefined; ink: string; onPress: () => void; testID: string }): React.JSX.Element {\n const theme = useUiTheme();\n return (\n <Pressable role=\"button\" aria-label={label} testID={testID} onPress={onPress} style={({ pressed }) => closeButtonStyle(theme, pressed)}>\n <Icon name=\"Close\" size={CLOSE_BUTTON.iconSize} color={ink} />\n </Pressable>\n );\n}\n\ninterface ContentProps {\n title?: string;\n description?: string;\n children?: React.ReactNode;\n ink: string;\n testId: string;\n}\n\nfunction AlertContent({ title, description, children, ink, testId }: ContentProps): React.JSX.Element {\n const theme = useUiTheme();\n return (\n <View style={messageSlotStyle(theme)}>\n {title ? (\n <RNText testID={testIdFor(testId, 'title')} style={titleStyle(theme, ink, Boolean(description))}>\n {title}\n </RNText>\n ) : null}\n {description ? (\n <RNText testID={testIdFor(testId, 'message')} style={descriptionStyle(theme, ink)}>\n {description}\n </RNText>\n ) : null}\n {renderTextChildren(children, messageTextStyle(theme, ink))}\n </View>\n );\n}\n\n/** The dismiss sequence the web runs: mark closing, fire `onClose` 200ms in, stay until the collapse has run. */\nfunction useDismiss(onClose: (() => void) | undefined): { open: boolean; gone: boolean; close: () => void; onCollapsed: () => void } {\n const [closing, setClosing] = React.useState(false);\n const [gone, setGone] = React.useState(false);\n const timer = React.useRef<ReturnType<typeof setTimeout> | null>(null);\n React.useEffect(() => () => {\n if (timer.current) clearTimeout(timer.current);\n }, []);\n const close = (): void => {\n setClosing(true);\n timer.current = setTimeout(() => onClose?.(), CLOSE_DELAY_MS);\n };\n const onCollapsed = React.useCallback(() => setGone(true), []);\n return { open: !closing, gone, close, onCollapsed };\n}\n\nexport const Alert = React.forwardRef<View, AlertProps>((alertProps, ref) => {\n const {\n variant, color, glow, pulse, icon, showIcon, onClose, title, description, children, animate,\n // `role`, `announce` and `aria-live` all leave here and are resolved\n // TOGETHER below, off `alertProps` — see `resolveAnnouncement`.\n role: _role, announce: _announce,\n 'aria-atomic': ariaAtomic, 'aria-live': _ariaLive, closable, closeLabel, style, ...others\n } = resolveAlertProps(alertProps);\n const theme = useUiTheme();\n const testId = resolveTestId(others, 'alert') as string;\n const rest = withoutTestIdProps(others);\n const look = alertLook(theme, { variant, color, glow, pulse });\n const fadeIn = useFadeIn(animate);\n const dismiss = useDismiss(onClose);\n const announcement = resolveAnnouncement(alertProps, variant);\n\n if (dismiss.gone) return null;\n return (\n <Collapse open={dismiss.open} onCollapsed={dismiss.onCollapsed}>\n <Animated.View\n ref={ref}\n role={announcement.role as Role}\n aria-live={announcement['aria-live']}\n {...webAria({ 'aria-atomic': ariaAtomic })}\n tabIndex={0}\n testID={testId}\n style={[look.root, fadeIn, style]}\n {...rest}\n >\n {pulse ? <Pulse color={look.palette.main} radius={look.root.borderRadius as number} testID={testIdFor(testId, 'pulse')} /> : null}\n {showIcon ? <IconSlot variant={variant} icon={icon} color={look.iconColor} animate={animate} testID={testIdFor(testId, 'icon')} /> : null}\n <AlertContent title={title} description={description} ink={look.ink} testId={testId}>\n {children}\n </AlertContent>\n {closable ? (\n <View style={actionSlotStyle(theme)}>\n <CloseButton label={closeLabel} ink={look.ink} onPress={dismiss.close} testID={testIdFor(testId, 'close')} />\n </View>\n ) : null}\n </Animated.View>\n </Collapse>\n );\n});\n\nAlert.displayName = 'Alert';\n","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","import type { AlertVariant } from './Alert.base';\nimport { alpha, darken, lighten } from '../../../tokens/color';\nimport { NEUTRAL_RAMP } from '../../../tokens/ink.core';\nimport { contrastText, type UiGreyStep, type UiTheme } from '../../../tokens/theme';\n\n/**\n * THE NUMBERS BOTH `Alert` RENDERERS DRAW WITH.\n *\n * `Alert.styles.tsx` / `Alert.tsx` (MUI) and `Alert.native.tsx` (React\n * Native) read this one table. Spacing is in SPACING UNITS where the web\n * writes `theme.spacing(n)`; durations are ms (the web turns them into `s`\n * through {@link seconds} so its emitted CSS is byte-for-byte what it was);\n * everything else is px, a ratio or an alpha. The hover, active and focus\n * numbers are here too although only the DOM can honour them — a number the\n * web draws with belongs in the table whether or not native can reach it.\n */\n\n/** The root: 12px corners, 14px 16px of padding, one 300ms curve for everything. */\nexport const ALERT_RADIUS_UNITS = 1.5;\nexport const ALERT_PADDING_UNITS = { vertical: 1.75, horizontal: 2 } as const;\nexport const ALERT_TRANSITION_MS = 300;\nexport const ALERT_EASING = 'cubic-bezier(0.4, 0, 0.2, 1)';\n\n/** Mount: the web's `fadeInScale` keyframes and the icon's `iconRotate`. */\nexport const FADE_IN = { ms: 300, scale: 0.95, lift: 10 } as const;\nexport const ICON_SPIN = { ms: 600, from: 0.8, mid: 1.1 } as const;\n/** Dismiss: MUI `Collapse` runs 300ms; `onClose` fires 200ms in. */\nexport const COLLAPSE_MS = 300;\nexport const CLOSE_DELAY_MS = 200;\n\n/** The message column: 8px between title, description and children; 0.95rem body on 1.5. */\nexport const MESSAGE_GAP_UNITS = 1;\nexport const MESSAGE_FONT_SIZE = 15.2;\nexport const MESSAGE_LINE_HEIGHT = 1.5;\n/** A control inside the message gets an edge: 4px above, a hairline at 0.45 of the hue. */\nexport const MESSAGE_BUTTON = { marginTopUnits: 0.5, borderAlpha: 0.45 } as const;\n\n/** The title: 1.05rem at 600; MUI's `AlertTitle` lifts it 2px; 4px below it when a description follows. */\nexport const TITLE = { fontSize: 16.8, fontWeight: 600, marginTop: -2, marginBottomUnits: 0.5 } as const;\n/** The description: 0.925rem, slightly faded. */\nexport const DESCRIPTION = { fontSize: 14.8, opacity: 0.9 } as const;\n\n/** The icon on the title's line (`iconPlacement: 'title'`): 10px from the title. */\nexport const TITLE_ICON = { gapUnits: 1.25 } as const;\n/** The icon slot: MUI's 22px glyph at 0.9, 14px from the words, 2px down (MUI's 7px stays below). */\nexport const ICON_SLOT = { size: 22, opacity: 0.9, marginRightUnits: 1.75, paddingTopUnits: 0.25, paddingBottom: 7 } as const;\n/** The action slot: MUI's `4px 0 0 16px` with the 16px ours, pushed right, 8px into the padding. */\nexport const ACTION_SLOT = { paddingLeftUnits: 2, paddingTop: 4, marginRight: -8 } as const;\n/** The close button: MUI's small `IconButton` (5px padding, 18px glyph) at 0.7. */\nexport const CLOSE_BUTTON = { padding: 5, iconSize: 18, opacity: 0.7, washAlpha: 0.1 } as const;\n\n/**\n * A semantic Alert's surface and ink: an OPAQUE tint of the hue with a dark\n * ink of the same hue — MUI's own `standard` recipe, at its ratios. See\n * `semanticSurface` in `Alert.styles.tsx` for why not `alpha(main, 0.1)`.\n */\nexport const SEMANTIC_SURFACE = { tint: { light: 0.9, dark: 0.8 }, ink: 0.6, borderAlpha: 0.35 } as const;\n/** `glass`: 85% paper under a 20px blur, a 0.4 divider hairline. */\nexport const GLASS = { backgroundAlpha: 0.85, borderAlpha: 0.4, blur: 20, saturatePercent: 180 } as const;\n/**\n * `gradient`: light→dark at 0.9 along 135°, a 0.2 white shimmer sweeping 1000px every 3s.\n *\n * It carries no hover of its own, and that is load-bearing rather than an\n * omission. `alertVariantStyles` is spread AFTER the root's `'&:hover'` in the\n * same object literal, so a second `'&:hover'` key does not merge with it — it\n * REPLACES it. While this variant had one, `gradient` was the only alert that\n * brightened on hover while every other variant darkened, and the only one to\n * lose the shimmer reveal the root's hover performs.\n */\nexport const GRADIENT = {\n angleDeg: 135,\n stopAlpha: 0.9,\n shimmerAlpha: 0.2,\n shimmerMs: 3000,\n shimmerTravel: 1000,\n} as const;\n\n/** Emphasis: the glow's shadow and brightness, the pulse's wash. */\nexport const GLOW = { blur: 20, spread: 5, alpha: 0.3, brightness: 1.05 } as const;\nexport const PULSE = { alpha: 0.2, ms: 2000, spread: 10 } as const;\n\n/**\n * Pointer states — DOM only, kept so the web derives them.\n *\n * HOVER and ACTIVE carry NO geometry, and that is the point rather than an\n * omission. They used to lift the card 3px, scale it 1.01, grow a 20px shadow\n * and spin the icon 10deg at 1.15 — four things moving at once on a surface\n * that is not a control, which made a page of alerts twitch under the pointer.\n *\n * Both are a TINT now: a flat inset layer over the surface. Two mechanisms\n * came before it and each failed on a case the next had to fix. Dropping the\n * element's `opacity` composites toward the PAGE, so it inverted the hover on\n * a light tint (L* 95.0 idle, 89.1 hovered, 91.1 pressed) and vanished on a\n * dark one. A `filter: brightness()` fixed the direction but is MULTIPLICATIVE,\n * so it moved a near-black `glass` by four counts (ΔE76 1.71, under the JND)\n * and Banner's 10%-alpha wash by ΔE76 0.44. A layer is additive: it reads the\n * same on an opaque tint, a translucent wash and a gradient, and because it\n * paints above the background and below the content the ink keeps its own\n * contrast.\n */\nexport const HOVER = { tintAlpha: 0.06 } as const;\n\n/**\n * The press: a 20% tint LAYER, eased back fast.\n *\n * The layer is the point. The first attempt dropped the whole element's\n * opacity, which composites toward the PAGE and so behaves differently on\n * every surface it is asked about. Measured: over a light page it made a light\n * tint LIGHTER (L* 95.0 idle, 89.1 hovered, 91.1 pressed), so pushing the\n * surface looked like the pointer leaving; over a dark page it landed back on\n * the idle surface (ΔE76 0.82 on `glass`); on `gradient` it washed white body\n * copy to 2.31:1, under AA; and it diluted the ink during a text-selection\n * drag. A `brightness()` step instead of it fixed the direction but not the\n * reach — a multiplier does nothing to a near-black `glass` in dark mode\n * (ΔE76 1.71) and nothing to Banner's 10%-alpha wash (ΔE76 0.44), because it\n * scales only what the element already paints.\n *\n * An inset shadow at 100vmax is a flat tint over the whole surface: ADDITIVE,\n * so it reads the same on an opaque tint, a translucent wash and a gradient;\n * painted above the background and below the content, so the ink keeps its\n * own contrast; and animatable, which `background-image` is not.\n *\n * `ms` is 250 and not the 1000 first asked for, and the reason is that ONE\n * property carries both states. CSS runs a transition from the DESTINATION\n * state's declaration, and entering hover and releasing a press share that\n * destination — so they cannot have different durations without a second\n * animatable property, and both free pseudo-elements are already spent on the\n * `gradient` shimmer and the `pulse` wash. At 1000ms the hover inherited the\n * second: crossing an alert in 300ms peaked at a ≈ 0.024, under the JND, and\n * for ~360ms the alert you had just LEFT was darker than the one under the\n * pointer. A fast press-return is the smaller loss, and it is the call the\n * product owner made when shown both.\n */\nexport const ACTIVE = { tintAlpha: 0.2, ms: 250 } as const;\n\nexport const FOCUS = { ringWidth: 2, ringAlpha: 1, offset: 2 } as const;\n\n/** `neutral` has no palette slot; the web has always drawn it from three greys. */\nexport const NEUTRAL_GREY: Record<'main' | 'light' | 'dark', UiGreyStep> = { main: 500, light: 300, dark: 700 };\n\n/** A duration as the CSS the web has always emitted: `2000` → `2s`, `300` → `0.3s`. */\nexport const seconds = (ms: number): string => `${ms / 1000}s`;\n\n/** The palette shape the web's `getColorFromTheme` returns — a main plus optional shades. */\nexport interface AlertPalette {\n main: string;\n light?: string;\n dark?: string;\n}\n\n/**\n * The renderer-free twin of the web's `getColorFromTheme`: a variant or\n * colour name to its palette, `neutral` from the greys, anything unknown\n * (`glass`, `gradient`) to `info`.\n */\nexport function alertPalette(theme: UiTheme, key: string | undefined): AlertPalette {\n switch (key) {\n case 'info':\n case 'success':\n case 'warning':\n case 'danger':\n case 'primary':\n case 'secondary':\n return theme.palette[key];\n case 'neutral':\n return {\n main: NEUTRAL_RAMP[NEUTRAL_GREY.main],\n light: NEUTRAL_RAMP[NEUTRAL_GREY.light],\n dark: NEUTRAL_RAMP[NEUTRAL_GREY.dark],\n };\n default:\n return theme.palette.info;\n }\n}\n\n/** What a variant paints: its fill, its ink, its hairline if any, and the colour of its glyph. */\nexport interface AlertSurface {\n backgroundColor: string;\n color: string;\n borderColor?: string;\n iconColor: string;\n}\n\nexport const SEMANTIC_VARIANTS: ReadonlySet<AlertVariant> = new Set(['info', 'success', 'warning', 'danger']);\n\n/** The opaque tint and same-hue ink, inverted for dark mode; the hairline keeps its alpha. */\nexport function semanticSurface(theme: UiTheme, palette: AlertPalette): AlertSurface {\n const dark = theme.mode === 'dark';\n return {\n backgroundColor: dark\n ? darken(palette.main, SEMANTIC_SURFACE.tint.dark)\n : lighten(palette.main, SEMANTIC_SURFACE.tint.light),\n color: dark ? lighten(palette.main, SEMANTIC_SURFACE.ink) : darken(palette.main, SEMANTIC_SURFACE.ink),\n borderColor: alpha(palette.main, SEMANTIC_SURFACE.borderAlpha),\n iconColor: palette.main,\n };\n}\n\nexport function glassSurface(theme: UiTheme): AlertSurface {\n return {\n backgroundColor: alpha(theme.palette.background.paper, GLASS.backgroundAlpha),\n color: theme.palette.text.primary,\n borderColor: alpha(theme.palette.divider, GLASS.borderAlpha),\n iconColor: theme.palette.primary.main,\n };\n}\n\n/** The gradient's two stops; a renderer with no gradient fill paints `from`. */\nexport function gradientStops(palette: AlertPalette): { from: string; to: string } {\n return {\n from: alpha(palette.light || palette.main, GRADIENT.stopAlpha),\n to: alpha(palette.dark || palette.main, GRADIENT.stopAlpha),\n };\n}\n\nexport function gradientSurface(palette: AlertPalette): AlertSurface {\n const ink = contrastText(palette.main);\n return { backgroundColor: gradientStops(palette).from, color: ink, iconColor: ink };\n}\n\n/** The surface for a variant, `glass` and `gradient` included. */\nexport function alertSurface(theme: UiTheme, variant: AlertVariant, palette: AlertPalette): AlertSurface {\n if (variant === 'glass') return glassSurface(theme);\n if (variant === 'gradient') return gradientSurface(palette);\n return semanticSurface(theme, palette);\n}\n","import type { TextStyle, ViewStyle } from 'react-native';\n\nimport type { AlertVariant } from './Alert.base';\nimport {\n ACTION_SLOT,\n ALERT_PADDING_UNITS,\n ALERT_RADIUS_UNITS,\n type AlertPalette,\n alertPalette,\n alertSurface,\n CLOSE_BUTTON,\n DESCRIPTION,\n GLOW,\n ICON_SLOT,\n MESSAGE_FONT_SIZE,\n MESSAGE_GAP_UNITS,\n MESSAGE_LINE_HEIGHT,\n TITLE,\n} from './Alert.metrics';\nimport { alpha } from '../../../tokens/color';\nimport { muiTypeStyle } from '../../../tokens/mui-type';\nimport type { UiTheme } from '../../../tokens/theme';\nimport type { ColorValue } from '../../../tokens/vocabulary';\n\n/**\n * THE PAINT, KEPT APART FROM THE STRUCTURE.\n *\n * `Alert.native.tsx` reads as what renders where; this file reads as\n * arithmetic — the same palette slots, alphas and px the web's\n * `Alert.styles.tsx` derives from `Alert.metrics.ts`.\n */\n\nexport interface AlertLookArgs {\n variant: AlertVariant;\n color: ColorValue | undefined;\n glow: boolean;\n pulse: boolean;\n}\n\nexport interface AlertLook {\n palette: AlertPalette;\n /** What the words are set in. */\n ink: string;\n iconColor: string;\n root: ViewStyle;\n}\n\n/**\n * The root's paint. The web keeps `overflow: hidden` (its pulse wash is\n * clipped to the card, as it is here); only the glow opens it, because a\n * view's own shadow is clipped by its own overflow on a device.\n */\nexport function alertLook(theme: UiTheme, a: AlertLookArgs): AlertLook {\n const palette = alertPalette(theme, a.color ?? a.variant);\n const surface = alertSurface(theme, a.variant, palette);\n const root: ViewStyle = {\n flexDirection: 'row',\n paddingVertical: theme.spacing(ALERT_PADDING_UNITS.vertical),\n paddingHorizontal: theme.spacing(ALERT_PADDING_UNITS.horizontal),\n borderRadius: theme.spacing(ALERT_RADIUS_UNITS),\n overflow: a.glow ? 'visible' : 'hidden',\n backgroundColor: surface.backgroundColor,\n ...(surface.borderColor ? { borderWidth: 1, borderColor: surface.borderColor } : {}),\n ...(a.glow\n ? {\n boxShadow: `0 0 ${GLOW.blur}px ${GLOW.spread}px ${alpha(palette.main, GLOW.alpha)}`,\n filter: `brightness(${GLOW.brightness})`,\n }\n : {}),\n };\n return { palette, ink: surface.color, iconColor: surface.iconColor, root };\n}\n\n/** The message column: 8px between its lines, allowed to shrink so long text wraps beside the icon. */\nexport const messageSlotStyle = (theme: UiTheme): ViewStyle => ({\n flexDirection: 'column',\n gap: theme.spacing(MESSAGE_GAP_UNITS),\n flexShrink: 1,\n minWidth: 0,\n});\n\n/** A string child: MUI's `body2` letter-spacing at 0.95rem on the message's 1.5. */\nexport const messageTextStyle = (theme: UiTheme, ink: string): TextStyle => ({\n ...muiTypeStyle(theme, 'body2', MESSAGE_FONT_SIZE),\n lineHeight: MESSAGE_FONT_SIZE * MESSAGE_LINE_HEIGHT,\n color: ink,\n});\n\n/** MUI's `AlertTitle` (a `body1` Typography) at 1.05rem and 600, lifted 2px, 4px above a description. */\nexport const titleStyle = (theme: UiTheme, ink: string, hasDescription: boolean): TextStyle => ({\n ...muiTypeStyle(theme, 'body1', TITLE.fontSize),\n fontWeight: `${TITLE.fontWeight}`,\n color: ink,\n marginTop: TITLE.marginTop,\n marginBottom: hasDescription ? theme.spacing(TITLE.marginBottomUnits) : 0,\n});\n\n/** The description: 0.925rem on the message's 1.5, faded to 0.9. */\nexport const descriptionStyle = (theme: UiTheme, ink: string): TextStyle => ({\n ...muiTypeStyle(theme, 'body2', DESCRIPTION.fontSize),\n lineHeight: DESCRIPTION.fontSize * MESSAGE_LINE_HEIGHT,\n color: ink,\n opacity: DESCRIPTION.opacity,\n});\n\n/** MUI's `.MuiAlert-icon` with the web's overrides: first-line aligned, 14px from the words, 2px down. */\nexport const iconSlotStyle = (theme: UiTheme): ViewStyle => ({\n alignSelf: 'flex-start',\n alignItems: 'center',\n marginRight: theme.spacing(ICON_SLOT.marginRightUnits),\n paddingTop: theme.spacing(ICON_SLOT.paddingTopUnits),\n paddingBottom: ICON_SLOT.paddingBottom,\n opacity: ICON_SLOT.opacity,\n});\n\n/** MUI's `.MuiAlert-action`: top-aligned, pushed to the right edge, 16px off the text. */\nexport const actionSlotStyle = (theme: UiTheme): ViewStyle => ({\n alignItems: 'flex-start',\n paddingTop: ACTION_SLOT.paddingTop,\n paddingLeft: theme.spacing(ACTION_SLOT.paddingLeftUnits),\n marginLeft: 'auto',\n marginRight: ACTION_SLOT.marginRight,\n});\n\n/** MUI's small `IconButton` at 0.7; pressed stands in for the web's hover (full opacity, a faint wash). */\nexport const closeButtonStyle = (theme: UiTheme, pressed: boolean): ViewStyle => ({\n padding: CLOSE_BUTTON.padding,\n borderRadius: theme.radius.full,\n opacity: pressed ? 1 : CLOSE_BUTTON.opacity,\n backgroundColor: pressed ? alpha(theme.palette.action.hover, CLOSE_BUTTON.washAlpha) : 'transparent',\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;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,QAAQ,KAAK,KAAK,cAAwB,QAAQ,UAAU,QAAQ,OAAO,GAAG,IAAK;AAAA,QAC5H,WAAW,oBAAC,YAAS,SAAkB,MAAY,OAAO,KAAK,WAAW,SAAkB,QAAQ,UAAU,QAAQ,MAAM,GAAG,IAAK;AAAA,QACrI,oBAAC,gBAAa,OAAc,aAA0B,KAAK,KAAK,KAAK,QAClE,UACH;AAAA,QACC,WACC,oBAAC,QAAK,OAAO,gBAAgB,KAAK,GAChC,8BAAC,eAAY,OAAO,YAAY,KAAK,KAAK,KAAK,SAAS,QAAQ,OAAO,QAAQ,UAAU,QAAQ,OAAO,GAAG,GAC7G,IACE;AAAA;AAAA;AAAA,EACN,GACF;AAEJ,CAAC;AAED,MAAM,cAAc;","names":[]}
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import type { AlertProps } from './Alert.types';
3
+ /**
4
+ * The message column: title, description, then whatever the caller put inside.
5
+ *
6
+ * `titleIcon` is the icon when it sits on the title's line
7
+ * (`iconPlacement: 'title'`, see `Alert.placement.ts`). The title then shares
8
+ * a row with it, and the description below is a sibling of that row — so it
9
+ * starts at the column's own edge rather than under the title's first letter.
10
+ */
11
+ export declare const AlertContent: React.FC<{
12
+ title?: AlertProps['title'];
13
+ description?: AlertProps['description'];
14
+ titleIcon?: React.ReactNode;
15
+ dataTestId?: string;
16
+ children?: React.ReactNode;
17
+ }>;
18
+ //# sourceMappingURL=Alert.content.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Alert.content.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/Alert/Alert.content.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAQhD;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC;IAClC,KAAK,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAC5B,WAAW,CAAC,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC;IACxC,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAgDA,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/Alert/Alert.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,MAAM,OAAO,CAAC;AA4R1B,eAAO,MAAM,KAAK;;;;;;;;iDA+EhB,CAAC;AAEH;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,gBAAgB,qCAAsC,CAAC"}
1
+ {"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/Alert/Alert.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,MAAM,OAAO,CAAC;AA4Q1B,eAAO,MAAM,KAAK;;;;;;;;iDA4EhB,CAAC;AAEH;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,gBAAgB,qCAAsC,CAAC"}
@@ -54,6 +54,10 @@ export declare const DESCRIPTION: {
54
54
  readonly fontSize: 14.8;
55
55
  readonly opacity: 0.9;
56
56
  };
57
+ /** The icon on the title's line (`iconPlacement: 'title'`): 10px from the title. */
58
+ export declare const TITLE_ICON: {
59
+ readonly gapUnits: 1.25;
60
+ };
57
61
  /** The icon slot: MUI's 22px glyph at 0.9, 14px from the words, 2px down (MUI's 7px stays below). */
58
62
  export declare const ICON_SLOT: {
59
63
  readonly size: 22;
@@ -1 +1 @@
1
- {"version":3,"file":"Alert.metrics.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/Alert/Alert.metrics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAGjD,OAAO,EAAgB,KAAK,UAAU,EAAE,KAAK,OAAO,EAAE,MAAM,uBAAuB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AAE,YAAY,EAAE,OAAO,EAAE,YAAY,GAAG,YAAY,CAIvG"}
1
+ {"version":3,"file":"Alert.metrics.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/Alert/Alert.metrics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAGjD,OAAO,EAAgB,KAAK,UAAU,EAAE,KAAK,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEpF;;;;;;;;;;GAUG;AAEH,oFAAoF;AACpF,eAAO,MAAM,kBAAkB,MAAM,CAAC;AACtC,eAAO,MAAM,mBAAmB;;;CAA6C,CAAC;AAC9E,eAAO,MAAM,mBAAmB,MAAM,CAAC;AACvC,eAAO,MAAM,YAAY,iCAAiC,CAAC;AAE3D,4EAA4E;AAC5E,eAAO,MAAM,OAAO;;;;CAA8C,CAAC;AACnE,eAAO,MAAM,SAAS;;;;CAA4C,CAAC;AACnE,oEAAoE;AACpE,eAAO,MAAM,WAAW,MAAM,CAAC;AAC/B,eAAO,MAAM,cAAc,MAAM,CAAC;AAElC,4FAA4F;AAC5F,eAAO,MAAM,iBAAiB,IAAI,CAAC;AACnC,eAAO,MAAM,iBAAiB,OAAO,CAAC;AACtC,eAAO,MAAM,mBAAmB,MAAM,CAAC;AACvC,2FAA2F;AAC3F,eAAO,MAAM,cAAc;;;CAAsD,CAAC;AAElF,2GAA2G;AAC3G,eAAO,MAAM,KAAK;;;;;CAAsF,CAAC;AACzG,iDAAiD;AACjD,eAAO,MAAM,WAAW;;;CAA4C,CAAC;AAErE,oFAAoF;AACpF,eAAO,MAAM,UAAU;;CAA8B,CAAC;AACtD,qGAAqG;AACrG,eAAO,MAAM,SAAS;;;;;;CAAuG,CAAC;AAC9H,oGAAoG;AACpG,eAAO,MAAM,WAAW;;;;CAAmE,CAAC;AAC5F,mFAAmF;AACnF,eAAO,MAAM,YAAY;;;;;CAAsE,CAAC;AAEhG;;;;GAIG;AACH,eAAO,MAAM,gBAAgB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,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY,CAOzD;AAED,gFAAgF;AAChF,wBAAgB,aAAa,CAAC,OAAO,EAAE,YAAY,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,CAKjF;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,YAAY,GAAG,YAAY,CAGnE;AAED,kEAAkE;AAClE,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,YAAY,GAAG,YAAY,CAIvG"}
@@ -0,0 +1,37 @@
1
+ import type { Theme } from '@mui/material/styles/index.js';
2
+ /**
3
+ * WHERE THE ICON SITS — a choice the HOST makes once, in its theme.
4
+ *
5
+ * - `'gutter'` (the default, and what every alert did before this existed):
6
+ * the icon has a column of its own, and the title and the description both
7
+ * start to its right. A two-line description wraps inside that narrower
8
+ * column and leaves an empty strip under the icon.
9
+ * - `'title'`: the icon sits on the TITLE's line, and the description below
10
+ * starts at the alert's own edge and uses the whole line.
11
+ *
12
+ * It is a theme value, like `uiSurfaces`, because it is a house style rather
13
+ * than a per-call decision: a host that wants it wants it on every alert, and a
14
+ * per-call prop would have to be spelled at each of them. The `iconPlacement`
15
+ * prop still exists for the one call site that must differ, and wins.
16
+ *
17
+ * An alert with no title, or no icon, has no title line to put the icon on;
18
+ * `'title'` then renders exactly as `'gutter'` does.
19
+ */
20
+ export type AlertIconPlacement = 'gutter' | 'title';
21
+ /** What a host may state about alerts, on its theme. */
22
+ export interface UiAlertTheme {
23
+ iconPlacement?: AlertIconPlacement;
24
+ }
25
+ declare module '@mui/material/styles' {
26
+ interface Theme {
27
+ /** Alert layout the host states. See `Alert.placement.ts`. */
28
+ uiAlert?: UiAlertTheme;
29
+ }
30
+ interface ThemeOptions {
31
+ /** Alert layout, for every alert under this theme. See `Alert.placement.ts`. */
32
+ uiAlert?: UiAlertTheme;
33
+ }
34
+ }
35
+ /** The placement in force: the call site's, else the theme's, else `'gutter'`. */
36
+ export declare function resolveIconPlacement(theme: Theme, stated: AlertIconPlacement | undefined): AlertIconPlacement;
37
+ //# sourceMappingURL=Alert.placement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Alert.placement.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/Alert/Alert.placement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAE3D;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEpD,wDAAwD;AACxD,MAAM,WAAW,YAAY;IAC3B,aAAa,CAAC,EAAE,kBAAkB,CAAC;CACpC;AAED,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,KAAK;QACb,8DAA8D;QAC9D,OAAO,CAAC,EAAE,YAAY,CAAC;KACxB;IACD,UAAU,YAAY;QACpB,gFAAgF;QAChF,OAAO,CAAC,EAAE,YAAY,CAAC;KACxB;CACF;AAED,kFAAkF;AAClF,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,kBAAkB,GAAG,SAAS,GACrC,kBAAkB,CAEpB"}
@@ -1,8 +1,16 @@
1
1
  import type { AlertProps as MuiAlertProps } from '@mui/material/Alert/index.js';
2
2
  import type { AlertBaseFields, AlertDismiss } from './Alert.base';
3
+ import type { AlertIconPlacement } from './Alert.placement';
3
4
  export type { AlertBaseFields, AlertBaseProps, AlertDismiss, AlertVariant } from './Alert.base';
5
+ export type { AlertIconPlacement, UiAlertTheme } from './Alert.placement';
4
6
  /** The web `Alert`'s non-dismiss half: the shared fields, plus MUI's `Alert` props where they do not overlap. */
5
7
  export interface AlertBase extends AlertBaseFields, Omit<MuiAlertProps, 'variant' | 'color' | 'role' | keyof AlertBaseFields> {
8
+ /**
9
+ * Where the icon sits: its own column (`'gutter'`) or on the title's line
10
+ * (`'title'`). Unset, the theme's `uiAlert.iconPlacement` decides, else
11
+ * `'gutter'`. Web only. See `Alert.placement.ts`.
12
+ */
13
+ iconPlacement?: AlertIconPlacement;
6
14
  }
7
15
  export type AlertProps = AlertBase & AlertDismiss;
8
16
  //# sourceMappingURL=Alert.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Alert.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/Alert/Alert.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,IAAI,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAEhF,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAElE,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEhG,iHAAiH;AACjH,MAAM,WAAW,SACf,SAAQ,eAAe,EACrB,IAAI,CAAC,aAAa,EAAE,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,eAAe,CAAC;CAAG;AAEhF,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,YAAY,CAAC"}
1
+ {"version":3,"file":"Alert.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/Alert/Alert.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,IAAI,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAEhF,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAChG,YAAY,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE1E,iHAAiH;AACjH,MAAM,WAAW,SACf,SAAQ,eAAe,EACrB,IAAI,CAAC,aAAa,EAAE,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,eAAe,CAAC;IAC3E;;;;OAIG;IACH,aAAa,CAAC,EAAE,kBAAkB,CAAC;CACpC;AAED,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,YAAY,CAAC"}
@@ -1,3 +1,3 @@
1
1
  export { Alert } from './Alert';
2
- export type { AlertBaseProps, AlertProps, AlertVariant } from './Alert.types';
2
+ export type { AlertBaseProps, AlertIconPlacement, AlertProps, AlertVariant, UiAlertTheme, } from './Alert.types';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/Alert/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/Alert/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,YAAY,EACV,cAAc,EACd,kBAAkB,EAClB,UAAU,EACV,YAAY,EACZ,YAAY,GACb,MAAM,eAAe,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SettingsLayout.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/SettingsLayout/SettingsLayout.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAOjD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAoElE;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA+ExD,CAAC"}
1
+ {"version":3,"file":"SettingsLayout.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/SettingsLayout/SettingsLayout.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAOjD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AA0ElE;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA+ExD,CAAC"}
@@ -5,6 +5,8 @@ export interface RailShape {
5
5
  variant: SettingsNavVariant;
6
6
  breakpoint: SettingsRailBreakpoint;
7
7
  atIndex: boolean;
8
+ /** The rail is drawn as a card (`railVariant="card"`): denser rows, darker text. */
9
+ card?: boolean;
8
10
  }
9
11
  interface RailItemProps extends RailShape {
10
12
  item: SettingsNavItem;
@@ -16,7 +18,7 @@ interface RailItemProps extends RailShape {
16
18
  testIdPrefix: string;
17
19
  }
18
20
  /** One rail entry — a link when it has `href`, inert text when it says so, else a button. */
19
- export declare function SettingsRailItem({ item, active, linkComponent, onSelectItem, onNavigate, testIdPrefix, variant, breakpoint, }: RailItemProps): React.JSX.Element;
21
+ export declare function SettingsRailItem({ item, active, linkComponent, onSelectItem, onNavigate, testIdPrefix, variant, breakpoint, card, }: RailItemProps): React.JSX.Element;
20
22
  interface RailGroupProps extends RailShape {
21
23
  group: SettingsNavGroup;
22
24
  activeItemId?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"SettingsLayout.items.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/SettingsLayout/SettingsLayout.items.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EACV,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACvB,MAAM,wBAAwB,CAAC;AAEhC,qEAAqE;AACrE,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,kBAAkB,CAAC;IAC5B,UAAU,EAAE,sBAAsB,CAAC;IACnC,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,UAAU,aAAc,SAAQ,SAAS;IACvC,IAAI,EAAE,eAAe,CAAC;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,CAAC,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACrD,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,iFAAiF;IACjF,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;CACtB;AAgCD,6FAA6F;AAC7F,wBAAgB,gBAAgB,CAAC,EAC/B,IAAI,EACJ,MAAM,EACN,aAAa,EACb,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,OAAO,EACP,UAAU,GACX,EAAE,aAAa,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAkEnC;AAED,UAAU,cAAe,SAAQ,SAAS;IACxC,KAAK,EAAE,gBAAgB,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACrD,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;CACtB;AAsBD,6DAA6D;AAC7D,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,GAAG,KAAK,EACT,EAAE,cAAc,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAyCpC"}
1
+ {"version":3,"file":"SettingsLayout.items.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/SettingsLayout/SettingsLayout.items.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EACV,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACvB,MAAM,wBAAwB,CA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,"file":"SettingsLayout.rail.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/SettingsLayout/SettingsLayout.rail.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAG3E,OAAO,KAAK,EACV,yBAAyB,EACzB,mBAAmB,EACnB,gBAAgB,EAEhB,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;AA6GhC,MAAM,WAAW,aAAc,SAAQ,SAAS;IAC9C,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,KAAK,CAAC,SAAS,CAAC;IAClC,iBAAiB,CAAC,EAAE,yBAAyB,CAAC;IAC9C,cAAc,EAAE,gBAAgB,EAAE,CAAC;IACnC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACrD,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,4EAA4E;IAC5E,UAAU,EAAE,OAAO,CAAC;CACrB;AA4FD,qFAAqF;AACrF,MAAM,MAAM,iBAAiB,GAAG,aAAa,GAAG;IAC9C,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,0EAA0E;IAC1E,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iFAAiF;IACjF,WAAW,CAAC,EAAE,mBAAmB,CAAC;CACnC,CAAC;AAqBF,+EAA+E;AAC/E,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,WAAW,EACX,OAAO,EACP,WAAW,EACX,YAAY,EACZ,UAAkB,EAClB,WAAuB,EACvB,GAAG,SAAS,EACb,EAAE,iBAAiB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA6DvC"}
1
+ {"version":3,"file":"SettingsLayout.rail.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/SettingsLayout/SettingsLayout.rail.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAG3E,OAAO,KAAK,EACV,yBAAyB,EACzB,mBAAmB,EACnB,gBAAgB,EAEhB,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;AA6GhC,MAAM,WAAW,aAAc,SAAQ,SAAS;IAC9C,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,KAAK,CAAC,SAAS,CAAC;IAClC,iBAAiB,CAAC,EAAE,yBAAyB,CAAC;IAC9C,cAAc,EAAE,gBAAgB,EAAE,CAAC;IACnC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACrD,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,4EAA4E;IAC5E,UAAU,EAAE,OAAO,CAAC;CACrB;AA4FD,qFAAqF;AACrF,MAAM,MAAM,iBAAiB,GAAG,aAAa,GAAG;IAC9C,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,0EAA0E;IAC1E,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iFAAiF;IACjF,WAAW,CAAC,EAAE,mBAAmB,CAAC;CACnC,CAAC;AAqBF,+EAA+E;AAC/E,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,WAAW,EACX,OAAO,EACP,WAAW,EACX,YAAY,EACZ,UAAkB,EAClB,WAAuB,EACvB,GAAG,SAAS,EACb,EAAE,iBAAiB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAkEvC"}
@@ -54,6 +54,10 @@ export declare const DESCRIPTION: {
54
54
  readonly fontSize: 14.8;
55
55
  readonly opacity: 0.9;
56
56
  };
57
+ /** The icon on the title's line (`iconPlacement: 'title'`): 10px from the title. */
58
+ export declare const TITLE_ICON: {
59
+ readonly gapUnits: 1.25;
60
+ };
57
61
  /** The icon slot: MUI's 22px glyph at 0.9, 14px from the words, 2px down (MUI's 7px stays below). */
58
62
  export declare const ICON_SLOT: {
59
63
  readonly size: 22;
@@ -1 +1 @@
1
- {"version":3,"file":"Alert.metrics.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/Alert/Alert.metrics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAGjD,OAAO,EAAgB,KAAK,UAAU,EAAE,KAAK,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEpF;;;;;;;;;;GAUG;AAEH,oFAAoF;AACpF,eAAO,MAAM,kBAAkB,MAAM,CAAC;AACtC,eAAO,MAAM,mBAAmB;;;CAA6C,CAAC;AAC9E,eAAO,MAAM,mBAAmB,MAAM,CAAC;AACvC,eAAO,MAAM,YAAY,iCAAiC,CAAC;AAE3D,4EAA4E;AAC5E,eAAO,MAAM,OAAO;;;;CAA8C,CAAC;AACnE,eAAO,MAAM,SAAS;;;;CAA4C,CAAC;AACnE,oEAAoE;AACpE,eAAO,MAAM,WAAW,MA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C3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,YAAY,CAkBlF;AAED,kGAAkG;AAClG,MAAM,WAAW,YAAY;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,iBAAiB,EAAE,WAAW,CAAC,YAAY,CAAqD,CAAC;AAE9G,8FAA8F;AAC9F,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,GAAG,YAAY,CAUnF;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY,CAOzD;AAED,gFAAgF;AAChF,wBAAgB,aAAa,CAAC,OAAO,EAAE,YAAY,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,CAKjF;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,YAAY,GAAG,YAAY,CAGnE;AAED,kEAAkE;AAClE,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,YAAY,GAAG,YAAY,CAIvG"}
1
+ {"version":3,"file":"Alert.metrics.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/Alert/Alert.metrics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAGjD,OAAO,EAAgB,KAAK,UAAU,EAAE,KAAK,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEpF;;;;;;;;;;GAUG;AAEH,oFAAoF;AACpF,eAAO,MAAM,kBA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E,OAAO,EAAE,YAAY,GAAG,YAAY,CAIvG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@12-apps/ui",
3
- "version": "6.76.0",
3
+ "version": "6.77.0",
4
4
  "license": "MIT",
5
5
  "packageManager": "pnpm@10.34.5",
6
6
  "type": "module",
@@ -0,0 +1,79 @@
1
+ import AlertTitle from '@mui/material/AlertTitle/index.js';
2
+ import Box from '@mui/material/Box/index.js';
3
+ import React from 'react';
4
+
5
+ import { sxRem } from '../../../tokens/relative';
6
+
7
+ import { testIdFor } from './Alert.helpers';
8
+ import { DESCRIPTION, ICON_SLOT, TITLE, TITLE_ICON } from './Alert.metrics';
9
+ import type { AlertProps } from './Alert.types';
10
+
11
+ const BREAK_WORDS = {
12
+ wordWrap: 'break-word',
13
+ overflowWrap: 'break-word',
14
+ wordBreak: 'break-word',
15
+ } as const;
16
+
17
+ /**
18
+ * The message column: title, description, then whatever the caller put inside.
19
+ *
20
+ * `titleIcon` is the icon when it sits on the title's line
21
+ * (`iconPlacement: 'title'`, see `Alert.placement.ts`). The title then shares
22
+ * a row with it, and the description below is a sibling of that row — so it
23
+ * starts at the column's own edge rather than under the title's first letter.
24
+ */
25
+ export const AlertContent: React.FC<{
26
+ title?: AlertProps['title'];
27
+ description?: AlertProps['description'];
28
+ titleIcon?: React.ReactNode;
29
+ dataTestId?: string;
30
+ children?: React.ReactNode;
31
+ }> = ({ title, description, titleIcon, dataTestId, children }) => {
32
+ const heading = title ? (
33
+ <AlertTitle
34
+ data-testid={testIdFor(dataTestId, 'title')}
35
+ sx={{
36
+ fontWeight: TITLE.fontWeight,
37
+ fontSize: sxRem(TITLE.fontSize),
38
+ // On the icon's row the title is centred against the glyph, so MUI's
39
+ // 2px lift would only push it off that centre.
40
+ ...(titleIcon ? { margin: 0 } : { marginBottom: description ? TITLE.marginBottomUnits : 0 }),
41
+ ...BREAK_WORDS,
42
+ }}
43
+ >
44
+ {title}
45
+ </AlertTitle>
46
+ ) : null;
47
+
48
+ return (
49
+ <>
50
+ {titleIcon && heading ? (
51
+ <Box
52
+ data-testid={testIdFor(dataTestId, 'title-row')}
53
+ sx={{
54
+ display: 'flex',
55
+ alignItems: 'center',
56
+ gap: TITLE_ICON.gapUnits,
57
+ marginBottom: description ? TITLE.marginBottomUnits : 0,
58
+ '& > span': { display: 'flex', flex: 'none', fontSize: sxRem(ICON_SLOT.size) },
59
+ }}
60
+ >
61
+ {titleIcon}
62
+ {heading}
63
+ </Box>
64
+ ) : (
65
+ heading
66
+ )}
67
+ {description && (
68
+ <Box
69
+ component="div"
70
+ data-testid={testIdFor(dataTestId, 'message')}
71
+ sx={{ opacity: DESCRIPTION.opacity, fontSize: sxRem(DESCRIPTION.fontSize), ...BREAK_WORDS }}
72
+ >
73
+ {description}
74
+ </Box>
75
+ )}
76
+ {children}
77
+ </>
78
+ );
79
+ };
@@ -34,6 +34,7 @@ A beautiful and versatile Alert component with multiple variants, animations, an
34
34
  | `pulse` | `boolean` | `false` | Add a pulsing animation effect |
35
35
  | `animate` | `boolean` | `true` | Whether to animate the alert on mount |
36
36
  | `announce` | `'polite' \| 'assertive'` | - | Sets `role` and `aria-live` together — see [Accessibility](#accessibility) |
37
+ | `iconPlacement` | `'gutter' \| 'title'` | theme's `uiAlert.iconPlacement`, else `'gutter'` | Icon in its own column, or on the title's line — see [Theming](#theming) |
37
38
  | `className` | `string` | - | Additional CSS classes |
38
39
 
39
40
  ## Usage Examples
@@ -188,6 +189,23 @@ The Alert component integrates with the MUI theme system and responds to:
188
189
  - Border radius settings
189
190
  - Shadow/elevation tokens
190
191
 
192
+ ### Where the icon sits — `uiAlert.iconPlacement`
193
+
194
+ A house style, so the host states it ONCE on its theme rather than at each call:
195
+
196
+ ```ts
197
+ createTheme({ uiAlert: { iconPlacement: 'title' } });
198
+ ```
199
+
200
+ | value | layout |
201
+ |---|---|
202
+ | `'gutter'` (default) | the icon has a column of its own; title and description start to its right |
203
+ | `'title'` | the icon sits on the title's line; the description starts at the alert's edge and uses the whole line |
204
+
205
+ An alert with no title, or with `showIcon={false}`, has no title line for the
206
+ icon, so `'title'` renders as `'gutter'`. A call site that must differ passes
207
+ `iconPlacement`, which wins over the theme. Web only.
208
+
191
209
  ## Testing
192
210
 
193
211
  ### Test IDs
@@ -198,6 +216,7 @@ The Alert component integrates with the MUI theme system and responds to:
198
216
  | `alert-icon` | Icon | Alert severity icon |
199
217
  | `alert-title` | Title | Alert title text |
200
218
  | `alert-message` | Message | Alert message content |
219
+ | `alert-title-row` | Row | Icon and title together (`iconPlacement: 'title'` only) |
201
220
  | `alert-close` | Button | Close button (when closable) |
202
221
 
203
222
  Custom test IDs can be provided via the `dataTestId` prop: