@webority-technologies/mobile 0.0.24 → 0.0.25
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/Autocomplete/Autocomplete.js +204 -0
- package/lib/commonjs/components/Autocomplete/index.js +13 -0
- package/lib/commonjs/components/BottomNavigation/BottomNavigation.js +1 -1
- package/lib/commonjs/components/Confetti/Confetti.js +170 -0
- package/lib/commonjs/components/Confetti/index.js +13 -0
- package/lib/commonjs/components/FieldBase/FieldBase.js +0 -2
- package/lib/commonjs/components/IconButton/IconButton.js +176 -0
- package/lib/commonjs/components/IconButton/index.js +13 -0
- package/lib/commonjs/components/Modal/Modal.js +0 -1
- package/lib/commonjs/components/ProgressBar/ProgressBar.js +32 -4
- package/lib/commonjs/components/SlideToConfirm/SlideToConfirm.js +224 -0
- package/lib/commonjs/components/SlideToConfirm/index.js +13 -0
- package/lib/commonjs/components/index.js +142 -114
- package/lib/commonjs/hooks/usePressAnimation.js +0 -1
- package/lib/module/components/Autocomplete/Autocomplete.js +199 -0
- package/lib/module/components/Autocomplete/index.js +4 -0
- package/lib/module/components/BottomNavigation/BottomNavigation.js +1 -1
- package/lib/module/components/Confetti/Confetti.js +166 -0
- package/lib/module/components/Confetti/index.js +4 -0
- package/lib/module/components/FieldBase/FieldBase.js +0 -2
- package/lib/module/components/IconButton/IconButton.js +172 -0
- package/lib/module/components/IconButton/index.js +4 -0
- package/lib/module/components/Modal/Modal.js +0 -1
- package/lib/module/components/ProgressBar/ProgressBar.js +33 -5
- package/lib/module/components/SlideToConfirm/SlideToConfirm.js +220 -0
- package/lib/module/components/SlideToConfirm/index.js +4 -0
- package/lib/module/components/index.js +4 -0
- package/lib/module/hooks/usePressAnimation.js +0 -1
- package/lib/typescript/commonjs/components/Autocomplete/Autocomplete.d.ts +53 -0
- package/lib/typescript/commonjs/components/Autocomplete/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/Confetti/Confetti.d.ts +41 -0
- package/lib/typescript/commonjs/components/Confetti/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/IconButton/IconButton.d.ts +34 -0
- package/lib/typescript/commonjs/components/IconButton/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/ProgressBar/ProgressBar.d.ts +12 -0
- package/lib/typescript/commonjs/components/ProgressBar/index.d.ts +1 -1
- package/lib/typescript/commonjs/components/SlideToConfirm/SlideToConfirm.d.ts +34 -0
- package/lib/typescript/commonjs/components/SlideToConfirm/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/index.d.ts +9 -1
- package/lib/typescript/commonjs/hooks/usePressAnimation.d.ts +1 -2
- package/lib/typescript/module/components/Autocomplete/Autocomplete.d.ts +53 -0
- package/lib/typescript/module/components/Autocomplete/index.d.ts +3 -0
- package/lib/typescript/module/components/Confetti/Confetti.d.ts +41 -0
- package/lib/typescript/module/components/Confetti/index.d.ts +3 -0
- package/lib/typescript/module/components/IconButton/IconButton.d.ts +34 -0
- package/lib/typescript/module/components/IconButton/index.d.ts +3 -0
- package/lib/typescript/module/components/ProgressBar/ProgressBar.d.ts +12 -0
- package/lib/typescript/module/components/ProgressBar/index.d.ts +1 -1
- package/lib/typescript/module/components/SlideToConfirm/SlideToConfirm.d.ts +34 -0
- package/lib/typescript/module/components/SlideToConfirm/index.d.ts +3 -0
- package/lib/typescript/module/components/index.d.ts +9 -1
- package/lib/typescript/module/hooks/usePressAnimation.d.ts +1 -2
- package/package.json +1 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { GestureResponderEvent, StyleProp, View as RNView, ViewStyle } from 'react-native';
|
|
3
|
+
import type { HapticType } from '../../utils';
|
|
4
|
+
export type IconButtonTone = 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'neutral';
|
|
5
|
+
export type IconButtonVariant = 'solid' | 'soft' | 'outline' | 'ghost';
|
|
6
|
+
export type IconButtonSize = 'sm' | 'md' | 'lg';
|
|
7
|
+
export type IconButtonShape = 'circle' | 'rounded';
|
|
8
|
+
interface IconRenderProps {
|
|
9
|
+
color: string;
|
|
10
|
+
size: number;
|
|
11
|
+
}
|
|
12
|
+
export interface IconButtonProps {
|
|
13
|
+
/** Icon node, or a render fn `({ color, size }) => node` so IconButton can theme + size it. */
|
|
14
|
+
icon: React.ReactNode | ((props: IconRenderProps) => React.ReactNode);
|
|
15
|
+
onPress?: (e: GestureResponderEvent) => void;
|
|
16
|
+
/** Required — icon-only controls need an accessible name. */
|
|
17
|
+
accessibilityLabel: string;
|
|
18
|
+
tone?: IconButtonTone;
|
|
19
|
+
variant?: IconButtonVariant;
|
|
20
|
+
size?: IconButtonSize;
|
|
21
|
+
shape?: IconButtonShape;
|
|
22
|
+
/** Selected/active — renders filled (solid) regardless of `variant` (e.g. an active nav tile). */
|
|
23
|
+
active?: boolean;
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
loading?: boolean;
|
|
26
|
+
/** Press haptic. Default `'selection'`. */
|
|
27
|
+
haptic?: HapticType | false;
|
|
28
|
+
style?: StyleProp<ViewStyle>;
|
|
29
|
+
testID?: string;
|
|
30
|
+
}
|
|
31
|
+
declare const IconButton: React.ForwardRefExoticComponent<IconButtonProps & React.RefAttributes<RNView>>;
|
|
32
|
+
export { IconButton };
|
|
33
|
+
export default IconButton;
|
|
34
|
+
//# sourceMappingURL=IconButton.d.ts.map
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { View } from 'react-native';
|
|
3
3
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
4
|
+
import type { GradientDefinition } from '../../theme/types';
|
|
4
5
|
export type ProgressBarTone = 'primary' | 'success' | 'warning' | 'error';
|
|
6
|
+
export interface ProgressBarSegment {
|
|
7
|
+
/** Fraction of the full track (0–1). */
|
|
8
|
+
value: number;
|
|
9
|
+
/** Explicit colour; falls back to `tone`. */
|
|
10
|
+
color?: string;
|
|
11
|
+
tone?: ProgressBarTone;
|
|
12
|
+
}
|
|
5
13
|
export interface ProgressBarProps {
|
|
6
14
|
progress?: number;
|
|
7
15
|
indeterminate?: boolean;
|
|
@@ -10,6 +18,10 @@ export interface ProgressBarProps {
|
|
|
10
18
|
tone?: ProgressBarTone;
|
|
11
19
|
trackColor?: string;
|
|
12
20
|
barColor?: string;
|
|
21
|
+
/** Gradient fill for the determinate bar — a `GradientDefinition` or a theme gradient token name. */
|
|
22
|
+
gradient?: GradientDefinition | string;
|
|
23
|
+
/** Render a multi-colour breakdown bar (usage split) instead of a single progress fill. */
|
|
24
|
+
segments?: ProgressBarSegment[];
|
|
13
25
|
animated?: boolean;
|
|
14
26
|
style?: StyleProp<ViewStyle>;
|
|
15
27
|
containerStyle?: StyleProp<ViewStyle>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import type { StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
4
|
+
import type { HapticType } from '../../utils';
|
|
5
|
+
export type SlideToConfirmTone = 'primary' | 'success' | 'warning' | 'error';
|
|
6
|
+
export type SlideToConfirmSize = 'sm' | 'md' | 'lg';
|
|
7
|
+
export interface SlideToConfirmProps {
|
|
8
|
+
/** Fired once the handle is dragged past the threshold. */
|
|
9
|
+
onConfirm: () => void;
|
|
10
|
+
/** Resting label (centred). Default "Slide to confirm". */
|
|
11
|
+
label?: string;
|
|
12
|
+
/** Label shown after confirming. Default "Confirmed". */
|
|
13
|
+
confirmedLabel?: string;
|
|
14
|
+
tone?: SlideToConfirmTone;
|
|
15
|
+
size?: SlideToConfirmSize;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
/** Fraction of the track (0–1) the handle must cross to confirm. Default 0.9. */
|
|
18
|
+
threshold?: number;
|
|
19
|
+
/** Auto-reset this many ms after confirm, or `false` to stay confirmed. Default `false`. */
|
|
20
|
+
resetAfter?: number | false;
|
|
21
|
+
/** Haptic on confirm. Pass `false` to disable or a `HapticType` to override. Default `'notificationSuccess'`. */
|
|
22
|
+
haptic?: HapticType | false;
|
|
23
|
+
/** Handle glyph. Defaults to a right-chevron. */
|
|
24
|
+
icon?: React.ReactNode;
|
|
25
|
+
style?: StyleProp<ViewStyle>;
|
|
26
|
+
trackStyle?: StyleProp<ViewStyle>;
|
|
27
|
+
handleStyle?: StyleProp<ViewStyle>;
|
|
28
|
+
labelStyle?: StyleProp<TextStyle>;
|
|
29
|
+
testID?: string;
|
|
30
|
+
}
|
|
31
|
+
declare const SlideToConfirm: React.ForwardRefExoticComponent<SlideToConfirmProps & React.RefAttributes<View>>;
|
|
32
|
+
export { SlideToConfirm };
|
|
33
|
+
export default SlideToConfirm;
|
|
34
|
+
//# sourceMappingURL=SlideToConfirm.d.ts.map
|
|
@@ -2,6 +2,8 @@ export { Accordion, AccordionGroup } from './Accordion';
|
|
|
2
2
|
export type { AccordionProps, AccordionGroupProps, AccordionVariant } from './Accordion';
|
|
3
3
|
export { AnimatePresence } from './AnimatePresence';
|
|
4
4
|
export type { AnimatePresenceProps, PresencePreset } from './AnimatePresence';
|
|
5
|
+
export { Autocomplete } from './Autocomplete';
|
|
6
|
+
export type { AutocompleteProps } from './Autocomplete';
|
|
5
7
|
export { Avatar, AvatarGroup } from './Avatar';
|
|
6
8
|
export type { AvatarProps, AvatarShape, AvatarSize, AvatarStatus, AvatarGroupProps, AvatarGroupSpacing, AvatarGroupOverflowVariant } from './Avatar';
|
|
7
9
|
export { Badge } from './Badge';
|
|
@@ -14,6 +16,8 @@ export { BottomSheet, useBottomSheet } from './BottomSheet';
|
|
|
14
16
|
export type { BottomSheetContextValue, BottomSheetProps, BottomSheetRef } from './BottomSheet';
|
|
15
17
|
export { Button } from './Button';
|
|
16
18
|
export type { ButtonProps, ButtonVariant, ButtonTone, ButtonSize } from './Button';
|
|
19
|
+
export { IconButton } from './IconButton';
|
|
20
|
+
export type { IconButtonProps, IconButtonTone, IconButtonVariant, IconButtonSize, IconButtonShape } from './IconButton';
|
|
17
21
|
export { Box, Stack, Row, Spacer } from './Box';
|
|
18
22
|
export type { BoxProps, StackProps, RowProps, SpacerProps } from './Box';
|
|
19
23
|
export { Text } from './Text';
|
|
@@ -30,6 +34,8 @@ export { Checkbox } from './Checkbox';
|
|
|
30
34
|
export type { CheckboxProps, CheckboxSize, CheckboxTone } from './Checkbox';
|
|
31
35
|
export { Chip } from './Chip';
|
|
32
36
|
export type { ChipProps, ChipSize, ChipTone, ChipVariant } from './Chip';
|
|
37
|
+
export { Confetti } from './Confetti';
|
|
38
|
+
export type { ConfettiProps, ConfettiHandle, ConfettiMode, ConfettiOrigin } from './Confetti';
|
|
33
39
|
export { DatePicker } from './DatePicker';
|
|
34
40
|
export type { DatePickerProps, DatePickerMode } from './DatePicker';
|
|
35
41
|
export { DateRangePicker } from './DateRangePicker';
|
|
@@ -67,7 +73,7 @@ export type { OTPInputProps, OTPInputRef, OTPInputSize } from './OTPInput';
|
|
|
67
73
|
export { PickerTrigger } from './PickerTrigger';
|
|
68
74
|
export type { PickerTriggerProps, PickerTriggerSize, PickerTriggerVariant } from './PickerTrigger';
|
|
69
75
|
export { ProgressBar } from './ProgressBar';
|
|
70
|
-
export type { ProgressBarProps, ProgressBarTone } from './ProgressBar';
|
|
76
|
+
export type { ProgressBarProps, ProgressBarTone, ProgressBarSegment } from './ProgressBar';
|
|
71
77
|
export { Radio, RadioGroup } from './Radio';
|
|
72
78
|
export type { RadioProps, RadioGroupProps, RadioSize, RadioTone } from './Radio';
|
|
73
79
|
export { Rating } from './Rating';
|
|
@@ -82,6 +88,8 @@ export { Stepper } from './Stepper';
|
|
|
82
88
|
export type { StepperProps, StepperVariant, StepperStep, StepperTone } from './Stepper';
|
|
83
89
|
export { Skeleton, SkeletonCircle, SkeletonClockProvider, SkeletonContent, SkeletonList, SkeletonProvider, SkeletonSkip, SkeletonText, useReduceMotion, useSkeletonClock, useSkeletonDefaults } from './Skeleton';
|
|
84
90
|
export type { SkeletonCircleProps, SkeletonClockProviderProps, SkeletonClockValue, SkeletonColors, SkeletonContentProps, SkeletonListProps, SkeletonProps, SkeletonProviderDefaults, SkeletonProviderProps, SkeletonRadius, SkeletonShape, SkeletonSkipProps, SkeletonSpeed, SkeletonStaticOf, SkeletonTextProps, SkeletonVariant, SkeletonWidth } from './Skeleton';
|
|
91
|
+
export { SlideToConfirm } from './SlideToConfirm';
|
|
92
|
+
export type { SlideToConfirmProps, SlideToConfirmTone, SlideToConfirmSize } from './SlideToConfirm';
|
|
85
93
|
export { Slider } from './Slider';
|
|
86
94
|
export type { SliderProps, SliderTone, SliderSize } from './Slider';
|
|
87
95
|
export { Swipeable } from './Swipeable';
|
|
@@ -2,7 +2,6 @@ import { Animated } from 'react-native';
|
|
|
2
2
|
export interface UsePressAnimationOptions {
|
|
3
3
|
scaleTo?: number;
|
|
4
4
|
pressDuration?: number;
|
|
5
|
-
releaseDuration?: number;
|
|
6
5
|
enabled?: boolean;
|
|
7
6
|
}
|
|
8
7
|
export interface UsePressAnimationResult {
|
|
@@ -10,5 +9,5 @@ export interface UsePressAnimationResult {
|
|
|
10
9
|
pressIn: () => void;
|
|
11
10
|
pressOut: () => void;
|
|
12
11
|
}
|
|
13
|
-
export declare const usePressAnimation: ({ scaleTo, pressDuration,
|
|
12
|
+
export declare const usePressAnimation: ({ scaleTo, pressDuration, enabled }?: UsePressAnimationOptions) => UsePressAnimationResult;
|
|
14
13
|
//# sourceMappingURL=usePressAnimation.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webority-technologies/mobile",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.25",
|
|
4
4
|
"description": "Beautiful, animated, accessible React Native components plus API/auth/logging/network/storage utilities for Webority projects.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|