panelui-native 0.5.3 → 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 (156) hide show
  1. package/README.md +9 -5
  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 +204 -0
  25. package/lib/module/components/scroll-fade/index.js.map +1 -0
  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 +167 -0
  29. package/lib/module/components/shimmer/index.js.map +1 -0
  30. package/lib/module/components/surface/index.js +65 -0
  31. package/lib/module/components/surface/index.js.map +1 -0
  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 +10 -0
  38. package/lib/module/hooks/index.js.map +1 -0
  39. package/lib/module/hooks/use-breakpoint.js +39 -0
  40. package/lib/module/hooks/use-breakpoint.js.map +1 -0
  41. package/lib/module/hooks/use-copy-to-clipboard.js +60 -0
  42. package/lib/module/hooks/use-copy-to-clipboard.js.map +1 -0
  43. package/lib/module/hooks/use-debounced-value.js +24 -0
  44. package/lib/module/hooks/use-debounced-value.js.map +1 -0
  45. package/lib/module/hooks/use-disclosure.js +43 -0
  46. package/lib/module/hooks/use-disclosure.js.map +1 -0
  47. package/lib/module/hooks/use-keyboard-avoidance.js +120 -0
  48. package/lib/module/hooks/use-keyboard-avoidance.js.map +1 -0
  49. package/lib/module/hooks/use-keyboard.js +36 -0
  50. package/lib/module/hooks/use-keyboard.js.map +1 -0
  51. package/lib/module/hooks/use-previous.js +25 -0
  52. package/lib/module/hooks/use-previous.js.map +1 -0
  53. package/lib/module/icons/index.js +4 -4
  54. package/lib/module/index.js +12 -0
  55. package/lib/module/index.js.map +1 -1
  56. package/lib/module/native/index.js +53 -0
  57. package/lib/module/native/index.js.map +1 -0
  58. package/lib/module/primitives/keyboard-avoider.js +40 -0
  59. package/lib/module/primitives/keyboard-avoider.js.map +1 -0
  60. package/lib/module/providers/panel-ui-provider.js +24 -4
  61. package/lib/module/providers/panel-ui-provider.js.map +1 -1
  62. package/lib/module/theme/use-theme.js +1 -1
  63. package/lib/typescript/src/components/accordion/index.d.ts +7 -5
  64. package/lib/typescript/src/components/accordion/index.d.ts.map +1 -1
  65. package/lib/typescript/src/components/alert/index.d.ts +3 -6
  66. package/lib/typescript/src/components/alert/index.d.ts.map +1 -1
  67. package/lib/typescript/src/components/bottom-sheet/index.d.ts +21 -1
  68. package/lib/typescript/src/components/bottom-sheet/index.d.ts.map +1 -1
  69. package/lib/typescript/src/components/button/index.d.ts +11 -0
  70. package/lib/typescript/src/components/button/index.d.ts.map +1 -1
  71. package/lib/typescript/src/components/empty-state/index.d.ts +4 -5
  72. package/lib/typescript/src/components/empty-state/index.d.ts.map +1 -1
  73. package/lib/typescript/src/components/inline-select/index.d.ts +29 -6
  74. package/lib/typescript/src/components/inline-select/index.d.ts.map +1 -1
  75. package/lib/typescript/src/components/input/index.d.ts +13 -0
  76. package/lib/typescript/src/components/input/index.d.ts.map +1 -1
  77. package/lib/typescript/src/components/input-group/index.d.ts +0 -1
  78. package/lib/typescript/src/components/input-group/index.d.ts.map +1 -1
  79. package/lib/typescript/src/components/item/index.d.ts +286 -0
  80. package/lib/typescript/src/components/item/index.d.ts.map +1 -0
  81. package/lib/typescript/src/components/label/index.d.ts +5 -3
  82. package/lib/typescript/src/components/label/index.d.ts.map +1 -1
  83. package/lib/typescript/src/components/message/index.d.ts +170 -0
  84. package/lib/typescript/src/components/message/index.d.ts.map +1 -0
  85. package/lib/typescript/src/components/scroll-fade/index.d.ts +47 -0
  86. package/lib/typescript/src/components/scroll-fade/index.d.ts.map +1 -0
  87. package/lib/typescript/src/components/select/index.d.ts +16 -1
  88. package/lib/typescript/src/components/select/index.d.ts.map +1 -1
  89. package/lib/typescript/src/components/shimmer/index.d.ts +60 -0
  90. package/lib/typescript/src/components/shimmer/index.d.ts.map +1 -0
  91. package/lib/typescript/src/components/surface/index.d.ts +30 -0
  92. package/lib/typescript/src/components/surface/index.d.ts.map +1 -0
  93. package/lib/typescript/src/components/switch/index.d.ts +10 -0
  94. package/lib/typescript/src/components/switch/index.d.ts.map +1 -1
  95. package/lib/typescript/src/components/toast/index.d.ts +4 -4
  96. package/lib/typescript/src/components/toast/index.d.ts.map +1 -1
  97. package/lib/typescript/src/hooks/index.d.ts +8 -0
  98. package/lib/typescript/src/hooks/index.d.ts.map +1 -0
  99. package/lib/typescript/src/hooks/use-breakpoint.d.ts +32 -0
  100. package/lib/typescript/src/hooks/use-breakpoint.d.ts.map +1 -0
  101. package/lib/typescript/src/hooks/use-copy-to-clipboard.d.ts +28 -0
  102. package/lib/typescript/src/hooks/use-copy-to-clipboard.d.ts.map +1 -0
  103. package/lib/typescript/src/hooks/use-debounced-value.d.ts +13 -0
  104. package/lib/typescript/src/hooks/use-debounced-value.d.ts.map +1 -0
  105. package/lib/typescript/src/hooks/use-disclosure.d.ts +32 -0
  106. package/lib/typescript/src/hooks/use-disclosure.d.ts.map +1 -0
  107. package/lib/typescript/src/hooks/use-keyboard-avoidance.d.ts +20 -0
  108. package/lib/typescript/src/hooks/use-keyboard-avoidance.d.ts.map +1 -0
  109. package/lib/typescript/src/hooks/use-keyboard.d.ts +20 -0
  110. package/lib/typescript/src/hooks/use-keyboard.d.ts.map +1 -0
  111. package/lib/typescript/src/hooks/use-previous.d.ts +15 -0
  112. package/lib/typescript/src/hooks/use-previous.d.ts.map +1 -0
  113. package/lib/typescript/src/icons/index.d.ts +4 -4
  114. package/lib/typescript/src/index.d.ts +8 -0
  115. package/lib/typescript/src/index.d.ts.map +1 -1
  116. package/lib/typescript/src/native/index.d.ts +35 -0
  117. package/lib/typescript/src/native/index.d.ts.map +1 -0
  118. package/lib/typescript/src/primitives/keyboard-avoider.d.ts +22 -0
  119. package/lib/typescript/src/primitives/keyboard-avoider.d.ts.map +1 -0
  120. package/lib/typescript/src/providers/panel-ui-provider.d.ts +1 -1
  121. package/lib/typescript/src/providers/panel-ui-provider.d.ts.map +1 -1
  122. package/lib/typescript/src/theme/use-theme.d.ts +1 -1
  123. package/package.json +19 -3
  124. package/src/components/accordion/index.tsx +7 -5
  125. package/src/components/alert/index.tsx +3 -6
  126. package/src/components/bottom-sheet/index.tsx +82 -2
  127. package/src/components/button/index.tsx +52 -0
  128. package/src/components/empty-state/index.tsx +4 -5
  129. package/src/components/inline-select/index.tsx +191 -44
  130. package/src/components/input/index.tsx +39 -3
  131. package/src/components/input-group/index.tsx +0 -1
  132. package/src/components/item/index.tsx +387 -0
  133. package/src/components/label/index.tsx +5 -3
  134. package/src/components/message/index.tsx +312 -0
  135. package/src/components/scroll-fade/index.tsx +280 -0
  136. package/src/components/select/index.tsx +54 -9
  137. package/src/components/shimmer/index.tsx +228 -0
  138. package/src/components/surface/index.tsx +64 -0
  139. package/src/components/switch/index.tsx +27 -1
  140. package/src/components/toast/index.tsx +7 -8
  141. package/src/components/typography/index.tsx +3 -3
  142. package/src/hooks/index.ts +24 -0
  143. package/src/hooks/use-breakpoint.ts +52 -0
  144. package/src/hooks/use-copy-to-clipboard.ts +79 -0
  145. package/src/hooks/use-debounced-value.ts +23 -0
  146. package/src/hooks/use-disclosure.ts +57 -0
  147. package/src/hooks/use-keyboard-avoidance.ts +140 -0
  148. package/src/hooks/use-keyboard.ts +43 -0
  149. package/src/hooks/use-previous.ts +24 -0
  150. package/src/icons/index.tsx +4 -4
  151. package/src/index.ts +41 -0
  152. package/src/native/index.ts +79 -0
  153. package/src/primitives/keyboard-avoider.tsx +49 -0
  154. package/src/providers/panel-ui-provider.tsx +30 -9
  155. package/src/theme/use-theme.ts +1 -1
  156. package/theme.css +23 -3
