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
@@ -1,41 +1,59 @@
1
1
  /**
2
- * Shimmer — an animated highlight sweeping across content.
2
+ * Shimmer — a highlight that sweeps *through* content rather than over it.
3
3
  *
4
- * The React Native equivalent of shadcn-ui/ui's `shimmer` utility
5
- * (https://ui.shadcn.com/docs/utils/shimmer). That one is CSS:
6
- * `background-clip: text` with a `color-mix()` highlight. React Native has
7
- * neither, so the highlight is drawn as an SVG gradient band swept across an
8
- * overlay by Reanimated, on the UI thread.
9
- *
10
- * The visible difference: the band passes *over* the content rather than
11
- * being clipped to glyph shapes. On body-sized text the two read the same; on
12
- * very large text the web version is crisper.
4
+ * The content is used as a mask, and a gradient band is swept behind it on the
5
+ * UI thread. Because the content is the mask, the highlight is clipped to the
6
+ * glyph shapes: text reads as though the letters themselves are catching a
7
+ * light, which is the "thinking…" treatment familiar from AI chat interfaces.
13
8
  *
14
9
  * ```tsx
15
- * <Shimmer>
16
- * <Text muted>Generating response…</Text>
17
- * </Shimmer>
10
+ * <Shimmer>Thinking…</Shimmer>
18
11
  * ```
12
+ *
13
+ * Set `as="view"` to shimmer arbitrary children (skeleton blocks, cards) — the
14
+ * mask is then the rendered subtree's alpha instead of a line of text.
19
15
  */
20
16
  import { type ReactNode } from 'react';
21
- import { type ViewProps } from 'react-native';
17
+ import { type StyleProp, type TextStyle, type ViewProps } from 'react-native';
22
18
  export interface ShimmerProps extends ViewProps {
23
19
  className?: string;
20
+ /**
21
+ * `text` renders `children` as a single styled string and masks the sweep to
22
+ * the glyphs. `view` masks the sweep to whatever subtree you pass.
23
+ */
24
+ as?: 'text' | 'view';
24
25
  /** Milliseconds for one sweep. */
25
26
  duration?: number;
26
- /** Sweep once instead of looping. */
27
+ /** Width of the highlight band, as a multiple of the content width. */
28
+ spread?: number;
29
+ /** Colour of the content at rest. Defaults to the theme's muted foreground. */
30
+ baseColor?: string;
31
+ /** Colour at the centre of the sweep. Defaults to the theme's foreground. */
32
+ shimmerColor?: string;
33
+ /** `loop` restarts from the left; `ping-pong` reverses on each pass. */
34
+ mode?: 'loop' | 'ping-pong';
35
+ /** Sweep once instead of repeating. */
27
36
  once?: boolean;
28
37
  /** Sweep right-to-left. */
29
38
  reverse?: boolean;
30
- /** Width of the highlight band, as a fraction of the content width. */
31
- spread?: number;
32
- /** Highlight colour. Defaults to the theme's foreground. */
39
+ /** Set false to render the content statically without animating. */
40
+ enabled?: boolean;
41
+ /** Extra classes for the text when `as="text"`. */
42
+ textClassName?: string;
43
+ /** Extra styles for the text when `as="text"`. */
44
+ textStyle?: StyleProp<TextStyle>;
45
+ /**
46
+ * @deprecated Use `shimmerColor`.
47
+ */
33
48
  color?: string;
34
- /** Peak opacity of the highlight. */
49
+ /**
50
+ * Peak opacity of the highlight.
51
+ * @deprecated Set `shimmerColor` to a colour with the alpha you want.
52
+ */
35
53
  intensity?: number;
36
54
  children?: ReactNode;
37
55
  }
