@webority/mobile-ui 0.188.0 → 0.189.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/README.md +1 -1
- package/dist/canvas-kit/kit.js +10 -10
- package/dist/canvas-kit/manifest.json +47 -24
- package/dist/canvas-kit/release.json +6 -6
- package/lib/commonjs/components/Button/Button.js +1 -1
- package/lib/commonjs/components/Button/index.js +1 -1
- package/lib/commonjs/components/FieldBase/FieldBase.js +1 -1
- package/lib/commonjs/components/FieldBase/useFloatingLabel.js +1 -1
- package/lib/commonjs/components/FloatingActionButton/FloatingActionButton.js +1 -1
- package/lib/commonjs/components/Input/Input.js +1 -1
- package/lib/commonjs/components/NumberInput/NumberInput.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/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/SignaturePad/SignaturePad.js +1 -1
- package/lib/commonjs/components/Skeleton/Skeleton.js +1 -1
- package/lib/commonjs/components/SquircleFill/SquircleFill.js +1 -1
- package/lib/commonjs/components/TagInput/TagInput.js +1 -1
- package/lib/commonjs/components/TimePicker/TimePicker.js +1 -1
- package/lib/commonjs/index.js +1 -1
- package/lib/commonjs/theme/Gradient.js +1 -1
- package/lib/commonjs/theme/index.js +1 -1
- package/lib/commonjs/theme/tokens.generated.js +1 -1
- package/lib/commonjs/utils/squircle.js +1 -1
- package/lib/module/components/Button/Button.js +1 -1
- package/lib/module/components/Button/index.js +1 -1
- package/lib/module/components/FieldBase/FieldBase.js +1 -1
- package/lib/module/components/FieldBase/useFloatingLabel.js +1 -1
- package/lib/module/components/FloatingActionButton/FloatingActionButton.js +1 -1
- package/lib/module/components/Input/Input.js +1 -1
- package/lib/module/components/NumberInput/NumberInput.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/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/SignaturePad/SignaturePad.js +1 -1
- package/lib/module/components/Skeleton/Skeleton.js +1 -1
- package/lib/module/components/SquircleFill/SquircleFill.js +1 -1
- package/lib/module/components/TagInput/TagInput.js +1 -1
- package/lib/module/components/TimePicker/TimePicker.js +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/theme/Gradient.js +1 -1
- package/lib/module/theme/index.js +1 -1
- package/lib/module/theme/tokens.generated.js +1 -1
- package/lib/module/utils/squircle.js +1 -1
- package/lib/typescript/commonjs/components/Button/Button.d.ts +10 -5
- package/lib/typescript/commonjs/components/Button/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/FieldBase/FieldBase.d.ts +1 -1
- package/lib/typescript/commonjs/components/FieldBase/useFloatingLabel.d.ts +10 -2
- package/lib/typescript/commonjs/components/InlineSelect/InlineSelect.d.ts +1 -1
- package/lib/typescript/commonjs/components/Input/Input.d.ts +5 -2
- package/lib/typescript/commonjs/components/NumberInput/NumberInput.d.ts +1 -1
- package/lib/typescript/commonjs/components/PhoneNumberInput/PhoneNumberInput.d.ts +1 -1
- package/lib/typescript/commonjs/components/PickerTrigger/PickerTrigger.d.ts +1 -1
- package/lib/typescript/commonjs/components/SearchBar/SearchBar.d.ts +2 -2
- package/lib/typescript/commonjs/components/Select/Select.d.ts +1 -1
- package/lib/typescript/commonjs/components/SquircleFill/SquircleFill.d.ts +7 -4
- package/lib/typescript/commonjs/components/index.d.ts +1 -1
- package/lib/typescript/commonjs/index.d.ts +1 -1
- package/lib/typescript/commonjs/theme/Gradient.d.ts +4 -0
- package/lib/typescript/commonjs/theme/componentSizes.d.ts +2 -2
- package/lib/typescript/commonjs/theme/index.d.ts +1 -1
- package/lib/typescript/commonjs/theme/tokens.generated.d.ts +8 -8
- package/lib/typescript/commonjs/utils/squircle.d.ts +7 -0
- package/lib/typescript/module/components/Button/Button.d.ts +10 -5
- package/lib/typescript/module/components/Button/index.d.ts +2 -2
- package/lib/typescript/module/components/FieldBase/FieldBase.d.ts +1 -1
- package/lib/typescript/module/components/FieldBase/useFloatingLabel.d.ts +10 -2
- package/lib/typescript/module/components/InlineSelect/InlineSelect.d.ts +1 -1
- package/lib/typescript/module/components/Input/Input.d.ts +5 -2
- package/lib/typescript/module/components/NumberInput/NumberInput.d.ts +1 -1
- package/lib/typescript/module/components/PhoneNumberInput/PhoneNumberInput.d.ts +1 -1
- package/lib/typescript/module/components/PickerTrigger/PickerTrigger.d.ts +1 -1
- package/lib/typescript/module/components/SearchBar/SearchBar.d.ts +2 -2
- package/lib/typescript/module/components/Select/Select.d.ts +1 -1
- package/lib/typescript/module/components/SquircleFill/SquircleFill.d.ts +7 -4
- package/lib/typescript/module/components/index.d.ts +1 -1
- package/lib/typescript/module/index.d.ts +1 -1
- package/lib/typescript/module/theme/Gradient.d.ts +4 -0
- package/lib/typescript/module/theme/componentSizes.d.ts +2 -2
- package/lib/typescript/module/theme/index.d.ts +1 -1
- package/lib/typescript/module/theme/tokens.generated.d.ts +8 -8
- package/lib/typescript/module/utils/squircle.d.ts +7 -0
- package/package.json +7 -7
|
@@ -6,9 +6,9 @@ import type { RadiusName } from "../../theme/types";
|
|
|
6
6
|
import type { FieldVariant, Size } from "../../types/vocabulary";
|
|
7
7
|
import type { SlotIcon, SlotIconState } from "../AppIcon/slotIcon";
|
|
8
8
|
import type { ButtonTone, ButtonVariant } from "../Button";
|
|
9
|
-
export type InputSize = Extract<Size, "sm" | "md" | "lg">;
|
|
9
|
+
export type InputSize = Extract<Size, "sm" | "md" | "lg" | "xl">;
|
|
10
10
|
export type InputVariant = FieldVariant;
|
|
11
|
-
export type InputLabelMode = "float" | "top";
|
|
11
|
+
export type InputLabelMode = "float" | "top" | "above";
|
|
12
12
|
/**
|
|
13
13
|
* What kind of field this is. One prop switches the whole behaviour set:
|
|
14
14
|
* - `'input'` (default): single-line text.
|
|
@@ -135,6 +135,9 @@ export interface InputProps extends Omit<TextInputProps, "style"> {
|
|
|
135
135
|
* the field, permanently visible.
|
|
136
136
|
* - `'float'`: Material-Design floating label that animates from inside the
|
|
137
137
|
* field to the top border on focus / when there's a value.
|
|
138
|
+
* - `'above'`: the web's `floatingLabel="above"`: rests inside the field, then
|
|
139
|
+
* rises above the box, clear of the border, on focus / when there's a value. The
|
|
140
|
+
* line above the box is always reserved, so nothing jumps when it rises.
|
|
138
141
|
*
|
|
139
142
|
* Theme setting: `theme.settings.components.input.defaultLabelMode`.
|
|
140
143
|
*/
|
|
@@ -3,7 +3,7 @@ import type { StyleProp, TextInputProps, TextStyle, ViewStyle } from "react-nati
|
|
|
3
3
|
import { type NumberInputText } from "../../text/phone/numberInput.g";
|
|
4
4
|
import type { Size } from "../../types/vocabulary";
|
|
5
5
|
import type { HapticType } from "../../utils";
|
|
6
|
-
export type NumberInputSize = Extract<Size, "sm" | "md" | "lg">;
|
|
6
|
+
export type NumberInputSize = Extract<Size, "sm" | "md" | "lg" | "xl">;
|
|
7
7
|
export type NumberInputVariant = "inline" | "horizontal";
|
|
8
8
|
export interface NumberInputRef {
|
|
9
9
|
focus: () => void;
|
|
@@ -177,7 +177,7 @@ export interface PhoneNumberInputProps extends Pick<TextInputProps, "returnKeyTy
|
|
|
177
177
|
invalidMessage?: string | false | undefined;
|
|
178
178
|
required?: boolean | undefined;
|
|
179
179
|
disabled?: boolean | undefined;
|
|
180
|
-
size?: Extract<Size, "sm" | "md" | "lg"> | undefined;
|
|
180
|
+
size?: Extract<Size, "sm" | "md" | "lg" | "xl"> | undefined;
|
|
181
181
|
variant?: FieldVariant | undefined;
|
|
182
182
|
/** Corner radius token from the theme (none, sm, md, lg, xl, pill). Wins over the field size's radius. */
|
|
183
183
|
radius?: keyof Theme["radius"] | undefined;
|
|
@@ -16,7 +16,7 @@ import { type Ref } from "react";
|
|
|
16
16
|
import type { HostInstance, StyleProp, TextStyle, ViewStyle } from "react-native";
|
|
17
17
|
import { type PickerTriggerText } from "../../text/phone/pickerTrigger.g";
|
|
18
18
|
import type { FieldVariant, Size } from "../../types/vocabulary";
|
|
19
|
-
export type PickerTriggerSize = Extract<Size, "sm" | "md" | "lg">;
|
|
19
|
+
export type PickerTriggerSize = Extract<Size, "sm" | "md" | "lg" | "xl">;
|
|
20
20
|
export type PickerTriggerVariant = FieldVariant;
|
|
21
21
|
export interface PickerTriggerProps {
|
|
22
22
|
/** The currently selected value rendered as the trigger's primary text. */
|
|
@@ -29,11 +29,11 @@ export interface SearchBarProps extends Omit<TextInputProps, "style" | "value" |
|
|
|
29
29
|
*/
|
|
30
30
|
leftIcon?: SlotIcon | undefined;
|
|
31
31
|
debounceMs?: number | undefined;
|
|
32
|
-
size?: Extract<Size, "sm" | "md" | "lg"> | undefined;
|
|
32
|
+
size?: Extract<Size, "sm" | "md" | "lg" | "xl"> | undefined;
|
|
33
33
|
variant?: FieldVariant | undefined;
|
|
34
34
|
/**
|
|
35
35
|
* Corner radius from the theme's radius scale. Default: the theme's
|
|
36
|
-
* `components["search-bar"].<size>.radius` (the
|
|
36
|
+
* `components["search-bar"].<size>.radius` (the field corner, as every input). Ignored on `underline`,
|
|
37
37
|
* which is always square.
|
|
38
38
|
*/
|
|
39
39
|
radius?: RadiusName | undefined;
|
|
@@ -13,7 +13,7 @@ import type { FieldVariant, Size } from "../../types/vocabulary";
|
|
|
13
13
|
import type { HapticType } from "../../utils";
|
|
14
14
|
import type { SlotIcon } from "../AppIcon/slotIcon";
|
|
15
15
|
import type { SelectOption, SelectValue } from "../OptionSheet/OptionSheet";
|
|
16
|
-
export type SelectSize = Extract<Size, "sm" | "md" | "lg">;
|
|
16
|
+
export type SelectSize = Extract<Size, "sm" | "md" | "lg" | "xl">;
|
|
17
17
|
type SelectRadius = "sm" | "md" | "lg" | "xl" | "pill";
|
|
18
18
|
export type { SelectOption, SelectValue };
|
|
19
19
|
export interface SelectLabels extends SelectText {
|
|
@@ -39,9 +39,11 @@ export interface SquircleFillProps {
|
|
|
39
39
|
* that the shape drew one border width right and down, past the host's labels and buttons.
|
|
40
40
|
*/
|
|
41
41
|
hostBorderWidth: number;
|
|
42
|
+
/** `figma`: Figma's smoothing from the theme (default). `css`: the web's `corner-shape: squircle`. */
|
|
43
|
+
curve?: "figma" | "css" | undefined;
|
|
42
44
|
testID?: string | undefined;
|
|
43
45
|
}
|
|
44
|
-
export declare function SquircleFill({ width, height, radius, fill, stroke, strokeWidth, hostBorderWidth, testID }: SquircleFillProps): import("react").JSX.Element;
|
|
46
|
+
export declare function SquircleFill({ width, height, radius, fill, stroke, strokeWidth, hostBorderWidth, curve, testID, }: SquircleFillProps): import("react").JSX.Element;
|
|
45
47
|
export declare namespace SquircleFill {
|
|
46
48
|
var displayName: string;
|
|
47
49
|
}
|
|
@@ -61,8 +63,9 @@ export interface SquircleLayout {
|
|
|
61
63
|
active: boolean;
|
|
62
64
|
}
|
|
63
65
|
/**
|
|
64
|
-
* Tracks a host's size for `SquircleFill`. On iOS (and when `enabled` is
|
|
65
|
-
* false) it only forwards the layout event and never re-renders the host
|
|
66
|
+
* Tracks a host's size for `SquircleFill`. On iOS and the web (and when `enabled` is
|
|
67
|
+
* false) it only forwards the layout event and never re-renders the host, unless
|
|
68
|
+
* `everyPlatform` asks for the drawn shape there too (a host matching its web corner).
|
|
66
69
|
*/
|
|
67
|
-
export declare function useSquircle(enabled: boolean, radius: number, onLayoutProp?: (event: LayoutChangeEvent) => void): SquircleLayout;
|
|
70
|
+
export declare function useSquircle(enabled: boolean, radius: number, onLayoutProp?: (event: LayoutChangeEvent) => void, everyPlatform?: boolean): SquircleLayout;
|
|
68
71
|
//# sourceMappingURL=SquircleFill.d.ts.map
|
|
@@ -28,7 +28,7 @@ export type { BottomSheetContextValue, BottomSheetPresentation, BottomSheetProps
|
|
|
28
28
|
export { BottomSheet, useBottomSheet } from "./BottomSheet";
|
|
29
29
|
export type { BoxProps, RowProps, SpacerProps, StackProps } from "./Box";
|
|
30
30
|
export { Box, Row, Spacer, Stack } from "./Box";
|
|
31
|
-
export type { ButtonProps, ButtonSize, ButtonTone, ButtonVariant } from "./Button";
|
|
31
|
+
export type { ButtonProps, ButtonShape, ButtonSize, ButtonTone, ButtonVariant } from "./Button";
|
|
32
32
|
export { Button, buttonLabelInk } from "./Button";
|
|
33
33
|
export type { CalendarMark, CalendarProps, CalendarRange, CalendarSelectionMode, CalendarWeekStart } from "./Calendar";
|
|
34
34
|
export { Calendar } from "./Calendar";
|
|
@@ -3,7 +3,7 @@ export type * from "./components";
|
|
|
3
3
|
export { Accordion, AccordionGroup, ALL_CALLING_CODES, AmountSlider, AnimatePresence, AppBar, AppLockOverlay, AsyncBlock, AuthedImage, Autocomplete, Avatar, AvatarGroup, authedImageCacheStats, Badge, Banner, BarChart, BottomNavigation, BottomSheet, Box, Button, buttonLabelInk, Calendar, Card, Carousel, Checkbox, Chip, ChoiceGroup, Composer, Confetti, ConfirmHost, clearAuthedImageCache, confirm, DatePicker, DateRangePicker, DateSeparator, DEFAULT_CALLING_CODES, DecimalInput, Descriptions, Dialog, Divider, Drawer, defineStatusMap, EmptyState, ErrorBoundary, FilePicker, FileViewer, FilterChipRow, FloatingActionButton, FloatingActionButtonGroup, ForceUpdateDialog, FormField, formatE164, formatFileSize, getAuthedImageCacheLimit, IconBadge, IconButton, IdleTimeoutDialog, ImageGallery, InlineSelect, Input, KeyboardAwareScrollView, KeyboardToolbar, ListItem, ListSection, LoaderOverlay, loader, Markdown, Menu, MessageBubble, MessageList, MODAL_DISMISS_GRACE_MS, Modal, NonModalBottomSheet, NumberInput, OnboardingPager, OptionSheet, OTPInput, OTPResendRow, OutboxEntryList, PagedList, PagedListFooter, PermissionPrompt, PhoneNumberInput, PickerTrigger, ProfileCompletion, ProfilePicker, ProgressBar, ProgressRing, Radio, RadioDot, RadioGroup, Rating, Repeater, RichTextEditor, Row, ScannerOverlay, Screen, SearchBar, SectionHeader, SegmentedControl, Select, SignaturePad, Skeleton, SkeletonCircle, SkeletonClockProvider, SkeletonContent, SkeletonList, SkeletonProvider, SkeletonSkip, SkeletonText, Slider, SliderField, SlideToConfirm, SortableList, Spacer, Sparkline, Spinner, SquircleImage, SquircleView, Stack, StatTile, StatusBadge, Stepper, Swipeable, Switch, setAuthedImageCacheLimit, Tabs, TagInput, Text, TextInkContext, Timeline, TimePicker, Toast, ToastHost, ToastProvider, Tooltip, Tour, TypingIndicator, toast, useBottomSheet, useErrorHandler, useRecentSearches, useTextInk, useToast, WheelPicker, withErrorBoundary, ZoomableImage, } from "./components";
|
|
4
4
|
export type { AppIconColor, AppIconName, AppIconProps, AppIconSize, CuratedIconName, IconName, IconsaxShadowedName, IconVariant, SlotIcon, SlotIconRef, SlotIconState, SlotNode, } from "./components/AppIcon";
|
|
5
5
|
export { AppIcon, ICONSAX_SUFFIX, isAppIconName } from "./components/AppIcon";
|
|
6
|
-
export { BUTTON_TONES, BUTTON_VARIANTS, isButtonTone, isButtonVariant } from "./components/Button";
|
|
6
|
+
export { BUTTON_SHAPES, BUTTON_TONES, BUTTON_VARIANTS, isButtonTone, isButtonVariant } from "./components/Button";
|
|
7
7
|
export type { FormCompletion, HookFieldProps, HookFormFieldProps, UseFormCompletionOptions } from "./form";
|
|
8
8
|
export { HookFormField, useHookFormField } from "./form";
|
|
9
9
|
export type { FieldChain, FieldChainProps, FieldErrorRegistry, MotionDurationKey, PresenceMotion, PressAnimationPreset, ScrollDirection, UseControllableStateOptions, UseFieldErrorScrollOptions, UseFieldErrorScrollResult, UsePressAnimationOptions, UsePressAnimationResult, UseRefreshControlLabels, UseRefreshControlOptions, UseRefreshControlResult, UseResendCountdownOptions, UseResendCountdownResult, UseScrollDirectionOptions, UseScrollDirectionResult, UseToggleResult, } from "./hooks";
|
|
@@ -20,6 +20,10 @@ type GradientVector = {
|
|
|
20
20
|
*/
|
|
21
21
|
export declare const gradientAngle: (start?: GradientVector, end?: GradientVector) => number;
|
|
22
22
|
export declare const toBackgroundImage: (gradient: GradientDefinition) => LinearGradientValue;
|
|
23
|
+
/** The same gradient as CSS text, the one form react-native-web draws: it writes an array as `[object Object]`. */
|
|
24
|
+
export declare const toCssGradient: (gradient: GradientDefinition) => string;
|
|
25
|
+
/** The `backgroundImage` style value for this platform: the typed layer on a phone, CSS text on the web. */
|
|
26
|
+
export declare const gradientBackground: (gradient: GradientDefinition) => NonNullable<ViewStyle["backgroundImage"]>;
|
|
23
27
|
export interface GradientProps {
|
|
24
28
|
gradient: GradientDefinition;
|
|
25
29
|
style?: StyleProp<ViewStyle> | undefined;
|
|
@@ -3,8 +3,8 @@ import type { ComponentSizeTokens, Theme } from "./types";
|
|
|
3
3
|
export type Resolved<T> = {
|
|
4
4
|
[K in keyof T]: number;
|
|
5
5
|
};
|
|
6
|
-
export declare const resolveButtonSize: (theme: Theme, size: "
|
|
7
|
-
export declare const resolveFieldSize: (theme: Theme, size: "sm" | "md" | "lg") => Resolved<ComponentSizeTokens<"field">>;
|
|
6
|
+
export declare const resolveButtonSize: (theme: Theme, size: "sm" | "md" | "lg" | "xl") => Resolved<ComponentSizeTokens<"button">>;
|
|
7
|
+
export declare const resolveFieldSize: (theme: Theme, size: "sm" | "md" | "lg" | "xl") => Resolved<ComponentSizeTokens<"field">>;
|
|
8
8
|
export declare const resolveEmptyStateSize: (theme: Theme, size: "sm" | "md" | "lg") => Resolved<ComponentSizeTokens<"empty-state">>;
|
|
9
9
|
export declare const resolveListItemSize: (theme: Theme, size: "sm" | "md" | "lg") => Resolved<ComponentSizeTokens<"list-item">>;
|
|
10
10
|
export declare const resolveBadgeSize: (theme: Theme, size: "sm" | "md") => Resolved<ComponentSizeTokens<"badge">>;
|
|
@@ -2,7 +2,7 @@ export { createAnimatedValue, setNativeValue } from "./animatedValue";
|
|
|
2
2
|
export type { Resolved } from "./componentSizes";
|
|
3
3
|
export { resolveBadgeSize, resolveButtonSize, resolveCheckboxSize, resolveChipSize, resolveEmptyStateSize, resolveFieldSize, resolveFloatingActionButtonSize, resolveListItemSize, resolveOtpInputSize, resolveRadioSize, resolveSegmentedControlSize, resolveSliderSize, resolveSwitchSize, resolveTabsSize, validateComponentTokens, } from "./componentSizes";
|
|
4
4
|
export type { GradientProps } from "./Gradient";
|
|
5
|
-
export { Gradient, gradientAngle, toBackgroundImage } from "./Gradient";
|
|
5
|
+
export { Gradient, gradientAngle, gradientBackground, toBackgroundImage, toCssGradient } from "./Gradient";
|
|
6
6
|
export { makeStyles } from "./makeStyles";
|
|
7
7
|
export { mergeBrand } from "./merge";
|
|
8
8
|
export { radiusOf, spaceOf, textOf } from "./scale";
|
|
@@ -51,10 +51,10 @@ export interface FieldSizeTokens {
|
|
|
51
51
|
"message-gap": SpaceName;
|
|
52
52
|
}
|
|
53
53
|
export interface ButtonSizeTokens {
|
|
54
|
-
"padding-x":
|
|
54
|
+
"padding-x": number;
|
|
55
55
|
"padding-y": SpaceName;
|
|
56
56
|
"min-height": number;
|
|
57
|
-
text:
|
|
57
|
+
text: number;
|
|
58
58
|
radius: RadiusName;
|
|
59
59
|
icon: number;
|
|
60
60
|
"badge-icon": number;
|
|
@@ -128,18 +128,18 @@ export interface FloatingActionButtonTokens {
|
|
|
128
128
|
"stagger-ms": number;
|
|
129
129
|
}
|
|
130
130
|
export interface ComponentTokens {
|
|
131
|
-
field: Sized<
|
|
131
|
+
field: Sized<"sm" | "md" | "lg" | "xl", FieldSizeTokens>;
|
|
132
132
|
press: {
|
|
133
133
|
opacity: number;
|
|
134
134
|
};
|
|
135
135
|
disabled: {
|
|
136
136
|
opacity: number;
|
|
137
137
|
};
|
|
138
|
-
button: Sized<"
|
|
139
|
-
input: Sized<
|
|
138
|
+
button: Sized<"sm" | "md" | "lg" | "xl", ButtonSizeTokens>;
|
|
139
|
+
input: Sized<"sm" | "md" | "lg" | "xl", {
|
|
140
140
|
"multiline-min-height": number;
|
|
141
141
|
}>;
|
|
142
|
-
"search-bar": Sized<
|
|
142
|
+
"search-bar": Sized<"sm" | "md" | "lg" | "xl", {
|
|
143
143
|
radius: RadiusName;
|
|
144
144
|
}>;
|
|
145
145
|
"empty-state": Sized<L3, EmptyStateSizeTokens>;
|
|
@@ -221,10 +221,10 @@ export declare const COMPONENT_KINDS: {
|
|
|
221
221
|
readonly opacity: "number";
|
|
222
222
|
};
|
|
223
223
|
readonly button: {
|
|
224
|
-
readonly "padding-x": "
|
|
224
|
+
readonly "padding-x": "px";
|
|
225
225
|
readonly "padding-y": "space";
|
|
226
226
|
readonly "min-height": "px";
|
|
227
|
-
readonly text: "
|
|
227
|
+
readonly text: "px";
|
|
228
228
|
readonly radius: "radius";
|
|
229
229
|
readonly icon: "px";
|
|
230
230
|
readonly "badge-icon": "px";
|
|
@@ -55,6 +55,13 @@ export declare const squircleApplies: (width: number, height: number, radius: nu
|
|
|
55
55
|
* change. Capped at half the shorter side, as a pill would be.
|
|
56
56
|
*/
|
|
57
57
|
export declare const squircleHostRadius: (width: number, height: number, radius: number) => number;
|
|
58
|
+
/**
|
|
59
|
+
* The web's `corner-shape: squircle` (CSS superellipse(2), the curve |x|^4 + |y|^4 = 1) as a
|
|
60
|
+
* closed path, so a phone control draws the same corner as its web counterpart. Bounds and
|
|
61
|
+
* `inset` work as in `squirclePath`; the radius is capped at half the shorter side, as CSS does
|
|
62
|
+
* for four equal corners.
|
|
63
|
+
*/
|
|
64
|
+
export declare function cssSquirclePath({ width, height, radius, inset }: Omit<SquirclePathParams, "smoothing">): string;
|
|
58
65
|
/**
|
|
59
66
|
* The closed path of a smooth-cornered rectangle whose bounds are
|
|
60
67
|
* `(inset, inset)` to `(width - inset, height - inset)`, drawn clockwise
|
|
@@ -22,9 +22,11 @@ export type ButtonVariant = FillVariant | "link" | "glass";
|
|
|
22
22
|
export type ButtonTone = Tone;
|
|
23
23
|
export declare const BUTTON_VARIANTS: readonly ["solid", "soft", "outline", "ghost", "link", "glass"];
|
|
24
24
|
export declare const BUTTON_TONES: readonly ["primary", "success", "warning", "danger", "info", "neutral"];
|
|
25
|
+
export type ButtonShape = "rounded" | "pill" | "sharp";
|
|
26
|
+
export declare const BUTTON_SHAPES: readonly ["rounded", "pill", "sharp"];
|
|
25
27
|
export declare function isButtonVariant(value: unknown): value is ButtonVariant;
|
|
26
28
|
export declare function isButtonTone(value: unknown): value is ButtonTone;
|
|
27
|
-
export type ButtonSize = Size
|
|
29
|
+
export type ButtonSize = Extract<Size, "sm" | "md" | "lg" | "xl">;
|
|
28
30
|
export interface ButtonProps extends Omit<PressableProps, "style" | "children" | "onPress"> {
|
|
29
31
|
/** The label, and the button's accessible name unless `accessibilityLabel` is set. */
|
|
30
32
|
label: string;
|
|
@@ -64,7 +66,7 @@ export interface ButtonProps extends Omit<PressableProps, "style" | "children" |
|
|
|
64
66
|
* disc inverts the button's own colours: white with the icon in the tone on
|
|
65
67
|
* `solid` and `glass`, the tone with a white icon on `soft`, `outline` and
|
|
66
68
|
* `ghost`. Sized to the button height less a 4 pt inset; pair with
|
|
67
|
-
* `
|
|
69
|
+
* `shape="pill"` for the pill shape. Ignored on a `link` and without a
|
|
68
70
|
* `leftIcon`.
|
|
69
71
|
*/
|
|
70
72
|
leftIconBadge?: boolean | undefined;
|
|
@@ -72,10 +74,13 @@ export interface ButtonProps extends Omit<PressableProps, "style" | "children" |
|
|
|
72
74
|
* Haptic on press. Defaults to a light tap (`impactLight`); a `HapticType` changes it and `false` switches it off. The app-wide switch (`configureFeedback`) silences it too.
|
|
73
75
|
*/
|
|
74
76
|
haptic?: HapticType | false | undefined;
|
|
75
|
-
rounded
|
|
77
|
+
/** Corner shape, as `AppButton`: `rounded` (the size's radius as the web's CSS squircle, default), `pill` (fully round ends) or `sharp` (square corners). */
|
|
78
|
+
shape?: ButtonShape | undefined;
|
|
76
79
|
/**
|
|
77
|
-
* Optional gradient background. Pass either a key from
|
|
78
|
-
* (e.g. `"primary"`) or a `GradientDefinition` literal.
|
|
80
|
+
* Optional gradient background, for the `solid` variant only. Pass either a key from
|
|
81
|
+
* `theme.settings.gradients` (e.g. `"primary"`) or a `GradientDefinition` literal. A name the
|
|
82
|
+
* theme does not define, or a gradient on any other variant, throws a `RangeError`. A disabled
|
|
83
|
+
* button paints the flat disabled colour instead.
|
|
79
84
|
*/
|
|
80
85
|
gradient?: string | GradientDefinition | undefined;
|
|
81
86
|
style?: StyleProp<ViewStyle> | undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export type { ButtonProps, ButtonSize, ButtonTone, ButtonVariant } from "./Button.js";
|
|
2
|
-
export { BUTTON_TONES, BUTTON_VARIANTS, Button, buttonLabelInk, default, isButtonTone, isButtonVariant } from "./Button.js";
|
|
1
|
+
export type { ButtonProps, ButtonShape, ButtonSize, ButtonTone, ButtonVariant } from "./Button.js";
|
|
2
|
+
export { BUTTON_SHAPES, BUTTON_TONES, BUTTON_VARIANTS, Button, buttonLabelInk, default, isButtonTone, isButtonVariant } from "./Button.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -26,7 +26,7 @@ import type { AccessibilityRole, AccessibilityState, StyleProp, TextStyle, ViewS
|
|
|
26
26
|
import { Animated } from "react-native";
|
|
27
27
|
import type { Theme } from "../../theme/types.js";
|
|
28
28
|
import type { FieldVariant, Size } from "../../types/vocabulary.js";
|
|
29
|
-
export type FieldBaseSize = Extract<Size, "sm" | "md" | "lg">;
|
|
29
|
+
export type FieldBaseSize = Extract<Size, "sm" | "md" | "lg" | "xl">;
|
|
30
30
|
export type FieldBaseVariant = FieldVariant;
|
|
31
31
|
type FieldSide = "top" | "right" | "bottom" | "left";
|
|
32
32
|
/**
|
|
@@ -19,13 +19,21 @@ import { type resolveFieldSize } from "../../theme/index.js";
|
|
|
19
19
|
import type { FieldBaseProps, FieldBaseVariant } from "./FieldBase.js";
|
|
20
20
|
/** The floated label's scale; the outline notch is sized from it. */
|
|
21
21
|
export declare const FLOATED_LABEL_SCALE = 0.85;
|
|
22
|
+
/** The line reserved above the box for an `above` label, as the web's `--wui-float-above-space`. */
|
|
23
|
+
export declare const ABOVE_LABEL_SPACE = 22;
|
|
22
24
|
export interface UseFloatingLabelOptions {
|
|
23
25
|
/** A string or a node; a node needs the field's explicit `accessibilityLabel`. */
|
|
24
26
|
label?: React.ReactNode | undefined;
|
|
25
27
|
/** Render at all (label present and the consumer's labelMode is 'float'). */
|
|
26
28
|
enabled: boolean;
|
|
27
|
-
/** Whether the label is up
|
|
29
|
+
/** Whether the label is up right now (focused or holding a value). */
|
|
28
30
|
floated: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Where a floated label lands: `border` cuts the outline's top border and sits on it;
|
|
33
|
+
* `above` rests on the line the consumer reserves above the box (`ABOVE_LABEL_SPACE`),
|
|
34
|
+
* clear of the border, at the field's start edge, as the web's `floatingLabel="above"`.
|
|
35
|
+
*/
|
|
36
|
+
placement?: "border" | "above" | undefined;
|
|
29
37
|
required?: boolean | undefined;
|
|
30
38
|
variant: FieldBaseVariant;
|
|
31
39
|
sizeTokens: ReturnType<typeof resolveFieldSize>;
|
|
@@ -51,5 +59,5 @@ export interface UseFloatingLabelResult {
|
|
|
51
59
|
/** Hand to FieldBase so the outline top border opens under the floated label. */
|
|
52
60
|
topNotch: FieldBaseProps["topNotch"];
|
|
53
61
|
}
|
|
54
|
-
export declare const useFloatingLabel: ({ label, enabled, floated, required, variant, sizeTokens, leadingOffset, trailingOffset, textAlign, paddingLeft, lineHeight, restNudge, floatTrim, color, style, }: UseFloatingLabelOptions) => UseFloatingLabelResult;
|
|
62
|
+
export declare const useFloatingLabel: ({ label, enabled, floated, placement, required, variant, sizeTokens, leadingOffset, trailingOffset, textAlign, paddingLeft, lineHeight, restNudge, floatTrim, color, style, }: UseFloatingLabelOptions) => UseFloatingLabelResult;
|
|
55
63
|
//# sourceMappingURL=useFloatingLabel.d.ts.map
|
|
@@ -27,7 +27,7 @@ import { type InlineSelectText } from "../../text/phone/inlineSelect.g.js";
|
|
|
27
27
|
import type { Size } from "../../types/vocabulary.js";
|
|
28
28
|
import type { HapticType } from "../../utils/index.js";
|
|
29
29
|
import type { SelectOption, SelectValue } from "../OptionSheet/OptionSheet.js";
|
|
30
|
-
export type InlineSelectSize = Extract<Size, "sm" | "md" | "lg">;
|
|
30
|
+
export type InlineSelectSize = Extract<Size, "sm" | "md" | "lg" | "xl">;
|
|
31
31
|
export interface InlineSelectProps<T = SelectOption> {
|
|
32
32
|
/** Same contract as Select's `options`: `SelectOption` shape by default, accessors for anything else. */
|
|
33
33
|
options: ReadonlyArray<T>;
|
|
@@ -6,9 +6,9 @@ import type { RadiusName } from "../../theme/types.js";
|
|
|
6
6
|
import type { FieldVariant, Size } from "../../types/vocabulary.js";
|
|
7
7
|
import type { SlotIcon, SlotIconState } from "../AppIcon/slotIcon.js";
|
|
8
8
|
import type { ButtonTone, ButtonVariant } from "../Button/index.js";
|
|
9
|
-
export type InputSize = Extract<Size, "sm" | "md" | "lg">;
|
|
9
|
+
export type InputSize = Extract<Size, "sm" | "md" | "lg" | "xl">;
|
|
10
10
|
export type InputVariant = FieldVariant;
|
|
11
|
-
export type InputLabelMode = "float" | "top";
|
|
11
|
+
export type InputLabelMode = "float" | "top" | "above";
|
|
12
12
|
/**
|
|
13
13
|
* What kind of field this is. One prop switches the whole behaviour set:
|
|
14
14
|
* - `'input'` (default): single-line text.
|
|
@@ -135,6 +135,9 @@ export interface InputProps extends Omit<TextInputProps, "style"> {
|
|
|
135
135
|
* the field, permanently visible.
|
|
136
136
|
* - `'float'`: Material-Design floating label that animates from inside the
|
|
137
137
|
* field to the top border on focus / when there's a value.
|
|
138
|
+
* - `'above'`: the web's `floatingLabel="above"`: rests inside the field, then
|
|
139
|
+
* rises above the box, clear of the border, on focus / when there's a value. The
|
|
140
|
+
* line above the box is always reserved, so nothing jumps when it rises.
|
|
138
141
|
*
|
|
139
142
|
* Theme setting: `theme.settings.components.input.defaultLabelMode`.
|
|
140
143
|
*/
|
|
@@ -3,7 +3,7 @@ import type { StyleProp, TextInputProps, TextStyle, ViewStyle } from "react-nati
|
|
|
3
3
|
import { type NumberInputText } from "../../text/phone/numberInput.g.js";
|
|
4
4
|
import type { Size } from "../../types/vocabulary.js";
|
|
5
5
|
import type { HapticType } from "../../utils/index.js";
|
|
6
|
-
export type NumberInputSize = Extract<Size, "sm" | "md" | "lg">;
|
|
6
|
+
export type NumberInputSize = Extract<Size, "sm" | "md" | "lg" | "xl">;
|
|
7
7
|
export type NumberInputVariant = "inline" | "horizontal";
|
|
8
8
|
export interface NumberInputRef {
|
|
9
9
|
focus: () => void;
|
|
@@ -177,7 +177,7 @@ export interface PhoneNumberInputProps extends Pick<TextInputProps, "returnKeyTy
|
|
|
177
177
|
invalidMessage?: string | false | undefined;
|
|
178
178
|
required?: boolean | undefined;
|
|
179
179
|
disabled?: boolean | undefined;
|
|
180
|
-
size?: Extract<Size, "sm" | "md" | "lg"> | undefined;
|
|
180
|
+
size?: Extract<Size, "sm" | "md" | "lg" | "xl"> | undefined;
|
|
181
181
|
variant?: FieldVariant | undefined;
|
|
182
182
|
/** Corner radius token from the theme (none, sm, md, lg, xl, pill). Wins over the field size's radius. */
|
|
183
183
|
radius?: keyof Theme["radius"] | undefined;
|
|
@@ -16,7 +16,7 @@ import { type Ref } from "react";
|
|
|
16
16
|
import type { HostInstance, StyleProp, TextStyle, ViewStyle } from "react-native";
|
|
17
17
|
import { type PickerTriggerText } from "../../text/phone/pickerTrigger.g.js";
|
|
18
18
|
import type { FieldVariant, Size } from "../../types/vocabulary.js";
|
|
19
|
-
export type PickerTriggerSize = Extract<Size, "sm" | "md" | "lg">;
|
|
19
|
+
export type PickerTriggerSize = Extract<Size, "sm" | "md" | "lg" | "xl">;
|
|
20
20
|
export type PickerTriggerVariant = FieldVariant;
|
|
21
21
|
export interface PickerTriggerProps {
|
|
22
22
|
/** The currently selected value rendered as the trigger's primary text. */
|
|
@@ -29,11 +29,11 @@ export interface SearchBarProps extends Omit<TextInputProps, "style" | "value" |
|
|
|
29
29
|
*/
|
|
30
30
|
leftIcon?: SlotIcon | undefined;
|
|
31
31
|
debounceMs?: number | undefined;
|
|
32
|
-
size?: Extract<Size, "sm" | "md" | "lg"> | undefined;
|
|
32
|
+
size?: Extract<Size, "sm" | "md" | "lg" | "xl"> | undefined;
|
|
33
33
|
variant?: FieldVariant | undefined;
|
|
34
34
|
/**
|
|
35
35
|
* Corner radius from the theme's radius scale. Default: the theme's
|
|
36
|
-
* `components["search-bar"].<size>.radius` (the
|
|
36
|
+
* `components["search-bar"].<size>.radius` (the field corner, as every input). Ignored on `underline`,
|
|
37
37
|
* which is always square.
|
|
38
38
|
*/
|
|
39
39
|
radius?: RadiusName | undefined;
|
|
@@ -13,7 +13,7 @@ import type { FieldVariant, Size } from "../../types/vocabulary.js";
|
|
|
13
13
|
import type { HapticType } from "../../utils/index.js";
|
|
14
14
|
import type { SlotIcon } from "../AppIcon/slotIcon.js";
|
|
15
15
|
import type { SelectOption, SelectValue } from "../OptionSheet/OptionSheet.js";
|
|
16
|
-
export type SelectSize = Extract<Size, "sm" | "md" | "lg">;
|
|
16
|
+
export type SelectSize = Extract<Size, "sm" | "md" | "lg" | "xl">;
|
|
17
17
|
type SelectRadius = "sm" | "md" | "lg" | "xl" | "pill";
|
|
18
18
|
export type { SelectOption, SelectValue };
|
|
19
19
|
export interface SelectLabels extends SelectText {
|
|
@@ -39,9 +39,11 @@ export interface SquircleFillProps {
|
|
|
39
39
|
* that the shape drew one border width right and down, past the host's labels and buttons.
|
|
40
40
|
*/
|
|
41
41
|
hostBorderWidth: number;
|
|
42
|
+
/** `figma`: Figma's smoothing from the theme (default). `css`: the web's `corner-shape: squircle`. */
|
|
43
|
+
curve?: "figma" | "css" | undefined;
|
|
42
44
|
testID?: string | undefined;
|
|
43
45
|
}
|
|
44
|
-
export declare function SquircleFill({ width, height, radius, fill, stroke, strokeWidth, hostBorderWidth, testID }: SquircleFillProps): import("react").JSX.Element;
|
|
46
|
+
export declare function SquircleFill({ width, height, radius, fill, stroke, strokeWidth, hostBorderWidth, curve, testID, }: SquircleFillProps): import("react").JSX.Element;
|
|
45
47
|
export declare namespace SquircleFill {
|
|
46
48
|
var displayName: string;
|
|
47
49
|
}
|
|
@@ -61,8 +63,9 @@ export interface SquircleLayout {
|
|
|
61
63
|
active: boolean;
|
|
62
64
|
}
|
|
63
65
|
/**
|
|
64
|
-
* Tracks a host's size for `SquircleFill`. On iOS (and when `enabled` is
|
|
65
|
-
* false) it only forwards the layout event and never re-renders the host
|
|
66
|
+
* Tracks a host's size for `SquircleFill`. On iOS and the web (and when `enabled` is
|
|
67
|
+
* false) it only forwards the layout event and never re-renders the host, unless
|
|
68
|
+
* `everyPlatform` asks for the drawn shape there too (a host matching its web corner).
|
|
66
69
|
*/
|
|
67
|
-
export declare function useSquircle(enabled: boolean, radius: number, onLayoutProp?: (event: LayoutChangeEvent) => void): SquircleLayout;
|
|
70
|
+
export declare function useSquircle(enabled: boolean, radius: number, onLayoutProp?: (event: LayoutChangeEvent) => void, everyPlatform?: boolean): SquircleLayout;
|
|
68
71
|
//# sourceMappingURL=SquircleFill.d.ts.map
|
|
@@ -28,7 +28,7 @@ export type { BottomSheetContextValue, BottomSheetPresentation, BottomSheetProps
|
|
|
28
28
|
export { BottomSheet, useBottomSheet } from "./BottomSheet/index.js";
|
|
29
29
|
export type { BoxProps, RowProps, SpacerProps, StackProps } from "./Box/index.js";
|
|
30
30
|
export { Box, Row, Spacer, Stack } from "./Box/index.js";
|
|
31
|
-
export type { ButtonProps, ButtonSize, ButtonTone, ButtonVariant } from "./Button/index.js";
|
|
31
|
+
export type { ButtonProps, ButtonShape, ButtonSize, ButtonTone, ButtonVariant } from "./Button/index.js";
|
|
32
32
|
export { Button, buttonLabelInk } from "./Button/index.js";
|
|
33
33
|
export type { CalendarMark, CalendarProps, CalendarRange, CalendarSelectionMode, CalendarWeekStart } from "./Calendar/index.js";
|
|
34
34
|
export { Calendar } from "./Calendar/index.js";
|
|
@@ -3,7 +3,7 @@ export type * from "./components/index.js";
|
|
|
3
3
|
export { Accordion, AccordionGroup, ALL_CALLING_CODES, AmountSlider, AnimatePresence, AppBar, AppLockOverlay, AsyncBlock, AuthedImage, Autocomplete, Avatar, AvatarGroup, authedImageCacheStats, Badge, Banner, BarChart, BottomNavigation, BottomSheet, Box, Button, buttonLabelInk, Calendar, Card, Carousel, Checkbox, Chip, ChoiceGroup, Composer, Confetti, ConfirmHost, clearAuthedImageCache, confirm, DatePicker, DateRangePicker, DateSeparator, DEFAULT_CALLING_CODES, DecimalInput, Descriptions, Dialog, Divider, Drawer, defineStatusMap, EmptyState, ErrorBoundary, FilePicker, FileViewer, FilterChipRow, FloatingActionButton, FloatingActionButtonGroup, ForceUpdateDialog, FormField, formatE164, formatFileSize, getAuthedImageCacheLimit, IconBadge, IconButton, IdleTimeoutDialog, ImageGallery, InlineSelect, Input, KeyboardAwareScrollView, KeyboardToolbar, ListItem, ListSection, LoaderOverlay, loader, Markdown, Menu, MessageBubble, MessageList, MODAL_DISMISS_GRACE_MS, Modal, NonModalBottomSheet, NumberInput, OnboardingPager, OptionSheet, OTPInput, OTPResendRow, OutboxEntryList, PagedList, PagedListFooter, PermissionPrompt, PhoneNumberInput, PickerTrigger, ProfileCompletion, ProfilePicker, ProgressBar, ProgressRing, Radio, RadioDot, RadioGroup, Rating, Repeater, RichTextEditor, Row, ScannerOverlay, Screen, SearchBar, SectionHeader, SegmentedControl, Select, SignaturePad, Skeleton, SkeletonCircle, SkeletonClockProvider, SkeletonContent, SkeletonList, SkeletonProvider, SkeletonSkip, SkeletonText, Slider, SliderField, SlideToConfirm, SortableList, Spacer, Sparkline, Spinner, SquircleImage, SquircleView, Stack, StatTile, StatusBadge, Stepper, Swipeable, Switch, setAuthedImageCacheLimit, Tabs, TagInput, Text, TextInkContext, Timeline, TimePicker, Toast, ToastHost, ToastProvider, Tooltip, Tour, TypingIndicator, toast, useBottomSheet, useErrorHandler, useRecentSearches, useTextInk, useToast, WheelPicker, withErrorBoundary, ZoomableImage, } from "./components/index.js";
|
|
4
4
|
export type { AppIconColor, AppIconName, AppIconProps, AppIconSize, CuratedIconName, IconName, IconsaxShadowedName, IconVariant, SlotIcon, SlotIconRef, SlotIconState, SlotNode, } from "./components/AppIcon/index.js";
|
|
5
5
|
export { AppIcon, ICONSAX_SUFFIX, isAppIconName } from "./components/AppIcon/index.js";
|
|
6
|
-
export { BUTTON_TONES, BUTTON_VARIANTS, isButtonTone, isButtonVariant } from "./components/Button/index.js";
|
|
6
|
+
export { BUTTON_SHAPES, BUTTON_TONES, BUTTON_VARIANTS, isButtonTone, isButtonVariant } from "./components/Button/index.js";
|
|
7
7
|
export type { FormCompletion, HookFieldProps, HookFormFieldProps, UseFormCompletionOptions } from "./form/index.js";
|
|
8
8
|
export { HookFormField, useHookFormField } from "./form/index.js";
|
|
9
9
|
export type { FieldChain, FieldChainProps, FieldErrorRegistry, MotionDurationKey, PresenceMotion, PressAnimationPreset, ScrollDirection, UseControllableStateOptions, UseFieldErrorScrollOptions, UseFieldErrorScrollResult, UsePressAnimationOptions, UsePressAnimationResult, UseRefreshControlLabels, UseRefreshControlOptions, UseRefreshControlResult, UseResendCountdownOptions, UseResendCountdownResult, UseScrollDirectionOptions, UseScrollDirectionResult, UseToggleResult, } from "./hooks/index.js";
|
|
@@ -20,6 +20,10 @@ type GradientVector = {
|
|
|
20
20
|
*/
|
|
21
21
|
export declare const gradientAngle: (start?: GradientVector, end?: GradientVector) => number;
|
|
22
22
|
export declare const toBackgroundImage: (gradient: GradientDefinition) => LinearGradientValue;
|
|
23
|
+
/** The same gradient as CSS text, the one form react-native-web draws: it writes an array as `[object Object]`. */
|
|
24
|
+
export declare const toCssGradient: (gradient: GradientDefinition) => string;
|
|
25
|
+
/** The `backgroundImage` style value for this platform: the typed layer on a phone, CSS text on the web. */
|
|
26
|
+
export declare const gradientBackground: (gradient: GradientDefinition) => NonNullable<ViewStyle["backgroundImage"]>;
|
|
23
27
|
export interface GradientProps {
|
|
24
28
|
gradient: GradientDefinition;
|
|
25
29
|
style?: StyleProp<ViewStyle> | undefined;
|
|
@@ -3,8 +3,8 @@ import type { ComponentSizeTokens, Theme } from "./types.js";
|
|
|
3
3
|
export type Resolved<T> = {
|
|
4
4
|
[K in keyof T]: number;
|
|
5
5
|
};
|
|
6
|
-
export declare const resolveButtonSize: (theme: Theme, size: "
|
|
7
|
-
export declare const resolveFieldSize: (theme: Theme, size: "sm" | "md" | "lg") => Resolved<ComponentSizeTokens<"field">>;
|
|
6
|
+
export declare const resolveButtonSize: (theme: Theme, size: "sm" | "md" | "lg" | "xl") => Resolved<ComponentSizeTokens<"button">>;
|
|
7
|
+
export declare const resolveFieldSize: (theme: Theme, size: "sm" | "md" | "lg" | "xl") => Resolved<ComponentSizeTokens<"field">>;
|
|
8
8
|
export declare const resolveEmptyStateSize: (theme: Theme, size: "sm" | "md" | "lg") => Resolved<ComponentSizeTokens<"empty-state">>;
|
|
9
9
|
export declare const resolveListItemSize: (theme: Theme, size: "sm" | "md" | "lg") => Resolved<ComponentSizeTokens<"list-item">>;
|
|
10
10
|
export declare const resolveBadgeSize: (theme: Theme, size: "sm" | "md") => Resolved<ComponentSizeTokens<"badge">>;
|
|
@@ -2,7 +2,7 @@ export { createAnimatedValue, setNativeValue } from "./animatedValue.js";
|
|
|
2
2
|
export type { Resolved } from "./componentSizes.js";
|
|
3
3
|
export { resolveBadgeSize, resolveButtonSize, resolveCheckboxSize, resolveChipSize, resolveEmptyStateSize, resolveFieldSize, resolveFloatingActionButtonSize, resolveListItemSize, resolveOtpInputSize, resolveRadioSize, resolveSegmentedControlSize, resolveSliderSize, resolveSwitchSize, resolveTabsSize, validateComponentTokens, } from "./componentSizes.js";
|
|
4
4
|
export type { GradientProps } from "./Gradient.js";
|
|
5
|
-
export { Gradient, gradientAngle, toBackgroundImage } from "./Gradient.js";
|
|
5
|
+
export { Gradient, gradientAngle, gradientBackground, toBackgroundImage, toCssGradient } from "./Gradient.js";
|
|
6
6
|
export { makeStyles } from "./makeStyles.js";
|
|
7
7
|
export { mergeBrand } from "./merge.js";
|
|
8
8
|
export { radiusOf, spaceOf, textOf } from "./scale.js";
|
|
@@ -51,10 +51,10 @@ export interface FieldSizeTokens {
|
|
|
51
51
|
"message-gap": SpaceName;
|
|
52
52
|
}
|
|
53
53
|
export interface ButtonSizeTokens {
|
|
54
|
-
"padding-x":
|
|
54
|
+
"padding-x": number;
|
|
55
55
|
"padding-y": SpaceName;
|
|
56
56
|
"min-height": number;
|
|
57
|
-
text:
|
|
57
|
+
text: number;
|
|
58
58
|
radius: RadiusName;
|
|
59
59
|
icon: number;
|
|
60
60
|
"badge-icon": number;
|
|
@@ -128,18 +128,18 @@ export interface FloatingActionButtonTokens {
|
|
|
128
128
|
"stagger-ms": number;
|
|
129
129
|
}
|
|
130
130
|
export interface ComponentTokens {
|
|
131
|
-
field: Sized<
|
|
131
|
+
field: Sized<"sm" | "md" | "lg" | "xl", FieldSizeTokens>;
|
|
132
132
|
press: {
|
|
133
133
|
opacity: number;
|
|
134
134
|
};
|
|
135
135
|
disabled: {
|
|
136
136
|
opacity: number;
|
|
137
137
|
};
|
|
138
|
-
button: Sized<"
|
|
139
|
-
input: Sized<
|
|
138
|
+
button: Sized<"sm" | "md" | "lg" | "xl", ButtonSizeTokens>;
|
|
139
|
+
input: Sized<"sm" | "md" | "lg" | "xl", {
|
|
140
140
|
"multiline-min-height": number;
|
|
141
141
|
}>;
|
|
142
|
-
"search-bar": Sized<
|
|
142
|
+
"search-bar": Sized<"sm" | "md" | "lg" | "xl", {
|
|
143
143
|
radius: RadiusName;
|
|
144
144
|
}>;
|
|
145
145
|
"empty-state": Sized<L3, EmptyStateSizeTokens>;
|
|
@@ -221,10 +221,10 @@ export declare const COMPONENT_KINDS: {
|
|
|
221
221
|
readonly opacity: "number";
|
|
222
222
|
};
|
|
223
223
|
readonly button: {
|
|
224
|
-
readonly "padding-x": "
|
|
224
|
+
readonly "padding-x": "px";
|
|
225
225
|
readonly "padding-y": "space";
|
|
226
226
|
readonly "min-height": "px";
|
|
227
|
-
readonly text: "
|
|
227
|
+
readonly text: "px";
|
|
228
228
|
readonly radius: "radius";
|
|
229
229
|
readonly icon: "px";
|
|
230
230
|
readonly "badge-icon": "px";
|
|
@@ -55,6 +55,13 @@ export declare const squircleApplies: (width: number, height: number, radius: nu
|
|
|
55
55
|
* change. Capped at half the shorter side, as a pill would be.
|
|
56
56
|
*/
|
|
57
57
|
export declare const squircleHostRadius: (width: number, height: number, radius: number) => number;
|
|
58
|
+
/**
|
|
59
|
+
* The web's `corner-shape: squircle` (CSS superellipse(2), the curve |x|^4 + |y|^4 = 1) as a
|
|
60
|
+
* closed path, so a phone control draws the same corner as its web counterpart. Bounds and
|
|
61
|
+
* `inset` work as in `squirclePath`; the radius is capped at half the shorter side, as CSS does
|
|
62
|
+
* for four equal corners.
|
|
63
|
+
*/
|
|
64
|
+
export declare function cssSquirclePath({ width, height, radius, inset }: Omit<SquirclePathParams, "smoothing">): string;
|
|
58
65
|
/**
|
|
59
66
|
* The closed path of a smooth-cornered rectangle whose bounds are
|
|
60
67
|
* `(inset, inset)` to `(width - inset, height - inset)`, drawn clockwise
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webority/mobile-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.189.0",
|
|
4
4
|
"description": "Beautiful, animated, accessible React Native components, theme and form engine for Webority projects.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
@@ -126,13 +126,13 @@
|
|
|
126
126
|
}
|
|
127
127
|
},
|
|
128
128
|
"dependencies": {
|
|
129
|
-
"@webority/markdown-core": "0.
|
|
129
|
+
"@webority/markdown-core": "0.189.0"
|
|
130
130
|
},
|
|
131
131
|
"peerDependencies": {
|
|
132
132
|
"@react-navigation/bottom-tabs": ">=7.0.0",
|
|
133
133
|
"@react-navigation/native": ">=7.0.0",
|
|
134
|
-
"@webority/canvas-kit": "0.
|
|
135
|
-
"@webority/mobile-core": "0.
|
|
134
|
+
"@webority/canvas-kit": "0.189.0",
|
|
135
|
+
"@webority/mobile-core": "0.189.0",
|
|
136
136
|
"expo": ">=58.0.0",
|
|
137
137
|
"expo-file-system": ">=58.0.0",
|
|
138
138
|
"expo-haptics": ">=58.0.0",
|
|
@@ -196,10 +196,10 @@
|
|
|
196
196
|
"@types/jest": "29.5.14",
|
|
197
197
|
"@types/node": "25.6.0",
|
|
198
198
|
"@types/react": "19.3.0",
|
|
199
|
-
"@webority/canvas-kit": "0.
|
|
200
|
-
"@webority/mobile-core": "0.
|
|
199
|
+
"@webority/canvas-kit": "0.189.0",
|
|
200
|
+
"@webority/mobile-core": "0.189.0",
|
|
201
201
|
"@webority/mobile-dev": "0.0.0",
|
|
202
|
-
"@webority/tokens": "0.
|
|
202
|
+
"@webority/tokens": "0.189.0",
|
|
203
203
|
"expo": "58.0.23",
|
|
204
204
|
"expo-file-system": "58.0.13",
|
|
205
205
|
"expo-haptics": "58.0.7",
|