@fluxus-ui/native 0.0.0-stage → 0.3.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 (230) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +75 -2
  3. package/lib/module/AudioPlayer.js +174 -0
  4. package/lib/module/AudioPlayer.js.map +1 -0
  5. package/lib/module/Avatar.js +58 -0
  6. package/lib/module/Avatar.js.map +1 -0
  7. package/lib/module/Badge.js +72 -0
  8. package/lib/module/Badge.js.map +1 -0
  9. package/lib/module/BottomSheet.js +159 -0
  10. package/lib/module/BottomSheet.js.map +1 -0
  11. package/lib/module/Bubble.js +182 -0
  12. package/lib/module/Bubble.js.map +1 -0
  13. package/lib/module/Button.js +209 -0
  14. package/lib/module/Button.js.map +1 -0
  15. package/lib/module/Card.js +79 -0
  16. package/lib/module/Card.js.map +1 -0
  17. package/lib/module/Dialog.js +137 -0
  18. package/lib/module/Dialog.js.map +1 -0
  19. package/lib/module/Disclosure.js +153 -0
  20. package/lib/module/Disclosure.js.map +1 -0
  21. package/lib/module/EmptyState.js +71 -0
  22. package/lib/module/EmptyState.js.map +1 -0
  23. package/lib/module/Link.js +97 -0
  24. package/lib/module/Link.js.map +1 -0
  25. package/lib/module/ListItem.js +89 -0
  26. package/lib/module/ListItem.js.map +1 -0
  27. package/lib/module/Menu.js +76 -0
  28. package/lib/module/Menu.js.map +1 -0
  29. package/lib/module/Message.js +51 -0
  30. package/lib/module/Message.js.map +1 -0
  31. package/lib/module/Popover.js +153 -0
  32. package/lib/module/Popover.js.map +1 -0
  33. package/lib/module/Progress.js +54 -0
  34. package/lib/module/Progress.js.map +1 -0
  35. package/lib/module/Select.js +146 -0
  36. package/lib/module/Select.js.map +1 -0
  37. package/lib/module/Skeleton.js +40 -0
  38. package/lib/module/Skeleton.js.map +1 -0
  39. package/lib/module/Slider.js +137 -0
  40. package/lib/module/Slider.js.map +1 -0
  41. package/lib/module/Spinner.js +30 -0
  42. package/lib/module/Spinner.js.map +1 -0
  43. package/lib/module/Swap.js +87 -0
  44. package/lib/module/Swap.js.map +1 -0
  45. package/lib/module/Tabs.js +118 -0
  46. package/lib/module/Tabs.js.map +1 -0
  47. package/lib/module/Text.js +47 -0
  48. package/lib/module/Text.js.map +1 -0
  49. package/lib/module/TextField.js +190 -0
  50. package/lib/module/TextField.js.map +1 -0
  51. package/lib/module/Toast.js +157 -0
  52. package/lib/module/Toast.js.map +1 -0
  53. package/lib/module/audio.js +54 -0
  54. package/lib/module/audio.js.map +1 -0
  55. package/lib/module/blur.js +55 -0
  56. package/lib/module/blur.js.map +1 -0
  57. package/lib/module/controls.js +292 -0
  58. package/lib/module/controls.js.map +1 -0
  59. package/lib/module/feel.js +24 -0
  60. package/lib/module/feel.js.map +1 -0
  61. package/lib/module/generated/tokens.js +484 -0
  62. package/lib/module/generated/tokens.js.map +1 -0
  63. package/lib/module/haptics.js +25 -0
  64. package/lib/module/haptics.js.map +1 -0
  65. package/lib/module/icon-host.js +42 -0
  66. package/lib/module/icon-host.js.map +1 -0
  67. package/lib/module/icon-shape.js +222 -0
  68. package/lib/module/icon-shape.js.map +1 -0
  69. package/lib/module/icon.js +331 -0
  70. package/lib/module/icon.js.map +1 -0
  71. package/lib/module/index.js +39 -0
  72. package/lib/module/index.js.map +1 -0
  73. package/lib/module/layout.js +75 -0
  74. package/lib/module/layout.js.map +1 -0
  75. package/lib/module/marks.js +99 -0
  76. package/lib/module/marks.js.map +1 -0
  77. package/lib/module/motion.js +95 -0
  78. package/lib/module/motion.js.map +1 -0
  79. package/lib/module/overlay.js +99 -0
  80. package/lib/module/overlay.js.map +1 -0
  81. package/lib/module/package.json +1 -0
  82. package/lib/module/pending.js +181 -0
  83. package/lib/module/pending.js.map +1 -0
  84. package/lib/module/presence.js +71 -0
  85. package/lib/module/presence.js.map +1 -0
  86. package/lib/module/press.js +32 -0
  87. package/lib/module/press.js.map +1 -0
  88. package/lib/module/screen.js +50 -0
  89. package/lib/module/screen.js.map +1 -0
  90. package/lib/module/success.js +59 -0
  91. package/lib/module/success.js.map +1 -0
  92. package/lib/module/theme.js +41 -0
  93. package/lib/module/theme.js.map +1 -0
  94. package/lib/typescript/AudioPlayer.d.ts +26 -0
  95. package/lib/typescript/AudioPlayer.d.ts.map +1 -0
  96. package/lib/typescript/Avatar.d.ts +17 -0
  97. package/lib/typescript/Avatar.d.ts.map +1 -0
  98. package/lib/typescript/Badge.d.ts +21 -0
  99. package/lib/typescript/Badge.d.ts.map +1 -0
  100. package/lib/typescript/BottomSheet.d.ts +27 -0
  101. package/lib/typescript/BottomSheet.d.ts.map +1 -0
  102. package/lib/typescript/Bubble.d.ts +23 -0
  103. package/lib/typescript/Bubble.d.ts.map +1 -0
  104. package/lib/typescript/Button.d.ts +29 -0
  105. package/lib/typescript/Button.d.ts.map +1 -0
  106. package/lib/typescript/Card.d.ts +17 -0
  107. package/lib/typescript/Card.d.ts.map +1 -0
  108. package/lib/typescript/Dialog.d.ts +34 -0
  109. package/lib/typescript/Dialog.d.ts.map +1 -0
  110. package/lib/typescript/Disclosure.d.ts +39 -0
  111. package/lib/typescript/Disclosure.d.ts.map +1 -0
  112. package/lib/typescript/EmptyState.d.ts +14 -0
  113. package/lib/typescript/EmptyState.d.ts.map +1 -0
  114. package/lib/typescript/Link.d.ts +23 -0
  115. package/lib/typescript/Link.d.ts.map +1 -0
  116. package/lib/typescript/ListItem.d.ts +20 -0
  117. package/lib/typescript/ListItem.d.ts.map +1 -0
  118. package/lib/typescript/Menu.d.ts +23 -0
  119. package/lib/typescript/Menu.d.ts.map +1 -0
  120. package/lib/typescript/Message.d.ts +14 -0
  121. package/lib/typescript/Message.d.ts.map +1 -0
  122. package/lib/typescript/Popover.d.ts +71 -0
  123. package/lib/typescript/Popover.d.ts.map +1 -0
  124. package/lib/typescript/Progress.d.ts +12 -0
  125. package/lib/typescript/Progress.d.ts.map +1 -0
  126. package/lib/typescript/Select.d.ts +30 -0
  127. package/lib/typescript/Select.d.ts.map +1 -0
  128. package/lib/typescript/Skeleton.d.ts +13 -0
  129. package/lib/typescript/Skeleton.d.ts.map +1 -0
  130. package/lib/typescript/Slider.d.ts +21 -0
  131. package/lib/typescript/Slider.d.ts.map +1 -0
  132. package/lib/typescript/Spinner.d.ts +12 -0
  133. package/lib/typescript/Spinner.d.ts.map +1 -0
  134. package/lib/typescript/Swap.d.ts +25 -0
  135. package/lib/typescript/Swap.d.ts.map +1 -0
  136. package/lib/typescript/Tabs.d.ts +18 -0
  137. package/lib/typescript/Tabs.d.ts.map +1 -0
  138. package/lib/typescript/Text.d.ts +20 -0
  139. package/lib/typescript/Text.d.ts.map +1 -0
  140. package/lib/typescript/TextField.d.ts +36 -0
  141. package/lib/typescript/TextField.d.ts.map +1 -0
  142. package/lib/typescript/Toast.d.ts +25 -0
  143. package/lib/typescript/Toast.d.ts.map +1 -0
  144. package/lib/typescript/audio.d.ts +10 -0
  145. package/lib/typescript/audio.d.ts.map +1 -0
  146. package/lib/typescript/blur.d.ts +4 -0
  147. package/lib/typescript/blur.d.ts.map +1 -0
  148. package/lib/typescript/controls.d.ts +37 -0
  149. package/lib/typescript/controls.d.ts.map +1 -0
  150. package/lib/typescript/feel.d.ts +10 -0
  151. package/lib/typescript/feel.d.ts.map +1 -0
  152. package/lib/typescript/generated/tokens.d.ts +499 -0
  153. package/lib/typescript/generated/tokens.d.ts.map +1 -0
  154. package/lib/typescript/haptics.d.ts +7 -0
  155. package/lib/typescript/haptics.d.ts.map +1 -0
  156. package/lib/typescript/icon-host.d.ts +30 -0
  157. package/lib/typescript/icon-host.d.ts.map +1 -0
  158. package/lib/typescript/icon-shape.d.ts +28 -0
  159. package/lib/typescript/icon-shape.d.ts.map +1 -0
  160. package/lib/typescript/icon.d.ts +24 -0
  161. package/lib/typescript/icon.d.ts.map +1 -0
  162. package/lib/typescript/index.d.ts +37 -0
  163. package/lib/typescript/index.d.ts.map +1 -0
  164. package/lib/typescript/layout.d.ts +24 -0
  165. package/lib/typescript/layout.d.ts.map +1 -0
  166. package/lib/typescript/marks.d.ts +23 -0
  167. package/lib/typescript/marks.d.ts.map +1 -0
  168. package/lib/typescript/motion.d.ts +30 -0
  169. package/lib/typescript/motion.d.ts.map +1 -0
  170. package/lib/typescript/overlay.d.ts +33 -0
  171. package/lib/typescript/overlay.d.ts.map +1 -0
  172. package/lib/typescript/package.json +1 -0
  173. package/lib/typescript/pending.d.ts +26 -0
  174. package/lib/typescript/pending.d.ts.map +1 -0
  175. package/lib/typescript/presence.d.ts +37 -0
  176. package/lib/typescript/presence.d.ts.map +1 -0
  177. package/lib/typescript/press.d.ts +12 -0
  178. package/lib/typescript/press.d.ts.map +1 -0
  179. package/lib/typescript/screen.d.ts +21 -0
  180. package/lib/typescript/screen.d.ts.map +1 -0
  181. package/lib/typescript/success.d.ts +13 -0
  182. package/lib/typescript/success.d.ts.map +1 -0
  183. package/lib/typescript/theme.d.ts +32 -0
  184. package/lib/typescript/theme.d.ts.map +1 -0
  185. package/package.json +123 -3
  186. package/src/AudioPlayer.tsx +106 -0
  187. package/src/Avatar.tsx +44 -0
  188. package/src/Badge.tsx +45 -0
  189. package/src/BottomSheet.tsx +109 -0
  190. package/src/Bubble.tsx +112 -0
  191. package/src/Button.tsx +168 -0
  192. package/src/Card.tsx +70 -0
  193. package/src/Dialog.tsx +93 -0
  194. package/src/Disclosure.tsx +108 -0
  195. package/src/EmptyState.tsx +51 -0
  196. package/src/Link.tsx +61 -0
  197. package/src/ListItem.tsx +78 -0
  198. package/src/Menu.tsx +57 -0
  199. package/src/Message.tsx +43 -0
  200. package/src/Popover.tsx +145 -0
  201. package/src/Progress.tsx +33 -0
  202. package/src/Select.tsx +118 -0
  203. package/src/Skeleton.tsx +28 -0
  204. package/src/Slider.tsx +107 -0
  205. package/src/Spinner.tsx +18 -0
  206. package/src/Swap.tsx +74 -0
  207. package/src/Tabs.tsx +84 -0
  208. package/src/Text.tsx +44 -0
  209. package/src/TextField.tsx +137 -0
  210. package/src/Toast.tsx +122 -0
  211. package/src/audio.tsx +56 -0
  212. package/src/blur.tsx +33 -0
  213. package/src/controls.tsx +224 -0
  214. package/src/feel.ts +22 -0
  215. package/src/generated/tokens.ts +653 -0
  216. package/src/haptics.tsx +26 -0
  217. package/src/icon-host.tsx +46 -0
  218. package/src/icon-shape.ts +213 -0
  219. package/src/icon.tsx +276 -0
  220. package/src/index.ts +36 -0
  221. package/src/layout.tsx +40 -0
  222. package/src/marks.tsx +79 -0
  223. package/src/motion.ts +94 -0
  224. package/src/overlay.tsx +77 -0
  225. package/src/pending.tsx +135 -0
  226. package/src/presence.tsx +68 -0
  227. package/src/press.ts +23 -0
  228. package/src/screen.tsx +37 -0
  229. package/src/success.tsx +48 -0
  230. package/src/theme.tsx +49 -0
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Platform","Animated","Easing","FadeInDown","FadeOut","LinearTransition","ReduceMotion","motion","ms","jsx","_jsx","curve","name","a","b","c","d","easing","bezier","RISE","STAGGER","enter","index","duration","normal","delay","withInitialValues","transform","translateY","reduceMotion","System","exit","fast","shift","stiffness","damping","mass","spring","smooth","k","springify","MADE","Map","presence","OS","key","made","get","set","entering","exiting","layout","Appear","rest","View"],"sourceRoot":"../../src","sources":["presence.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,QAAwB,cAAc;AACvD,OAAOC,QAAQ,IAAIC,MAAM,EAAEC,UAAU,EAAEC,OAAO,EAAEC,gBAAgB,EAAEC,YAAY,QAAQ,yBAAyB;AAC/G,SAASC,MAAM,QAAQ,uBAAoB;AAC3C,SAASC,EAAE,QAAQ,aAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE9B,MAAMC,KAAK,GAAIC,IAAgC,IAAK;EAClD,MAAM,CAACC,CAAC,EAAEC,CAAC,EAAEC,CAAC,EAAEC,CAAC,CAAC,GAAGT,MAAM,CAACU,MAAM,CAACL,IAAI,CAAC;EACxC,OAAOV,MAAM,CAACgB,MAAM,CAACL,CAAC,EAAEC,CAAC,EAAEC,CAAC,EAAEC,CAAC,CAAC;AAClC,CAAC;AACD;AACA,OAAO,MAAMG,IAAI,GAAG,EAAE;AACtB,OAAO,MAAMC,OAAO,GAAG,EAAE;;AAEzB;AACA,OAAO,MAAMC,KAAK,GAAGA,CAACC,KAAK,GAAG,CAAC,KAC7BnB,UAAU,CAACoB,QAAQ,CAACf,EAAE,CAACD,MAAM,CAACgB,QAAQ,CAACC,MAAM,CAAC,CAAC,CAC5CC,KAAK,CAACjB,EAAE,CAACc,KAAK,GAAGF,OAAO,CAAC,CAAC,CAC1BH,MAAM,CAACN,KAAK,CAAC,YAAY,CAAC,CAAC,CAC3Be,iBAAiB,CAAC;EAAEC,SAAS,EAAE,CAAC;IAAEC,UAAU,EAAET;EAAK,CAAC;AAAE,CAAC,CAAC,CACxDU,YAAY,CAACvB,YAAY,CAACwB,MAAM,CAAC;;AAEtC;AACA,OAAO,MAAMC,IAAI,GAAGA,CAAA,KAAM3B,OAAO,CAACmB,QAAQ,CAACf,EAAE,CAACD,MAAM,CAACgB,QAAQ,CAACS,IAAI,CAAC,CAAC,CAACf,MAAM,CAACN,KAAK,CAAC,YAAY,CAAC,CAAC,CAACkB,YAAY,CAACvB,YAAY,CAACwB,MAAM,CAAC;;AAElI;AACA,OAAO,MAAMG,KAAK,GAAGA,CAAA,KAAM;EACzB,MAAM;IAAEC,SAAS;IAAEC,OAAO;IAAEC;EAAK,CAAC,GAAG7B,MAAM,CAAC8B,MAAM,CAACC,MAAM;EACzD,MAAMC,CAAC,GAAG/B,EAAE,CAAC,CAAC,CAAC;EACf,OAAOH,gBAAgB,CAACmC,SAAS,CAAC,CAAC,CAACN,SAAS,CAACA,SAAS,IAAIK,CAAC,GAAGA,CAAC,CAAC,CAAC,CAACJ,OAAO,CAACA,OAAO,GAAGI,CAAC,CAAC,CAACH,IAAI,CAACA,IAAI,CAAC,CAACP,YAAY,CAACvB,YAAY,CAACwB,MAAM,CAAC;AACtI,CAAC;AAOD,MAAMW,IAAI,GAAG,IAAIC,GAAG,CAAmB,CAAC;;AAExC;AACA;AACA;AACA;AACA,OAAO,MAAMC,QAAQ,GAAGA,CAACrB,KAAK,GAAG,CAAC,KAAwB;EACxD,IAAItB,QAAQ,CAAC4C,EAAE,KAAK,KAAK,EAAE,OAAO,CAAC,CAAC;EACpC;EACA,MAAMC,GAAG,GAAG,GAAGvB,KAAK,IAAId,EAAE,CAAC,CAAC,CAAC,EAAE;EAC/B,IAAIsC,IAAI,GAAGL,IAAI,CAACM,GAAG,CAACF,GAAG,CAAC;EACxB,IAAI,CAACC,IAAI,EAAEL,IAAI,CAACO,GAAG,CAACH,GAAG,EAAGC,IAAI,GAAG;IAAEG,QAAQ,EAAE5B,KAAK,CAACC,KAAK,CAAC;IAAE4B,OAAO,EAAEnB,IAAI,CAAC,CAAC;IAAEoB,MAAM,EAAElB,KAAK,CAAC;EAAE,CAAE,CAAC;EAC/F,OAAOa,IAAI;AACb,CAAC;AAQD;AACA,OAAO,SAASM,MAAMA,CAAC;EAAE9B,KAAK,GAAG,CAAC;EAAE,GAAG+B;AAAkB,CAAC,EAAE;EAC1D,oBAAO3C,IAAA,CAACT,QAAQ,CAACqD,IAAI;IAAA,GAAKX,QAAQ,CAACrB,KAAK,CAAC;IAAA,GAAM+B;EAAI,CAAG,CAAC;AACzD","ignoreList":[]}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ import { useAnimatedStyle, useSharedValue } from 'react-native-reanimated';
4
+ import { spring } from "./motion.js";
5
+
6
+ /** As the web (core/src/press.ts): what is pressed gives a little, on the snappy spring. */
7
+ const PRESSED = 0.97;
8
+
9
+ /** The style and the two handlers of something that gives when pressed; the handlers of the app still run. */
10
+ export function usePress({
11
+ onPressIn,
12
+ onPressOut
13
+ }) {
14
+ const scale = useSharedValue(1);
15
+ const style = useAnimatedStyle(() => ({
16
+ transform: [{
17
+ scale: scale.value
18
+ }]
19
+ }));
20
+ return {
21
+ style,
22
+ onPressIn: e => {
23
+ scale.value = spring(PRESSED, 'snappy');
24
+ onPressIn?.(e);
25
+ },
26
+ onPressOut: e => {
27
+ scale.value = spring(1, 'snappy');
28
+ onPressOut?.(e);
29
+ }
30
+ };
31
+ }
32
+ //# sourceMappingURL=press.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useAnimatedStyle","useSharedValue","spring","PRESSED","usePress","onPressIn","onPressOut","scale","style","transform","value","e"],"sourceRoot":"../../src","sources":["press.ts"],"mappings":";;AACA,SAASA,gBAAgB,EAAEC,cAAc,QAAQ,yBAAyB;AAC1E,SAASC,MAAM,QAAQ,aAAU;;AAEjC;AACA,MAAMC,OAAO,GAAG,IAAI;;AAEpB;AACA,OAAO,SAASC,QAAQA,CAAC;EAAEC,SAAS;EAAEC;AAA6D,CAAC,EAAE;EACpG,MAAMC,KAAK,GAAGN,cAAc,CAAC,CAAC,CAAC;EAC/B,MAAMO,KAAK,GAAGR,gBAAgB,CAAC,OAAO;IAAES,SAAS,EAAE,CAAC;MAAEF,KAAK,EAAEA,KAAK,CAACG;IAAM,CAAC;EAAE,CAAC,CAAC,CAAC;EAC/E,OAAO;IACLF,KAAK;IACLH,SAAS,EAAGM,CAAwB,IAAK;MACvCJ,KAAK,CAACG,KAAK,GAAGR,MAAM,CAACC,OAAO,EAAE,QAAQ,CAAC;MACvCE,SAAS,GAAGM,CAAC,CAAC;IAChB,CAAC;IACDL,UAAU,EAAGK,CAAwB,IAAK;MACxCJ,KAAK,CAACG,KAAK,GAAGR,MAAM,CAAC,CAAC,EAAE,QAAQ,CAAC;MACjCI,UAAU,GAAGK,CAAC,CAAC;IACjB;EACF,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * `@fluxus-ui/native/screen`: the ground of a screen, inside the safe area. Its own entry, so that an app that
5
+ * lays out its screens some other way does not need react-native-safe-area-context. (SPEC §15.5)
6
+ */
7
+
8
+ import { ScrollView, View } from 'react-native';
9
+ import { SafeAreaView } from 'react-native-safe-area-context';
10
+ import { useTheme } from "./theme.js";
11
+ import { jsx as _jsx } from "react/jsx-runtime";
12
+ export function Screen({
13
+ scroll = false,
14
+ edges,
15
+ padded = true,
16
+ scrollRef,
17
+ scrollProps,
18
+ style,
19
+ children,
20
+ ...rest
21
+ }) {
22
+ const theme = useTheme();
23
+ const inner = padded ? {
24
+ padding: theme.size['layout.gutter'],
25
+ gap: theme.size['space.4']
26
+ } : null;
27
+ return /*#__PURE__*/_jsx(SafeAreaView, {
28
+ edges: edges,
29
+ ...rest,
30
+ style: [{
31
+ flex: 1,
32
+ backgroundColor: theme.color['surface.page']
33
+ }, style],
34
+ children: scroll ? /*#__PURE__*/_jsx(ScrollView, {
35
+ keyboardShouldPersistTaps: "handled",
36
+ keyboardDismissMode: "interactive",
37
+ automaticallyAdjustKeyboardInsets: true,
38
+ ...scrollProps,
39
+ ref: scrollRef,
40
+ contentContainerStyle: [inner, scrollProps?.contentContainerStyle],
41
+ children: children
42
+ }) : /*#__PURE__*/_jsx(View, {
43
+ style: [{
44
+ flex: 1
45
+ }, inner],
46
+ children: children
47
+ })
48
+ });
49
+ }
50
+ //# sourceMappingURL=screen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["ScrollView","View","SafeAreaView","useTheme","jsx","_jsx","Screen","scroll","edges","padded","scrollRef","scrollProps","style","children","rest","theme","inner","padding","size","gap","flex","backgroundColor","color","keyboardShouldPersistTaps","keyboardDismissMode","automaticallyAdjustKeyboardInsets","ref","contentContainerStyle"],"sourceRoot":"../../src","sources":["screen.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;;AAEA,SAASA,UAAU,EAAEC,IAAI,QAA8C,cAAc;AACrF,SAASC,YAAY,QAAmB,gCAAgC;AACxE,SAASC,QAAQ,QAAQ,YAAS;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAenC,OAAO,SAASC,MAAMA,CAAC;EAAEC,MAAM,GAAG,KAAK;EAAEC,KAAK;EAAEC,MAAM,GAAG,IAAI;EAAEC,SAAS;EAAEC,WAAW;EAAEC,KAAK;EAAEC,QAAQ;EAAE,GAAGC;AAAkB,CAAC,EAAE;EAC9H,MAAMC,KAAK,GAAGZ,QAAQ,CAAC,CAAC;EACxB,MAAMa,KAAK,GAAGP,MAAM,GAAG;IAAEQ,OAAO,EAAEF,KAAK,CAACG,IAAI,CAAC,eAAe,CAAC;IAAEC,GAAG,EAAEJ,KAAK,CAACG,IAAI,CAAC,SAAS;EAAE,CAAC,GAAG,IAAI;EAClG,oBACEb,IAAA,CAACH,YAAY;IAACM,KAAK,EAAEA,KAAM;IAAA,GAAKM,IAAI;IAAEF,KAAK,EAAE,CAAC;MAAEQ,IAAI,EAAE,CAAC;MAAEC,eAAe,EAAEN,KAAK,CAACO,KAAK,CAAC,cAAc;IAAE,CAAC,EAAEV,KAAK,CAAE;IAAAC,QAAA,EAC7GN,MAAM,gBACLF,IAAA,CAACL,UAAU;MAACuB,yBAAyB,EAAC,SAAS;MAACC,mBAAmB,EAAC,aAAa;MAACC,iCAAiC;MAAA,GAAKd,WAAW;MAAEe,GAAG,EAAEhB,SAAU;MAACiB,qBAAqB,EAAE,CAACX,KAAK,EAAEL,WAAW,EAAEgB,qBAAqB,CAAE;MAAAd,QAAA,EACrNA;IAAQ,CACC,CAAC,gBAEbR,IAAA,CAACJ,IAAI;MAACW,KAAK,EAAE,CAAC;QAAEQ,IAAI,EAAE;MAAE,CAAC,EAAEJ,KAAK,CAAE;MAAAH,QAAA,EAAEA;IAAQ,CAAO;EACpD,CACW,CAAC;AAEnB","ignoreList":[]}
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * `Success`, of the `icon` entry: a tick drawn inside a circle, as it comes. «Tema completado», «Solicitud
5
+ * habilitada», «Pago enviado». It grows on the bouncy spring while the `check` icon goes from `off` to rest: the
6
+ * circle is drawn, then the tick. With haptics registered (`enableHaptics`), it is felt when the tick is there.
7
+ * (SPEC §15.14)
8
+ */
9
+ import { useEffect, useState } from 'react';
10
+ import Animated, { useAnimatedStyle, useSharedValue } from 'react-native-reanimated';
11
+ import { check } from '@fluxus-ui/icons';
12
+ import { feel } from "./feel.js";
13
+ import { motion } from "./generated/tokens.js";
14
+ import { Icon } from "./icon.js";
15
+ import { ms, spring } from "./motion.js";
16
+ import { useTheme } from "./theme.js";
17
+ import { jsx as _jsx } from "react/jsx-runtime";
18
+ export function Success({
19
+ label,
20
+ size = 64,
21
+ color,
22
+ onShown,
23
+ testID
24
+ }) {
25
+ const theme = useTheme();
26
+ const [state, setState] = useState('off');
27
+ const grow = useSharedValue(0.6);
28
+ useEffect(() => {
29
+ setState('rest');
30
+ grow.value = spring(1, 'bouncy');
31
+ const timer = setTimeout(() => {
32
+ feel('success');
33
+ onShown?.();
34
+ }, ms(motion.duration.slow));
35
+ return () => clearTimeout(timer);
36
+ // Once, as it comes.
37
+ }, []);
38
+ const style = useAnimatedStyle(() => ({
39
+ transform: [{
40
+ scale: grow.value
41
+ }]
42
+ }));
43
+ return /*#__PURE__*/_jsx(Animated.View, {
44
+ testID: testID,
45
+ accessible: true,
46
+ role: "img",
47
+ "aria-label": label,
48
+ style: [{
49
+ alignSelf: 'center'
50
+ }, style],
51
+ children: /*#__PURE__*/_jsx(Icon, {
52
+ icon: check,
53
+ state: state,
54
+ size: size,
55
+ color: color ?? theme.color['state.success.solid']
56
+ })
57
+ });
58
+ }
59
+ //# sourceMappingURL=success.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useEffect","useState","Animated","useAnimatedStyle","useSharedValue","check","feel","motion","Icon","ms","spring","useTheme","jsx","_jsx","Success","label","size","color","onShown","testID","theme","state","setState","grow","value","timer","setTimeout","duration","slow","clearTimeout","style","transform","scale","View","accessible","role","alignSelf","children","icon"],"sourceRoot":"../../src","sources":["success.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3C,OAAOC,QAAQ,IAAIC,gBAAgB,EAAEC,cAAc,QAAQ,yBAAyB;AACpF,SAASC,KAAK,QAAQ,kBAAkB;AACxC,SAASC,IAAI,QAAQ,WAAQ;AAC7B,SAASC,MAAM,QAAQ,uBAAoB;AAC3C,SAASC,IAAI,QAAQ,WAAQ;AAC7B,SAASC,EAAE,EAAEC,MAAM,QAAQ,aAAU;AACrC,SAASC,QAAQ,QAAQ,YAAS;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAcnC,OAAO,SAASC,OAAOA,CAAC;EAAEC,KAAK;EAAEC,IAAI,GAAG,EAAE;EAAEC,KAAK;EAAEC,OAAO;EAAEC;AAAqB,CAAC,EAAE;EAClF,MAAMC,KAAK,GAAGT,QAAQ,CAAC,CAAC;EACxB,MAAM,CAACU,KAAK,EAAEC,QAAQ,CAAC,GAAGrB,QAAQ,CAAiB,KAAK,CAAC;EACzD,MAAMsB,IAAI,GAAGnB,cAAc,CAAC,GAAG,CAAC;EAChCJ,SAAS,CAAC,MAAM;IACdsB,QAAQ,CAAC,MAAM,CAAC;IAChBC,IAAI,CAACC,KAAK,GAAGd,MAAM,CAAC,CAAC,EAAE,QAAQ,CAAC;IAChC,MAAMe,KAAK,GAAGC,UAAU,CAAC,MAAM;MAC7BpB,IAAI,CAAC,SAAS,CAAC;MACfY,OAAO,GAAG,CAAC;IACb,CAAC,EAAET,EAAE,CAACF,MAAM,CAACoB,QAAQ,CAACC,IAAI,CAAC,CAAC;IAC5B,OAAO,MAAMC,YAAY,CAACJ,KAAK,CAAC;IAChC;EACF,CAAC,EAAE,EAAE,CAAC;EACN,MAAMK,KAAK,GAAG3B,gBAAgB,CAAC,OAAO;IAAE4B,SAAS,EAAE,CAAC;MAAEC,KAAK,EAAET,IAAI,CAACC;IAAM,CAAC;EAAE,CAAC,CAAC,CAAC;EAC9E,oBACEX,IAAA,CAACX,QAAQ,CAAC+B,IAAI;IAACd,MAAM,EAAEA,MAAO;IAACe,UAAU;IAACC,IAAI,EAAC,KAAK;IAAC,cAAYpB,KAAM;IAACe,KAAK,EAAE,CAAC;MAAEM,SAAS,EAAE;IAAS,CAAC,EAAEN,KAAK,CAAE;IAAAO,QAAA,eAC9GxB,IAAA,CAACL,IAAI;MAAC8B,IAAI,EAAEjC,KAAM;MAACgB,KAAK,EAAEA,KAAM;MAACL,IAAI,EAAEA,IAAK;MAACC,KAAK,EAAEA,KAAK,IAAIG,KAAK,CAACH,KAAK,CAAC,qBAAqB;IAAE,CAAE;EAAC,CACtF,CAAC;AAEpB","ignoreList":[]}
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+
3
+ import { createContext, useContext, useMemo } from 'react';
4
+ import { useColorScheme } from 'react-native';
5
+ import { themes } from "./generated/tokens.js";
6
+
7
+ /**
8
+ * The faces the app loaded (with expo-font, or linked), by weight. With a face for a weight, text takes
9
+ * that family and no `fontWeight`: Android would thicken it again. Without, the regular one and the weight.
10
+ */
11
+
12
+ /** A theme in one mode: what a component reads. `Theme<typeof theme>` has the tokens of the app too, by name. */
13
+ import { jsx as _jsx } from "react/jsx-runtime";
14
+ const Context = /*#__PURE__*/createContext(null);
15
+ export function ThemeProvider({
16
+ theme = themes.base,
17
+ mode,
18
+ fonts,
19
+ children
20
+ }) {
21
+ const system = useColorScheme();
22
+ const now = mode ?? (system === 'dark' ? 'dark' : 'light');
23
+ const value = useMemo(() => ({
24
+ ...theme,
25
+ mode: now,
26
+ color: theme.color[now],
27
+ font: fonts
28
+ }), [theme, now, fonts?.regular, fonts?.medium, fonts?.bold]);
29
+ return /*#__PURE__*/_jsx(Context.Provider, {
30
+ value: value,
31
+ children: children
32
+ });
33
+ }
34
+
35
+ /** The theme, in the mode it is in. `useTheme<typeof theme>()` gives the app its own tokens (`app.…`), checked by name. */
36
+ export function useTheme() {
37
+ const theme = useContext(Context);
38
+ if (!theme) throw new Error('@fluxus-ui/native: no theme. Wrap the app in <ThemeProvider>.');
39
+ return theme;
40
+ }
41
+ //# sourceMappingURL=theme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createContext","useContext","useMemo","useColorScheme","themes","jsx","_jsx","Context","ThemeProvider","theme","base","mode","fonts","children","system","now","value","color","font","regular","medium","bold","Provider","useTheme","Error"],"sourceRoot":"../../src","sources":["theme.tsx"],"mappings":";;AAAA,SAASA,aAAa,EAAEC,UAAU,EAAEC,OAAO,QAAwB,OAAO;AAC1E,SAASC,cAAc,QAAQ,cAAc;AAC7C,SAASC,MAAM,QAA0B,uBAAoB;;AAI7D;AACA;AACA;AACA;;AAOA;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAQA,MAAMC,OAAO,gBAAGP,aAAa,CAAe,IAAI,CAAC;AAYjD,OAAO,SAASQ,aAAaA,CAAC;EAAEC,KAAK,GAAGL,MAAM,CAACM,IAAI;EAAEC,IAAI;EAAEC,KAAK;EAAEC;AAA6B,CAAC,EAAE;EAChG,MAAMC,MAAM,GAAGX,cAAc,CAAC,CAAC;EAC/B,MAAMY,GAAS,GAAGJ,IAAI,KAAKG,MAAM,KAAK,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;EAChE,MAAME,KAAK,GAAGd,OAAO,CAAQ,OAAO;IAAE,GAAGO,KAAK;IAAEE,IAAI,EAAEI,GAAG;IAAEE,KAAK,EAAER,KAAK,CAACQ,KAAK,CAACF,GAAG,CAAC;IAAEG,IAAI,EAAEN;EAAM,CAAC,CAAC,EAAE,CAACH,KAAK,EAAEM,GAAG,EAAEH,KAAK,EAAEO,OAAO,EAAEP,KAAK,EAAEQ,MAAM,EAAER,KAAK,EAAES,IAAI,CAAC,CAAC;EAC7J,oBAAOf,IAAA,CAACC,OAAO,CAACe,QAAQ;IAACN,KAAK,EAAEA,KAAM;IAAAH,QAAA,EAAEA;EAAQ,CAAmB,CAAC;AACtE;;AAEA;AACA,OAAO,SAASU,QAAQA,CAAA,EAAkD;EACxE,MAAMd,KAAK,GAAGR,UAAU,CAACM,OAAO,CAAC;EACjC,IAAI,CAACE,KAAK,EAAE,MAAM,IAAIe,KAAK,CAAC,+DAA+D,CAAC;EAC5F,OAAOf,KAAK;AACd","ignoreList":[]}
@@ -0,0 +1,26 @@
1
+ import { type StyleProp, type ViewProps, type ViewStyle } from 'react-native';
2
+ export interface AudioPlayerProps extends Omit<ViewProps, 'children' | 'style'> {
3
+ playing: boolean;
4
+ /** Where it is, in seconds. */
5
+ position: number;
6
+ /** How long it is, in seconds; 0 while it is not known. */
7
+ duration: number;
8
+ onToggle: () => void;
9
+ /** With it, the bar is dragged to go to a second; without, it only shows how far it is. */
10
+ onSeek?: (seconds: number) => void;
11
+ /** The names of the button, and of the bar. Default of the bar: 'Position'. */
12
+ labels: {
13
+ play: string;
14
+ pause: string;
15
+ position?: string;
16
+ };
17
+ /** It was asked to play and the sound is not here yet: the button waits, and still takes the press that calls it off. */
18
+ loading?: boolean;
19
+ /** Nothing to play yet. */
20
+ disabled?: boolean;
21
+ style?: StyleProp<ViewStyle>;
22
+ }
23
+ /** Seconds as `1:04`. */
24
+ export declare const clock: (seconds: number) => string;
25
+ export declare function AudioPlayer({ playing, position, duration, onToggle, onSeek, labels, loading, disabled, style, ...rest }: AudioPlayerProps): import("react").JSX.Element;
26
+ //# sourceMappingURL=AudioPlayer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AudioPlayer.d.ts","sourceRoot":"","sources":["../../src/AudioPlayer.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAsC,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAUlH,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,GAAG,OAAO,CAAC;IAC7E,OAAO,EAAE,OAAO,CAAC;IACjB,+BAA+B;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,2DAA2D;IAC3D,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,2FAA2F;IAC3F,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,+EAA+E;IAC/E,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3D,yHAAyH;IACzH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,yBAAyB;AACzB,eAAO,MAAM,KAAK,GAAI,SAAS,MAAM,KAAG,MAGvC,CAAC;AAOF,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,OAAe,EAAE,QAAgB,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,gBAAgB,+BA4DzJ"}
@@ -0,0 +1,17 @@
1
+ import { type StyleProp, type ViewProps, type ViewStyle } from 'react-native';
2
+ export interface AvatarProps extends Omit<ViewProps, 'style' | 'children'> {
3
+ /** Gives the initials. */
4
+ name: string;
5
+ /** A picture over the initials. */
6
+ src?: string;
7
+ /** Who it is, for a screen reader. Without it the avatar is decoration: the name is usually beside it. */
8
+ label?: string;
9
+ /** Default: 'md'. */
10
+ size?: 'sm' | 'md' | 'lg';
11
+ style?: StyleProp<ViewStyle>;
12
+ }
13
+ /** As the web: the first letter of the first two words that start with a letter or a figure. */
14
+ export declare const initials: (name: string) => string;
15
+ /** Who someone is, in a circle: the picture, or the initials. */
16
+ export declare function Avatar({ name, src, label, size, style, ...rest }: AvatarProps): import("react").JSX.Element;
17
+ //# sourceMappingURL=Avatar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../src/Avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAI3F,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,SAAS,EAAE,OAAO,GAAG,UAAU,CAAC;IACxE,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,0GAA0G;IAC1G,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qBAAqB;IACrB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,gGAAgG;AAChG,eAAO,MAAM,QAAQ,GAAI,MAAM,MAAM,KAAG,MAQtB,CAAC;AAEnB,iEAAiE;AACjE,wBAAgB,MAAM,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,IAAW,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,WAAW,+BAepF"}
@@ -0,0 +1,21 @@
1
+ import type { ReactNode } from 'react';
2
+ import { type StyleProp, type ViewProps, type ViewStyle } from 'react-native';
3
+ import { type Theme } from './theme.js';
4
+ export type Tone = 'neutral' | 'accent' | 'success' | 'warning' | 'danger' | 'info';
5
+ export interface BadgeProps extends Omit<ViewProps, 'style'> {
6
+ children: ReactNode;
7
+ /** Default: 'neutral'. */
8
+ tone?: Tone;
9
+ /** 'dot': a point of the tone before the text, on a quiet ground. Default: 'tint'. */
10
+ look?: 'tint' | 'dot';
11
+ style?: StyleProp<ViewStyle>;
12
+ }
13
+ /** The ground, the ink and the solid colour of a tone. */
14
+ export declare function toneColors(theme: Theme, tone?: Tone): {
15
+ subtle: string;
16
+ ink: string;
17
+ solid: string;
18
+ };
19
+ /** A state in a word. The tone is never the only thing that says it: the text does. */
20
+ export declare function Badge({ children, tone, look, style, ...rest }: BadgeProps): import("react").JSX.Element;
21
+ //# sourceMappingURL=Badge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../src/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAQ,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpF,OAAO,EAAY,KAAK,KAAK,EAAE,MAAM,YAAS,CAAC;AAE/C,MAAM,MAAM,IAAI,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEpF,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC;IAC1D,QAAQ,EAAE,SAAS,CAAC;IACpB,0BAA0B;IAC1B,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,sFAAsF;IACtF,IAAI,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IACtB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,0DAA0D;AAC1D,wBAAgB,UAAU,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,GAAE,IAAgB,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAK/G;AAED,uFAAuF;AACvF,wBAAgB,KAAK,CAAC,EAAE,QAAQ,EAAE,IAAgB,EAAE,IAAa,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,UAAU,+BAmB9F"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * A sheet that rises from the bottom, moved only by its transform. As tall as what it holds, up to nine tenths
3
+ * of the screen. Dragged down from its header, it goes; so it does with its handle, which is a button with a
4
+ * name for whoever cannot drag. (SPEC §15.8)
5
+ */
6
+ import { type ReactNode } from 'react';
7
+ export interface BottomSheetProps {
8
+ open: boolean;
9
+ /** A press outside, back, the handle, or dragging it down. */
10
+ onClose: () => void;
11
+ /** Its name: at the top, and what a screen reader hears on opening. */
12
+ title: string;
13
+ /** The title is only for a screen reader. */
14
+ titleHidden?: boolean;
15
+ children?: ReactNode;
16
+ /** What the bottom edge of the screen takes: the safe area of the app. It is added to its own padding. Default: 0. */
17
+ inset?: number;
18
+ /** The name of the handle, for a screen reader. Default: 'Close'. */
19
+ closeLabel?: string;
20
+ /** A press outside or a drag closes it, and it has a handle. Default: true. Back always closes. */
21
+ dismissible?: boolean;
22
+ /** What does not fit scrolls. Default: true; false when what it holds scrolls by itself. */
23
+ scroll?: boolean;
24
+ testID?: string;
25
+ }
26
+ export declare function BottomSheet({ open, onClose, dismissible, ...rest }: BottomSheetProps): import("react").JSX.Element;
27
+ //# sourceMappingURL=BottomSheet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BottomSheet.d.ts","sourceRoot":"","sources":["../../src/BottomSheet.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAuC,KAAK,SAAS,EAAkB,MAAM,OAAO,CAAC;AAa5F,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,OAAO,CAAC;IACd,8DAA8D;IAC9D,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,uEAAuE;IACvE,KAAK,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,sHAAsH;IACtH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qEAAqE;IACrE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mGAAmG;IACnG,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,4FAA4F;IAC5F,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAiED,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAkB,EAAE,GAAG,IAAI,EAAE,EAAE,gBAAgB,+BAO3F"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * A message of a chat: on the side of who wrote it, never wider than most of the screen, with who above and
3
+ * when below. A plain view: a chat has many, and one that arrives is wrapped in `Appear`. With `status`, one's
4
+ * own says how it went: sending, sent (a tick is written), read (a second one), failed (it shakes once).
5
+ * (SPEC §15.10, §15.14)
6
+ */
7
+ import { type ReactNode } from 'react';
8
+ import { type StyleProp, type ViewProps, type ViewStyle } from 'react-native';
9
+ export type BubbleStatus = 'sending' | 'sent' | 'read' | 'failed';
10
+ export interface BubbleProps extends Omit<ViewProps, 'style'> {
11
+ /** 'start': what arrives. 'end': one's own. */
12
+ side: 'start' | 'end';
13
+ /** Who wrote it, above. */
14
+ author?: string;
15
+ /** When, or whether it was read, below. Say the status in it too: the mark is not read out. */
16
+ meta?: string;
17
+ /** How a message of one's own went. With it, the bubble is animated; without, a plain view. */
18
+ status?: BubbleStatus;
19
+ children?: ReactNode;
20
+ style?: StyleProp<ViewStyle>;
21
+ }
22
+ export declare function Bubble({ side, author, meta, status, children, style, ...rest }: BubbleProps): import("react").JSX.Element;
23
+ //# sourceMappingURL=Bubble.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Bubble.d.ts","sourceRoot":"","sources":["../../src/Bubble.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAQ,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAQpF,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC;AAElE,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC;IAC3D,+CAA+C;IAC/C,IAAI,EAAE,OAAO,GAAG,KAAK,CAAC;IACtB,2BAA2B;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,+FAA+F;IAC/F,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+FAA+F;IAC/F,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAKD,wBAAgB,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,WAAW,+BA8C3F"}
@@ -0,0 +1,29 @@
1
+ import { type ComponentRef, type ReactNode, type Ref } from 'react';
2
+ import { Pressable, type GestureResponderEvent, type PressableProps, type StyleProp, type ViewStyle } from 'react-native';
3
+ import { type Theme } from './theme.js';
4
+ export type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'danger';
5
+ export type ButtonSize = 'sm' | 'md' | 'lg';
6
+ export interface ButtonProps extends Omit<PressableProps, 'children' | 'style' | 'ref' | 'onPress'> {
7
+ /** If it returns a promise, the button waits for it: it fills from where it was pressed and takes no other press. */
8
+ onPress?: (event: GestureResponderEvent) => void | Promise<unknown>;
9
+ children: ReactNode;
10
+ /** Default: 'secondary'. */
11
+ variant?: ButtonVariant;
12
+ /** Default: 'md'. */
13
+ size?: ButtonSize;
14
+ /** It is working: it shows a spinner, says so to a screen reader and takes no press. */
15
+ busy?: boolean;
16
+ /** When what its press returns is fulfilled, a tick is drawn where its text was, and the text comes back; if it fails, the text shakes once. */
17
+ feedback?: boolean;
18
+ style?: StyleProp<ViewStyle>;
19
+ ref?: Ref<ComponentRef<typeof Pressable>>;
20
+ }
21
+ /** The surface, the ink and the edge of a variant, and the box of a size: only tokens. */
22
+ export declare function buttonStyle(theme: Theme, variant?: ButtonVariant, size?: ButtonSize): {
23
+ box: ViewStyle;
24
+ ink: string;
25
+ slop: number;
26
+ };
27
+ /** A button with the variants and sizes of the web; pressed, it gives on the snappy spring. */
28
+ export declare function Button({ children, variant, size, busy, feedback, disabled, style, onPress, onPressIn, onPressOut, onLayout, onFocus, onBlur, ...rest }: ButtonProps): import("react").JSX.Element;
29
+ //# sourceMappingURL=Button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+B,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AACjG,OAAO,EAAqB,SAAS,EAAE,KAAK,qBAAqB,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAW7I,OAAO,EAAY,KAAK,KAAK,EAAE,MAAM,YAAS,CAAC;AAE/C,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,OAAO,GAAG,QAAQ,CAAC;AACzE,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5C,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,cAAc,EAAE,UAAU,GAAG,OAAO,GAAG,KAAK,GAAG,SAAS,CAAC;IACjG,qHAAqH;IACrH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACpE,QAAQ,EAAE,SAAS,CAAC;IACpB,4BAA4B;IAC5B,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,qBAAqB;IACrB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,wFAAwF;IACxF,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,gJAAgJ;IAChJ,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,GAAG,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC;CAC3C;AAID,0FAA0F;AAC1F,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,GAAE,aAA2B,EAAE,IAAI,GAAE,UAAiB,GAAG;IAAE,GAAG,EAAE,SAAS,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CA2BtJ;AAED,+FAA+F;AAC/F,wBAAgB,MAAM,CAAC,EAAE,QAAQ,EAAE,OAAqB,EAAE,IAAW,EAAE,IAAY,EAAE,QAAgB,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,EAAE,WAAW,+BAkExM"}
@@ -0,0 +1,17 @@
1
+ import type { ComponentRef, ReactNode, Ref } from 'react';
2
+ import { Pressable, type GestureResponderEvent, type PressableProps, type StyleProp, type ViewStyle } from 'react-native';
3
+ import { type Theme } from './theme.js';
4
+ export interface CardProps extends Omit<PressableProps, 'children' | 'style' | 'ref' | 'onPress'> {
5
+ /** If it returns a promise, the card waits for it: it fills from where it was pressed. */
6
+ onPress?: (event: GestureResponderEvent) => void | Promise<unknown>;
7
+ children?: ReactNode;
8
+ style?: StyleProp<ViewStyle>;
9
+ ref?: Ref<ComponentRef<typeof Pressable>>;
10
+ }
11
+ export declare const cardStyle: (theme: Theme) => ViewStyle;
12
+ /**
13
+ * A surface. With `onPress` it is one button that gives when pressed, and a screen reader reads it whole.
14
+ * Without, it is a plain view: what it holds is reached piece by piece.
15
+ */
16
+ export declare function Card({ children, style, onPress, onPressIn, onPressOut, onLayout, ...rest }: CardProps): import("react").JSX.Element;
17
+ //# sourceMappingURL=Card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../src/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAQ,KAAK,qBAAqB,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAKhI,OAAO,EAAY,KAAK,KAAK,EAAE,MAAM,YAAS,CAAC;AAE/C,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,cAAc,EAAE,UAAU,GAAG,OAAO,GAAG,KAAK,GAAG,SAAS,CAAC;IAC/F,0FAA0F;IAC1F,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACpE,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,GAAG,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC;CAC3C;AAID,eAAO,MAAM,SAAS,GAAI,OAAO,KAAK,KAAG,SAMvC,CAAC;AAEH;;;GAGG;AACH,wBAAgB,IAAI,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,SAAS,+BAuCrG"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * A window in the middle of the screen: a title, what it says and its buttons. It comes growing a little as it
3
+ * shows. `ConfirmDialog` is the one that asks before acting, and waits for the answer of the app. (SPEC §15.8)
4
+ */
5
+ import { type ReactNode } from 'react';
6
+ import { type ButtonVariant } from './Button.js';
7
+ export interface DialogProps {
8
+ open: boolean;
9
+ /** A press outside (unless `alert`) and back. Its buttons close it by calling this too. */
10
+ onClose: () => void;
11
+ title: string;
12
+ /** Under the title, muted. */
13
+ description?: string;
14
+ children?: ReactNode;
15
+ /** The buttons, at the end. */
16
+ actions?: ReactNode;
17
+ /** It asks something that must be answered: a press outside does not close it, and it is an `alertdialog`. */
18
+ alert?: boolean;
19
+ testID?: string;
20
+ }
21
+ export declare function Dialog({ open, onClose, alert, ...rest }: DialogProps): import("react").JSX.Element;
22
+ export interface ConfirmDialogProps extends Pick<DialogProps, 'open' | 'onClose' | 'title' | 'description' | 'children' | 'testID'> {
23
+ /** What the button that confirms says. */
24
+ confirm: string;
25
+ /** What the other says. Default: 'Cancel'. */
26
+ cancel?: string;
27
+ /** Default: 'primary'; 'danger' to delete. */
28
+ confirmVariant?: ButtonVariant;
29
+ /** If it returns a promise, the button waits for it and the dialog closes once it is fulfilled. If it fails it stays: say why in `children`. */
30
+ onConfirm: () => void | Promise<unknown>;
31
+ }
32
+ /** It asks before acting, with the names of `ConfirmButton` on the web. */
33
+ export declare function ConfirmDialog({ confirm, cancel, confirmVariant, onConfirm, onClose, ...rest }: ConfirmDialogProps): import("react").JSX.Element;
34
+ //# sourceMappingURL=Dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../src/Dialog.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAA6B,KAAK,SAAS,EAAkB,MAAM,OAAO,CAAC;AAGlF,OAAO,EAAU,KAAK,aAAa,EAAE,MAAM,aAAU,CAAC;AAUtD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,OAAO,CAAC;IACd,2FAA2F;IAC3F,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,8BAA8B;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,+BAA+B;IAC/B,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,8GAA8G;IAC9G,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAyBD,wBAAgB,MAAM,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,WAAW,+BAOpE;AAED,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,aAAa,GAAG,UAAU,GAAG,QAAQ,CAAC;IACjI,0CAA0C;IAC1C,OAAO,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,cAAc,CAAC,EAAE,aAAa,CAAC;IAC/B,gJAAgJ;IAChJ,SAAS,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAC1C;AAED,2EAA2E;AAC3E,wBAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,MAAiB,EAAE,cAA0B,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,EAAE,kBAAkB,+BAgBxI"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * A title that shows or hides what is under it. The one piece that animates a height: what is below it has to
3
+ * travel with it, whatever it is. One at a time, and by a press. `Accordion` is a group of them. (SPEC §15.8)
4
+ */
5
+ import { type ReactNode } from 'react';
6
+ import { type StyleProp, type ViewProps, type ViewStyle } from 'react-native';
7
+ import { type SharedValue } from 'react-native-reanimated';
8
+ /** An arrow drawn with two edges, without an icon: it points down at 0 and up at 1. */
9
+ export declare function Chevron({ t, color }: {
10
+ t?: SharedValue<number>;
11
+ color?: string;
12
+ }): import("react").JSX.Element;
13
+ export interface DisclosureProps {
14
+ title: string;
15
+ children: ReactNode;
16
+ /** It holds its own state from here. Default: false. */
17
+ defaultOpen?: boolean;
18
+ /** Or the app does. */
19
+ open?: boolean;
20
+ onOpenChange?: (open: boolean) => void;
21
+ style?: StyleProp<ViewStyle>;
22
+ testID?: string;
23
+ }
24
+ export declare function Disclosure({ title, children, defaultOpen, open, onOpenChange, style, testID }: DisclosureProps): import("react").JSX.Element;
25
+ export interface AccordionItem {
26
+ key: string;
27
+ title: string;
28
+ content: ReactNode;
29
+ }
30
+ export interface AccordionProps extends Omit<ViewProps, 'children'> {
31
+ items: readonly AccordionItem[];
32
+ /** Several may be open at once. Default: opening one closes the others. */
33
+ multiple?: boolean;
34
+ /** The keys of the ones open at first. */
35
+ defaultOpen?: readonly string[];
36
+ onChange?: (open: readonly string[]) => void;
37
+ }
38
+ export declare function Accordion({ items, multiple, defaultOpen, onChange, ...rest }: AccordionProps): import("react").JSX.Element;
39
+ //# sourceMappingURL=Disclosure.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Disclosure.d.ts","sourceRoot":"","sources":["../../src/Disclosure.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAuB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAmB,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAC/F,OAAiB,EAAoC,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAOvG,uFAAuF;AACvF,wBAAgB,OAAO,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,CAAC,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,+BAWhF;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;IACpB,wDAAwD;IACxD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,uBAAuB;IACvB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAmB,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,eAAe,+BAgCtH;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,SAAS,CAAC;CACpB;AAED,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;IACjE,KAAK,EAAE,SAAS,aAAa,EAAE,CAAC;IAChC,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0CAA0C;IAC1C,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,KAAK,IAAI,CAAC;CAC9C;AAED,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,QAAgB,EAAE,WAAgB,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,cAAc,+BAmBzG"}
@@ -0,0 +1,14 @@
1
+ import { type ReactNode } from 'react';
2
+ import { type ViewProps } from 'react-native';
3
+ export interface EmptyStateProps extends ViewProps {
4
+ title: string;
5
+ /** What to do about it. */
6
+ children?: ReactNode;
7
+ /** A button under the text. */
8
+ action?: ReactNode;
9
+ /** Above the title: an icon, an image. It comes with a little gesture, once. */
10
+ icon?: ReactNode;
11
+ }
12
+ /** There is nothing here, and what to do about it. (SPEC §15.14) */
13
+ export declare function EmptyState({ title, children, action, icon, style, ...rest }: EmptyStateProps): import("react").JSX.Element;
14
+ //# sourceMappingURL=EmptyState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../src/EmptyState.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAMpD,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,+BAA+B;IAC/B,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,gFAAgF;IAChF,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,oEAAoE;AACpE,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,eAAe,+BAkB5F"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * A link in text: the colour of the accent, underlined, and a link for a screen reader. Alone it is pressed
3
+ * with a target of 44 points; `inline`, it is part of a sentence. Pressed, it fades a little, and stays so
4
+ * while what its press returned is not settled: nothing moves. (SPEC §15.10, §15.11)
5
+ */
6
+ import { type ReactNode } from 'react';
7
+ import { type StyleProp, type TextStyle } from 'react-native';
8
+ import { type TextProps, type TextVariant } from './Text.js';
9
+ export interface LinkProps extends Omit<TextProps, 'onPress' | 'style' | 'role'> {
10
+ children: ReactNode;
11
+ /** An address the system opens. For the browser of the app, or a screen of the app, use `onPress`. */
12
+ href?: string;
13
+ /** If it returns a promise, the link waits for it: faded, and taking no other press. */
14
+ onPress?: () => void | Promise<unknown>;
15
+ /** Inside a sentence: a nested text, with the line it is in. Default: false, an element of its own. */
16
+ inline?: boolean;
17
+ /** Default: 'body'. */
18
+ variant?: TextVariant;
19
+ /** The style of the text. */
20
+ style?: StyleProp<TextStyle>;
21
+ }
22
+ export declare function Link({ children, href, onPress, inline, variant, style, testID, ...rest }: LinkProps): import("react").JSX.Element;
23
+ //# sourceMappingURL=Link.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../src/Link.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAA4B,KAAK,SAAS,EAAE,KAAK,SAAS,EAAkB,MAAM,cAAc,CAAC;AAExG,OAAO,EAAmB,KAAK,SAAS,EAAE,KAAK,WAAW,EAAE,MAAM,WAAQ,CAAC;AAG3E,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;IAC9E,QAAQ,EAAE,SAAS,CAAC;IACpB,sGAAsG;IACtG,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wFAAwF;IACxF,OAAO,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACxC,uGAAuG;IACvG,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,uBAAuB;IACvB,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,6BAA6B;IAC7B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAKD,wBAAgB,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,MAAc,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,EAAE,SAAS,+BAgC3G"}
@@ -0,0 +1,20 @@
1
+ import type { ComponentRef, ReactNode, Ref } from 'react';
2
+ import { Pressable, type GestureResponderEvent, type PressableProps, type StyleProp, type ViewStyle } from 'react-native';
3
+ export interface ListItemProps extends Omit<PressableProps, 'children' | 'style' | 'ref' | 'onPress'> {
4
+ /** If it returns a promise, the row waits for it: it fills from where it was pressed. */
5
+ onPress?: (event: GestureResponderEvent) => void | Promise<unknown>;
6
+ title: string;
7
+ description?: string;
8
+ /** Before the text: an icon, an avatar. */
9
+ leading?: ReactNode;
10
+ /** After it: a badge, a figure, a chevron. */
11
+ trailing?: ReactNode;
12
+ style?: StyleProp<ViewStyle>;
13
+ ref?: Ref<ComponentRef<typeof Pressable>>;
14
+ }
15
+ /**
16
+ * A row of a list. With `onPress` it is one button, read whole by a screen reader, that darkens when pressed.
17
+ * At rest it carries no animated component: a list has many rows. Only the one that waits has its fill.
18
+ */
19
+ export declare function ListItem({ title, description, leading, trailing, style, onPress, onPressIn, onLayout, disabled, ...rest }: ListItemProps): import("react").JSX.Element;
20
+ //# sourceMappingURL=ListItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ListItem.d.ts","sourceRoot":"","sources":["../../src/ListItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAQ,KAAK,qBAAqB,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAOhI,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,cAAc,EAAE,UAAU,GAAG,OAAO,GAAG,KAAK,GAAG,SAAS,CAAC;IACnG,yFAAyF;IACzF,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACpE,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2CAA2C;IAC3C,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,GAAG,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC;CAC3C;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,aAAa,+BAoDxI"}
@@ -0,0 +1,23 @@
1
+ /** A few things to do, by what opened them. Choosing one closes the menu; if it waits, once it is done. (SPEC §15.8) */
2
+ import { type ReactNode } from 'react';
3
+ import { type PopoverProps } from './Popover.js';
4
+ export interface MenuProps extends Omit<PopoverProps, 'children' | 'label'> {
5
+ /** `MenuItem` and `MenuSeparator`. */
6
+ children: ReactNode;
7
+ /** Its name, for a screen reader. */
8
+ label?: string;
9
+ }
10
+ export declare function Menu({ trigger, children, label, placement, onOpenChange, testID }: MenuProps): import("react").JSX.Element;
11
+ export interface MenuItemProps {
12
+ label: string;
13
+ /** Before the label. */
14
+ icon?: ReactNode;
15
+ disabled?: boolean;
16
+ /** When it is chosen. If it returns a promise, the row waits for it and the menu closes once it is fulfilled. */
17
+ onSelect?: () => void | Promise<unknown>;
18
+ testID?: string;
19
+ }
20
+ export declare function MenuItem({ label, icon, disabled, onSelect, testID }: MenuItemProps): import("react").JSX.Element;
21
+ /** A rule between two groups of a menu. */
22
+ export declare function MenuSeparator(): import("react").JSX.Element;
23
+ //# sourceMappingURL=Menu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../src/Menu.tsx"],"names":[],"mappings":"AAAA,wHAAwH;AACxH,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAKlE,OAAO,EAAyB,KAAK,YAAY,EAAE,MAAM,cAAW,CAAC;AAKrE,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,YAAY,EAAE,UAAU,GAAG,OAAO,CAAC;IACzE,sCAAsC;IACtC,QAAQ,EAAE,SAAS,CAAC;IACpB,qCAAqC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,IAAI,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,SAA0B,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,SAAS,+BAe7G;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,wBAAwB;IACxB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iHAAiH;IACjH,QAAQ,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,aAAa,+BAKlF;AAED,2CAA2C;AAC3C,wBAAgB,aAAa,gCAG5B"}
@@ -0,0 +1,14 @@
1
+ import { type ReactNode } from 'react';
2
+ import { type StyleProp, type ViewProps, type ViewStyle } from 'react-native';
3
+ export interface MessageProps extends Omit<ViewProps, 'style'> {
4
+ children: ReactNode;
5
+ /** Default: 'info'. */
6
+ tone?: 'info' | 'success' | 'warning' | 'danger';
7
+ title?: string;
8
+ /** It is announced when it appears: at once if it is a danger, when the reader is free otherwise. Default: true. */
9
+ live?: boolean;
10
+ style?: StyleProp<ViewStyle>;
11
+ }
12
+ /** Something the person has to know: a notice, or what went wrong and what to do. */
13
+ export declare function Message({ children, tone, title, live, style, ...rest }: MessageProps): import("react").JSX.Element;
14
+ //# sourceMappingURL=Message.d.ts.map