panelui-native 0.6.0 → 0.7.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 (133) hide show
  1. package/README.md +1 -1
  2. package/lib/module/components/accordion/index.js +7 -5
  3. package/lib/module/components/accordion/index.js.map +1 -1
  4. package/lib/module/components/alert/index.js +3 -6
  5. package/lib/module/components/alert/index.js.map +1 -1
  6. package/lib/module/components/bottom-sheet/index.js +67 -3
  7. package/lib/module/components/bottom-sheet/index.js.map +1 -1
  8. package/lib/module/components/button/index.js +36 -1
  9. package/lib/module/components/button/index.js.map +1 -1
  10. package/lib/module/components/empty-state/index.js +4 -5
  11. package/lib/module/components/empty-state/index.js.map +1 -1
  12. package/lib/module/components/inline-select/index.js +171 -46
  13. package/lib/module/components/inline-select/index.js.map +1 -1
  14. package/lib/module/components/input/index.js +28 -5
  15. package/lib/module/components/input/index.js.map +1 -1
  16. package/lib/module/components/input-group/index.js +0 -1
  17. package/lib/module/components/input-group/index.js.map +1 -1
  18. package/lib/module/components/item/index.js +359 -0
  19. package/lib/module/components/item/index.js.map +1 -0
  20. package/lib/module/components/label/index.js +5 -3
  21. package/lib/module/components/label/index.js.map +1 -1
  22. package/lib/module/components/message/index.js +318 -0
  23. package/lib/module/components/message/index.js.map +1 -0
  24. package/lib/module/components/scroll-fade/index.js +119 -71
  25. package/lib/module/components/scroll-fade/index.js.map +1 -1
  26. package/lib/module/components/select/index.js +35 -6
  27. package/lib/module/components/select/index.js.map +1 -1
  28. package/lib/module/components/shimmer/index.js +111 -64
  29. package/lib/module/components/shimmer/index.js.map +1 -1
  30. package/lib/module/components/surface/index.js +3 -2
  31. package/lib/module/components/surface/index.js.map +1 -1
  32. package/lib/module/components/switch/index.js +20 -1
  33. package/lib/module/components/switch/index.js.map +1 -1
  34. package/lib/module/components/toast/index.js +7 -8
  35. package/lib/module/components/toast/index.js.map +1 -1
  36. package/lib/module/components/typography/index.js +3 -3
  37. package/lib/module/hooks/index.js +1 -0
  38. package/lib/module/hooks/index.js.map +1 -1
  39. package/lib/module/hooks/use-breakpoint.js +2 -2
  40. package/lib/module/hooks/use-copy-to-clipboard.js +0 -2
  41. package/lib/module/hooks/use-copy-to-clipboard.js.map +1 -1
  42. package/lib/module/hooks/use-keyboard-avoidance.js +120 -0
  43. package/lib/module/hooks/use-keyboard-avoidance.js.map +1 -0
  44. package/lib/module/icons/index.js +4 -4
  45. package/lib/module/index.js +6 -0
  46. package/lib/module/index.js.map +1 -1
  47. package/lib/module/native/index.js +53 -0
  48. package/lib/module/native/index.js.map +1 -0
  49. package/lib/module/primitives/keyboard-avoider.js +40 -0
  50. package/lib/module/primitives/keyboard-avoider.js.map +1 -0
  51. package/lib/module/providers/panel-ui-provider.js +24 -4
  52. package/lib/module/providers/panel-ui-provider.js.map +1 -1
  53. package/lib/module/theme/use-theme.js +1 -1
  54. package/lib/typescript/src/components/accordion/index.d.ts +7 -5
  55. package/lib/typescript/src/components/accordion/index.d.ts.map +1 -1
  56. package/lib/typescript/src/components/alert/index.d.ts +3 -6
  57. package/lib/typescript/src/components/alert/index.d.ts.map +1 -1
  58. package/lib/typescript/src/components/bottom-sheet/index.d.ts +21 -1
  59. package/lib/typescript/src/components/bottom-sheet/index.d.ts.map +1 -1
  60. package/lib/typescript/src/components/button/index.d.ts +11 -0
  61. package/lib/typescript/src/components/button/index.d.ts.map +1 -1
  62. package/lib/typescript/src/components/empty-state/index.d.ts +4 -5
  63. package/lib/typescript/src/components/empty-state/index.d.ts.map +1 -1
  64. package/lib/typescript/src/components/inline-select/index.d.ts +29 -6
  65. package/lib/typescript/src/components/inline-select/index.d.ts.map +1 -1
  66. package/lib/typescript/src/components/input/index.d.ts +13 -0
  67. package/lib/typescript/src/components/input/index.d.ts.map +1 -1
  68. package/lib/typescript/src/components/input-group/index.d.ts +0 -1
  69. package/lib/typescript/src/components/input-group/index.d.ts.map +1 -1
  70. package/lib/typescript/src/components/item/index.d.ts +286 -0
  71. package/lib/typescript/src/components/item/index.d.ts.map +1 -0
  72. package/lib/typescript/src/components/label/index.d.ts +5 -3
  73. package/lib/typescript/src/components/label/index.d.ts.map +1 -1
  74. package/lib/typescript/src/components/message/index.d.ts +170 -0
  75. package/lib/typescript/src/components/message/index.d.ts.map +1 -0
  76. package/lib/typescript/src/components/scroll-fade/index.d.ts +18 -9
  77. package/lib/typescript/src/components/scroll-fade/index.d.ts.map +1 -1
  78. package/lib/typescript/src/components/select/index.d.ts +16 -1
  79. package/lib/typescript/src/components/select/index.d.ts.map +1 -1
  80. package/lib/typescript/src/components/shimmer/index.d.ts +38 -20
  81. package/lib/typescript/src/components/shimmer/index.d.ts.map +1 -1
  82. package/lib/typescript/src/components/surface/index.d.ts.map +1 -1
  83. package/lib/typescript/src/components/switch/index.d.ts +10 -0
  84. package/lib/typescript/src/components/switch/index.d.ts.map +1 -1
  85. package/lib/typescript/src/components/toast/index.d.ts +4 -4
  86. package/lib/typescript/src/components/toast/index.d.ts.map +1 -1
  87. package/lib/typescript/src/hooks/index.d.ts +1 -0
  88. package/lib/typescript/src/hooks/index.d.ts.map +1 -1
  89. package/lib/typescript/src/hooks/use-breakpoint.d.ts +2 -2
  90. package/lib/typescript/src/hooks/use-copy-to-clipboard.d.ts +0 -2
  91. package/lib/typescript/src/hooks/use-copy-to-clipboard.d.ts.map +1 -1
  92. package/lib/typescript/src/hooks/use-keyboard-avoidance.d.ts +20 -0
  93. package/lib/typescript/src/hooks/use-keyboard-avoidance.d.ts.map +1 -0
  94. package/lib/typescript/src/icons/index.d.ts +4 -4
  95. package/lib/typescript/src/index.d.ts +4 -0
  96. package/lib/typescript/src/index.d.ts.map +1 -1
  97. package/lib/typescript/src/native/index.d.ts +35 -0
  98. package/lib/typescript/src/native/index.d.ts.map +1 -0
  99. package/lib/typescript/src/primitives/keyboard-avoider.d.ts +22 -0
  100. package/lib/typescript/src/primitives/keyboard-avoider.d.ts.map +1 -0
  101. package/lib/typescript/src/providers/panel-ui-provider.d.ts +1 -1
  102. package/lib/typescript/src/providers/panel-ui-provider.d.ts.map +1 -1
  103. package/lib/typescript/src/theme/use-theme.d.ts +1 -1
  104. package/package.json +12 -3
  105. package/src/components/accordion/index.tsx +7 -5
  106. package/src/components/alert/index.tsx +3 -6
  107. package/src/components/bottom-sheet/index.tsx +82 -2
  108. package/src/components/button/index.tsx +52 -0
  109. package/src/components/empty-state/index.tsx +4 -5
  110. package/src/components/inline-select/index.tsx +191 -44
  111. package/src/components/input/index.tsx +39 -3
  112. package/src/components/input-group/index.tsx +0 -1
  113. package/src/components/item/index.tsx +387 -0
  114. package/src/components/label/index.tsx +5 -3
  115. package/src/components/message/index.tsx +312 -0
  116. package/src/components/scroll-fade/index.tsx +163 -51
  117. package/src/components/select/index.tsx +54 -9
  118. package/src/components/shimmer/index.tsx +151 -58
  119. package/src/components/surface/index.tsx +3 -2
  120. package/src/components/switch/index.tsx +27 -1
  121. package/src/components/toast/index.tsx +7 -8
  122. package/src/components/typography/index.tsx +3 -3
  123. package/src/hooks/index.ts +5 -0
  124. package/src/hooks/use-breakpoint.ts +2 -2
  125. package/src/hooks/use-copy-to-clipboard.ts +0 -2
  126. package/src/hooks/use-keyboard-avoidance.ts +140 -0
  127. package/src/icons/index.tsx +4 -4
  128. package/src/index.ts +32 -0
  129. package/src/native/index.ts +79 -0
  130. package/src/primitives/keyboard-avoider.tsx +49 -0
  131. package/src/providers/panel-ui-provider.tsx +30 -9
  132. package/src/theme/use-theme.ts +1 -1
  133. package/theme.css +5 -3
