@webority-technologies/mobile 0.0.22 → 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 +9 -7
- 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/Avatar/Avatar.js +4 -2
- package/lib/commonjs/components/Badge/Badge.js +5 -5
- package/lib/commonjs/components/Banner/Banner.js +20 -6
- package/lib/commonjs/components/BottomNavigation/BottomNavigation.js +6 -4
- package/lib/commonjs/components/BottomSheet/BottomSheet.js +8 -9
- package/lib/commonjs/components/Box/Box.js +162 -0
- package/lib/commonjs/components/Box/index.js +37 -0
- package/lib/commonjs/components/Button/Button.js +7 -7
- package/lib/commonjs/components/Card/Card.js +3 -3
- package/lib/commonjs/components/Carousel/Carousel.js +4 -2
- package/lib/commonjs/components/Checkbox/Checkbox.js +17 -7
- package/lib/commonjs/components/Chip/Chip.js +4 -2
- package/lib/commonjs/components/DatePicker/DatePicker.js +31 -24
- package/lib/commonjs/components/DateRangePicker/DateRangePicker.js +16 -11
- package/lib/commonjs/components/Dialog/Dialog.js +6 -4
- package/lib/commonjs/components/Drawer/Drawer.js +4 -2
- package/lib/commonjs/components/FieldBase/FieldBase.js +8 -4
- package/lib/commonjs/components/FloatingActionButton/FloatingActionButton.js +23 -13
- package/lib/commonjs/components/FormField/FormField.js +61 -25
- package/lib/commonjs/components/ImageGallery/ImageGallery.js +17 -15
- package/lib/commonjs/components/Input/Input.js +41 -29
- package/lib/commonjs/components/KeyboardAwareScrollView/KeyboardAwareScrollView.js +102 -0
- package/lib/commonjs/components/KeyboardAwareScrollView/index.js +13 -0
- package/lib/commonjs/components/KeyboardToolbar/KeyboardToolbar.js +130 -0
- package/lib/commonjs/components/KeyboardToolbar/index.js +13 -0
- package/lib/commonjs/components/ListItem/ListItem.js +4 -3
- package/lib/commonjs/components/Modal/Modal.js +21 -9
- package/lib/commonjs/components/NumberInput/NumberInput.js +38 -29
- package/lib/commonjs/components/OTPInput/OTPInput.js +37 -22
- package/lib/commonjs/components/Radio/Radio.js +9 -8
- package/lib/commonjs/components/Radio/RadioGroup.js +10 -3
- package/lib/commonjs/components/Rating/Rating.js +4 -3
- package/lib/commonjs/components/SearchBar/SearchBar.js +11 -6
- package/lib/commonjs/components/SegmentedControl/SegmentedControl.js +23 -12
- package/lib/commonjs/components/Select/Select.js +40 -36
- package/lib/commonjs/components/Skeleton/SkeletonContent.js +5 -2
- package/lib/commonjs/components/Slider/Slider.js +241 -225
- package/lib/commonjs/components/Spinner/Spinner.js +5 -5
- package/lib/commonjs/components/Stepper/Stepper.js +6 -5
- package/lib/commonjs/components/Swipeable/Swipeable.js +8 -9
- package/lib/commonjs/components/Switch/Switch.js +29 -16
- package/lib/commonjs/components/Tabs/Tabs.js +8 -5
- package/lib/commonjs/components/Text/Text.js +142 -0
- package/lib/commonjs/components/Text/index.js +13 -0
- package/lib/commonjs/components/TimePicker/TimePicker.js +23 -15
- package/lib/commonjs/components/Toast/Toast.js +22 -10
- package/lib/commonjs/components/Tooltip/Tooltip.js +6 -2
- package/lib/commonjs/components/index.js +156 -103
- package/lib/commonjs/form/FormContext.js +40 -0
- package/lib/commonjs/form/index.js +68 -0
- package/lib/commonjs/form/path.js +79 -0
- package/lib/commonjs/form/rules.js +67 -0
- package/lib/commonjs/form/types.js +2 -0
- package/lib/commonjs/form/useField.js +54 -0
- package/lib/commonjs/form/useForm.js +316 -0
- package/lib/commonjs/hooks/index.js +14 -0
- package/lib/commonjs/hooks/useControllableState.js +30 -0
- package/lib/commonjs/hooks/useReducedMotion.js +31 -0
- package/lib/commonjs/index.js +96 -11
- package/lib/commonjs/theme/ThemeContext.js +30 -2
- package/lib/commonjs/theme/tokens.js +12 -0
- package/lib/commonjs/utils/hapticUtils.js +11 -1
- package/lib/commonjs/utils/index.js +6 -0
- package/lib/module/components/Accordion/Accordion.js +10 -8
- 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/Avatar/Avatar.js +4 -2
- package/lib/module/components/Badge/Badge.js +5 -5
- package/lib/module/components/Banner/Banner.js +20 -6
- package/lib/module/components/BottomNavigation/BottomNavigation.js +6 -4
- package/lib/module/components/BottomSheet/BottomSheet.js +8 -9
- package/lib/module/components/Box/Box.js +156 -0
- package/lib/module/components/Box/index.js +4 -0
- package/lib/module/components/Button/Button.js +7 -7
- package/lib/module/components/Card/Card.js +4 -4
- package/lib/module/components/Carousel/Carousel.js +4 -2
- package/lib/module/components/Checkbox/Checkbox.js +18 -8
- package/lib/module/components/Chip/Chip.js +5 -3
- package/lib/module/components/DatePicker/DatePicker.js +32 -25
- package/lib/module/components/DateRangePicker/DateRangePicker.js +17 -12
- package/lib/module/components/Dialog/Dialog.js +7 -5
- package/lib/module/components/Drawer/Drawer.js +5 -3
- package/lib/module/components/FieldBase/FieldBase.js +8 -4
- package/lib/module/components/FloatingActionButton/FloatingActionButton.js +24 -14
- package/lib/module/components/FormField/FormField.js +62 -26
- package/lib/module/components/ImageGallery/ImageGallery.js +18 -16
- package/lib/module/components/Input/Input.js +41 -29
- package/lib/module/components/KeyboardAwareScrollView/KeyboardAwareScrollView.js +98 -0
- package/lib/module/components/KeyboardAwareScrollView/index.js +4 -0
- package/lib/module/components/KeyboardToolbar/KeyboardToolbar.js +125 -0
- package/lib/module/components/KeyboardToolbar/index.js +4 -0
- package/lib/module/components/ListItem/ListItem.js +5 -4
- package/lib/module/components/Modal/Modal.js +22 -10
- package/lib/module/components/NumberInput/NumberInput.js +36 -27
- package/lib/module/components/OTPInput/OTPInput.js +37 -22
- package/lib/module/components/Radio/Radio.js +10 -9
- package/lib/module/components/Radio/RadioGroup.js +10 -3
- package/lib/module/components/Rating/Rating.js +5 -4
- package/lib/module/components/SearchBar/SearchBar.js +12 -7
- package/lib/module/components/SegmentedControl/SegmentedControl.js +24 -13
- package/lib/module/components/Select/Select.js +41 -37
- package/lib/module/components/Skeleton/SkeletonContent.js +5 -2
- package/lib/module/components/Slider/Slider.js +244 -228
- package/lib/module/components/Spinner/Spinner.js +5 -5
- package/lib/module/components/Stepper/Stepper.js +7 -6
- package/lib/module/components/Swipeable/Swipeable.js +9 -10
- package/lib/module/components/Switch/Switch.js +29 -16
- package/lib/module/components/Tabs/Tabs.js +9 -6
- package/lib/module/components/Text/Text.js +138 -0
- package/lib/module/components/Text/index.js +4 -0
- package/lib/module/components/TimePicker/TimePicker.js +24 -16
- package/lib/module/components/Toast/Toast.js +22 -10
- package/lib/module/components/Tooltip/Tooltip.js +6 -2
- package/lib/module/components/index.js +5 -0
- package/lib/module/form/FormContext.js +32 -0
- package/lib/module/form/index.js +12 -0
- package/lib/module/form/path.js +72 -0
- package/lib/module/form/rules.js +52 -0
- package/lib/module/form/types.js +2 -0
- package/lib/module/form/useField.js +49 -0
- package/lib/module/form/useForm.js +312 -0
- package/lib/module/hooks/index.js +2 -0
- package/lib/module/hooks/useControllableState.js +26 -0
- package/lib/module/hooks/useReducedMotion.js +27 -0
- package/lib/module/index.js +3 -1
- package/lib/module/theme/ThemeContext.js +30 -2
- package/lib/module/theme/tokens.js +12 -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/BottomNavigation/BottomNavigation.d.ts +1 -1
- package/lib/typescript/commonjs/components/Box/Box.d.ts +60 -0
- package/lib/typescript/commonjs/components/Box/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/Button/Button.d.ts +1 -1
- package/lib/typescript/commonjs/components/Card/Card.d.ts +3 -0
- package/lib/typescript/commonjs/components/Checkbox/Checkbox.d.ts +4 -2
- package/lib/typescript/commonjs/components/Chip/Chip.d.ts +3 -0
- package/lib/typescript/commonjs/components/DatePicker/DatePicker.d.ts +6 -3
- package/lib/typescript/commonjs/components/DateRangePicker/DateRangePicker.d.ts +6 -0
- package/lib/typescript/commonjs/components/Dialog/Dialog.d.ts +5 -2
- 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/FormField/FormField.d.ts +13 -2
- package/lib/typescript/commonjs/components/ImageGallery/ImageGallery.d.ts +6 -0
- package/lib/typescript/commonjs/components/KeyboardAwareScrollView/KeyboardAwareScrollView.d.ts +20 -0
- package/lib/typescript/commonjs/components/KeyboardAwareScrollView/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/KeyboardToolbar/KeyboardToolbar.d.ts +29 -0
- package/lib/typescript/commonjs/components/KeyboardToolbar/index.d.ts +3 -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 +6 -2
- package/lib/typescript/commonjs/components/OTPInput/OTPInput.d.ts +9 -2
- package/lib/typescript/commonjs/components/Radio/Radio.d.ts +2 -2
- package/lib/typescript/commonjs/components/Radio/RadioGroup.d.ts +3 -2
- 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 +6 -2
- package/lib/typescript/commonjs/components/Select/Select.d.ts +6 -0
- package/lib/typescript/commonjs/components/Slider/Slider.d.ts +9 -4
- package/lib/typescript/commonjs/components/Spinner/Spinner.d.ts +1 -1
- 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/Switch/Switch.d.ts +3 -2
- package/lib/typescript/commonjs/components/Tabs/Tabs.d.ts +3 -0
- package/lib/typescript/commonjs/components/Text/Text.d.ts +25 -0
- package/lib/typescript/commonjs/components/Text/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/TimePicker/TimePicker.d.ts +6 -3
- package/lib/typescript/commonjs/components/index.d.ts +10 -0
- package/lib/typescript/commonjs/form/FormContext.d.ts +17 -0
- package/lib/typescript/commonjs/form/index.d.ts +9 -0
- package/lib/typescript/commonjs/form/path.d.ts +10 -0
- package/lib/typescript/commonjs/form/rules.d.ts +31 -0
- package/lib/typescript/commonjs/form/types.d.ts +94 -0
- package/lib/typescript/commonjs/form/useField.d.ts +27 -0
- package/lib/typescript/commonjs/form/useForm.d.ts +10 -0
- package/lib/typescript/commonjs/hooks/index.d.ts +3 -0
- package/lib/typescript/commonjs/hooks/useControllableState.d.ts +17 -0
- package/lib/typescript/commonjs/hooks/useReducedMotion.d.ts +8 -0
- package/lib/typescript/commonjs/index.d.ts +4 -2
- package/lib/typescript/commonjs/theme/types.d.ts +17 -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/BottomNavigation/BottomNavigation.d.ts +1 -1
- package/lib/typescript/module/components/Box/Box.d.ts +60 -0
- package/lib/typescript/module/components/Box/index.d.ts +3 -0
- package/lib/typescript/module/components/Button/Button.d.ts +1 -1
- package/lib/typescript/module/components/Card/Card.d.ts +3 -0
- package/lib/typescript/module/components/Checkbox/Checkbox.d.ts +4 -2
- package/lib/typescript/module/components/Chip/Chip.d.ts +3 -0
- package/lib/typescript/module/components/DatePicker/DatePicker.d.ts +6 -3
- package/lib/typescript/module/components/DateRangePicker/DateRangePicker.d.ts +6 -0
- package/lib/typescript/module/components/Dialog/Dialog.d.ts +5 -2
- 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/FormField/FormField.d.ts +13 -2
- package/lib/typescript/module/components/ImageGallery/ImageGallery.d.ts +6 -0
- package/lib/typescript/module/components/KeyboardAwareScrollView/KeyboardAwareScrollView.d.ts +20 -0
- package/lib/typescript/module/components/KeyboardAwareScrollView/index.d.ts +3 -0
- package/lib/typescript/module/components/KeyboardToolbar/KeyboardToolbar.d.ts +29 -0
- package/lib/typescript/module/components/KeyboardToolbar/index.d.ts +3 -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 +6 -2
- package/lib/typescript/module/components/OTPInput/OTPInput.d.ts +9 -2
- package/lib/typescript/module/components/Radio/Radio.d.ts +2 -2
- package/lib/typescript/module/components/Radio/RadioGroup.d.ts +3 -2
- 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 +6 -2
- package/lib/typescript/module/components/Select/Select.d.ts +6 -0
- package/lib/typescript/module/components/Slider/Slider.d.ts +9 -4
- package/lib/typescript/module/components/Spinner/Spinner.d.ts +1 -1
- 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/Switch/Switch.d.ts +3 -2
- package/lib/typescript/module/components/Tabs/Tabs.d.ts +3 -0
- package/lib/typescript/module/components/Text/Text.d.ts +25 -0
- package/lib/typescript/module/components/Text/index.d.ts +3 -0
- package/lib/typescript/module/components/TimePicker/TimePicker.d.ts +6 -3
- package/lib/typescript/module/components/index.d.ts +10 -0
- package/lib/typescript/module/form/FormContext.d.ts +17 -0
- package/lib/typescript/module/form/index.d.ts +9 -0
- package/lib/typescript/module/form/path.d.ts +10 -0
- package/lib/typescript/module/form/rules.d.ts +31 -0
- package/lib/typescript/module/form/types.d.ts +94 -0
- package/lib/typescript/module/form/useField.d.ts +27 -0
- package/lib/typescript/module/form/useForm.d.ts +10 -0
- package/lib/typescript/module/hooks/index.d.ts +3 -0
- package/lib/typescript/module/hooks/useControllableState.d.ts +17 -0
- package/lib/typescript/module/hooks/useReducedMotion.d.ts +8 -0
- package/lib/typescript/module/index.d.ts +4 -2
- package/lib/typescript/module/theme/types.d.ts +17 -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
|
@@ -39,6 +39,21 @@ export interface ColorPalette {
|
|
|
39
39
|
warning: string;
|
|
40
40
|
error: string;
|
|
41
41
|
info: string;
|
|
42
|
+
/**
|
|
43
|
+
* Foreground (text/icon) colour to render ON a solid fill of each semantic
|
|
44
|
+
* tone. Solid Button / Badge / Chip / Banner backgrounds read these instead
|
|
45
|
+
* of assuming `text.inverse` (white) — white-on-pale (notably `warning`
|
|
46
|
+
* amber) fails contrast. Library defaults keep the historical white for
|
|
47
|
+
* primary/success/error/info, use dark ink for `warning`, and `text.primary`
|
|
48
|
+
* for the surface-like `secondary` tone. Override per-brand to match your
|
|
49
|
+
* palette's luminance.
|
|
50
|
+
*/
|
|
51
|
+
onPrimary: string;
|
|
52
|
+
onSecondary: string;
|
|
53
|
+
onSuccess: string;
|
|
54
|
+
onWarning: string;
|
|
55
|
+
onError: string;
|
|
56
|
+
onInfo: string;
|
|
42
57
|
text: {
|
|
43
58
|
primary: string;
|
|
44
59
|
secondary: string;
|
|
@@ -280,8 +295,6 @@ export interface DialogTokens {
|
|
|
280
295
|
iconWrapperSize: number;
|
|
281
296
|
iconWrapperBorderRadius: number;
|
|
282
297
|
actionButtonMinHeight: number;
|
|
283
|
-
/** When true, fires a selection haptic on action-button press. Library default: false. */
|
|
284
|
-
actionHaptic?: boolean;
|
|
285
298
|
}
|
|
286
299
|
export interface ToastTokens {
|
|
287
300
|
iconCircleSize: number;
|
|
@@ -322,43 +335,25 @@ export interface CheckboxSizeTokens {
|
|
|
322
335
|
}
|
|
323
336
|
export interface CheckboxTokens extends Partial<Record<ComponentSizeKey, CheckboxSizeTokens>> {
|
|
324
337
|
labelGap?: number;
|
|
325
|
-
/** When true, fires a selection haptic on press by default. Library default: false. */
|
|
326
|
-
pressHaptic?: boolean;
|
|
327
|
-
}
|
|
328
|
-
export interface ChipTokens extends Partial<Record<ComponentSizeKey, ChipSizeTokens>> {
|
|
329
|
-
/** When true, fires a selection haptic when the chip itself is pressed. Library default: false. */
|
|
330
|
-
pressHaptic?: boolean;
|
|
331
|
-
/** When true, fires a selection haptic when the close (×) button is pressed. Library default: false. */
|
|
332
|
-
closeHaptic?: boolean;
|
|
333
|
-
}
|
|
334
|
-
export interface ListItemTokens extends Partial<Record<ComponentSizeKey, ListItemSizeTokens>> {
|
|
335
|
-
/** When true, fires a selection haptic on press. Library default: false. */
|
|
336
|
-
pressHaptic?: boolean;
|
|
337
338
|
}
|
|
339
|
+
export type ChipTokens = Partial<Record<ComponentSizeKey, ChipSizeTokens>>;
|
|
340
|
+
export type ListItemTokens = Partial<Record<ComponentSizeKey, ListItemSizeTokens>>;
|
|
338
341
|
export interface RadioSizeTokens {
|
|
339
342
|
outer: number;
|
|
340
343
|
inner: number;
|
|
341
344
|
}
|
|
342
345
|
export interface RadioTokens extends Partial<Record<ComponentSizeKey, RadioSizeTokens>> {
|
|
343
346
|
labelGap?: number;
|
|
344
|
-
/** When true, fires a selection haptic on press by default. Library default: false. */
|
|
345
|
-
pressHaptic?: boolean;
|
|
346
347
|
}
|
|
347
348
|
export interface NumberInputTokens {
|
|
348
349
|
/** Milliseconds before long-press auto-repeat kicks in. Library default: 500. */
|
|
349
350
|
longPressDelayMs?: number;
|
|
350
351
|
/** Milliseconds between auto-repeated step ticks while long-pressed. Library default: 80. */
|
|
351
352
|
longPressIntervalMs?: number;
|
|
352
|
-
/** When true, fires a light impact haptic on every +/- press. Library default: false. */
|
|
353
|
-
pressHaptic?: boolean;
|
|
354
353
|
}
|
|
355
354
|
export interface OTPInputTokens extends Partial<Record<ComponentSizeKey, OTPInputSizeTokens>> {
|
|
356
355
|
/** When true, the row shakes horizontally on first error transition. Library default: false. */
|
|
357
356
|
shakeOnError?: boolean;
|
|
358
|
-
/** When true, fires an error haptic on first error transition. Library default: false. */
|
|
359
|
-
errorHaptic?: boolean;
|
|
360
|
-
/** When true, fires a selection haptic on each value change. Library default: false. */
|
|
361
|
-
selectionHaptic?: boolean;
|
|
362
357
|
}
|
|
363
358
|
export interface ProgressBarTokens {
|
|
364
359
|
/** Duration in ms of the indeterminate-loop animation cycle. Library default: 1500. */
|
|
@@ -373,8 +368,6 @@ export interface RatingTokens {
|
|
|
373
368
|
pulseOnPress?: boolean;
|
|
374
369
|
/** Peak scale of the pulse animation. Library default: 1.2. */
|
|
375
370
|
pulseScale?: number;
|
|
376
|
-
/** When true, fires a selection haptic on each rating change. Library default: false. */
|
|
377
|
-
pressHaptic?: boolean;
|
|
378
371
|
}
|
|
379
372
|
/**
|
|
380
373
|
* Per-size dimensions for the unified field box (FieldBase). Every
|
|
@@ -515,8 +508,6 @@ export interface BottomNavigationTokens {
|
|
|
515
508
|
underlineHeight?: number;
|
|
516
509
|
}
|
|
517
510
|
export interface DatePickerTokens {
|
|
518
|
-
/** Opt-in haptic feedback on month/year navigation and selection. Default: false. */
|
|
519
|
-
haptic?: boolean;
|
|
520
511
|
/** Pixel offset for the month-slide animation. Default: 32. */
|
|
521
512
|
monthSlideDistance?: number;
|
|
522
513
|
/** Outgoing month-slide animation duration (ms). Default: theme.motion.duration.fast or 140. */
|
|
@@ -549,8 +540,6 @@ export interface DatePickerTokens {
|
|
|
549
540
|
footerButtonMinHeight?: number;
|
|
550
541
|
}
|
|
551
542
|
export interface DateRangePickerTokens {
|
|
552
|
-
/** Opt-in haptic feedback on month navigation and selection. Default: false. */
|
|
553
|
-
haptic?: boolean;
|
|
554
543
|
/** Pixel offset for the month-slide animation. Default: 32. */
|
|
555
544
|
monthSlideDistance?: number;
|
|
556
545
|
/** Outgoing month-slide animation duration (ms). Default: theme.motion.duration.fast or 140. */
|
|
@@ -567,8 +556,6 @@ export interface DateRangePickerTokens {
|
|
|
567
556
|
footerButtonMinHeight?: number;
|
|
568
557
|
}
|
|
569
558
|
export interface TimePickerTokens {
|
|
570
|
-
/** Opt-in haptic feedback on wheel scroll and confirm/cancel. Default: false. */
|
|
571
|
-
haptic?: boolean;
|
|
572
559
|
/** Debounce window between scroll-haptic ticks (ms). Default: 35. */
|
|
573
560
|
hapticDebounceMs?: number;
|
|
574
561
|
/** Width of the bottom-sheet drag handle. Default: 36. */
|
|
@@ -601,14 +588,10 @@ export interface AvatarTokens {
|
|
|
601
588
|
fontWeight?: keyof TypographyScale['fontWeight'];
|
|
602
589
|
}
|
|
603
590
|
export interface AccordionTokens {
|
|
604
|
-
/** When true, fires a selection haptic on header press. Library default: false. */
|
|
605
|
-
pressHaptic?: boolean;
|
|
606
591
|
/** Vertical padding inside the `card` variant container. Library default: 4. */
|
|
607
592
|
cardPaddingVertical?: number;
|
|
608
593
|
}
|
|
609
594
|
export interface AppBarTokens {
|
|
610
|
-
/** When true, fires a selection haptic on action-button press. Library default: false. */
|
|
611
|
-
pressHaptic?: boolean;
|
|
612
595
|
/** Min-width of the left/right side action slots. Library default: 48. */
|
|
613
596
|
sideSlotMinWidth?: number;
|
|
614
597
|
/** Translate-Y distance (px, negative) the large title travels when collapsing. Library default: -20. */
|
|
@@ -649,17 +632,11 @@ export interface BannerTokens {
|
|
|
649
632
|
actionButtonPaddingVertical?: number;
|
|
650
633
|
actionButtonRadius?: number;
|
|
651
634
|
}
|
|
652
|
-
export interface CardTokens {
|
|
653
|
-
/** When true, fires a selection haptic on interactive card press. Library default: false. */
|
|
654
|
-
pressHaptic?: boolean;
|
|
655
|
-
}
|
|
656
635
|
export interface DrawerTokens {
|
|
657
636
|
/** Pixel velocity above which a fling closes the drawer. Library default: 1000. */
|
|
658
637
|
closeVelocityThreshold?: number;
|
|
659
638
|
/** Pixel drag distance before the gesture is recognised. Library default: 10. */
|
|
660
639
|
dragActivationOffset?: number;
|
|
661
|
-
/** When true, fires a selection haptic on backdrop press. Library default: false. */
|
|
662
|
-
backdropPressHaptic?: boolean;
|
|
663
640
|
}
|
|
664
641
|
export interface FloatingActionButtonTokens {
|
|
665
642
|
/** Horizontal inset from screen edge for bottomLeft/bottomRight positions. Library default: 24. */
|
|
@@ -670,8 +647,6 @@ export interface FloatingActionButtonTokens {
|
|
|
670
647
|
secondaryGap?: number;
|
|
671
648
|
/** Per-item stagger delay in ms when opening/closing the group. Library default: 50. */
|
|
672
649
|
staggerMs?: number;
|
|
673
|
-
/** When true, fires impactLight on press / open / action. Library default: false. */
|
|
674
|
-
pressHaptic?: boolean;
|
|
675
650
|
}
|
|
676
651
|
export interface ImageGalleryTokens {
|
|
677
652
|
/** Maximum pinch-zoom scale. Library default: 4. */
|
|
@@ -680,14 +655,10 @@ export interface ImageGalleryTokens {
|
|
|
680
655
|
minScale?: number;
|
|
681
656
|
/** Scale applied on double-tap at rest. Library default: 2. */
|
|
682
657
|
doubleTapScale?: number;
|
|
683
|
-
/** When true, fires haptics on open/close/swipe/double-tap. Library default: false. */
|
|
684
|
-
pressHaptic?: boolean;
|
|
685
658
|
}
|
|
686
659
|
export interface ModalTokens {
|
|
687
660
|
/** Initial scale value for the centred presentation enter animation. Library default: 0.9. */
|
|
688
661
|
scaleStartValue?: number;
|
|
689
|
-
/** When true, fires a selection haptic on backdrop dismiss. Library default: false. */
|
|
690
|
-
backdropHaptic?: boolean;
|
|
691
662
|
}
|
|
692
663
|
export interface SegmentedControlSizeTokens {
|
|
693
664
|
height?: number;
|
|
@@ -697,8 +668,6 @@ export interface SegmentedControlSizeTokens {
|
|
|
697
668
|
export interface SegmentedControlTokens extends Partial<Record<'sm' | 'md', SegmentedControlSizeTokens>> {
|
|
698
669
|
/** Padding between the track edge and the selected indicator. Library default: 2. */
|
|
699
670
|
trackPadding?: number;
|
|
700
|
-
/** When true, fires a selection haptic on segment change. Library default: false. */
|
|
701
|
-
changeHaptic?: boolean;
|
|
702
671
|
}
|
|
703
672
|
export interface SliderSizeTokens {
|
|
704
673
|
trackHeight?: number;
|
|
@@ -713,14 +682,6 @@ export interface SliderTokens extends Partial<Record<ComponentSizeKey, SliderSiz
|
|
|
713
682
|
labelShowDuration?: number;
|
|
714
683
|
/** Final opacity of the bubble label when visible. Library default: 1. */
|
|
715
684
|
labelOpacity?: number;
|
|
716
|
-
/** When true, fires a selection haptic while dragging. Library default: false. */
|
|
717
|
-
dragHaptic?: boolean;
|
|
718
|
-
/** When true, fires a selection haptic each time the value crosses a step boundary. Library default: false. */
|
|
719
|
-
stepHaptic?: boolean;
|
|
720
|
-
/** When true, fires a selection haptic on track tap. Library default: false. */
|
|
721
|
-
tapHaptic?: boolean;
|
|
722
|
-
/** When true, fires a selection haptic on accessibility increment/decrement. Library default: false. */
|
|
723
|
-
a11yHaptic?: boolean;
|
|
724
685
|
}
|
|
725
686
|
export interface StepperTokens {
|
|
726
687
|
/** Diameter of each step circle. Library default: 24. */
|
|
@@ -731,8 +692,6 @@ export interface StepperTokens {
|
|
|
731
692
|
pulseDuration?: number;
|
|
732
693
|
/** When true, the active step animates a continuous pulse ring. Library default: false. */
|
|
733
694
|
pulseAnimation?: boolean;
|
|
734
|
-
/** When true, fires a selection haptic on step press. Library default: false. */
|
|
735
|
-
pressHaptic?: boolean;
|
|
736
695
|
}
|
|
737
696
|
export interface SwipeableTokens {
|
|
738
697
|
/** Pixel distance after which a partial-swipe action commits on release. Library default: 64. */
|
|
@@ -751,12 +710,6 @@ export interface SwipeableTokens {
|
|
|
751
710
|
springStiffness?: number;
|
|
752
711
|
/** Spring mass for snap-back animation. */
|
|
753
712
|
springMass?: number;
|
|
754
|
-
/** When true, fires a notification haptic on full-swipe commit. Library default: true. */
|
|
755
|
-
fullSwipeHaptic?: boolean;
|
|
756
|
-
/** When true, fires a selection haptic on action button press. Library default: true. */
|
|
757
|
-
actionPressHaptic?: boolean;
|
|
758
|
-
/** When true, fires a selection haptic on accessibility action. Library default: true. */
|
|
759
|
-
a11yActionHaptic?: boolean;
|
|
760
713
|
}
|
|
761
714
|
export interface TabsTokens {
|
|
762
715
|
/** Horizontal padding of each tab. Library default: theme.spacing.lg. */
|
|
@@ -773,8 +726,6 @@ export interface TabsTokens {
|
|
|
773
726
|
disabledOpacity?: number;
|
|
774
727
|
/** Gap between label and inline badge. Library default: 6. */
|
|
775
728
|
badgeGap?: number;
|
|
776
|
-
/** When true, fires a selection haptic on tab press. Library default: false. */
|
|
777
|
-
hapticOnPress?: boolean;
|
|
778
729
|
}
|
|
779
730
|
export interface TooltipTokens {
|
|
780
731
|
/** Gap between trigger and tooltip card. Library default: 8. */
|
|
@@ -807,7 +758,6 @@ export interface ComponentTokens {
|
|
|
807
758
|
badge?: BadgeTokens;
|
|
808
759
|
bottomNavigation?: BottomNavigationTokens;
|
|
809
760
|
bottomSheet?: BottomSheetTokens;
|
|
810
|
-
card?: CardTokens;
|
|
811
761
|
checkbox?: CheckboxTokens;
|
|
812
762
|
chip?: ChipTokens;
|
|
813
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';
|
|
@@ -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
|
export type AccordionVariant = 'plain' | 'card';
|
|
4
5
|
export interface AccordionProps {
|
|
5
6
|
title: string;
|
|
@@ -26,6 +27,8 @@ export interface AccordionProps {
|
|
|
26
27
|
* accordion so the layout doesn't shift when data arrives.
|
|
27
28
|
*/
|
|
28
29
|
loading?: boolean;
|
|
30
|
+
/** Haptic feedback for interactions. Pass false to disable; pass a HapticType to override the default. */
|
|
31
|
+
haptic?: HapticType | false;
|
|
29
32
|
}
|
|
30
33
|
export interface AccordionGroupProps {
|
|
31
34
|
children: React.ReactNode;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
export type PresencePreset = 'fade' | 'scale' | 'slide-up' | 'slide-down';
|
|
4
|
+
export interface AnimatePresenceProps {
|
|
5
|
+
/**
|
|
6
|
+
* Render conditionally. When this goes null / undefined / false the exit
|
|
7
|
+
* animation plays before the content unmounts; when it returns the enter
|
|
8
|
+
* animation plays. Drive it like `{visible ? <Panel /> : null}`.
|
|
9
|
+
*/
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
/** Enter/exit preset. Default `'fade'`. */
|
|
12
|
+
preset?: PresencePreset;
|
|
13
|
+
/** Animation duration (ms). Defaults to `theme.motion.duration.base`. */
|
|
14
|
+
duration?: number;
|
|
15
|
+
style?: StyleProp<ViewStyle>;
|
|
16
|
+
testID?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Animates a single child in on mount and out on unmount. Thin, theme-aware
|
|
20
|
+
* wrapper over Reanimated's `entering`/`exiting` — Reanimated keeps the view
|
|
21
|
+
* alive to play the exit, so the parent only toggles a condition. Honors the OS
|
|
22
|
+
* Reduce Motion setting (renders instantly when reduced).
|
|
23
|
+
*
|
|
24
|
+
* For animating items inside a list, use Reanimated's `itemLayoutAnimation`
|
|
25
|
+
* on `Animated.FlatList` instead — this wrapper targets single conditional nodes.
|
|
26
|
+
*/
|
|
27
|
+
declare const AnimatePresence: React.FC<AnimatePresenceProps>;
|
|
28
|
+
export { AnimatePresence };
|
|
29
|
+
export default AnimatePresence;
|
|
30
|
+
//# sourceMappingURL=AnimatePresence.d.ts.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Animated, View } from 'react-native';
|
|
3
3
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
4
|
+
import type { HapticType } from '../../utils/hapticUtils';
|
|
4
5
|
export type AppBarVariant = 'default' | 'large' | 'compact';
|
|
5
6
|
export type AppBarTitleAlignment = 'left' | 'center';
|
|
6
7
|
export interface AppBarAction {
|
|
@@ -36,6 +37,11 @@ export interface AppBarProps {
|
|
|
36
37
|
subtitleStyle?: StyleProp<ViewStyle>;
|
|
37
38
|
/** Style applied to the right-action badge bubble. */
|
|
38
39
|
badgeStyle?: StyleProp<ViewStyle>;
|
|
40
|
+
/**
|
|
41
|
+
* Haptic feedback for interactions. Pass false to disable; pass a HapticType
|
|
42
|
+
* to override the default.
|
|
43
|
+
*/
|
|
44
|
+
haptic?: HapticType | false;
|
|
39
45
|
testID?: string;
|
|
40
46
|
}
|
|
41
47
|
declare const AppBar: React.ForwardRefExoticComponent<AppBarProps & React.RefAttributes<View>>;
|
|
@@ -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 BannerVariant = 'info' | 'success' | 'warning' | 'error' | 'neutral';
|
|
4
5
|
export interface BannerAction {
|
|
5
6
|
label: string;
|
|
@@ -14,6 +15,8 @@ export interface BannerProps {
|
|
|
14
15
|
actions?: BannerAction[];
|
|
15
16
|
dismissible?: boolean;
|
|
16
17
|
onDismiss?: () => void;
|
|
18
|
+
/** Haptic feedback for interactions. Pass false to disable; pass a HapticType to override the default. */
|
|
19
|
+
haptic?: HapticType | false;
|
|
17
20
|
visible?: boolean;
|
|
18
21
|
animateMount?: boolean;
|
|
19
22
|
/**
|
|
@@ -20,7 +20,7 @@ export interface TabConfig {
|
|
|
20
20
|
export interface BottomNavigationProps {
|
|
21
21
|
tabs: TabConfig[];
|
|
22
22
|
activeTab: string;
|
|
23
|
-
|
|
23
|
+
onChange: (tabKey: string) => void;
|
|
24
24
|
haptic?: HapticType | false;
|
|
25
25
|
showLabels?: boolean;
|
|
26
26
|
variant?: BottomNavigationVariant;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import type { StyleProp, ViewProps, ViewStyle } from 'react-native';
|
|
4
|
+
import type { ColorPalette, RadiusScale, SpacingScale, Theme } from '../../theme/types';
|
|
5
|
+
export type SpacingToken = keyof SpacingScale;
|
|
6
|
+
export type RadiusToken = keyof RadiusScale;
|
|
7
|
+
export type BackgroundToken = keyof ColorPalette['background'];
|
|
8
|
+
export interface BoxProps extends ViewProps {
|
|
9
|
+
/** padding (all sides) */
|
|
10
|
+
p?: SpacingToken;
|
|
11
|
+
/** paddingHorizontal */
|
|
12
|
+
px?: SpacingToken;
|
|
13
|
+
/** paddingVertical */
|
|
14
|
+
py?: SpacingToken;
|
|
15
|
+
pt?: SpacingToken;
|
|
16
|
+
pr?: SpacingToken;
|
|
17
|
+
pb?: SpacingToken;
|
|
18
|
+
pl?: SpacingToken;
|
|
19
|
+
/** margin (all sides) */
|
|
20
|
+
m?: SpacingToken;
|
|
21
|
+
mx?: SpacingToken;
|
|
22
|
+
my?: SpacingToken;
|
|
23
|
+
mt?: SpacingToken;
|
|
24
|
+
mr?: SpacingToken;
|
|
25
|
+
mb?: SpacingToken;
|
|
26
|
+
ml?: SpacingToken;
|
|
27
|
+
/** Flexbox gap between children (spacing token). */
|
|
28
|
+
gap?: SpacingToken;
|
|
29
|
+
/** Background — a `colors.background.*` token or a raw colour string. */
|
|
30
|
+
bg?: BackgroundToken | (string & {});
|
|
31
|
+
radius?: RadiusToken;
|
|
32
|
+
/** Draw a hairline border in `colors.border.primary`. */
|
|
33
|
+
border?: boolean;
|
|
34
|
+
flex?: number;
|
|
35
|
+
align?: ViewStyle['alignItems'];
|
|
36
|
+
justify?: ViewStyle['justifyContent'];
|
|
37
|
+
direction?: ViewStyle['flexDirection'];
|
|
38
|
+
wrap?: boolean;
|
|
39
|
+
style?: StyleProp<ViewStyle>;
|
|
40
|
+
}
|
|
41
|
+
type LayoutProps = Omit<BoxProps, 'style' | 'children'>;
|
|
42
|
+
export declare const resolveBoxStyle: (theme: Theme, p: LayoutProps) => ViewStyle;
|
|
43
|
+
declare const Box: React.ForwardRefExoticComponent<BoxProps & React.RefAttributes<View>>;
|
|
44
|
+
export type StackProps = Omit<BoxProps, 'direction'>;
|
|
45
|
+
/** Vertical flex container with token spacing between children (default gap `md`). */
|
|
46
|
+
declare const Stack: React.ForwardRefExoticComponent<StackProps & React.RefAttributes<View>>;
|
|
47
|
+
export type RowProps = Omit<BoxProps, 'direction'>;
|
|
48
|
+
/** Horizontal flex container (default `align="center"`, gap `sm`). */
|
|
49
|
+
declare const Row: React.ForwardRefExoticComponent<RowProps & React.RefAttributes<View>>;
|
|
50
|
+
export interface SpacerProps {
|
|
51
|
+
/** Fixed spacer of this spacing token. Omit for a flexible spacer (`flex: 1`). */
|
|
52
|
+
size?: SpacingToken;
|
|
53
|
+
style?: StyleProp<ViewStyle>;
|
|
54
|
+
testID?: string;
|
|
55
|
+
}
|
|
56
|
+
/** Fixed gap (`size`) or a flexible push (`flex: 1`) between siblings. */
|
|
57
|
+
declare const Spacer: React.FC<SpacerProps>;
|
|
58
|
+
export { Box, Stack, Row, Spacer };
|
|
59
|
+
export default Box;
|
|
60
|
+
//# sourceMappingURL=Box.d.ts.map
|
|
@@ -4,7 +4,7 @@ import type { PressableProps, StyleProp, TextStyle, ViewStyle } from 'react-nati
|
|
|
4
4
|
import type { GradientDefinition } from '../../theme/types';
|
|
5
5
|
import type { HapticType } from '../../utils/hapticUtils';
|
|
6
6
|
export type ButtonVariant = 'solid' | 'outline' | 'ghost' | 'link';
|
|
7
|
-
export type ButtonTone = 'primary' | 'secondary' | 'success' | 'warning' | '
|
|
7
|
+
export type ButtonTone = 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'neutral';
|
|
8
8
|
export type ButtonSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
9
9
|
export interface ButtonProps extends Omit<PressableProps, 'style' | 'children'> {
|
|
10
10
|
title?: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { GestureResponderEvent, ImageSourcePropType, PressableProps, StyleProp, View as RNView, ViewStyle } from 'react-native';
|
|
3
3
|
import type { GradientDefinition } from '../../theme/types';
|
|
4
|
+
import type { HapticType } from '../../utils/hapticUtils';
|
|
4
5
|
export type CardVariant = 'elevated' | 'outlined' | 'filled';
|
|
5
6
|
export type CardElevation = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
6
7
|
export type CardRadius = 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
@@ -32,6 +33,8 @@ export interface CardProps extends Omit<PressableProps, 'style' | 'children'> {
|
|
|
32
33
|
*/
|
|
33
34
|
gradient?: string | GradientDefinition;
|
|
34
35
|
onPress?: (event: GestureResponderEvent) => void;
|
|
36
|
+
/** Haptic feedback for interactions. Pass false to disable; pass a HapticType to override the default. */
|
|
37
|
+
haptic?: HapticType | false;
|
|
35
38
|
accessibilityLabel?: string;
|
|
36
39
|
style?: StyleProp<ViewStyle>;
|
|
37
40
|
/** Alias for `style` — applied to the outer card element. */
|
|
@@ -5,14 +5,16 @@ import type { HapticType } from '../../utils/hapticUtils';
|
|
|
5
5
|
export type CheckboxSize = 'sm' | 'md' | 'lg';
|
|
6
6
|
export type CheckboxTone = 'primary' | 'success' | 'warning' | 'error';
|
|
7
7
|
export interface CheckboxProps extends Omit<PressableProps, 'style' | 'children' | 'onPress'> {
|
|
8
|
-
checked
|
|
9
|
-
|
|
8
|
+
checked?: boolean;
|
|
9
|
+
defaultChecked?: boolean;
|
|
10
|
+
onChange?: (checked: boolean) => void;
|
|
10
11
|
indeterminate?: boolean;
|
|
11
12
|
disabled?: boolean;
|
|
12
13
|
label?: string;
|
|
13
14
|
size?: CheckboxSize;
|
|
14
15
|
tone?: CheckboxTone;
|
|
15
16
|
accessibilityLabel?: string;
|
|
17
|
+
/** Haptic feedback for interactions. Pass false to disable; pass a HapticType to override the default. */
|
|
16
18
|
haptic?: HapticType | false;
|
|
17
19
|
style?: StyleProp<ViewStyle>;
|
|
18
20
|
boxStyle?: 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 ChipVariant = 'filled' | 'outlined';
|
|
4
5
|
export type ChipTone = 'primary' | 'neutral' | 'success' | 'warning' | 'error' | 'info';
|
|
5
6
|
export type ChipSize = 'sm' | 'md';
|
|
@@ -20,6 +21,8 @@ export interface ChipProps {
|
|
|
20
21
|
*/
|
|
21
22
|
loading?: boolean;
|
|
22
23
|
accessibilityLabel?: string;
|
|
24
|
+
/** Haptic feedback for interactions. Pass false to disable; pass a HapticType to override the default. */
|
|
25
|
+
haptic?: HapticType | false;
|
|
23
26
|
style?: StyleProp<ViewStyle>;
|
|
24
27
|
textStyle?: StyleProp<TextStyle>;
|
|
25
28
|
/** Style override for the chip outer container (alias to style, applied after). */
|
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
import type { HapticType } from '../../utils';
|
|
3
4
|
import type { PickerTriggerSize, PickerTriggerVariant } from '../PickerTrigger';
|
|
4
5
|
export type DatePickerMode = 'modal' | 'inline';
|
|
5
6
|
export type WeekStart = 0 | 1 | 6;
|
|
6
7
|
/**
|
|
7
8
|
* DatePicker operates in two modes:
|
|
8
9
|
*
|
|
9
|
-
* 1. **Controlled-modal mode** — pass `visible` (plus `
|
|
10
|
+
* 1. **Controlled-modal mode** — pass `visible` (plus `onChange` / `onClose`)
|
|
10
11
|
* and own the open state externally. The component renders only the modal.
|
|
11
12
|
* 2. **Trigger mode** — omit `visible`. The component renders a built-in
|
|
12
13
|
* PickerTrigger field (label / value / placeholder / chevron / clear /
|
|
13
14
|
* helper / error / size / variant) and manages its own open state. The
|
|
14
15
|
* field opens the modal on press and closes it on confirm/cancel.
|
|
15
16
|
*
|
|
16
|
-
* `
|
|
17
|
+
* `onChange` / `onClose` are typed optional to support trigger-only usage
|
|
17
18
|
* where the consumer may not need either callback. In controlled-modal mode
|
|
18
19
|
* they remain semantically required.
|
|
19
20
|
*/
|
|
20
21
|
export interface DatePickerProps {
|
|
21
22
|
visible?: boolean;
|
|
22
23
|
value?: Date | null;
|
|
23
|
-
|
|
24
|
+
onChange?: (date: Date) => void;
|
|
24
25
|
onClose?: () => void;
|
|
25
26
|
minDate?: Date;
|
|
26
27
|
maxDate?: Date;
|
|
@@ -40,6 +41,8 @@ export interface DatePickerProps {
|
|
|
40
41
|
navButtonStyle?: StyleProp<ViewStyle>;
|
|
41
42
|
/** Style override for the cancel/confirm footer buttons. */
|
|
42
43
|
footerButtonStyle?: StyleProp<ViewStyle>;
|
|
44
|
+
/** Haptic feedback for interactions. Pass false to disable; pass a HapticType to override the default. */
|
|
45
|
+
haptic?: HapticType | false;
|
|
43
46
|
testID?: string;
|
|
44
47
|
label?: string;
|
|
45
48
|
placeholder?: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
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 { HapticType } from '../../utils';
|
|
4
5
|
import type { PickerTriggerSize, PickerTriggerVariant } from '../PickerTrigger';
|
|
5
6
|
export type WeekStart = 0 | 1 | 6;
|
|
6
7
|
export interface DateRange {
|
|
@@ -48,6 +49,11 @@ export interface DateRangePickerProps {
|
|
|
48
49
|
confirmLabel?: string;
|
|
49
50
|
cancelLabel?: string;
|
|
50
51
|
maxRange?: number;
|
|
52
|
+
/**
|
|
53
|
+
* Haptic feedback for interactions. Pass false to disable; pass a HapticType
|
|
54
|
+
* to override the default.
|
|
55
|
+
*/
|
|
56
|
+
haptic?: HapticType | false;
|
|
51
57
|
style?: StyleProp<ViewStyle>;
|
|
52
58
|
/** Outer container style applied to the calendar card. */
|
|
53
59
|
containerStyle?: StyleProp<ViewStyle>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
3
|
-
|
|
4
|
-
export type
|
|
3
|
+
import type { HapticType } from '../../utils/hapticUtils';
|
|
4
|
+
export type DialogVariant = 'default' | 'success' | 'warning' | 'error' | 'info';
|
|
5
|
+
export type DialogActionTone = 'primary' | 'neutral' | 'error';
|
|
5
6
|
export interface DialogAction {
|
|
6
7
|
label: string;
|
|
7
8
|
onPress: () => void;
|
|
@@ -34,6 +35,8 @@ export interface DialogProps {
|
|
|
34
35
|
actionButtonStyle?: StyleProp<ViewStyle>;
|
|
35
36
|
/** Style override applied to every action button label text. */
|
|
36
37
|
actionTextStyle?: StyleProp<TextStyle>;
|
|
38
|
+
/** Haptic feedback for interactions. Pass false to disable; pass a HapticType to override the default. */
|
|
39
|
+
haptic?: HapticType | false;
|
|
37
40
|
testID?: string;
|
|
38
41
|
}
|
|
39
42
|
declare const Dialog: React.FC<DialogProps>;
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
*/
|
|
20
20
|
import React from 'react';
|
|
21
21
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
22
|
+
import type { HapticType } from '../../utils';
|
|
22
23
|
export type DrawerSide = 'left' | 'right' | 'top' | 'bottom';
|
|
23
24
|
export interface DrawerProps {
|
|
24
25
|
/** Controlled visibility. Omit to use internal state. */
|
|
@@ -37,6 +38,8 @@ export interface DrawerProps {
|
|
|
37
38
|
enableBackdropPress?: boolean;
|
|
38
39
|
/** Backdrop opacity at fully-open state (0..1). */
|
|
39
40
|
backdropOpacity?: number;
|
|
41
|
+
/** Haptic feedback for interactions. Pass false to disable; pass a HapticType to override the default. */
|
|
42
|
+
haptic?: HapticType | false;
|
|
40
43
|
containerStyle?: StyleProp<ViewStyle>;
|
|
41
44
|
children?: React.ReactNode;
|
|
42
45
|
accessibilityLabel?: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
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 { HapticType } from '../../utils/hapticUtils';
|
|
4
5
|
export type FloatingActionButtonSize = 'sm' | 'md' | 'lg';
|
|
5
6
|
export type FloatingActionButtonTone = 'primary' | 'success' | 'warning' | 'error' | 'neutral';
|
|
6
7
|
export type FloatingActionButtonPosition = 'bottomRight' | 'bottomLeft' | 'bottomCenter';
|
|
@@ -18,6 +19,8 @@ export interface FloatingActionButtonProps {
|
|
|
18
19
|
isScrolling?: boolean;
|
|
19
20
|
accessibilityLabel: string;
|
|
20
21
|
accessibilityHint?: string;
|
|
22
|
+
/** Haptic feedback for interactions. Pass false to disable; pass a HapticType to override the default. */
|
|
23
|
+
haptic?: HapticType | false;
|
|
21
24
|
style?: StyleProp<ViewStyle>;
|
|
22
25
|
containerStyle?: StyleProp<ViewStyle>;
|
|
23
26
|
labelStyle?: StyleProp<ViewStyle>;
|
|
@@ -43,6 +46,8 @@ export interface FloatingActionButtonGroupProps {
|
|
|
43
46
|
bottomOffset?: number;
|
|
44
47
|
size?: FloatingActionButtonSize;
|
|
45
48
|
accessibilityLabel?: string;
|
|
49
|
+
/** Haptic feedback for interactions. Pass false to disable; pass a HapticType to override the default. */
|
|
50
|
+
haptic?: HapticType | false;
|
|
46
51
|
containerStyle?: StyleProp<ViewStyle>;
|
|
47
52
|
secondaryActionStyle?: StyleProp<ViewStyle>;
|
|
48
53
|
labelPillStyle?: StyleProp<ViewStyle>;
|
|
@@ -1,18 +1,29 @@
|
|
|
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 { FieldInputProps } from '../../form/types';
|
|
4
5
|
export type FormFieldLayout = 'stacked' | 'inline';
|
|
5
6
|
export interface FormFieldProps {
|
|
6
7
|
label?: string;
|
|
7
8
|
helperText?: string;
|
|
8
9
|
/**
|
|
9
10
|
* When truthy: helperText is hidden, error is shown in the error colour,
|
|
10
|
-
* and the container reports
|
|
11
|
+
* and the container reports the invalid state to assistive tech.
|
|
12
|
+
* Ignored when `name` connects to a <Form> with an element child (the child
|
|
13
|
+
* renders its own error then).
|
|
11
14
|
*/
|
|
12
15
|
error?: string;
|
|
13
16
|
/** Appends ' *' (in theme.colors.error) to the label. */
|
|
14
17
|
required?: boolean;
|
|
15
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Connect this field to the surrounding `<Form>` by name. With an element
|
|
20
|
+
* child (e.g. `<Input/>`) the field's value/onChangeText/onBlur/error are
|
|
21
|
+
* injected automatically — best for text inputs. For non-text controls
|
|
22
|
+
* (Select, Switch, DatePicker…) use the render-prop form:
|
|
23
|
+
* `<FormField name="x">{(f) => <Select value={f.value} onChange={f.onChange} />}</FormField>`.
|
|
24
|
+
*/
|
|
25
|
+
name?: string;
|
|
26
|
+
children: React.ReactNode | ((field: FieldInputProps) => React.ReactNode);
|
|
16
27
|
/** 'stacked' (default): label above input. 'inline': label left, input right. */
|
|
17
28
|
layout?: FormFieldLayout;
|
|
18
29
|
labelStyle?: StyleProp<TextStyle>;
|