@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
|
@@ -32,16 +32,18 @@ export interface ImageGalleryProps {
|
|
|
32
32
|
enablePinchZoom?: boolean;
|
|
33
33
|
onIndexChange?: (idx: number) => void;
|
|
34
34
|
/**
|
|
35
|
-
* When true, renders the component as
|
|
36
|
-
*
|
|
37
|
-
*
|
|
35
|
+
* When true, renders the component as its authored skeleton placeholder shape.
|
|
36
|
+
* The placeholder mirrors the real layout's footprint so the UI doesn't reflow
|
|
37
|
+
* when data arrives. Use this while the data driving the component is being fetched.
|
|
38
38
|
*/
|
|
39
39
|
loading?: boolean;
|
|
40
40
|
accessibilityLabel?: string;
|
|
41
41
|
containerStyle?: StyleProp<ViewStyle>;
|
|
42
42
|
testID?: string;
|
|
43
43
|
}
|
|
44
|
-
declare const ImageGallery: React.FC<ImageGalleryProps
|
|
44
|
+
declare const ImageGallery: React.FC<ImageGalleryProps> & {
|
|
45
|
+
Skeleton: React.FC<ImageGalleryProps>;
|
|
46
|
+
};
|
|
45
47
|
export { ImageGallery };
|
|
46
48
|
export default ImageGallery;
|
|
47
49
|
//# sourceMappingURL=ImageGallery.d.ts.map
|
|
@@ -43,8 +43,14 @@ export interface InputProps extends Omit<TextInputProps, 'style'> {
|
|
|
43
43
|
*/
|
|
44
44
|
parse?: (formatted: string) => string;
|
|
45
45
|
style?: StyleProp<ViewStyle>;
|
|
46
|
+
/** Style applied to the bordered field wrapper (the bit you'd colour or pad). Distinct from `style`, which targets the outermost container. */
|
|
47
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
46
48
|
inputStyle?: StyleProp<TextStyle>;
|
|
47
49
|
labelStyle?: StyleProp<TextStyle>;
|
|
50
|
+
/** Style applied to the helper/error text below the field. */
|
|
51
|
+
messageStyle?: StyleProp<TextStyle>;
|
|
52
|
+
/** Per-instance override for the field's corner radius. Wins over `theme.components.input.borderRadius` and size defaults. */
|
|
53
|
+
borderRadius?: number;
|
|
48
54
|
onFocus?: (e: FocusEvent) => void;
|
|
49
55
|
onBlur?: (e: BlurEvent) => void;
|
|
50
56
|
accessibilityLabel?: string;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { View } from 'react-native';
|
|
3
|
-
import type { GestureResponderEvent, StyleProp, ViewStyle } from 'react-native';
|
|
2
|
+
import type { GestureResponderEvent, StyleProp, TextStyle, View as RNView, ViewStyle } from 'react-native';
|
|
4
3
|
import type { SwipeableAction } from '../Swipeable';
|
|
5
4
|
export type ListItemSize = 'sm' | 'md' | 'lg';
|
|
6
5
|
export interface ListItemProps {
|
|
7
6
|
title: string;
|
|
8
7
|
/**
|
|
9
|
-
* When true, renders the component as
|
|
10
|
-
*
|
|
11
|
-
*
|
|
8
|
+
* When true, renders the component as its authored skeleton placeholder shape.
|
|
9
|
+
* The placeholder mirrors the real layout's footprint so the UI doesn't reflow
|
|
10
|
+
* when data arrives. Use this while the data driving the component is being fetched.
|
|
12
11
|
*/
|
|
13
12
|
loading?: boolean;
|
|
14
13
|
subtitle?: string;
|
|
@@ -28,9 +27,17 @@ export interface ListItemProps {
|
|
|
28
27
|
accessibilityLabel?: string;
|
|
29
28
|
accessibilityHint?: string;
|
|
30
29
|
style?: StyleProp<ViewStyle>;
|
|
30
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
31
|
+
titleStyle?: StyleProp<TextStyle>;
|
|
32
|
+
subtitleStyle?: StyleProp<TextStyle>;
|
|
33
|
+
descriptionStyle?: StyleProp<TextStyle>;
|
|
34
|
+
leftSlotStyle?: StyleProp<ViewStyle>;
|
|
35
|
+
rightSlotStyle?: StyleProp<ViewStyle>;
|
|
31
36
|
testID?: string;
|
|
32
37
|
}
|
|
33
|
-
declare const ListItem: React.ForwardRefExoticComponent<ListItemProps & React.RefAttributes<
|
|
38
|
+
declare const ListItem: React.ForwardRefExoticComponent<ListItemProps & React.RefAttributes<RNView>> & {
|
|
39
|
+
Skeleton: React.FC<ListItemProps>;
|
|
40
|
+
};
|
|
34
41
|
export { ListItem };
|
|
35
42
|
export default ListItem;
|
|
36
43
|
//# sourceMappingURL=ListItem.d.ts.map
|
|
@@ -24,7 +24,10 @@ export interface NumberInputProps {
|
|
|
24
24
|
unit?: string;
|
|
25
25
|
accessibilityLabel?: string;
|
|
26
26
|
style?: StyleProp<ViewStyle>;
|
|
27
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
27
28
|
inputStyle?: StyleProp<TextStyle>;
|
|
29
|
+
buttonStyle?: StyleProp<ViewStyle>;
|
|
30
|
+
unitStyle?: StyleProp<TextStyle>;
|
|
28
31
|
labelStyle?: StyleProp<TextStyle>;
|
|
29
32
|
textInputProps?: Omit<TextInputProps, 'value' | 'onChangeText' | 'onBlur' | 'keyboardType' | 'editable'>;
|
|
30
33
|
testID?: string;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PickerTrigger — the tappable input field that opens a modal picker.
|
|
3
|
+
*
|
|
4
|
+
* Standalone read-only field built on FieldBase, used by DatePicker,
|
|
5
|
+
* TimePicker and DateRangePicker (and any consumer-built picker) to render
|
|
6
|
+
* the closed-state row that matches Input / Select pixel-for-pixel.
|
|
7
|
+
*
|
|
8
|
+
* The component is purely visual + interactive — it does not own picker
|
|
9
|
+
* state. Consumers either:
|
|
10
|
+
* - Use the built-in trigger mode on a picker, which composes this
|
|
11
|
+
* internally and manages its own open/close.
|
|
12
|
+
* - Render PickerTrigger themselves alongside a controlled picker.
|
|
13
|
+
*/
|
|
14
|
+
import React from 'react';
|
|
15
|
+
import { View } from 'react-native';
|
|
16
|
+
import type { StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
17
|
+
import type { FieldBaseSize, FieldBaseVariant } from '../FieldBase';
|
|
18
|
+
export type PickerTriggerSize = FieldBaseSize;
|
|
19
|
+
export type PickerTriggerVariant = FieldBaseVariant;
|
|
20
|
+
export interface PickerTriggerProps {
|
|
21
|
+
/** The currently selected value rendered as the trigger's primary text. */
|
|
22
|
+
value?: string;
|
|
23
|
+
/** Shown when `value` is empty. Falls back to "Select…". */
|
|
24
|
+
placeholder?: string;
|
|
25
|
+
/** Static label rendered above the field. */
|
|
26
|
+
label?: string;
|
|
27
|
+
/** Helper text shown below the field. Hidden when `error` is set. */
|
|
28
|
+
helperText?: string;
|
|
29
|
+
/** Error message shown below the field (and red-borders the field). */
|
|
30
|
+
error?: string;
|
|
31
|
+
/** Adds a red asterisk after the label. */
|
|
32
|
+
required?: boolean;
|
|
33
|
+
/** Tap handler — typically opens the modal picker. */
|
|
34
|
+
onPress: () => void;
|
|
35
|
+
/** Render a clear (×) affordance when `value` is non-empty. */
|
|
36
|
+
clearable?: boolean;
|
|
37
|
+
/** Called when the clear affordance is pressed. */
|
|
38
|
+
onClear?: () => void;
|
|
39
|
+
/** Leading icon slot (e.g. calendar / clock). */
|
|
40
|
+
leadingIcon?: React.ReactNode;
|
|
41
|
+
/** Trailing slot — defaults to a chevron when unset. Pass `null` to suppress. */
|
|
42
|
+
trailing?: React.ReactNode;
|
|
43
|
+
disabled?: boolean;
|
|
44
|
+
size?: PickerTriggerSize;
|
|
45
|
+
variant?: PickerTriggerVariant;
|
|
46
|
+
style?: StyleProp<ViewStyle>;
|
|
47
|
+
triggerStyle?: StyleProp<ViewStyle>;
|
|
48
|
+
valueStyle?: StyleProp<TextStyle>;
|
|
49
|
+
labelStyle?: StyleProp<TextStyle>;
|
|
50
|
+
messageStyle?: StyleProp<TextStyle>;
|
|
51
|
+
accessibilityLabel?: string;
|
|
52
|
+
testID?: string;
|
|
53
|
+
}
|
|
54
|
+
declare const PickerTrigger: React.ForwardRefExoticComponent<PickerTriggerProps & React.RefAttributes<View>>;
|
|
55
|
+
export { PickerTrigger };
|
|
56
|
+
export default PickerTrigger;
|
|
57
|
+
//# sourceMappingURL=PickerTrigger.d.ts.map
|
|
@@ -23,7 +23,10 @@ export interface RadioProps extends Omit<PressableProps, 'style' | 'children' |
|
|
|
23
23
|
accessibilityLabel?: string;
|
|
24
24
|
haptic?: HapticType | false;
|
|
25
25
|
style?: StyleProp<ViewStyle>;
|
|
26
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
26
27
|
circleStyle?: StyleProp<ViewStyle>;
|
|
28
|
+
dotStyle?: StyleProp<ViewStyle>;
|
|
29
|
+
labelStyle?: StyleProp<ViewStyle>;
|
|
27
30
|
testID?: string;
|
|
28
31
|
}
|
|
29
32
|
declare const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<View>>;
|
|
@@ -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, View as RNView, ViewStyle } from 'react-native';
|
|
4
3
|
export type RatingTone = 'primary' | 'warning';
|
|
5
4
|
export type RatingSize = 'sm' | 'md' | 'lg' | number;
|
|
6
5
|
export interface RatingProps {
|
|
@@ -13,16 +12,20 @@ export interface RatingProps {
|
|
|
13
12
|
tone?: RatingTone;
|
|
14
13
|
label?: string;
|
|
15
14
|
/**
|
|
16
|
-
* When true, renders the component as
|
|
17
|
-
*
|
|
18
|
-
*
|
|
15
|
+
* When true, renders the component as its authored skeleton placeholder shape.
|
|
16
|
+
* The placeholder mirrors the real layout's footprint so the UI doesn't reflow
|
|
17
|
+
* when data arrives. Use this while the data driving the component is being fetched.
|
|
19
18
|
*/
|
|
20
19
|
loading?: boolean;
|
|
21
20
|
accessibilityLabel?: string;
|
|
22
21
|
style?: StyleProp<ViewStyle>;
|
|
22
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
23
|
+
starContainerStyle?: StyleProp<ViewStyle>;
|
|
23
24
|
testID?: string;
|
|
24
25
|
}
|
|
25
|
-
declare const Rating: React.ForwardRefExoticComponent<RatingProps & React.RefAttributes<
|
|
26
|
+
declare const Rating: React.ForwardRefExoticComponent<RatingProps & React.RefAttributes<RNView>> & {
|
|
27
|
+
Skeleton: React.FC<RatingProps>;
|
|
28
|
+
};
|
|
26
29
|
export { Rating };
|
|
27
30
|
export default Rating;
|
|
28
31
|
//# sourceMappingURL=Rating.d.ts.map
|
|
@@ -26,8 +26,11 @@ export interface SegmentedControlProps {
|
|
|
26
26
|
tone?: SegmentedControlTone;
|
|
27
27
|
accessibilityLabel?: string;
|
|
28
28
|
style?: StyleProp<ViewStyle>;
|
|
29
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
29
30
|
segmentStyle?: StyleProp<ViewStyle>;
|
|
31
|
+
selectedIndicatorStyle?: StyleProp<ViewStyle>;
|
|
30
32
|
textStyle?: StyleProp<TextStyle>;
|
|
33
|
+
labelStyle?: StyleProp<TextStyle>;
|
|
31
34
|
testID?: string;
|
|
32
35
|
}
|
|
33
36
|
declare const SegmentedControl: React.ForwardRefExoticComponent<SegmentedControlProps & React.RefAttributes<View>>;
|
|
@@ -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 {
|