@webority/mobile-ui 0.18.0 → 0.19.0
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/canvasKit/index.js +1 -1
- package/lib/commonjs/components/Accordion/Accordion.js +1 -1
- package/lib/commonjs/components/AppBar/AppBar.js +1 -1
- package/lib/commonjs/components/Avatar/Avatar.js +1 -1
- package/lib/commonjs/components/Badge/Badge.js +1 -1
- package/lib/commonjs/components/Banner/Banner.js +1 -1
- package/lib/commonjs/components/BarChart/BarChart.js +1 -1
- package/lib/commonjs/components/BottomNavigation/BottomNavigation.js +1 -1
- package/lib/commonjs/components/BottomSheet/BottomSheet.js +1 -1
- package/lib/commonjs/components/Box/Box.js +1 -1
- package/lib/commonjs/components/Button/Button.js +1 -1
- package/lib/commonjs/components/Calendar/calendarStyles.js +1 -1
- package/lib/commonjs/components/Card/Card.js +1 -1
- package/lib/commonjs/components/Carousel/Carousel.js +1 -1
- package/lib/commonjs/components/Checkbox/Checkbox.js +1 -1
- package/lib/commonjs/components/Chip/Chip.js +1 -1
- package/lib/commonjs/components/ChoiceGroup/ChoiceGroup.js +1 -1
- package/lib/commonjs/components/Composer/Composer.js +1 -1
- package/lib/commonjs/components/DatePicker/DatePicker.js +1 -1
- package/lib/commonjs/components/DateRangePicker/DateRangePicker.js +1 -1
- package/lib/commonjs/components/Descriptions/Descriptions.js +1 -1
- package/lib/commonjs/components/Dialog/Dialog.js +1 -1
- package/lib/commonjs/components/EmptyState/EmptyState.js +1 -1
- package/lib/commonjs/components/FieldBase/ChoiceText.js +1 -1
- package/lib/commonjs/components/FieldBase/FieldBase.js +1 -1
- package/lib/commonjs/components/FieldBase/index.js +1 -1
- package/lib/commonjs/components/FieldBase/useFloatingLabel.js +1 -1
- package/lib/commonjs/components/FilePicker/FilePicker.js +1 -1
- package/lib/commonjs/components/FloatingActionButton/FloatingActionButton.js +1 -1
- package/lib/commonjs/components/ImageGallery/ImageGallery.js +1 -1
- package/lib/commonjs/components/InlineSelect/InlineSelect.js +1 -1
- package/lib/commonjs/components/Input/Input.js +1 -1
- package/lib/commonjs/components/ListItem/ListItem.js +1 -1
- package/lib/commonjs/components/Markdown/Markdown.js +1 -1
- package/lib/commonjs/components/MessageBubble/MessageBubble.js +1 -1
- package/lib/commonjs/components/MessageList/MessageList.js +1 -1
- package/lib/commonjs/components/Modal/Modal.js +1 -1
- package/lib/commonjs/components/NumberInput/NumberInput.js +1 -1
- package/lib/commonjs/components/OTPInput/OTPInput.js +1 -1
- package/lib/commonjs/components/OptionSheet/OptionSheet.js +1 -1
- package/lib/commonjs/components/PaymentResult/PaymentResult.js +1 -1
- package/lib/commonjs/components/PhoneNumberInput/PhoneNumberInput.js +1 -1
- package/lib/commonjs/components/PickerTrigger/PickerTrigger.js +1 -1
- package/lib/commonjs/components/ProfileCompletion/ProfileCompletion.js +1 -1
- package/lib/commonjs/components/ProfilePicker/ProfilePicker.js +1 -1
- package/lib/commonjs/components/ProgressBar/ProgressBar.js +1 -1
- package/lib/commonjs/components/Radio/Radio.js +1 -1
- package/lib/commonjs/components/Radio/RadioDot.js +1 -1
- package/lib/commonjs/components/Rating/Rating.js +1 -1
- package/lib/commonjs/components/ScannerOverlay/ScannerOverlay.js +1 -1
- package/lib/commonjs/components/SearchBar/SearchBar.js +1 -1
- package/lib/commonjs/components/SegmentedControl/SegmentedControl.js +1 -1
- package/lib/commonjs/components/Select/Select.js +1 -1
- package/lib/commonjs/components/Skeleton/Skeleton.js +1 -1
- package/lib/commonjs/components/Skeleton/SkeletonContent.js +1 -1
- package/lib/commonjs/components/SlideToConfirm/SlideToConfirm.js +1 -1
- package/lib/commonjs/components/Slider/Slider.js +1 -1
- package/lib/commonjs/components/SliderField/SliderField.js +1 -1
- package/lib/commonjs/components/Spinner/Spinner.js +1 -1
- package/lib/commonjs/components/StatusBadge/StatusBadge.js +1 -1
- package/lib/commonjs/components/Stepper/Stepper.js +1 -1
- package/lib/commonjs/components/Swipeable/Swipeable.js +1 -1
- package/lib/commonjs/components/Switch/Switch.js +1 -1
- package/lib/commonjs/components/Tabs/Tabs.js +1 -1
- package/lib/commonjs/components/TagInput/TagInput.js +1 -1
- package/lib/commonjs/components/TimePicker/TimePicker.js +1 -1
- package/lib/commonjs/components/Timeline/Timeline.js +1 -1
- package/lib/commonjs/components/Toast/Toast.js +1 -1
- package/lib/commonjs/components/Tooltip/Tooltip.js +1 -1
- package/lib/commonjs/components/Tour/Tour.js +1 -1
- package/lib/commonjs/components/TypingIndicator/TypingIndicator.js +1 -1
- package/lib/commonjs/components/WheelPicker/Wheel.js +1 -1
- package/lib/commonjs/index.js +1 -1
- package/lib/commonjs/network/NetworkStatusBanner.js +1 -1
- package/lib/commonjs/theme/componentSizes.js +1 -0
- package/lib/commonjs/theme/componentTokens.js +1 -0
- package/lib/commonjs/theme/index.js +1 -1
- package/lib/commonjs/theme/merge.js +1 -1
- package/lib/commonjs/theme/retiredThemeKeys.js +1 -0
- package/lib/commonjs/theme/scale.js +1 -0
- package/lib/commonjs/theme/tokens.js +1 -1
- package/lib/commonjs/utils/index.js +1 -1
- package/lib/module/canvasKit/index.js +1 -1
- package/lib/module/components/Accordion/Accordion.js +1 -1
- package/lib/module/components/AppBar/AppBar.js +1 -1
- package/lib/module/components/Avatar/Avatar.js +1 -1
- package/lib/module/components/Badge/Badge.js +1 -1
- package/lib/module/components/Banner/Banner.js +1 -1
- package/lib/module/components/BarChart/BarChart.js +1 -1
- package/lib/module/components/BottomNavigation/BottomNavigation.js +1 -1
- package/lib/module/components/BottomSheet/BottomSheet.js +1 -1
- package/lib/module/components/Box/Box.js +1 -1
- package/lib/module/components/Button/Button.js +1 -1
- package/lib/module/components/Calendar/calendarStyles.js +1 -1
- package/lib/module/components/Card/Card.js +1 -1
- package/lib/module/components/Carousel/Carousel.js +1 -1
- package/lib/module/components/Checkbox/Checkbox.js +1 -1
- package/lib/module/components/Chip/Chip.js +1 -1
- package/lib/module/components/ChoiceGroup/ChoiceGroup.js +1 -1
- package/lib/module/components/Composer/Composer.js +1 -1
- package/lib/module/components/DatePicker/DatePicker.js +1 -1
- package/lib/module/components/DateRangePicker/DateRangePicker.js +1 -1
- package/lib/module/components/Descriptions/Descriptions.js +1 -1
- package/lib/module/components/Dialog/Dialog.js +1 -1
- package/lib/module/components/EmptyState/EmptyState.js +1 -1
- package/lib/module/components/FieldBase/ChoiceText.js +1 -1
- package/lib/module/components/FieldBase/FieldBase.js +1 -1
- package/lib/module/components/FieldBase/index.js +1 -1
- package/lib/module/components/FieldBase/useFloatingLabel.js +1 -1
- package/lib/module/components/FilePicker/FilePicker.js +1 -1
- package/lib/module/components/FloatingActionButton/FloatingActionButton.js +1 -1
- package/lib/module/components/ImageGallery/ImageGallery.js +1 -1
- package/lib/module/components/InlineSelect/InlineSelect.js +1 -1
- package/lib/module/components/Input/Input.js +1 -1
- package/lib/module/components/ListItem/ListItem.js +1 -1
- package/lib/module/components/Markdown/Markdown.js +1 -1
- package/lib/module/components/MessageBubble/MessageBubble.js +1 -1
- package/lib/module/components/MessageList/MessageList.js +1 -1
- package/lib/module/components/Modal/Modal.js +1 -1
- package/lib/module/components/NumberInput/NumberInput.js +1 -1
- package/lib/module/components/OTPInput/OTPInput.js +1 -1
- package/lib/module/components/OptionSheet/OptionSheet.js +1 -1
- package/lib/module/components/PaymentResult/PaymentResult.js +1 -1
- package/lib/module/components/PhoneNumberInput/PhoneNumberInput.js +1 -1
- package/lib/module/components/PickerTrigger/PickerTrigger.js +1 -1
- package/lib/module/components/ProfileCompletion/ProfileCompletion.js +1 -1
- package/lib/module/components/ProfilePicker/ProfilePicker.js +1 -1
- package/lib/module/components/ProgressBar/ProgressBar.js +1 -1
- package/lib/module/components/Radio/Radio.js +1 -1
- package/lib/module/components/Radio/RadioDot.js +1 -1
- package/lib/module/components/Rating/Rating.js +1 -1
- package/lib/module/components/ScannerOverlay/ScannerOverlay.js +1 -1
- package/lib/module/components/SearchBar/SearchBar.js +1 -1
- package/lib/module/components/SegmentedControl/SegmentedControl.js +1 -1
- package/lib/module/components/Select/Select.js +1 -1
- package/lib/module/components/Skeleton/Skeleton.js +1 -1
- package/lib/module/components/Skeleton/SkeletonContent.js +1 -1
- package/lib/module/components/SlideToConfirm/SlideToConfirm.js +1 -1
- package/lib/module/components/Slider/Slider.js +1 -1
- package/lib/module/components/SliderField/SliderField.js +1 -1
- package/lib/module/components/Spinner/Spinner.js +1 -1
- package/lib/module/components/StatusBadge/StatusBadge.js +1 -1
- package/lib/module/components/Stepper/Stepper.js +1 -1
- package/lib/module/components/Swipeable/Swipeable.js +1 -1
- package/lib/module/components/Switch/Switch.js +1 -1
- package/lib/module/components/Tabs/Tabs.js +1 -1
- package/lib/module/components/TagInput/TagInput.js +1 -1
- package/lib/module/components/TimePicker/TimePicker.js +1 -1
- package/lib/module/components/Timeline/Timeline.js +1 -1
- package/lib/module/components/Toast/Toast.js +1 -1
- package/lib/module/components/Tooltip/Tooltip.js +1 -1
- package/lib/module/components/Tour/Tour.js +1 -1
- package/lib/module/components/TypingIndicator/TypingIndicator.js +1 -1
- package/lib/module/components/WheelPicker/Wheel.js +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/network/NetworkStatusBanner.js +1 -1
- package/lib/module/theme/componentSizes.js +1 -0
- package/lib/module/theme/componentTokens.js +1 -0
- package/lib/module/theme/index.js +1 -1
- package/lib/module/theme/merge.js +1 -1
- package/lib/module/theme/retiredThemeKeys.js +1 -0
- package/lib/module/theme/scale.js +1 -0
- package/lib/module/theme/tokens.js +1 -1
- package/lib/module/utils/index.js +1 -1
- package/lib/typescript/commonjs/components/BottomNavigation/BottomNavigation.d.ts +9 -8
- package/lib/typescript/commonjs/components/Box/Box.d.ts +18 -20
- package/lib/typescript/commonjs/components/Calendar/calendarStyles.d.ts +1 -1
- package/lib/typescript/commonjs/components/Card/Card.d.ts +1 -1
- package/lib/typescript/commonjs/components/FieldBase/FieldBase.d.ts +2 -8
- package/lib/typescript/commonjs/components/FieldBase/index.d.ts +1 -1
- package/lib/typescript/commonjs/components/FieldBase/useFloatingLabel.d.ts +3 -2
- package/lib/typescript/commonjs/components/InlineSelect/InlineSelect.d.ts +1 -1
- package/lib/typescript/commonjs/components/Input/Input.d.ts +1 -1
- package/lib/typescript/commonjs/components/PhoneNumberInput/PhoneNumberInput.d.ts +1 -1
- package/lib/typescript/commonjs/components/SearchBar/SearchBar.d.ts +1 -1
- package/lib/typescript/commonjs/components/SegmentedControl/SegmentedControl.d.ts +1 -15
- package/lib/typescript/commonjs/components/Select/Select.d.ts +2 -2
- package/lib/typescript/commonjs/components/Skeleton/Skeleton.d.ts +1 -1
- package/lib/typescript/commonjs/components/Tabs/Tabs.d.ts +1 -1
- package/lib/typescript/commonjs/components/Tour/Tour.d.ts +7 -0
- package/lib/typescript/commonjs/index.d.ts +4 -4
- package/lib/typescript/commonjs/theme/componentSizes.d.ts +27 -0
- package/lib/typescript/commonjs/theme/componentTokens.d.ts +762 -0
- package/lib/typescript/commonjs/theme/index.d.ts +4 -1
- package/lib/typescript/commonjs/theme/retiredThemeKeys.d.ts +22 -0
- package/lib/typescript/commonjs/theme/scale.d.ts +5 -0
- package/lib/typescript/commonjs/theme/types.d.ts +6 -790
- package/lib/typescript/commonjs/utils/index.d.ts +0 -2
- package/lib/typescript/module/components/BottomNavigation/BottomNavigation.d.ts +9 -8
- package/lib/typescript/module/components/Box/Box.d.ts +18 -20
- package/lib/typescript/module/components/Calendar/calendarStyles.d.ts +1 -1
- package/lib/typescript/module/components/Card/Card.d.ts +1 -1
- package/lib/typescript/module/components/FieldBase/FieldBase.d.ts +2 -8
- package/lib/typescript/module/components/FieldBase/index.d.ts +1 -1
- package/lib/typescript/module/components/FieldBase/useFloatingLabel.d.ts +3 -2
- package/lib/typescript/module/components/InlineSelect/InlineSelect.d.ts +1 -1
- package/lib/typescript/module/components/Input/Input.d.ts +1 -1
- package/lib/typescript/module/components/PhoneNumberInput/PhoneNumberInput.d.ts +1 -1
- package/lib/typescript/module/components/SearchBar/SearchBar.d.ts +1 -1
- package/lib/typescript/module/components/SegmentedControl/SegmentedControl.d.ts +1 -15
- package/lib/typescript/module/components/Select/Select.d.ts +2 -2
- package/lib/typescript/module/components/Skeleton/Skeleton.d.ts +1 -1
- package/lib/typescript/module/components/Tabs/Tabs.d.ts +1 -1
- package/lib/typescript/module/components/Tour/Tour.d.ts +7 -0
- package/lib/typescript/module/index.d.ts +4 -4
- package/lib/typescript/module/theme/componentSizes.d.ts +27 -0
- package/lib/typescript/module/theme/componentTokens.d.ts +762 -0
- package/lib/typescript/module/theme/index.d.ts +4 -1
- package/lib/typescript/module/theme/retiredThemeKeys.d.ts +22 -0
- package/lib/typescript/module/theme/scale.d.ts +5 -0
- package/lib/typescript/module/theme/types.d.ts +6 -790
- package/lib/typescript/module/utils/index.d.ts +0 -2
- package/package.json +12 -2
- package/lib/commonjs/utils/spacing.js +0 -1
- package/lib/module/utils/spacing.js +0 -1
- package/lib/typescript/commonjs/utils/spacing.d.ts +0 -61
- package/lib/typescript/module/utils/spacing.d.ts +0 -61
|
@@ -0,0 +1,762 @@
|
|
|
1
|
+
import type { TextStyle } from 'react-native';
|
|
2
|
+
import type { FontSizeKey, RadiusKey, SpacingKey, TypographyScale } from './types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Every component's themable dimensions. Spacing, text size and corner values
|
|
5
|
+
* are scale names (`'md'`, `'base'`), resolved against the active theme at
|
|
6
|
+
* render, so a ThemeProvider override of a scale reaches every component.
|
|
7
|
+
* Dimensions no scale covers (heights, icon boxes, track widths, tap targets)
|
|
8
|
+
* are pixel numbers.
|
|
9
|
+
*
|
|
10
|
+
* A component with a size ladder holds every key for every size in the
|
|
11
|
+
* default theme; optional keys are derived slots (left empty, they follow the
|
|
12
|
+
* colour, motion or component the JSDoc names) or overrides of a default the
|
|
13
|
+
* component keeps in code.
|
|
14
|
+
*/
|
|
15
|
+
export type ComponentSizeKey = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
16
|
+
type Ladder<Size extends string, T> = Record<Size, T>;
|
|
17
|
+
export interface ButtonSizeTokens {
|
|
18
|
+
paddingX: SpacingKey;
|
|
19
|
+
paddingY: SpacingKey;
|
|
20
|
+
minHeight: number;
|
|
21
|
+
text: FontSizeKey;
|
|
22
|
+
radius: RadiusKey;
|
|
23
|
+
/** Pixel size of a `leftIcon` / `rightIcon` given by name. */
|
|
24
|
+
icon: number;
|
|
25
|
+
/** Pixel size of the icon inside a badge disc. */
|
|
26
|
+
badgeIcon: number;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The unified field box every input-like control draws through FieldBase:
|
|
30
|
+
* Input, Select, SearchBar, NumberInput, PickerTrigger, PhoneNumberInput and
|
|
31
|
+
* the pickers built on them.
|
|
32
|
+
*/
|
|
33
|
+
export interface FieldSizeTokens {
|
|
34
|
+
paddingX: SpacingKey;
|
|
35
|
+
paddingY: SpacingKey;
|
|
36
|
+
minHeight: number;
|
|
37
|
+
text: FontSizeKey;
|
|
38
|
+
radius: RadiusKey;
|
|
39
|
+
icon: number;
|
|
40
|
+
/** Static label above the field. */
|
|
41
|
+
labelText: FontSizeKey;
|
|
42
|
+
/** Between the static label and the field box. */
|
|
43
|
+
labelGap: SpacingKey;
|
|
44
|
+
/** Helper and error message below the field. */
|
|
45
|
+
messageText: FontSizeKey;
|
|
46
|
+
/** Between the field box and the message. */
|
|
47
|
+
messageGap: SpacingKey;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* One of the four field-box sides. Used everywhere the library accepts
|
|
51
|
+
* per-side overrides for border width / colour.
|
|
52
|
+
*/
|
|
53
|
+
export type FieldSide = 'top' | 'right' | 'bottom' | 'left';
|
|
54
|
+
/**
|
|
55
|
+
* Shorthand-or-longhand value. A bare `T` means "apply to all four sides";
|
|
56
|
+
* an object form lets a consumer set specific sides while the others fall
|
|
57
|
+
* through to whatever the resolver decided. Mirrors how React Native's
|
|
58
|
+
* `borderWidth` + `borderXWidth` (and CSS `border` + `border-X`) compose.
|
|
59
|
+
*/
|
|
60
|
+
export type FieldPerSide<T> = T | Partial<Record<FieldSide, T>>;
|
|
61
|
+
/** Border colour value: a single colour string or a per-side colour map. */
|
|
62
|
+
export type FieldBorderColor = FieldPerSide<string>;
|
|
63
|
+
/** Border width value: a single width or a per-side width map. */
|
|
64
|
+
export type FieldBorderWidth = FieldPerSide<number>;
|
|
65
|
+
/**
|
|
66
|
+
* State-aware fill + border colours for a field variant. Resolution order
|
|
67
|
+
* inside FieldBase: variant token → library default. Idle distinguishes
|
|
68
|
+
* empty vs filled so consumers can tint the resting field differently once
|
|
69
|
+
* the user has typed. When focused/error/disabled fills are omitted, the
|
|
70
|
+
* box animates from the current idle fill to itself (no fill change).
|
|
71
|
+
*
|
|
72
|
+
* Border colour + width are `FieldPerSide` values — pass a bare string /
|
|
73
|
+
* number to set all four sides (the common case), or an object like
|
|
74
|
+
* `{ bottom: '#1A73E8' }` to draw only one side. Sides not specified in the
|
|
75
|
+
* object fall through to the shorthand default.
|
|
76
|
+
*/
|
|
77
|
+
export interface FieldVariantTokens {
|
|
78
|
+
backgroundIdleEmpty: string;
|
|
79
|
+
backgroundIdleFilled?: string;
|
|
80
|
+
backgroundFocused?: string;
|
|
81
|
+
backgroundError?: string;
|
|
82
|
+
backgroundDisabled: string;
|
|
83
|
+
borderIdle: FieldBorderColor;
|
|
84
|
+
borderFocused: FieldBorderColor;
|
|
85
|
+
borderError: FieldBorderColor;
|
|
86
|
+
borderDisabled: FieldBorderColor;
|
|
87
|
+
borderWidth: FieldBorderWidth;
|
|
88
|
+
}
|
|
89
|
+
export interface FieldTokens extends Ladder<'sm' | 'md' | 'lg', FieldSizeTokens> {
|
|
90
|
+
/** Default `variant` when caller doesn't pass one. Library default: 'outlined'. */
|
|
91
|
+
defaultVariant?: 'outlined' | 'filled' | 'underline';
|
|
92
|
+
/** State-aware fill + border colours per variant. */
|
|
93
|
+
outlined?: Partial<FieldVariantTokens>;
|
|
94
|
+
filled?: Partial<FieldVariantTokens>;
|
|
95
|
+
/** Bottom-border-only variant — Material-style underline inputs. */
|
|
96
|
+
underline?: Partial<FieldVariantTokens>;
|
|
97
|
+
/** Text colour for the editable / displayed value. Defaults to `colors.text.primary`. */
|
|
98
|
+
textColor?: string;
|
|
99
|
+
/** Text colour when the field is disabled. Defaults to `colors.text.disabled`. */
|
|
100
|
+
disabledTextColor?: string;
|
|
101
|
+
/** Placeholder text colour. Defaults to `colors.text.tertiary`. */
|
|
102
|
+
placeholderColor?: string;
|
|
103
|
+
/** Font weight for the value text. Defaults to `typography.fontWeight.medium`. */
|
|
104
|
+
fontWeight?: TextStyle['fontWeight'];
|
|
105
|
+
/**
|
|
106
|
+
* Marker appended (after a space) to a field's label when `required` is set.
|
|
107
|
+
* Shared by the whole field family — Input, Select, FormField, PickerTrigger
|
|
108
|
+
* and the pickers built on it. Defaults to `'*'`.
|
|
109
|
+
*/
|
|
110
|
+
requiredMarker?: string;
|
|
111
|
+
/** Colour of the required marker. Defaults to `colors.error`. */
|
|
112
|
+
requiredMarkerColor?: string;
|
|
113
|
+
}
|
|
114
|
+
export interface InputFillTokens {
|
|
115
|
+
/** Background colour while idle and the field is empty (no value). */
|
|
116
|
+
idleEmpty?: string;
|
|
117
|
+
/** Background colour while idle and the field has a value. Falls back to `idleEmpty` if undefined. */
|
|
118
|
+
idleFilled?: string;
|
|
119
|
+
/** Background colour while focused. Falls back to the current idle fill if undefined. */
|
|
120
|
+
focus?: string;
|
|
121
|
+
/** Background colour while in error state. Falls back to the current idle fill if undefined. */
|
|
122
|
+
error?: string;
|
|
123
|
+
/** Background colour while disabled. Falls back to `colors.surface.disabled`. */
|
|
124
|
+
disabled?: string;
|
|
125
|
+
}
|
|
126
|
+
export interface InputSizeTokens {
|
|
127
|
+
/** Height of a multiline field before it grows with its text. */
|
|
128
|
+
multilineMinHeight: number;
|
|
129
|
+
}
|
|
130
|
+
export interface InputComponentTokens extends Ladder<'sm' | 'md' | 'lg', InputSizeTokens> {
|
|
131
|
+
/** Default `variant` when caller doesn't pass one. Library default: 'outlined'. */
|
|
132
|
+
defaultVariant?: 'outlined' | 'filled' | 'underline';
|
|
133
|
+
/** Default `labelMode` when caller doesn't pass one. Library default: 'float'. */
|
|
134
|
+
defaultLabelMode?: 'float' | 'top';
|
|
135
|
+
/**
|
|
136
|
+
* When true, the label switches to `colors.border.focus` while the field is
|
|
137
|
+
* focused. Library default is false — the label stays its resting colour on
|
|
138
|
+
* focus and only the border tints. Error state always uses `colors.error`
|
|
139
|
+
* regardless of this flag.
|
|
140
|
+
*/
|
|
141
|
+
tintLabelOnFocus?: boolean;
|
|
142
|
+
/**
|
|
143
|
+
* When true, the field shakes horizontally and fires an error haptic the
|
|
144
|
+
* moment an error first appears. Library default is false — the border and
|
|
145
|
+
* message turn red without any motion. Opt in for a more Material-Design
|
|
146
|
+
* feel.
|
|
147
|
+
*/
|
|
148
|
+
shakeOnError?: boolean;
|
|
149
|
+
/**
|
|
150
|
+
* State-aware fill colours per variant. When omitted, the library falls
|
|
151
|
+
* back to `colors.background.primary` for outlined idle, `colors.background.secondary`
|
|
152
|
+
* for filled idle, `colors.surface.disabled` when disabled, and keeps focus/error
|
|
153
|
+
* the same as idle. The component interpolates between these the same way
|
|
154
|
+
* it animates the border, so transitions are smooth.
|
|
155
|
+
*/
|
|
156
|
+
fillColors?: {
|
|
157
|
+
outlined?: InputFillTokens;
|
|
158
|
+
filled?: InputFillTokens;
|
|
159
|
+
underline?: InputFillTokens;
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* SearchBar shares the field box (`field.<size>`) with Input and Select, so
|
|
164
|
+
* the two line up side by side; only its corner is its own.
|
|
165
|
+
*/
|
|
166
|
+
export interface SearchBarSizeTokens {
|
|
167
|
+
radius: RadiusKey;
|
|
168
|
+
}
|
|
169
|
+
export interface SearchBarTokens extends Ladder<'sm' | 'md' | 'lg', SearchBarSizeTokens> {
|
|
170
|
+
/**
|
|
171
|
+
* Default `variant` when caller doesn't pass one. Library default:
|
|
172
|
+
* `'filled'` (pill-shaped, borderless). Set this to `'outlined'` to make
|
|
173
|
+
* SearchBar pick up the same fill / border / focus treatment as Input,
|
|
174
|
+
* Select, OTPInput etc. — useful when a brand has unified its inputs.
|
|
175
|
+
* Falls through to `components.field.defaultVariant` when undefined.
|
|
176
|
+
*/
|
|
177
|
+
defaultVariant?: 'outlined' | 'filled' | 'underline';
|
|
178
|
+
}
|
|
179
|
+
export interface EmptyStateSizeTokens {
|
|
180
|
+
icon: number;
|
|
181
|
+
titleText: FontSizeKey;
|
|
182
|
+
descriptionText: FontSizeKey;
|
|
183
|
+
paddingY: SpacingKey;
|
|
184
|
+
/** Between the icon and the title. */
|
|
185
|
+
titleGap: SpacingKey;
|
|
186
|
+
/** Between the title and the description. */
|
|
187
|
+
descriptionGap: SpacingKey;
|
|
188
|
+
}
|
|
189
|
+
export interface ListItemSizeTokens {
|
|
190
|
+
paddingY: SpacingKey;
|
|
191
|
+
titleText: FontSizeKey;
|
|
192
|
+
subtitleText: FontSizeKey;
|
|
193
|
+
minHeight: number;
|
|
194
|
+
}
|
|
195
|
+
export interface BadgeSizeTokens {
|
|
196
|
+
text: FontSizeKey;
|
|
197
|
+
minWidth: number;
|
|
198
|
+
height: number;
|
|
199
|
+
paddingX: SpacingKey;
|
|
200
|
+
dotSize: number;
|
|
201
|
+
}
|
|
202
|
+
export interface BadgeTokens extends Ladder<'sm' | 'md', BadgeSizeTokens> {
|
|
203
|
+
borderWidth: number;
|
|
204
|
+
/** How far the badge sits outside its anchor corner. */
|
|
205
|
+
anchorOffset: number;
|
|
206
|
+
}
|
|
207
|
+
export interface ChipSizeTokens {
|
|
208
|
+
paddingX: SpacingKey;
|
|
209
|
+
paddingY: SpacingKey;
|
|
210
|
+
text: FontSizeKey;
|
|
211
|
+
minHeight: number;
|
|
212
|
+
closeSize: number;
|
|
213
|
+
closeText: FontSizeKey;
|
|
214
|
+
gap: SpacingKey;
|
|
215
|
+
/** Pixel size of a `leftIcon` given by name. */
|
|
216
|
+
icon: number;
|
|
217
|
+
}
|
|
218
|
+
export interface CheckboxSizeTokens {
|
|
219
|
+
boxSize: number;
|
|
220
|
+
}
|
|
221
|
+
export interface CheckboxTokens extends Ladder<'sm' | 'md' | 'lg', CheckboxSizeTokens> {
|
|
222
|
+
labelGap: SpacingKey;
|
|
223
|
+
}
|
|
224
|
+
export interface RadioSizeTokens {
|
|
225
|
+
outer: number;
|
|
226
|
+
inner: number;
|
|
227
|
+
}
|
|
228
|
+
export interface RadioTokens extends Ladder<'sm' | 'md' | 'lg', RadioSizeTokens> {
|
|
229
|
+
labelGap: SpacingKey;
|
|
230
|
+
}
|
|
231
|
+
export interface SwitchSizeTokens {
|
|
232
|
+
trackWidth: number;
|
|
233
|
+
trackHeight: number;
|
|
234
|
+
thumbSize: number;
|
|
235
|
+
/** Inset between the track edge and the thumb. */
|
|
236
|
+
padding: number;
|
|
237
|
+
}
|
|
238
|
+
export interface SwitchTokens extends Ladder<'sm' | 'md' | 'lg', SwitchSizeTokens> {
|
|
239
|
+
thumbColor?: string;
|
|
240
|
+
}
|
|
241
|
+
export interface OTPInputSizeTokens {
|
|
242
|
+
cell: number;
|
|
243
|
+
text: FontSizeKey;
|
|
244
|
+
radius: RadiusKey;
|
|
245
|
+
gap: SpacingKey;
|
|
246
|
+
}
|
|
247
|
+
export interface OTPInputTokens extends Ladder<'sm' | 'md' | 'lg', OTPInputSizeTokens> {
|
|
248
|
+
/** When true, the row shakes horizontally on first error transition. Library default: false. */
|
|
249
|
+
shakeOnError?: boolean;
|
|
250
|
+
}
|
|
251
|
+
export interface SegmentedControlSizeTokens {
|
|
252
|
+
height: number;
|
|
253
|
+
text: FontSizeKey;
|
|
254
|
+
paddingX: SpacingKey;
|
|
255
|
+
/** Pixel size a named icon is drawn at. */
|
|
256
|
+
icon: number;
|
|
257
|
+
}
|
|
258
|
+
export interface SegmentedControlTokens extends Ladder<'sm' | 'md' | 'lg', SegmentedControlSizeTokens> {
|
|
259
|
+
/** Between the track edge and the selected indicator (segmented variant). */
|
|
260
|
+
trackPadding: SpacingKey;
|
|
261
|
+
/** Underline indicator thickness (underline variant). */
|
|
262
|
+
underlineHeight: number;
|
|
263
|
+
/** Vertical inset of the pill indicator from the row edges (pills variant). */
|
|
264
|
+
pillInset: SpacingKey;
|
|
265
|
+
/**
|
|
266
|
+
* Corner for the segmented track (the thumb nests inside it), the pill and
|
|
267
|
+
* the underline ends; the `radius` prop wins over it. Empty: each variant
|
|
268
|
+
* keeps its own corner (md track, sm thumb, pill, square underline).
|
|
269
|
+
*/
|
|
270
|
+
radius?: RadiusKey;
|
|
271
|
+
}
|
|
272
|
+
export interface TabsSizeTokens {
|
|
273
|
+
text: FontSizeKey;
|
|
274
|
+
paddingY: SpacingKey;
|
|
275
|
+
/** Horizontal padding of an equal-width tab. */
|
|
276
|
+
paddingX: SpacingKey;
|
|
277
|
+
/** Horizontal padding of a scrollable tab. */
|
|
278
|
+
scrollablePaddingX: SpacingKey;
|
|
279
|
+
/** Pixel size a named icon is drawn at. */
|
|
280
|
+
icon: number;
|
|
281
|
+
}
|
|
282
|
+
export interface TabsTokens extends Ladder<'sm' | 'md' | 'lg', TabsSizeTokens> {
|
|
283
|
+
/** Between a leading icon and the label. */
|
|
284
|
+
iconGap: SpacingKey;
|
|
285
|
+
/** Between the segmented track's edge and its thumb. */
|
|
286
|
+
trackPadding: SpacingKey;
|
|
287
|
+
/** Underline indicator thickness (underline variant). */
|
|
288
|
+
underlineHeight: number;
|
|
289
|
+
/** Vertical inset of the pill indicator from the row edges (pills variant). */
|
|
290
|
+
pillInset: SpacingKey;
|
|
291
|
+
/** Opacity applied to disabled tabs. */
|
|
292
|
+
disabledOpacity: number;
|
|
293
|
+
/** Between the label and an inline badge. */
|
|
294
|
+
badgeGap: SpacingKey;
|
|
295
|
+
/**
|
|
296
|
+
* Corner for the segmented track, the pill and the underline ends; the
|
|
297
|
+
* `radius` prop wins over it. Empty: each variant keeps its own corner
|
|
298
|
+
* (md track, sm thumb, pill, square underline).
|
|
299
|
+
*/
|
|
300
|
+
radius?: RadiusKey;
|
|
301
|
+
}
|
|
302
|
+
export interface SliderSizeTokens {
|
|
303
|
+
trackHeight: number;
|
|
304
|
+
thumbDiameter: number;
|
|
305
|
+
}
|
|
306
|
+
export interface SliderTokens extends Ladder<'sm' | 'md' | 'lg', SliderSizeTokens> {
|
|
307
|
+
/** When true, the thumb plays a scale-up animation while pressed. Library default: false. */
|
|
308
|
+
thumbPressAnimation?: boolean;
|
|
309
|
+
/** Peak scale of the thumb press animation. Library default: 1.15. */
|
|
310
|
+
thumbPressScale?: number;
|
|
311
|
+
/** Duration in ms of the bubble-label fade. Library default: 120. */
|
|
312
|
+
labelShowDuration?: number;
|
|
313
|
+
/** Final opacity of the bubble label when visible. Library default: 1. */
|
|
314
|
+
labelOpacity?: number;
|
|
315
|
+
}
|
|
316
|
+
export interface FloatingActionButtonSizeTokens {
|
|
317
|
+
diameter: number;
|
|
318
|
+
icon: number;
|
|
319
|
+
text: FontSizeKey;
|
|
320
|
+
/** Horizontal padding of the extended (labelled) button. */
|
|
321
|
+
labelPaddingX: SpacingKey;
|
|
322
|
+
}
|
|
323
|
+
export interface FloatingActionButtonTokens extends Ladder<'sm' | 'md' | 'lg', FloatingActionButtonSizeTokens> {
|
|
324
|
+
/** Inset from the screen edge for the bottomLeft and bottomRight positions. */
|
|
325
|
+
edgeOffset: SpacingKey;
|
|
326
|
+
/** Default `bottomOffset` when the prop is not passed. */
|
|
327
|
+
bottomOffset: SpacingKey;
|
|
328
|
+
/** Between stacked secondary actions in the group. */
|
|
329
|
+
secondaryGap: SpacingKey;
|
|
330
|
+
/** Per-item stagger delay in ms when opening/closing the group. */
|
|
331
|
+
staggerMs: number;
|
|
332
|
+
}
|
|
333
|
+
export interface DialogTokens {
|
|
334
|
+
/** Diameter of the circle behind the tone icon; its corner is always a pill. */
|
|
335
|
+
iconWrapperSize: number;
|
|
336
|
+
actionButtonMinHeight: number;
|
|
337
|
+
}
|
|
338
|
+
export interface ToastTokens {
|
|
339
|
+
/** Diameter of the circle behind the tone icon; its corner is always a pill. */
|
|
340
|
+
iconCircleSize: number;
|
|
341
|
+
iconGlyphText: FontSizeKey;
|
|
342
|
+
/** Width of the leading tone bar: 0 draws none and the icon carries the tone; 4 restores the bar. */
|
|
343
|
+
tintBarWidth: number;
|
|
344
|
+
/** Tap-target floor of the action button, whatever its padding. */
|
|
345
|
+
actionMinHeight: number;
|
|
346
|
+
/** Default auto-dismiss duration (ms) when toast.duration is unset. 0 = persistent. Library default: 3000. */
|
|
347
|
+
defaultDurationMs?: number;
|
|
348
|
+
/** Enable swipe-to-dismiss pan responder. Library default: true. */
|
|
349
|
+
enableSwipeDismiss?: boolean;
|
|
350
|
+
/** Horizontal swipe distance to dismiss. Library default: 80. */
|
|
351
|
+
swipeDismissThreshold?: number;
|
|
352
|
+
/** Horizontal swipe velocity to dismiss. Library default: 0.5. */
|
|
353
|
+
swipeVelocityThreshold?: number;
|
|
354
|
+
/** Vertical translate per stacked toast. Library default: 8. */
|
|
355
|
+
stackOffset?: number;
|
|
356
|
+
/** Scale decrement per stack index. Library default: 0.04. */
|
|
357
|
+
stackScaleStep?: number;
|
|
358
|
+
/** Lower bound for stack scale. Library default: 0.9. */
|
|
359
|
+
stackMinScale?: number;
|
|
360
|
+
/** Enter-spring damping. Library default: 18. */
|
|
361
|
+
enterSpringDamping?: number;
|
|
362
|
+
/** Enter-spring stiffness. Library default: 180. */
|
|
363
|
+
enterSpringStiffness?: number;
|
|
364
|
+
/** Enter-spring mass. Library default: 1. */
|
|
365
|
+
enterSpringMass?: number;
|
|
366
|
+
}
|
|
367
|
+
export interface BannerTokens {
|
|
368
|
+
/** Width of the leading tone bar: 0 draws none and the icon carries the tone; 4 restores the bar. */
|
|
369
|
+
tintBarWidth: number;
|
|
370
|
+
/** Diameter of the circle behind the tone icon; its corner is always a pill. */
|
|
371
|
+
iconCircleSize?: number;
|
|
372
|
+
iconGlyphText?: FontSizeKey;
|
|
373
|
+
iconGlyphLineHeight?: number;
|
|
374
|
+
/** Diameter of the close button; its corner is always a pill. */
|
|
375
|
+
closeButtonSize?: number;
|
|
376
|
+
closeGlyphText?: FontSizeKey;
|
|
377
|
+
closeButtonMarginLeft?: SpacingKey;
|
|
378
|
+
containerPaddingLeft?: SpacingKey;
|
|
379
|
+
iconGap?: SpacingKey;
|
|
380
|
+
textBlockPaddingRight?: SpacingKey;
|
|
381
|
+
actionsRowMarginTop?: SpacingKey;
|
|
382
|
+
actionsRowGap?: SpacingKey;
|
|
383
|
+
actionButtonPaddingX?: SpacingKey;
|
|
384
|
+
actionButtonPaddingY?: SpacingKey;
|
|
385
|
+
actionButtonRadius?: RadiusKey;
|
|
386
|
+
}
|
|
387
|
+
export interface FormFieldTokens {
|
|
388
|
+
/** Width of the inline label column when `layout="inline"`. Accepts CSS-like string ("35%") or number. */
|
|
389
|
+
inlineLabelWidth: number | `${number}%`;
|
|
390
|
+
}
|
|
391
|
+
export interface NumberInputTokens {
|
|
392
|
+
/** Milliseconds before long-press auto-repeat kicks in. Library default: 500. */
|
|
393
|
+
longPressDelayMs?: number;
|
|
394
|
+
/** Milliseconds between auto-repeated step ticks while long-pressed. Library default: 80. */
|
|
395
|
+
longPressIntervalMs?: number;
|
|
396
|
+
}
|
|
397
|
+
export interface ProgressBarTokens {
|
|
398
|
+
/** Duration in ms of the indeterminate-loop animation cycle. Library default: 1500. */
|
|
399
|
+
indeterminateLoopDuration?: number;
|
|
400
|
+
/** Width of the moving bar in indeterminate mode (% string or number). Library default: '30%'. */
|
|
401
|
+
indeterminateWidth?: number | `${number}%`;
|
|
402
|
+
/** Duration in ms of the determinate progress tween. Library default: 400. */
|
|
403
|
+
determinateAnimationDuration?: number;
|
|
404
|
+
}
|
|
405
|
+
export interface ProgressRingTokens {
|
|
406
|
+
/** Duration in ms of the fill sweep between two progress values. Library default: 600. */
|
|
407
|
+
animationDuration?: number;
|
|
408
|
+
/** Stroke width of the track and the fill. Library default: 4. */
|
|
409
|
+
strokeWidth?: number;
|
|
410
|
+
/** Track colour. Library default: `colors.surface.disabled`. */
|
|
411
|
+
trackColor?: string;
|
|
412
|
+
/**
|
|
413
|
+
* The two thresholds of `colorByProgress`, as fractions: below the first
|
|
414
|
+
* the fill is `colors.error`, from there to the second `colors.warning`,
|
|
415
|
+
* from the second `colors.success`. Library default: `[1/3, 2/3]`.
|
|
416
|
+
*/
|
|
417
|
+
colorStops?: [number, number];
|
|
418
|
+
}
|
|
419
|
+
export interface RatingTokens {
|
|
420
|
+
/** When true, the tapped star plays a pulse-scale animation. Library default: false. */
|
|
421
|
+
pulseOnPress?: boolean;
|
|
422
|
+
/** Peak scale of the pulse animation. Library default: 1.2. */
|
|
423
|
+
pulseScale?: number;
|
|
424
|
+
}
|
|
425
|
+
export interface BottomSheetTokens {
|
|
426
|
+
/** Colour of the grab-handle rendered above the sheet content. Library default: `colors.border.primary`. */
|
|
427
|
+
handleColor?: string;
|
|
428
|
+
}
|
|
429
|
+
export interface ChoiceGroupTokens {
|
|
430
|
+
/** Corner of the default card template. Library default: `'md'`. */
|
|
431
|
+
radius?: RadiusKey;
|
|
432
|
+
/** Opacity of the option colour used as the selected card's fill (0–1). Library default: 0.12. */
|
|
433
|
+
selectedFillOpacity?: number;
|
|
434
|
+
}
|
|
435
|
+
export interface FilePickerTokens {
|
|
436
|
+
/** Corner of the trigger card and file tiles. Library default: `'md'`. */
|
|
437
|
+
radius?: RadiusKey;
|
|
438
|
+
/** Square size of card-variant thumbnails in px. Library default: 84. */
|
|
439
|
+
thumbnailSize?: number;
|
|
440
|
+
/** Colour of the dashed trigger border. Library default: `colors.primary`. */
|
|
441
|
+
dashedBorderColor?: string;
|
|
442
|
+
}
|
|
443
|
+
export interface ProfilePickerTokens {
|
|
444
|
+
/** Default `tone` of the camera badge when the prop is not passed. Library default: `'primary'`. */
|
|
445
|
+
defaultTone?: 'primary' | 'success' | 'warning' | 'error' | 'info' | 'neutral';
|
|
446
|
+
/** Default `variant` of the camera badge when the prop is not passed. Library default: `'solid'`. */
|
|
447
|
+
defaultVariant?: 'solid' | 'soft' | 'outline';
|
|
448
|
+
/**
|
|
449
|
+
* Default `avatarTone` of the initials disc and the empty placeholder when
|
|
450
|
+
* the prop is not passed. Library default: none (the Avatar's per-name
|
|
451
|
+
* palette, and a grey placeholder).
|
|
452
|
+
*/
|
|
453
|
+
defaultAvatarTone?: 'neutral' | 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info';
|
|
454
|
+
/**
|
|
455
|
+
* The badge's colour in place of the tone's: the fill when solid, the tint
|
|
456
|
+
* and the icon when soft, the ring and the icon when outline. Library
|
|
457
|
+
* default: the tone's colour.
|
|
458
|
+
*/
|
|
459
|
+
badgeColor?: string;
|
|
460
|
+
/** Exact icon colour of the badge, winning over the variant's. Library default: the variant's ink. */
|
|
461
|
+
badgeIconColor?: string;
|
|
462
|
+
}
|
|
463
|
+
export interface InlineSelectTokens {
|
|
464
|
+
/** Trigger text + chevron colour. Library default: `colors.primary`. */
|
|
465
|
+
color?: string;
|
|
466
|
+
}
|
|
467
|
+
export interface OptionSheetTokens {
|
|
468
|
+
/**
|
|
469
|
+
* Mark on the selected row of a single-choice sheet (Select, InlineSelect,
|
|
470
|
+
* PhoneNumberInput and every other OptionSheet): `'dot'` is an 8 px dot,
|
|
471
|
+
* `'icon'` the `tick-circle` icon in its bulk style at 20 px. Both are drawn
|
|
472
|
+
* in `colors.primary`. Multi-select keeps its checkbox. Library default: `'dot'`.
|
|
473
|
+
*/
|
|
474
|
+
selectedMarker?: 'dot' | 'icon';
|
|
475
|
+
}
|
|
476
|
+
export interface SelectTokens {
|
|
477
|
+
/** Colour of the grab-handle rendered above the bottom-sheet picker. Library default: `colors.border.primary`. */
|
|
478
|
+
handleColor?: string;
|
|
479
|
+
/** Default `variant` when caller doesn't pass one. Falls through to `components.field.defaultVariant`, then 'outlined'. */
|
|
480
|
+
defaultVariant?: 'outlined' | 'filled' | 'underline';
|
|
481
|
+
/**
|
|
482
|
+
* State-aware fill colours per variant for the trigger field. Mirrors
|
|
483
|
+
* `components.input.fillColors`; when omitted the library falls back to the
|
|
484
|
+
* same defaults FieldBase uses for each variant.
|
|
485
|
+
*/
|
|
486
|
+
fillColors?: {
|
|
487
|
+
outlined?: InputFillTokens;
|
|
488
|
+
filled?: InputFillTokens;
|
|
489
|
+
underline?: InputFillTokens;
|
|
490
|
+
};
|
|
491
|
+
}
|
|
492
|
+
export interface BottomNavigationTokens {
|
|
493
|
+
/** Corner of the docked bar's own surface. Library default: `'none'`. */
|
|
494
|
+
radius?: RadiusKey;
|
|
495
|
+
/** Pixel size of tab icons. Library default: 18. */
|
|
496
|
+
iconSize?: number;
|
|
497
|
+
/** Height of the pill background drawn behind the active tab when `variant="pill"`. Library default: the icon size plus 12 (30). */
|
|
498
|
+
pillHeight?: number;
|
|
499
|
+
/** Maximum width of the pill background, however wide its tab cell. Library default: 64. */
|
|
500
|
+
pillMaxWidth?: number;
|
|
501
|
+
/** Horizontal inset of the pill from the edges of its tab cell. Library default: `'lg'`. */
|
|
502
|
+
pillInset?: SpacingKey;
|
|
503
|
+
/** Thickness of the underline indicator when `variant="underline"`. Library default: 3. */
|
|
504
|
+
underlineHeight?: number;
|
|
505
|
+
/** Gap between the detached capsule and the screen edges when `variant="floating"`. Library default: `'lg'`. */
|
|
506
|
+
floatingMargin?: SpacingKey;
|
|
507
|
+
/** Corner of the detached capsule when `variant="floating"`. Library default: `'xl'`. */
|
|
508
|
+
floatingRadius?: RadiusKey;
|
|
509
|
+
/** Diameter of the filled circle behind the active icon when `variant="bubble"`. Library default: 48. */
|
|
510
|
+
bubbleSize?: number;
|
|
511
|
+
/** How far the active icon and its circle rise above their resting spot when `variant="bubble"`. Library default: 14. */
|
|
512
|
+
bubbleLift?: number;
|
|
513
|
+
}
|
|
514
|
+
export interface DatePickerTokens {
|
|
515
|
+
/** Pixel offset for the month-slide animation. Default: 32. */
|
|
516
|
+
monthSlideDistance?: number;
|
|
517
|
+
/** Outgoing month-slide animation duration (ms). Default: theme.motion.duration.fast or 140. */
|
|
518
|
+
monthSlideOutDuration?: number;
|
|
519
|
+
/** Incoming month-slide animation duration (ms). Default: theme.motion.duration.fast or 160. */
|
|
520
|
+
monthSlideInDuration?: number;
|
|
521
|
+
/** Day/year/decade view-transition fade+scale duration (ms). Default: theme.motion.duration.normal or 200. */
|
|
522
|
+
viewTransitionDuration?: number;
|
|
523
|
+
/** Header press-in scale animation duration (ms). Default: 80. */
|
|
524
|
+
headerPressDuration?: number;
|
|
525
|
+
/** Header release scale animation duration (ms). Default: 100. */
|
|
526
|
+
headerReleaseDuration?: number;
|
|
527
|
+
/** Width/height of the nav (prev/next) buttons. Default: 36. */
|
|
528
|
+
navButtonSize?: number;
|
|
529
|
+
/** Size of the nav chevron text. Default: `'2xl'`. */
|
|
530
|
+
navText?: FontSizeKey;
|
|
531
|
+
/** Line height of the nav chevron text. Default: 26. */
|
|
532
|
+
navTextLineHeight?: number;
|
|
533
|
+
/** Padding around each day cell. Default: `'xxs'`. */
|
|
534
|
+
dayCellPadding?: SpacingKey;
|
|
535
|
+
/** Corner of the inner day pill. Default: `'pill'`. */
|
|
536
|
+
dayInnerRadius?: RadiusKey;
|
|
537
|
+
/** Padding around each year/decade cell. Default: `'xs'`. */
|
|
538
|
+
yearCellPadding?: SpacingKey;
|
|
539
|
+
/** Corner of the inner year/decade pill. Default: `'lg'`. */
|
|
540
|
+
yearInnerRadius?: RadiusKey;
|
|
541
|
+
/** Margin above the decade range subtitle text. Default: `'xxs'`. */
|
|
542
|
+
decadeRangeMarginTop?: SpacingKey;
|
|
543
|
+
/** Min height for the footer cancel/confirm buttons. Default: 40. */
|
|
544
|
+
footerButtonMinHeight?: number;
|
|
545
|
+
}
|
|
546
|
+
export interface DateRangePickerTokens {
|
|
547
|
+
/** Pixel offset for the month-slide animation. Default: 32. */
|
|
548
|
+
monthSlideDistance?: number;
|
|
549
|
+
/** Outgoing month-slide animation duration (ms). Default: theme.motion.duration.fast or 140. */
|
|
550
|
+
monthSlideOutDuration?: number;
|
|
551
|
+
/** Incoming month-slide animation duration (ms). Default: theme.motion.duration.fast or 160. */
|
|
552
|
+
monthSlideInDuration?: number;
|
|
553
|
+
/** Width/height of the nav (prev/next) buttons. Default: 36. */
|
|
554
|
+
navButtonSize?: number;
|
|
555
|
+
/** Size of the nav chevron text. Default: `'2xl'`. */
|
|
556
|
+
navText?: FontSizeKey;
|
|
557
|
+
/** Line height of the nav chevron text. Default: 26. */
|
|
558
|
+
navTextLineHeight?: number;
|
|
559
|
+
/** Min height for the footer cancel/confirm buttons. Default: 40. */
|
|
560
|
+
footerButtonMinHeight?: number;
|
|
561
|
+
}
|
|
562
|
+
export interface TimePickerTokens {
|
|
563
|
+
/** Debounce window between scroll-haptic ticks (ms). Default: 35. */
|
|
564
|
+
hapticDebounceMs?: number;
|
|
565
|
+
/** Width of the bottom-sheet drag handle. Default: 36. */
|
|
566
|
+
handleWidth?: number;
|
|
567
|
+
/** Height of the bottom-sheet drag handle. Default: 4. */
|
|
568
|
+
handleHeight?: number;
|
|
569
|
+
}
|
|
570
|
+
export interface AvatarTokens {
|
|
571
|
+
/** Border width applied to the avatar wrapper. Library default: 0. */
|
|
572
|
+
borderWidth?: number;
|
|
573
|
+
/** Border colour applied to the avatar wrapper. Falls back to `colors.border.primary`. */
|
|
574
|
+
borderColor?: string;
|
|
575
|
+
/** Border width of the status indicator's ring. Library default: 2. */
|
|
576
|
+
statusBorderWidth?: number;
|
|
577
|
+
/** Border colour of the status indicator's ring. Falls back to `colors.background.elevated`. */
|
|
578
|
+
statusBorderColor?: string;
|
|
579
|
+
/**
|
|
580
|
+
* Width of the ring drawn for `status="verified"` and `status="pending"`.
|
|
581
|
+
* Library default: 1.5 at every size.
|
|
582
|
+
*/
|
|
583
|
+
ringWidth?: number;
|
|
584
|
+
/**
|
|
585
|
+
* Clear gap between that ring and the picture. Library default: the ring
|
|
586
|
+
* width. The gap shows whatever is behind the avatar.
|
|
587
|
+
*/
|
|
588
|
+
ringGap?: number;
|
|
589
|
+
/**
|
|
590
|
+
* Initials font size as a fraction of avatar dimension. Library default: 0.4
|
|
591
|
+
* (i.e. md avatar at 48px → 19px initials). Increase for larger initials.
|
|
592
|
+
*/
|
|
593
|
+
fontSizeRatio?: number;
|
|
594
|
+
/**
|
|
595
|
+
* Initials text size at every avatar size. Wins over `fontSizeRatio` when set.
|
|
596
|
+
* Use only when the design needs a fixed size regardless of avatar dimension.
|
|
597
|
+
*/
|
|
598
|
+
text?: FontSizeKey;
|
|
599
|
+
/**
|
|
600
|
+
* Font weight key for the initials text. Library default: 'semibold'.
|
|
601
|
+
*/
|
|
602
|
+
fontWeight?: keyof TypographyScale['fontWeight'];
|
|
603
|
+
}
|
|
604
|
+
export interface AccordionTokens {
|
|
605
|
+
/** Vertical padding inside the `card` variant container. Library default: `'xs'`. */
|
|
606
|
+
cardPaddingY?: SpacingKey;
|
|
607
|
+
}
|
|
608
|
+
export interface AppBarTokens {
|
|
609
|
+
/** Min-width of the left/right side action slots. Library default: 48. */
|
|
610
|
+
sideSlotMinWidth?: number;
|
|
611
|
+
/** Translate-Y distance (px, negative) the large title travels when collapsing. Library default: -20. */
|
|
612
|
+
collapseTranslateDistance?: number;
|
|
613
|
+
/** Margin between title and subtitle. */
|
|
614
|
+
subtitleMarginTop?: SpacingKey;
|
|
615
|
+
/** Width/height of each action button (square). Library default: 44. */
|
|
616
|
+
actionButtonSize?: number;
|
|
617
|
+
/** Size of the glyph inside an action button; also the built-in back arrow. Drives `gutter`'s optical inset. Library default: 24. */
|
|
618
|
+
iconSize?: number;
|
|
619
|
+
/** Thickness of the bottom divider. Library default: the platform hairline. */
|
|
620
|
+
dividerWidth?: number;
|
|
621
|
+
/** Diameter of the unread dot on an action. Library default: 8. */
|
|
622
|
+
dotSize?: number;
|
|
623
|
+
/** Top/right inset of the unread dot. Library default: 10. */
|
|
624
|
+
dotOffset?: number;
|
|
625
|
+
/** Top/right inset of the right-action badge bubble. */
|
|
626
|
+
badgeOffset?: number;
|
|
627
|
+
/** Min-width of the right-action badge bubble. */
|
|
628
|
+
badgeMinWidth?: number;
|
|
629
|
+
/** Height of the right-action badge bubble. */
|
|
630
|
+
badgeHeight?: number;
|
|
631
|
+
/** Horizontal padding inside the right-action badge bubble. */
|
|
632
|
+
badgePaddingX?: SpacingKey;
|
|
633
|
+
/** Size of the badge count text. */
|
|
634
|
+
badgeText?: FontSizeKey;
|
|
635
|
+
/** Line height of the badge count text. */
|
|
636
|
+
badgeLineHeight?: number;
|
|
637
|
+
}
|
|
638
|
+
export interface DrawerTokens {
|
|
639
|
+
/** Pixel velocity above which a fling closes the drawer. Library default: 1000. */
|
|
640
|
+
closeVelocityThreshold?: number;
|
|
641
|
+
/** Pixel drag distance before the gesture is recognised. Library default: 10. */
|
|
642
|
+
dragActivationOffset?: number;
|
|
643
|
+
}
|
|
644
|
+
export interface ImageGalleryTokens {
|
|
645
|
+
/** Maximum pinch-zoom scale. Library default: 4. */
|
|
646
|
+
maxScale?: number;
|
|
647
|
+
/** Minimum pinch-zoom scale (1 = fit). Library default: 1. */
|
|
648
|
+
minScale?: number;
|
|
649
|
+
/** Scale applied on double-tap at rest. Library default: 2. */
|
|
650
|
+
doubleTapScale?: number;
|
|
651
|
+
}
|
|
652
|
+
export interface ModalTokens {
|
|
653
|
+
/** Initial scale value for the centred presentation enter animation. Library default: 0.9. */
|
|
654
|
+
scaleStartValue?: number;
|
|
655
|
+
}
|
|
656
|
+
export interface StepperTokens {
|
|
657
|
+
/** Diameter of each step circle. Library default: 24. */
|
|
658
|
+
circleSize?: number;
|
|
659
|
+
/** Diameter of the surrounding pulse ring. Library default: 32. */
|
|
660
|
+
pulseSize?: number;
|
|
661
|
+
/** Duration in ms of one pulse cycle. Library default: 1100. */
|
|
662
|
+
pulseDuration?: number;
|
|
663
|
+
/** When true, the active step animates a continuous pulse ring. Library default: false. */
|
|
664
|
+
pulseAnimation?: boolean;
|
|
665
|
+
}
|
|
666
|
+
export interface SwipeableTokens {
|
|
667
|
+
/** Pixel distance after which a partial-swipe action commits on release. Library default: 64. */
|
|
668
|
+
threshold?: number;
|
|
669
|
+
/** Pixel distance after which a full-swipe (delete) gesture fires. Library default: 240. */
|
|
670
|
+
fullSwipeThreshold?: number;
|
|
671
|
+
/** Pixel drag offset before the horizontal gesture activates. Library default: 10. */
|
|
672
|
+
dragActivationOffset?: number;
|
|
673
|
+
/** Rubber-band resistance factor when swiping past the action area. Library default: 0.25. */
|
|
674
|
+
rubberBandFactor?: number;
|
|
675
|
+
/** Vertical pixel offset before the gesture is rejected (lets vertical scroll win). Library default: 15. */
|
|
676
|
+
failOffsetY?: number;
|
|
677
|
+
/** Spring damping for snap-back animation. */
|
|
678
|
+
springDamping?: number;
|
|
679
|
+
/** Spring stiffness for snap-back animation. */
|
|
680
|
+
springStiffness?: number;
|
|
681
|
+
/** Spring mass for snap-back animation. */
|
|
682
|
+
springMass?: number;
|
|
683
|
+
}
|
|
684
|
+
export interface TimelineTokens {
|
|
685
|
+
/** Diameter of the status dot. Library default: 12. */
|
|
686
|
+
dotSize?: number;
|
|
687
|
+
/** Width of the soft halo ring around the dot, on each side. Library default: 6. */
|
|
688
|
+
haloWidth?: number;
|
|
689
|
+
/** Between a halo's edge and the connector or rail that leaves it. Library default: `'xs'`. */
|
|
690
|
+
connectorGap?: SpacingKey;
|
|
691
|
+
}
|
|
692
|
+
export interface TooltipTokens {
|
|
693
|
+
/** Between the trigger and the tooltip card. Library default: `'sm'`. */
|
|
694
|
+
gap?: SpacingKey;
|
|
695
|
+
/** Minimum padding from screen edges. Library default: `'sm'`. */
|
|
696
|
+
screenPadding?: SpacingKey;
|
|
697
|
+
/** Auto-hide delay for `trigger='press'`. Library default: 4000. */
|
|
698
|
+
pressAutoHideMs?: number;
|
|
699
|
+
/** Half the arrow base width. Library default: 4. */
|
|
700
|
+
arrowHalfWidth?: number;
|
|
701
|
+
/** Arrow height (pointing dimension). Library default: 6. */
|
|
702
|
+
arrowHeight?: number;
|
|
703
|
+
/** Min distance of arrow tip from card corner. Library default: 12. */
|
|
704
|
+
arrowCornerPadding?: number;
|
|
705
|
+
/** Default `maxWidth` when prop is unset. Library default: 240. */
|
|
706
|
+
maxWidth?: number;
|
|
707
|
+
/** Message Text lineHeight. Library default: 18. */
|
|
708
|
+
lineHeight?: number;
|
|
709
|
+
/** Opt-in scale-from-0.85 entry/exit animation. Library default: false (opacity-only). */
|
|
710
|
+
enableScaleAnimation?: boolean;
|
|
711
|
+
/** Duration of fade/scale exit. Library default: 150. */
|
|
712
|
+
exitDurationMs?: number;
|
|
713
|
+
}
|
|
714
|
+
export interface ComponentTokens {
|
|
715
|
+
accordion?: AccordionTokens;
|
|
716
|
+
appBar?: AppBarTokens;
|
|
717
|
+
avatar?: AvatarTokens;
|
|
718
|
+
badge: BadgeTokens;
|
|
719
|
+
banner: BannerTokens;
|
|
720
|
+
bottomNavigation?: BottomNavigationTokens;
|
|
721
|
+
bottomSheet?: BottomSheetTokens;
|
|
722
|
+
button: Ladder<ComponentSizeKey, ButtonSizeTokens>;
|
|
723
|
+
checkbox: CheckboxTokens;
|
|
724
|
+
chip: Ladder<'sm' | 'md', ChipSizeTokens>;
|
|
725
|
+
choiceGroup?: ChoiceGroupTokens;
|
|
726
|
+
datePicker?: DatePickerTokens;
|
|
727
|
+
dateRangePicker?: DateRangePickerTokens;
|
|
728
|
+
dialog: DialogTokens;
|
|
729
|
+
drawer?: DrawerTokens;
|
|
730
|
+
emptyState: Ladder<'sm' | 'md' | 'lg', EmptyStateSizeTokens>;
|
|
731
|
+
field: FieldTokens;
|
|
732
|
+
filePicker?: FilePickerTokens;
|
|
733
|
+
floatingActionButton: FloatingActionButtonTokens;
|
|
734
|
+
formField: FormFieldTokens;
|
|
735
|
+
imageGallery?: ImageGalleryTokens;
|
|
736
|
+
inlineSelect?: InlineSelectTokens;
|
|
737
|
+
input: InputComponentTokens;
|
|
738
|
+
listItem: Ladder<'sm' | 'md' | 'lg', ListItemSizeTokens>;
|
|
739
|
+
modal?: ModalTokens;
|
|
740
|
+
numberInput?: NumberInputTokens;
|
|
741
|
+
optionSheet?: OptionSheetTokens;
|
|
742
|
+
otpInput: OTPInputTokens;
|
|
743
|
+
profilePicker?: ProfilePickerTokens;
|
|
744
|
+
progressBar?: ProgressBarTokens;
|
|
745
|
+
progressRing?: ProgressRingTokens;
|
|
746
|
+
radio: RadioTokens;
|
|
747
|
+
rating?: RatingTokens;
|
|
748
|
+
searchBar: SearchBarTokens;
|
|
749
|
+
segmentedControl: SegmentedControlTokens;
|
|
750
|
+
select?: SelectTokens;
|
|
751
|
+
slider: SliderTokens;
|
|
752
|
+
stepper?: StepperTokens;
|
|
753
|
+
swipeable?: SwipeableTokens;
|
|
754
|
+
switch: SwitchTokens;
|
|
755
|
+
tabs: TabsTokens;
|
|
756
|
+
timePicker?: TimePickerTokens;
|
|
757
|
+
timeline?: TimelineTokens;
|
|
758
|
+
toast: ToastTokens;
|
|
759
|
+
tooltip?: TooltipTokens;
|
|
760
|
+
}
|
|
761
|
+
export {};
|
|
762
|
+
//# sourceMappingURL=componentTokens.d.ts.map
|