38
- export declare function Shimmer({ className, duration, once, reverse, spread, color, intensity, children, ...props }: ShimmerProps): import("react").JSX.Element;
56
+ export declare function Shimmer({ className, as, duration, spread, baseColor, shimmerColor, mode, once, reverse, enabled, textClassName, textStyle, color, intensity, children, ...props }: ShimmerProps): import("react").JSX.Element;
39
57
  export declare namespace Shimmer {
40
58
  var displayName: string;
41
59
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/shimmer/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAuB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAgC,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAc5E,MAAM,WAAW,YAAa,SAAQ,SAAS;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kCAAkC;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qCAAqC;IACrC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,2BAA2B;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,uEAAuE;IACvE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qCAAqC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,wBAAgB,OAAO,CAAC,EACtB,SAAS,EACT,QAAe,EACf,IAAY,EACZ,OAAe,EACf,MAAY,EACZ,KAAK,EACL,SAAgB,EAChB,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,YAAY,+BAuEd;yBAjFe,OAAO"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/shimmer/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAuB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,EAIL,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAgBtB,MAAM,WAAW,YAAa,SAAQ,SAAS;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,kCAAkC;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uEAAuE;IACvE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,+EAA+E;IAC/E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6EAA6E;IAC7E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wEAAwE;IACxE,IAAI,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC;IAC5B,uCAAuC;IACvC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,2BAA2B;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oEAAoE;IACpE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,mDAAmD;IACnD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kDAAkD;IAClD,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACjC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,wBAAgB,OAAO,CAAC,EACtB,SAAS,EACT,EAAW,EACX,QAAe,EACf,MAAU,EACV,SAAS,EACT,YAAY,EACZ,IAAa,EACb,IAAY,EACZ,OAAe,EACf,OAAc,EACd,aAAa,EACb,SAAS,EACT,KAAK,EACL,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,YAAY,+BAqGd;yBAtHe,OAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/surface/index.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAc,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE1D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;8EAanB,CAAC;AAEH,MAAM,WAAW,YACf,SAAQ,SAAS,EACf,YAAY,CAAC,OAAO,eAAe,CAAC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,OAAO,+FAYnB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/surface/index.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAAc,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE1D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;8EAanB,CAAC;AAEH,MAAM,WAAW,YACf,SAAQ,SAAS,EACf,YAAY,CAAC,OAAO,eAAe,CAAC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,OAAO,+FAYnB,CAAC"}
@@ -66,6 +66,16 @@ export interface SwitchProps extends VariantProps<typeof switchVariants> {
66
66
  value: boolean;
67
67
  onValueChange?: (value: boolean) => void;
68
68
  disabled?: boolean;
69
+ /**
70
+ * Render the platform's own switch instead of this one. Requires the
71
+ * optional `@expo/ui` package; without it this prop does nothing.
72
+ *
73
+ * **Theme tokens do not apply** — the platform draws the control, so
74
+ * `className` and `size` are ignored.
75
+ */
76
+ native?: boolean;
77
+ /** Text label drawn beside the control. Native mode only. */
78
+ label?: string;
69
79
  }