@@ -10,8 +10,8 @@ export const BREAKPOINTS = {
10
10
  xl: 1280
11
11
  };
12
12
  /**
13
- * Responsive state from the window size — the React Native answer to
14
- * coss.com/ui's `useMediaQuery`, which has no equivalent here.
13
+ * Responsive state from the window size — the React Native answer to a media
14
+ * query, which has no equivalent here.
15
15
  *
16
16
  * For styling, prefer Uniwind's responsive class prefixes (`md:flex-row`).
17
17
  * Reach for this when the *behaviour* changes, not just the look — rendering
@@ -4,8 +4,6 @@ import { useCallback, useEffect, useRef, useState } from 'react';
4
4
  /**
5
5
  * Copy text to the clipboard, with a temporary "copied" state.
6
6
  *
7
- * Mirrors coss.com/ui's `useCopyToClipboard`.
8
- *
9
7
  * Requires `expo-clipboard`, which is an optional peer dependency — React
10
8
  * Native removed `Clipboard` from core, and pulling in a required native
11
9
  * module for one hook would cost every consumer who never calls it:
@@ -1 +1 @@
1
- {"version":3,"names":["useCallback","useEffect","useRef","useState","useCopyToClipboard","timeout","onCopy","copied","setCopied","timer","current","clearTimeout","copy","value","setString","loadClipboard","setTimeout","clipboard","setStringAsync","Error"],"sourceRoot":"../../../src","sources":["hooks/use-copy-to-clipboard.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAchE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,kBAAkBA,CAAC;EACjCC,OAAO,GAAG,IAAI;EACdC;AACyB,CAAC,GAAG,CAAC,CAAC,EAA4B;EAC3D,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAGL,QAAQ,CAAC,KAAK,CAAC;EAC3C,MAAMM,KAAK,GAAGP,MAAM,CAAuC,IAAI,CAAC;;EAEhE;EACAD,SAAS,CACP,MAAM,MAAM;IACV,IAAIQ,KAAK,CAACC,OAAO,EAAEC,YAAY,CAACF,KAAK,CAACC,OAAO,CAAC;EAChD,CAAC,EACD,EACF,CAAC;EAED,MAAME,IAAI,GAAGZ,WAAW,CACtB,MAAOa,KAAa,IAAK;IACvB,MAAMC,SAAS,GAAG,MAAMC,aAAa,CAAC,CAAC;IACvC,MAAMD,SAAS,CAACD,KAAK,CAAC;IAEtBL,SAAS,CAAC,IAAI,CAAC;IACfF,MAAM,GAAG,CAAC;IAEV,IAAIG,KAAK,CAACC,OAAO,EAAEC,YAAY,CAACF,KAAK,CAACC,OAAO,CAAC;IAC9C,IAAIL,OAAO,GAAG,CAAC,EAAE;MACfI,KAAK,CAACC,OAAO,GAAGM,UAAU,CAAC,MAAMR,SAAS,CAAC,KAAK,CAAC,EAAEH,OAAO,CAAC;IAC7D;EACF,CAAC,EACD,CAACA,OAAO,EAAEC,MAAM,CAClB,CAAC;EAED,OAAO;IAAEM,IAAI;IAAEL;EAAO,CAAC;AACzB;;AAEA;AACA;AACA;AACA;AACA;AACA,eAAeQ,aAAaA,CAAA,EAAiD;EAC3E,IAAI;IACF,MAAME,SAAS,GAAG,MAAM,MAAM,CAAC,gBAAgB,CAAC;IAChD,OAAOA,SAAS,CAACC,cAAc;EACjC,CAAC,CAAC,MAAM;IACN,MAAM,IAAIC,KAAK,CACb,8FACF,CAAC;EACH;AACF","ignoreList":[]}
1
+ {"version":3,"names":["useCallback","useEffect","useRef","useState","useCopyToClipboard","timeout","onCopy","copied","setCopied","timer","current","clearTimeout","copy","value","setString","loadClipboard","setTimeout","clipboard","setStringAsync","Error"],"sourceRoot":"../../../src","sources":["hooks/use-copy-to-clipboard.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAchE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,kBAAkBA,CAAC;EACjCC,OAAO,GAAG,IAAI;EACdC;AACyB,CAAC,GAAG,CAAC,CAAC,EAA4B;EAC3D,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAGL,QAAQ,CAAC,KAAK,CAAC;EAC3C,MAAMM,KAAK,GAAGP,MAAM,CAAuC,IAAI,CAAC;;EAEhE;EACAD,SAAS,CACP,MAAM,MAAM;IACV,IAAIQ,KAAK,CAACC,OAAO,EAAEC,YAAY,CAACF,KAAK,CAACC,OAAO,CAAC;EAChD,CAAC,EACD,EACF,CAAC;EAED,MAAME,IAAI,GAAGZ,WAAW,CACtB,MAAOa,KAAa,IAAK;IACvB,MAAMC,SAAS,GAAG,MAAMC,aAAa,CAAC,CAAC;IACvC,MAAMD,SAAS,CAACD,KAAK,CAAC;IAEtBL,SAAS,CAAC,IAAI,CAAC;IACfF,MAAM,GAAG,CAAC;IAEV,IAAIG,KAAK,CAACC,OAAO,EAAEC,YAAY,CAACF,KAAK,CAACC,OAAO,CAAC;IAC9C,IAAIL,OAAO,GAAG,CAAC,EAAE;MACfI,KAAK,CAACC,OAAO,GAAGM,UAAU,CAAC,MAAMR,SAAS,CAAC,KAAK,CAAC,EAAEH,OAAO,CAAC;IAC7D;EACF,CAAC,EACD,CAACA,OAAO,EAAEC,MAAM,CAClB,CAAC;EAED,OAAO;IAAEM,IAAI;IAAEL;EAAO,CAAC;AACzB;;AAEA;AACA;AACA;AACA;AACA;AACA,eAAeQ,aAAaA,CAAA,EAAiD;EAC3E,IAAI;IACF,MAAME,SAAS,GAAG,MAAM,MAAM,CAAC,gBAAgB,CAAC;IAChD,OAAOA,SAAS,CAACC,cAAc;EACjC,CAAC,CAAC,MAAM;IACN,MAAM,IAAIC,KAAK,CACb,8FACF,CAAC;EACH;AACF","ignoreList":[]}
@@ -0,0 +1,120 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * useKeyboardAvoidance — lift an element just clear of the software keyboard.
5
+ *
6
+ * `KeyboardAvoidingView` shifts or pads an entire subtree by the full keyboard
7
+ * height regardless of where the element actually sits, which over-scrolls
8
+ * short forms and does nothing useful for an element already above the fold.
9
+ * This measures the element and moves it by exactly the overlap — and not at
10
+ * all when there is none.
11
+ *
12
+ * ## Install the keyboard controller
13
+ *
14
+ * ```sh
15
+ * npx expo install react-native-keyboard-controller
16
+ * ```
17
+ *
18
+ * It is an optional peer, but on Android it is close to required. Reanimated's
19
+ * own `useAnimatedKeyboard` — the fallback used when the controller is absent —
20
+ * is deprecated in Reanimated 4, and merely *calling* it switches Android out
21
+ * of `adjustResize` into manual inset handling for the whole app. That is a
22
+ * global side effect from a local hook, and it is why keyboard avoidance built
23
+ * on it tends to work on iOS and break on Android.
24
+ *
25
+ * With the controller installed, wrap your app in its `KeyboardProvider` —
26
+ * `PanelUIProvider` does this for you when the package is present.
27
+ *
28
+ * ```tsx
29
+ * const { ref, onLayout, animatedStyle } = useKeyboardAvoidance();
30
+ *
31
+ * <Animated.View ref={ref} onLayout={onLayout} style={animatedStyle}>
32
+ * <TextInput />
33
+ * </Animated.View>
34
+ * ```
35
+ */
36
+ import { useCallback } from 'react';
37
+ import { useWindowDimensions } from 'react-native';
38
+ import { useAnimatedKeyboard, useAnimatedRef, useAnimatedStyle, useSharedValue } from 'react-native-reanimated';
39
+ /**
40
+ * Resolved once, at module load, so the hook below always calls the same
41
+ * underlying hook — swapping between them per render would break the rules of
42
+ * hooks.
43
+ */
44
+ const useKeyboardHeight = (() => {
45
+ try {
46
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
47
+ const controller = require('react-native-keyboard-controller');
48
+ if (typeof controller?.useReanimatedKeyboardAnimation === 'function') {
49
+ return () => {
50
+ // The controller reports height as a negative offset, matching the
51
+ // translation you would apply. Normalise it to a positive height so
52
+ // the arithmetic below reads the same either way.
53
+ const {
54
+ height
55
+ } = controller.useReanimatedKeyboardAnimation();
56
+ return height;
57
+ };
58
+ }
59
+ } catch {
60
+ // Not installed — fall through.
61
+ }
62
+ return () => useAnimatedKeyboard().height;
63
+ })();
64
+
65
+ /** True when the keyboard controller is driving this, rather than the fallback. */
66
+ export function hasKeyboardController() {
67
+ try {
68
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
69
+ return typeof require('react-native-keyboard-controller')?.useReanimatedKeyboardAnimation === 'function';
70
+ } catch {
71
+ return false;
72
+ }
73
+ }
74
+ export function useKeyboardAvoidance({
75
+ enabled = true,
76
+ offset = 16
77
+ } = {}) {
78
+ const ref = useAnimatedRef();
79
+ const rawHeight = useKeyboardHeight();
80
+ const {
81
+ height: screenHeight
82
+ } = useWindowDimensions();
83
+
84
+ /** Window-space bottom edge of the element with no translation applied. */
85
+ const restingBottom = useSharedValue(0);
86
+ const measure = useCallback(() => {
87
+ ref.current?.measureInWindow((_x, y, _width, height) => {
88
+ if (height > 0) restingBottom.value = y + height;
89
+ });
90
+ }, [ref, restingBottom]);
91
+ const onLayout = useCallback(_event => {
92
+ // measureInWindow is only meaningful once the view is attached and
93
+ // positioned, which is a frame later than onLayout on both platforms.
94
+ requestAnimationFrame(measure);
95
+ }, [measure]);
96
+ const animatedStyle = useAnimatedStyle(() => {
97
+ // Both sources are normalised to a positive height here.
98
+ const keyboardHeight = Math.abs(rawHeight.value);
99
+ if (!enabled || keyboardHeight === 0 || restingBottom.value === 0) {
100
+ return {
101
+ transform: [{
102
+ translateY: 0
103
+ }]
104
+ };
105
+ }
106
+ const keyboardTop = screenHeight - keyboardHeight;
107
+ const overlap = restingBottom.value + offset - keyboardTop;
108
+ return {
109
+ transform: [{
110
+ translateY: overlap > 0 ? -overlap : 0
111
+ }]
112
+ };
113
+ });
114
+ return {
115
+ ref,
116
+ onLayout,
117
+ animatedStyle
118
+ };
119
+ }
120
+ //# sourceMappingURL=use-keyboard-avoidance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useCallback","useWindowDimensions","useAnimatedKeyboard","useAnimatedRef","useAnimatedStyle","useSharedValue","useKeyboardHeight","controller","require","useReanimatedKeyboardAnimation","height","hasKeyboardController","useKeyboardAvoidance","enabled","offset","ref","rawHeight","screenHeight","restingBottom","measure","current","measureInWindow","_x","y","_width","value","onLayout","_event","requestAnimationFrame","animatedStyle","keyboardHeight","Math","abs","transform","translateY","keyboardTop","overlap"],"sourceRoot":"../../../src","sources":["hooks/use-keyboard-avoidance.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,WAAW,QAAQ,OAAO;AACnC,SAASC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A,MAAM,GAAG,CAAC,EAAEQ,aAAa,CAACO,KAAK,GAAGF,CAAC,GAAGb,MAAM;IAClD,CAAC,CAAC;EACJ,CAAC,EAAE,CAACK,GAAG,EAAEG,aAAa,CAAC,CAAC;EAExB,MAAMQ,QAAQ,GAAG1B,WAAW,CACzB2B,MAAyB,IAAK;IAC7B;IACA;IACAC,qBAAqB,CAACT,OAAO,CAAC;EAChC,CAAC,EACD,CAACA,OAAO,CACV,CAAC;EAED,MAAMU,aAAa,GAAGzB,gBAAgB,CAAC,MAAM;IAC3C;IACA,MAAM0B,cAAc,GAAGC,IAAI,CAACC,GAAG,CAAChB,SAAS,CAACS,KAAK,CAAC;IAEhD,IAAI,CAACZ,OAAO,IAAIiB,cAAc,KAAK,CAAC,IAAIZ,aAAa,CAACO,KAAK,KAAK,CAAC,EAAE;MACjE,OAAO;QAAEQ,SAAS,EAAE,CAAC;UAAEC,UAAU,EAAE;QAAE,CAAC;MAAE,CAAC;IAC3C;IAEA,MAAMC,WAAW,GAAGlB,YAAY,GAAGa,cAAc;IACjD,MAAMM,OAAO,GAAGlB,aAAa,CAACO,KAAK,GAAGX,MAAM,GAAGqB,WAAW;IAE1D,OAAO;MAAEF,SAAS,EAAE,CAAC;QAAEC,UAAU,EAAEE,OAAO,GAAG,CAAC,GAAG,CAACA,OAAO,GAAG;MAAE,CAAC;IAAE,CAAC;EACpE,CAAC,CAAC;EAEF,OAAO;IAAErB,GAAG;IAAEW,QAAQ;IAAEG;EAAc,CAAC;AACzC","ignoreList":[]}
@@ -4,10 +4,10 @@
4
4
  * Icon set.