@@ -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
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/input/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAQ,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AA2BpE,MAAM,WAAW,UAAW,SAAQ,cAAc;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uEAAuE;IACvE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,KAAK,kGA+DjB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/input/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAQ,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AA4BpE,MAAM,WAAW,UAAW,SAAQ,cAAc;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uEAAuE;IACvE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;;;;OASG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,+EAA+E;IAC/E,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,KAAK,kGAqFjB,CAAC"}
@@ -1,7 +1,6 @@
1
1
  /**
2
2
  * InputGroup — an Input with leading and/or trailing decorators.
3
3
  *
4
- * Adapted from: heroui-inc/heroui-native src/components/input-group/
5
4
  * Prefix and Suffix are absolutely positioned and their measured widths become
6
5
  * padding on the Input, so text never runs underneath a decorator regardless
7
6
  * of how wide that decorator turns out to be.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/input-group/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EACL,IAAI,EAEJ,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,mBAAU,CAAC;AA6BlD,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mDAAmD;IACnD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAwBD,MAAM,WAAW,wBAAyB,SAAQ,SAAS;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAwCD,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC;AA4B9C,eAAO,MAAM,UAAU;;;;CAIrB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/input-group/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EACL,IAAI,EAEJ,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,mBAAU,CAAC;AA6BlD,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mDAAmD;IACnD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAwBD,MAAM,WAAW,wBAAyB,SAAQ,SAAS;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAwCD,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC;AA4B9C,eAAO,MAAM,UAAU;;;;CAIrB,CAAC"}
@@ -0,0 +1,286 @@
1
+ /**
2
+ * Item — a row of content: media on one side, a title and description in the
3
+ * middle, actions on the other side.
4
+ *
5
+ * It is the shape almost every list in an app already has — a settings row, a
6
+ * file in a picker, a member in a team list, a tool call in a transcript — so
7
+ * it exists as one composable primitive rather than being rebuilt per screen
8
+ * with slightly different padding each time.
9
+ *
10
+ * ```tsx
11
+ * <Item variant="outline">
12
+ * <Item.Media variant="icon"><ReceiptIcon /></Item.Media>
13
+ * <Item.Content>
14
+ * <Item.Title>Invoice.pdf</Item.Title>
15
+ * <Item.Description>2.4 MB · Updated yesterday</Item.Description>
16
+ * </Item.Content>
17
+ * <Item.Actions><Button size="sm">Open</Button></Item.Actions>
18
+ * </Item>
19
+ * ```
20
+ *
21
+ * Two axes, and they are independent. `orientation` on the item decides
22
+ * whether its own parts sit side by side or stack into a card; `orientation`
23
+ * on `Item.Group` decides whether the items themselves run down the screen or
24
+ * across it. A carousel wants both set to the non-default: a horizontal group
25
+ * of vertical items.
26
+ */
27
+ import { type ReactNode } from 'react';
28
+ import { View, type ViewProps } from 'react-native';
29
+ import { type VariantProps } from 'tailwind-variants';
30
+ import { type AnimatedPressableProps } from '../../primitives/animated-pressable.js';
31
+ import { type TextProps } from '../../primitives/text.js';
32
+ type ItemSize = 'default' | 'sm' | 'xs';
33
+ type ItemOrientation = 'horizontal' | 'vertical';
34
+ declare const itemVariants: import("tailwind-variants").TVReturnType<{
35
+ variant: {
36
+ default: {};
37
+ outline: {
38
+ root: string;
39
+ };
40
+ muted: {
41
+ root: string;
42
+ };
43
+ };
44
+ size: {
45
+ default: {
46
+ root: string;
47
+ title: string;
48
+ description: string;
49
+ };
50
+ sm: {
51
+ root: string;
52
+ title: string;
53
+ description: string;
54
+ };
55
+ xs: {
56
+ root: string;
57
+ title: string;
58
+ description: string;
59
+ };
60
+ };
61
+ orientation: {
62
+ /** Media, text and actions side by side — the list-row shape. */
63
+ horizontal: {
64
+ root: string;
65
+ };
66
+ /** Stacked into a card — the shape a horizontal carousel wants. */
67
+ vertical: {
68
+ root: string;
69
+ };
70
+ };
71
+ disabled: {
72
+ true: {
73
+ root: string;
74
+ };
75
+ };
76
+ }, {
77
+ root: string;
78
+ title: string;
79
+ description: string;
80
+ }, undefined, {
81
+ variant: {
82
+ default: {};
83
+ outline: {
84
+ root: string;
85
+ };
86
+ muted: {
87
+ root: string;
88
+ };
89
+ };
90
+ size: {
91
+ default: {
92
+ root: string;
93
+ title: string;
94
+ description: string;
95
+ };
96
+ sm: {
97
+ root: string;
98
+ title: string;
99
+ description: string;
100
+ };
101
+ xs: {
102
+ root: string;
103
+ title: string;
104
+ description: string;
105
+ };
106
+ };
107
+ orientation: {
108
+ /** Media, text and actions side by side — the list-row shape. */
109
+ horizontal: {
110
+ root: string;
111
+ };
112
+ /** Stacked into a card — the shape a horizontal carousel wants. */
113
+ vertical: {
114
+ root: string;
115
+ };
116
+ };
117
+ disabled: {
118
+ true: {
119
+ root: string;
120
+ };
121
+ };
122
+ }, {
123
+ root: string;
124
+ title: string;
125
+ description: string;
126
+ }, import("tailwind-variants").TVReturnType<{
127
+ variant: {
128
+ default: {};
129
+ outline: {
130
+ root: string;
131
+ };
132
+ muted: {
133
+ root: string;
134
+ };
135
+ };
136
+ size: {
137
+ default: {
138
+ root: string;
139
+ title: string;
140
+ description: string;
141
+ };
142
+ sm: {
143
+ root: string;
144
+ title: string;
145
+ description: string;
146
+ };
147
+ xs: {
148
+ root: string;
149
+ title: string;
150
+ description: string;
151
+ };
152
+ };
153
+ orientation: {
154
+ /** Media, text and actions side by side — the list-row shape. */
155
+ horizontal: {
156
+ root: string;
157
+ };
158
+ /** Stacked into a card — the shape a horizontal carousel wants. */
159
+ vertical: {
160
+ root: string;
161
+ };
162
+ };
163
+ disabled: {
164
+ true: {
165
+ root: string;
166
+ };
167
+ };
168
+ }, {
169
+ root: string;
170
+ title: string;
171
+ description: string;
172
+ }, undefined, unknown, unknown, undefined>>;
173
+ declare const mediaVariants: import("tailwind-variants").TVReturnType<{
174
+ variant: {
175
+ /** No box — for an Avatar or anything that styles itself. */
176
+ default: string;
177
+ /** Rounded square tile sized for an icon. */
178
+ icon: string;
179
+ /** Clipped frame for an image or thumbnail. */
180
+ image: string;
181
+ };
182
+ size: {
183
+ default: string;
184
+ sm: string;
185
+ xs: string;
186
+ };
187
+ }, undefined, "shrink-0 items-center justify-center", {
188
+ variant: {
189
+ /** No box — for an Avatar or anything that styles itself. */
190
+ default: string;
191
+ /** Rounded square tile sized for an icon. */
192
+ icon: string;
193
+ /** Clipped frame for an image or thumbnail. */
194
+ image: string;
195
+ };
196
+ size: {
197
+ default: string;
198
+ sm: string;
199
+ xs: string;
200
+ };
201
+ }, undefined, import("tailwind-variants").TVReturnType<{
202
+ variant: {
203
+ /** No box — for an Avatar or anything that styles itself. */
204
+ default: string;
205
+ /** Rounded square tile sized for an icon. */
206
+ icon: string;
207
+ /** Clipped frame for an image or thumbnail. */
208
+ image: string;
209
+ };
210
+ size: {
211
+ default: string;
212
+ sm: string;
213
+ xs: string;
214
+ };
215
+ }, undefined, "shrink-0 items-center justify-center", unknown, unknown, undefined>>;
216
+ export interface ItemProps extends Omit<AnimatedPressableProps, 'children' | 'disabled'>, Omit<VariantProps<typeof itemVariants>, 'disabled'> {
217
+ className?: string;
218
+ disabled?: boolean;
219
+ /**
220
+ * Row density. `Item.Media`, `Item.Title` and `Item.Description` follow it,
221
+ * so it only needs setting here.
222
+ */
223
+ size?: ItemSize;
224
+ /**
225
+ * `horizontal` is the list row: media, text and actions side by side.
226
+ * `vertical` stacks them into a card, which is what a horizontal carousel
227
+ * wants — and it is also what `Item.Header` and `Item.Footer` need, since
228
+ * both are full-width strips.
229
+ */
230
+ orientation?: ItemOrientation;
231
+ children?: ReactNode;
232
+ }
233
+ export interface ItemGroupProps extends ViewProps {
234
+ className?: string;
235
+ /**
236
+ * `vertical` stacks the items — the settings-list shape. `horizontal` runs
237
+ * them across instead, for a carousel; pair it with a scrollable and
238
+ * `orientation="vertical"` on each item so every entry reads as a card.
239
+ */
240
+ orientation?: ItemOrientation;
241
+ children?: ReactNode;
242
+ }
243
+ export interface ItemSeparatorProps extends ViewProps {
244
+ className?: string;
245
+ /** Match the group's axis: a horizontal group needs vertical hairlines. */
246
+ orientation?: ItemOrientation;
247
+ }
248
+ export interface ItemMediaProps extends ViewProps, VariantProps<typeof mediaVariants> {
249
+ className?: string;
250
+ children?: ReactNode;
251
+ }
252
+ export interface ItemContentProps extends ViewProps {
253
+ className?: string;
254
+ children?: ReactNode;
255
+ }
256
+ export interface ItemTitleProps extends TextProps {
257
+ className?: string;
258
+ }
259
+ export interface ItemDescriptionProps extends TextProps {
260
+ className?: string;
261
+ }
262
+ export interface ItemActionsProps extends ViewProps {
263
+ className?: string;
264
+ children?: ReactNode;
265
+ }
266
+ export interface ItemHeaderProps extends ViewProps {
267
+ className?: string;
268
+ children?: ReactNode;
269
+ }
270
+ export interface ItemFooterProps extends ViewProps {
271
+ className?: string;
272
+ children?: ReactNode;
273
+ }
274
+ export declare const Item: import("react").ForwardRefExoticComponent<ItemProps & import("react").RefAttributes<View>> & {
275
+ Group: import("react").ForwardRefExoticComponent<ItemGroupProps & import("react").RefAttributes<View>>;
276
+ Separator: import("react").ForwardRefExoticComponent<ItemSeparatorProps & import("react").RefAttributes<View>>;
277
+ Media: import("react").ForwardRefExoticComponent<ItemMediaProps & import("react").RefAttributes<View>>;
278
+ Content: import("react").ForwardRefExoticComponent<ItemContentProps & import("react").RefAttributes<View>>;
279
+ Title: import("react").ForwardRefExoticComponent<ItemTitleProps & import("react").RefAttributes<import("react-native").Text>>;
280
+ Description: import("react").ForwardRefExoticComponent<ItemDescriptionProps & import("react").RefAttributes<import("react-native").Text>>;
281
+ Actions: import("react").ForwardRefExoticComponent<ItemActionsProps & import("react").RefAttributes<View>>;
282
+ Header: import("react").ForwardRefExoticComponent<ItemHeaderProps & import("react").RefAttributes<View>>;
283
+ Footer: import("react").ForwardRefExoticComponent<ItemFooterProps & import("react").RefAttributes<View>>;
284
+ };
285
+ export {};
286
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/item/index.tsx"],"names":[],"mappings":"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"}
@@ -1,9 +1,11 @@
1
1
  /**
2
2
  * Label — text that names a form field.
3
3
  *
4
- * Adapted from: heroui-inc/heroui-native src/components/label/ (root +
5
- * Label.Text anatomy, string children auto-wrapping, the required asterisk,
6
- * and the isInvalid / isDisabled recolouring).
4
+ * A string child is wrapped in `Label.Text` automatically, so the common case
5
+ * stays one line; pass the parts explicitly when the label needs more than
6
+ * text. `isRequired`, `isInvalid` and `isDisabled` are visual *and* semantic —
7
+ * they recolour and they set the accessibility state, so the two cannot drift
8
+ * apart.
7
9
  */
