@webority-technologies/mobile 0.0.23 → 0.0.24
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 +5 -5
- package/lib/commonjs/components/AnimatePresence/AnimatePresence.js +69 -0
- package/lib/commonjs/components/AnimatePresence/index.js +13 -0
- package/lib/commonjs/components/AppBar/AppBar.js +9 -6
- package/lib/commonjs/components/Banner/Banner.js +12 -2
- package/lib/commonjs/components/Card/Card.js +3 -3
- package/lib/commonjs/components/Checkbox/Checkbox.js +3 -2
- package/lib/commonjs/components/Chip/Chip.js +4 -2
- package/lib/commonjs/components/DatePicker/DatePicker.js +23 -18
- package/lib/commonjs/components/DateRangePicker/DateRangePicker.js +11 -9
- package/lib/commonjs/components/Dialog/Dialog.js +4 -2
- package/lib/commonjs/components/Drawer/Drawer.js +4 -2
- package/lib/commonjs/components/FloatingActionButton/FloatingActionButton.js +10 -8
- package/lib/commonjs/components/ImageGallery/ImageGallery.js +17 -15
- package/lib/commonjs/components/ListItem/ListItem.js +4 -3
- package/lib/commonjs/components/Modal/Modal.js +4 -3
- package/lib/commonjs/components/NumberInput/NumberInput.js +7 -5
- package/lib/commonjs/components/OTPInput/OTPInput.js +7 -7
- package/lib/commonjs/components/Radio/Radio.js +2 -3
- package/lib/commonjs/components/Rating/Rating.js +4 -3
- package/lib/commonjs/components/SearchBar/SearchBar.js +7 -4
- package/lib/commonjs/components/SegmentedControl/SegmentedControl.js +4 -3
- package/lib/commonjs/components/Select/Select.js +7 -4
- package/lib/commonjs/components/Slider/Slider.js +228 -228
- package/lib/commonjs/components/Stepper/Stepper.js +6 -5
- package/lib/commonjs/components/Swipeable/Swipeable.js +8 -9
- package/lib/commonjs/components/Tabs/Tabs.js +4 -3
- package/lib/commonjs/components/TimePicker/TimePicker.js +14 -9
- package/lib/commonjs/components/index.js +121 -114
- package/lib/commonjs/utils/hapticUtils.js +11 -1
- package/lib/commonjs/utils/index.js +6 -0
- package/lib/module/components/Accordion/Accordion.js +6 -6
- package/lib/module/components/AnimatePresence/AnimatePresence.js +63 -0
- package/lib/module/components/AnimatePresence/index.js +4 -0
- package/lib/module/components/AppBar/AppBar.js +10 -7
- package/lib/module/components/Banner/Banner.js +12 -2
- package/lib/module/components/Card/Card.js +4 -4
- package/lib/module/components/Checkbox/Checkbox.js +4 -3
- package/lib/module/components/Chip/Chip.js +5 -3
- package/lib/module/components/DatePicker/DatePicker.js +24 -19
- package/lib/module/components/DateRangePicker/DateRangePicker.js +12 -10
- package/lib/module/components/Dialog/Dialog.js +5 -3
- package/lib/module/components/Drawer/Drawer.js +5 -3
- package/lib/module/components/FloatingActionButton/FloatingActionButton.js +11 -9
- package/lib/module/components/ImageGallery/ImageGallery.js +18 -16
- package/lib/module/components/ListItem/ListItem.js +5 -4
- package/lib/module/components/Modal/Modal.js +5 -4
- package/lib/module/components/NumberInput/NumberInput.js +8 -6
- package/lib/module/components/OTPInput/OTPInput.js +8 -8
- package/lib/module/components/Radio/Radio.js +3 -4
- package/lib/module/components/Rating/Rating.js +5 -4
- package/lib/module/components/SearchBar/SearchBar.js +8 -5
- package/lib/module/components/SegmentedControl/SegmentedControl.js +5 -4
- package/lib/module/components/Select/Select.js +8 -5
- package/lib/module/components/Slider/Slider.js +231 -231
- package/lib/module/components/Stepper/Stepper.js +7 -6
- package/lib/module/components/Swipeable/Swipeable.js +9 -10
- package/lib/module/components/Tabs/Tabs.js +5 -4
- package/lib/module/components/TimePicker/TimePicker.js +15 -10
- package/lib/module/components/index.js +1 -0
- package/lib/module/utils/hapticUtils.js +9 -0
- package/lib/module/utils/index.js +1 -1
- package/lib/typescript/commonjs/components/Accordion/Accordion.d.ts +3 -0
- package/lib/typescript/commonjs/components/AnimatePresence/AnimatePresence.d.ts +30 -0
- package/lib/typescript/commonjs/components/AnimatePresence/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/AppBar/AppBar.d.ts +6 -0
- package/lib/typescript/commonjs/components/Banner/Banner.d.ts +3 -0
- package/lib/typescript/commonjs/components/Card/Card.d.ts +3 -0
- package/lib/typescript/commonjs/components/Checkbox/Checkbox.d.ts +1 -0
- package/lib/typescript/commonjs/components/Chip/Chip.d.ts +3 -0
- package/lib/typescript/commonjs/components/DatePicker/DatePicker.d.ts +3 -0
- package/lib/typescript/commonjs/components/DateRangePicker/DateRangePicker.d.ts +6 -0
- package/lib/typescript/commonjs/components/Dialog/Dialog.d.ts +3 -0
- package/lib/typescript/commonjs/components/Drawer/Drawer.d.ts +3 -0
- package/lib/typescript/commonjs/components/FloatingActionButton/FloatingActionButton.d.ts +5 -0
- package/lib/typescript/commonjs/components/ImageGallery/ImageGallery.d.ts +6 -0
- package/lib/typescript/commonjs/components/ListItem/ListItem.d.ts +3 -0
- package/lib/typescript/commonjs/components/Modal/Modal.d.ts +6 -0
- package/lib/typescript/commonjs/components/NumberInput/NumberInput.d.ts +3 -0
- package/lib/typescript/commonjs/components/OTPInput/OTPInput.d.ts +6 -0
- package/lib/typescript/commonjs/components/Rating/Rating.d.ts +6 -0
- package/lib/typescript/commonjs/components/SearchBar/SearchBar.d.ts +3 -0
- package/lib/typescript/commonjs/components/SegmentedControl/SegmentedControl.d.ts +3 -0
- package/lib/typescript/commonjs/components/Select/Select.d.ts +6 -0
- package/lib/typescript/commonjs/components/Slider/Slider.d.ts +3 -0
- package/lib/typescript/commonjs/components/Stepper/Stepper.d.ts +6 -0
- package/lib/typescript/commonjs/components/Swipeable/Swipeable.d.ts +3 -0
- package/lib/typescript/commonjs/components/Tabs/Tabs.d.ts +3 -0
- package/lib/typescript/commonjs/components/TimePicker/TimePicker.d.ts +3 -0
- package/lib/typescript/commonjs/components/index.d.ts +2 -0
- package/lib/typescript/commonjs/theme/types.d.ts +2 -67
- package/lib/typescript/commonjs/utils/hapticUtils.d.ts +8 -0
- package/lib/typescript/commonjs/utils/index.d.ts +1 -1
- package/lib/typescript/module/components/Accordion/Accordion.d.ts +3 -0
- package/lib/typescript/module/components/AnimatePresence/AnimatePresence.d.ts +30 -0
- package/lib/typescript/module/components/AnimatePresence/index.d.ts +3 -0
- package/lib/typescript/module/components/AppBar/AppBar.d.ts +6 -0
- package/lib/typescript/module/components/Banner/Banner.d.ts +3 -0
- package/lib/typescript/module/components/Card/Card.d.ts +3 -0
- package/lib/typescript/module/components/Checkbox/Checkbox.d.ts +1 -0
- package/lib/typescript/module/components/Chip/Chip.d.ts +3 -0
- package/lib/typescript/module/components/DatePicker/DatePicker.d.ts +3 -0
- package/lib/typescript/module/components/DateRangePicker/DateRangePicker.d.ts +6 -0
- package/lib/typescript/module/components/Dialog/Dialog.d.ts +3 -0
- package/lib/typescript/module/components/Drawer/Drawer.d.ts +3 -0
- package/lib/typescript/module/components/FloatingActionButton/FloatingActionButton.d.ts +5 -0
- package/lib/typescript/module/components/ImageGallery/ImageGallery.d.ts +6 -0
- package/lib/typescript/module/components/ListItem/ListItem.d.ts +3 -0
- package/lib/typescript/module/components/Modal/Modal.d.ts +6 -0
- package/lib/typescript/module/components/NumberInput/NumberInput.d.ts +3 -0
- package/lib/typescript/module/components/OTPInput/OTPInput.d.ts +6 -0
- package/lib/typescript/module/components/Rating/Rating.d.ts +6 -0
- package/lib/typescript/module/components/SearchBar/SearchBar.d.ts +3 -0
- package/lib/typescript/module/components/SegmentedControl/SegmentedControl.d.ts +3 -0
- package/lib/typescript/module/components/Select/Select.d.ts +6 -0
- package/lib/typescript/module/components/Slider/Slider.d.ts +3 -0
- package/lib/typescript/module/components/Stepper/Stepper.d.ts +6 -0
- package/lib/typescript/module/components/Swipeable/Swipeable.d.ts +3 -0
- package/lib/typescript/module/components/Tabs/Tabs.d.ts +3 -0
- package/lib/typescript/module/components/TimePicker/TimePicker.d.ts +3 -0
- package/lib/typescript/module/components/index.d.ts +2 -0
- package/lib/typescript/module/theme/types.d.ts +2 -67
- package/lib/typescript/module/utils/hapticUtils.d.ts +8 -0
- package/lib/typescript/module/utils/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
3
|
+
import type { HapticType } from '../../utils';
|
|
3
4
|
export type OTPInputSize = 'sm' | 'md' | 'lg';
|
|
4
5
|
export interface OTPInputRef {
|
|
5
6
|
focus: () => void;
|
|
@@ -18,6 +19,11 @@ export interface OTPInputProps {
|
|
|
18
19
|
error?: boolean | string;
|
|
19
20
|
size?: OTPInputSize;
|
|
20
21
|
secure?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Haptic feedback for interactions. Pass false to disable; pass a HapticType
|
|
24
|
+
* to override the default.
|
|
25
|
+
*/
|
|
26
|
+
haptic?: HapticType | false;
|
|
21
27
|
accessibilityLabel?: string;
|
|
22
28
|
style?: StyleProp<ViewStyle>;
|
|
23
29
|
cellStyle?: StyleProp<ViewStyle>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { StyleProp, View as RNView, ViewStyle } from 'react-native';
|
|
3
|
+
import type { HapticType } from '../../utils/hapticUtils';
|
|
3
4
|
export type RatingTone = 'primary' | 'warning';
|
|
4
5
|
export type RatingSize = 'sm' | 'md' | 'lg' | number;
|
|
5
6
|
export interface RatingProps {
|
|
@@ -17,6 +18,11 @@ export interface RatingProps {
|
|
|
17
18
|
* when data arrives. Use this while the data driving the component is being fetched.
|
|
18
19
|
*/
|
|
19
20
|
loading?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Haptic feedback for interactions. Pass false to disable; pass a HapticType
|
|
23
|
+
* to override the default.
|
|
24
|
+
*/
|
|
25
|
+
haptic?: HapticType | false;
|
|
20
26
|
accessibilityLabel?: string;
|
|
21
27
|
style?: StyleProp<ViewStyle>;
|
|
22
28
|
containerStyle?: StyleProp<ViewStyle>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TextInput } from 'react-native';
|
|
3
3
|
import type { StyleProp, TextInputProps, ViewStyle } from 'react-native';
|
|
4
|
+
import type { HapticType } from '../../utils/hapticUtils';
|
|
4
5
|
export type SearchBarSize = 'sm' | 'md' | 'lg';
|
|
5
6
|
export type SearchBarVariant = 'filled' | 'outlined';
|
|
6
7
|
export interface SearchBarProps extends Omit<TextInputProps, 'style' | 'value' | 'onChangeText'> {
|
|
@@ -19,6 +20,8 @@ export interface SearchBarProps extends Omit<TextInputProps, 'style' | 'value' |
|
|
|
19
20
|
size?: SearchBarSize;
|
|
20
21
|
variant?: SearchBarVariant;
|
|
21
22
|
cancelLabel?: string;
|
|
23
|
+
/** Haptic feedback for interactions. Pass false to disable; pass a HapticType to override the default. */
|
|
24
|
+
haptic?: HapticType | false;
|
|
22
25
|
style?: StyleProp<ViewStyle>;
|
|
23
26
|
accessibilityLabel?: string;
|
|
24
27
|
testID?: string;
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import { View } from 'react-native';
|
|
10
10
|
import type { StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
11
|
+
import type { HapticType } from '../../utils';
|
|
11
12
|
export type SegmentedControlSize = 'sm' | 'md';
|
|
12
13
|
export type SegmentedControlTone = 'primary' | 'neutral';
|
|
13
14
|
export type SegmentValue = string | number;
|
|
@@ -25,6 +26,8 @@ export interface SegmentedControlProps {
|
|
|
25
26
|
fullWidth?: boolean;
|
|
26
27
|
disabled?: boolean;
|
|
27
28
|
tone?: SegmentedControlTone;
|
|
29
|
+
/** Haptic feedback for interactions. Pass false to disable; pass a HapticType to override the default. */
|
|
30
|
+
haptic?: HapticType | false;
|
|
28
31
|
accessibilityLabel?: string;
|
|
29
32
|
style?: StyleProp<ViewStyle>;
|
|
30
33
|
containerStyle?: StyleProp<ViewStyle>;
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import { View } from 'react-native';
|
|
10
10
|
import type { StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
11
|
+
import type { HapticType } from '../../utils';
|
|
11
12
|
export type SelectSize = 'sm' | 'md' | 'lg';
|
|
12
13
|
export type SelectValue = string | number;
|
|
13
14
|
export interface SelectOption {
|
|
@@ -38,6 +39,11 @@ interface BaseSelectProps<T = SelectOption> {
|
|
|
38
39
|
getOptionIcon?: (option: T) => React.ReactNode;
|
|
39
40
|
placeholder?: string;
|
|
40
41
|
searchable?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Haptic feedback for interactions. Pass false to disable; pass a HapticType
|
|
44
|
+
* to override the default.
|
|
45
|
+
*/
|
|
46
|
+
haptic?: HapticType | false;
|
|
41
47
|
label?: string;
|
|
42
48
|
error?: string;
|
|
43
49
|
disabled?: boolean;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { View } from 'react-native';
|
|
3
3
|
import type { StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
4
|
+
import type { HapticType } from '../../utils';
|
|
4
5
|
export type SliderTone = 'primary' | 'success' | 'warning' | 'error';
|
|
5
6
|
export type SliderSize = 'sm' | 'md' | 'lg';
|
|
6
7
|
interface SliderCommonProps {
|
|
@@ -13,6 +14,8 @@ interface SliderCommonProps {
|
|
|
13
14
|
showLabel?: boolean;
|
|
14
15
|
formatLabel?: (value: number) => string;
|
|
15
16
|
accessibilityLabel?: string;
|
|
17
|
+
/** Haptic feedback for drag/step/tap. Pass false to disable; pass a HapticType to override. */
|
|
18
|
+
haptic?: HapticType | false;
|
|
16
19
|
style?: StyleProp<ViewStyle>;
|
|
17
20
|
containerStyle?: StyleProp<ViewStyle>;
|
|
18
21
|
trackStyle?: StyleProp<ViewStyle>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { StyleProp, TextStyle, View as RNView, ViewStyle } from 'react-native';
|
|
3
|
+
import type { HapticType } from '../../utils/hapticUtils';
|
|
3
4
|
export type StepperVariant = 'horizontal' | 'vertical';
|
|
4
5
|
export type StepperTone = 'primary' | 'success';
|
|
5
6
|
export interface StepperStep {
|
|
@@ -33,6 +34,11 @@ export interface StepperProps {
|
|
|
33
34
|
circleStyle?: StyleProp<ViewStyle>;
|
|
34
35
|
labelStyle?: StyleProp<TextStyle>;
|
|
35
36
|
connectorStyle?: StyleProp<ViewStyle>;
|
|
37
|
+
/**
|
|
38
|
+
* Haptic feedback for interactions. Pass false to disable; pass a HapticType
|
|
39
|
+
* to override the default.
|
|
40
|
+
*/
|
|
41
|
+
haptic?: HapticType | false;
|
|
36
42
|
testID?: string;
|
|
37
43
|
}
|
|
38
44
|
declare const Stepper: React.ForwardRefExoticComponent<StepperProps & React.RefAttributes<RNView>> & {
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import React from 'react';
|
|
18
18
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
19
|
+
import type { HapticType } from '../../utils';
|
|
19
20
|
export type SwipeableTone = 'primary' | 'success' | 'warning' | 'error' | 'neutral';
|
|
20
21
|
export interface SwipeableAction {
|
|
21
22
|
key: string;
|
|
@@ -35,6 +36,8 @@ export interface SwipeableProps {
|
|
|
35
36
|
onSwipeOpen?: (side: 'left' | 'right') => void;
|
|
36
37
|
onSwipeClose?: () => void;
|
|
37
38
|
disabled?: boolean;
|
|
39
|
+
/** Haptic feedback for interactions. Pass false to disable; pass a HapticType to override the default. */
|
|
40
|
+
haptic?: HapticType | false;
|
|
38
41
|
containerStyle?: StyleProp<ViewStyle>;
|
|
39
42
|
contentStyle?: StyleProp<ViewStyle>;
|
|
40
43
|
actionStyle?: StyleProp<ViewStyle>;
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
import React from 'react';
|
|
12
12
|
import { Animated, View } from 'react-native';
|
|
13
13
|
import type { StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
14
|
+
import type { HapticType } from '../../utils';
|
|
14
15
|
export type TabsVariant = 'underline' | 'pills';
|
|
15
16
|
export type TabsAlign = 'left' | 'center';
|
|
16
17
|
export interface TabItem {
|
|
@@ -52,6 +53,8 @@ export interface TabsProps {
|
|
|
52
53
|
* progress value catches up.
|
|
53
54
|
*/
|
|
54
55
|
progress?: Animated.AnimatedInterpolation<number> | Animated.Value;
|
|
56
|
+
/** Haptic feedback for interactions. Pass false to disable; pass a HapticType to override the default. */
|
|
57
|
+
haptic?: HapticType | false;
|
|
55
58
|
accessibilityLabel?: string;
|
|
56
59
|
testID?: string;
|
|
57
60
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
import type { HapticType } from '../../utils/hapticUtils';
|
|
3
4
|
import type { FieldBaseSize, FieldBaseVariant } from '../FieldBase';
|
|
4
5
|
export type TimeFormat = '12h' | '24h';
|
|
5
6
|
export type Period = 'AM' | 'PM';
|
|
@@ -52,6 +53,8 @@ export interface TimePickerProps {
|
|
|
52
53
|
formatValue?: (time: TimeValue) => string;
|
|
53
54
|
/** Style passed through to the PickerTrigger field row. */
|
|
54
55
|
triggerStyle?: StyleProp<ViewStyle>;
|
|
56
|
+
/** Haptic feedback for interactions. Pass false to disable; pass a HapticType to override the default. */
|
|
57
|
+
haptic?: HapticType | false;
|
|
55
58
|
}
|
|
56
59
|
declare const TimePicker: React.FC<TimePickerProps>;
|
|
57
60
|
export { TimePicker };
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { Accordion, AccordionGroup } from './Accordion';
|
|
2
2
|
export type { AccordionProps, AccordionGroupProps, AccordionVariant } from './Accordion';
|
|
3
|
+
export { AnimatePresence } from './AnimatePresence';
|
|
4
|
+
export type { AnimatePresenceProps, PresencePreset } from './AnimatePresence';
|
|
3
5
|
export { Avatar, AvatarGroup } from './Avatar';
|
|
4
6
|
export type { AvatarProps, AvatarShape, AvatarSize, AvatarStatus, AvatarGroupProps, AvatarGroupSpacing, AvatarGroupOverflowVariant } from './Avatar';
|
|
5
7
|
export { Badge } from './Badge';
|
|
@@ -295,8 +295,6 @@ export interface DialogTokens {
|
|
|
295
295
|
iconWrapperSize: number;
|
|
296
296
|
iconWrapperBorderRadius: number;
|
|
297
297
|
actionButtonMinHeight: number;
|
|
298
|
-
/** When true, fires a selection haptic on action-button press. Library default: false. */
|
|
299
|
-
actionHaptic?: boolean;
|
|
300
298
|
}
|
|
301
299
|
export interface ToastTokens {
|
|
302
300
|
iconCircleSize: number;
|
|
@@ -337,43 +335,25 @@ export interface CheckboxSizeTokens {
|
|
|
337
335
|
}
|
|
338
336
|
export interface CheckboxTokens extends Partial<Record<ComponentSizeKey, CheckboxSizeTokens>> {
|
|
339
337
|
labelGap?: number;
|
|
340
|
-
/** When true, fires a selection haptic on press by default. Library default: false. */
|
|
341
|
-
pressHaptic?: boolean;
|
|
342
|
-
}
|
|
343
|
-
export interface ChipTokens extends Partial<Record<ComponentSizeKey, ChipSizeTokens>> {
|
|
344
|
-
/** When true, fires a selection haptic when the chip itself is pressed. Library default: false. */
|
|
345
|
-
pressHaptic?: boolean;
|
|
346
|
-
/** When true, fires a selection haptic when the close (×) button is pressed. Library default: false. */
|
|
347
|
-
closeHaptic?: boolean;
|
|
348
|
-
}
|
|
349
|
-
export interface ListItemTokens extends Partial<Record<ComponentSizeKey, ListItemSizeTokens>> {
|
|
350
|
-
/** When true, fires a selection haptic on press. Library default: false. */
|
|
351
|
-
pressHaptic?: boolean;
|
|
352
338
|
}
|
|
339
|
+
export type ChipTokens = Partial<Record<ComponentSizeKey, ChipSizeTokens>>;
|
|
340
|
+
export type ListItemTokens = Partial<Record<ComponentSizeKey, ListItemSizeTokens>>;
|
|
353
341
|
export interface RadioSizeTokens {
|
|
354
342
|
outer: number;
|
|
355
343
|
inner: number;
|
|
356
344
|
}
|
|
357
345
|
export interface RadioTokens extends Partial<Record<ComponentSizeKey, RadioSizeTokens>> {
|
|
358
346
|
labelGap?: number;
|
|
359
|
-
/** When true, fires a selection haptic on press by default. Library default: false. */
|
|
360
|
-
pressHaptic?: boolean;
|
|
361
347
|
}
|
|
362
348
|
export interface NumberInputTokens {
|
|
363
349
|
/** Milliseconds before long-press auto-repeat kicks in. Library default: 500. */
|
|
364
350
|
longPressDelayMs?: number;
|
|
365
351
|
/** Milliseconds between auto-repeated step ticks while long-pressed. Library default: 80. */
|
|
366
352
|
longPressIntervalMs?: number;
|
|
367
|
-
/** When true, fires a light impact haptic on every +/- press. Library default: false. */
|
|
368
|
-
pressHaptic?: boolean;
|
|
369
353
|
}
|
|
370
354
|
export interface OTPInputTokens extends Partial<Record<ComponentSizeKey, OTPInputSizeTokens>> {
|
|
371
355
|
/** When true, the row shakes horizontally on first error transition. Library default: false. */
|
|
372
356
|
shakeOnError?: boolean;
|
|
373
|
-
/** When true, fires an error haptic on first error transition. Library default: false. */
|
|
374
|
-
errorHaptic?: boolean;
|
|
375
|
-
/** When true, fires a selection haptic on each value change. Library default: false. */
|
|
376
|
-
selectionHaptic?: boolean;
|
|
377
357
|
}
|
|
378
358
|
export interface ProgressBarTokens {
|
|
379
359
|
/** Duration in ms of the indeterminate-loop animation cycle. Library default: 1500. */
|
|
@@ -388,8 +368,6 @@ export interface RatingTokens {
|
|
|
388
368
|
pulseOnPress?: boolean;
|
|
389
369
|
/** Peak scale of the pulse animation. Library default: 1.2. */
|
|
390
370
|
pulseScale?: number;
|
|
391
|
-
/** When true, fires a selection haptic on each rating change. Library default: false. */
|
|
392
|
-
pressHaptic?: boolean;
|
|
393
371
|
}
|
|
394
372
|
/**
|
|
395
373
|
* Per-size dimensions for the unified field box (FieldBase). Every
|
|
@@ -530,8 +508,6 @@ export interface BottomNavigationTokens {
|
|
|
530
508
|
underlineHeight?: number;
|
|
531
509
|
}
|
|
532
510
|
export interface DatePickerTokens {
|
|
533
|
-
/** Opt-in haptic feedback on month/year navigation and selection. Default: false. */
|
|
534
|
-
haptic?: boolean;
|
|
535
511
|
/** Pixel offset for the month-slide animation. Default: 32. */
|
|
536
512
|
monthSlideDistance?: number;
|
|
537
513
|
/** Outgoing month-slide animation duration (ms). Default: theme.motion.duration.fast or 140. */
|
|
@@ -564,8 +540,6 @@ export interface DatePickerTokens {
|
|
|
564
540
|
footerButtonMinHeight?: number;
|
|
565
541
|
}
|
|
566
542
|
export interface DateRangePickerTokens {
|
|
567
|
-
/** Opt-in haptic feedback on month navigation and selection. Default: false. */
|
|
568
|
-
haptic?: boolean;
|
|
569
543
|
/** Pixel offset for the month-slide animation. Default: 32. */
|
|
570
544
|
monthSlideDistance?: number;
|
|
571
545
|
/** Outgoing month-slide animation duration (ms). Default: theme.motion.duration.fast or 140. */
|
|
@@ -582,8 +556,6 @@ export interface DateRangePickerTokens {
|
|
|
582
556
|
footerButtonMinHeight?: number;
|
|
583
557
|
}
|
|
584
558
|
export interface TimePickerTokens {
|
|
585
|
-
/** Opt-in haptic feedback on wheel scroll and confirm/cancel. Default: false. */
|
|
586
|
-
haptic?: boolean;
|
|
587
559
|
/** Debounce window between scroll-haptic ticks (ms). Default: 35. */
|
|
588
560
|
hapticDebounceMs?: number;
|
|
589
561
|
/** Width of the bottom-sheet drag handle. Default: 36. */
|
|
@@ -616,14 +588,10 @@ export interface AvatarTokens {
|
|
|
616
588
|
fontWeight?: keyof TypographyScale['fontWeight'];
|
|
617
589
|
}
|
|
618
590
|
export interface AccordionTokens {
|
|
619
|
-
/** When true, fires a selection haptic on header press. Library default: false. */
|
|
620
|
-
pressHaptic?: boolean;
|
|
621
591
|
/** Vertical padding inside the `card` variant container. Library default: 4. */
|
|
622
592
|
cardPaddingVertical?: number;
|
|
623
593
|
}
|
|
624
594
|
export interface AppBarTokens {
|
|
625
|
-
/** When true, fires a selection haptic on action-button press. Library default: false. */
|
|
626
|
-
pressHaptic?: boolean;
|
|
627
595
|
/** Min-width of the left/right side action slots. Library default: 48. */
|
|
628
596
|
sideSlotMinWidth?: number;
|
|
629
597
|
/** Translate-Y distance (px, negative) the large title travels when collapsing. Library default: -20. */
|
|
@@ -664,17 +632,11 @@ export interface BannerTokens {
|
|
|
664
632
|
actionButtonPaddingVertical?: number;
|
|
665
633
|
actionButtonRadius?: number;
|
|
666
634
|
}
|
|
667
|
-
export interface CardTokens {
|
|
668
|
-
/** When true, fires a selection haptic on interactive card press. Library default: false. */
|
|
669
|
-
pressHaptic?: boolean;
|
|
670
|
-
}
|
|
671
635
|
export interface DrawerTokens {
|
|
672
636
|
/** Pixel velocity above which a fling closes the drawer. Library default: 1000. */
|
|
673
637
|
closeVelocityThreshold?: number;
|
|
674
638
|
/** Pixel drag distance before the gesture is recognised. Library default: 10. */
|
|
675
639
|
dragActivationOffset?: number;
|
|
676
|
-
/** When true, fires a selection haptic on backdrop press. Library default: false. */
|
|
677
|
-
backdropPressHaptic?: boolean;
|
|
678
640
|
}
|
|
679
641
|
export interface FloatingActionButtonTokens {
|
|
680
642
|
/** Horizontal inset from screen edge for bottomLeft/bottomRight positions. Library default: 24. */
|
|
@@ -685,8 +647,6 @@ export interface FloatingActionButtonTokens {
|
|
|
685
647
|
secondaryGap?: number;
|
|
686
648
|
/** Per-item stagger delay in ms when opening/closing the group. Library default: 50. */
|
|
687
649
|
staggerMs?: number;
|
|
688
|
-
/** When true, fires impactLight on press / open / action. Library default: false. */
|
|
689
|
-
pressHaptic?: boolean;
|
|
690
650
|
}
|
|
691
651
|
export interface ImageGalleryTokens {
|
|
692
652
|
/** Maximum pinch-zoom scale. Library default: 4. */
|
|
@@ -695,14 +655,10 @@ export interface ImageGalleryTokens {
|
|
|
695
655
|
minScale?: number;
|
|
696
656
|
/** Scale applied on double-tap at rest. Library default: 2. */
|
|
697
657
|
doubleTapScale?: number;
|
|
698
|
-
/** When true, fires haptics on open/close/swipe/double-tap. Library default: false. */
|
|
699
|
-
pressHaptic?: boolean;
|
|
700
658
|
}
|
|
701
659
|
export interface ModalTokens {
|
|
702
660
|
/** Initial scale value for the centred presentation enter animation. Library default: 0.9. */
|
|
703
661
|
scaleStartValue?: number;
|
|
704
|
-
/** When true, fires a selection haptic on backdrop dismiss. Library default: false. */
|
|
705
|
-
backdropHaptic?: boolean;
|
|
706
662
|
}
|
|
707
663
|
export interface SegmentedControlSizeTokens {
|
|
708
664
|
height?: number;
|
|
@@ -712,8 +668,6 @@ export interface SegmentedControlSizeTokens {
|
|
|
712
668
|
export interface SegmentedControlTokens extends Partial<Record<'sm' | 'md', SegmentedControlSizeTokens>> {
|
|
713
669
|
/** Padding between the track edge and the selected indicator. Library default: 2. */
|
|
714
670
|
trackPadding?: number;
|
|
715
|
-
/** When true, fires a selection haptic on segment change. Library default: false. */
|
|
716
|
-
changeHaptic?: boolean;
|
|
717
671
|
}
|
|
718
672
|
export interface SliderSizeTokens {
|
|
719
673
|
trackHeight?: number;
|
|
@@ -728,14 +682,6 @@ export interface SliderTokens extends Partial<Record<ComponentSizeKey, SliderSiz
|
|
|
728
682
|
labelShowDuration?: number;
|
|
729
683
|
/** Final opacity of the bubble label when visible. Library default: 1. */
|
|
730
684
|
labelOpacity?: number;
|
|
731
|
-
/** When true, fires a selection haptic while dragging. Library default: false. */
|
|
732
|
-
dragHaptic?: boolean;
|
|
733
|
-
/** When true, fires a selection haptic each time the value crosses a step boundary. Library default: false. */
|
|
734
|
-
stepHaptic?: boolean;
|
|
735
|
-
/** When true, fires a selection haptic on track tap. Library default: false. */
|
|
736
|
-
tapHaptic?: boolean;
|
|
737
|
-
/** When true, fires a selection haptic on accessibility increment/decrement. Library default: false. */
|
|
738
|
-
a11yHaptic?: boolean;
|
|
739
685
|
}
|
|
740
686
|
export interface StepperTokens {
|
|
741
687
|
/** Diameter of each step circle. Library default: 24. */
|
|
@@ -746,8 +692,6 @@ export interface StepperTokens {
|
|
|
746
692
|
pulseDuration?: number;
|
|
747
693
|
/** When true, the active step animates a continuous pulse ring. Library default: false. */
|
|
748
694
|
pulseAnimation?: boolean;
|
|
749
|
-
/** When true, fires a selection haptic on step press. Library default: false. */
|
|
750
|
-
pressHaptic?: boolean;
|
|
751
695
|
}
|
|
752
696
|
export interface SwipeableTokens {
|
|
753
697
|
/** Pixel distance after which a partial-swipe action commits on release. Library default: 64. */
|
|
@@ -766,12 +710,6 @@ export interface SwipeableTokens {
|
|
|
766
710
|
springStiffness?: number;
|
|
767
711
|
/** Spring mass for snap-back animation. */
|
|
768
712
|
springMass?: number;
|
|
769
|
-
/** When true, fires a notification haptic on full-swipe commit. Library default: true. */
|
|
770
|
-
fullSwipeHaptic?: boolean;
|
|
771
|
-
/** When true, fires a selection haptic on action button press. Library default: true. */
|
|
772
|
-
actionPressHaptic?: boolean;
|
|
773
|
-
/** When true, fires a selection haptic on accessibility action. Library default: true. */
|
|
774
|
-
a11yActionHaptic?: boolean;
|
|
775
713
|
}
|
|
776
714
|
export interface TabsTokens {
|
|
777
715
|
/** Horizontal padding of each tab. Library default: theme.spacing.lg. */
|
|
@@ -788,8 +726,6 @@ export interface TabsTokens {
|
|
|
788
726
|
disabledOpacity?: number;
|
|
789
727
|
/** Gap between label and inline badge. Library default: 6. */
|
|
790
728
|
badgeGap?: number;
|
|
791
|
-
/** When true, fires a selection haptic on tab press. Library default: false. */
|
|
792
|
-
hapticOnPress?: boolean;
|
|
793
729
|
}
|
|
794
730
|
export interface TooltipTokens {
|
|
795
731
|
/** Gap between trigger and tooltip card. Library default: 8. */
|
|
@@ -822,7 +758,6 @@ export interface ComponentTokens {
|
|
|
822
758
|
badge?: BadgeTokens;
|
|
823
759
|
bottomNavigation?: BottomNavigationTokens;
|
|
824
760
|
bottomSheet?: BottomSheetTokens;
|
|
825
|
-
card?: CardTokens;
|
|
826
761
|
checkbox?: CheckboxTokens;
|
|
827
762
|
chip?: ChipTokens;
|
|
828
763
|
datePicker?: DatePickerTokens;
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
export type HapticType = 'selection' | 'impactLight' | 'impactMedium' | 'impactHeavy' | 'notificationSuccess' | 'notificationWarning' | 'notificationError';
|
|
2
2
|
export declare const triggerHaptic: (type?: HapticType) => void;
|
|
3
3
|
export declare const setHapticImplementation: (impl: ((type: HapticType) => void) | null) => void;
|
|
4
|
+
/**
|
|
5
|
+
* Resolves a component's `haptic` prop to the type that should fire, or null
|
|
6
|
+
* when haptics are off. `false` disables; a `HapticType` overrides; `undefined`
|
|
7
|
+
* falls back to the component's sensible default. Pair with `triggerHaptic`:
|
|
8
|
+
* const h = resolveHaptic(haptic, 'selection');
|
|
9
|
+
* if (h) triggerHaptic(h);
|
|
10
|
+
*/
|
|
11
|
+
export declare const resolveHaptic: (haptic: HapticType | false | undefined, fallbackType: HapticType) => HapticType | null;
|
|
4
12
|
//# sourceMappingURL=hapticUtils.d.ts.map
|
|
@@ -2,7 +2,7 @@ export { ScreenDimensions, Breakpoints, Responsive, isScreenSize, isTablet } fro
|
|
|
2
2
|
export type { BreakpointKey } from './responsive';
|
|
3
3
|
export { Spacing, Padding, Margin } from './spacing';
|
|
4
4
|
export type { SpacingToken } from './spacing';
|
|
5
|
-
export { triggerHaptic, setHapticImplementation } from './hapticUtils';
|
|
5
|
+
export { triggerHaptic, setHapticImplementation, resolveHaptic } from './hapticUtils';
|
|
6
6
|
export type { HapticType } from './hapticUtils';
|
|
7
7
|
export { shadowStyle } from './shadows';
|
|
8
8
|
export { compressImage } from './imageCompression';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webority-technologies/mobile",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.24",
|
|
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",
|