@webority/mobile-ui 0.18.1 → 0.19.1
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 +6 -6
- 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/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 +6 -6
- 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/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 +14 -4
- 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
|
@@ -1,33 +1,31 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import type { View as RNView, StyleProp, ViewProps, ViewStyle } from 'react-native';
|
|
3
|
-
import type { ColorPalette,
|
|
4
|
-
export type SpacingToken = keyof SpacingScale;
|
|
5
|
-
export type RadiusToken = keyof RadiusScale;
|
|
3
|
+
import type { ColorPalette, RadiusKey, SpacingKey, Theme } from '../../theme/types';
|
|
6
4
|
export type BackgroundToken = keyof ColorPalette['background'];
|
|
7
5
|
export interface BoxProps extends ViewProps {
|
|
8
6
|
/** padding (all sides) */
|
|
9
|
-
p?:
|
|
7
|
+
p?: SpacingKey;
|
|
10
8
|
/** paddingHorizontal */
|
|
11
|
-
px?:
|
|
9
|
+
px?: SpacingKey;
|
|
12
10
|
/** paddingVertical */
|
|
13
|
-
py?:
|
|
14
|
-
pt?:
|
|
15
|
-
pr?:
|
|
16
|
-
pb?:
|
|
17
|
-
pl?:
|
|
11
|
+
py?: SpacingKey;
|
|
12
|
+
pt?: SpacingKey;
|
|
13
|
+
pr?: SpacingKey;
|
|
14
|
+
pb?: SpacingKey;
|
|
15
|
+
pl?: SpacingKey;
|
|
18
16
|
/** margin (all sides) */
|
|
19
|
-
m?:
|
|
20
|
-
mx?:
|
|
21
|
-
my?:
|
|
22
|
-
mt?:
|
|
23
|
-
mr?:
|
|
24
|
-
mb?:
|
|
25
|
-
ml?:
|
|
17
|
+
m?: SpacingKey;
|
|
18
|
+
mx?: SpacingKey;
|
|
19
|
+
my?: SpacingKey;
|
|
20
|
+
mt?: SpacingKey;
|
|
21
|
+
mr?: SpacingKey;
|
|
22
|
+
mb?: SpacingKey;
|
|
23
|
+
ml?: SpacingKey;
|
|
26
24
|
/** Flexbox gap between children (spacing token). */
|
|
27
|
-
gap?:
|
|
25
|
+
gap?: SpacingKey;
|
|
28
26
|
/** Background — a `colors.background.*` token or a raw colour string. */
|
|
29
27
|
bg?: BackgroundToken | (string & {});
|
|
30
|
-
radius?:
|
|
28
|
+
radius?: RadiusKey;
|
|
31
29
|
/** Draw a hairline border in `colors.border.primary`. */
|
|
32
30
|
border?: boolean;
|
|
33
31
|
flex?: number;
|
|
@@ -48,7 +46,7 @@ export type RowProps = Omit<BoxProps, 'direction'>;
|
|
|
48
46
|
declare const Row: React.ForwardRefExoticComponent<RowProps & React.RefAttributes<RNView>>;
|
|
49
47
|
export interface SpacerProps {
|
|
50
48
|
/** Fixed spacer of this spacing token. Omit for a flexible spacer (`flex: 1`). */
|
|
51
|
-
size?:
|
|
49
|
+
size?: SpacingKey;
|
|
52
50
|
style?: StyleProp<ViewStyle>;
|
|
53
51
|
testID?: string;
|
|
54
52
|
}
|
|
@@ -11,7 +11,7 @@ export interface CardTextAction {
|
|
|
11
11
|
accessibilityLabel?: string;
|
|
12
12
|
}
|
|
13
13
|
export type CardElevation = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
14
|
-
export type CardRadius = 'sm' | 'md' | 'lg' | 'xl'
|
|
14
|
+
export type CardRadius = 'sm' | 'md' | 'lg' | 'xl';
|
|
15
15
|
export type CardPadding = 'none' | 'sm' | 'md' | 'lg' | 'xl';
|
|
16
16
|
export type CardBackground = keyof ColorPalette['background'] | (string & {});
|
|
17
17
|
export interface CardProps extends Omit<PressableProps, 'style' | 'children'> {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
import type React from 'react';
|
|
25
25
|
import type { AccessibilityRole, AccessibilityState, StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
26
26
|
import { Animated } from 'react-native';
|
|
27
|
-
import type { FieldSide, FieldVariantTokens,
|
|
27
|
+
import type { FieldSide, FieldVariantTokens, Theme } from '../../theme/types';
|
|
28
28
|
export type FieldBaseSize = 'sm' | 'md' | 'lg';
|
|
29
29
|
export type FieldBaseVariant = 'outlined' | 'filled' | 'underline';
|
|
30
30
|
/**
|
|
@@ -114,7 +114,7 @@ export interface FieldBaseProps {
|
|
|
114
114
|
paddingRight?: number;
|
|
115
115
|
/** Override vertical padding (single-line). Multiline parents usually leave this default. */
|
|
116
116
|
paddingVertical?: number;
|
|
117
|
-
/** Override corner radius (shorthand — all four corners). SearchBar pill uses this to apply `radius.
|
|
117
|
+
/** Override corner radius (shorthand — all four corners). SearchBar pill uses this to apply `radius.pill`. */
|
|
118
118
|
borderRadius?: number;
|
|
119
119
|
/** Top-left corner radius. Wins over `borderRadius`. */
|
|
120
120
|
borderTopLeftRadius?: number;
|
|
@@ -253,12 +253,6 @@ export declare const FieldMessage: React.FC<{
|
|
|
253
253
|
size?: FieldBaseSize;
|
|
254
254
|
style?: StyleProp<TextStyle>;
|
|
255
255
|
}>;
|
|
256
|
-
/**
|
|
257
|
-
* Public re-export of the resolved size tokens — components that need to
|
|
258
|
-
* compute their own padding adjustments (e.g. multiline Input, icon-slot
|
|
259
|
-
* sizing) read from this rather than re-hardcoding the size table.
|
|
260
|
-
*/
|
|
261
|
-
export declare const resolveFieldSize: (theme: Theme, size: FieldBaseSize) => ResolvedFieldSizeTokens;
|
|
262
256
|
/**
|
|
263
257
|
* Strict, fully-resolved colour set used internally. Mirrors `FieldVariantTokens`
|
|
264
258
|
* but every border colour / width is expanded to a 4-side record by the time
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type { FieldBaseProps, FieldBaseSize, FieldBaseVariant, FieldTextStyle, FieldTextStyleResolverOptions } from './FieldBase';
|
|
2
|
-
export { default, FieldBase, FieldErrorGlyph, FieldLabel, FieldMessage, fieldTextAsString, hasFieldText, RequiredMark, RequiredPlaceholder,
|
|
2
|
+
export { default, FieldBase, FieldErrorGlyph, FieldLabel, FieldMessage, fieldTextAsString, hasFieldText, RequiredMark, RequiredPlaceholder, resolveFieldTextStyle } from './FieldBase';
|
|
3
3
|
export type { UseFloatingLabelOptions, UseFloatingLabelResult } from './useFloatingLabel';
|
|
4
4
|
export { FLOATED_LABEL_SCALE, useFloatingLabel } from './useFloatingLabel';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import type React from 'react';
|
|
17
17
|
import type { StyleProp, TextStyle } from 'react-native';
|
|
18
|
-
import type
|
|
18
|
+
import { type Resolved } from '../../theme';
|
|
19
|
+
import type { FieldSizeTokens } from '../../theme/types';
|
|
19
20
|
import type { FieldBaseProps, FieldBaseVariant } from './FieldBase';
|
|
20
21
|
/** The floated label's scale; the outlined notch is sized from it. */
|
|
21
22
|
export declare const FLOATED_LABEL_SCALE = 0.85;
|
|
@@ -28,7 +29,7 @@ export interface UseFloatingLabelOptions {
|
|
|
28
29
|
floated: boolean;
|
|
29
30
|
required?: boolean;
|
|
30
31
|
variant: FieldBaseVariant;
|
|
31
|
-
sizeTokens:
|
|
32
|
+
sizeTokens: Resolved<FieldSizeTokens>;
|
|
32
33
|
/** Where the text starts past the leading slot (icon, gaps, divider), px. */
|
|
33
34
|
leadingOffset: number;
|
|
34
35
|
/** Width the trailing slot takes, for a right-aligned label, px. */
|
|
@@ -75,7 +75,7 @@ export interface InlineSelectProps<T = SelectOption> {
|
|
|
75
75
|
color?: string;
|
|
76
76
|
/** Chevron colour override — falls back to `color`'s resolution. */
|
|
77
77
|
chevronColor?: string;
|
|
78
|
-
/** Chevron size in pixels. Default: the field size's `
|
|
78
|
+
/** Chevron size in pixels. Default: the field size's `icon`. */
|
|
79
79
|
chevronSize?: number;
|
|
80
80
|
textStyle?: StyleProp<TextStyle>;
|
|
81
81
|
style?: StyleProp<ViewStyle>;
|
|
@@ -164,7 +164,7 @@ export interface InputProps extends Omit<TextInputProps, 'style'> {
|
|
|
164
164
|
labelStyle?: StyleProp<TextStyle>;
|
|
165
165
|
/** Style applied to the helper/error text below the field. */
|
|
166
166
|
messageStyle?: StyleProp<TextStyle>;
|
|
167
|
-
/** Per-instance override for the field's corner radius. Wins over
|
|
167
|
+
/** Per-instance override for the field's corner radius. Wins over the field size's radius. */
|
|
168
168
|
borderRadius?: number;
|
|
169
169
|
onFocus?: (e: FocusEvent) => void;
|
|
170
170
|
onBlur?: (e: BlurEvent) => void;
|
|
@@ -179,7 +179,7 @@ export interface PhoneNumberInputProps extends Pick<TextInputProps, 'returnKeyTy
|
|
|
179
179
|
disabled?: boolean;
|
|
180
180
|
size?: FieldBaseSize;
|
|
181
181
|
variant?: FieldBaseVariant;
|
|
182
|
-
/** Per-instance corner radius. Wins over
|
|
182
|
+
/** Per-instance corner radius. Wins over the field size's radius. */
|
|
183
183
|
borderRadius?: number;
|
|
184
184
|
countrySheetTitle?: string;
|
|
185
185
|
haptic?: HapticType | false;
|
|
@@ -31,7 +31,7 @@ export interface SearchBarProps extends Omit<TextInputProps, 'style' | 'value' |
|
|
|
31
31
|
size?: SearchBarSize;
|
|
32
32
|
variant?: SearchBarVariant;
|
|
33
33
|
/**
|
|
34
|
-
* Corner radius. Default: the theme's `components.searchBar.<size>.
|
|
34
|
+
* Corner radius. Default: the theme's `components.searchBar.<size>.radius`
|
|
35
35
|
* (the pill). Ignored on `underline`, which is always square.
|
|
36
36
|
*/
|
|
37
37
|
borderRadius?: number;
|
|
@@ -70,7 +70,7 @@ export interface SegmentedControlProps {
|
|
|
70
70
|
* Corner radius, a theme token or a pixel number. Rounds the segmented
|
|
71
71
|
* track (the thumb nests inside with the track's corner minus the inset),
|
|
72
72
|
* the pill, and the ends of the underline. Unset, each variant keeps its
|
|
73
|
-
* own default: `md` track with an `sm` thumb, a `
|
|
73
|
+
* own default: `md` track with an `sm` thumb, a `pill`-radius pill, a square
|
|
74
74
|
* underline. The theme's `segmentedControl.radius` token is the app-wide
|
|
75
75
|
* default under this prop.
|
|
76
76
|
*/
|
|
@@ -93,20 +93,6 @@ export interface SegmentedControlProps {
|
|
|
93
93
|
labelStyle?: StyleProp<TextStyle>;
|
|
94
94
|
testID?: string;
|
|
95
95
|
}
|
|
96
|
-
export interface SegmentedControlSizeStyle {
|
|
97
|
-
height: number;
|
|
98
|
-
fontSize: number;
|
|
99
|
-
paddingHorizontal: number;
|
|
100
|
-
/** Pixel size a named icon is drawn at. */
|
|
101
|
-
iconSize: number;
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* The control's sizes. Exported so `Tabs`' segmented variant draws from the
|
|
105
|
-
* same numbers and the two looks cannot drift.
|
|
106
|
-
*/
|
|
107
|
-
export declare const segmentedControlSizes: Record<SegmentedControlSize, SegmentedControlSizeStyle>;
|
|
108
|
-
/** Inset between the track edge and the thumb; also read by `Tabs`' segmented variant. */
|
|
109
|
-
export declare const segmentedControlTrackPadding = 4;
|
|
110
96
|
declare const SegmentedControl: import("react").ForwardRefExoticComponent<SegmentedControlProps & import("react").RefAttributes<RNView>>;
|
|
111
97
|
export { SegmentedControl };
|
|
112
98
|
export default SegmentedControl;
|
|
@@ -111,9 +111,9 @@ interface BaseSelectProps<T = SelectOption> {
|
|
|
111
111
|
rightIcon?: SlotIcon;
|
|
112
112
|
/** Colour of the built-in chevron. Ignored when `rightIcon` is set. Default: `colors.text.tertiary` (`text.disabled` when disabled). */
|
|
113
113
|
chevronColor?: string;
|
|
114
|
-
/** Size of the built-in chevron in pixels. Ignored when `rightIcon` is set. Default: the field size's `
|
|
114
|
+
/** Size of the built-in chevron in pixels. Ignored when `rightIcon` is set. Default: the field size's `icon`. */
|
|
115
115
|
chevronSize?: number;
|
|
116
|
-
/** Per-instance override for the trigger's corner radius. Wins over
|
|
116
|
+
/** Per-instance override for the trigger's corner radius. Wins over the field size's radius. */
|
|
117
117
|
borderRadius?: number;
|
|
118
118
|
accessibilityLabel?: string;
|
|
119
119
|
/** Style for the field label text above the trigger; the same prop as Input's and NumberInput's. */
|
|
@@ -33,7 +33,7 @@ export type SkeletonSpeed = 'slow' | 'normal' | 'fast';
|
|
|
33
33
|
/** Pre-defined shape archetype. Plays nicely with `width`/`height` overrides. */
|
|
34
34
|
export type SkeletonShape = 'rect' | 'rounded' | 'circle' | 'text';
|
|
35
35
|
/** `theme.radius` token name or a literal pixel value. */
|
|
36
|
-
export type SkeletonRadius = keyof Pick<RadiusScale, 'sm' | 'md' | 'lg' | 'xl' | '
|
|
36
|
+
export type SkeletonRadius = keyof Pick<RadiusScale, 'sm' | 'md' | 'lg' | 'xl' | 'pill'> | number;
|
|
37
37
|
export type SkeletonWidth = number | 'auto' | '100%' | `${number}%`;
|
|
38
38
|
export interface SkeletonProps {
|
|
39
39
|
/**
|
|
@@ -52,7 +52,7 @@ export interface TabsProps {
|
|
|
52
52
|
* Corner radius, a theme token or a pixel number. Rounds the segmented
|
|
53
53
|
* track (the thumb nests inside it, its corner the track's minus the inset),
|
|
54
54
|
* the pill, and the ends of the underline. Unset, each variant keeps its own
|
|
55
|
-
* default: `md` track with an `sm` thumb, a `
|
|
55
|
+
* default: `md` track with an `sm` thumb, a `pill`-radius pill, a square underline.
|
|
56
56
|
* The theme's `tabs.radius` token is the app-wide default under this prop.
|
|
57
57
|
*/
|
|
58
58
|
radius?: TabsRadius;
|
|
@@ -9,8 +9,8 @@ export type { InitUIOptions } from './initUI';
|
|
|
9
9
|
export { initUI } from './initUI';
|
|
10
10
|
export type { NetworkStatusBannerProps } from './network';
|
|
11
11
|
export { NetworkStatusBanner } from './network';
|
|
12
|
-
export type { ColorMode, ColorPalette, ColorSchemePreference, DeepPartial, IconRegistry, IconRenderer, MotionScale, RadiusScale, ShadowDefinition, ShadowScale, SpacingScale, TextVariantSpec, Theme, ThemeOverrides, ThemeProviderProps, TypographyScale } from './theme';
|
|
13
|
-
export { darkTheme, getColorMode, getTheme, lightTheme, mergeTheme, resetTheme, setColorMode, setTheme, subscribeTheme, ThemeProvider, useTheme, useThemeMode } from './theme';
|
|
14
|
-
export type { AnnounceOptions, BreakpointKey, FeedbackIntent, HapticType, ResponsiveScales, ScreenInfo,
|
|
15
|
-
export { announce, Breakpoints, configureFeedback, feedback, hapticForIntent, isFeedbackEnabled, isScreenSize, isTablet,
|
|
12
|
+
export type { ColorMode, ColorPalette, ColorSchemePreference, ComponentTokens, DeepPartial, FontSizeKey, IconRegistry, IconRenderer, MotionScale, RadiusKey, RadiusScale, Resolved, ShadowDefinition, ShadowScale, SpacingKey, SpacingScale, TextVariantSpec, Theme, ThemeOverrides, ThemeProviderProps, TypographyScale } from './theme';
|
|
13
|
+
export { darkTheme, fontSizeOf, getColorMode, getTheme, lightTheme, mergeTheme, radiusOf, resetTheme, resolveBadgeSize, resolveButtonSize, resolveCheckboxSize, resolveChipSize, resolveEmptyStateSize, resolveFieldSize, resolveFloatingActionButtonSize, resolveListItemSize, resolveOtpInputSize, resolveRadioSize, resolveSegmentedControlSize, resolveSliderSize, resolveSwitchSize, resolveTabsSize, setColorMode, setTheme, spaceOf, subscribeTheme, ThemeProvider, useTheme, useThemeMode } from './theme';
|
|
14
|
+
export type { AnnounceOptions, BreakpointKey, FeedbackIntent, HapticType, ResponsiveScales, ScreenInfo, SquirclePathParams } from './utils';
|
|
15
|
+
export { announce, Breakpoints, configureFeedback, feedback, hapticForIntent, isFeedbackEnabled, isScreenSize, isTablet, Responsive, ScreenDimensions, SQUIRCLE_MIN_RADIUS, SQUIRCLE_SMOOTHING, setHapticImplementation, shadowStyle, smoothCorners, squircleApplies, squircleHostRadius, squirclePath, triggerHaptic, useScreenDimensions, warnUnknownProps } from './utils';
|
|
16
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { BadgeSizeTokens, ButtonSizeTokens, CheckboxSizeTokens, ChipSizeTokens, ComponentSizeKey, EmptyStateSizeTokens, FieldSizeTokens, FloatingActionButtonSizeTokens, ListItemSizeTokens, OTPInputSizeTokens, RadioSizeTokens, SegmentedControlSizeTokens, SliderSizeTokens, SwitchSizeTokens, TabsSizeTokens } from './componentTokens';
|
|
2
|
+
import type { Theme } from './types';
|
|
3
|
+
/** A size token with every scale name turned into pixels. */
|
|
4
|
+
export type Resolved<T> = {
|
|
5
|
+
[K in keyof T]: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const resolveButtonSize: (theme: Theme, size: ComponentSizeKey) => Resolved<ButtonSizeTokens>;
|
|
8
|
+
export declare const resolveFieldSize: (theme: Theme, size: "sm" | "md" | "lg") => Resolved<FieldSizeTokens>;
|
|
9
|
+
export declare const resolveEmptyStateSize: (theme: Theme, size: "sm" | "md" | "lg") => Resolved<EmptyStateSizeTokens>;
|
|
10
|
+
export declare const resolveListItemSize: (theme: Theme, size: "sm" | "md" | "lg") => Resolved<ListItemSizeTokens>;
|
|
11
|
+
export declare const resolveBadgeSize: (theme: Theme, size: "sm" | "md") => Resolved<BadgeSizeTokens>;
|
|
12
|
+
export declare const resolveChipSize: (theme: Theme, size: "sm" | "md") => Resolved<ChipSizeTokens>;
|
|
13
|
+
export declare const resolveCheckboxSize: (theme: Theme, size: "sm" | "md" | "lg") => Resolved<CheckboxSizeTokens>;
|
|
14
|
+
export declare const resolveRadioSize: (theme: Theme, size: "sm" | "md" | "lg") => Resolved<RadioSizeTokens>;
|
|
15
|
+
export declare const resolveSwitchSize: (theme: Theme, size: "sm" | "md" | "lg") => Resolved<SwitchSizeTokens>;
|
|
16
|
+
export declare const resolveOtpInputSize: (theme: Theme, size: "sm" | "md" | "lg") => Resolved<OTPInputSizeTokens>;
|
|
17
|
+
export declare const resolveSegmentedControlSize: (theme: Theme, size: "sm" | "md" | "lg") => Resolved<SegmentedControlSizeTokens>;
|
|
18
|
+
export declare const resolveTabsSize: (theme: Theme, size: "sm" | "md" | "lg") => Resolved<TabsSizeTokens>;
|
|
19
|
+
export declare const resolveSliderSize: (theme: Theme, size: "sm" | "md" | "lg") => Resolved<SliderSizeTokens>;
|
|
20
|
+
export declare const resolveFloatingActionButtonSize: (theme: Theme, size: "sm" | "md" | "lg") => Resolved<FloatingActionButtonSizeTokens>;
|
|
21
|
+
/**
|
|
22
|
+
* Resolves every scale-named component token once, so a theme override that
|
|
23
|
+
* names a missing scale step stops the app where the theme is built, with the
|
|
24
|
+
* token's path, instead of drawing a component with no padding.
|
|
25
|
+
*/
|
|
26
|
+
export declare const validateComponentTokens: (theme: Theme) => void;
|
|
27
|
+
//# sourceMappingURL=componentSizes.d.ts.map
|