8
10
  import { type ReactNode } from 'react';
9
11
  import { View, type Text as RNText, type ViewProps } from 'react-native';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/label/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,IAAI,EAAE,KAAK,IAAI,IAAI,MAAM,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzE,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,0BAAuB,CAAC;AAiC7D,MAAM,WAAW,UAAW,SAAQ,SAAS;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yDAAyD;IACzD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,wDAAwD;IACxD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAqCD,MAAM,WAAW,cAAe,SAAQ,SAAS;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yCAAyC;IACzC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AA2BD,eAAO,MAAM,KAAK;;CAEhB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/label/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,IAAI,EAAE,KAAK,IAAI,IAAI,MAAM,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzE,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,0BAAuB,CAAC;AAiC7D,MAAM,WAAW,UAAW,SAAQ,SAAS;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yDAAyD;IACzD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,wDAAwD;IACxD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAqCD,MAAM,WAAW,cAAe,SAAQ,SAAS;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yCAAyC;IACzC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AA2BD,eAAO,MAAM,KAAK;;CAEhB,CAAC"}
@@ -0,0 +1,170 @@
1
+ /**
2
+ * Message — a chat turn: avatar, bubble, and the metadata around it.
3
+ *
4
+ * The pieces are separate because conversations differ in which ones they
5
+ * need. A support thread wants a sender name and a read receipt; an assistant
6
+ * transcript wants neither, but does want the bubble to carry tool output and
7
+ * actions. Composing them beats a component with a dozen optional props.
8
+ *
9
+ * `align` is the only thing the root decides, and everything downstream reads
10
+ * it from context: which side the row sits on, which way the avatar goes,
11
+ * which corner of the bubble is squared off, and which colour it takes.
12
+ *
13
+ * ```tsx
14
+ * <Message align="end">
15
+ * <Message.Content>
16
+ * <Message.Bubble>
17
+ * <Message.BubbleContent>How can I help?</Message.BubbleContent>
18
+ * </Message.Bubble>
19
+ * </Message.Content>
20
+ * </Message>
21
+ * ```
22
+ */
23
+ import { type ReactNode } from 'react';
24
+ import { View, type ViewProps } from 'react-native';
25
+ import { type VariantProps } from 'tailwind-variants';
26
+ import { type TextProps } from '../../primitives/text.js';
27
+ declare const messageVariants: import("tailwind-variants").TVReturnType<{
28
+ align: {
29
+ start: {
30
+ root: string;
31
+ content: string;
32
+ bubble: string;
33
+ bubbleContent: string;
34
+ header: string;
35
+ footer: string;
36
+ };
37
+ end: {
38
+ root: string;
39
+ content: string;
40
+ bubble: string;
41
+ bubbleContent: string;
42
+ header: string;
43
+ footer: string;
44
+ };
45
+ };
46
+ }, {
47
+ root: string;
48
+ avatar: string;
49
+ content: string;
50
+ header: string;
51
+ bubble: string;
52
+ bubbleContent: string;
53
+ footer: string;
54
+ group: string;
55
+ }, undefined, {
56
+ align: {
57
+ start: {
58
+ root: string;
59
+ content: string;
60
+ bubble: string;
61
+ bubbleContent: string;
62
+ header: string;
63
+ footer: string;
64
+ };
65
+ end: {
66
+ root: string;
67
+ content: string;
68
+ bubble: string;
69
+ bubbleContent: string;
70
+ header: string;
71
+ footer: string;
72
+ };
73
+ };
74
+ }, {
75
+ root: string;
76
+ avatar: string;
77
+ content: string;
78
+ header: string;
79
+ bubble: string;
80
+ bubbleContent: string;
81
+ footer: string;
82
+ group: string;
83
+ }, import("tailwind-variants").TVReturnType<{
84
+ align: {
85
+ start: {
86
+ root: string;
87
+ content: string;
88
+ bubble: string;
89
+ bubbleContent: string;
90
+ header: string;
91
+ footer: string;
92
+ };
93
+ end: {
94
+ root: string;
95
+ content: string;
96
+ bubble: string;
97
+ bubbleContent: string;
98
+ header: string;
99
+ footer: string;
100
+ };
101
+ };
102
+ }, {
103
+ root: string;
104
+ avatar: string;
105
+ content: string;
106
+ header: string;
107
+ bubble: string;
108
+ bubbleContent: string;
109
+ footer: string;
110
+ group: string;
111
+ }, undefined, unknown, unknown, undefined>>;
112
+ type Align = 'start' | 'end';
113
+ export interface MessageProps extends ViewProps, VariantProps<typeof messageVariants> {
114
+ className?: string;
115
+ /**
116
+ * Which side of the conversation this turn belongs to. `end` is the
117
+ * outgoing side — the person holding the device.
118
+ */
119
+ align?: Align;
120
+ /**
121
+ * Continuation of the message above it: tighter spacing, and the avatar slot
122
+ * is reserved but left empty so bubbles stay aligned. `Message.Group` sets
123
+ * this for you.
124
+ */
125
+ stacked?: boolean;
126
+ children?: ReactNode;
127
+ }
128
+ export interface MessageGroupProps extends ViewProps {
129
+ className?: string;
130
+ /** Alignment applied to every Message inside that does not set its own. */
131
+ align?: Align;
132
+ children?: ReactNode;
133
+ }
134
+ export interface MessageAvatarProps extends ViewProps {
135
+ className?: string;
136
+ children?: ReactNode;
137
+ }
138
+ export interface MessageContentProps extends ViewProps {
139
+ className?: string;
140
+ children?: ReactNode;
141
+ }
142
+ export interface MessageHeaderProps extends TextProps {
143
+ className?: string;
144
+ }
145
+ export interface MessageBubbleProps extends ViewProps {
146
+ className?: string;
147
+ children?: ReactNode;
148
+ }
149
+ export interface MessageBubbleContentProps extends TextProps {
150
+ className?: string;
151
+ }
152
+ export interface MessageFooterProps extends TextProps {
153
+ className?: string;
154
+ }
155
+ export interface MessageActionsProps extends ViewProps {
156
+ className?: string;
157
+ children?: ReactNode;
158
+ }
159
+ export declare const Message: import("react").ForwardRefExoticComponent<MessageProps & import("react").RefAttributes<View>> & {
160
+ Group: import("react").ForwardRefExoticComponent<MessageGroupProps & import("react").RefAttributes<View>>;
161
+ Avatar: import("react").ForwardRefExoticComponent<MessageAvatarProps & import("react").RefAttributes<View>>;
162
+ Content: import("react").ForwardRefExoticComponent<MessageContentProps & import("react").RefAttributes<View>>;
163
+ Header: import("react").ForwardRefExoticComponent<MessageHeaderProps & import("react").RefAttributes<import("react-native").Text>>;
164
+ Bubble: import("react").ForwardRefExoticComponent<MessageBubbleProps & import("react").RefAttributes<View>>;
165
+ BubbleContent: import("react").ForwardRefExoticComponent<MessageBubbleContentProps & import("react").RefAttributes<import("react-native").Text>>;
166
+ Footer: import("react").ForwardRefExoticComponent<MessageFooterProps & import("react").RefAttributes<import("react-native").Text>>;
167
+ Actions: import("react").ForwardRefExoticComponent<MessageActionsProps & import("react").RefAttributes<View>>;
168
+ };
169
+ export {};
170
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/message/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,0BAAuB,CAAC;AAG7D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAoCnB,CAAC;AAEH,KAAK,KAAK,GAAG,OAAO,GAAG,KAAK,CAAC;AAoB7B,MAAM,WAAW,YACf,SAAQ,SAAS,EACf,YAAY,CAAC,OAAO,eAAe,CAAC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;IACd;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAmBD,MAAM,WAAW,iBAAkB,SAAQ,SAAS;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2EAA2E;IAC3E,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AA+BD,MAAM,WAAW,kBAAmB,SAAQ,SAAS;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAqBD,MAAM,WAAW,mBAAoB,SAAQ,SAAS;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAiBD,MAAM,WAAW,kBAAmB,SAAQ,SAAS;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAaD,MAAM,WAAW,kBAAmB,SAAQ,SAAS;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAiBD,MAAM,WAAW,yBAA0B,SAAQ,SAAS;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAcD,MAAM,WAAW,kBAAmB,SAAQ,SAAS;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAaD,MAAM,WAAW,mBAAoB,SAAQ,SAAS;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAwBD,eAAO,MAAM,OAAO;;;;;;;;;CASlB,CAAC"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * ScrollFade — fades the edges of a scroll container.
3
+ *
4
+ * Content that runs past a boundary reads better fading out than being cut
5
+ * off, and the fade doubles as an affordance: an edge that is fading is an
6
+ * edge with more content behind it.
7
+ *
8
+ * Scroll position, content size and viewport size are all held in shared
9
+ * values and consumed by `useAnimatedStyle`, so the fades track the scroll on
10
+ * the UI thread without re-rendering React.
11
+ *
12
+ * ```tsx
13
+ * <ScrollFade>
14
+ * <ScrollView horizontal>…</ScrollView>
15
+ * </ScrollFade>
16
+ * ```
17
+ */
18
+ import { type ReactNode } from 'react';
19
+ import { type ViewProps } from 'react-native';
20
+ export interface ScrollFadeProps extends ViewProps {
21
+ className?: string;
22
+ /** Depth of the fade in pixels. */
23
+ size?: number;
24
+ /** Which edges fade. */
25
+ edges?: 'both' | 'start' | 'end' | 'none';
26
+ /**
27
+ * Scroll axis. Inferred from the child's `horizontal` prop when omitted —
28
+ * pass it explicitly for children that scroll horizontally without that prop
29
+ * (a `FlatList` with `horizontal` set through `contentContainerStyle`, say).
30
+ */
31
+ orientation?: 'horizontal' | 'vertical';
32
+ /**
33
+ * Colour the fade resolves to — normally whatever sits behind the
34
+ * scrollable. Defaults to the theme's background.
35
+ */
36
+ color?: string;
37
+ /** Distance in pixels over which an edge fades from clear to full. */
38
+ fadeInDistance?: number;
39
+ /** Set false to render the child with no fades at all. */
40
+ enabled?: boolean;
41
+ children?: ReactNode;
42
+ }
43
+ export declare function ScrollFade({ className, size, edges, orientation, color, fadeInDistance, enabled, children, ...props }: ScrollFadeProps): import("react").JSX.Element;
44
+ export declare namespace ScrollFade {
45
+ var displayName: string;
46
+ }
47
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/scroll-fade/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAML,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAgBtB,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mCAAmC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wBAAwB;IACxB,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC;IAC1C;;;;OAIG;IACH,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sEAAsE;IACtE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,0DAA0D;IAC1D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAUD,wBAAgB,UAAU,CAAC,EACzB,SAAS,EACT,IAAS,EACT,KAAc,EACd,WAAW,EACX,KAAK,EACL,cAAyC,EACzC,OAAc,EACd,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,eAAe,+BAiHjB;yBA3He,UAAU"}