5
5
  *
6
6
  * Two families live here:
7
- * - Stroked 24×24 icons (Lucide geometry, as used by shadcn-ui/ui) for chrome
8
- * such as chevrons and the close button.
9
- * - Filled 16×16 status icons for Alert and Toast indicators.
10
- * Adapted from: heroui-inc/heroui-native src/components/alert/{default,success,warning}-icon.tsx
7
+ * - Stroked 24×24 icons on Lucide geometry, for chrome such as chevrons and
8
+ * the close button.
9
+ * - Filled 16×16 status icons for Alert and Toast indicators, which read
10
+ * better small than a stroked equivalent would.
11
11
  *
12
12
  * Every icon resolves its colour in the same order: an explicit `color` prop,
13
13
  * then the colour inherited from an enclosing `IconColorProvider`, then its
@@ -9,8 +9,12 @@ export { useTheme, useThemeMode, PANEL_THEMES, PANEL_THEME_NAMES, PANEL_EXTRA_TH
9
9
  // Primitives
10
10
  export { Portal, PortalHost, PortalProvider } from "./primitives/portal.js";
11
11
  export { Text } from "./primitives/text.js";
12
+ export { KeyboardAvoider } from "./primitives/keyboard-avoider.js";
12
13
  export { AnimatedPressable } from "./primitives/animated-pressable.js";
13
14
 
15
+ // Native UI bridge
16
+ export { hasNativeUI } from "./native/index.js";
17
+
14
18
  // Components
15
19
  export { Accordion } from "./components/accordion/index.js";
16
20
  export { Alert } from "./components/alert/index.js";
@@ -28,7 +32,9 @@ export { Checkbox } from "./components/checkbox/index.js";
28
32
  export { EmptyState } from "./components/empty-state/index.js";
29
33
  export { Input } from "./components/input/index.js";
30
34
  export { InputGroup } from "./components/input-group/index.js";
35
+ export { Item } from "./components/item/index.js";
31
36
  export { Label } from "./components/label/index.js";
37
+ export { Message } from "./components/message/index.js";
32
38
  export { Progress } from "./components/progress/index.js";
33
39
  export { RadioGroup } from "./components/radio-group/index.js";
34
40
  export { ScrollFade } from "./components/scroll-fade/index.js";
@@ -1 +1 @@
1
- {"version":3,"names":["PanelUIProvider","useTheme","useThemeMode","PANEL_THEMES","PANEL_THEME_NAMES","PANEL_EXTRA_THEMES","Portal","PortalHost","PortalProvider","Text","AnimatedPressable","Accordion","Alert","Avatar","Badge","BottomSheet","Button","Dialog","Frame","InlineSelect","Select","Tabs","Card","Checkbox","EmptyState","Input","InputGroup","Label","Progress","RadioGroup","ScrollFade","Shimmer","Skeleton","Spinner","Steps","Surface","Switch","Timeline","Toast","ToastViewport","toast","useToast","Typography","AlertTriangleIcon","AppleIcon","ArrowUpRightIcon","BellIcon","CardIcon","CheckCircleIcon","CheckIcon","ChevronDownIcon","ChevronLeftIcon","ChevronRightIcon","FacebookIcon","GoogleIcon","IconColorProvider","InfoIcon","MoonIcon","PackageIcon","PlusSquareIcon","ReceiptIcon","SearchIcon","SendIcon","ShareNodesIcon","ShieldAlertIcon","ShieldCheckIcon","SunIcon","XIcon","useIconColor","cn"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA;AACA,SAASA,eAAe,QAAmC,kCAA+B;;AAE1F;AACA,SACEC,QAAQ,EACRC,YAAY,EACZC,YAAY,EACZC,iBAAiB,EACjBC,kBAAkB,QAKb,sBAAmB;;AAE1B;AACA,SAASC,MAAM,EAAEC,UAAU,EAAEC,cAAc,QAAQ,wBAAqB;AACxE,SAASC,IAAI,QAAwB,sBAAmB;AACxD,SACEC,iBAAiB,QAEZ,oCAAiC;;AAExC;AACA,SACEC,SAAS,QAQJ,iCAAwB;AAC/B,SACEC,KAAK,QAGA,6BAAoB;AAC3B,SACEC,MAAM,QAGD,8BAAqB;AAC5B,SAASC,KAAK,QAAyB,6BAAoB;AAC3D,SACEC,WAAW,QAGN,oCAA2B;AAClC,SAASC,MAAM,QAA0B,8BAAqB;AAC9D,SACEC,MAAM,QAGD,8BAAqB;AAC5B,SAASC,KAAK,QAAyB,6BAAoB;AAC3D,SACEC,YAAY,QAGP,qCAA4B;AACnC,SAASC,MAAM,QAAgD,8BAAqB;AACpF,SACEC,IAAI,QAKC,4BAAmB;AAC1B,SAASC,IAAI,QAAwB,4BAAmB;AACxD,SAASC,QAAQ,QAA4B,gCAAuB;AACpE,SACEC,UAAU,QAGL,mCAA0B;AACjC,SAASC,KAAK,QAAyB,6BAAoB;AAC3D,SACEC,UAAU,QAIL,mCAA0B;AACjC,SAASC,KAAK,QAA8C,6BAAoB;AAChF,SAASC,QAAQ,QAA4B,gCAAuB;AACpE,SACEC,UAAU,QAGL,mCAA0B;AACjC,SACEC,UAAU,QAEL,mCAA0B;AACjC,SAASC,OAAO,QAA2B,+BAAsB;AACjE,SAASC,QAAQ,QAA4B,gCAAuB;AACpE,SAASC,OAAO,QAA2B,+BAAsB;AACjE,SACEC,KAAK,QAQA,6BAAoB;AAC3B,SAASC,OAAO,QAA2B,+BAAsB;AACjE,SAASC,MAAM,QAA0B,8BAAqB;AAC9D,SACEC,QAAQ,QAOH,gCAAuB;AAC9B,SACEC,KAAK,EACLC,aAAa,EACbC,KAAK,EACLC,QAAQ,QASH,6BAAoB;AAC3B,SACEC,UAAU,QAML,kCAAyB;;AAEhC;AACA,SACEC,iBAAiB,EACjBC,SAAS,EACTC,gBAAgB,EAChBC,QAAQ,EACRC,QAAQ,EACRC,eAAe,EACfC,SAAS,EACTC,eAAe,EACfC,eAAe,EACfC,gBAAgB,EAChBC,YAAY,EACZC,UAAU,EACVC,iBAAiB,EACjBC,QAAQ,EACRC,QAAQ,EACRC,WAAW,EACXC,cAAc,EACdC,WAAW,EACXC,UAAU,EACVC,QAAQ,EACRC,cAAc,EACdC,eAAe,EACfC,eAAe,EACfC,OAAO,EACPC,KAAK,EACLC,YAAY,QAEP,kBAAS;;AAEhB;AACA,cAAc,kBAAS;;AAEvB;AACA,SAASC,EAAE,QAAQ,eAAY","ignoreList":[]}
1
+ {"version":3,"names":["PanelUIProvider","useTheme","useThemeMode","PANEL_THEMES","PANEL_THEME_NAMES","PANEL_EXTRA_THEMES","Portal","PortalHost","PortalProvider","Text","KeyboardAvoider","AnimatedPressable","hasNativeUI","Accordion","Alert","Avatar","Badge","BottomSheet","Button","Dialog","Frame","InlineSelect","Select","Tabs","Card","Checkbox","EmptyState","Input","InputGroup","Item","Label","Message","Progress","RadioGroup","ScrollFade","Shimmer","Skeleton","Spinner","Steps","Surface","Switch","Timeline","Toast","ToastViewport","toast","useToast","Typography","AlertTriangleIcon","AppleIcon","ArrowUpRightIcon","BellIcon","CardIcon","CheckCircleIcon","CheckIcon","ChevronDownIcon","ChevronLeftIcon","ChevronRightIcon","FacebookIcon","GoogleIcon","IconColorProvider","InfoIcon","MoonIcon","PackageIcon","PlusSquareIcon","ReceiptIcon","SearchIcon","SendIcon","ShareNodesIcon","ShieldAlertIcon","ShieldCheckIcon","SunIcon","XIcon","useIconColor","cn"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA;AACA,SAASA,eAAe,QAAmC,kCAA+B;;AAE1F;AACA,SACEC,QAAQ,EACRC,YAAY,EACZC,YAAY,EACZC,iBAAiB,EACjBC,kBAAkB,QAKb,sBAAmB;;AAE1B;AACA,SAASC,MAAM,EAAEC,UAAU,EAAEC,cAAc,QAAQ,wBAAqB;AACxE,SAASC,IAAI,QAAwB,sBAAmB;AACxD,SACEC,eAAe,QAEV,kCAA+B;AACtC,SACEC,iBAAiB,QAEZ,oCAAiC;;AAExC;AACA,SAASC,WAAW,QAAQ,mBAAU;;AAEtC;AACA,SACEC,SAAS,QAQJ,iCAAwB;AAC/B,SACEC,KAAK,QAGA,6BAAoB;AAC3B,SACEC,MAAM,QAGD,8BAAqB;AAC5B,SAASC,KAAK,QAAyB,6BAAoB;AAC3D,SACEC,WAAW,QAGN,oCAA2B;AAClC,SAASC,MAAM,QAA0B,8BAAqB;AAC9D,SACEC,MAAM,QAGD,8BAAqB;AAC5B,SAASC,KAAK,QAAyB,6BAAoB;AAC3D,SACEC,YAAY,QAGP,qCAA4B;AACnC,SAASC,MAAM,QAAgD,8BAAqB;AACpF,SACEC,IAAI,QAKC,4BAAmB;AAC1B,SAASC,IAAI,QAAwB,4BAAmB;AACxD,SAASC,QAAQ,QAA4B,gCAAuB;AACpE,SACEC,UAAU,QAGL,mCAA0B;AACjC,SAASC,KAAK,QAAyB,6BAAoB;AAC3D,SACEC,UAAU,QAIL,mCAA0B;AACjC,SACEC,IAAI,QAWC,4BAAmB;AAC1B,SAASC,KAAK,QAA8C,6BAAoB;AAChF,SACEC,OAAO,QAUF,+BAAsB;AAC7B,SAASC,QAAQ,QAA4B,gCAAuB;AACpE,SACEC,UAAU,QAGL,mCAA0B;AACjC,SACEC,UAAU,QAEL,mCAA0B;AACjC,SAASC,OAAO,QAA2B,+BAAsB;AACjE,SAASC,QAAQ,QAA4B,gCAAuB;AACpE,SAASC,OAAO,QAA2B,+BAAsB;AACjE,SACEC,KAAK,QAQA,6BAAoB;AAC3B,SAASC,OAAO,QAA2B,+BAAsB;AACjE,SAASC,MAAM,QAA0B,8BAAqB;AAC9D,SACEC,QAAQ,QAOH,gCAAuB;AAC9B,SACEC,KAAK,EACLC,aAAa,EACbC,KAAK,EACLC,QAAQ,QASH,6BAAoB;AAC3B,SACEC,UAAU,QAML,kCAAyB;;AAEhC;AACA,SACEC,iBAAiB,EACjBC,SAAS,EACTC,gBAAgB,EAChBC,QAAQ,EACRC,QAAQ,EACRC,eAAe,EACfC,SAAS,EACTC,eAAe,EACfC,eAAe,EACfC,gBAAgB,EAChBC,YAAY,EACZC,UAAU,EACVC,iBAAiB,EACjBC,QAAQ,EACRC,QAAQ,EACRC,WAAW,EACXC,cAAc,EACdC,WAAW,EACXC,UAAU,EACVC,QAAQ,EACRC,cAAc,EACdC,eAAe,EACfC,eAAe,EACfC,OAAO,EACPC,KAAK,EACLC,YAAY,QAEP,kBAAS;;AAEhB;AACA,cAAc,kBAAS;;AAEvB;AACA,SAASC,EAAE,QAAQ,eAAY","ignoreList":[]}
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Optional bridge to the platform's own UI toolkit.
5
+ *
6
+ * A handful of controls are better served by the real thing than by a faithful
7
+ * re-implementation: a switch, a picker, a sheet and a button are muscle
8
+ * memory, and users notice when the animation curve or the haptic is a
9
+ * near-miss. Passing `native` to those components hands rendering to SwiftUI
10
+ * on iOS and Jetpack Compose on Android.
11
+ *
12
+ * It is optional on purpose. The package is resolved lazily and every caller
13
+ * falls back to the styled implementation when it is missing, so nobody who
14
+ * never writes `native` has to install anything.
15
+ *
16
+ * ```sh
17
+ * npx expo install @expo/ui
18
+ * ```
19
+ *
20
+ * **Theme tokens do not apply in native mode.** The platform draws the control
21
+ * with its own colours, metrics and typography — that is the entire point, and
22
+ * it means `className` and the variant props are ignored on those components.
23
+ */
24
+ import { Platform } from 'react-native';
25
+ let resolved = false;
26
+ let module = null;
27
+
28
+ /**
29
+ * The native UI module, or null when it is not installed or the platform has
30
+ * no toolkit behind it. Resolved once and cached — a failed require is not
31
+ * retried on every render.
32
+ */
33
+ export function getNativeUI() {
34
+ if (resolved) return module;
35
+ resolved = true;
36
+
37
+ // Web has no SwiftUI and no Compose; @expo/ui renders plain views there,
38
+ // which loses the styling without gaining anything.
39
+ if (Platform.OS === 'web') return null;
40
+ try {
41
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
42
+ module = require('@expo/ui');
43
+ } catch {
44
+ module = null;
45
+ }
46
+ return module;
47
+ }
48
+
49
+ /** Whether `native` will actually render a platform control. */
50
+ export function hasNativeUI() {
51
+ return getNativeUI() !== null;
52
+ }
53
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Platform","resolved","module","getNativeUI","OS","require","hasNativeUI"],"sourceRoot":"../../../src","sources":["native/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,QAAQ,QAAQ,cAAc;AA4BvC,IAAIC,QAAQ,GAAG,KAAK;AACpB,IAAIC,MAA6B,GAAG,IAAI;;AAExC;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,WAAWA,CAAA,EAA0B;EACnD,IAAIF,QAAQ,EAAE,OAAOC,MAAM;EAC3BD,QAAQ,GAAG,IAAI;;EAEf;EACA;EACA,IAAID,QAAQ,CAACI,EAAE,KAAK,KAAK,EAAE,OAAO,IAAI;EAEtC,IAAI;IACF;IACAF,MAAM,GAAGG,OAAO,CAAC,UAAU,CAAmB;EAChD,CAAC,CAAC,MAAM;IACNH,MAAM,GAAG,IAAI;EACf;EAEA,OAAOA,MAAM;AACf;;AAEA;AACA,OAAO,SAASI,WAAWA,CAAA,EAAY;EACrC,OAAOH,WAAW,CAAC,CAAC,KAAK,IAAI;AAC/B","ignoreList":[]}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * KeyboardAvoider — a view that lifts itself just clear of the keyboard.
5
+ *
6
+ * A thin wrapper over `useKeyboardAvoidance` for the common case of "keep this
7
+ * box visible", so a form does not have to wire the ref, layout handler and
8
+ * animated style by hand.
9
+ */
10
+
11
+ import Animated from 'react-native-reanimated';
12
+ import { useKeyboardAvoidance } from "../hooks/use-keyboard-avoidance.js";
13
+ import { jsx as _jsx } from "react/jsx-runtime";
14
+ export function KeyboardAvoider({
15
+ className,
16
+ enabled = true,
17
+ offset = 16,
18
+ children,
19
+ style,
20
+ onLayout,
21
+ ...props
22
+ }) {
23
+ const avoidance = useKeyboardAvoidance({
24
+ enabled,
25
+ offset
26
+ });
27
+ return /*#__PURE__*/_jsx(Animated.View, {
28
+ ...props,
29
+ ref: avoidance.ref,
30
+ onLayout: event => {
31
+ avoidance.onLayout(event);
32
+ onLayout?.(event);
33
+ },
34
+ className: className,
35
+ style: [style, avoidance.animatedStyle],
36
+ children: children
37
+ });
38
+ }
39
+ KeyboardAvoider.displayName = 'KeyboardAvoider';
40
+ //# sourceMappingURL=keyboard-avoider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Animated","useKeyboardAvoidance","jsx","_jsx","KeyboardAvoider","className","enabled","offset","children","style","onLayout","props","avoidance","View","ref","event","animatedStyle","displayName"],"sourceRoot":"../../../src","sources":["primitives/keyboard-avoider.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,OAAOA,QAAQ,MAAM,yBAAyB;AAC9C,SAASC,oBAAoB,QAAQ,oCAAiC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAWvE,OAAO,SAASC,eAAeA,CAAC;EAC9BC,SAAS;EACTC,OAAO,GAAG,IAAI;EACdC,MAAM,GAAG,EAAE;EACXC,QAAQ;EACRC,KAAK;EACLC,QAAQ;EACR,GAAGC;AACiB,CAAC,EAAE;EACvB,MAAMC,SAAS,GAAGX,oBAAoB,CAAC;IAAEK,OAAO;IAAEC;EAAO,CAAC,CAAC;EAE3D,oBACEJ,IAAA,CAACH,QAAQ,CAACa,IAAI;IAAA,GACRF,KAAK;IACTG,GAAG,EAAEF,SAAS,CAACE,GAAI;IACnBJ,QAAQ,EAAGK,KAAK,IAAK;MACnBH,SAAS,CAACF,QAAQ,CAACK,KAAK,CAAC;MACzBL,QAAQ,GAAGK,KAAK,CAAC;IACnB,CAAE;IACFV,SAAS,EAAEA,SAAU;IACrBI,KAAK,EAAE,CAACA,KAAK,EAAEG,SAAS,CAACI,aAAa,CAAE;IAAAR,QAAA,EAEvCA;EAAQ,CACI,CAAC;AAEpB;AAEAJ,eAAe,CAACa,WAAW,GAAG,iBAAiB","ignoreList":[]}
@@ -1,11 +1,29 @@
1
1
  "use strict";
2
2
 
3
+ import { Fragment } from 'react';
3
4
  import { StyleSheet, View } from 'react-native';
4
5
  import { GestureHandlerRootView } from 'react-native-gesture-handler';
5
6
  import { PortalHost, PortalProvider } from "../primitives/portal.js";
6
7
  import { ToastViewport } from "../components/toast/index.js";
7
8
  import { cn } from "../utils/cn.js";
9
+
10
+ /**
11
+ * `react-native-keyboard-controller` needs its provider at the root, and
12
+ * forgetting it is a silent failure — the hooks return zeroes and keyboard
13
+ * avoidance simply does nothing. Mount it here when the package is installed
14
+ * so `avoidKeyboard` works without any extra setup, and fall back to a
15
+ * pass-through when it is not.
16
+ */
8
17
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
18
+ const KeyboardProvider = (() => {
19
+ try {
20
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
21
+ const controller = require('react-native-keyboard-controller');
22
+ return controller?.KeyboardProvider ?? Fragment;
23
+ } catch {
24
+ return Fragment;
25
+ }
26
+ })();
9
27
  /**
10
28
  * Root provider for PanelUI. Owns three things:
11
29
  * the gesture handler root, the themed page background, and the portal host
@@ -25,10 +43,12 @@ export function PanelUIProvider({
25
43
  }) {
26
44
  return /*#__PURE__*/_jsx(GestureHandlerRootView, {
27
45
  style: styles.root,
28
- children: /*#__PURE__*/_jsx(View, {
29
- className: cn('flex-1', background && 'bg-background', className),
30
- children: /*#__PURE__*/_jsxs(PortalProvider, {
31
- children: [children, /*#__PURE__*/_jsx(ToastViewport, {}), /*#__PURE__*/_jsx(PortalHost, {})]
46
+ children: /*#__PURE__*/_jsx(KeyboardProvider, {
47
+ children: /*#__PURE__*/_jsx(View, {
48
+ className: cn('flex-1', background && 'bg-background', className),
49
+ children: /*#__PURE__*/_jsxs(PortalProvider, {
50
+ children: [children, /*#__PURE__*/_jsx(ToastViewport, {}), /*#__PURE__*/_jsx(PortalHost, {})]
51
+ })
32
52
  })
33
53
  })
34
54
  });
@@ -1 +1 @@
1
- {"version":3,"names":["StyleSheet","View","GestureHandlerRootView","PortalHost","PortalProvider","ToastViewport","cn","jsx","_jsx","jsxs","_jsxs","PanelUIProvider","children","className","background","style","styles","root","create","flex"],"sourceRoot":"../../../src","sources":["providers/panel-ui-provider.tsx"],"mappings":";;AACA,SAASA,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAASC,sBAAsB,QAAQ,8BAA8B;AACrE,SAASC,UAAU,EAAEC,cAAc,QAAQ,yBAAsB;AACjE,SAASC,aAAa,QAAQ,8BAAqB;AACnD,SAASC,EAAE,QAAQ,gBAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAgBjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,eAAeA,CAAC;EAC9BC,QAAQ;EACRC,SAAS;EACTC,UAAU,GAAG;AACO,CAAC,EAAE;EACvB,oBACEN,IAAA,CAACN,sBAAsB;IAACa,KAAK,EAAEC,MAAM,CAACC,IAAK;IAAAL,QAAA,eACzCJ,IAAA,CAACP,IAAI;MAACY,SAAS,EAAEP,EAAE,CAAC,QAAQ,EAAEQ,UAAU,IAAI,eAAe,EAAED,SAAS,CAAE;MAAAD,QAAA,eACtEF,KAAA,CAACN,cAAc;QAAAQ,QAAA,GACZA,QAAQ,eAETJ,IAAA,CAACH,aAAa,IAAE,CAAC,eACjBG,IAAA,CAACL,UAAU,IAAE,CAAC;MAAA,CACA;IAAC,CACb;EAAC,CACe,CAAC;AAE7B;AAEA,MAAMa,MAAM,GAAGhB,UAAU,CAACkB,MAAM,CAAC;EAC/BD,IAAI,EAAE;IAAEE,IAAI,EAAE;EAAE;AAClB,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["Fragment","StyleSheet","View","GestureHandlerRootView","PortalHost","PortalProvider","ToastViewport","cn","jsx","_jsx","jsxs","_jsxs","KeyboardProvider","controller","require","PanelUIProvider","children","className","background","style","styles","root","create","flex"],"sourceRoot":"../../../src","sources":["providers/panel-ui-provider.tsx"],"mappings":";;AAAA,SAASA,QAAQ,QAA4C,OAAO;AACpE,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAASC,sBAAsB,QAAQ,8BAA8B;AACrE,SAASC,UAAU,EAAEC,cAAc,QAAQ,yBAAsB;AACjE,SAASC,aAAa,QAAQ,8BAAqB;AACnD,SAASC,EAAE,QAAQ,gBAAa;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AANA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAOA,MAAMC,gBAAyD,GAAG,CAAC,MAAM;EACvE,IAAI;IACF;IACA,MAAMC,UAAU,GAAGC,OAAO,CAAC,kCAAkC,CAAC;IAC9D,OAAOD,UAAU,EAAED,gBAAgB,IAAIZ,QAAQ;EACjD,CAAC,CAAC,MAAM;IACN,OAAOA,QAAQ;EACjB;AACF,CAAC,EAAE,CAAC;AAgBJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASe,eAAeA,CAAC;EAC9BC,QAAQ;EACRC,SAAS;EACTC,UAAU,GAAG;AACO,CAAC,EAAE;EACvB,oBACET,IAAA,CAACN,sBAAsB;IAACgB,KAAK,EAAEC,MAAM,CAACC,IAAK;IAAAL,QAAA,eAGzCP,IAAA,CAACG,gBAAgB;MAAAI,QAAA,eACfP,IAAA,CAACP,IAAI;QAACe,SAAS,EAAEV,EAAE,CAAC,QAAQ,EAAEW,UAAU,IAAI,eAAe,EAAED,SAAS,CAAE;QAAAD,QAAA,eACtEL,KAAA,CAACN,cAAc;UAAAW,QAAA,GACZA,QAAQ,eAETP,IAAA,CAACH,aAAa,IAAE,CAAC,eACjBG,IAAA,CAACL,UAAU,IAAE,CAAC;QAAA,CACA;MAAC,CACb;IAAC,CACS;EAAC,CACG,CAAC;AAE7B;AAEA,MAAMgB,MAAM,GAAGnB,UAAU,CAACqB,MAAM,CAAC;EAC/BD,IAAI,EAAE;IAAEE,IAAI,EAAE;EAAE;AAClB,CAAC,CAAC","ignoreList":[]}
@@ -11,7 +11,7 @@ import { Uniwind, useUniwind } from 'uniwind';
11
11
  /**
12
12
  * The theme families PanelUI ships. Each sets its own palette *and* its own
13
13
  * radius scale, so switching family changes the shape of the UI as well as
14
- * its colour — Panel is the Coss default, Moon is sharp and monochrome,
14
+ * its colour — Panel is the default, Moon is sharp and monochrome,
15
15
  * Grass is soft and green.
16
16
  *
17
17
  * Everything beyond `panel` must be registered in your metro config, or
@@ -1,12 +1,14 @@
1
1
  /**
2
2
  * Accordion — collapsible sections.
3
3
  *
4
- * Adapted from: heroui-inc/heroui-native src/components/accordion/
5
- * (the Item / Trigger / Indicator / Content anatomy, single vs multiple
6
- * selection, the rotating chevron indicator, and layout-transition expand).
4
+ * Split into Item / Trigger / Indicator / Content so a section header can hold
5
+ * anything — a badge, a price, a second line — instead of only a string. The
6
+ * chevron rotates rather than swapping glyphs, and the panel expands through a
7
+ * layout transition, both on the UI thread.
7
8
  *
8
- * Upstream ships `default` and `surface`; the extra variants here follow the
9
- * same slot structure.
9
+ * `selectionMode` decides whether opening one section closes the others, which
10
+ * also changes the shape of `value`: a string when single, an array when
11
+ * multiple.
10
12
  */
11
13
  import { type ReactNode } from 'react';
12
14
  import { View, type Text as RNText, type ViewProps } from 'react-native';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/accordion/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EASL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAa,IAAI,EAAE,KAAK,IAAI,IAAI,MAAM,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AASpF,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,0BAAuB,CAAC;AAE7D,MAAM,MAAM,gBAAgB,GACxB,SAAS,GACT,SAAS,GACT,WAAW,GACX,UAAU,GACV,OAAO,CAAC;AAEZ,MAAM,MAAM,sBAAsB,GAAG,QAAQ,GAAG,UAAU,CAAC;AA0E3D,MAAM,WAAW,cAAe,SAAQ,SAAS;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,2DAA2D;IAC3D,aAAa,CAAC,EAAE,sBAAsB,CAAC;IACvC,0CAA0C;IAC1C,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACjC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,IAAI,CAAC;IACnD,8CAA8C;IAC9C,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AA0ED,MAAM,WAAW,kBAAmB,SAAQ,SAAS;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,O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aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,IAAI,CAAC;IACnD,8CAA8C;IAC9C,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AA0ED,MAAM,WAAW,kBAAmB,SAAQ,SAAS;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AA6BD,MAAM,WAAW,qBAAsB,SAAQ,SAAS;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AA8BD,MAAM,WAAW,uBAAwB,SAAQ,SAAS;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AA4BD,MAAM,WAAW,qBAAsB,SAAQ,SAAS;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAmCD,eAAO,MAAM,SAAS;;;;;;CAMpB,CAAC"}
@@ -1,12 +1,9 @@
1
1
  /**
2
2
  * Alert — a status message with an optional leading status icon.
3
3
  *
4
- * Adapted from: heroui-inc/heroui-native src/components/alert/alert.tsx
5
- * (Indicator / Content / Title / Description anatomy, status-driven icon and
6
- * title colour), restyled with Coss UI tokens.
7
- *
8
- * The `variant` prop name is kept from PanelUI v0.2 rather than renamed to
9
- * HeroUI's `status`, so existing code keeps working.
4
+ * The indicator derives its icon and colour from the variant, so a success
5
+ * alert cannot end up with a warning icon. Pass `icon` on the root to override
6
+ * it everywhere, or give `Alert.Indicator` children to override one.
10
7
  */
11
8
  import { type ReactNode } from 'react';
12
9
  import { View, type Text as RNText, type ViewProps } from 'react-native';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/alert/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAyC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC9E,OAAO,EAAE,IAAI,EAAE,KAAK,IAAI,IAAI,MAAM,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAG1D,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,0BAAuB,CAAC;AAG7D,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAmCjB,CAAC;AAuBH,MAAM,WAAW,UAAW,SAAQ,SAAS,EAAE,YAAY,CAAC,OAAO,aAAa,CAAC;IAC/E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AA6BD,MAAM,WAAW,mBAAoB,SAAQ,SAAS;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4DAA4D;IAC5D,SAAS,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9C,iDAAiD;IACjD,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAqDD,eAAO,MAAM,KAAK;IAChB,oEAAoE;;IAEpE,mDAAmD;;oBA9BW,MAAM;;;;CAkCpE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/alert/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAyC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC9E,OAAO,EAAE,IAAI,EAAE,KAAK,IAAI,IAAI,MAAM,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAG1D,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,0BAAuB,CAAC;AAG7D,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAmCjB,CAAC;AAuBH,MAAM,WAAW,UAAW,SAAQ,SAAS,EAAE,YAAY,CAAC,OAAO,aAAa,CAAC;IAC/E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AA6BD,MAAM,WAAW,mBAAoB,SAAQ,SAAS;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4DAA4D;IAC5D,SAAS,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9C,iDAAiD;IACjD,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAqDD,eAAO,MAAM,KAAK;IAChB,oEAAoE;;IAEpE,mDAAmD;;oBA9BW,MAAM;;;;CAkCpE,CAAC"}
@@ -5,8 +5,28 @@ export interface BottomSheetProps {
5
5
  open?: boolean;
6
6
  onOpenChange?: (open: boolean) => void;
7
7
  defaultOpen?: boolean;
8
+ /**
9
+ * Present the platform's own sheet instead of this one, so it gets the
10
+ * system's detents, scroll interaction and dismiss gesture. Requires the
11
+ * optional `@expo/ui` package; without it this prop does nothing.
12
+ *
13
+ * **Theme tokens do not apply to the sheet chrome** — the platform draws the
14
+ * container, so `BottomSheet.Content`'s `className` and its drag handle are
15
+ * ignored. The content inside is still yours.
16
+ */
17
+ native?: boolean;
18
+ /**
19
+ * Heights the native sheet can rest at. Omit to size to the content.
20
+ * `{ fraction }` and `{ height }` are iOS-only; Android snaps them to the
21
+ * nearest of `half` / `full`.
22
+ */
23
+ snapPoints?: ('half' | 'full' | {
24
+ fraction: number;
25
+ } | {
26
+ height: number;
27
+ })[];
8
28
  }
9
- declare function BottomSheetRoot({ children, open, onOpenChange, defaultOpen, }: BottomSheetProps): import("react").JSX.Element;
29
+ declare function BottomSheetRoot({ children, open, onOpenChange, defaultOpen, native, snapPoints, }: BottomSheetProps): import("react").JSX.Element;
10
30
  interface BottomSheetTriggerProps {
11
31
  children: ReactElement<{
12
32
  onPress?: (...args: unknown[]) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/bottom-sheet/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAwC,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAoCpF,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,iBAAS,eAAe,CAAC,EACvB,QAAQ,EACR,IAAI,EACJ,YAAY,EACZ,WAAmB,GACpB,EAAE,gBAAgB,+BAuBlB;AAED,UAAU,uBAAuB;IAC/B,QAAQ,EAAE,YAAY,CAAC;QAAE,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAA;KAAE,CAAC,CAAC;CACpE;AAED,iBAAS,kBAAkB,CAAC,EAAE,QAAQ,EAAE,EAAE,uBAAuB;cAH5B,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI;wDA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C;CACpE;AAED,iBAAS,kBAAkB,CAAC,EAAE,QAAQ,EAAE,EAAE,uBAAuB;cAH5B,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI;wDAahE;AAED,MAAM,WAAW,uBAAwB,SAAQ,SAAS;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0DAA0D;IAC1D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,WAAkB,EAClB,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,uBAAuB,sCAqHzB;AAED,eAAO,MAAM,WAAW;;;CAGtB,CAAC"}
@@ -210,6 +210,17 @@ export interface ButtonProps extends Omit<AnimatedPressableProps, 'children' | '
210
210
  endContent?: ReactNode;
211
211
  /** Extra classes for the label when children is a string. */
212
212
  labelClassName?: string;
213
+ /**
214
+ * Render the platform's own button instead of this one. Requires the
215
+ * optional `@expo/ui` package; without it this prop does nothing.
216
+ *
217
+ * **Theme tokens do not apply** — the platform draws the button, so
218
+ * `className`, `size`, `fullWidth`, `startContent`, `endContent` and
219
+ * `loading` are all ignored. `variant` maps onto the nearest platform
220
+ * style: `primary`/`destructive` → filled, `outline` → outlined, everything
221
+ * else → text.
222
+ */
223
+ native?: boolean;
213
224
  }
214
225
  export declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<View>>;
215
226
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/button/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,wCAAqC,C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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAA7E,6EAA6E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAA7E,6EAA6E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAwBjF,CAAC;AAEH,KAAK,kBAAkB,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC;AAsB9D,MAAM,WAAW,WACf,SAAQ,IAAI,CAAC,sBAAsB,EAAE,UAAU,GAAG,UAAU,CAAC,EAC3D,IAAI,CAAC,kBAAkB,EAAE,UAAU,CAAC;IACtC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qEAAqE;IACrE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,iFAAiF;IACjF,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,wCAAwC;IACxC,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,6DAA6D;IAC7D,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAeD,eAAO,MAAM,MAAM,8FA4FlB,CAAC"}
@@ -1,11 +1,10 @@
1
1
  /**
2
2
  * EmptyState — the placeholder shown when a list or view has no content.
3
3
  *
4
- * Adapted from: cosscom/coss packages/ui/src/components/empty.tsx
5
- * (centered Header / Media / Title / Description / Content anatomy, and the
6
- * `icon` media variant that stacks two rotated ghost cards behind the icon).
7
- * Coss does that with CSS pseudo-elements; on native it is two absolutely
8
- * positioned siblings with static rotate transforms.
4
+ * Centred Header / Media / Title / Description / Content, with an `icon` media
5
+ * variant that stacks two rotated ghost cards behind the icon. On the web that
6
+ * is a pair of CSS pseudo-elements; React Native has none, so it is two
7
+ * absolutely positioned siblings with static rotate transforms.
9
8
  */
10
9
  import { type ReactNode } from 'react';
11
10
  import { View, type Text as RNText, type ViewProps } from 'react-native';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/empty-state/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,KAAK,IAAI,IAAI,MAAM,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,0BAAuB,CAAC;AAY7D,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAoBjB,CAAC;AAEH,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAmBD,MAAM,WAAW,oBACf,SAAQ,SAAS,EACf,YAAY,CAAC,OAAO,aAAa,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAwDD,eAAO,MAAM,UAAU;;;;;;CAMrB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/empty-state/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,KAAK,IAAI,IAAI,MAAM,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,0BAAuB,CAAC;AAY7D,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAoBjB,CAAC;AAEH,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAmBD,MAAM,WAAW,oBACf,SAAQ,SAAS,EACf,YAAY,CAAC,OAAO,aAAa,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAwDD,eAAO,MAAM,UAAU;;;;;;CAMrB,CAAC"}
@@ -1,9 +1,22 @@
1
+ /**
2
+ * InlineSelect — a select that reveals its options next to the trigger instead
3
+ * of taking over the screen with a sheet.
4
+ *
5
+ * Two presentations, because the right one depends on what surrounds it:
6
+ *
7
+ * - Inline (default) expands the list in normal layout flow. Everything below
8
+ * moves down. Fine inside a settings list where that reads as the row
9
+ * growing, wrong anywhere the shift is jarring.
10
+ * - `overlay` floats the list above the page through a portal, anchored to the
11
+ * trigger and flipped above it when there is no room below. Nothing else on
12
+ * the screen moves.
13
+ */
1
14
  import { type ReactNode } from 'react';
2
15
  export interface InlineSelectItemProps {
3
16
  value: string;
4
17
  label: string;
5
18
  }
6
- /** Option row. Rendered inline beneath the trigger — no overlay involved. */
19
+ /** Option row. */
7
20
  declare function InlineSelectItem({ value, label }: InlineSelectItemProps): import("react").JSX.Element;
8
21
  export interface InlineSelectProps {
9
22
  className?: string;
@@ -11,13 +24,23 @@ export interface InlineSelectProps {
11
24
  onValueChange: (value: string) => void;
12
25
  placeholder?: string;
13
26
  disabled?: boolean;
27
+ /**
28
+ * Float the list above the page instead of expanding it in layout flow, so
29
+ * opening the select does not push the content below it down.
30
+ */
31
+ overlay?: boolean;
32
+ /**
33
+ * Width of the floating list. `trigger` matches the trigger, `content` sizes
34
+ * to the longest option, or pass a pixel value. Ignored without `overlay`.
35
+ */
36
+ overlayWidth?: 'trigger' | 'content' | number;
37
+ /** Gap between the trigger and the floating list. Ignored without `overlay`. */
38
+ overlayOffset?: number;
39
+ /** Called when the list opens or closes. */
40
+ onOpenChange?: (open: boolean) => void;
14
41
  children: ReactNode;
15
42
  }
16
- /**
17
- * A select that expands its options inline instead of opening a bottom sheet.
18
- * Useful inside forms and scroll views where an overlay would be disruptive.
19
- */
20
- declare function InlineSelectRoot({ className, value, onValueChange, placeholder, disabled, children, }: InlineSelectProps): import("react").JSX.Element;
43
+ declare function InlineSelectRoot({ className, value, onValueChange, placeholder, disabled, overlay, overlayWidth, overlayOffset, onOpenChange, children, }: InlineSelectProps): import("react").JSX.Element;
21
44
  export declare const InlineSelect: typeof InlineSelectRoot & {
22
45
  Item: typeof InlineSelectItem;
23
46
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/inline-select/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AA0Cf,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,6EAA6E;AAC7E,iBAAS,gBAAgB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,qBAAqB,+BA4BhE;AAED,MAAM,WAAW,iBAAiB;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;GAGG;AACH,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,KAAK,EACL,aAAa,EACb,WAAgC,EAChC,QAAQ,EACR,QAAQ,GACT,EAAE,iBAAiB,+BAyEnB;AAED,eAAO,MAAM,YAAY;;CAEvB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/inline-select/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EASL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAwDf,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,kBAAkB;AAClB,iBAAS,gBAAgB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,qBAAqB,+BA4BhE;AAUD,MAAM,WAAW,iBAAiB;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,YAAY,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,MAAM,CAAC;IAC9C,gFAAgF;IAChF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,4CAA4C;IAC5C,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,KAAK,EACL,aAAa,EACb,WAAgC,EAChC,QAAQ,EACR,OAAe,EACf,YAAwB,EACxB,aAAiB,EACjB,YAAY,EACZ,QAAQ,GACT,EAAE,iBAAiB,+BA0KnB;AAED,eAAO,MAAM,YAAY;;CAEvB,CAAC"}
@@ -7,6 +7,19 @@ export interface InputProps extends TextInputProps {
7
7
  /** Error message. When set, the field renders in its invalid state. */
8
8
  errorMessage?: string;
9
9
  disabled?: boolean;
10
+ /**
11
+ * Lift the field above the software keyboard when it would otherwise be
12
+ * covered. Moves by exactly the overlap, and not at all when the field is
13
+ * already clear.
14
+ *
15
+ * Install `react-native-keyboard-controller` for this to behave on Android.
16
+ *
17
+ * Do not toggle this at runtime — it changes which component renders the
18
+ * container, which would remount the field and drop focus.
19
+ */
20
+ avoidKeyboard?: boolean;
21
+ /** Gap kept between the field and the keyboard when `avoidKeyboard` is set. */
22
+ keyboardOffset?: number;
10
23
  }
11
24
  export declare const Input: import("react").ForwardRefExoticComponent<InputProps & import("react").RefAttributes<TextInput>>;
12
25
  //# sourceMappingURL=index.d.ts.map