@webority-technologies/mobile 0.0.15 → 0.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/components/Accordion/Accordion.js +60 -19
- package/lib/commonjs/components/AppBar/AppBar.js +29 -20
- package/lib/commonjs/components/Avatar/Avatar.js +38 -8
- package/lib/commonjs/components/Badge/Badge.js +66 -4
- package/lib/commonjs/components/Banner/Banner.js +146 -66
- package/lib/commonjs/components/BottomNavigation/BottomNavigation.js +37 -15
- package/lib/commonjs/components/BottomSheet/BottomSheet.js +78 -53
- package/lib/commonjs/components/Button/Button.js +12 -5
- package/lib/commonjs/components/Card/Card.js +106 -16
- package/lib/commonjs/components/Carousel/Carousel.js +66 -12
- package/lib/commonjs/components/Checkbox/Checkbox.js +11 -7
- package/lib/commonjs/components/Chip/Chip.js +44 -12
- package/lib/commonjs/components/DatePicker/DatePicker.js +185 -76
- package/lib/commonjs/components/DateRangePicker/DateRangePicker.js +133 -59
- package/lib/commonjs/components/Dialog/Dialog.js +16 -10
- package/lib/commonjs/components/Drawer/Drawer.js +13 -10
- package/lib/commonjs/components/FieldBase/FieldBase.js +494 -0
- package/lib/commonjs/components/FieldBase/index.js +32 -0
- package/lib/commonjs/components/FloatingActionButton/FloatingActionButton.js +69 -44
- package/lib/commonjs/components/ForceUpdateDialog/ForceUpdateDialog.js +8 -2
- package/lib/commonjs/components/FormField/FormField.js +3 -2
- package/lib/commonjs/components/ImageGallery/ImageGallery.js +132 -44
- package/lib/commonjs/components/Input/Input.js +144 -181
- package/lib/commonjs/components/ListItem/ListItem.js +90 -11
- package/lib/commonjs/components/Modal/Modal.js +55 -27
- package/lib/commonjs/components/NumberInput/NumberInput.js +60 -106
- package/lib/commonjs/components/OTPInput/OTPInput.js +65 -58
- package/lib/commonjs/components/PickerTrigger/PickerTrigger.js +185 -0
- package/lib/commonjs/components/{AppIcon → PickerTrigger}/index.js +4 -4
- package/lib/commonjs/components/ProgressBar/ProgressBar.js +19 -11
- package/lib/commonjs/components/Radio/Radio.js +11 -6
- package/lib/commonjs/components/Rating/Rating.js +85 -19
- package/lib/commonjs/components/SearchBar/SearchBar.js +90 -107
- package/lib/commonjs/components/SegmentedControl/SegmentedControl.js +22 -11
- package/lib/commonjs/components/Select/Select.js +62 -91
- package/lib/commonjs/components/Skeleton/Skeleton.js +131 -174
- package/lib/commonjs/components/Skeleton/SkeletonClock.js +117 -0
- package/lib/commonjs/components/Skeleton/SkeletonContent.js +164 -81
- package/lib/commonjs/components/Skeleton/SkeletonProvider.js +72 -10
- package/lib/commonjs/components/Skeleton/index.js +17 -16
- package/lib/commonjs/components/Slider/Slider.js +44 -25
- package/lib/commonjs/components/Stepper/Stepper.js +199 -29
- package/lib/commonjs/components/Swipeable/Swipeable.js +36 -19
- package/lib/commonjs/components/Switch/Switch.js +9 -2
- package/lib/commonjs/components/Tabs/Tabs.js +84 -21
- package/lib/commonjs/components/TimePicker/TimePicker.js +123 -45
- package/lib/commonjs/components/Toast/Toast.js +27 -16
- package/lib/commonjs/components/Tooltip/Tooltip.js +56 -32
- package/lib/commonjs/components/index.js +37 -37
- package/lib/commonjs/theme/tokens.js +55 -7
- package/lib/module/components/Accordion/Accordion.js +61 -20
- package/lib/module/components/AppBar/AppBar.js +29 -20
- package/lib/module/components/Avatar/Avatar.js +39 -9
- package/lib/module/components/Badge/Badge.js +67 -5
- package/lib/module/components/Banner/Banner.js +147 -67
- package/lib/module/components/BottomNavigation/BottomNavigation.js +37 -15
- package/lib/module/components/BottomSheet/BottomSheet.js +80 -55
- package/lib/module/components/Button/Button.js +12 -5
- package/lib/module/components/Card/Card.js +107 -17
- package/lib/module/components/Carousel/Carousel.js +67 -13
- package/lib/module/components/Checkbox/Checkbox.js +11 -7
- package/lib/module/components/Chip/Chip.js +45 -13
- package/lib/module/components/DatePicker/DatePicker.js +185 -76
- package/lib/module/components/DateRangePicker/DateRangePicker.js +134 -60
- package/lib/module/components/Dialog/Dialog.js +16 -10
- package/lib/module/components/Drawer/Drawer.js +13 -10
- package/lib/module/components/FieldBase/FieldBase.js +485 -0
- package/lib/module/components/FieldBase/index.js +4 -0
- package/lib/module/components/FloatingActionButton/FloatingActionButton.js +69 -44
- package/lib/module/components/ForceUpdateDialog/ForceUpdateDialog.js +8 -2
- package/lib/module/components/FormField/FormField.js +3 -2
- package/lib/module/components/ImageGallery/ImageGallery.js +128 -40
- package/lib/module/components/Input/Input.js +144 -179
- package/lib/module/components/ListItem/ListItem.js +91 -12
- package/lib/module/components/Modal/Modal.js +55 -27
- package/lib/module/components/NumberInput/NumberInput.js +60 -106
- package/lib/module/components/OTPInput/OTPInput.js +65 -58
- package/lib/module/components/PickerTrigger/PickerTrigger.js +181 -0
- package/lib/module/components/PickerTrigger/index.js +4 -0
- package/lib/module/components/ProgressBar/ProgressBar.js +19 -11
- package/lib/module/components/Radio/Radio.js +11 -6
- package/lib/module/components/Rating/Rating.js +86 -20
- package/lib/module/components/SearchBar/SearchBar.js +90 -107
- package/lib/module/components/SegmentedControl/SegmentedControl.js +22 -11
- package/lib/module/components/Select/Select.js +62 -91
- package/lib/module/components/Skeleton/Skeleton.js +135 -175
- package/lib/module/components/Skeleton/SkeletonClock.js +110 -0
- package/lib/module/components/Skeleton/SkeletonContent.js +167 -84
- package/lib/module/components/Skeleton/SkeletonProvider.js +71 -10
- package/lib/module/components/Skeleton/index.js +3 -2
- package/lib/module/components/Slider/Slider.js +44 -25
- package/lib/module/components/Stepper/Stepper.js +201 -31
- package/lib/module/components/Swipeable/Swipeable.js +36 -19
- package/lib/module/components/Switch/Switch.js +9 -2
- package/lib/module/components/Tabs/Tabs.js +84 -21
- package/lib/module/components/TimePicker/TimePicker.js +123 -45
- package/lib/module/components/Toast/Toast.js +27 -16
- package/lib/module/components/Tooltip/Tooltip.js +56 -32
- package/lib/module/components/index.js +2 -2
- package/lib/module/theme/tokens.js +55 -7
- package/lib/typescript/commonjs/components/Accordion/Accordion.d.ts +10 -5
- package/lib/typescript/commonjs/components/AppBar/AppBar.d.ts +8 -0
- package/lib/typescript/commonjs/components/Avatar/Avatar.d.ts +12 -6
- package/lib/typescript/commonjs/components/Badge/Badge.d.ts +7 -6
- package/lib/typescript/commonjs/components/Banner/Banner.d.ts +17 -6
- package/lib/typescript/commonjs/components/BottomSheet/BottomSheet.d.ts +7 -0
- package/lib/typescript/commonjs/components/Card/Card.d.ts +17 -6
- package/lib/typescript/commonjs/components/Carousel/Carousel.d.ts +7 -6
- package/lib/typescript/commonjs/components/Checkbox/Checkbox.d.ts +9 -1
- package/lib/typescript/commonjs/components/Chip/Chip.d.ts +13 -6
- package/lib/typescript/commonjs/components/DatePicker/DatePicker.d.ts +38 -3
- package/lib/typescript/commonjs/components/DateRangePicker/DateRangePicker.d.ts +36 -3
- package/lib/typescript/commonjs/components/Dialog/Dialog.d.ts +13 -1
- package/lib/typescript/commonjs/components/FieldBase/FieldBase.d.ts +172 -0
- package/lib/typescript/commonjs/components/FieldBase/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/FloatingActionButton/FloatingActionButton.d.ts +8 -6
- package/lib/typescript/commonjs/components/FloatingActionButton/index.d.ts +1 -1
- package/lib/typescript/commonjs/components/ForceUpdateDialog/ForceUpdateDialog.d.ts +7 -0
- package/lib/typescript/commonjs/components/FormField/FormField.d.ts +7 -0
- package/lib/typescript/commonjs/components/ImageGallery/ImageGallery.d.ts +6 -4
- package/lib/typescript/commonjs/components/Input/Input.d.ts +7 -1
- package/lib/typescript/commonjs/components/ListItem/ListItem.d.ts +13 -6
- package/lib/typescript/commonjs/components/NumberInput/NumberInput.d.ts +3 -0
- package/lib/typescript/commonjs/components/PickerTrigger/PickerTrigger.d.ts +57 -0
- package/lib/typescript/commonjs/components/PickerTrigger/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/ProgressBar/ProgressBar.d.ts +2 -0
- package/lib/typescript/commonjs/components/Radio/Radio.d.ts +3 -0
- package/lib/typescript/commonjs/components/Rating/Rating.d.ts +9 -6
- package/lib/typescript/commonjs/components/SegmentedControl/SegmentedControl.d.ts +3 -0
- package/lib/typescript/commonjs/components/Skeleton/Skeleton.d.ts +49 -20
- package/lib/typescript/commonjs/components/Skeleton/SkeletonClock.d.ts +60 -0
- package/lib/typescript/commonjs/components/Skeleton/SkeletonContent.d.ts +80 -19
- package/lib/typescript/commonjs/components/Skeleton/SkeletonProvider.d.ts +39 -5
- package/lib/typescript/commonjs/components/Skeleton/index.d.ts +6 -4
- package/lib/typescript/commonjs/components/Slider/Slider.d.ts +12 -1
- package/lib/typescript/commonjs/components/Stepper/Stepper.d.ts +18 -6
- package/lib/typescript/commonjs/components/Swipeable/Swipeable.d.ts +2 -0
- package/lib/typescript/commonjs/components/Switch/Switch.d.ts +1 -0
- package/lib/typescript/commonjs/components/Tabs/Tabs.d.ts +26 -2
- package/lib/typescript/commonjs/components/TimePicker/TimePicker.d.ts +36 -3
- package/lib/typescript/commonjs/components/Toast/Toast.d.ts +8 -0
- package/lib/typescript/commonjs/components/Tooltip/Tooltip.d.ts +7 -1
- package/lib/typescript/commonjs/components/index.d.ts +5 -5
- package/lib/typescript/commonjs/index.d.ts +1 -1
- package/lib/typescript/commonjs/theme/index.d.ts +1 -1
- package/lib/typescript/commonjs/theme/types.d.ts +578 -12
- package/lib/typescript/module/components/Accordion/Accordion.d.ts +10 -5
- package/lib/typescript/module/components/AppBar/AppBar.d.ts +8 -0
- package/lib/typescript/module/components/Avatar/Avatar.d.ts +12 -6
- package/lib/typescript/module/components/Badge/Badge.d.ts +7 -6
- package/lib/typescript/module/components/Banner/Banner.d.ts +17 -6
- package/lib/typescript/module/components/BottomSheet/BottomSheet.d.ts +7 -0
- package/lib/typescript/module/components/Card/Card.d.ts +17 -6
- package/lib/typescript/module/components/Carousel/Carousel.d.ts +7 -6
- package/lib/typescript/module/components/Checkbox/Checkbox.d.ts +9 -1
- package/lib/typescript/module/components/Chip/Chip.d.ts +13 -6
- package/lib/typescript/module/components/DatePicker/DatePicker.d.ts +38 -3
- package/lib/typescript/module/components/DateRangePicker/DateRangePicker.d.ts +36 -3
- package/lib/typescript/module/components/Dialog/Dialog.d.ts +13 -1
- package/lib/typescript/module/components/FieldBase/FieldBase.d.ts +172 -0
- package/lib/typescript/module/components/FieldBase/index.d.ts +3 -0
- package/lib/typescript/module/components/FloatingActionButton/FloatingActionButton.d.ts +8 -6
- package/lib/typescript/module/components/FloatingActionButton/index.d.ts +1 -1
- package/lib/typescript/module/components/ForceUpdateDialog/ForceUpdateDialog.d.ts +7 -0
- package/lib/typescript/module/components/FormField/FormField.d.ts +7 -0
- package/lib/typescript/module/components/ImageGallery/ImageGallery.d.ts +6 -4
- package/lib/typescript/module/components/Input/Input.d.ts +7 -1
- package/lib/typescript/module/components/ListItem/ListItem.d.ts +13 -6
- package/lib/typescript/module/components/NumberInput/NumberInput.d.ts +3 -0
- package/lib/typescript/module/components/PickerTrigger/PickerTrigger.d.ts +57 -0
- package/lib/typescript/module/components/PickerTrigger/index.d.ts +3 -0
- package/lib/typescript/module/components/ProgressBar/ProgressBar.d.ts +2 -0
- package/lib/typescript/module/components/Radio/Radio.d.ts +3 -0
- package/lib/typescript/module/components/Rating/Rating.d.ts +9 -6
- package/lib/typescript/module/components/SegmentedControl/SegmentedControl.d.ts +3 -0
- package/lib/typescript/module/components/Skeleton/Skeleton.d.ts +49 -20
- package/lib/typescript/module/components/Skeleton/SkeletonClock.d.ts +60 -0
- package/lib/typescript/module/components/Skeleton/SkeletonContent.d.ts +80 -19
- package/lib/typescript/module/components/Skeleton/SkeletonProvider.d.ts +39 -5
- package/lib/typescript/module/components/Skeleton/index.d.ts +6 -4
- package/lib/typescript/module/components/Slider/Slider.d.ts +12 -1
- package/lib/typescript/module/components/Stepper/Stepper.d.ts +18 -6
- package/lib/typescript/module/components/Swipeable/Swipeable.d.ts +2 -0
- package/lib/typescript/module/components/Switch/Switch.d.ts +1 -0
- package/lib/typescript/module/components/Tabs/Tabs.d.ts +26 -2
- package/lib/typescript/module/components/TimePicker/TimePicker.d.ts +36 -3
- package/lib/typescript/module/components/Toast/Toast.d.ts +8 -0
- package/lib/typescript/module/components/Tooltip/Tooltip.d.ts +7 -1
- package/lib/typescript/module/components/index.d.ts +5 -5
- package/lib/typescript/module/index.d.ts +1 -1
- package/lib/typescript/module/theme/index.d.ts +1 -1
- package/lib/typescript/module/theme/types.d.ts +578 -12
- package/package.json +2 -6
- package/lib/commonjs/components/AppIcon/AppIcon.js +0 -120
- package/lib/commonjs/types/vector-icons.d.js +0 -2
- package/lib/module/components/AppIcon/AppIcon.js +0 -111
- package/lib/module/components/AppIcon/index.js +0 -4
- package/lib/module/types/vector-icons.d.js +0 -2
- package/lib/typescript/commonjs/components/AppIcon/AppIcon.d.ts +0 -20
- package/lib/typescript/commonjs/components/AppIcon/index.d.ts +0 -3
- package/lib/typescript/module/components/AppIcon/AppIcon.d.ts +0 -20
- package/lib/typescript/module/components/AppIcon/index.d.ts +0 -3
|
@@ -20,7 +20,7 @@ export type { LoggerType, RemoteLogger } from './logger';
|
|
|
20
20
|
export { VersionCheck, useVersionCheck } from './versionCheck';
|
|
21
21
|
export type { UpdateInfo, UpdateType, VersionData, VersionComparison, VersionCheckResult, VersionCheckType, ParsedVersion, Platform } from './versionCheck';
|
|
22
22
|
export { ThemeProvider, useTheme, useThemeMode, setTheme, setColorMode, getColorMode, getTheme, resetTheme, subscribeTheme, mergeTheme, lightTheme, darkTheme } from './theme';
|
|
23
|
-
export type { Theme, ThemeOverrides, ThemeProviderProps, ColorMode, ColorPalette, ColorSchemePreference, RadiusScale, ShadowDefinition, ShadowScale, SpacingScale, TypographyScale, MotionScale, DeepPartial } from './theme';
|
|
23
|
+
export type { Theme, ThemeOverrides, ThemeProviderProps, IconRegistry, IconRenderer, ColorMode, ColorPalette, ColorSchemePreference, RadiusScale, ShadowDefinition, ShadowScale, SpacingScale, TypographyScale, MotionScale, DeepPartial } from './theme';
|
|
24
24
|
export { useToggle, useDebounce, usePressAnimation } from './hooks';
|
|
25
25
|
export type { UseToggleResult, UsePressAnimationOptions, UsePressAnimationResult } from './hooks';
|
|
26
26
|
export { ScreenDimensions, Breakpoints, Responsive, isScreenSize, isTablet, Spacing, Padding, Margin, triggerHaptic, setHapticImplementation, shadowStyle, compressImage } from './utils';
|
|
@@ -14,5 +14,5 @@ export type { FontWeightKey } from './textStyle';
|
|
|
14
14
|
export { createAnimatedValue, setNativeValue } from './animatedValue';
|
|
15
15
|
export { Gradient, isGradientAvailable } from './Gradient';
|
|
16
16
|
export type { GradientProps } from './Gradient';
|
|
17
|
-
export type { ColorMode, ColorPalette, GradientDefinition, GradientScale, RadiusScale, ShadowDefinition, ShadowScale, SpacingScale, Theme, ThemeOverrides, TypographyScale, MotionScale, DeepPartial } from './types';
|
|
17
|
+
export type { ColorMode, ColorPalette, GradientDefinition, GradientScale, IconRegistry, IconRenderer, RadiusScale, ShadowDefinition, ShadowScale, SpacingScale, Theme, ThemeOverrides, TypographyScale, MotionScale, DeepPartial } from './types';
|
|
18
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type React from 'react';
|
|
1
2
|
import type { TextStyle, ViewStyle } from 'react-native';
|
|
2
3
|
export type ColorMode = 'light' | 'dark';
|
|
3
4
|
/**
|
|
@@ -59,6 +60,14 @@ export interface ColorPalette {
|
|
|
59
60
|
secondary: string;
|
|
60
61
|
focus: string;
|
|
61
62
|
error: string;
|
|
63
|
+
/**
|
|
64
|
+
* Global outline thickness shared by every input-style control —
|
|
65
|
+
* Input, SearchBar, Select, OTPInput, Checkbox, Radio, outlined Card,
|
|
66
|
+
* outline Chip, Avatar border, outline Button, etc. Library default: 1.5.
|
|
67
|
+
* Component-specific tokens (e.g. `theme.components.input.borderWidth`)
|
|
68
|
+
* still win when set.
|
|
69
|
+
*/
|
|
70
|
+
width: number;
|
|
62
71
|
};
|
|
63
72
|
surface: {
|
|
64
73
|
pressed: string;
|
|
@@ -217,6 +226,12 @@ export interface SearchBarSizeTokens {
|
|
|
217
226
|
fontSize: number;
|
|
218
227
|
iconSize: number;
|
|
219
228
|
gap: number;
|
|
229
|
+
/**
|
|
230
|
+
* Corner radius for the SearchBar box. Defaults to `theme.radius.full` so
|
|
231
|
+
* SearchBar reads as a pill out of the box; brands wanting the same shape
|
|
232
|
+
* as Input / Select can drop this to the matching `field.borderRadius`.
|
|
233
|
+
*/
|
|
234
|
+
borderRadius?: number;
|
|
220
235
|
}
|
|
221
236
|
export interface EmptyStateSizeTokens {
|
|
222
237
|
iconSize: number;
|
|
@@ -265,12 +280,34 @@ export interface DialogTokens {
|
|
|
265
280
|
iconWrapperSize: number;
|
|
266
281
|
iconWrapperBorderRadius: number;
|
|
267
282
|
actionButtonMinHeight: number;
|
|
283
|
+
/** When true, fires a selection haptic on action-button press. Library default: false. */
|
|
284
|
+
actionHaptic?: boolean;
|
|
268
285
|
}
|
|
269
286
|
export interface ToastTokens {
|
|
270
287
|
iconCircleSize: number;
|
|
271
288
|
iconCircleBorderRadius: number;
|
|
272
289
|
iconGlyphFontSize: number;
|
|
273
290
|
tintBarWidth: number;
|
|
291
|
+
/** Default auto-dismiss duration (ms) when toast.duration is unset. 0 = persistent. Library default: 3000. */
|
|
292
|
+
defaultDurationMs?: number;
|
|
293
|
+
/** Enable swipe-to-dismiss pan responder. Library default: true. */
|
|
294
|
+
enableSwipeDismiss?: boolean;
|
|
295
|
+
/** Horizontal swipe distance to dismiss. Library default: 80. */
|
|
296
|
+
swipeDismissThreshold?: number;
|
|
297
|
+
/** Horizontal swipe velocity to dismiss. Library default: 0.5. */
|
|
298
|
+
swipeVelocityThreshold?: number;
|
|
299
|
+
/** Vertical translate per stacked toast. Library default: 8. */
|
|
300
|
+
stackOffset?: number;
|
|
301
|
+
/** Scale decrement per stack index. Library default: 0.04. */
|
|
302
|
+
stackScaleStep?: number;
|
|
303
|
+
/** Lower bound for stack scale. Library default: 0.9. */
|
|
304
|
+
stackMinScale?: number;
|
|
305
|
+
/** Enter-spring damping. Library default: 18. */
|
|
306
|
+
enterSpringDamping?: number;
|
|
307
|
+
/** Enter-spring stiffness. Library default: 180. */
|
|
308
|
+
enterSpringStiffness?: number;
|
|
309
|
+
/** Enter-spring mass. Library default: 1. */
|
|
310
|
+
enterSpringMass?: number;
|
|
274
311
|
}
|
|
275
312
|
export interface FormFieldTokens {
|
|
276
313
|
/** Width of the inline label column when `layout="inline"`. Accepts CSS-like string ("35%") or number. */
|
|
@@ -284,42 +321,569 @@ export interface CheckboxSizeTokens {
|
|
|
284
321
|
boxSize: number;
|
|
285
322
|
}
|
|
286
323
|
export interface CheckboxTokens extends Partial<Record<ComponentSizeKey, CheckboxSizeTokens>> {
|
|
287
|
-
borderWidth?: number;
|
|
288
324
|
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;
|
|
289
337
|
}
|
|
290
338
|
export interface RadioSizeTokens {
|
|
291
339
|
outer: number;
|
|
292
340
|
inner: number;
|
|
293
341
|
}
|
|
294
342
|
export interface RadioTokens extends Partial<Record<ComponentSizeKey, RadioSizeTokens>> {
|
|
295
|
-
borderWidth?: number;
|
|
296
343
|
labelGap?: number;
|
|
344
|
+
/** When true, fires a selection haptic on press by default. Library default: false. */
|
|
345
|
+
pressHaptic?: boolean;
|
|
346
|
+
}
|
|
347
|
+
export interface NumberInputTokens {
|
|
348
|
+
/** Milliseconds before long-press auto-repeat kicks in. Library default: 500. */
|
|
349
|
+
longPressDelayMs?: number;
|
|
350
|
+
/** Milliseconds between auto-repeated step ticks while long-pressed. Library default: 80. */
|
|
351
|
+
longPressIntervalMs?: number;
|
|
352
|
+
/** When true, fires a light impact haptic on every +/- press. Library default: false. */
|
|
353
|
+
pressHaptic?: boolean;
|
|
354
|
+
}
|
|
355
|
+
export interface OTPInputTokens extends Partial<Record<ComponentSizeKey, OTPInputSizeTokens>> {
|
|
356
|
+
/** When true, the row shakes horizontally on first error transition. Library default: false. */
|
|
357
|
+
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
|
+
}
|
|
363
|
+
export interface ProgressBarTokens {
|
|
364
|
+
/** Duration in ms of the indeterminate-loop animation cycle. Library default: 1500. */
|
|
365
|
+
indeterminateLoopDuration?: number;
|
|
366
|
+
/** Width of the moving bar in indeterminate mode (% string or number). Library default: '30%'. */
|
|
367
|
+
indeterminateWidth?: number | `${number}%`;
|
|
368
|
+
/** Duration in ms of the determinate progress tween. Library default: 400. */
|
|
369
|
+
determinateAnimationDuration?: number;
|
|
370
|
+
}
|
|
371
|
+
export interface RatingTokens {
|
|
372
|
+
/** When true, the tapped star plays a pulse-scale animation. Library default: false. */
|
|
373
|
+
pulseOnPress?: boolean;
|
|
374
|
+
/** Peak scale of the pulse animation. Library default: 1.2. */
|
|
375
|
+
pulseScale?: number;
|
|
376
|
+
/** When true, fires a selection haptic on each rating change. Library default: false. */
|
|
377
|
+
pressHaptic?: boolean;
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* Per-size dimensions for the unified field box (FieldBase). Every
|
|
381
|
+
* input-like control (Input, Select, SearchBar, NumberInput, OTPInput cell,
|
|
382
|
+
* PickerTrigger) inherits these defaults so heights, radii, padding and
|
|
383
|
+
* font sizes stay aligned across the library. Component-specific tokens
|
|
384
|
+
* (e.g. `theme.components.input[size]`) still win when set.
|
|
385
|
+
*/
|
|
386
|
+
export interface FieldSizeTokens {
|
|
387
|
+
paddingHorizontal: number;
|
|
388
|
+
paddingVertical: number;
|
|
389
|
+
minHeight: number;
|
|
390
|
+
fontSize: number;
|
|
391
|
+
borderRadius: number;
|
|
392
|
+
iconSize: number;
|
|
393
|
+
}
|
|
394
|
+
/**
|
|
395
|
+
* One of the four field-box sides. Used everywhere the library accepts
|
|
396
|
+
* per-side overrides for border width / colour.
|
|
397
|
+
*/
|
|
398
|
+
export type FieldSide = 'top' | 'right' | 'bottom' | 'left';
|
|
399
|
+
/**
|
|
400
|
+
* Shorthand-or-longhand value. A bare `T` means "apply to all four sides";
|
|
401
|
+
* an object form lets a consumer set specific sides while the others fall
|
|
402
|
+
* through to whatever the resolver decided. Mirrors how React Native's
|
|
403
|
+
* `borderWidth` + `borderXWidth` (and CSS `border` + `border-X`) compose.
|
|
404
|
+
*/
|
|
405
|
+
export type FieldPerSide<T> = T | Partial<Record<FieldSide, T>>;
|
|
406
|
+
/** Border colour value: a single colour string or a per-side colour map. */
|
|
407
|
+
export type FieldBorderColor = FieldPerSide<string>;
|
|
408
|
+
/** Border width value: a single width or a per-side width map. */
|
|
409
|
+
export type FieldBorderWidth = FieldPerSide<number>;
|
|
410
|
+
/**
|
|
411
|
+
* State-aware fill + border colours for a field variant. Resolution order
|
|
412
|
+
* inside FieldBase: variant token → library default. Idle distinguishes
|
|
413
|
+
* empty vs filled so consumers can tint the resting field differently once
|
|
414
|
+
* the user has typed. When focused/error/disabled fills are omitted, the
|
|
415
|
+
* box animates from the current idle fill to itself (no fill change).
|
|
416
|
+
*
|
|
417
|
+
* Border colour + width are `FieldPerSide` values — pass a bare string /
|
|
418
|
+
* number to set all four sides (the common case), or an object like
|
|
419
|
+
* `{ bottom: '#1A73E8' }` to draw only one side. Sides not specified in the
|
|
420
|
+
* object fall through to the shorthand default.
|
|
421
|
+
*/
|
|
422
|
+
export interface FieldVariantTokens {
|
|
423
|
+
backgroundIdleEmpty: string;
|
|
424
|
+
backgroundIdleFilled?: string;
|
|
425
|
+
backgroundFocused?: string;
|
|
426
|
+
backgroundError?: string;
|
|
427
|
+
backgroundDisabled: string;
|
|
428
|
+
borderIdle: FieldBorderColor;
|
|
429
|
+
borderFocused: FieldBorderColor;
|
|
430
|
+
borderError: FieldBorderColor;
|
|
431
|
+
borderDisabled: FieldBorderColor;
|
|
432
|
+
borderWidth: FieldBorderWidth;
|
|
433
|
+
}
|
|
434
|
+
export interface FieldTokens extends Partial<Record<'sm' | 'md' | 'lg', FieldSizeTokens>> {
|
|
435
|
+
/** Default `variant` when caller doesn't pass one. Library default: 'outlined'. */
|
|
436
|
+
defaultVariant?: 'outlined' | 'filled' | 'underline';
|
|
437
|
+
/** State-aware fill + border colours per variant. */
|
|
438
|
+
outlined?: Partial<FieldVariantTokens>;
|
|
439
|
+
filled?: Partial<FieldVariantTokens>;
|
|
440
|
+
/** Bottom-border-only variant — Material-style underline inputs. */
|
|
441
|
+
underline?: Partial<FieldVariantTokens>;
|
|
442
|
+
/** Text colour for the editable / displayed value. Defaults to `colors.text.primary`. */
|
|
443
|
+
textColor?: string;
|
|
444
|
+
/** Text colour when the field is disabled. Defaults to `colors.text.disabled`. */
|
|
445
|
+
disabledTextColor?: string;
|
|
446
|
+
/** Placeholder text colour. Defaults to `colors.text.tertiary`. */
|
|
447
|
+
placeholderColor?: string;
|
|
448
|
+
/** Font weight for the value text. Defaults to `typography.fontWeight.medium`. */
|
|
449
|
+
fontWeight?: TextStyle['fontWeight'];
|
|
450
|
+
}
|
|
451
|
+
export interface InputFillTokens {
|
|
452
|
+
/** Background colour while idle and the field is empty (no value). */
|
|
453
|
+
idleEmpty?: string;
|
|
454
|
+
/** Background colour while idle and the field has a value. Falls back to `idleEmpty` if undefined. */
|
|
455
|
+
idleFilled?: string;
|
|
456
|
+
/** Background colour while focused. Falls back to the current idle fill if undefined. */
|
|
457
|
+
focus?: string;
|
|
458
|
+
/** Background colour while in error state. Falls back to the current idle fill if undefined. */
|
|
459
|
+
error?: string;
|
|
460
|
+
/** Background colour while disabled. Falls back to `colors.surface.disabled`. */
|
|
461
|
+
disabled?: string;
|
|
297
462
|
}
|
|
298
463
|
export interface InputComponentTokens extends Partial<Record<ComponentSizeKey, InputSizeTokens>> {
|
|
299
464
|
/** Default `variant` when caller doesn't pass one. Library default: 'outlined'. */
|
|
300
|
-
defaultVariant?: 'outlined' | 'filled';
|
|
465
|
+
defaultVariant?: 'outlined' | 'filled' | 'underline';
|
|
301
466
|
/** Default `labelMode` when caller doesn't pass one. Library default: 'float'. */
|
|
302
467
|
defaultLabelMode?: 'float' | 'top';
|
|
468
|
+
/** Corner radius in pixels for the field wrapper. Library default: size-driven (sm=10, md=12, lg=14). */
|
|
469
|
+
borderRadius?: number;
|
|
470
|
+
/**
|
|
471
|
+
* When true, the label switches to `colors.border.focus` while the field is
|
|
472
|
+
* focused. Library default is false — the label stays its resting colour on
|
|
473
|
+
* focus and only the border tints. Error state always uses `colors.error`
|
|
474
|
+
* regardless of this flag.
|
|
475
|
+
*/
|
|
476
|
+
tintLabelOnFocus?: boolean;
|
|
477
|
+
/**
|
|
478
|
+
* When true, the field shakes horizontally and fires an error haptic the
|
|
479
|
+
* moment an error first appears. Library default is false — the border and
|
|
480
|
+
* message turn red without any motion. Opt in for a more Material-Design
|
|
481
|
+
* feel.
|
|
482
|
+
*/
|
|
483
|
+
shakeOnError?: boolean;
|
|
484
|
+
/**
|
|
485
|
+
* State-aware fill colours per variant. When omitted, the library falls
|
|
486
|
+
* back to `colors.background.primary` for outlined idle, `colors.background.secondary`
|
|
487
|
+
* for filled idle, `colors.surface.disabled` when disabled, and keeps focus/error
|
|
488
|
+
* the same as idle. The component interpolates between these the same way
|
|
489
|
+
* it animates the border, so transitions are smooth.
|
|
490
|
+
*/
|
|
491
|
+
fillColors?: {
|
|
492
|
+
outlined?: InputFillTokens;
|
|
493
|
+
filled?: InputFillTokens;
|
|
494
|
+
underline?: InputFillTokens;
|
|
495
|
+
};
|
|
496
|
+
}
|
|
497
|
+
export interface BottomSheetTokens {
|
|
498
|
+
/** Colour of the grab-handle rendered above the sheet content. Library default: `colors.border.primary`. */
|
|
499
|
+
handleColor?: string;
|
|
500
|
+
}
|
|
501
|
+
export interface SelectTokens {
|
|
502
|
+
/** Colour of the grab-handle rendered above the bottom-sheet picker. Library default: `colors.border.primary`. */
|
|
503
|
+
handleColor?: string;
|
|
504
|
+
}
|
|
505
|
+
export interface BottomNavigationTokens {
|
|
506
|
+
/** Pixel size of tab icons. Library default: 24. */
|
|
507
|
+
iconSize?: number;
|
|
508
|
+
/** Height of the pill background drawn behind the active tab when `variant="pill"`. Library default: 36. */
|
|
509
|
+
pillHeight?: number;
|
|
510
|
+
/** Maximum width of the pill background. Library default: 120. */
|
|
511
|
+
pillMaxWidth?: number;
|
|
512
|
+
/** Horizontal inset of the pill from the edges of its tab cell. Library default: 16. */
|
|
513
|
+
pillInset?: number;
|
|
514
|
+
/** Thickness of the underline indicator when `variant="underline"`. Library default: 3. */
|
|
515
|
+
underlineHeight?: number;
|
|
516
|
+
}
|
|
517
|
+
export interface DatePickerTokens {
|
|
518
|
+
/** Opt-in haptic feedback on month/year navigation and selection. Default: false. */
|
|
519
|
+
haptic?: boolean;
|
|
520
|
+
/** Pixel offset for the month-slide animation. Default: 32. */
|
|
521
|
+
monthSlideDistance?: number;
|
|
522
|
+
/** Outgoing month-slide animation duration (ms). Default: theme.motion.duration.fast or 140. */
|
|
523
|
+
monthSlideOutDuration?: number;
|
|
524
|
+
/** Incoming month-slide animation duration (ms). Default: theme.motion.duration.fast or 160. */
|
|
525
|
+
monthSlideInDuration?: number;
|
|
526
|
+
/** Day/year/decade view-transition fade+scale duration (ms). Default: theme.motion.duration.normal or 200. */
|
|
527
|
+
viewTransitionDuration?: number;
|
|
528
|
+
/** Header press-in scale animation duration (ms). Default: 80. */
|
|
529
|
+
headerPressDuration?: number;
|
|
530
|
+
/** Header release scale animation duration (ms). Default: 100. */
|
|
531
|
+
headerReleaseDuration?: number;
|
|
532
|
+
/** Width/height of the nav (prev/next) buttons. Default: 36. */
|
|
533
|
+
navButtonSize?: number;
|
|
534
|
+
/** Font size of the nav chevron text. Default: 22. */
|
|
535
|
+
navTextFontSize?: number;
|
|
536
|
+
/** Line height of the nav chevron text. Default: 24. */
|
|
537
|
+
navTextLineHeight?: number;
|
|
538
|
+
/** Padding around each day cell. Default: 2. */
|
|
539
|
+
dayCellPadding?: number;
|
|
540
|
+
/** Border radius of the inner day pill. Default: theme.radius.full. */
|
|
541
|
+
dayInnerBorderRadius?: number;
|
|
542
|
+
/** Padding around each year/decade cell. Default: 4. */
|
|
543
|
+
yearCellPadding?: number;
|
|
544
|
+
/** Border radius of the inner year/decade pill. Default: theme.radius.lg. */
|
|
545
|
+
yearInnerBorderRadius?: number;
|
|
546
|
+
/** Margin above the decade range subtitle text. Default: 2. */
|
|
547
|
+
decadeRangeMarginTop?: number;
|
|
548
|
+
/** Min height for the footer cancel/confirm buttons. Default: 40. */
|
|
549
|
+
footerButtonMinHeight?: number;
|
|
550
|
+
}
|
|
551
|
+
export interface DateRangePickerTokens {
|
|
552
|
+
/** Opt-in haptic feedback on month navigation and selection. Default: false. */
|
|
553
|
+
haptic?: boolean;
|
|
554
|
+
/** Pixel offset for the month-slide animation. Default: 32. */
|
|
555
|
+
monthSlideDistance?: number;
|
|
556
|
+
/** Outgoing month-slide animation duration (ms). Default: theme.motion.duration.fast or 140. */
|
|
557
|
+
monthSlideOutDuration?: number;
|
|
558
|
+
/** Incoming month-slide animation duration (ms). Default: theme.motion.duration.fast or 160. */
|
|
559
|
+
monthSlideInDuration?: number;
|
|
560
|
+
/** Width/height of the nav (prev/next) buttons. Default: 36. */
|
|
561
|
+
navButtonSize?: number;
|
|
562
|
+
/** Font size of the nav chevron text. Default: 22. */
|
|
563
|
+
navTextFontSize?: number;
|
|
564
|
+
/** Line height of the nav chevron text. Default: 24. */
|
|
565
|
+
navTextLineHeight?: number;
|
|
566
|
+
/** Min height for the footer cancel/confirm buttons. Default: 40. */
|
|
567
|
+
footerButtonMinHeight?: number;
|
|
568
|
+
}
|
|
569
|
+
export interface TimePickerTokens {
|
|
570
|
+
/** Opt-in haptic feedback on wheel scroll and confirm/cancel. Default: false. */
|
|
571
|
+
haptic?: boolean;
|
|
572
|
+
/** Debounce window between scroll-haptic ticks (ms). Default: 35. */
|
|
573
|
+
hapticDebounceMs?: number;
|
|
574
|
+
/** Width of the bottom-sheet drag handle. Default: 36. */
|
|
575
|
+
handleWidth?: number;
|
|
576
|
+
/** Height of the bottom-sheet drag handle. Default: 4. */
|
|
577
|
+
handleHeight?: number;
|
|
578
|
+
}
|
|
579
|
+
export interface AvatarTokens {
|
|
580
|
+
/** Border width applied to the avatar wrapper. Library default: 0. */
|
|
581
|
+
borderWidth?: number;
|
|
582
|
+
/** Border colour applied to the avatar wrapper. Falls back to `colors.border.primary`. */
|
|
583
|
+
borderColor?: string;
|
|
584
|
+
/** Border width of the status indicator's ring. Library default: 2. */
|
|
585
|
+
statusBorderWidth?: number;
|
|
586
|
+
/** Border colour of the status indicator's ring. Falls back to `colors.background.elevated`. */
|
|
587
|
+
statusBorderColor?: string;
|
|
588
|
+
/**
|
|
589
|
+
* Initials font size as a fraction of avatar dimension. Library default: 0.4
|
|
590
|
+
* (i.e. md avatar at 48px → 19px initials). Increase for larger initials.
|
|
591
|
+
*/
|
|
592
|
+
fontSizeRatio?: number;
|
|
593
|
+
/**
|
|
594
|
+
* Absolute initials font size in pixels. Wins over `fontSizeRatio` when set.
|
|
595
|
+
* Use only when the design needs a fixed size regardless of avatar dimension.
|
|
596
|
+
*/
|
|
597
|
+
fontSize?: number;
|
|
598
|
+
/**
|
|
599
|
+
* Font weight key for the initials text. Library default: 'semibold'.
|
|
600
|
+
*/
|
|
601
|
+
fontWeight?: keyof TypographyScale['fontWeight'];
|
|
602
|
+
}
|
|
603
|
+
export interface AccordionTokens {
|
|
604
|
+
/** When true, fires a selection haptic on header press. Library default: false. */
|
|
605
|
+
pressHaptic?: boolean;
|
|
606
|
+
/** Vertical padding inside the `card` variant container. Library default: 4. */
|
|
607
|
+
cardPaddingVertical?: number;
|
|
608
|
+
}
|
|
609
|
+
export interface AppBarTokens {
|
|
610
|
+
/** When true, fires a selection haptic on action-button press. Library default: false. */
|
|
611
|
+
pressHaptic?: boolean;
|
|
612
|
+
/** Min-width of the left/right side action slots. Library default: 48. */
|
|
613
|
+
sideSlotMinWidth?: number;
|
|
614
|
+
/** Translate-Y distance (px, negative) the large title travels when collapsing. Library default: -20. */
|
|
615
|
+
collapseTranslateDistance?: number;
|
|
616
|
+
/** Margin between title and subtitle. */
|
|
617
|
+
subtitleMarginTop?: number;
|
|
618
|
+
/** Width/height of each action button (square). */
|
|
619
|
+
actionButtonSize?: number;
|
|
620
|
+
/** Top/right inset of the right-action badge bubble. */
|
|
621
|
+
badgeOffset?: number;
|
|
622
|
+
/** Min-width of the right-action badge bubble. */
|
|
623
|
+
badgeMinWidth?: number;
|
|
624
|
+
/** Height of the right-action badge bubble. */
|
|
625
|
+
badgeHeight?: number;
|
|
626
|
+
/** Horizontal padding inside the right-action badge bubble. */
|
|
627
|
+
badgePaddingHorizontal?: number;
|
|
628
|
+
/** Font size of the badge count text. */
|
|
629
|
+
badgeFontSize?: number;
|
|
630
|
+
/** Line height of the badge count text. */
|
|
631
|
+
badgeLineHeight?: number;
|
|
632
|
+
}
|
|
633
|
+
export interface BannerTokens {
|
|
634
|
+
tintBarWidth?: number;
|
|
635
|
+
iconCircleSize?: number;
|
|
636
|
+
iconCircleRadius?: number;
|
|
637
|
+
iconGlyphFontSize?: number;
|
|
638
|
+
iconGlyphLineHeight?: number;
|
|
639
|
+
closeButtonSize?: number;
|
|
640
|
+
closeButtonRadius?: number;
|
|
641
|
+
closeGlyphFontSize?: number;
|
|
642
|
+
closeButtonMarginLeft?: number;
|
|
643
|
+
containerPaddingLeft?: number;
|
|
644
|
+
iconGap?: number;
|
|
645
|
+
textBlockPaddingRight?: number;
|
|
646
|
+
actionsRowMarginTop?: number;
|
|
647
|
+
actionsRowGap?: number;
|
|
648
|
+
actionButtonPaddingHorizontal?: number;
|
|
649
|
+
actionButtonPaddingVertical?: number;
|
|
650
|
+
actionButtonRadius?: number;
|
|
651
|
+
}
|
|
652
|
+
export interface CardTokens {
|
|
653
|
+
/** When true, fires a selection haptic on interactive card press. Library default: false. */
|
|
654
|
+
pressHaptic?: boolean;
|
|
655
|
+
}
|
|
656
|
+
export interface DrawerTokens {
|
|
657
|
+
/** Pixel velocity above which a fling closes the drawer. Library default: 1000. */
|
|
658
|
+
closeVelocityThreshold?: number;
|
|
659
|
+
/** Pixel drag distance before the gesture is recognised. Library default: 10. */
|
|
660
|
+
dragActivationOffset?: number;
|
|
661
|
+
/** When true, fires a selection haptic on backdrop press. Library default: false. */
|
|
662
|
+
backdropPressHaptic?: boolean;
|
|
663
|
+
}
|
|
664
|
+
export interface FloatingActionButtonTokens {
|
|
665
|
+
/** Horizontal inset from screen edge for bottomLeft/bottomRight positions. Library default: 24. */
|
|
666
|
+
edgeOffset?: number;
|
|
667
|
+
/** Default `bottomOffset` when the prop is not passed. Library default: 24. */
|
|
668
|
+
bottomOffset?: number;
|
|
669
|
+
/** Vertical gap between stacked secondary actions in the group. Library default: 16. */
|
|
670
|
+
secondaryGap?: number;
|
|
671
|
+
/** Per-item stagger delay in ms when opening/closing the group. Library default: 50. */
|
|
672
|
+
staggerMs?: number;
|
|
673
|
+
/** When true, fires impactLight on press / open / action. Library default: false. */
|
|
674
|
+
pressHaptic?: boolean;
|
|
675
|
+
}
|
|
676
|
+
export interface ImageGalleryTokens {
|
|
677
|
+
/** Maximum pinch-zoom scale. Library default: 4. */
|
|
678
|
+
maxScale?: number;
|
|
679
|
+
/** Minimum pinch-zoom scale (1 = fit). Library default: 1. */
|
|
680
|
+
minScale?: number;
|
|
681
|
+
/** Scale applied on double-tap at rest. Library default: 2. */
|
|
682
|
+
doubleTapScale?: number;
|
|
683
|
+
/** When true, fires haptics on open/close/swipe/double-tap. Library default: false. */
|
|
684
|
+
pressHaptic?: boolean;
|
|
685
|
+
}
|
|
686
|
+
export interface ModalTokens {
|
|
687
|
+
/** Initial scale value for the centred presentation enter animation. Library default: 0.9. */
|
|
688
|
+
scaleStartValue?: number;
|
|
689
|
+
/** When true, fires a selection haptic on backdrop dismiss. Library default: false. */
|
|
690
|
+
backdropHaptic?: boolean;
|
|
691
|
+
}
|
|
692
|
+
export interface SegmentedControlSizeTokens {
|
|
693
|
+
height?: number;
|
|
694
|
+
fontSize?: number;
|
|
695
|
+
paddingHorizontal?: number;
|
|
696
|
+
}
|
|
697
|
+
export interface SegmentedControlTokens extends Partial<Record<'sm' | 'md', SegmentedControlSizeTokens>> {
|
|
698
|
+
/** Padding between the track edge and the selected indicator. Library default: 2. */
|
|
699
|
+
trackPadding?: number;
|
|
700
|
+
/** When true, fires a selection haptic on segment change. Library default: false. */
|
|
701
|
+
changeHaptic?: boolean;
|
|
702
|
+
}
|
|
703
|
+
export interface SliderSizeTokens {
|
|
704
|
+
trackHeight?: number;
|
|
705
|
+
thumbDiameter?: number;
|
|
706
|
+
}
|
|
707
|
+
export interface SliderTokens extends Partial<Record<ComponentSizeKey, SliderSizeTokens>> {
|
|
708
|
+
/** When true, the thumb plays a scale-up animation while pressed. Library default: false. */
|
|
709
|
+
thumbPressAnimation?: boolean;
|
|
710
|
+
/** Peak scale of the thumb press animation. Library default: 1.15. */
|
|
711
|
+
thumbPressScale?: number;
|
|
712
|
+
/** Duration in ms of the bubble-label fade. Library default: 120. */
|
|
713
|
+
labelShowDuration?: number;
|
|
714
|
+
/** Final opacity of the bubble label when visible. Library default: 1. */
|
|
715
|
+
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
|
+
}
|
|
725
|
+
export interface StepperTokens {
|
|
726
|
+
/** Diameter of each step circle. Library default: 24. */
|
|
727
|
+
circleSize?: number;
|
|
728
|
+
/** Diameter of the surrounding pulse ring. Library default: 32. */
|
|
729
|
+
pulseSize?: number;
|
|
730
|
+
/** Duration in ms of one pulse cycle. Library default: 1100. */
|
|
731
|
+
pulseDuration?: number;
|
|
732
|
+
/** When true, the active step animates a continuous pulse ring. Library default: false. */
|
|
733
|
+
pulseAnimation?: boolean;
|
|
734
|
+
/** When true, fires a selection haptic on step press. Library default: false. */
|
|
735
|
+
pressHaptic?: boolean;
|
|
736
|
+
}
|
|
737
|
+
export interface SwipeableTokens {
|
|
738
|
+
/** Pixel distance after which a partial-swipe action commits on release. Library default: 64. */
|
|
739
|
+
threshold?: number;
|
|
740
|
+
/** Pixel distance after which a full-swipe (delete) gesture fires. Library default: 240. */
|
|
741
|
+
fullSwipeThreshold?: number;
|
|
742
|
+
/** Pixel drag offset before the horizontal gesture activates. Library default: 10. */
|
|
743
|
+
dragActivationOffset?: number;
|
|
744
|
+
/** Rubber-band resistance factor when swiping past the action area. Library default: 0.25. */
|
|
745
|
+
rubberBandFactor?: number;
|
|
746
|
+
/** Vertical pixel offset before the gesture is rejected (lets vertical scroll win). Library default: 15. */
|
|
747
|
+
failOffsetY?: number;
|
|
748
|
+
/** Spring damping for snap-back animation. */
|
|
749
|
+
springDamping?: number;
|
|
750
|
+
/** Spring stiffness for snap-back animation. */
|
|
751
|
+
springStiffness?: number;
|
|
752
|
+
/** Spring mass for snap-back animation. */
|
|
753
|
+
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
|
+
}
|
|
761
|
+
export interface TabsTokens {
|
|
762
|
+
/** Horizontal padding of each tab. Library default: theme.spacing.lg. */
|
|
763
|
+
tabPaddingHorizontal?: number;
|
|
764
|
+
/** Vertical padding of each tab. Library default: theme.spacing.md. */
|
|
765
|
+
tabPaddingVertical?: number;
|
|
766
|
+
/** Gap between leading icon and label. Library default: 6. */
|
|
767
|
+
tabIconSpacing?: number;
|
|
768
|
+
/** Underline indicator thickness (underline variant). Library default: 2. */
|
|
769
|
+
underlineHeight?: number;
|
|
770
|
+
/** Vertical inset of pill indicator from row edges (pills variant). Library default: 4. */
|
|
771
|
+
pillInset?: number;
|
|
772
|
+
/** Opacity applied to disabled tabs. Library default: 0.45. */
|
|
773
|
+
disabledOpacity?: number;
|
|
774
|
+
/** Gap between label and inline badge. Library default: 6. */
|
|
775
|
+
badgeGap?: number;
|
|
776
|
+
/** When true, fires a selection haptic on tab press. Library default: false. */
|
|
777
|
+
hapticOnPress?: boolean;
|
|
778
|
+
}
|
|
779
|
+
export interface TooltipTokens {
|
|
780
|
+
/** Gap between trigger and tooltip card. Library default: 8. */
|
|
781
|
+
gap?: number;
|
|
782
|
+
/** Minimum padding from screen edges. Library default: 8. */
|
|
783
|
+
screenPadding?: number;
|
|
784
|
+
/** Auto-hide delay for `trigger='press'`. Library default: 4000. */
|
|
785
|
+
pressAutoHideMs?: number;
|
|
786
|
+
/** Half the arrow base width. Library default: 4. */
|
|
787
|
+
arrowHalfWidth?: number;
|
|
788
|
+
/** Arrow height (pointing dimension). Library default: 6. */
|
|
789
|
+
arrowHeight?: number;
|
|
790
|
+
/** Min distance of arrow tip from card corner. Library default: 12. */
|
|
791
|
+
arrowCornerPadding?: number;
|
|
792
|
+
/** Default `maxWidth` when prop is unset. Library default: 240. */
|
|
793
|
+
maxWidth?: number;
|
|
794
|
+
/** Message Text lineHeight. Library default: 18. */
|
|
795
|
+
lineHeight?: number;
|
|
796
|
+
/** Opt-in scale-from-0.85 entry/exit animation. Library default: false (opacity-only). */
|
|
797
|
+
enableScaleAnimation?: boolean;
|
|
798
|
+
/** Duration of fade/scale exit. Library default: 150. */
|
|
799
|
+
exitDurationMs?: number;
|
|
303
800
|
}
|
|
304
801
|
export interface ComponentTokens {
|
|
802
|
+
accordion?: AccordionTokens;
|
|
803
|
+
appBar?: AppBarTokens;
|
|
804
|
+
avatar?: AvatarTokens;
|
|
805
|
+
banner?: BannerTokens;
|
|
305
806
|
button?: Partial<Record<ComponentSizeKey, ButtonSizeTokens>>;
|
|
807
|
+
badge?: BadgeTokens;
|
|
808
|
+
bottomNavigation?: BottomNavigationTokens;
|
|
809
|
+
bottomSheet?: BottomSheetTokens;
|
|
810
|
+
card?: CardTokens;
|
|
811
|
+
checkbox?: CheckboxTokens;
|
|
812
|
+
chip?: ChipTokens;
|
|
813
|
+
datePicker?: DatePickerTokens;
|
|
814
|
+
dateRangePicker?: DateRangePickerTokens;
|
|
815
|
+
dialog?: DialogTokens;
|
|
816
|
+
drawer?: DrawerTokens;
|
|
817
|
+
emptyState?: Partial<Record<ComponentSizeKey, EmptyStateSizeTokens>>;
|
|
818
|
+
/**
|
|
819
|
+
* Shared dimensions + state colours for every input-like control. Acts as
|
|
820
|
+
* the single source of truth for height / radius / padding / fill / border
|
|
821
|
+
* across Input, Select, SearchBar, NumberInput, OTPInput cells and
|
|
822
|
+
* PickerTrigger. Per-component tokens still override when set.
|
|
823
|
+
*/
|
|
824
|
+
field?: FieldTokens;
|
|
825
|
+
floatingActionButton?: FloatingActionButtonTokens;
|
|
826
|
+
formField?: FormFieldTokens;
|
|
827
|
+
imageGallery?: ImageGalleryTokens;
|
|
306
828
|
input?: InputComponentTokens;
|
|
829
|
+
listItem?: ListItemTokens;
|
|
830
|
+
modal?: ModalTokens;
|
|
831
|
+
numberInput?: NumberInputTokens;
|
|
832
|
+
otpInput?: OTPInputTokens;
|
|
833
|
+
progressBar?: ProgressBarTokens;
|
|
834
|
+
radio?: RadioTokens;
|
|
835
|
+
rating?: RatingTokens;
|
|
307
836
|
searchBar?: Partial<Record<ComponentSizeKey, SearchBarSizeTokens>> & {
|
|
308
837
|
cancelButtonWidth?: number;
|
|
838
|
+
/**
|
|
839
|
+
* Default `variant` when caller doesn't pass one. Library default:
|
|
840
|
+
* `'filled'` (pill-shaped, borderless). Set this to `'outlined'` to make
|
|
841
|
+
* SearchBar pick up the same fill / border / focus treatment as Input,
|
|
842
|
+
* Select, OTPInput etc. — useful when a brand has unified its inputs.
|
|
843
|
+
* Falls through to `components.field.defaultVariant` when undefined.
|
|
844
|
+
*/
|
|
845
|
+
defaultVariant?: 'outlined' | 'filled';
|
|
309
846
|
};
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
radio?: RadioTokens;
|
|
847
|
+
segmentedControl?: SegmentedControlTokens;
|
|
848
|
+
select?: SelectTokens;
|
|
849
|
+
slider?: SliderTokens;
|
|
850
|
+
stepper?: StepperTokens;
|
|
851
|
+
swipeable?: SwipeableTokens;
|
|
316
852
|
switch?: Partial<Record<ComponentSizeKey, SwitchSizeTokens>> & {
|
|
317
853
|
thumbColor?: string;
|
|
318
854
|
};
|
|
319
|
-
|
|
320
|
-
|
|
855
|
+
tabs?: TabsTokens;
|
|
856
|
+
timePicker?: TimePickerTokens;
|
|
321
857
|
toast?: ToastTokens;
|
|
322
|
-
|
|
858
|
+
tooltip?: TooltipTokens;
|
|
859
|
+
}
|
|
860
|
+
/**
|
|
861
|
+
* Renderer signature for theme-level icons. Each registry entry receives a
|
|
862
|
+
* pixel `size` and a `color` and returns whatever JSX the consumer wants —
|
|
863
|
+
* an SVG, a vector-icons glyph, an Image, an emoji-wrapped Text, anything.
|
|
864
|
+
*/
|
|
865
|
+
export type IconRenderer = (props: {
|
|
866
|
+
size: number;
|
|
867
|
+
color: string;
|
|
868
|
+
}) => React.ReactNode;
|
|
869
|
+
/**
|
|
870
|
+
* Theme-level icon registry. Library components read from this when they
|
|
871
|
+
* need to render an icon internally (Input password toggle, SearchBar
|
|
872
|
+
* magnifier/clear, ImageGallery close, etc.). Consumers provide the
|
|
873
|
+
* implementations — the library ships with no icon dependency.
|
|
874
|
+
*
|
|
875
|
+
* Slots default to `undefined` — if a slot is missing the library renders
|
|
876
|
+
* a small text/SVG fallback (or nothing, depending on the call site).
|
|
877
|
+
*/
|
|
878
|
+
export interface IconRegistry {
|
|
879
|
+
/** Magnifier icon — SearchBar leading slot when no `leftIcon` prop. */
|
|
880
|
+
search?: IconRenderer;
|
|
881
|
+
/** Close/dismiss icon — SearchBar clear, ImageGallery close, etc. */
|
|
882
|
+
close?: IconRenderer;
|
|
883
|
+
/** Show-password icon — Input password toggle (visible state). */
|
|
884
|
+
eye?: IconRenderer;
|
|
885
|
+
/** Hide-password icon — Input password toggle (masked state). */
|
|
886
|
+
eyeOff?: IconRenderer;
|
|
323
887
|
}
|
|
324
888
|
export interface Theme {
|
|
325
889
|
mode: ColorMode;
|
|
@@ -330,6 +894,8 @@ export interface Theme {
|
|
|
330
894
|
shadows: ShadowScale;
|
|
331
895
|
motion: MotionScale;
|
|
332
896
|
components: ComponentTokens;
|
|
897
|
+
/** Theme-level icon registry — see {@link IconRegistry}. */
|
|
898
|
+
icons?: IconRegistry;
|
|
333
899
|
/**
|
|
334
900
|
* Optional brand gradient palette. Empty by default — consumers register
|
|
335
901
|
* their own via theme overrides. Components that accept gradient inputs
|