@xaui/native 0.9.1-alpha.4 → 0.9.1-alpha.40

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 (203) hide show
  1. package/dist/chunk-2EGR4LWD.js +145 -0
  2. package/dist/chunk-2NRZKJG7.js +531 -0
  3. package/dist/chunk-2PMXMKS5.js +67 -0
  4. package/dist/chunk-2XPG2243.js +586 -0
  5. package/dist/chunk-36PRYGAM.js +13 -0
  6. package/dist/chunk-3E7CDKFO.cjs +696 -0
  7. package/dist/chunk-3GFRSZYR.js +54 -0
  8. package/dist/chunk-423RQBOX.js +21 -0
  9. package/dist/chunk-4CUZZWFW.js +92 -0
  10. package/dist/chunk-4GTAZM2C.js +174 -0
  11. package/dist/chunk-4KFKWBN5.cjs +89 -0
  12. package/dist/{chunk-3QBT3Q65.cjs → chunk-57SJ4LJF.cjs} +7 -2
  13. package/dist/chunk-5R26NM4M.cjs +402 -0
  14. package/dist/chunk-5VKYNBNA.js +607 -0
  15. package/dist/chunk-64MXEVT3.js +66 -0
  16. package/dist/chunk-6DOLGZVV.cjs +147 -0
  17. package/dist/chunk-6L2TS2R3.cjs +92 -0
  18. package/dist/chunk-6UEZJRVI.js +669 -0
  19. package/dist/chunk-734MFAX4.js +27 -0
  20. package/dist/chunk-73RKQC5X.js +104 -0
  21. package/dist/chunk-7DPL3ZDS.cjs +21 -0
  22. package/dist/chunk-7EIHHOHP.cjs +42 -0
  23. package/dist/chunk-7GHM4GKL.cjs +119 -0
  24. package/dist/chunk-7YF5NAHQ.cjs +74 -0
  25. package/dist/{chunk-X2K2FX3W.js → chunk-A3EGFI6T.js} +6 -1
  26. package/dist/chunk-ABAGZTXZ.cjs +736 -0
  27. package/dist/{chunk-AW63PTQ4.cjs → chunk-ACAPTWE3.cjs} +85 -81
  28. package/dist/chunk-AMCSSOJT.cjs +104 -0
  29. package/dist/chunk-BA2DBSAN.js +102 -0
  30. package/dist/chunk-BRRXFOBY.js +431 -0
  31. package/dist/chunk-C5YLPCFC.cjs +293 -0
  32. package/dist/chunk-DA3OKXHV.cjs +700 -0
  33. package/dist/chunk-DD4276RF.js +366 -0
  34. package/dist/chunk-DG2I4PJG.js +701 -0
  35. package/dist/chunk-DHGLGSH6.js +661 -0
  36. package/dist/chunk-DIBUQ46Y.js +346 -0
  37. package/dist/chunk-EGLLDKN6.js +9 -0
  38. package/dist/chunk-EJQCQPET.cjs +9 -0
  39. package/dist/chunk-EKS3W46M.cjs +66 -0
  40. package/dist/chunk-EZEYMLO3.js +402 -0
  41. package/dist/chunk-F6CQ6CBI.cjs +112 -0
  42. package/dist/chunk-F6W3JQ7K.js +42 -0
  43. package/dist/chunk-FHUYHV6J.js +89 -0
  44. package/dist/chunk-FNEUOBCV.cjs +174 -0
  45. package/dist/chunk-G7P3ERYF.cjs +478 -0
  46. package/dist/chunk-GA6PBWNT.js +147 -0
  47. package/dist/chunk-GFUZ3MUT.cjs +455 -0
  48. package/dist/chunk-GGW43Q37.cjs +1 -0
  49. package/dist/chunk-GTR5X65M.cjs +27 -0
  50. package/dist/chunk-H4E4HDEP.cjs +13 -0
  51. package/dist/chunk-H7DS4IO7.js +198 -0
  52. package/dist/chunk-HDVVZG4S.cjs +198 -0
  53. package/dist/chunk-IKJVLJKT.js +151 -0
  54. package/dist/chunk-J3MB4PI5.cjs +531 -0
  55. package/dist/chunk-K72UDPVN.js +119 -0
  56. package/dist/chunk-KCMYU7WF.js +86 -0
  57. package/dist/chunk-LRN3RNDO.js +940 -0
  58. package/dist/chunk-LTX6TB5I.js +124 -0
  59. package/dist/chunk-LUPCPLND.cjs +145 -0
  60. package/dist/chunk-M63GFNKV.js +194 -0
  61. package/dist/chunk-N3KTZMPG.js +293 -0
  62. package/dist/chunk-NCTOTTVW.js +13 -0
  63. package/dist/chunk-NWGLP6JX.cjs +410 -0
  64. package/dist/chunk-R73XQK7X.cjs +314 -0
  65. package/dist/chunk-RU7JCMWC.cjs +881 -0
  66. package/dist/chunk-SNIHUKDA.cjs +184 -0
  67. package/dist/chunk-T5FV5F7A.cjs +607 -0
  68. package/dist/chunk-TDTUAIFF.cjs +153 -0
  69. package/dist/chunk-TJ74XVZN.cjs +431 -0
  70. package/dist/chunk-TK44VBIE.cjs +194 -0
  71. package/dist/chunk-UAWBAD4E.cjs +346 -0
  72. package/dist/chunk-UFTCTTKK.js +381 -0
  73. package/dist/chunk-WDDXU3OH.cjs +67 -0
  74. package/dist/chunk-WFEMJCXO.cjs +13 -0
  75. package/dist/chunk-WHJTBTYM.js +0 -0
  76. package/dist/{chunk-2KXQATVL.js → chunk-WKCQ6VGW.js} +59 -55
  77. package/dist/chunk-XFPQFCEK.js +455 -0
  78. package/dist/chunk-XSQPVDFH.cjs +60 -0
  79. package/dist/chunk-XTC2SLFT.js +153 -0
  80. package/dist/chunk-XV735BSA.cjs +366 -0
  81. package/dist/chunk-XWNG2U4K.cjs +124 -0
  82. package/dist/chunk-YGYYJ3LQ.js +314 -0
  83. package/dist/chunk-YVHT2UVW.js +74 -0
  84. package/dist/chunk-ZFOOJK37.cjs +86 -0
  85. package/dist/close-button.type-BUYuoSt2.d.ts +36 -0
  86. package/dist/close-button.type-CHsgZ3wO.d.cts +36 -0
  87. package/dist/components/accordion/index.cjs +35 -0
  88. package/dist/components/accordion/index.d.cts +299 -0
  89. package/dist/components/accordion/index.d.ts +299 -0
  90. package/dist/components/accordion/index.js +35 -0
  91. package/dist/components/alert/index.cjs +20 -0
  92. package/dist/components/alert/index.d.cts +169 -0
  93. package/dist/components/alert/index.d.ts +169 -0
  94. package/dist/components/alert/index.js +20 -0
  95. package/dist/components/avatar/index.cjs +16 -0
  96. package/dist/components/avatar/index.d.cts +131 -0
  97. package/dist/components/avatar/index.d.ts +131 -0
  98. package/dist/components/avatar/index.js +16 -0
  99. package/dist/components/badge/index.cjs +15 -0
  100. package/dist/components/badge/index.d.cts +157 -0
  101. package/dist/components/badge/index.d.ts +157 -0
  102. package/dist/components/badge/index.js +15 -0
  103. package/dist/components/button/index.cjs +22 -0
  104. package/dist/components/button/index.d.cts +613 -0
  105. package/dist/components/button/index.d.ts +613 -0
  106. package/dist/components/button/index.js +22 -0
  107. package/dist/components/card/index.cjs +22 -0
  108. package/dist/components/card/index.d.cts +620 -0
  109. package/dist/components/card/index.d.ts +620 -0
  110. package/dist/components/card/index.js +22 -0
  111. package/dist/components/checkbox/index.cjs +26 -0
  112. package/dist/components/checkbox/index.d.cts +1136 -0
  113. package/dist/components/checkbox/index.d.ts +1136 -0
  114. package/dist/components/checkbox/index.js +26 -0
  115. package/dist/components/chip/index.cjs +20 -0
  116. package/dist/components/chip/index.d.cts +608 -0
  117. package/dist/components/chip/index.d.ts +608 -0
  118. package/dist/components/chip/index.js +20 -0
  119. package/dist/components/divider/index.cjs +13 -0
  120. package/dist/components/divider/index.d.cts +117 -0
  121. package/dist/components/divider/index.d.ts +117 -0
  122. package/dist/components/divider/index.js +13 -0
  123. package/dist/components/field-group/index.cjs +27 -0
  124. package/dist/components/field-group/index.d.cts +270 -0
  125. package/dist/components/field-group/index.d.ts +270 -0
  126. package/dist/components/field-group/index.js +27 -0
  127. package/dist/components/input-otp/index.cjs +29 -0
  128. package/dist/components/input-otp/index.d.cts +325 -0
  129. package/dist/components/input-otp/index.d.ts +325 -0
  130. package/dist/components/input-otp/index.js +29 -0
  131. package/dist/components/menu/index.cjs +49 -0
  132. package/dist/components/menu/index.d.cts +351 -0
  133. package/dist/components/menu/index.d.ts +351 -0
  134. package/dist/components/menu/index.js +49 -0
  135. package/dist/components/popover/index.cjs +38 -0
  136. package/dist/components/popover/index.d.cts +254 -0
  137. package/dist/components/popover/index.d.ts +254 -0
  138. package/dist/components/popover/index.js +38 -0
  139. package/dist/components/radio/index.cjs +26 -0
  140. package/dist/components/radio/index.d.cts +1102 -0
  141. package/dist/components/radio/index.d.ts +1102 -0
  142. package/dist/components/radio/index.js +26 -0
  143. package/dist/components/select/index.cjs +50 -0
  144. package/dist/components/select/index.d.cts +498 -0
  145. package/dist/components/select/index.d.ts +498 -0
  146. package/dist/components/select/index.js +50 -0
  147. package/dist/components/skeleton/index.cjs +11 -0
  148. package/dist/components/skeleton/index.d.cts +111 -0
  149. package/dist/components/skeleton/index.d.ts +111 -0
  150. package/dist/components/skeleton/index.js +11 -0
  151. package/dist/components/spinner/index.cjs +17 -0
  152. package/dist/components/spinner/index.d.cts +104 -0
  153. package/dist/components/spinner/index.d.ts +104 -0
  154. package/dist/components/spinner/index.js +17 -0
  155. package/dist/components/switch/index.cjs +27 -0
  156. package/dist/components/switch/index.d.cts +1154 -0
  157. package/dist/components/switch/index.d.ts +1154 -0
  158. package/dist/components/switch/index.js +27 -0
  159. package/dist/components/text-area/index.cjs +14 -0
  160. package/dist/components/text-area/index.d.cts +73 -0
  161. package/dist/components/text-area/index.d.ts +73 -0
  162. package/dist/components/text-area/index.js +14 -0
  163. package/dist/components/text-field/index.cjs +25 -0
  164. package/dist/components/text-field/index.d.cts +205 -0
  165. package/dist/components/text-field/index.d.ts +205 -0
  166. package/dist/components/text-field/index.js +25 -0
  167. package/dist/components/typography/index.cjs +15 -0
  168. package/dist/components/typography/index.d.cts +116 -0
  169. package/dist/components/typography/index.d.ts +116 -0
  170. package/dist/components/typography/index.js +15 -0
  171. package/dist/components/view/index.cjs +17 -0
  172. package/dist/components/view/index.d.cts +152 -0
  173. package/dist/components/view/index.d.ts +152 -0
  174. package/dist/components/view/index.js +17 -0
  175. package/dist/create-recipe-BdVd2ffi.d.ts +114 -0
  176. package/dist/create-recipe-dC7wMfnj.d.cts +114 -0
  177. package/dist/icon.type-Kml72iSz.d.ts +73 -0
  178. package/dist/icon.type-d_i9ma-i.d.cts +73 -0
  179. package/dist/index.cjs +400 -4
  180. package/dist/index.d.cts +118 -4
  181. package/dist/index.d.ts +118 -4
  182. package/dist/index.js +423 -27
  183. package/dist/placement-DHa0Rrh1.d.cts +38 -0
  184. package/dist/placement-DHa0Rrh1.d.ts +38 -0
  185. package/dist/pressable-feedback.type-BA2C9sSz.d.cts +127 -0
  186. package/dist/pressable-feedback.type-Bs4dQlGj.d.ts +127 -0
  187. package/dist/style-props.type-CfnoGEP7.d.cts +31 -0
  188. package/dist/style-props.type-CfnoGEP7.d.ts +31 -0
  189. package/dist/system/index.cjs +73 -4
  190. package/dist/system/index.d.cts +379 -193
  191. package/dist/system/index.d.ts +379 -193
  192. package/dist/system/index.js +87 -18
  193. package/dist/text-field.type-0l73acce.d.ts +167 -0
  194. package/dist/text-field.type-DBh06DU5.d.cts +167 -0
  195. package/dist/theme/index.cjs +5 -3
  196. package/dist/theme/index.d.cts +55 -24
  197. package/dist/theme/index.d.ts +55 -24
  198. package/dist/theme/index.js +4 -2
  199. package/dist/{theme.type-C9bFJKFm.d.cts → theme.type-C2gNHpEx.d.cts} +1 -1
  200. package/dist/{theme.type-C9bFJKFm.d.ts → theme.type-C2gNHpEx.d.ts} +1 -1
  201. package/package.json +254 -18
  202. package/dist/chunk-ECDWSSHJ.js +0 -688
  203. package/dist/chunk-IYFGO523.cjs +0 -688