70
80
  /**
71
81
  * Animated switch. Thumb position and active-track opacity are driven on the
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/switch/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAa,IAAI,EAAE,MAAM,cAAc,CAAC;AAO/C,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAI1D,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAkBlB,CAAC;AAIH,MAAM,WAAW,WAAY,SAAQ,YAAY,CAAC,OAAO,cAAc,CAAC;IACtE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;IACf,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;GAGG;AACH,eAAO,MAAM,MAAM,8FAmClB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/switch/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAa,IAAI,EAAE,MAAM,cAAc,CAAC;AAO/C,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAK1D,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAkBlB,CAAC;AAIH,MAAM,WAAW,WAAY,SAAQ,YAAY,CAAC,OAAO,cAAc,CAAC;IACtE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;IACf,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,6DAA6D;IAC7D,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,eAAO,MAAM,MAAM,8FAkDlB,CAAC"}
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * Toast — transient notification.
3
3
  *
4
- * Adapted from: heroui-inc/heroui-native src/components/toast/
5
- * (the three usage patterns — string, config object, custom component — the
6
- * Title / Description / Action / Close anatomy, placement, and swipe-to-
7
- * dismiss). Styled with Coss UI tokens and PanelUI's Alert status palette.
4
+ * Three ways to raise one, because the right amount of ceremony differs: a
5
+ * bare string, a config object with a title, description and action, or a
6
+ * custom component when none of that fits. The anatomy underneath is the same
7
+ * in all three.
8
8
  *
9
9
  * The viewport is mounted for you by PanelUIProvider; `useToast()` works
10
10
  * anywhere below it.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/toast/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAkBpD,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAG1D,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,0BAAuB,CAAC;AAG7D,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,oBAAW,CAAC;AACrD,OAAO,EACL,KAAK,EAEL,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,YAAY,EAClB,MAAM,kBAAe,CAAC;AAkDvB,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAuBjB,CAAC;AA4BH,MAAM,WAAW,U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AO,EAAE,KAAK,EAAE,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,KAAK,YAAY,EAAE,KAAK,WAAW,EAAE,CAAC;AAC3F,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAe,CAAC"}
@@ -2,6 +2,7 @@ export { useCopyToClipboard, type UseCopyToClipboardOptions, type UseCopyToClipb
2
2
  export { useDisclosure, type UseDisclosureOptions, type UseDisclosureResult, } from './use-disclosure.js';
3
3
  export { useBreakpoint, BREAKPOINTS, type Breakpoint, type UseBreakpointResult, } from './use-breakpoint.js';
4
4
  export { useKeyboard, type UseKeyboardResult } from './use-keyboard.js';
5
+ export { useKeyboardAvoidance, type UseKeyboardAvoidanceOptions, type UseKeyboardAvoidanceResult, } from './use-keyboard-avoidance.js';
5
6
  export { useDebouncedValue } from './use-debounced-value.js';
6
7
  export { usePrevious } from './use-previous.js';
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,GAC9B,MAAM,4BAAyB,CAAC;AACjC,OAAO,EACL,aAAa,EACb,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,GACzB,MAAM,qBAAkB,CAAC;AAC1B,OAAO,EACL,aAAa,EACb,WAAW,EACX,KAAK,UAAU,EACf,KAAK,mBAAmB,GACzB,MAAM,qBAAkB,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,KAAK,iBAAiB,EAAE,MAAM,mBAAgB,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAAuB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,GAC9B,MAAM,4BAAyB,CAAC;AACjC,OAAO,EACL,aAAa,EACb,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,GACzB,MAAM,qBAAkB,CAAC;AAC1B,OAAO,EACL,aAAa,EACb,WAAW,EACX,KAAK,UAAU,EACf,KAAK,mBAAmB,GACzB,MAAM,qBAAkB,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,KAAK,iBAAiB,EAAE,MAAM,mBAAgB,CAAC;AACrE,OAAO,EACL,oBAAoB,EACpB,KAAK,2BAA2B,EAChC,KAAK,0BAA0B,GAChC,MAAM,6BAA0B,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAAuB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAgB,CAAC"}
@@ -16,8 +16,8 @@ export interface UseBreakpointResult {
16
16
  isLandscape: boolean;
17
17
  }
18
18
  /**
19
- * Responsive state from the window size — the React Native answer to
20
- * coss.com/ui's `useMediaQuery`, which has no equivalent here.
19
+ * Responsive state from the window size — the React Native answer to a media
20
+ * query, which has no equivalent here.
21
21
  *
22
22
  * For styling, prefer Uniwind's responsive class prefixes (`md:flex-row`).
23
23
  * Reach for this when the *behaviour* changes, not just the look — rendering
@@ -11,8 +11,6 @@ export interface UseCopyToClipboardResult {
11
11
  /**
12
12
  * Copy text to the clipboard, with a temporary "copied" state.
13
13
  *
14
- * Mirrors coss.com/ui's `useCopyToClipboard`.
15
- *
16
14
  * Requires `expo-clipboard`, which is an optional peer dependency — React
17
15
  * Native removed `Clipboard` from core, and pulling in a required native
18
16
  * module for one hook would cost every consumer who never calls it:
@@ -1 +1 @@
1
- {"version":3,"file":"use-copy-to-clipboard.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-copy-to-clipboard.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,yBAAyB;IACxC,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,wBAAwB;IACvC,yDAAyD;IACzD,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,OAAc,EACd,MAAM,GACP,GAAE,yBAA8B,GAAG,wBAAwB,CA6B3D"}
1
+ {"version":3,"file":"use-copy-to-clipboard.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-copy-to-clipboard.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,yBAAyB;IACxC,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,wBAAwB;IACvC,yDAAyD;IACzD,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,OAAc,EACd,MAAM,GACP,GAAE,yBAA8B,GAAG,wBAAwB,CA6B3D"}
@@ -0,0 +1,20 @@
1
+ import { type LayoutChangeEvent, type View } from 'react-native';
2
+ import { useAnimatedStyle, type AnimatedRef } from 'react-native-reanimated';
3
+ export interface UseKeyboardAvoidanceOptions {
4
+ /** Set false to leave the element where it is. */
5
+ enabled?: boolean;
6
+ /** Gap to keep between the element's bottom edge and the keyboard. */
7
+ offset?: number;
8
+ }
9
+ export interface UseKeyboardAvoidanceResult {
10
+ /** Attach to the element that should stay visible. */
11
+ ref: AnimatedRef<View>;
12
+ /** Attach to the same element — it is how the resting position is measured. */
13
+ onLayout: (event: LayoutChangeEvent) => void;
14
+ /** Apply to the same element. */
15
+ animatedStyle: ReturnType<typeof useAnimatedStyle>;
16
+ }
17
+ /** True when the keyboard controller is driving this, rather than the fallback. */
18
+ export declare function hasKeyboardController(): boolean;
19
+ export declare function useKeyboardAvoidance({ enabled, offset, }?: UseKeyboardAvoidanceOptions): UseKeyboardAvoidanceResult;
20
+ //# sourceMappingURL=use-keyboard-avoidance.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-keyboard-avoidance.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-keyboard-avoidance.ts"],"names":[],"mappings":"AAkCA,OAAO,EAAuB,KAAK,iBAAiB,EAAE,KAAK,IAAI,EAAE,MAAM,cAAc,CAAC;AACtF,OAAO,EAGL,gBAAgB,EAEhB,KAAK,WAAW,EAEjB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,WAAW,2BAA2B;IAC1C,kDAAkD;IAClD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sEAAsE;IACtE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,0BAA0B;IACzC,sDAAsD;IACtD,GAAG,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC;IACvB,+EAA+E;IAC/E,QAAQ,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC7C,iCAAiC;IACjC,aAAa,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;CACpD;AA6BD,mFAAmF;AACnF,wBAAgB,qBAAqB,IAAI,OAAO,CAQ/C;AAED,wBAAgB,oBAAoB,CAAC,EACnC,OAAc,EACd,MAAW,GACZ,GAAE,2BAAgC,GAAG,0BAA0B,CAsC/D"}
@@ -2,10 +2,10 @@
2
2
  * Icon set.
