@cyberkaidev/ui 0.1.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.
- package/LICENSE +20 -0
- package/README.md +721 -0
- package/lib/module/ThemeProvider.js +84 -0
- package/lib/module/ThemeProvider.js.map +1 -0
- package/lib/module/components/AppBar.js +185 -0
- package/lib/module/components/AppBar.js.map +1 -0
- package/lib/module/components/BounceEffect.js +50 -0
- package/lib/module/components/BounceEffect.js.map +1 -0
- package/lib/module/components/Button.js +48 -0
- package/lib/module/components/Button.js.map +1 -0
- package/lib/module/components/Chips.js +94 -0
- package/lib/module/components/Chips.js.map +1 -0
- package/lib/module/components/IconButton.js +71 -0
- package/lib/module/components/IconButton.js.map +1 -0
- package/lib/module/components/InforList.js +92 -0
- package/lib/module/components/InforList.js.map +1 -0
- package/lib/module/components/LoadingApp.js +58 -0
- package/lib/module/components/LoadingApp.js.map +1 -0
- package/lib/module/components/Overlays.js +20 -0
- package/lib/module/components/Overlays.js.map +1 -0
- package/lib/module/components/RippleEffect.js +178 -0
- package/lib/module/components/RippleEffect.js.map +1 -0
- package/lib/module/components/Scaffold.js +172 -0
- package/lib/module/components/Scaffold.js.map +1 -0
- package/lib/module/components/SearchBar.js +161 -0
- package/lib/module/components/SearchBar.js.map +1 -0
- package/lib/module/components/SegmentedButton.js +151 -0
- package/lib/module/components/SegmentedButton.js.map +1 -0
- package/lib/module/components/ShapedButton.js +58 -0
- package/lib/module/components/ShapedButton.js.map +1 -0
- package/lib/module/components/SlideModal.js +196 -0
- package/lib/module/components/SlideModal.js.map +1 -0
- package/lib/module/components/TabBar.js +107 -0
- package/lib/module/components/TabBar.js.map +1 -0
- package/lib/module/components/Text.js +47 -0
- package/lib/module/components/Text.js.map +1 -0
- package/lib/module/components/TextButton.js +53 -0
- package/lib/module/components/TextButton.js.map +1 -0
- package/lib/module/components/TextInput.js +83 -0
- package/lib/module/components/TextInput.js.map +1 -0
- package/lib/module/components/Toast.js +101 -0
- package/lib/module/components/Toast.js.map +1 -0
- package/lib/module/hooks/useAppBarScroll.js +20 -0
- package/lib/module/hooks/useAppBarScroll.js.map +1 -0
- package/lib/module/hooks/usePressAndHoldRepeat.js +71 -0
- package/lib/module/hooks/usePressAndHoldRepeat.js.map +1 -0
- package/lib/module/icons/Icon.js +85 -0
- package/lib/module/icons/Icon.js.map +1 -0
- package/lib/module/index.js +42 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/responsive.js +28 -0
- package/lib/module/responsive.js.map +1 -0
- package/lib/module/stores/useLoadingApp.js +14 -0
- package/lib/module/stores/useLoadingApp.js.map +1 -0
- package/lib/module/stores/useToast.js +24 -0
- package/lib/module/stores/useToast.js.map +1 -0
- package/lib/module/theme.js +86 -0
- package/lib/module/theme.js.map +1 -0
- package/lib/module/types.js +2 -0
- package/lib/module/types.js.map +1 -0
- package/lib/typescript/jest.setup.d.ts +2 -0
- package/lib/typescript/jest.setup.d.ts.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/ThemeProvider.d.ts +39 -0
- package/lib/typescript/src/ThemeProvider.d.ts.map +1 -0
- package/lib/typescript/src/components/AppBar.d.ts +33 -0
- package/lib/typescript/src/components/AppBar.d.ts.map +1 -0
- package/lib/typescript/src/components/BounceEffect.d.ts +12 -0
- package/lib/typescript/src/components/BounceEffect.d.ts.map +1 -0
- package/lib/typescript/src/components/Button.d.ts +24 -0
- package/lib/typescript/src/components/Button.d.ts.map +1 -0
- package/lib/typescript/src/components/Chips.d.ts +23 -0
- package/lib/typescript/src/components/Chips.d.ts.map +1 -0
- package/lib/typescript/src/components/IconButton.d.ts +14 -0
- package/lib/typescript/src/components/IconButton.d.ts.map +1 -0
- package/lib/typescript/src/components/InforList.d.ts +28 -0
- package/lib/typescript/src/components/InforList.d.ts.map +1 -0
- package/lib/typescript/src/components/LoadingApp.d.ts +8 -0
- package/lib/typescript/src/components/LoadingApp.d.ts.map +1 -0
- package/lib/typescript/src/components/Overlays.d.ts +12 -0
- package/lib/typescript/src/components/Overlays.d.ts.map +1 -0
- package/lib/typescript/src/components/RippleEffect.d.ts +18 -0
- package/lib/typescript/src/components/RippleEffect.d.ts.map +1 -0
- package/lib/typescript/src/components/Scaffold.d.ts +62 -0
- package/lib/typescript/src/components/Scaffold.d.ts.map +1 -0
- package/lib/typescript/src/components/SearchBar.d.ts +20 -0
- package/lib/typescript/src/components/SearchBar.d.ts.map +1 -0
- package/lib/typescript/src/components/SegmentedButton.d.ts +37 -0
- package/lib/typescript/src/components/SegmentedButton.d.ts.map +1 -0
- package/lib/typescript/src/components/ShapedButton.d.ts +18 -0
- package/lib/typescript/src/components/ShapedButton.d.ts.map +1 -0
- package/lib/typescript/src/components/SlideModal.d.ts +15 -0
- package/lib/typescript/src/components/SlideModal.d.ts.map +1 -0
- package/lib/typescript/src/components/TabBar.d.ts +20 -0
- package/lib/typescript/src/components/TabBar.d.ts.map +1 -0
- package/lib/typescript/src/components/Text.d.ts +26 -0
- package/lib/typescript/src/components/Text.d.ts.map +1 -0
- package/lib/typescript/src/components/TextButton.d.ts +15 -0
- package/lib/typescript/src/components/TextButton.d.ts.map +1 -0
- package/lib/typescript/src/components/TextInput.d.ts +22 -0
- package/lib/typescript/src/components/TextInput.d.ts.map +1 -0
- package/lib/typescript/src/components/Toast.d.ts +4 -0
- package/lib/typescript/src/components/Toast.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useAppBarScroll.d.ts +10 -0
- package/lib/typescript/src/hooks/useAppBarScroll.d.ts.map +1 -0
- package/lib/typescript/src/hooks/usePressAndHoldRepeat.d.ts +21 -0
- package/lib/typescript/src/hooks/usePressAndHoldRepeat.d.ts.map +1 -0
- package/lib/typescript/src/icons/Icon.d.ts +64 -0
- package/lib/typescript/src/icons/Icon.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +30 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/responsive.d.ts +15 -0
- package/lib/typescript/src/responsive.d.ts.map +1 -0
- package/lib/typescript/src/stores/useLoadingApp.d.ts +14 -0
- package/lib/typescript/src/stores/useLoadingApp.d.ts.map +1 -0
- package/lib/typescript/src/stores/useToast.d.ts +25 -0
- package/lib/typescript/src/stores/useToast.d.ts.map +1 -0
- package/lib/typescript/src/theme.d.ts +51 -0
- package/lib/typescript/src/theme.d.ts.map +1 -0
- package/lib/typescript/src/types.d.ts +26 -0
- package/lib/typescript/src/types.d.ts.map +1 -0
- package/package.json +189 -0
- package/src/ThemeProvider.tsx +108 -0
- package/src/components/AppBar.tsx +226 -0
- package/src/components/BounceEffect.tsx +53 -0
- package/src/components/Button.tsx +70 -0
- package/src/components/Chips.tsx +115 -0
- package/src/components/IconButton.tsx +84 -0
- package/src/components/InforList.tsx +110 -0
- package/src/components/LoadingApp.tsx +55 -0
- package/src/components/Overlays.tsx +21 -0
- package/src/components/RippleEffect.tsx +244 -0
- package/src/components/Scaffold.tsx +219 -0
- package/src/components/SearchBar.tsx +166 -0
- package/src/components/SegmentedButton.tsx +206 -0
- package/src/components/ShapedButton.tsx +74 -0
- package/src/components/SlideModal.tsx +232 -0
- package/src/components/TabBar.tsx +122 -0
- package/src/components/Text.tsx +70 -0
- package/src/components/TextButton.tsx +57 -0
- package/src/components/TextInput.tsx +108 -0
- package/src/components/Toast.tsx +95 -0
- package/src/hooks/useAppBarScroll.ts +19 -0
- package/src/hooks/usePressAndHoldRepeat.ts +85 -0
- package/src/icons/Icon.tsx +51 -0
- package/src/index.tsx +64 -0
- package/src/responsive.ts +32 -0
- package/src/stores/useLoadingApp.ts +19 -0
- package/src/stores/useToast.ts +36 -0
- package/src/theme.ts +125 -0
- package/src/types.ts +27 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { BorderRadiusType, FontSizesType, IconSizesType, PageSpacingType, SpacesType, ThemeType } from './theme.js';
|
|
3
|
+
import type { ColorsType } from './types.js';
|
|
4
|
+
type Props = {
|
|
5
|
+
/**
|
|
6
|
+
* The full color palette. **Required** — there is no default. Pass the
|
|
7
|
+
* exported `colors` palette, spread from it, or provide your own.
|
|
8
|
+
*/
|
|
9
|
+
colors: ColorsType;
|
|
10
|
+
/** Partial overrides for the non-color token groups; missing keys fall back
|
|
11
|
+
* to the parent `ThemeProvider`, or to the built-in defaults. */
|
|
12
|
+
fontSizes?: Partial<FontSizesType>;
|
|
13
|
+
iconSize?: Partial<IconSizesType>;
|
|
14
|
+
spaces?: {
|
|
15
|
+
horizontal?: Partial<SpacesType['horizontal']>;
|
|
16
|
+
vertical?: Partial<SpacesType['vertical']>;
|
|
17
|
+
};
|
|
18
|
+
borderRadius?: Partial<BorderRadiusType>;
|
|
19
|
+
pageSpacing?: Partial<PageSpacingType>;
|
|
20
|
+
children: React.ReactNode;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Injects the theme into the tree. `colors` is required; the other token groups
|
|
24
|
+
* are optional and merge over the nearest parent `ThemeProvider` (or the
|
|
25
|
+
* defaults). Providers nest.
|
|
26
|
+
*/
|
|
27
|
+
export declare function ThemeProvider({ colors, fontSizes, iconSize, spaces, borderRadius, pageSpacing, children, }: Props): React.JSX.Element;
|
|
28
|
+
/** The resolved theme. Throws if used outside a `ThemeProvider`. */
|
|
29
|
+
export declare function useTheme(): ThemeType;
|
|
30
|
+
/** Convenience: the resolved color palette (`useTheme().colors`). */
|
|
31
|
+
export declare function useColors(): ColorsType;
|
|
32
|
+
/**
|
|
33
|
+
* Builds a value (usually a `StyleSheet`) from the resolved theme, memoized
|
|
34
|
+
* against it. Pass a module-level factory so it stays referentially stable and
|
|
35
|
+
* the memo only recomputes when the theme actually changes.
|
|
36
|
+
*/
|
|
37
|
+
export declare function useThemedStyles<T>(factory: (theme: ThemeType) => T): T;
|
|
38
|
+
export {};
|
|
39
|
+
//# sourceMappingURL=ThemeProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../../src/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EACV,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,eAAe,EACf,UAAU,EACV,SAAS,EACV,MAAM,YAAS,CAAC;AACjB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAS,CAAC;AAE1C,KAAK,KAAK,GAAG;IACX;;;OAGG;IACH,MAAM,EAAE,UAAU,CAAC;IACnB;sEACkE;IAClE,SAAS,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IAClC,MAAM,CAAC,EAAE;QACP,UAAU,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC;QAC/C,QAAQ,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;KAC5C,CAAC;IACF,YAAY,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACzC,WAAW,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IACvC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAIF;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,EAC5B,MAAM,EACN,SAAS,EACT,QAAQ,EACR,MAAM,EACN,YAAY,EACZ,WAAW,EACX,QAAQ,GACT,EAAE,KAAK,qBAiCP;AAED,oEAAoE;AACpE,wBAAgB,QAAQ,IAAI,SAAS,CASpC;AAED,qEAAqE;AACrE,wBAAgB,SAAS,IAAI,UAAU,CAEtC;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,CAAC,GAAG,CAAC,CAGtE"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { ColorValue } from 'react-native';
|
|
2
|
+
import type { SharedValue } from 'react-native-reanimated';
|
|
3
|
+
import type { IconNameType } from '../icons/Icon.js';
|
|
4
|
+
/**
|
|
5
|
+
* Height of the fixed app bar, including the status bar. Uses the default
|
|
6
|
+
* `pageSpacing.top` — a themed override is not reflected here.
|
|
7
|
+
*/
|
|
8
|
+
export declare const APP_BAR_HEIGHT: number;
|
|
9
|
+
/** Height of the app bar when the large title is expanded. */
|
|
10
|
+
export declare const APP_BAR_LARGE_HEIGHT: number;
|
|
11
|
+
export type AppBarTrailingType = {
|
|
12
|
+
label?: string;
|
|
13
|
+
icon?: IconNameType;
|
|
14
|
+
tintColor?: ColorValue;
|
|
15
|
+
hidden?: boolean;
|
|
16
|
+
onPress: () => void;
|
|
17
|
+
};
|
|
18
|
+
type Props = {
|
|
19
|
+
title: string;
|
|
20
|
+
/** Shows a back control; provide `onBack` to handle it. */
|
|
21
|
+
enabledBack?: boolean;
|
|
22
|
+
onBack?: () => void;
|
|
23
|
+
/** Render a large, collapsing title below the bar. */
|
|
24
|
+
large?: boolean;
|
|
25
|
+
/** Optional action on the trailing side. */
|
|
26
|
+
trailing?: AppBarTrailingType;
|
|
27
|
+
/** Scroll offset that drives the large-title collapse (see `useAppBarScroll`). */
|
|
28
|
+
scrollY?: SharedValue<number>;
|
|
29
|
+
};
|
|
30
|
+
/** Fixed top app bar with an optional collapsing large title. */
|
|
31
|
+
export declare function AppBar({ title, enabledBack, onBack, large, trailing, scrollY, }: Props): import("react").JSX.Element;
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=AppBar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppBar.d.ts","sourceRoot":"","sources":["../../../../src/components/AppBar.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAO/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAG3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAe,CAAC;AAalD;;;GAGG;AACH,eAAO,MAAM,cAAc,QACmC,CAAC;AAE/D,8DAA8D;AAC9D,eAAO,MAAM,oBAAoB,QAAsC,CAAC;AAExE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,MAAM,CAAC;IACd,2DAA2D;IAC3D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,sDAAsD;IACtD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B,kFAAkF;IAClF,OAAO,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC/B,CAAC;AAEF,iEAAiE;AACjE,wBAAgB,MAAM,CAAC,EACrB,KAAK,EACL,WAAW,EACX,MAAM,EACN,KAAK,EACL,QAAQ,EACR,OAAO,GACR,EAAE,KAAK,+BAsGP"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PressableProps } from 'react-native';
|
|
3
|
+
type Props = {
|
|
4
|
+
/** Fired after the release animation settles. */
|
|
5
|
+
onActionTrigger: () => void;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
style?: PressableProps['style'];
|
|
8
|
+
};
|
|
9
|
+
/** Wraps a child and plays a scale "bounce" on press, firing on release. */
|
|
10
|
+
export declare function BounceEffect({ onActionTrigger, children, style }: Props): React.JSX.Element;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=BounceEffect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BounceEffect.d.ts","sourceRoot":"","sources":["../../../../src/components/BounceEffect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,KAAK,KAAK,GAAG;IACX,iDAAiD;IACjD,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC;CACjC,CAAC;AAEF,4EAA4E;AAC5E,wBAAgB,YAAY,CAAC,EAAE,eAAe,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,KAAK,qBAwCvE"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { Insets, StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
type Props = {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
onPress?: () => void;
|
|
6
|
+
onPressIn?: () => void;
|
|
7
|
+
onPressOut?: () => void;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
style?: StyleProp<ViewStyle>;
|
|
10
|
+
testID?: string;
|
|
11
|
+
hitSlop?: Insets;
|
|
12
|
+
/** Android only. */
|
|
13
|
+
rippleColor?: string;
|
|
14
|
+
/** Android only. */
|
|
15
|
+
rippleContainerBorderRadius?: number;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Base pressable. Android gets a touch ripple; every other platform gets
|
|
19
|
+
* opacity feedback. Kept in one file (not `.ios`/`.android`) so consumers'
|
|
20
|
+
* type resolution works without `moduleSuffixes`.
|
|
21
|
+
*/
|
|
22
|
+
export declare function Button({ children, onPress, onPressIn, onPressOut, disabled, style, testID, hitSlop, rippleColor, rippleContainerBorderRadius, }: Props): import("react").JSX.Element;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAIjE,KAAK,KAAK,GAAG;IACX,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oBAAoB;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oBAAoB;IACpB,2BAA2B,CAAC,EAAE,MAAM,CAAC;CACtC,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,EACrB,QAAQ,EACR,OAAO,EACP,SAAS,EACT,UAAU,EACV,QAAQ,EACR,KAAK,EACL,MAAM,EACN,OAAO,EACP,WAAW,EACX,2BAA2B,GAC5B,EAAE,KAAK,+BAgCP"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
type ChipScheme = 'primary' | 'surface' | 'on_surface';
|
|
3
|
+
type ChipItem<Item> = {
|
|
4
|
+
key: Item;
|
|
5
|
+
label: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
/** Optional node rendered before the label (e.g. an icon). */
|
|
8
|
+
prefix?: ReactNode;
|
|
9
|
+
/** Visual scheme. Default `'surface'`. */
|
|
10
|
+
scheme?: ChipScheme;
|
|
11
|
+
};
|
|
12
|
+
type Props<Item> = {
|
|
13
|
+
data: ChipItem<Item>[];
|
|
14
|
+
/** Called with the item `key`. Omit to render the chips non-interactive. */
|
|
15
|
+
onPress?: (key: Item) => void;
|
|
16
|
+
marginT?: number;
|
|
17
|
+
marginB?: number;
|
|
18
|
+
testID?: string;
|
|
19
|
+
};
|
|
20
|
+
/** Horizontally scrolling row of selectable chips. */
|
|
21
|
+
export declare function Chips<Item>({ data, marginB, marginT, onPress, testID, }: Props<Item>): import("react").JSX.Element;
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=Chips.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Chips.d.ts","sourceRoot":"","sources":["../../../../src/components/Chips.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAQvC,KAAK,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,YAAY,CAAC;AAEvD,KAAK,QAAQ,CAAC,IAAI,IAAI;IACpB,GAAG,EAAE,IAAI,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8DAA8D;IAC9D,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,0CAA0C;IAC1C,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB,CAAC;AAEF,KAAK,KAAK,CAAC,IAAI,IAAI;IACjB,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;IACvB,4EAA4E;IAC5E,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI,KAAK,IAAI,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,sDAAsD;AACtD,wBAAgB,KAAK,CAAC,IAAI,EAAE,EAC1B,IAAI,EACJ,OAAW,EACX,OAAW,EACX,OAAO,EACP,MAAM,GACP,EAAE,KAAK,CAAC,IAAI,CAAC,+BAoDb"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { IconNameType } from '../icons/Icon.js';
|
|
2
|
+
type Props = {
|
|
3
|
+
/** Icon name (see the `names` map in `Icon`). */
|
|
4
|
+
icon: IconNameType;
|
|
5
|
+
/** Highlights the icon and shows a dot badge. */
|
|
6
|
+
active?: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
onPress: () => void;
|
|
9
|
+
testID?: string;
|
|
10
|
+
};
|
|
11
|
+
/** Circular icon-only button with an optional "active" indicator. */
|
|
12
|
+
export declare function IconButton({ icon, active, disabled, onPress, testID, }: Props): import("react").JSX.Element;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=IconButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../src/components/IconButton.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAe,CAAC;AAQlD,KAAK,KAAK,GAAG;IACX,iDAAiD;IACjD,IAAI,EAAE,YAAY,CAAC;IACnB,iDAAiD;IACjD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,qEAAqE;AACrE,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,MAAc,EACd,QAAgB,EAChB,OAAO,EACP,MAAM,GACP,EAAE,KAAK,+BA2BP"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type ContainerProps = {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
marginT?: number;
|
|
5
|
+
marginB?: number;
|
|
6
|
+
};
|
|
7
|
+
type ContentProps = {
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
/** Makes the row pressable. */
|
|
10
|
+
onPress?: () => void;
|
|
11
|
+
};
|
|
12
|
+
type TitleProps = {
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
color?: string;
|
|
15
|
+
};
|
|
16
|
+
/** A label inside an `InforList.Content` row. */
|
|
17
|
+
declare function Title({ children, color }: TitleProps): React.JSX.Element;
|
|
18
|
+
/** A single row; pressable when `onPress` is provided. */
|
|
19
|
+
declare function Content({ children, onPress }: ContentProps): React.JSX.Element;
|
|
20
|
+
/** Grouped list with dividers between rows. */
|
|
21
|
+
declare function Container({ children, marginB, marginT }: ContainerProps): React.JSX.Element;
|
|
22
|
+
export declare const InforList: {
|
|
23
|
+
Title: typeof Title;
|
|
24
|
+
Content: typeof Content;
|
|
25
|
+
Container: typeof Container;
|
|
26
|
+
};
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=InforList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InforList.d.ts","sourceRoot":"","sources":["../../../../src/components/InforList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,KAAK,cAAc,GAAG;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,KAAK,YAAY,GAAG;IAClB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,+BAA+B;IAC/B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF,KAAK,UAAU,GAAG;IAChB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,iDAAiD;AACjD,iBAAS,KAAK,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,UAAU,qBAM7C;AAED,0DAA0D;AAC1D,iBAAS,OAAO,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,YAAY,qBAanD;AAED,+CAA+C;AAC/C,iBAAS,SAAS,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,cAAc,qBA2BhE;AAED,eAAO,MAAM,SAAS;;;;CAIrB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type Props = {
|
|
2
|
+
/** Optional caption under the spinner. */
|
|
3
|
+
label?: string;
|
|
4
|
+
};
|
|
5
|
+
/** Blocking full-screen loading overlay. Drive it with `useLoadingApp().setLoadingVisible(...)`. */
|
|
6
|
+
export declare function LoadingApp({ label }: Props): import("react").JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=LoadingApp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadingApp.d.ts","sourceRoot":"","sources":["../../../../src/components/LoadingApp.tsx"],"names":[],"mappings":"AAMA,KAAK,KAAK,GAAG;IACX,0CAA0C;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,oGAAoG;AACpG,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,EAAE,KAAK,+BAyB1C"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type Props = {
|
|
2
|
+
/** Caption shown under the loading spinner. */
|
|
3
|
+
loadingLabel?: string;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* App-wide overlays (`Toast` + `LoadingApp`). Mount **once** at the root of the
|
|
7
|
+
* app — inside `ThemeProvider`, as a sibling of your navigator. They render
|
|
8
|
+
* above everything and are driven from anywhere via `useToast` / `useLoadingApp`.
|
|
9
|
+
*/
|
|
10
|
+
export declare function Overlays({ loadingLabel }: Props): import("react").JSX.Element;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=Overlays.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Overlays.d.ts","sourceRoot":"","sources":["../../../../src/components/Overlays.tsx"],"names":[],"mappings":"AAGA,KAAK,KAAK,GAAG;IACX,+CAA+C;IAC/C,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,EAAE,YAAY,EAAE,EAAE,KAAK,+BAO/C"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PressableProps } from 'react-native';
|
|
3
|
+
type Props = PressableProps & {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
/** Ripple color. Default: theme `text`. */
|
|
6
|
+
rippleColor?: string;
|
|
7
|
+
rippleOpacity?: number;
|
|
8
|
+
rippleDuration?: number;
|
|
9
|
+
rippleSize?: number;
|
|
10
|
+
rippleContainerBorderRadius?: number;
|
|
11
|
+
rippleCentered?: boolean;
|
|
12
|
+
rippleSequential?: boolean;
|
|
13
|
+
rippleFades?: boolean;
|
|
14
|
+
};
|
|
15
|
+
/** Wraps a child and paints a touch ripple at the press location. */
|
|
16
|
+
export declare function RippleEffect({ children, rippleColor, rippleOpacity, rippleDuration, rippleSize, rippleContainerBorderRadius, rippleCentered, rippleSequential, rippleFades, disabled, onLayout, onPressIn, onPressOut, ...pressableProps }: Props): React.JSX.Element;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=RippleEffect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RippleEffect.d.ts","sourceRoot":"","sources":["../../../../src/components/RippleEffect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,OAAO,KAAK,EAGV,cAAc,EACf,MAAM,cAAc,CAAC;AAatB,KAAK,KAAK,GAAG,cAAc,GAAG;IAC5B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,2CAA2C;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAOF,qEAAqE;AACrE,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,WAAW,EACX,aAAmB,EACnB,cAAoB,EACpB,UAAc,EACd,2BAA+B,EAC/B,cAAsB,EACtB,gBAAwB,EACxB,WAAkB,EAClB,QAAgB,EAChB,QAAQ,EACR,SAAS,EACT,UAAU,EACV,GAAG,cAAc,EAClB,EAAE,KAAK,qBA6IP"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { FlashListProps } from '@shopify/flash-list';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { ScrollHandlerProcessed } from 'react-native-reanimated';
|
|
4
|
+
/**
|
|
5
|
+
* Which top bar the screen renders, so the scrolling region can reserve the
|
|
6
|
+
* matching top inset: `large` = collapsing `AppBar` (`large`), `small` = fixed
|
|
7
|
+
* `AppBar`/`SearchBar`, `none` = no top bar (just the page inset).
|
|
8
|
+
*/
|
|
9
|
+
export type SpaceTopBarType = 'large' | 'small' | 'none';
|
|
10
|
+
type BarSpaceProps = {
|
|
11
|
+
/** Top inset to reserve for the screen's top bar. Required. */
|
|
12
|
+
spaceTopBar: SpaceTopBarType;
|
|
13
|
+
/** Reserve the bottom inset for the fixed `TabBar`. Required. */
|
|
14
|
+
spaceBottomBar: boolean;
|
|
15
|
+
};
|
|
16
|
+
type BodyProps = {
|
|
17
|
+
children: React.ReactNode;
|
|
18
|
+
/** Use the elevated `surface` background instead of the base `background`. */
|
|
19
|
+
surface?: boolean;
|
|
20
|
+
testID?: string;
|
|
21
|
+
};
|
|
22
|
+
type ViewProps = {
|
|
23
|
+
children: React.ReactNode;
|
|
24
|
+
paddingHorizontal?: number;
|
|
25
|
+
paddingTop?: number;
|
|
26
|
+
testID?: string;
|
|
27
|
+
};
|
|
28
|
+
type ScrollViewProps = BarSpaceProps & {
|
|
29
|
+
children: React.ReactNode;
|
|
30
|
+
paddingHorizontal?: number;
|
|
31
|
+
paddingTop?: number;
|
|
32
|
+
paddingBottom?: number;
|
|
33
|
+
onScroll?: ScrollHandlerProcessed;
|
|
34
|
+
testID?: string;
|
|
35
|
+
};
|
|
36
|
+
type FlashListSectionProps<TItem> = BarSpaceProps & Omit<FlashListProps<TItem>, 'onScroll'> & {
|
|
37
|
+
paddingHorizontal?: number;
|
|
38
|
+
paddingTop?: number;
|
|
39
|
+
paddingBottom?: number;
|
|
40
|
+
onScroll?: ScrollHandlerProcessed;
|
|
41
|
+
drawDistance?: number;
|
|
42
|
+
};
|
|
43
|
+
/** Full-screen page container. */
|
|
44
|
+
declare function Body({ children, surface, testID }: BodyProps): React.JSX.Element;
|
|
45
|
+
/**
|
|
46
|
+
* Non-scrolling content region with standard page insets. Content does not
|
|
47
|
+
* scroll under the fixed bars, so this takes no `spaceTopBar` / `spaceBottomBar`
|
|
48
|
+
* — pass an explicit `paddingTop` when a top bar covers it.
|
|
49
|
+
*/
|
|
50
|
+
declare function View({ children, paddingHorizontal, paddingTop, testID }: ViewProps): React.JSX.Element;
|
|
51
|
+
/** Scrolling content region with standard page insets. */
|
|
52
|
+
declare function ScrollView({ children, spaceTopBar, spaceBottomBar, paddingHorizontal, paddingTop, paddingBottom, onScroll, testID, }: ScrollViewProps): React.JSX.Element;
|
|
53
|
+
/** Virtualized list region with standard page insets. */
|
|
54
|
+
declare function FlashListSection<TItem>({ spaceTopBar, spaceBottomBar, paddingHorizontal, paddingTop, paddingBottom, onScroll, drawDistance, ...rest }: FlashListSectionProps<TItem>): React.JSX.Element;
|
|
55
|
+
export declare const Scaffold: {
|
|
56
|
+
Body: typeof Body;
|
|
57
|
+
View: typeof View;
|
|
58
|
+
ScrollView: typeof ScrollView;
|
|
59
|
+
FlashList: typeof FlashListSection;
|
|
60
|
+
};
|
|
61
|
+
export {};
|
|
62
|
+
//# sourceMappingURL=Scaffold.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Scaffold.d.ts","sourceRoot":"","sources":["../../../../src/components/Scaffold.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAOtE;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAEzD,KAAK,aAAa,GAAG;IACnB,+DAA+D;IAC/D,WAAW,EAAE,eAAe,CAAC;IAC7B,iEAAiE;IACjE,cAAc,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,KAAK,SAAS,GAAG;IACf,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,8EAA8E;IAC9E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,KAAK,SAAS,GAAG;IACf,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,KAAK,eAAe,GAAG,aAAa,GAAG;IACrC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,sBAAsB,CAAC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,KAAK,qBAAqB,CAAC,KAAK,IAAI,aAAa,GAC/C,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG;IACxC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,sBAAsB,CAAC;IAClC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AA6BJ,kCAAkC;AAClC,iBAAS,IAAI,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,SAAS,qBASrD;AAED;;;;GAIG;AACH,iBAAS,IAAI,CAAC,EAAE,QAAQ,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,SAAS,qBAc3E;AAED,0DAA0D;AAC1D,iBAAS,UAAU,CAAC,EAClB,QAAQ,EACR,WAAW,EACX,cAAc,EACd,iBAAiB,EACjB,UAAU,EACV,aAAa,EACb,QAAQ,EACR,MAAM,GACP,EAAE,eAAe,qBA+BjB;AAED,yDAAyD;AACzD,iBAAS,gBAAgB,CAAC,KAAK,EAAE,EAC/B,WAAW,EACX,cAAc,EACd,iBAAiB,EACjB,UAAU,EACV,aAAa,EACb,QAAQ,EACR,YAAkB,EAClB,GAAG,IAAI,EACR,EAAE,qBAAqB,CAAC,KAAK,CAAC,qBAkC9B;AAED,eAAO,MAAM,QAAQ;;;;;CAKpB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Total height of the fixed search bar, including the status bar. Uses the
|
|
4
|
+
* default `pageSpacing.top` — a themed override is not reflected here.
|
|
5
|
+
*/
|
|
6
|
+
export declare const SEARCH_BAR_HEIGHT: number;
|
|
7
|
+
type Props = {
|
|
8
|
+
/** Placeholder shown while the field is empty. */
|
|
9
|
+
placeholder: string;
|
|
10
|
+
/** Fired with the trimmed query on submit. */
|
|
11
|
+
onEnter: (query: string) => void;
|
|
12
|
+
/** Fired when the back control is pressed. */
|
|
13
|
+
onBack: () => void;
|
|
14
|
+
editable?: boolean;
|
|
15
|
+
autoFocus?: boolean;
|
|
16
|
+
};
|
|
17
|
+
/** Fixed top search bar with a back control and a text field. */
|
|
18
|
+
export declare function SearchBar({ placeholder, onEnter, onBack, editable, autoFocus, }: Props): React.JSX.Element;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=SearchBar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchBar.d.ts","sourceRoot":"","sources":["../../../../src/components/SearchBar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B;;;GAGG;AACH,eAAO,MAAM,iBAAiB,QACgC,CAAC;AAE/D,KAAK,KAAK,GAAG;IACX,kDAAkD;IAClD,WAAW,EAAE,MAAM,CAAC;IACpB,8CAA8C;IAC9C,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,8CAA8C;IAC9C,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,iEAAiE;AACjE,wBAAgB,SAAS,CAAC,EACxB,WAAW,EACX,OAAO,EACP,MAAM,EACN,QAAQ,EACR,SAAS,GACV,EAAE,KAAK,qBAoEP"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { IconNameType } from '../icons/Icon.js';
|
|
3
|
+
export type SegmentedButtonSizeType = 's' | 'm' | 'l';
|
|
4
|
+
/** Default track height (size `'m'`). */
|
|
5
|
+
export declare const SEGMENTED_BUTTON_HEIGHT: number;
|
|
6
|
+
export type SegmentedButtonItemType<Value> = {
|
|
7
|
+
/** Value reported to `onChange` when this segment is picked. */
|
|
8
|
+
value: Value;
|
|
9
|
+
/** Text shown in the segment. */
|
|
10
|
+
label: string;
|
|
11
|
+
/** Optional leading icon (replaced by a check on the selected segment). */
|
|
12
|
+
icon?: IconNameType;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
};
|
|
15
|
+
type Props<Value> = {
|
|
16
|
+
/** 2–5 connected segments. */
|
|
17
|
+
segments: SegmentedButtonItemType<Value>[];
|
|
18
|
+
/** The currently selected `value` (single-select, controlled). */
|
|
19
|
+
value: Value;
|
|
20
|
+
/** Called with the picked segment's `value`. */
|
|
21
|
+
onChange: (value: Value) => void;
|
|
22
|
+
/** Track size. Default `'m'`. */
|
|
23
|
+
size?: SegmentedButtonSizeType;
|
|
24
|
+
/** Disable the whole control. */
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
/** Show the leading check on the selected segment. Default `true`. */
|
|
27
|
+
showSelectedCheck?: boolean;
|
|
28
|
+
testID?: string;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Single-select segmented button in the Material 3 **Expressive** style — a
|
|
32
|
+
* rounded track holding equal-width segments. The selected segment morphs into a
|
|
33
|
+
* filled pill with a springy pop; every segment squishes on press.
|
|
34
|
+
*/
|
|
35
|
+
export declare function SegmentedButton<Value>({ segments, value, onChange, size, disabled, showSelectedCheck, testID, }: Props<Value>): React.JSX.Element;
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=SegmentedButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SegmentedButton.d.ts","sourceRoot":"","sources":["../../../../src/components/SegmentedButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAe,CAAC;AAMlD,MAAM,MAAM,uBAAuB,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAStD,yCAAyC;AACzC,eAAO,MAAM,uBAAuB,QAAY,CAAC;AAKjD,MAAM,MAAM,uBAAuB,CAAC,KAAK,IAAI;IAC3C,gEAAgE;IAChE,KAAK,EAAE,KAAK,CAAC;IACb,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,2EAA2E;IAC3E,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,KAAK,KAAK,CAAC,KAAK,IAAI;IAClB,8BAA8B;IAC9B,QAAQ,EAAE,uBAAuB,CAAC,KAAK,CAAC,EAAE,CAAC;IAC3C,kEAAkE;IAClE,KAAK,EAAE,KAAK,CAAC;IACb,gDAAgD;IAChD,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,iCAAiC;IACjC,IAAI,CAAC,EAAE,uBAAuB,CAAC;IAC/B,iCAAiC;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sEAAsE;IACtE,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,EACrC,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,IAAU,EACV,QAAgB,EAChB,iBAAwB,EACxB,MAAM,GACP,EAAE,KAAK,CAAC,KAAK,CAAC,qBA+Bd"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { FontSizeType } from '../types.js';
|
|
3
|
+
type Props = {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
/** Text size token. */
|
|
6
|
+
size?: FontSizeType;
|
|
7
|
+
/** `'primary'` = filled; `'secondary'` = transparent with primary text. */
|
|
8
|
+
type?: 'primary' | 'secondary';
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
/** Swaps the label for a spinner and blocks presses. */
|
|
11
|
+
isLoading?: boolean;
|
|
12
|
+
onPress: () => void;
|
|
13
|
+
testID?: string;
|
|
14
|
+
};
|
|
15
|
+
/** Filled call-to-action button with a loading state. */
|
|
16
|
+
export declare function ShapedButton({ children, size, type, disabled, isLoading, onPress, testID, }: Props): import("react").JSX.Element;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=ShapedButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShapedButton.d.ts","sourceRoot":"","sources":["../../../../src/components/ShapedButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAU,CAAC;AAI7C,KAAK,KAAK,GAAG;IACX,QAAQ,EAAE,SAAS,CAAC;IACpB,uBAAuB;IACvB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,2EAA2E;IAC3E,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wDAAwD;IACxD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,yDAAyD;AACzD,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,IAAI,EACJ,IAAgB,EAChB,QAAQ,EACR,SAAiB,EACjB,OAAO,EACP,MAAM,GACP,EAAE,KAAK,+BA4BP"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type SlideModalRef = {
|
|
3
|
+
show: () => void;
|
|
4
|
+
hide: () => void;
|
|
5
|
+
};
|
|
6
|
+
type Props = {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
title: string;
|
|
9
|
+
/** Swaps the content for a spinner and blocks the drag-to-dismiss gesture. */
|
|
10
|
+
isLoading?: boolean;
|
|
11
|
+
};
|
|
12
|
+
/** Bottom sheet that slides up; controlled imperatively through its ref. */
|
|
13
|
+
export declare const SlideModal: React.ForwardRefExoticComponent<Props & React.RefAttributes<SlideModalRef>>;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=SlideModal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SlideModal.d.ts","sourceRoot":"","sources":["../../../../src/components/SlideModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAMN,MAAM,OAAO,CAAC;AA4Bf,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,IAAI,EAAE,MAAM,IAAI,CAAC;CAClB,CAAC;AAEF,KAAK,KAAK,GAAG;IACX,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,8EAA8E;IAC9E,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,4EAA4E;AAC5E,eAAO,MAAM,UAAU,6EAgItB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { IconNameType } from '../icons/Icon.js';
|
|
3
|
+
export type TabItemType = {
|
|
4
|
+
key: string;
|
|
5
|
+
icon: IconNameType;
|
|
6
|
+
label: string;
|
|
7
|
+
active: boolean;
|
|
8
|
+
onPress: () => void;
|
|
9
|
+
};
|
|
10
|
+
type Props = {
|
|
11
|
+
items: TabItemType[];
|
|
12
|
+
/** Fade the bar out (and disable touches) when false. Default `true`. */
|
|
13
|
+
visible?: boolean;
|
|
14
|
+
};
|
|
15
|
+
/** Height a screen should reserve for the fixed tab bar. */
|
|
16
|
+
export declare function useTabBarHeight(): number;
|
|
17
|
+
/** Fixed bottom tab bar driven by a list of items — knows nothing about routing. */
|
|
18
|
+
export declare function TabBar({ items, visible }: Props): React.JSX.Element;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=TabBar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TabBar.d.ts","sourceRoot":"","sources":["../../../../src/components/TabBar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAe,CAAC;AAUlD,MAAM,MAAM,WAAW,GAAG;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,YAAY,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,yEAAyE;IACzE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,4DAA4D;AAC5D,wBAAgB,eAAe,WAG9B;AAED,oFAAoF;AACpF,wBAAgB,MAAM,CAAC,EAAE,KAAK,EAAE,OAAc,EAAE,EAAE,KAAK,qBAgDtD"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { ColorValue } from 'react-native';
|
|
3
|
+
import type { FontSizeType, FontWeightType, TextAlignType } from '../types.js';
|
|
4
|
+
type Props = {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
/** Font weight → font family (`Inter-*`). Default `'regular'`. */
|
|
7
|
+
weight?: FontWeightType;
|
|
8
|
+
/** Font size token. Default `'s'`. */
|
|
9
|
+
size?: FontSizeType;
|
|
10
|
+
/** Text color. Default: theme `text`. */
|
|
11
|
+
color?: string | ColorValue;
|
|
12
|
+
/** Max lines before truncation. */
|
|
13
|
+
numberOfLines?: number;
|
|
14
|
+
textAlign?: TextAlignType;
|
|
15
|
+
/** Margins in dp. */
|
|
16
|
+
marginT?: number;
|
|
17
|
+
marginB?: number;
|
|
18
|
+
marginR?: number;
|
|
19
|
+
marginL?: number;
|
|
20
|
+
opacity?: number;
|
|
21
|
+
testID?: string;
|
|
22
|
+
};
|
|
23
|
+
/** Themed text primitive. All display copy comes from `children`. */
|
|
24
|
+
export declare function Text({ children, weight, size, color, numberOfLines, textAlign, marginT, marginB, marginR, marginL, opacity, testID, }: Props): import("react").JSX.Element;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=Text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../../src/components/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG/C,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAU,CAAC;AAQ5E,KAAK,KAAK,GAAG;IACX,QAAQ,EAAE,SAAS,CAAC;IACpB,kEAAkE;IAClE,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,sCAAsC;IACtC,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAC5B,mCAAmC;IACnC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,qBAAqB;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,qEAAqE;AACrE,wBAAgB,IAAI,CAAC,EACnB,QAAQ,EACR,MAAkB,EAClB,IAAU,EACV,KAAK,EACL,aAAa,EACb,SAAS,EACT,OAAW,EACX,OAAW,EACX,OAAW,EACX,OAAW,EACX,OAAO,EACP,MAAM,GACP,EAAE,KAAK,+BAsBP"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { FontSizeType } from '../types.js';
|
|
3
|
+
type Props = {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
size?: FontSizeType;
|
|
6
|
+
/** Text color. Default: theme `primary`. */
|
|
7
|
+
color?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
onPress: () => void;
|
|
10
|
+
testID?: string;
|
|
11
|
+
};
|
|
12
|
+
/** Text-only button, no fill. */
|
|
13
|
+
export declare function TextButton({ children, size, color, disabled, onPress, testID, }: Props): import("react").JSX.Element;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=TextButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextButton.d.ts","sourceRoot":"","sources":["../../../../src/components/TextButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAU,CAAC;AAI7C,KAAK,KAAK,GAAG;IACX,QAAQ,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,iCAAiC;AACjC,wBAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,QAAgB,EAChB,OAAO,EACP,MAAM,GACP,EAAE,KAAK,+BAkBP"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TextInputProps } from 'react-native';
|
|
3
|
+
type Props = {
|
|
4
|
+
value: string;
|
|
5
|
+
placeholder: string;
|
|
6
|
+
/** Helper text shown below the field (in the error color). */
|
|
7
|
+
supportingText?: string;
|
|
8
|
+
isError?: boolean;
|
|
9
|
+
autoFocus?: TextInputProps['autoFocus'];
|
|
10
|
+
autoCapitalize?: TextInputProps['autoCapitalize'];
|
|
11
|
+
autoCorrect?: TextInputProps['autoCorrect'];
|
|
12
|
+
autoComplete?: TextInputProps['autoComplete'];
|
|
13
|
+
inputMode?: TextInputProps['inputMode'];
|
|
14
|
+
onChangeText: (text: string) => void;
|
|
15
|
+
onBlur?: TextInputProps['onBlur'];
|
|
16
|
+
/** Called on submit when the value is non-empty. */
|
|
17
|
+
onEnter?: () => void;
|
|
18
|
+
};
|
|
19
|
+
/** Single-line text field with a supporting message and error state. */
|
|
20
|
+
export declare function TextInput({ value, placeholder, supportingText, isError, autoFocus, autoCapitalize, autoCorrect, autoComplete, inputMode, onEnter, onChangeText, onBlur, }: Props): React.JSX.Element;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=TextInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../../src/components/TextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAOnD,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,8DAA8D;IAC9D,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC;IACxC,cAAc,CAAC,EAAE,cAAc,CAAC,gBAAgB,CAAC,CAAC;IAClD,WAAW,CAAC,EAAE,cAAc,CAAC,aAAa,CAAC,CAAC;IAC5C,YAAY,CAAC,EAAE,cAAc,CAAC,cAAc,CAAC,CAAC;IAC9C,SAAS,CAAC,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC;IACxC,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,MAAM,CAAC,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC;IAClC,oDAAoD;IACpD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF,wEAAwE;AACxE,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,WAAW,EACX,cAAc,EACd,OAAe,EACf,SAAS,EACT,cAAc,EACd,WAAW,EACX,YAAY,EACZ,SAAS,EACT,OAAO,EACP,YAAY,EACZ,MAAM,GACP,EAAE,KAAK,qBAkDP"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../../src/components/Toast.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAoB1B,4EAA4E;AAC5E,wBAAgB,KAAK,6BAiDpB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tracks vertical scroll offset for the collapsing `AppBar`. Spread
|
|
3
|
+
* `scrollHandler` onto an `Animated.ScrollView`/`Scaffold` `onScroll` and pass
|
|
4
|
+
* `scrollY` to `<AppBar scrollY={...} />`.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useAppBarScroll(): {
|
|
7
|
+
scrollY: import("react-native-reanimated").SharedValue<number>;
|
|
8
|
+
scrollHandler: import("react-native-reanimated").ScrollHandlerProcessed<Record<string, unknown>>;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=useAppBarScroll.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAppBarScroll.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useAppBarScroll.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,wBAAgB,eAAe;;;EAQ9B"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
type Props = {
|
|
2
|
+
/** Called once on press and repeatedly (accelerating) while held. */
|
|
3
|
+
onTrigger: () => void;
|
|
4
|
+
/** When true, the control fires nothing and any in-flight repeat stops. */
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Press-and-hold with acceleration, decoupled from any domain.
|
|
9
|
+
*
|
|
10
|
+
* Wire the returned handlers to a pressable: `onPressIn` fires `onTrigger` once
|
|
11
|
+
* immediately (so a quick tap steps by one) and, if the press is held past
|
|
12
|
+
* `HOLD_START_DELAY_MS`, keeps firing it on a shrinking interval until `onPressOut`
|
|
13
|
+
* (or unmount). Clamping / bounds are the caller's concern — firing `onTrigger`
|
|
14
|
+
* when the value is already at a limit is expected to be a no-op.
|
|
15
|
+
*/
|
|
16
|
+
export declare function usePressAndHoldRepeat({ onTrigger, disabled }: Props): {
|
|
17
|
+
onPressIn: () => void;
|
|
18
|
+
onPressOut: () => void;
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=usePressAndHoldRepeat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePressAndHoldRepeat.d.ts","sourceRoot":"","sources":["../../../../src/hooks/usePressAndHoldRepeat.ts"],"names":[],"mappings":"AAEA,KAAK,KAAK,GAAG;IACX,qEAAqE;IACrE,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAWF;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,KAAK;;;EAyDnE"}
|