@@ -0,0 +1,299 @@
1
+ import * as react_native from 'react-native';
2
+ import { StyleProp, ViewStyle, TextStyle, ViewProps, PressableProps, View } from 'react-native';
3
+ import * as react from 'react';
4
+ import { ComponentType, ReactNode } from 'react';
5
+ import { V as ViewStyleProps } from '../../style-props.type-CfnoGEP7.js';
6
+ import { S as Size, R as RadiusKey, X as XAUITheme } from '../../theme.type-C2gNHpEx.js';
7
+ import { b as IconComponentProps, I as IconContextValue } from '../../icon.type-Kml72iSz.js';
8
+ import { R as Recipe, S as SlotStyles, a as StyleFn } from '../../create-recipe-BdVd2ffi.js';
9
+ import * as react_native_reanimated from 'react-native-reanimated';
10
+
11
+ type AccordionSlot = 'root'
12
+ /** The clipping layer inside the root. See the recipe for why it is not the root. */
13
+ | 'container' | 'separator' | 'item' | 'trigger' | 'indicator' | 'content';
14
+ /**
15
+ * Four emphasis levels, no intent — `danger` on a list of expandable rows would be
16
+ * colouring a container rather than reporting a meaning.
17
+ *
18
+ * The ladder descends without a gap: `primary` is the strong fill, `secondary` the
19
+ * quieter one, `tertiary` an edge with nothing behind it, `ghost` nothing at all. Neither
20
+ * the `Button`'s five nor the `Card`'s four read that cleanly — both put `default`
21
+ * somewhere in the middle of an order it does not name a position in.
22
+ *
23
+ * `ghost` is the default here, and it is HeroUI's own `default`: rows separated by
24
+ * hairlines, on whatever page they sit on. `primary` is their `surface`.
25
+ */
26
+ type AccordionVariant = 'primary' | 'secondary' | 'tertiary' | 'ghost';
27
+ type AccordionSize = Size;
28
+ /** One open at a time, or as many as the reader wants. */
29
+ type AccordionSelectionMode = 'single' | 'multiple';
30
+ /** A string in `single` mode, a list of them in `multiple`. */
31
+ type AccordionValue = string | readonly string[];
32
+ type AccordionOwnProps = {
33
+ children?: ReactNode;
34
+ variant?: AccordionVariant;
35
+ size?: AccordionSize;
36
+ radius?: RadiusKey;
37
+ /** The tint (R7) — a raw value, never a token. */
38
+ color?: string;
39
+ selectionMode?: AccordionSelectionMode;
40
+ /** Controlled. Leave unset and the root owns it. */
41
+ value?: AccordionValue;
42
+ defaultValue?: AccordionValue;
43
+ onValueChange?: (value: AccordionValue) => void;
44
+ isDisabled?: boolean;
45
+ /**
46
+ * Whether an open item can be closed by pressing it again. Off, the accordion always
47
+ * has one item open — which is what a set of tabs pretending to be an accordion needs.
48
+ *
49
+ * @default true
50
+ */
51
+ isCollapsible?: boolean;
52
+ /** The hairline between rows. It is the only thing separating them in `ghost`. */
53
+ hasSeparator?: boolean;
54
+ asChild?: boolean;
55
+ };
56
+ type AccordionProps = AccordionOwnProps & Omit<ViewProps, keyof AccordionOwnProps> & Omit<ViewStyleProps, keyof AccordionOwnProps | keyof ViewProps>;
57
+ type AccordionItemOwnProps = {
58
+ /** What identifies this row in the root's value. */
59
+ value: string;
60
+ isDisabled?: boolean;
61
+ children?: ReactNode | ((state: AccordionItemRenderState) => ReactNode);
62
+ };
63
+ type AccordionItemProps = AccordionItemOwnProps & Omit<ViewProps, keyof AccordionItemOwnProps> & Omit<ViewStyleProps, keyof AccordionItemOwnProps | keyof ViewProps>;
64
+ /** What an item's render function is handed, so a row can paint its own open state. */
65
+ type AccordionItemRenderState = {
66
+ isExpanded: boolean;
67
+ isDisabled: boolean;
68
+ value: string;
69
+ };
70
+ type AccordionTriggerOwnProps = {
71
+ children?: ReactNode;
72
+ asChild?: boolean;
73
+ };
74
+ type AccordionTriggerProps = AccordionTriggerOwnProps & Omit<PressableProps, keyof AccordionTriggerOwnProps> & Omit<ViewStyleProps, keyof AccordionTriggerOwnProps | keyof PressableProps>;
75
+ /** The chevron, turning with the panel. */
76
+ type AccordionIndicatorProps = {
77
+ /** The glyph. Defaults to the chevron the library ships. */
78
+ as?: ComponentType<IconComponentProps>;
79
+ size?: number;
80
+ /** A raw value (R7), never a token. */
81
+ color?: string;
82
+ };
83
+ type AccordionContentOwnProps = {
84
+ children?: ReactNode;
85
+ };
86
+ type AccordionContentProps = AccordionContentOwnProps & Omit<ViewProps, keyof AccordionContentOwnProps> & Omit<ViewStyleProps, keyof AccordionContentOwnProps | keyof ViewProps>;
87
+ /** R5 — resolved style ids and the state the slots read. No slot re-resolves anything. */
88
+ type AccordionContextValue = {
89
+ separatorStyle: StyleProp<ViewStyle>;
90
+ itemStyle: StyleProp<ViewStyle>;
91
+ triggerStyle: StyleProp<ViewStyle>;
92
+ triggerPressedStyle: StyleProp<ViewStyle>;
93
+ indicatorStyle: StyleProp<ViewStyle>;
94
+ contentStyle: StyleProp<ViewStyle>;
95
+ /** Text colour for a stringifiable trigger child, wrapped the way R3 asks. */
96
+ labelStyle: StyleProp<TextStyle>;
97
+ glyph: IconContextValue;
98
+ isDisabled: boolean;
99
+ isExpanded: (value: string) => boolean;
100
+ toggle: (value: string) => void;
101
+ };
102
+ /** One row's own state. Everything visual still comes from `useAccordion()`. */
103
+ type AccordionItemContextValue = {
104
+ value: string;
105
+ isExpanded: boolean;
106
+ isDisabled: boolean;
107
+ };
108
+
109
+ /**
110
+ * The chevron, turning with the panel.
111
+ *
112
+ * The same spring as the `Select`'s, for the same reason: a 180-degree turn on a timing
113
+ * curve reads as an animation playing beside the row, and on a spring heavy enough not to
114
+ * overshoot it reads as the panel pushing the glyph round. It is a worklet, so it keeps
115
+ * turning while the panel's content mounts.
116
+ */
117
+ declare function AccordionIndicator({ as, ...props }: AccordionIndicatorProps): react.JSX.Element;
118
+ declare namespace AccordionIndicator {
119
+ var displayName: string;
120
+ }
121
+
122
+ /**
123
+ * A list of rows that open.
124
+ *
125
+ * ```tsx
126
+ * <Accordion defaultValue="shipping">
127
+ * <Accordion.Item value="shipping">
128
+ * <Accordion.Trigger>
129
+ * Livraison
130
+ * <Accordion.Indicator />
131
+ * </Accordion.Trigger>
132
+ * <Accordion.Content>
133
+ * <Text>Sous trois jours ouvrés.</Text>
134
+ * </Accordion.Content>
135
+ * </Accordion.Item>
136
+ * </Accordion>
137
+ * ```
138
+ *
139
+ * The separators are the root's, drawn between the children rather than by them. A row
140
+ * that drew its own would draw one under the last item too, and every accordion would
141
+ * start by hiding it.
142
+ */
143
+ declare const AccordionRoot: react.ForwardRefExoticComponent<{
144
+ children?: react.ReactNode;
145
+ variant?: AccordionVariant;
146
+ size?: AccordionSize;
147
+ radius?: RadiusKey;
148
+ color?: string;
149
+ selectionMode?: AccordionSelectionMode;
150
+ value?: AccordionValue;
151
+ defaultValue?: AccordionValue;
152
+ onValueChange?: (value: AccordionValue) => void;
153
+ isDisabled?: boolean;
154
+ isCollapsible?: boolean;
155
+ hasSeparator?: boolean;
156
+ asChild?: boolean;
157
+ } & Omit<react_native.ViewProps, keyof {
158
+ children?: react.ReactNode;
159
+ variant?: AccordionVariant;
160
+ size?: AccordionSize;
161
+ radius?: RadiusKey;
162
+ color?: string;
163
+ selectionMode?: AccordionSelectionMode;
164
+ value?: AccordionValue;
165
+ defaultValue?: AccordionValue;
166
+ onValueChange?: (value: AccordionValue) => void;
167
+ isDisabled?: boolean;
168
+ isCollapsible?: boolean;
169
+ hasSeparator?: boolean;
170
+ asChild?: boolean;
171
+ }> & Omit<ViewStyleProps, "color" | "value" | "pointerEvents" | "style" | "children" | "size" | "hitSlop" | "id" | "needsOffscreenAlphaCompositing" | "onLayout" | "removeClippedSubviews" | "testID" | "nativeID" | "collapsable" | "collapsableChildren" | "onBlur" | "onFocus" | "renderToHardwareTextureAndroid" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-modal" | "role" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "screenReaderFocusable" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "accessibilityRespondsToUserInteraction" | "variant" | "radius" | "selectionMode" | "defaultValue" | "onValueChange" | "isDisabled" | "isCollapsible" | "hasSeparator" | "asChild"> & react.RefAttributes<View>>;
172
+
173
+ /**
174
+ * The panel.
175
+ *
176
+ * **It is mounted or it is not** — there is no measured height anywhere in this component,
177
+ * and no `maxHeight` either. The row's layout transition animates the height between the
178
+ * two states, which is what lets a panel whose content grows afterwards — an image
179
+ * loading, a list filling — grow with it instead of being stuck at whatever it measured.
180
+ *
181
+ * It fades rather than sliding. The height is already moving underneath it, and two
182
+ * things travelling at once reads as the panel fighting itself.
183
+ */
184
+ declare const AccordionContent: react.ForwardRefExoticComponent<{
185
+ children?: react.ReactNode;
186
+ } & Omit<react_native.ViewProps, "children"> & Omit<ViewStyleProps, keyof react_native.ViewProps> & react.RefAttributes<View>>;
187
+
188
+ /**
189
+ * One row: its trigger, and the panel under it.
190
+ *
191
+ * The height animation lives here rather than on the content, because the height that
192
+ * changes is the row's. `overflow: 'hidden'` on it is what turns a mounted panel into one
193
+ * unrolling — without it the content is drawn outside the row from the first frame.
194
+ *
195
+ * `children` may be a function, which is how a row paints its own open state without the
196
+ * caller wiring `useAccordionItem` themselves.
197
+ */
198
+ declare const AccordionItem: react.ForwardRefExoticComponent<{
199
+ value: string;
200
+ isDisabled?: boolean;
201
+ children?: react.ReactNode | ((state: AccordionItemRenderState) => react.ReactNode);
202
+ } & Omit<react_native.ViewProps, keyof {
203
+ value: string;
204
+ isDisabled?: boolean;
205
+ children?: react.ReactNode | ((state: AccordionItemRenderState) => react.ReactNode);
206
+ }> & Omit<ViewStyleProps, "value" | "pointerEvents" | "style" | "children" | "hitSlop" | "id" | "needsOffscreenAlphaCompositing" | "onLayout" | "removeClippedSubviews" | "testID" | "nativeID" | "collapsable" | "collapsableChildren" | "onBlur" | "onFocus" | "renderToHardwareTextureAndroid" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-modal" | "role" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "screenReaderFocusable" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "accessibilityRespondsToUserInteraction" | "isDisabled"> & react.RefAttributes<View>>;
207
+
208
+ /**
209
+ * The row you press. It carries `expanded` for a screen reader, which is the only thing
210
+ * telling one whether the panel under it is open — the chevron says nothing out loud.
211
+ */
212
+ declare const AccordionTrigger: react.ForwardRefExoticComponent<{
213
+ children?: ReactNode;
214
+ asChild?: boolean;
215
+ } & Omit<react_native.PressableProps, keyof {
216
+ children?: ReactNode;
217
+ asChild?: boolean;
218
+ }> & Omit<ViewStyleProps, "pointerEvents" | "style" | "children" | "hitSlop" | "id" | "needsOffscreenAlphaCompositing" | "onLayout" | "removeClippedSubviews" | "testID" | "nativeID" | "collapsable" | "collapsableChildren" | "onBlur" | "onFocus" | "renderToHardwareTextureAndroid" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-modal" | "role" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "screenReaderFocusable" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "accessibilityRespondsToUserInteraction" | "disabled" | "onPress" | "onPressIn" | "onPressOut" | "onLongPress" | "delayLongPress" | "asChild" | "onHoverIn" | "onHoverOut" | "cancelable" | "delayHoverIn" | "delayHoverOut" | "pressRetentionOffset" | "android_disableSound" | "android_ripple" | "testOnly_pressed" | "unstable_pressDelay"> & react.RefAttributes<View>>;
219
+
220
+ declare const useAccordion: () => AccordionContextValue;
221
+ declare const useAccordionItem: () => AccordionItemContextValue;
222
+
223
+ declare const accordionRecipe: Recipe<"separator" | "root" | "container" | "item" | "trigger" | "indicator" | "content", AccordionVariant, {
224
+ readonly size: {
225
+ readonly xs: (theme: XAUITheme) => SlotStyles<AccordionSlot>;
226
+ readonly sm: (theme: XAUITheme) => SlotStyles<AccordionSlot>;
227
+ readonly md: (theme: XAUITheme) => SlotStyles<AccordionSlot>;
228
+ readonly lg: (theme: XAUITheme) => SlotStyles<AccordionSlot>;
229
+ };
230
+ readonly radius: Record<RadiusKey, StyleFn<"root" | "container">>;
231
+ }>;
232
+
233
+ /**
234
+ * How the panel opens.
235
+ *
236
+ * There is no measured height anywhere in this component: the content is mounted or it is
237
+ * not, and Reanimated's layout transition animates the row's height between the two.
238
+ * Measuring it ourselves would mean a hidden pass on every open, and a panel whose
239
+ * content grows afterwards — an image loading, a list filling — would be stuck at the
240
+ * height it had when it was measured.
241
+ *
242
+ * HeroUI's spring, and stiffer than the chevron's: 1600 against 1000. A height is a
243
+ * bigger distance than a rotation, and at the chevron's stiffness the same damping makes
244
+ * a long panel take almost half a second to settle.
245
+ */
246
+ declare const LAYOUT: react_native_reanimated.ComplexAnimationBuilder;
247
+
248
+ declare const Accordion: react.ForwardRefExoticComponent<{
249
+ children?: react.ReactNode;
250
+ variant?: AccordionVariant;
251
+ size?: AccordionSize;
252
+ radius?: RadiusKey;
253
+ color?: string;
254
+ selectionMode?: AccordionSelectionMode;
255
+ value?: AccordionValue;
256
+ defaultValue?: AccordionValue;
257
+ onValueChange?: (value: AccordionValue) => void;
258
+ isDisabled?: boolean;
259
+ isCollapsible?: boolean;
260
+ hasSeparator?: boolean;
261
+ asChild?: boolean;
262
+ } & Omit<react_native.ViewProps, keyof {
263
+ children?: react.ReactNode;
264
+ variant?: AccordionVariant;
265
+ size?: AccordionSize;
266
+ radius?: RadiusKey;
267
+ color?: string;
268
+ selectionMode?: AccordionSelectionMode;
269
+ value?: AccordionValue;
270
+ defaultValue?: AccordionValue;
271
+ onValueChange?: (value: AccordionValue) => void;
272
+ isDisabled?: boolean;
273
+ isCollapsible?: boolean;
274
+ hasSeparator?: boolean;
275
+ asChild?: boolean;
276
+ }> & Omit<ViewStyleProps, "color" | "value" | "pointerEvents" | "style" | "children" | "size" | "hitSlop" | "id" | "needsOffscreenAlphaCompositing" | "onLayout" | "removeClippedSubviews" | "testID" | "nativeID" | "collapsable" | "collapsableChildren" | "onBlur" | "onFocus" | "renderToHardwareTextureAndroid" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-modal" | "role" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "screenReaderFocusable" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "accessibilityRespondsToUserInteraction" | "variant" | "radius" | "selectionMode" | "defaultValue" | "onValueChange" | "isDisabled" | "isCollapsible" | "hasSeparator" | "asChild"> & react.RefAttributes<react_native.View>> & {
277
+ Item: react.ForwardRefExoticComponent<{
278
+ value: string;
279
+ isDisabled?: boolean;
280
+ children?: react.ReactNode | ((state: AccordionItemRenderState) => react.ReactNode);
281
+ } & Omit<react_native.ViewProps, keyof {
282
+ value: string;
283
+ isDisabled?: boolean;
284
+ children?: react.ReactNode | ((state: AccordionItemRenderState) => react.ReactNode);
285
+ }> & Omit<ViewStyleProps, "value" | "pointerEvents" | "style" | "children" | "hitSlop" | "id" | "needsOffscreenAlphaCompositing" | "onLayout" | "removeClippedSubviews" | "testID" | "nativeID" | "collapsable" | "collapsableChildren" | "onBlur" | "onFocus" | "renderToHardwareTextureAndroid" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-modal" | "role" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "screenReaderFocusable" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "accessibilityRespondsToUserInteraction" | "isDisabled"> & react.RefAttributes<react_native.View>>;
286
+ Trigger: react.ForwardRefExoticComponent<{
287
+ children?: react.ReactNode;
288
+ asChild?: boolean;
289
+ } & Omit<react_native.PressableProps, keyof {
290
+ children?: react.ReactNode;
291
+ asChild?: boolean;
292
+ }> & Omit<ViewStyleProps, "pointerEvents" | "style" | "children" | "hitSlop" | "id" | "needsOffscreenAlphaCompositing" | "onLayout" | "removeClippedSubviews" | "testID" | "nativeID" | "collapsable" | "collapsableChildren" | "onBlur" | "onFocus" | "renderToHardwareTextureAndroid" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-modal" | "role" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "screenReaderFocusable" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "accessibilityRespondsToUserInteraction" | "disabled" | "onPress" | "onPressIn" | "onPressOut" | "onLongPress" | "delayLongPress" | "asChild" | "onHoverIn" | "onHoverOut" | "cancelable" | "delayHoverIn" | "delayHoverOut" | "pressRetentionOffset" | "android_disableSound" | "android_ripple" | "testOnly_pressed" | "unstable_pressDelay"> & react.RefAttributes<react_native.View>>;
293
+ Indicator: typeof AccordionIndicator;
294
+ Content: react.ForwardRefExoticComponent<{
295
+ children?: react.ReactNode;
296
+ } & Omit<react_native.ViewProps, "children"> & Omit<ViewStyleProps, keyof react_native.ViewProps> & react.RefAttributes<react_native.View>>;
297
+ };
298
+
299
+ export { Accordion, AccordionContent, type AccordionContentProps, type AccordionContextValue, AccordionIndicator, type AccordionIndicatorProps, AccordionItem, type AccordionItemContextValue, type AccordionItemProps, type AccordionItemRenderState, type AccordionProps, AccordionRoot, type AccordionSelectionMode, type AccordionSize, type AccordionSlot, AccordionTrigger, type AccordionTriggerProps, type AccordionValue, type AccordionVariant, LAYOUT as accordionLayoutTransition, accordionRecipe, useAccordion, useAccordionItem };
@@ -0,0 +1,35 @@
1
+ import {
2
+ Accordion,
3
+ AccordionContent,
4
+ AccordionIndicator,
5
+ AccordionItem,
6
+ AccordionRoot,
7
+ AccordionTrigger,
8
+ LAYOUT,
9
+ accordionRecipe,
10
+ useAccordion,
11
+ useAccordionItem
12
+ } from "../../chunk-2XPG2243.js";
13
+ import "../../chunk-64MXEVT3.js";
14
+ import "../../chunk-FHUYHV6J.js";
15
+ import "../../chunk-F6W3JQ7K.js";
16
+ import "../../chunk-6UEZJRVI.js";
17
+ import "../../chunk-423RQBOX.js";
18
+ import "../../chunk-EGLLDKN6.js";
19
+ import "../../chunk-4GTAZM2C.js";
20
+ import "../../chunk-A3EGFI6T.js";
21
+ import "../../chunk-K72UDPVN.js";
22
+ import "../../chunk-36PRYGAM.js";
23
+ import "../../chunk-M63GFNKV.js";
24
+ export {
25
+ Accordion,
26
+ AccordionContent,
27
+ AccordionIndicator,
28
+ AccordionItem,
29
+ AccordionRoot,
30
+ AccordionTrigger,
31
+ LAYOUT as accordionLayoutTransition,
32
+ accordionRecipe,
33
+ useAccordion,
34
+ useAccordionItem
35
+ };
@@ -0,0 +1,20 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+ var _chunkXV735BSAcjs = require('../../chunk-XV735BSA.cjs');
6
+ require('../../chunk-ZFOOJK37.cjs');
7
+ require('../../chunk-4KFKWBN5.cjs');
8
+ require('../../chunk-3E7CDKFO.cjs');
9
+ require('../../chunk-7DPL3ZDS.cjs');
10
+ require('../../chunk-EJQCQPET.cjs');
11
+ require('../../chunk-FNEUOBCV.cjs');
12
+ require('../../chunk-57SJ4LJF.cjs');
13
+ require('../../chunk-7GHM4GKL.cjs');
14
+ require('../../chunk-H4E4HDEP.cjs');
15
+ require('../../chunk-TK44VBIE.cjs');
16
+
17
+
18
+
19
+
20
+ exports.Alert = _chunkXV735BSAcjs.Alert; exports.alertRecipe = _chunkXV735BSAcjs.alertRecipe; exports.useAlert = _chunkXV735BSAcjs.useAlert;
@@ -0,0 +1,169 @@
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
3
+ import * as react_native from 'react-native';
4
+ import { StyleProp, ViewStyle, TextStyle, ViewProps, TextProps } from 'react-native';
5
+ import { V as ViewStyleProps, T as TextStyleProps } from '../../style-props.type-CfnoGEP7.cjs';
6
+ import { S as Size, R as RadiusKey, X as XAUITheme } from '../../theme.type-C2gNHpEx.cjs';
7
+ import { I as IconContextValue, a as IconProps } from '../../icon.type-d_i9ma-i.cjs';
8
+ import { C as CloseButtonProps } from '../../close-button.type-CHsgZ3wO.cjs';
9
+ import { R as Recipe, S as SlotStyles, a as StyleFn } from '../../create-recipe-dC7wMfnj.cjs';
10
+ import '../../pressable-feedback.type-BA2C9sSz.cjs';
11
+ import 'react-native-reanimated';
12
+
13
+ type AlertSlot = 'root' | 'icon' | 'iconGlyph' | 'content' | 'title' | 'description' | 'close' | 'closeGlyph';
14
+ /**
15
+ * Nine names: the surface, the accent in two weights, and the three status families in
16
+ * theirs. An alert is the one component in the library that is **both** a surface and a
17
+ * report, so it takes the emphasis vocabulary of the `Card` for its neutral level and the
18
+ * status vocabulary of the `Chip` for the rest.
19
+ *
20
+ * - **`default`** — the `surface` fill and the surface shadow, exactly the `Card`'s
21
+ * `default`. This is HeroUI's alert: a neutral card, with the status carried by the icon
22
+ * rather than by the background.
23
+ * - **`primary` / `secondary`** — the full accent and its soft slice, for the
24
+ * informational alert that is not an outcome.
25
+ * - **`success` / `warning` / `danger`**, each with a `-soft` slice — the tinted surface
26
+ * most alerts want, and the solid fill for the banner that has to stop the reader.
27
+ *
28
+ * `tertiary` and `ghost` are absent: an alert without a surface is a paragraph, and the
29
+ * outline case is `default` with `borderWidth` and `borderColor` as style props (R14).
30
+ */
31
+ type AlertVariant = 'default' | 'primary' | 'secondary' | 'success' | 'success-soft' | 'warning' | 'warning-soft' | 'danger' | 'danger-soft';
32
+ type AlertSize = Size;
33
+ /**
34
+ * What the `Alert` itself understands. R14 — a name in here is the component's, so the
35
+ * style prop that shares it is not exposed: `size` is the alert's scale and never
36
+ * `ViewStyle`'s, and `color` is R7's tint.
37
+ */
38
+ type AlertOwnProps = {
39
+ variant?: AlertVariant;
40
+ /**
41
+ * Padding, gaps, radius and the type of `Title` and `Description`. **Never a height**:
42
+ * an alert is a surface, and it is as tall as the message it carries.
43
+ */
44
+ size?: AlertSize;
45
+ /** Overrides the radius `size` chose. */
46
+ radius?: RadiusKey;
47
+ /**
48
+ * A raw tint (`'#7c3aed'`), never a token (R7). It paints the fill and, through its
49
+ * OKLab-contrasted slice, the title and the icon — so a brand-coloured alert stays
50
+ * readable without being told a second colour.
51
+ */
52
+ color?: string;
53
+ /** Dims the alert, and reaches the close inside it. */
54
+ isDisabled?: boolean;
55
+ style?: StyleProp<ViewStyle>;
56
+ children?: ReactNode;
57
+ };
58
+ /**
59
+ * R14 — the alert's own props, `View`'s, and every `ViewStyle` key neither already
60
+ * claims. There is no press behaviour here, deliberately: an alert reports, it is not a
61
+ * control. A dismissible one carries an `Alert.Close`, which is the control.
62
+ */
63
+ type AlertProps = AlertOwnProps & Omit<ViewProps, keyof AlertOwnProps> & Omit<ViewStyleProps, keyof AlertOwnProps | keyof ViewProps> & {
64
+ /** R12 — merge into the single child instead of rendering a `View`. */
65
+ asChild?: boolean;
66
+ };
67
+ /** `View`'s own props win over the `ViewStyle` keys of the same name (R14). */
68
+ type AlertContentProps = ViewProps & Omit<ViewStyleProps, keyof ViewProps> & {
69
+ children?: ReactNode;
70
+ };
71
+ /** `Text`'s own props win over the `TextStyle` keys of the same name (R14). */
72
+ type AlertTextProps = TextProps & Omit<TextStyleProps, keyof TextProps> & {
73
+ children?: ReactNode;
74
+ };
75
+ type AlertTitleProps = AlertTextProps;
76
+ type AlertDescriptionProps = AlertTextProps;
77
+ /**
78
+ * `Icon`'s three forms, plus the `ViewStyle` keys of the box around them (R14).
79
+ *
80
+ * Unlike `Button.Icon` and `Chip.Icon`, this slot **renders a view of its own**. It has
81
+ * to: an alert's icon sits beside a block of text rather than on one line with it, and
82
+ * lining the glyph up with the first line's cap-height means offsetting it by half the
83
+ * leading — which needs a node. That node is also what lets the slot carry style props at
84
+ * all, which the other two cannot.
85
+ */
86
+ type AlertIconGlyphKey = 'as' | 'children' | 'source' | 'size' | 'color';
87
+ /**
88
+ * `Pick`, distributed over `Icon`'s three forms rather than applied to the union as a
89
+ * whole. Applied as a whole it merges them into one shape where `as` and `source` are both
90
+ * optional — which is the boundary `IconProps` was turned into a union to keep, so
91
+ * `<Alert.Icon as={Check} source={png} />` would compile again and one of the two would be
92
+ * silently dropped.
93
+ */
94
+ type AlertIconGlyphProps<T = IconProps> = T extends IconProps ? Pick<T, AlertIconGlyphKey> : never;
95
+ type AlertIconBoxProps = {
96
+ /** The box, not the glyph — `size` and `color` are what shape the icon itself. */
97
+ style?: StyleProp<ViewStyle>;
98
+ } & Omit<ViewStyleProps, AlertIconGlyphKey | 'style'>;
99
+ type AlertIconProps = AlertIconGlyphProps & AlertIconBoxProps;
100
+ /**
101
+ * Everything the shared `CloseButton` accepts, minus the three the alert supplies itself:
102
+ * the warning's name and the two resolved styles its recipe already decided (R5).
103
+ */
104
+ type AlertCloseProps = Omit<CloseButtonProps, 'name' | 'baseStyle' | 'glyphStyle'>;
105
+ /**
106
+ * R5 — resolved styles, not props for a slot to resolve a second time. Each entry is the
107
+ * cached `StyleSheet` reference with the uncached tint pass layered over it, so a slot
108
+ * merges its own `style` on top and does no work of its own.
109
+ */
110
+ type AlertContextValue = {
111
+ iconStyle: StyleProp<ViewStyle>;
112
+ contentStyle: StyleProp<ViewStyle>;
113
+ titleStyle: StyleProp<TextStyle>;
114
+ descriptionStyle: StyleProp<TextStyle>;
115
+ closeStyle: StyleProp<ViewStyle>;
116
+ closeGlyphStyle: StyleProp<ViewStyle>;
117
+ /**
118
+ * Values, not a style: `Icon` hands `size` and `color` to a third-party component, so
119
+ * the root flattens its icon slot once here rather than in every icon it contains.
120
+ */
121
+ icon: IconContextValue;
122
+ isDisabled: boolean;
123
+ };
124
+
125
+ declare const useAlert: () => AlertContextValue;
126
+
127
+ declare const alertRecipe: Recipe<"title" | "root" | "content" | "description" | "icon" | "iconGlyph" | "close" | "closeGlyph", AlertVariant, {
128
+ readonly size: {
129
+ readonly xs: (theme: XAUITheme) => SlotStyles<AlertSlot>;
130
+ readonly sm: (theme: XAUITheme) => SlotStyles<AlertSlot>;
131
+ readonly md: (theme: XAUITheme) => SlotStyles<AlertSlot>;
132
+ readonly lg: (theme: XAUITheme) => SlotStyles<AlertSlot>;
133
+ };
134
+ readonly radius: Record<RadiusKey, StyleFn<"root">>;
135
+ }>;
136
+
137
+ declare const Alert: react.ForwardRefExoticComponent<{
138
+ variant?: AlertVariant;
139
+ size?: AlertSize;
140
+ radius?: RadiusKey;
141
+ color?: string;
142
+ isDisabled?: boolean;
143
+ style?: react_native.StyleProp<react_native.ViewStyle>;
144
+ children?: react.ReactNode;
145
+ } & Omit<react_native.ViewProps, keyof {
146
+ variant?: AlertVariant;
147
+ size?: AlertSize;
148
+ radius?: RadiusKey;
149
+ color?: string;
150
+ isDisabled?: boolean;
151
+ style?: react_native.StyleProp<react_native.ViewStyle>;
152
+ children?: react.ReactNode;
153
+ }> & Omit<ViewStyleProps, "color" | "pointerEvents" | "style" | "children" | "size" | "hitSlop" | "id" | "needsOffscreenAlphaCompositing" | "onLayout" | "removeClippedSubviews" | "testID" | "nativeID" | "collapsable" | "collapsableChildren" | "onBlur" | "onFocus" | "renderToHardwareTextureAndroid" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-modal" | "role" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "screenReaderFocusable" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "accessibilityRespondsToUserInteraction" | "variant" | "radius" | "isDisabled"> & {
154
+ asChild?: boolean;
155
+ } & react.RefAttributes<react_native.View>> & {
156
+ Icon: react.ForwardRefExoticComponent<AlertIconProps & react.RefAttributes<react_native.View>>;
157
+ Content: react.ForwardRefExoticComponent<react_native.ViewProps & Omit<ViewStyleProps, keyof react_native.ViewProps> & {
158
+ children?: react.ReactNode;
159
+ } & react.RefAttributes<react_native.View>>;
160
+ Title: react.ForwardRefExoticComponent<react_native.TextProps & Omit<TextStyleProps, keyof react_native.TextProps> & {
161
+ children?: react.ReactNode;
162
+ } & react.RefAttributes<react_native.Text>>;
163
+ Description: react.ForwardRefExoticComponent<react_native.TextProps & Omit<TextStyleProps, keyof react_native.TextProps> & {
164
+ children?: react.ReactNode;
165
+ } & react.RefAttributes<react_native.Text>>;
166
+ Close: react.ForwardRefExoticComponent<AlertCloseProps & react.RefAttributes<react_native.View>>;
167
+ };
168
+
169
+ export { Alert, type AlertCloseProps, type AlertContentProps, type AlertContextValue, type AlertDescriptionProps, type AlertIconProps, type AlertProps, type AlertSize, type AlertSlot, type AlertTitleProps, type AlertVariant, alertRecipe, useAlert };