3
3
  *
4
4
  * Two families live here:
5
- * - Stroked 24×24 icons (Lucide geometry, as used by shadcn-ui/ui) for chrome
6
- * such as chevrons and the close button.
7
- * - Filled 16×16 status icons for Alert and Toast indicators.
8
- * Adapted from: heroui-inc/heroui-native src/components/alert/{default,success,warning}-icon.tsx
5
+ * - Stroked 24×24 icons on Lucide geometry, for chrome such as chevrons and
6
+ * the close button.
7
+ * - Filled 16×16 status icons for Alert and Toast indicators, which read
8
+ * better small than a stroked equivalent would.
9
9
  *
10
10
  * Every icon resolves its colour in the same order: an explicit `color` prop,
11
11
  * then the colour inherited from an enclosing `IconColorProvider`, then its
@@ -2,7 +2,9 @@ export { PanelUIProvider, type PanelUIProviderProps } from './providers/panel-ui
2
2
  export { useTheme, useThemeMode, PANEL_THEMES, PANEL_THEME_NAMES, PANEL_EXTRA_THEMES, type ThemeName, type ThemeMode, type PanelTheme, type PanelThemeFamily, } from './theme/use-theme.js';
3
3
  export { Portal, PortalHost, PortalProvider } from './primitives/portal.js';
4
4
  export { Text, type TextProps } from './primitives/text.js';
5
+ export { KeyboardAvoider, type KeyboardAvoiderProps, } from './primitives/keyboard-avoider.js';
5
6
  export { AnimatedPressable, type AnimatedPressableProps, } from './primitives/animated-pressable.js';
