@webority-technologies/mobile 0.0.14 → 0.0.20
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/lib/commonjs/components/Accordion/Accordion.js +60 -19
- package/lib/commonjs/components/AppBar/AppBar.js +29 -20
- package/lib/commonjs/components/Avatar/Avatar.js +38 -8
- package/lib/commonjs/components/Badge/Badge.js +66 -4
- package/lib/commonjs/components/Banner/Banner.js +146 -66
- package/lib/commonjs/components/BottomNavigation/BottomNavigation.js +37 -15
- package/lib/commonjs/components/BottomSheet/BottomSheet.js +85 -50
- package/lib/commonjs/components/Button/Button.js +12 -5
- package/lib/commonjs/components/Card/Card.js +106 -16
- package/lib/commonjs/components/Carousel/Carousel.js +66 -12
- package/lib/commonjs/components/Checkbox/Checkbox.js +11 -7
- package/lib/commonjs/components/Chip/Chip.js +44 -12
- package/lib/commonjs/components/DatePicker/DatePicker.js +185 -76
- package/lib/commonjs/components/DateRangePicker/DateRangePicker.js +133 -59
- package/lib/commonjs/components/Dialog/Dialog.js +16 -10
- package/lib/commonjs/components/Drawer/Drawer.js +13 -10
- package/lib/commonjs/components/FieldBase/FieldBase.js +306 -0
- package/lib/commonjs/components/FieldBase/index.js +32 -0
- package/lib/commonjs/components/FloatingActionButton/FloatingActionButton.js +69 -44
- package/lib/commonjs/components/ForceUpdateDialog/ForceUpdateDialog.js +8 -2
- package/lib/commonjs/components/FormField/FormField.js +3 -2
- package/lib/commonjs/components/ImageGallery/ImageGallery.js +132 -44
- package/lib/commonjs/components/Input/Input.js +144 -181
- package/lib/commonjs/components/ListItem/ListItem.js +90 -11
- package/lib/commonjs/components/Modal/Modal.js +55 -27
- package/lib/commonjs/components/NumberInput/NumberInput.js +60 -106
- package/lib/commonjs/components/OTPInput/OTPInput.js +65 -58
- package/lib/commonjs/components/PickerTrigger/PickerTrigger.js +185 -0
- package/lib/commonjs/components/{AppIcon → PickerTrigger}/index.js +4 -4
- package/lib/commonjs/components/ProgressBar/ProgressBar.js +19 -11
- package/lib/commonjs/components/Radio/Radio.js +11 -6
- package/lib/commonjs/components/Rating/Rating.js +85 -19
- package/lib/commonjs/components/SearchBar/SearchBar.js +84 -107
- package/lib/commonjs/components/SegmentedControl/SegmentedControl.js +22 -11
- package/lib/commonjs/components/Select/Select.js +62 -91
- package/lib/commonjs/components/Skeleton/Skeleton.js +131 -174
- package/lib/commonjs/components/Skeleton/SkeletonClock.js +117 -0
- package/lib/commonjs/components/Skeleton/SkeletonContent.js +164 -81
- package/lib/commonjs/components/Skeleton/SkeletonProvider.js +72 -10
- package/lib/commonjs/components/Skeleton/index.js +17 -16
- package/lib/commonjs/components/Slider/Slider.js +44 -25
- package/lib/commonjs/components/Stepper/Stepper.js +199 -29
- package/lib/commonjs/components/Swipeable/Swipeable.js +36 -19
- package/lib/commonjs/components/Switch/Switch.js +9 -2
- package/lib/commonjs/components/Tabs/Tabs.js +84 -21
- package/lib/commonjs/components/TimePicker/TimePicker.js +123 -45
- package/lib/commonjs/components/Toast/Toast.js +27 -16
- package/lib/commonjs/components/Tooltip/Tooltip.js +56 -32
- package/lib/commonjs/components/index.js +37 -37
- package/lib/commonjs/theme/tokens.js +55 -7
- package/lib/module/components/Accordion/Accordion.js +61 -20
- package/lib/module/components/AppBar/AppBar.js +29 -20
- package/lib/module/components/Avatar/Avatar.js +39 -9
- package/lib/module/components/Badge/Badge.js +67 -5
- package/lib/module/components/Banner/Banner.js +147 -67
- package/lib/module/components/BottomNavigation/BottomNavigation.js +37 -15
- package/lib/module/components/BottomSheet/BottomSheet.js +87 -52
- package/lib/module/components/Button/Button.js +12 -5
- package/lib/module/components/Card/Card.js +107 -17
- package/lib/module/components/Carousel/Carousel.js +67 -13
- package/lib/module/components/Checkbox/Checkbox.js +11 -7
- package/lib/module/components/Chip/Chip.js +45 -13
- package/lib/module/components/DatePicker/DatePicker.js +185 -76
- package/lib/module/components/DateRangePicker/DateRangePicker.js +134 -60
- package/lib/module/components/Dialog/Dialog.js +16 -10
- package/lib/module/components/Drawer/Drawer.js +13 -10
- package/lib/module/components/FieldBase/FieldBase.js +297 -0
- package/lib/module/components/FieldBase/index.js +4 -0
- package/lib/module/components/FloatingActionButton/FloatingActionButton.js +69 -44
- package/lib/module/components/ForceUpdateDialog/ForceUpdateDialog.js +8 -2
- package/lib/module/components/FormField/FormField.js +3 -2
- package/lib/module/components/ImageGallery/ImageGallery.js +128 -40
- package/lib/module/components/Input/Input.js +144 -179
- package/lib/module/components/ListItem/ListItem.js +91 -12
- package/lib/module/components/Modal/Modal.js +55 -27
- package/lib/module/components/NumberInput/NumberInput.js +60 -106
- package/lib/module/components/OTPInput/OTPInput.js +65 -58
- package/lib/module/components/PickerTrigger/PickerTrigger.js +181 -0
- package/lib/module/components/PickerTrigger/index.js +4 -0
- package/lib/module/components/ProgressBar/ProgressBar.js +19 -11
- package/lib/module/components/Radio/Radio.js +11 -6
- package/lib/module/components/Rating/Rating.js +86 -20
- package/lib/module/components/SearchBar/SearchBar.js +84 -107
- package/lib/module/components/SegmentedControl/SegmentedControl.js +22 -11
- package/lib/module/components/Select/Select.js +62 -91
- package/lib/module/components/Skeleton/Skeleton.js +135 -175
- package/lib/module/components/Skeleton/SkeletonClock.js +110 -0
- package/lib/module/components/Skeleton/SkeletonContent.js +167 -84
- package/lib/module/components/Skeleton/SkeletonProvider.js +71 -10
- package/lib/module/components/Skeleton/index.js +3 -2
- package/lib/module/components/Slider/Slider.js +44 -25
- package/lib/module/components/Stepper/Stepper.js +201 -31
- package/lib/module/components/Swipeable/Swipeable.js +36 -19
- package/lib/module/components/Switch/Switch.js +9 -2
- package/lib/module/components/Tabs/Tabs.js +84 -21
- package/lib/module/components/TimePicker/TimePicker.js +123 -45
- package/lib/module/components/Toast/Toast.js +27 -16
- package/lib/module/components/Tooltip/Tooltip.js +56 -32
- package/lib/module/components/index.js +2 -2
- package/lib/module/theme/tokens.js +55 -7
- package/lib/typescript/commonjs/components/Accordion/Accordion.d.ts +10 -5
- package/lib/typescript/commonjs/components/AppBar/AppBar.d.ts +8 -0
- package/lib/typescript/commonjs/components/Avatar/Avatar.d.ts +12 -6
- package/lib/typescript/commonjs/components/Badge/Badge.d.ts +7 -6
- package/lib/typescript/commonjs/components/Banner/Banner.d.ts +17 -6
- package/lib/typescript/commonjs/components/BottomSheet/BottomSheet.d.ts +7 -0
- package/lib/typescript/commonjs/components/Card/Card.d.ts +17 -6
- package/lib/typescript/commonjs/components/Carousel/Carousel.d.ts +7 -6
- package/lib/typescript/commonjs/components/Checkbox/Checkbox.d.ts +9 -1
- package/lib/typescript/commonjs/components/Chip/Chip.d.ts +13 -6
- package/lib/typescript/commonjs/components/DatePicker/DatePicker.d.ts +38 -3
- package/lib/typescript/commonjs/components/DateRangePicker/DateRangePicker.d.ts +36 -3
- package/lib/typescript/commonjs/components/Dialog/Dialog.d.ts +13 -1
- package/lib/typescript/commonjs/components/FieldBase/FieldBase.d.ts +141 -0
- package/lib/typescript/commonjs/components/FieldBase/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/FloatingActionButton/FloatingActionButton.d.ts +8 -6
- package/lib/typescript/commonjs/components/FloatingActionButton/index.d.ts +1 -1
- package/lib/typescript/commonjs/components/ForceUpdateDialog/ForceUpdateDialog.d.ts +7 -0
- package/lib/typescript/commonjs/components/FormField/FormField.d.ts +7 -0
- package/lib/typescript/commonjs/components/ImageGallery/ImageGallery.d.ts +6 -4
- package/lib/typescript/commonjs/components/Input/Input.d.ts +6 -0
- package/lib/typescript/commonjs/components/ListItem/ListItem.d.ts +13 -6
- package/lib/typescript/commonjs/components/NumberInput/NumberInput.d.ts +3 -0
- package/lib/typescript/commonjs/components/PickerTrigger/PickerTrigger.d.ts +57 -0
- package/lib/typescript/commonjs/components/PickerTrigger/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/ProgressBar/ProgressBar.d.ts +2 -0
- package/lib/typescript/commonjs/components/Radio/Radio.d.ts +3 -0
- package/lib/typescript/commonjs/components/Rating/Rating.d.ts +9 -6
- package/lib/typescript/commonjs/components/SegmentedControl/SegmentedControl.d.ts +3 -0
- package/lib/typescript/commonjs/components/Skeleton/Skeleton.d.ts +49 -20
- package/lib/typescript/commonjs/components/Skeleton/SkeletonClock.d.ts +60 -0
- package/lib/typescript/commonjs/components/Skeleton/SkeletonContent.d.ts +80 -19
- package/lib/typescript/commonjs/components/Skeleton/SkeletonProvider.d.ts +39 -5
- package/lib/typescript/commonjs/components/Skeleton/index.d.ts +6 -4
- package/lib/typescript/commonjs/components/Slider/Slider.d.ts +12 -1
- package/lib/typescript/commonjs/components/Stepper/Stepper.d.ts +18 -6
- package/lib/typescript/commonjs/components/Swipeable/Swipeable.d.ts +2 -0
- package/lib/typescript/commonjs/components/Switch/Switch.d.ts +1 -0
- package/lib/typescript/commonjs/components/Tabs/Tabs.d.ts +26 -2
- package/lib/typescript/commonjs/components/TimePicker/TimePicker.d.ts +36 -3
- package/lib/typescript/commonjs/components/Toast/Toast.d.ts +8 -0
- package/lib/typescript/commonjs/components/Tooltip/Tooltip.d.ts +7 -1
- package/lib/typescript/commonjs/components/index.d.ts +5 -5
- package/lib/typescript/commonjs/index.d.ts +1 -1
- package/lib/typescript/commonjs/theme/index.d.ts +1 -1
- package/lib/typescript/commonjs/theme/types.d.ts +553 -11
- package/lib/typescript/module/components/Accordion/Accordion.d.ts +10 -5
- package/lib/typescript/module/components/AppBar/AppBar.d.ts +8 -0
- package/lib/typescript/module/components/Avatar/Avatar.d.ts +12 -6
- package/lib/typescript/module/components/Badge/Badge.d.ts +7 -6
- package/lib/typescript/module/components/Banner/Banner.d.ts +17 -6
- package/lib/typescript/module/components/BottomSheet/BottomSheet.d.ts +7 -0
- package/lib/typescript/module/components/Card/Card.d.ts +17 -6
- package/lib/typescript/module/components/Carousel/Carousel.d.ts +7 -6
- package/lib/typescript/module/components/Checkbox/Checkbox.d.ts +9 -1
- package/lib/typescript/module/components/Chip/Chip.d.ts +13 -6
- package/lib/typescript/module/components/DatePicker/DatePicker.d.ts +38 -3
- package/lib/typescript/module/components/DateRangePicker/DateRangePicker.d.ts +36 -3
- package/lib/typescript/module/components/Dialog/Dialog.d.ts +13 -1
- package/lib/typescript/module/components/FieldBase/FieldBase.d.ts +141 -0
- package/lib/typescript/module/components/FieldBase/index.d.ts +3 -0
- package/lib/typescript/module/components/FloatingActionButton/FloatingActionButton.d.ts +8 -6
- package/lib/typescript/module/components/FloatingActionButton/index.d.ts +1 -1
- package/lib/typescript/module/components/ForceUpdateDialog/ForceUpdateDialog.d.ts +7 -0
- package/lib/typescript/module/components/FormField/FormField.d.ts +7 -0
- package/lib/typescript/module/components/ImageGallery/ImageGallery.d.ts +6 -4
- package/lib/typescript/module/components/Input/Input.d.ts +6 -0
- package/lib/typescript/module/components/ListItem/ListItem.d.ts +13 -6
- package/lib/typescript/module/components/NumberInput/NumberInput.d.ts +3 -0
- package/lib/typescript/module/components/PickerTrigger/PickerTrigger.d.ts +57 -0
- package/lib/typescript/module/components/PickerTrigger/index.d.ts +3 -0
- package/lib/typescript/module/components/ProgressBar/ProgressBar.d.ts +2 -0
- package/lib/typescript/module/components/Radio/Radio.d.ts +3 -0
- package/lib/typescript/module/components/Rating/Rating.d.ts +9 -6
- package/lib/typescript/module/components/SegmentedControl/SegmentedControl.d.ts +3 -0
- package/lib/typescript/module/components/Skeleton/Skeleton.d.ts +49 -20
- package/lib/typescript/module/components/Skeleton/SkeletonClock.d.ts +60 -0
- package/lib/typescript/module/components/Skeleton/SkeletonContent.d.ts +80 -19
- package/lib/typescript/module/components/Skeleton/SkeletonProvider.d.ts +39 -5
- package/lib/typescript/module/components/Skeleton/index.d.ts +6 -4
- package/lib/typescript/module/components/Slider/Slider.d.ts +12 -1
- package/lib/typescript/module/components/Stepper/Stepper.d.ts +18 -6
- package/lib/typescript/module/components/Swipeable/Swipeable.d.ts +2 -0
- package/lib/typescript/module/components/Switch/Switch.d.ts +1 -0
- package/lib/typescript/module/components/Tabs/Tabs.d.ts +26 -2
- package/lib/typescript/module/components/TimePicker/TimePicker.d.ts +36 -3
- package/lib/typescript/module/components/Toast/Toast.d.ts +8 -0
- package/lib/typescript/module/components/Tooltip/Tooltip.d.ts +7 -1
- package/lib/typescript/module/components/index.d.ts +5 -5
- package/lib/typescript/module/index.d.ts +1 -1
- package/lib/typescript/module/theme/index.d.ts +1 -1
- package/lib/typescript/module/theme/types.d.ts +553 -11
- package/package.json +2 -6
- package/lib/commonjs/components/AppIcon/AppIcon.js +0 -120
- package/lib/commonjs/types/vector-icons.d.js +0 -2
- package/lib/module/components/AppIcon/AppIcon.js +0 -111
- package/lib/module/components/AppIcon/index.js +0 -4
- package/lib/module/types/vector-icons.d.js +0 -2
- package/lib/typescript/commonjs/components/AppIcon/AppIcon.d.ts +0 -20
- package/lib/typescript/commonjs/components/AppIcon/index.d.ts +0 -3
- package/lib/typescript/module/components/AppIcon/AppIcon.d.ts +0 -20
- package/lib/typescript/module/components/AppIcon/index.d.ts +0 -3
|
@@ -1,51 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skeleton — the leaf placeholder primitive.
|
|
3
|
+
*
|
|
4
|
+
* Every Skeleton on screen reads the shared shimmer/pulse clock from
|
|
5
|
+
* `SkeletonProvider` (see SkeletonClock.tsx). One native-driver loop per
|
|
6
|
+
* provider drives every instance, so 50 placeholders on a list don't spawn
|
|
7
|
+
* 50 timers and the shimmer bands never drift out of phase.
|
|
8
|
+
*
|
|
9
|
+
* Visual:
|
|
10
|
+
* - A View with the base color and `overflow: hidden` + radius gives the
|
|
11
|
+
* placeholder its shape.
|
|
12
|
+
* - For `animation: 'shimmer'`, an Animated.View carrying a 3-stop
|
|
13
|
+
* `LinearGradient` (transparent → highlight → transparent) translates
|
|
14
|
+
* across the box. The radius clips it to the right outline automatically.
|
|
15
|
+
* - For `animation: 'pulse'`, a full-fill Animated.View fades its opacity
|
|
16
|
+
* between 0 and 0.6. Cheap and useful for tiny shapes where a sweep
|
|
17
|
+
* would barely be visible.
|
|
18
|
+
* - For `animation: 'none'` (or when the OS Reduce Motion preference is
|
|
19
|
+
* on), just the base color renders.
|
|
20
|
+
*
|
|
21
|
+
* `variant` describes the SHAPE: rect (default), rounded (theme.radius.md),
|
|
22
|
+
* circle (50%), or text (small radius, slightly inset height). Set width /
|
|
23
|
+
* height directly for full control.
|
|
24
|
+
*/
|
|
1
25
|
import React from 'react';
|
|
2
26
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
27
|
import type { RadiusScale } from '../../theme/types';
|
|
4
28
|
import type { SkeletonColors } from './SkeletonProvider';
|
|
5
|
-
|
|
29
|
+
/** Animation pattern. */
|
|
30
|
+
export type SkeletonVariant = 'shimmer' | 'pulse' | 'none';
|
|
31
|
+
/** Sweep speed for the shimmer band. Ignored for pulse / none. */
|
|
6
32
|
export type SkeletonSpeed = 'slow' | 'normal' | 'fast';
|
|
33
|
+
/** Pre-defined shape archetype. Plays nicely with `width`/`height` overrides. */
|
|
34
|
+
export type SkeletonShape = 'rect' | 'rounded' | 'circle' | 'text';
|
|
35
|
+
/** `theme.radius` token name or a literal pixel value. */
|
|
7
36
|
export type SkeletonRadius = keyof Pick<RadiusScale, 'sm' | 'md' | 'lg' | 'xl' | 'full'> | number;
|
|
8
37
|
export type SkeletonWidth = number | 'auto' | '100%' | `${number}%`;
|
|
9
|
-
export type SkeletonAvatarSize = 'sm' | 'md' | 'lg';
|
|
10
38
|
export interface SkeletonProps {
|
|
39
|
+
/**
|
|
40
|
+
* Pre-defined shape archetype. Sets sensible defaults for the missing
|
|
41
|
+
* dimensions/radius. Override individual values via `width`, `height`,
|
|
42
|
+
* `radius` as needed.
|
|
43
|
+
* - `'rect'`: default, sharp corners.
|
|
44
|
+
* - `'rounded'`: `theme.radius.md` corners — for cards / buttons.
|
|
45
|
+
* - `'circle'`: 50% radius — for avatars / icons (provide `width` = `height`).
|
|
46
|
+
* - `'text'`: small radius + roughly text-line height. `height` becomes
|
|
47
|
+
* `1.15× fontSize` if a `fontSize` would have been passed.
|
|
48
|
+
*/
|
|
49
|
+
shape?: SkeletonShape;
|
|
11
50
|
width?: SkeletonWidth;
|
|
12
51
|
height?: number;
|
|
13
52
|
radius?: SkeletonRadius;
|
|
53
|
+
/** Animation pattern. */
|
|
14
54
|
variant?: SkeletonVariant;
|
|
55
|
+
/** Sweep speed for shimmer. */
|
|
15
56
|
speed?: SkeletonSpeed;
|
|
16
57
|
/**
|
|
17
|
-
* Per-instance
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* (dark shimmer on a light banner, etc.) — for app-wide overrides prefer
|
|
21
|
-
* `<SkeletonProvider colors={{...}}>`.
|
|
58
|
+
* Per-instance color override. Falls back to provider defaults, then theme.
|
|
59
|
+
* Use for one-off contrast adjustments (dark shimmer on a light banner);
|
|
60
|
+
* prefer `<SkeletonProvider colors={...}>` for app-wide overrides.
|
|
22
61
|
*/
|
|
23
62
|
colors?: SkeletonColors;
|
|
24
63
|
style?: StyleProp<ViewStyle>;
|
|
25
64
|
testID?: string;
|
|
26
65
|
}
|
|
27
|
-
export interface SkeletonCircleProps extends Omit<SkeletonProps, 'width' | 'height' | '
|
|
66
|
+
export interface SkeletonCircleProps extends Omit<SkeletonProps, 'width' | 'height' | 'shape'> {
|
|
28
67
|
size: number;
|
|
29
68
|
}
|
|
30
|
-
export interface SkeletonTextProps extends Omit<SkeletonProps, 'height'> {
|
|
69
|
+
export interface SkeletonTextProps extends Omit<SkeletonProps, 'height' | 'shape'> {
|
|
31
70
|
lines?: number;
|
|
32
71
|
lastLineWidth?: SkeletonWidth;
|
|
33
72
|
spacing?: number;
|
|
34
73
|
fontSize?: number;
|
|
35
74
|
}
|
|
36
|
-
export interface SkeletonAvatarProps extends Omit<SkeletonProps, 'width' | 'height' | 'radius'> {
|
|
37
|
-
size?: SkeletonAvatarSize;
|
|
38
|
-
}
|
|
39
|
-
export type SkeletonCardProps = Omit<SkeletonProps, 'height'>;
|
|
40
|
-
export interface SkeletonListItemProps extends Omit<SkeletonProps, 'width' | 'height'> {
|
|
41
|
-
avatarSize?: SkeletonAvatarSize;
|
|
42
|
-
}
|
|
43
75
|
declare const Skeleton: React.FC<SkeletonProps>;
|
|
44
76
|
declare const SkeletonCircle: React.FC<SkeletonCircleProps>;
|
|
45
77
|
declare const SkeletonText: React.FC<SkeletonTextProps>;
|
|
46
|
-
|
|
47
|
-
declare const SkeletonCard: React.FC<SkeletonCardProps>;
|
|
48
|
-
declare const SkeletonListItem: React.FC<SkeletonListItemProps>;
|
|
49
|
-
export { Skeleton, SkeletonCircle, SkeletonText, SkeletonAvatar, SkeletonCard, SkeletonListItem };
|
|
78
|
+
export { Skeleton, SkeletonCircle, SkeletonText };
|
|
50
79
|
export default Skeleton;
|
|
51
80
|
//# sourceMappingURL=Skeleton.d.ts.map
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SkeletonClock — single shared animation tick for every <Skeleton> on screen.
|
|
3
|
+
*
|
|
4
|
+
* Why this exists: previously every Skeleton primitive ran its own
|
|
5
|
+
* `Animated.loop` on its own `Animated.Value`. A list of 20 placeholders =
|
|
6
|
+
* 20 independent native-driver timers, each starting at a slightly different
|
|
7
|
+
* mount frame, so their shimmer bands drift out of phase within ~1s and the
|
|
8
|
+
* surface feels noisy. CSS-driven web skeleton libs (react-loading-skeleton,
|
|
9
|
+
* MUI) avoid this because the browser owns a single timeline. We emulate
|
|
10
|
+
* that on RN by hoisting the loop into context.
|
|
11
|
+
*
|
|
12
|
+
* The clock produces a value in `[0, 1)` that wraps every `duration` ms. Each
|
|
13
|
+
* Skeleton interpolates that value into its own translateX / opacity output.
|
|
14
|
+
* One native-driver loop, no drift, ~zero JS cost.
|
|
15
|
+
*/
|
|
16
|
+
import React from 'react';
|
|
17
|
+
import type { ReactNode } from 'react';
|
|
18
|
+
import { Animated } from 'react-native';
|
|
19
|
+
import type { SkeletonSpeed, SkeletonVariant } from './Skeleton';
|
|
20
|
+
export interface SkeletonClockValue {
|
|
21
|
+
/**
|
|
22
|
+
* `Animated.Value` looping 0→1 for the shimmer variant. Each Skeleton
|
|
23
|
+
* interpolates this into translateX. One value per provider scope =
|
|
24
|
+
* perfectly synchronized shimmer bands across the whole subtree.
|
|
25
|
+
*/
|
|
26
|
+
shimmer: Animated.Value;
|
|
27
|
+
/**
|
|
28
|
+
* Separate value for the pulse variant (different duration / easing).
|
|
29
|
+
* Lives alongside shimmer so swapping `variant` per-instance is cheap.
|
|
30
|
+
*/
|
|
31
|
+
pulse: Animated.Value;
|
|
32
|
+
/** Whether the clock is currently running (false in reduced-motion mode). */
|
|
33
|
+
enabled: boolean;
|
|
34
|
+
}
|
|
35
|
+
export interface SkeletonClockProviderProps {
|
|
36
|
+
/** Drives the shimmer band's speed. */
|
|
37
|
+
speed: SkeletonSpeed;
|
|
38
|
+
/** Pause the clock entirely — e.g., when reduced-motion is on. */
|
|
39
|
+
enabled: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Default variant flag. Both loops always run regardless (it's cheap),
|
|
42
|
+
* but we accept this prop so the provider's API matches the user-facing
|
|
43
|
+
* variant default. Reserved for future use; currently the prop is purely
|
|
44
|
+
* descriptive.
|
|
45
|
+
*/
|
|
46
|
+
variant: SkeletonVariant;
|
|
47
|
+
children: ReactNode;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Owns the loops. Mount one of these inside `SkeletonProvider`; every
|
|
51
|
+
* `<Skeleton>` below it shares the same animated values.
|
|
52
|
+
*/
|
|
53
|
+
export declare const SkeletonClockProvider: React.FC<SkeletonClockProviderProps>;
|
|
54
|
+
/**
|
|
55
|
+
* Read the active clock. Returns a fallback "always-still" clock when no
|
|
56
|
+
* provider is mounted, so the primitives still render (statically) outside
|
|
57
|
+
* one — keeps demo/storybook usage friction-free.
|
|
58
|
+
*/
|
|
59
|
+
export declare const useSkeletonClock: () => SkeletonClockValue;
|
|
60
|
+
//# sourceMappingURL=SkeletonClock.d.ts.map
|
|
@@ -1,37 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SkeletonContent — show placeholder shapes while data is loading, then
|
|
3
|
+
* cross-fade to the real children once it arrives.
|
|
4
|
+
*
|
|
5
|
+
* Three usage patterns, listed in order of preference:
|
|
6
|
+
*
|
|
7
|
+
* 1. **Explicit placeholder** (recommended):
|
|
8
|
+
*
|
|
9
|
+
* <SkeletonContent loading={isLoading} placeholder={<Card.Skeleton />}>
|
|
10
|
+
* <Card>{realChildren}</Card>
|
|
11
|
+
* </SkeletonContent>
|
|
12
|
+
*
|
|
13
|
+
* Renders `placeholder` verbatim while loading and `children` once loaded.
|
|
14
|
+
* Most precise and predictable — what you write is exactly what shimmers.
|
|
15
|
+
* Prefer this for any non-trivial layout.
|
|
16
|
+
*
|
|
17
|
+
* 2. **Self-describing components inside an auto-walked tree**:
|
|
18
|
+
*
|
|
19
|
+
* <SkeletonContent loading={isLoading}>
|
|
20
|
+
* <Stepper steps={steps} />
|
|
21
|
+
* <Card>...</Card>
|
|
22
|
+
* </SkeletonContent>
|
|
23
|
+
*
|
|
24
|
+
* With no `placeholder` prop, the walker substitutes each element. For
|
|
25
|
+
* library components, the walker checks for a `Component.Skeleton` static
|
|
26
|
+
* and replaces the element wholesale with it (the component author knows
|
|
27
|
+
* its shape best). For plain `<Text>`, `<Image>`, and sized `<View>`
|
|
28
|
+
* leaves the walker substitutes shape-matched `<Skeleton>` blocks based
|
|
29
|
+
* on the element's own style. Good for screen-level wrappers.
|
|
30
|
+
*
|
|
31
|
+
* 3. **Hand-authored primitive trees** (legacy / quick prototyping):
|
|
32
|
+
*
|
|
33
|
+
* <SkeletonContent loading={isLoading}>
|
|
34
|
+
* <View>
|
|
35
|
+
* <Text style={{ fontSize: 20 }}>Title</Text>
|
|
36
|
+
* <Text>Subtitle</Text>
|
|
37
|
+
* </View>
|
|
38
|
+
* </SkeletonContent>
|
|
39
|
+
*
|
|
40
|
+
* Same walker as (2) — the Text/Image/View introspection handles
|
|
41
|
+
* primitive trees that mirror the loaded layout.
|
|
42
|
+
*
|
|
43
|
+
* Cross-fade: when `loading` flips from true to false, real children fade in
|
|
44
|
+
* over `fadeDuration` ms. The first render is guarded — content that was
|
|
45
|
+
* never in a loading state does NOT fade on mount, only the actual
|
|
46
|
+
* loading→loaded transition does. Matches Chakra UI's `isLoaded` feel.
|
|
47
|
+
*/
|
|
1
48
|
import React from 'react';
|
|
2
|
-
import type { ReactNode } from 'react';
|
|
49
|
+
import type { ComponentType, ReactNode } from 'react';
|
|
3
50
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
4
51
|
import type { SkeletonSpeed, SkeletonVariant } from './Skeleton';
|
|
5
52
|
import type { SkeletonColors } from './SkeletonProvider';
|
|
6
|
-
|
|
53
|
+
/**
|
|
54
|
+
* Components that ship their own placeholder shape declare this static. The
|
|
55
|
+
* walker looks for it before falling back to primitive introspection. The
|
|
56
|
+
* function receives the original component's props so consumer-customizable
|
|
57
|
+
* dimensions (size, count, etc.) carry through to the placeholder.
|
|
58
|
+
*/
|
|
59
|
+
export type SkeletonStaticOf<P> = ComponentType<P> & {
|
|
60
|
+
Skeleton?: ComponentType<P>;
|
|
61
|
+
};
|
|
7
62
|
export interface SkeletonContentProps {
|
|
8
|
-
/** When true,
|
|
63
|
+
/** When true, render the placeholder (or walker output) instead of `children`. */
|
|
9
64
|
loading: boolean;
|
|
10
65
|
children: ReactNode;
|
|
11
|
-
/** Animation style — same as Skeleton. */
|
|
12
|
-
variant?: SkeletonVariant;
|
|
13
|
-
/** Animation speed — same as Skeleton. */
|
|
14
|
-
speed?: SkeletonSpeed;
|
|
15
66
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* Useful when children are opaque components whose props (e.g. `Button title=...`) the walker
|
|
21
|
-
* cannot inspect.
|
|
67
|
+
* Explicit placeholder JSX. When provided, the walker is bypassed entirely
|
|
68
|
+
* and `placeholder` is rendered verbatim while `loading` is true. This is
|
|
69
|
+
* the recommended path for any non-trivial layout — most precise and most
|
|
70
|
+
* predictable. Combine with `count` to repeat the shape.
|
|
22
71
|
*/
|
|
23
|
-
|
|
72
|
+
placeholder?: ReactNode;
|
|
73
|
+
/** Animation style forwarded to walker-produced `<Skeleton>` blocks. */
|
|
74
|
+
variant?: SkeletonVariant;
|
|
75
|
+
/** Animation speed forwarded to walker-produced `<Skeleton>` blocks. */
|
|
76
|
+
speed?: SkeletonSpeed;
|
|
24
77
|
/**
|
|
25
|
-
* Repeat `
|
|
26
|
-
*
|
|
27
|
-
*
|
|
78
|
+
* Repeat `placeholder` (or `children`, when no placeholder is provided)
|
|
79
|
+
* this many times while loading. Useful for list layouts where the
|
|
80
|
+
* placeholder shape should appear N times (e.g. 3 site cards, 5 list rows).
|
|
81
|
+
* Ignored when `loading` is false. Default: `1`.
|
|
28
82
|
*/
|
|
29
83
|
count?: number;
|
|
30
84
|
/**
|
|
31
|
-
* Colour override forwarded to every `<Skeleton
|
|
32
|
-
* keys can be set; missing keys fall back to provider defaults /
|
|
85
|
+
* Colour override forwarded to every walker-produced `<Skeleton>`. Either
|
|
86
|
+
* or both keys can be set; missing keys fall back to provider defaults /
|
|
87
|
+
* theme. Has no effect when `placeholder` is provided — author colours
|
|
88
|
+
* directly on the placeholder JSX instead.
|
|
33
89
|
*/
|
|
34
90
|
colors?: SkeletonColors;
|
|
91
|
+
/**
|
|
92
|
+
* Duration in ms for the load→content cross-fade. Default `300`. Set `0`
|
|
93
|
+
* to disable. Per-instance overrides the provider's `fadeDuration`.
|
|
94
|
+
*/
|
|
95
|
+
fadeDuration?: number;
|
|
35
96
|
style?: StyleProp<ViewStyle>;
|
|
36
97
|
testID?: string;
|
|
37
98
|
}
|
|
@@ -1,10 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SkeletonProvider — app-level defaults for every <Skeleton> below it.
|
|
3
|
+
*
|
|
4
|
+
* Two responsibilities:
|
|
5
|
+
* 1. Broadcasts the default variant / speed / colors / radius /
|
|
6
|
+
* placeholderCount so consumers don't repeat them per call site.
|
|
7
|
+
* 2. Mounts the shared `SkeletonClockProvider` (see SkeletonClock.tsx) so
|
|
8
|
+
* every primitive shares a single Animated.Value — synchronized shimmer
|
|
9
|
+
* across the whole subtree, one native-driver loop per provider.
|
|
10
|
+
*
|
|
11
|
+
* Also honors the OS "Reduce Motion" preference: when enabled, the clock is
|
|
12
|
+
* paused and skeletons render as static dim blocks. The detection is live —
|
|
13
|
+
* if the user toggles the setting while the app is open the skeletons stop
|
|
14
|
+
* shimmering immediately.
|
|
15
|
+
*/
|
|
1
16
|
import React from 'react';
|
|
2
17
|
import type { ReactNode } from 'react';
|
|
3
18
|
import type { SkeletonRadius, SkeletonSpeed, SkeletonVariant } from './Skeleton';
|
|
4
19
|
/**
|
|
5
|
-
* Per-instance color override for a skeleton. `background` is the resting
|
|
6
|
-
* of the placeholder; `highlight` is the moving shimmer band (or pulse
|
|
7
|
-
* Either can be omitted — missing keys fall back to the active theme.
|
|
20
|
+
* Per-instance color override for a skeleton. `background` is the resting
|
|
21
|
+
* tone of the placeholder; `highlight` is the moving shimmer band (or pulse
|
|
22
|
+
* fade). Either can be omitted — missing keys fall back to the active theme.
|
|
8
23
|
*/
|
|
9
24
|
export interface SkeletonColors {
|
|
10
25
|
background?: string;
|
|
@@ -19,14 +34,33 @@ export interface SkeletonProviderDefaults {
|
|
|
19
34
|
radius?: SkeletonRadius;
|
|
20
35
|
/** App-wide colour overrides for the shimmer base + highlight. */
|
|
21
36
|
colors?: SkeletonColors;
|
|
37
|
+
/**
|
|
38
|
+
* Fade duration in ms for the `loading → loaded` cross-fade inside
|
|
39
|
+
* `SkeletonContent`. Default `300`. Set to `0` to disable.
|
|
40
|
+
*/
|
|
41
|
+
fadeDuration?: number;
|
|
42
|
+
/**
|
|
43
|
+
* Hard override for animation. `'auto'` (default) follows the OS
|
|
44
|
+
* "Reduce Motion" preference: shimmer when off, static when on. `'always'`
|
|
45
|
+
* forces shimmer regardless. `'never'` forces static — useful for tests or
|
|
46
|
+
* battery-sensitive screens.
|
|
47
|
+
*/
|
|
48
|
+
animation?: 'auto' | 'always' | 'never';
|
|
22
49
|
}
|
|
23
50
|
export interface SkeletonProviderProps extends SkeletonProviderDefaults {
|
|
24
51
|
children: ReactNode;
|
|
25
52
|
}
|
|
26
53
|
export declare const SkeletonProvider: React.FC<SkeletonProviderProps>;
|
|
27
54
|
/**
|
|
28
|
-
* Read the current SkeletonProvider defaults. Returns an empty object when
|
|
29
|
-
* provider is mounted, so the skeleton primitives still work outside of
|
|
55
|
+
* Read the current SkeletonProvider defaults. Returns an empty object when
|
|
56
|
+
* no provider is mounted, so the skeleton primitives still work outside of
|
|
57
|
+
* one — but without a shared clock or theme-coordinated colors.
|
|
30
58
|
*/
|
|
31
59
|
export declare const useSkeletonDefaults: () => SkeletonProviderDefaults;
|
|
60
|
+
/**
|
|
61
|
+
* Subscribes to the OS "Reduce Motion" preference. Live — updates when the
|
|
62
|
+
* user toggles the setting while the app is open. Used internally by
|
|
63
|
+
* `SkeletonProvider`; exposed so consumer screens can branch on it too.
|
|
64
|
+
*/
|
|
65
|
+
export declare const useReduceMotion: () => boolean;
|
|
32
66
|
//# sourceMappingURL=SkeletonProvider.d.ts.map
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
export { Skeleton, SkeletonCircle, SkeletonText,
|
|
2
|
-
export type { SkeletonProps, SkeletonCircleProps, SkeletonTextProps,
|
|
1
|
+
export { Skeleton, SkeletonCircle, SkeletonText, default } from './Skeleton';
|
|
2
|
+
export type { SkeletonProps, SkeletonCircleProps, SkeletonTextProps, SkeletonVariant, SkeletonSpeed, SkeletonShape, SkeletonRadius, SkeletonWidth } from './Skeleton';
|
|
3
3
|
export { SkeletonContent } from './SkeletonContent';
|
|
4
|
-
export type { SkeletonContentProps,
|
|
4
|
+
export type { SkeletonContentProps, SkeletonStaticOf } from './SkeletonContent';
|
|
5
5
|
export { SkeletonList } from './SkeletonList';
|
|
6
6
|
export type { SkeletonListProps } from './SkeletonList';
|
|
7
|
-
export { SkeletonProvider, useSkeletonDefaults } from './SkeletonProvider';
|
|
7
|
+
export { SkeletonProvider, useSkeletonDefaults, useReduceMotion } from './SkeletonProvider';
|
|
8
8
|
export type { SkeletonColors, SkeletonProviderDefaults, SkeletonProviderProps } from './SkeletonProvider';
|
|
9
|
+
export { SkeletonClockProvider, useSkeletonClock } from './SkeletonClock';
|
|
10
|
+
export type { SkeletonClockValue, SkeletonClockProviderProps } from './SkeletonClock';
|
|
9
11
|
export { SkeletonSkip } from './SkeletonSkip';
|
|
10
12
|
export type { SkeletonSkipProps } from './SkeletonSkip';
|
|
11
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { View } from 'react-native';
|
|
3
|
-
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
import type { StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
4
4
|
export type SliderTone = 'primary' | 'success' | 'warning' | 'error';
|
|
5
5
|
export type SliderSize = 'sm' | 'md' | 'lg';
|
|
6
6
|
interface SliderCommonProps {
|
|
@@ -14,6 +14,17 @@ interface SliderCommonProps {
|
|
|
14
14
|
formatLabel?: (value: number) => string;
|
|
15
15
|
accessibilityLabel?: string;
|
|
16
16
|
style?: StyleProp<ViewStyle>;
|
|
17
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
18
|
+
trackStyle?: StyleProp<ViewStyle>;
|
|
19
|
+
fillStyle?: StyleProp<ViewStyle>;
|
|
20
|
+
thumbStyle?: StyleProp<ViewStyle>;
|
|
21
|
+
labelStyle?: StyleProp<TextStyle>;
|
|
22
|
+
/** Override the thumb press-scale target (default 1.1). */
|
|
23
|
+
thumbPressScale?: number;
|
|
24
|
+
/** Override the label fade duration (default theme.motion.duration.fast). */
|
|
25
|
+
labelShowDuration?: number;
|
|
26
|
+
/** Override the label final opacity when visible (default 1). */
|
|
27
|
+
labelOpacity?: number;
|
|
17
28
|
testID?: string;
|
|
18
29
|
}
|
|
19
30
|
interface SliderSingleProps extends SliderCommonProps {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { View } from 'react-native';
|
|
3
|
-
import type { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
+
import type { StyleProp, TextStyle, View as RNView, ViewStyle } from 'react-native';
|
|
4
3
|
export type StepperVariant = 'horizontal' | 'vertical';
|
|
5
4
|
export type StepperTone = 'primary' | 'success';
|
|
6
5
|
export interface StepperStep {
|
|
@@ -13,19 +12,32 @@ export interface StepperProps {
|
|
|
13
12
|
steps: StepperStep[];
|
|
14
13
|
activeStep: number;
|
|
15
14
|
onStepPress?: (index: number) => void;
|
|
15
|
+
/**
|
|
16
|
+
* Gate for tap-to-jump on completed steps. Default false — even when
|
|
17
|
+
* `onStepPress` is provided, taps are no-op unless this is true. Keeps
|
|
18
|
+
* progress-display use cases (the common case) from accidentally becoming
|
|
19
|
+
* navigable.
|
|
20
|
+
*/
|
|
21
|
+
allowStepPress?: boolean;
|
|
16
22
|
variant?: StepperVariant;
|
|
17
23
|
tone?: StepperTone;
|
|
18
24
|
/**
|
|
19
|
-
* When true, renders the component as
|
|
20
|
-
*
|
|
21
|
-
*
|
|
25
|
+
* When true, renders the component as its authored skeleton placeholder shape.
|
|
26
|
+
* The placeholder mirrors the real layout's footprint so the UI doesn't reflow
|
|
27
|
+
* when data arrives. Use this while the data driving the component is being fetched.
|
|
22
28
|
*/
|
|
23
29
|
loading?: boolean;
|
|
24
30
|
accessibilityLabel?: string;
|
|
25
31
|
style?: StyleProp<ViewStyle>;
|
|
32
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
33
|
+
circleStyle?: StyleProp<ViewStyle>;
|
|
34
|
+
labelStyle?: StyleProp<TextStyle>;
|
|
35
|
+
connectorStyle?: StyleProp<ViewStyle>;
|
|
26
36
|
testID?: string;
|
|
27
37
|
}
|
|
28
|
-
declare const Stepper: React.ForwardRefExoticComponent<StepperProps & React.RefAttributes<
|
|
38
|
+
declare const Stepper: React.ForwardRefExoticComponent<StepperProps & React.RefAttributes<RNView>> & {
|
|
39
|
+
Skeleton: React.FC<StepperProps>;
|
|
40
|
+
};
|
|
29
41
|
export { Stepper };
|
|
30
42
|
export default Stepper;
|
|
31
43
|
//# sourceMappingURL=Stepper.d.ts.map
|
|
@@ -36,6 +36,8 @@ export interface SwipeableProps {
|
|
|
36
36
|
onSwipeClose?: () => void;
|
|
37
37
|
disabled?: boolean;
|
|
38
38
|
containerStyle?: StyleProp<ViewStyle>;
|
|
39
|
+
contentStyle?: StyleProp<ViewStyle>;
|
|
40
|
+
actionStyle?: StyleProp<ViewStyle>;
|
|
39
41
|
accessibilityLabel?: string;
|
|
40
42
|
testID?: string;
|
|
41
43
|
}
|
|
@@ -19,6 +19,7 @@ export interface SwitchProps extends Omit<PressableProps, 'style' | 'children' |
|
|
|
19
19
|
*/
|
|
20
20
|
bounce?: boolean;
|
|
21
21
|
style?: StyleProp<ViewStyle>;
|
|
22
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
22
23
|
trackStyle?: StyleProp<ViewStyle>;
|
|
23
24
|
thumbStyle?: StyleProp<ViewStyle>;
|
|
24
25
|
testID?: string;
|
|
@@ -9,14 +9,16 @@
|
|
|
9
9
|
* native driver does not support layout props.
|
|
10
10
|
*/
|
|
11
11
|
import React from 'react';
|
|
12
|
-
import { View } from 'react-native';
|
|
13
|
-
import type { StyleProp, ViewStyle } from 'react-native';
|
|
12
|
+
import { Animated, View } from 'react-native';
|
|
13
|
+
import type { StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
14
14
|
export type TabsVariant = 'underline' | 'pills';
|
|
15
15
|
export type TabsAlign = 'left' | 'center';
|
|
16
16
|
export interface TabItem {
|
|
17
17
|
key: string;
|
|
18
18
|
label: string;
|
|
19
19
|
icon?: React.ReactNode;
|
|
20
|
+
/** Optional numeric/string badge — rendered inline after the label when provided. */
|
|
21
|
+
badge?: string | number;
|
|
20
22
|
disabled?: boolean;
|
|
21
23
|
}
|
|
22
24
|
export interface TabsProps {
|
|
@@ -27,7 +29,29 @@ export interface TabsProps {
|
|
|
27
29
|
scrollable?: boolean;
|
|
28
30
|
align?: TabsAlign;
|
|
29
31
|
style?: StyleProp<ViewStyle>;
|
|
32
|
+
/** Alias of `style`. Applied to the outer container View. Additive — both merge. */
|
|
33
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
30
34
|
tabStyle?: StyleProp<ViewStyle>;
|
|
35
|
+
/** Style override applied to each tab label Text. */
|
|
36
|
+
tabLabelStyle?: StyleProp<TextStyle>;
|
|
37
|
+
/** Style override applied to the per-tab icon wrapper. */
|
|
38
|
+
tabIconStyle?: StyleProp<ViewStyle>;
|
|
39
|
+
/** Style override applied to the per-tab badge wrapper. */
|
|
40
|
+
tabBadgeStyle?: StyleProp<ViewStyle>;
|
|
41
|
+
/** Style override applied to the bottom divider line (underline variant only). */
|
|
42
|
+
dividerStyle?: StyleProp<ViewStyle>;
|
|
43
|
+
/** Style override applied to the animated indicator (underline or pill). */
|
|
44
|
+
indicatorStyle?: StyleProp<ViewStyle>;
|
|
45
|
+
/**
|
|
46
|
+
* Optional fractional active-index (0..tabs.length-1). When supplied and
|
|
47
|
+
* every tab has been measured, the indicator's translateX + width track
|
|
48
|
+
* this value via interpolation instead of springing on activeKey change.
|
|
49
|
+
* Wire it to a horizontal pager's `scrollX / pageWidth` to make the
|
|
50
|
+
* indicator follow drags in real time. Press-driven `onChange` still fires
|
|
51
|
+
* the same way; consumers typically scroll the pager in response so the
|
|
52
|
+
* progress value catches up.
|
|
53
|
+
*/
|
|
54
|
+
progress?: Animated.AnimatedInterpolation<number> | Animated.Value;
|
|
31
55
|
accessibilityLabel?: string;
|
|
32
56
|
testID?: string;
|
|
33
57
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
import type { FieldBaseSize, FieldBaseVariant } from '../FieldBase';
|
|
3
4
|
export type TimeFormat = '12h' | '24h';
|
|
4
5
|
export type Period = 'AM' | 'PM';
|
|
5
6
|
export type MinuteStep = 1 | 5 | 15 | 30;
|
|
@@ -7,11 +8,23 @@ export interface TimeValue {
|
|
|
7
8
|
hour: number;
|
|
8
9
|
minute: number;
|
|
9
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* TimePicker supports two modes:
|
|
13
|
+
*
|
|
14
|
+
* 1. Controlled-modal mode — pass `visible`, `onSelect`, `onClose`. The
|
|
15
|
+
* component renders only the modal sheet and the caller owns open/close
|
|
16
|
+
* state plus its own trigger UI.
|
|
17
|
+
* 2. Trigger mode — omit `visible`. The component renders a PickerTrigger
|
|
18
|
+
* field (label / value / placeholder / chevron / clear / helper / error)
|
|
19
|
+
* and manages its own modal open state. `onSelect` is still called on
|
|
20
|
+
* confirm.
|
|
21
|
+
*/
|
|
10
22
|
export interface TimePickerProps {
|
|
11
|
-
|
|
23
|
+
/** Controlled-modal visibility. When omitted, the component enters trigger mode. */
|
|
24
|
+
visible?: boolean;
|
|
12
25
|
value?: TimeValue | null;
|
|
13
|
-
onSelect
|
|
14
|
-
onClose
|
|
26
|
+
onSelect?: (time: TimeValue) => void;
|
|
27
|
+
onClose?: () => void;
|
|
15
28
|
format?: TimeFormat;
|
|
16
29
|
minuteStep?: MinuteStep;
|
|
17
30
|
title?: string;
|
|
@@ -19,6 +32,26 @@ export interface TimePickerProps {
|
|
|
19
32
|
cancelLabel?: string;
|
|
20
33
|
testID?: string;
|
|
21
34
|
style?: StyleProp<ViewStyle>;
|
|
35
|
+
/** Outer container style applied to the bottom sheet. */
|
|
36
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
37
|
+
/** Style override for the title text container. */
|
|
38
|
+
headerLabelStyle?: StyleProp<ViewStyle>;
|
|
39
|
+
/** Style override for the cancel/confirm footer buttons. */
|
|
40
|
+
footerButtonStyle?: StyleProp<ViewStyle>;
|
|
41
|
+
label?: string;
|
|
42
|
+
placeholder?: string;
|
|
43
|
+
helperText?: string;
|
|
44
|
+
error?: string;
|
|
45
|
+
required?: boolean;
|
|
46
|
+
disabled?: boolean;
|
|
47
|
+
size?: FieldBaseSize;
|
|
48
|
+
variant?: FieldBaseVariant;
|
|
49
|
+
clearable?: boolean;
|
|
50
|
+
onClear?: () => void;
|
|
51
|
+
/** Override the trigger field's value formatting. Defaults to `format`-aware h:mm/HH:mm. */
|
|
52
|
+
formatValue?: (time: TimeValue) => string;
|
|
53
|
+
/** Style passed through to the PickerTrigger field row. */
|
|
54
|
+
triggerStyle?: StyleProp<ViewStyle>;
|
|
22
55
|
}
|
|
23
56
|
declare const TimePicker: React.FC<TimePickerProps>;
|
|
24
57
|
export { TimePicker };
|
|
@@ -18,8 +18,16 @@ export interface ToastOptions {
|
|
|
18
18
|
icon?: React.ReactNode;
|
|
19
19
|
/** Style applied to the toast container (override radius, padding, shadow per-toast). */
|
|
20
20
|
style?: StyleProp<ViewStyle>;
|
|
21
|
+
/** Alias of `style`. Applied to the toast container (merged additively). */
|
|
22
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
21
23
|
/** Style applied to the toast message Text. */
|
|
22
24
|
textStyle?: StyleProp<TextStyle>;
|
|
25
|
+
/** Style applied to the leading icon circle wrapper. */
|
|
26
|
+
iconCircleStyle?: StyleProp<ViewStyle>;
|
|
27
|
+
/** Style applied to the message Text (alias-ish of `textStyle` but kept distinct for slot symmetry). */
|
|
28
|
+
messageStyle?: StyleProp<TextStyle>;
|
|
29
|
+
/** Style applied to the trailing action Pressable. */
|
|
30
|
+
actionButtonStyle?: StyleProp<ViewStyle>;
|
|
23
31
|
}
|
|
24
32
|
export interface ToastItem extends ToastOptions {
|
|
25
33
|
id: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
+
import type { StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
3
3
|
export type TooltipPlacement = 'top' | 'bottom' | 'left' | 'right' | 'auto';
|
|
4
4
|
export type TooltipTrigger = 'longPress' | 'press' | 'manual';
|
|
5
5
|
export interface TooltipProps {
|
|
@@ -14,6 +14,12 @@ export interface TooltipProps {
|
|
|
14
14
|
showArrow?: boolean;
|
|
15
15
|
accessibilityLabel?: string;
|
|
16
16
|
style?: StyleProp<ViewStyle>;
|
|
17
|
+
/** Alias of `style`. Applied to the outer animated tooltip wrapper (merged additively). */
|
|
18
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
19
|
+
/** Style override applied to the arrow caret View. */
|
|
20
|
+
arrowStyle?: StyleProp<ViewStyle>;
|
|
21
|
+
/** Style override applied to the message Text (only when `content` is a string). */
|
|
22
|
+
messageStyle?: StyleProp<TextStyle>;
|
|
17
23
|
testID?: string;
|
|
18
24
|
}
|
|
19
25
|
declare const Tooltip: React.FC<TooltipProps>;
|
|
@@ -35,13 +35,11 @@ export type { EmptyStateProps, EmptyStateAction, EmptyStateSize } from './EmptyS
|
|
|
35
35
|
export { FormField } from './FormField';
|
|
36
36
|
export type { FormFieldProps, FormFieldLayout } from './FormField';
|
|
37
37
|
export { FloatingActionButton, FloatingActionButtonGroup } from './FloatingActionButton';
|
|
38
|
-
export type { FloatingActionButtonProps, FloatingActionButtonSize, FloatingActionButtonTone, FloatingActionButtonPosition,
|
|
38
|
+
export type { FloatingActionButtonProps, FloatingActionButtonSize, FloatingActionButtonTone, FloatingActionButtonPosition, FloatingActionButtonGroupProps, FloatingActionButtonGroupAction } from './FloatingActionButton';
|
|
39
39
|
export { ForceUpdateDialog } from './ForceUpdateDialog';
|
|
40
40
|
export type { ForceUpdateDialogProps } from './ForceUpdateDialog';
|
|
41
41
|
export { AppBar } from './AppBar';
|
|
42
42
|
export type { AppBarProps, AppBarAction, AppBarVariant } from './AppBar';
|
|
43
|
-
export { AppIcon } from './AppIcon';
|
|
44
|
-
export type { AppIconProps, IconFamily, IconSize, IconTone } from './AppIcon';
|
|
45
43
|
export { ImageGallery } from './ImageGallery';
|
|
46
44
|
export type { ImageGalleryProps, GalleryImage } from './ImageGallery';
|
|
47
45
|
export { Input } from './Input';
|
|
@@ -56,6 +54,8 @@ export { NumberInput } from './NumberInput';
|
|
|
56
54
|
export type { NumberInputProps, NumberInputRef, NumberInputSize, NumberInputVariant } from './NumberInput';
|
|
57
55
|
export { OTPInput } from './OTPInput';
|
|
58
56
|
export type { OTPInputProps, OTPInputRef, OTPInputSize } from './OTPInput';
|
|
57
|
+
export { PickerTrigger } from './PickerTrigger';
|
|
58
|
+
export type { PickerTriggerProps, PickerTriggerSize, PickerTriggerVariant } from './PickerTrigger';
|
|
59
59
|
export { ProgressBar } from './ProgressBar';
|
|
60
60
|
export type { ProgressBarProps, ProgressBarTone } from './ProgressBar';
|
|
61
61
|
export { Radio, RadioGroup } from './Radio';
|
|
@@ -70,8 +70,8 @@ export { Select } from './Select';
|
|
|
70
70
|
export type { SelectProps, SelectOption, SelectSize } from './Select';
|
|
71
71
|
export { Stepper } from './Stepper';
|
|
72
72
|
export type { StepperProps, StepperVariant, StepperStep, StepperTone } from './Stepper';
|
|
73
|
-
export { Skeleton,
|
|
74
|
-
export type {
|
|
73
|
+
export { Skeleton, SkeletonCircle, SkeletonClockProvider, SkeletonContent, SkeletonList, SkeletonProvider, SkeletonSkip, SkeletonText, useReduceMotion, useSkeletonClock, useSkeletonDefaults } from './Skeleton';
|
|
74
|
+
export type { SkeletonCircleProps, SkeletonClockProviderProps, SkeletonClockValue, SkeletonColors, SkeletonContentProps, SkeletonListProps, SkeletonProps, SkeletonProviderDefaults, SkeletonProviderProps, SkeletonRadius, SkeletonShape, SkeletonSkipProps, SkeletonSpeed, SkeletonStaticOf, SkeletonTextProps, SkeletonVariant, SkeletonWidth } from './Skeleton';
|
|
75
75
|
export { Slider } from './Slider';
|
|
76
76
|
export type { SliderProps, SliderTone, SliderSize } from './Slider';
|
|
77
77
|
export { Swipeable } from './Swipeable';
|