7
+ export { hasNativeUI } from './native/index.js';
6
8
  export { Accordion, type AccordionProps, type AccordionItemProps, type AccordionTriggerProps, type AccordionIndicatorProps, type AccordionContentProps, type AccordionVariant, type AccordionSelectionMode, } from './components/accordion/index.js';
7
9
  export { Alert, type AlertProps, type AlertIndicatorProps, } from './components/alert/index.js';
8
10
  export { Avatar, type AvatarProps, type AvatarBadgeProps, } from './components/avatar/index.js';
@@ -19,7 +21,9 @@ export { Checkbox, type CheckboxProps } from './components/checkbox/index.js';
19
21
  export { EmptyState, type EmptyStateProps, type EmptyStateMediaProps, } from './components/empty-state/index.js';
20
22
  export { Input, type InputProps } from './components/input/index.js';
21
23
  export { InputGroup, type InputGroupProps, type InputGroupInputProps, type InputGroupDecoratorProps, } from './components/input-group/index.js';
24
+ export { Item, type ItemProps, type ItemGroupProps, type ItemSeparatorProps, type ItemMediaProps, type ItemContentProps, type ItemTitleProps, type ItemDescriptionProps, type ItemActionsProps, type ItemHeaderProps, type ItemFooterProps, } from './components/item/index.js';
22
25
  export { Label, type LabelProps, type LabelTextProps } from './components/label/index.js';
26
+ export { Message, type MessageProps, type MessageGroupProps, type MessageAvatarProps, type MessageContentProps, type MessageHeaderProps, type MessageBubbleProps, type MessageBubbleContentProps, type MessageFooterProps, type MessageActionsProps, } from './components/message/index.js';
23
27
  export { Progress, type ProgressProps } from './components/progress/index.js';
24
28
  export { RadioGroup, type RadioGroupProps, type RadioGroupItemProps, } from './components/radio-group/index.js';
25
29
  export { ScrollFade, type ScrollFadeProps, } from './components/scroll-fade/index.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,kCAA+B,CAAC;AAG3F,OAAO,EACL,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,UAAU,EACf,KAAK,gBAAgB,GACtB,MAAM,sBAAmB,CAAC;AAG3B,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,wBAAqB,CAAC;AACzE,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,sBAAmB,CAAC;AACzD,OAAO,EACL,iBAAiB,EACjB,KAAK,sBAAsB,GAC5B,MAAM,oCAAiC,CAAC;AAGzC,OAAO,EACL,SAAS,EACT,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,GAC5B,MAAM,iCAAwB,CAAC;AAChC,OAAO,EACL,KAAK,EACL,KAAK,UAAU,EACf,KAAK,mBAAmB,GACzB,MAAM,6BAAoB,CAAC;AAC5B,OAAO,EACL,MAAM,EACN,KAAK,WAAW,EAChB,KAAK,gBAAgB,GACtB,MAAM,8BAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,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BAAoB,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,+BAAsB,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,8BAAqB,CAAC;AAC/D,OAAO,EACL,QAAQ,EACR,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,YAAY,GAClB,MAAM,gCAAuB,CAAC;AAC/B,OAAO,EACL,KAAK,EACL,aAAa,EACb,KAAK,EACL,QAAQ,EACR,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACxB,KAAK,eAAe,GACrB,MAAM,6BAAoB,CAAC;AAC5B,OAAO,EACL,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,GACzB,MAAM,kCAAyB,CAAC;AAGjC,OAAO,EACL,iBAAiB,EACjB,SAAS,EACT,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,eAAe,EACf,SAAS,EACT,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,cAAc,EACd,WAAW,EACX,UAAU,EACV,QAAQ,EACR,cAAc,EACd,eAAe,EACf,eAAe,EACf,OAAO,EACP,KAAK,EACL,YAAY,EACZ,KAAK,SAAS,GACf,MAAM,kBAAS,CAAC;AAGjB,cAAc,kBAAS,CAAC;AAGxB,OAAO,EAAE,EAAE,EAAE,MAAM,eAAY,CAAC"}
@@ -0,0 +1,35 @@
1
+ import type { ComponentType, ReactNode } from 'react';
2
+ interface NativeUIModule {
3
+ Host: ComponentType<{
4
+ children?: ReactNode;
5
+ matchContents?: boolean;
6
+ style?: unknown;
7
+ [key: string]: unknown;
8
+ }>;
9
+ /**
10
+ * Hosts React Native views inside the native tree. Anything of ours that
11
+ * goes inside a native container has to be wrapped in this or the native
12
+ * layout does not measure it — children spill outside their container.
13
+ */
14
+ RNHostView: ComponentType<{
15
+ children?: ReactNode;
16
+ matchContents?: boolean;
17
+ style?: unknown;
18
+ }>;
19
+ Button: ComponentType<Record<string, unknown>>;
20
+ Switch: ComponentType<Record<string, unknown>>;
21
+ Picker: ComponentType<Record<string, unknown>> & {
22
+ Item: ComponentType<Record<string, unknown>>;
23
+ };
24
+ BottomSheet: ComponentType<Record<string, unknown>>;
25
+ }
26
+ /**
27
+ * The native UI module, or null when it is not installed or the platform has
28
+ * no toolkit behind it. Resolved once and cached — a failed require is not
29
+ * retried on every render.
30
+ */
31
+ export declare function getNativeUI(): NativeUIModule | null;
32
+ /** Whether `native` will actually render a platform control. */
33
+ export declare function hasNativeUI(): boolean;
34
+ export {};
35
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/native/index.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtD,UAAU,cAAc;IACtB,IAAI,EAAE,aAAa,CAAC;QAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;QACrB,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC,CAAC;IACH;;;;OAIG;IACH,UAAU,EAAE,aAAa,CAAC;QACxB,QAAQ,CAAC,EAAE,SAAS,CAAC;QACrB,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB,KAAK,CAAC,EAAE,OAAO,CAAC;KACjB,CAAC,CAAC;IACH,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAC/C,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAC/C,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG;QAC/C,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;KAC9C,CAAC;IACF,WAAW,EAAE,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACrD;AAKD;;;;GAIG;AACH,wBAAgB,WAAW,IAAI,cAAc,GAAG,IAAI,CAgBnD;AAED,gEAAgE;AAChE,wBAAgB,WAAW,IAAI,OAAO,CAErC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * KeyboardAvoider — a view that lifts itself just clear of the keyboard.
3
+ *
4
+ * A thin wrapper over `useKeyboardAvoidance` for the common case of "keep this
5
+ * box visible", so a form does not have to wire the ref, layout handler and
6
+ * animated style by hand.
7
+ */
8
+ import type { ReactNode } from 'react';
9
+ import type { ViewProps } from 'react-native';
10
+ export interface KeyboardAvoiderProps extends ViewProps {
11
+ className?: string;
12
+ /** Set false to leave the content where it is. */
13
+ enabled?: boolean;
14
+ /** Gap to keep between the content's bottom edge and the keyboard. */
15
+ offset?: number;
16
+ children?: ReactNode;
17
+ }
18
+ export declare function KeyboardAvoider({ className, enabled, offset, children, style, onLayout, ...props }: KeyboardAvoiderProps): import("react").JSX.Element;
19
+ export declare namespace KeyboardAvoider {
20
+ var displayName: string;
21
+ }
22
+ //# sourceMappingURL=keyboard-avoider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keyboard-avoider.d.ts","sourceRoot":"","sources":["../../../../src/primitives/keyboard-avoider.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAI9C,MAAM,WAAW,oBAAqB,SAAQ,SAAS;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kDAAkD;IAClD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sEAAsE;IACtE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,OAAc,EACd,MAAW,EACX,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,oBAAoB,+BAiBtB;yBAzBe,eAAe"}
@@ -1,4 +1,4 @@
1
- import type { ReactNode } from 'react';
1
+ import { type ReactNode } from 'react';
2
2
  export interface PanelUIProviderProps {
3
3
  children: ReactNode;
4
4
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"panel-ui-provider.d.ts","sourceRoot":"","sources":["../../../../src/providers/panel-ui-provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAOvC,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,SAAS,EACT,UAAiB,GAClB,EAAE,oBAAoB,+BAatB"}
1
+ {"version":3,"file":"panel-ui-provider.d.ts","sourceRoot":"","sources":["../../../../src/providers/panel-ui-provider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAwBrE,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,SAAS,EACT,UAAiB,GAClB,EAAE,oBAAoB,+BAiBtB"}
@@ -17,7 +17,7 @@ export interface PanelThemeFamily {
17
17
  /**
18
18
  * The theme families PanelUI ships. Each sets its own palette *and* its own
19
19
  * radius scale, so switching family changes the shape of the UI as well as
20
- * its colour — Panel is the Coss default, Moon is sharp and monochrome,
20
+ * its colour — Panel is the default, Moon is sharp and monochrome,
21
21
  * Grass is soft and green.
22
22
  *
23
23
  * Everything beyond `panel` must be registered in your metro config, or
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "panelui-native",
3
- "version": "0.6.0",
4
- "description": "High-performance React Native UI components for Expo. Coss UI design language, powered by Uniwind (Tailwind v4) and Reanimated.",
3
+ "version": "0.7.0",
4
+ "description": "High-performance React Native UI components for Expo. Semantic design tokens, powered by Uniwind (Tailwind v4) and Reanimated.",
5
5
  "main": "./lib/module/index.js",
6
6
  "module": "./lib/module/index.js",
7
7
  "types": "./lib/typescript/src/index.d.ts",
@@ -43,7 +43,6 @@
43
43
  "nativewind",
44
44
  "reanimated",
45
45
  "design-system",
46
- "shadcn",
47
46
  "dark-mode",
48
47
  "theming",
49
48
  "accessibility",
@@ -64,10 +63,14 @@
64
63
  "license": "MIT",
65
64
  "homepage": "https://github.com/panel-ui/PanelUI#readme",
66
65
  "peerDependencies": {
66
+ "@expo/ui": "*",
67
+ "@react-native-masked-view/masked-view": ">=0.3.0",
67
68
  "expo-clipboard": ">=7.0.0",
69
+ "expo-linear-gradient": ">=13.0.0",
68
70
  "react": "*",
69
71
  "react-native": "*",
70
72
  "react-native-gesture-handler": ">=2.0.0",
73
+ "react-native-keyboard-controller": ">=1.12.0",
71
74
  "react-native-reanimated": ">=3.0.0",
72
75
  "react-native-safe-area-context": ">=4.0.0",
73
76
  "react-native-svg": ">=15.0.0",
@@ -96,8 +99,14 @@
96
99
  ]
97
100
  },
98
101
  "peerDependenciesMeta": {
102
+ "@expo/ui": {
103
+ "optional": true
104
+ },
99
105
  "expo-clipboard": {
100
106
  "optional": true
107
+ },
108
+ "react-native-keyboard-controller": {
109
+ "optional": true
101
110
  }
102
111
  }
103
112
  }
@@ -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 {
12
14
  Children,
@@ -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 { createContext, forwardRef, useContext, type ReactNode } from 'react';
12
9
  import { View, type Text as RNText, type ViewProps } from 'react-native';
@@ -23,6 +23,7 @@ import Animated, {
23
23
  withTiming,
24
24
  } from 'react-native-reanimated';
25
25
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
26
+ import { getNativeUI } from '../../native';
26
27
  import { Portal } from '../../primitives/portal';
27
28
  import { cn } from '../../utils/cn';
28
29
 
@@ -50,13 +51,40 @@ export interface BottomSheetProps {
50
51
  open?: boolean;
51
52
  onOpenChange?: (open: boolean) => void;
52
53
  defaultOpen?: boolean;
54
+ /**
55
+ * Present the platform's own sheet instead of this one, so it gets the
56
+ * system's detents, scroll interaction and dismiss gesture. Requires the
57
+ * optional `@expo/ui` package; without it this prop does nothing.
58
+ *
59
+ * **Theme tokens do not apply to the sheet chrome** — the platform draws the
60
+ * container, so `BottomSheet.Content`'s `className` and its drag handle are
61
+ * ignored. The content inside is still yours.
62
+ */
63
+ native?: boolean;
64
+ /**
65
+ * Heights the native sheet can rest at. Omit to size to the content.
66
+ * `{ fraction }` and `{ height }` are iOS-only; Android snaps them to the
67
+ * nearest of `half` / `full`.
68
+ */
69
+ snapPoints?: ('half' | 'full' | { fraction: number } | { height: number })[];
53
70
  }
54
71
 
72
+ /**
73
+ * Set by the root so Content knows the platform is drawing the sheet, and with
74
+ * which detents. Null means the styled sheet renders.
75
+ */
76
+ const NativeSheetContext = createContext<{
77
+ nativeUI: NonNullable<ReturnType<typeof getNativeUI>>;
78
+ snapPoints: BottomSheetProps['snapPoints'];
79
+ } | null>(null);
80
+
55
81
  function BottomSheetRoot({
56
82
  children,
57
83
  open,
58
84
  onOpenChange,
59
85
  defaultOpen = false,
86
+ native,
87
+ snapPoints,
60
88
  }: BottomSheetProps) {
61
89
  const [internalOpen, setInternalOpen] = useState(defaultOpen);
62
90
  const isControlled = open !== undefined;
@@ -75,9 +103,17 @@ function BottomSheetRoot({
75
103
  [resolvedOpen, setOpen]
76
104
  );
77
105
 
106
+ const nativeUI = native ? getNativeUI() : null;
107
+ const nativeSheet = useMemo(
108
+ () => (nativeUI ? { nativeUI, snapPoints } : null),
109
+ [nativeUI, snapPoints]
110
+ );
111
+
78
112
  return (
79
113
  <BottomSheetContext.Provider value={context}>
80
- {children}
114
+ <NativeSheetContext.Provider value={nativeSheet}>
115
+ {children}
116
+ </NativeSheetContext.Provider>
81
117
  </BottomSheetContext.Provider>
82
118
  );
83
119
  }
@@ -113,7 +149,8 @@ function BottomSheetContent({
113
149
  }: BottomSheetContentProps) {
114
150
  const context = useBottomSheet('BottomSheet.Content');
115
151
  const { open, setOpen } = context;
116
- const { height: screenHeight } = useWindowDimensions();
152
+ const nativeSheet = useContext(NativeSheetContext);
153
+ const { height: screenHeight, width: screenWidth } = useWindowDimensions();
117
154
  const insets = useSafeAreaInsets();
118
155
  const translateY = useSharedValue(0);
119
156
 
@@ -142,6 +179,49 @@ function BottomSheetContent({
142
179
  transform: [{ translateY: translateY.value }],
143
180
  }));
144
181
 
182
+ if (nativeSheet) {
183
+ const { Host, BottomSheet: NativeBottomSheet, RNHostView } = nativeSheet.nativeUI;
184
+ // The platform owns presentation, so this stays mounted and toggles
185
+ // isPresented rather than unmounting on close.
186
+ //
187
+ // RNHostView is not optional: our content is React Native, and the native
188
+ // sheet cannot measure RN views directly. Without it the sheet sizes to
189
+ // nothing and the content spills outside its container.
190
+ return (
191
+ <Host matchContents style={{ position: 'absolute' }}>
192
+ <NativeBottomSheet
193
+ isPresented={open}
194
+ onDismiss={dismissible ? close : () => {}}
195
+ snapPoints={nativeSheet.snapPoints}
196
+ >
197
+ <RNHostView matchContents>
198
+ <BottomSheetContext.Provider value={context}>
199
+ <View
200
+ {...props}
201
+ className={cn(
202
+ // The platform draws the container, but it hands us a bare
203
+ // box — padding and safe-area are still ours.
204
+ 'gap-2 px-5 pb-2 pt-1',
205
+ className
206
+ )}
207
+ style={{
208
+ // An explicit width, not `w-full`. Inside the native host
209
+ // there is no parent width for a percentage to resolve
210
+ // against, so `100%` measures against nothing and the
211
+ // content lays out wider than the sheet it sits in.
212
+ width: screenWidth,
213
+ paddingBottom: Math.max(insets.bottom, 16),
214
+ }}
215
+ >
216
+ {children}
217
+ </View>
218
+ </BottomSheetContext.Provider>
219
+ </RNHostView>
220
+ </NativeBottomSheet>
221
+ </Host>
222
+ );
223
+ }
224
+
145
225
  if (!open) return null;
146
226
 
147
227
  return (