@webority/mobile-ui 0.163.0 → 0.165.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/LICENSE.txt +1 -1
- package/android/src/newarch/java/com/webority/mobileui/pdfrasterizer/PdfRasterizerModule.kt +4 -4
- package/dist/canvas-kit/kit.js +5 -5
- package/dist/canvas-kit/manifest.json +11 -1
- package/dist/canvas-kit/release.json +6 -6
- package/ios/PdfRasterizer.mm +3 -3
- package/lib/commonjs/components/Avatar/Avatar.js +1 -1
- package/lib/commonjs/components/Banner/Banner.js +1 -1
- package/lib/commonjs/components/BottomSheet/BottomSheet.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/DateRangePicker/DateRangePicker.js +1 -1
- package/lib/commonjs/components/FieldBase/FieldBase.js +1 -1
- package/lib/commonjs/components/IconBadge/IconBadge.js +1 -1
- package/lib/commonjs/components/ImageGallery/ImageGallery.js +1 -1
- package/lib/commonjs/components/Input/Input.js +1 -1
- package/lib/commonjs/components/MessageBubble/MessageBubble.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/OptionSheet/OptionSheet.js +1 -1
- package/lib/commonjs/components/PhoneNumberInput/PhoneNumberInput.js +1 -1
- package/lib/commonjs/components/ProfilePicker/ProfilePicker.js +1 -1
- package/lib/commonjs/components/Screen/Screen.js +1 -1
- package/lib/commonjs/components/SearchBar/SearchBar.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/TagInput/TagInput.js +1 -1
- package/lib/commonjs/components/Tooltip/Tooltip.js +1 -1
- package/lib/commonjs/hooks/useDragToDismiss.js +1 -1
- package/lib/commonjs/theme/merge.js +1 -1
- package/lib/commonjs/utils/warnUnknownProps.js +1 -1
- package/lib/module/components/Avatar/Avatar.js +1 -1
- package/lib/module/components/Banner/Banner.js +1 -1
- package/lib/module/components/BottomSheet/BottomSheet.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/DateRangePicker/DateRangePicker.js +1 -1
- package/lib/module/components/FieldBase/FieldBase.js +1 -1
- package/lib/module/components/IconBadge/IconBadge.js +1 -1
- package/lib/module/components/ImageGallery/ImageGallery.js +1 -1
- package/lib/module/components/Input/Input.js +1 -1
- package/lib/module/components/MessageBubble/MessageBubble.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/OptionSheet/OptionSheet.js +1 -1
- package/lib/module/components/PhoneNumberInput/PhoneNumberInput.js +1 -1
- package/lib/module/components/ProfilePicker/ProfilePicker.js +1 -1
- package/lib/module/components/Screen/Screen.js +1 -1
- package/lib/module/components/SearchBar/SearchBar.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/TagInput/TagInput.js +1 -1
- package/lib/module/components/Tooltip/Tooltip.js +1 -1
- package/lib/module/hooks/useDragToDismiss.js +1 -1
- package/lib/module/theme/merge.js +1 -1
- package/lib/module/utils/warnUnknownProps.js +1 -1
- package/lib/typescript/commonjs/components/AppBar/AppBar.d.ts +1 -0
- package/lib/typescript/commonjs/components/Autocomplete/Autocomplete.d.ts +1 -1
- package/lib/typescript/commonjs/components/Avatar/Avatar.d.ts +2 -1
- package/lib/typescript/commonjs/components/BottomSheet/BottomSheet.d.ts +5 -4
- package/lib/typescript/commonjs/components/Carousel/Carousel.d.ts +2 -1
- package/lib/typescript/commonjs/components/ChoiceGroup/ChoiceGroup.d.ts +4 -4
- package/lib/typescript/commonjs/components/DateRangePicker/DateRangePicker.d.ts +2 -1
- package/lib/typescript/commonjs/components/Descriptions/Descriptions.d.ts +2 -2
- package/lib/typescript/commonjs/components/Drawer/Drawer.d.ts +1 -1
- package/lib/typescript/commonjs/components/FieldBase/Chevron.d.ts +1 -1
- package/lib/typescript/commonjs/components/FieldBase/FieldBase.d.ts +14 -13
- package/lib/typescript/commonjs/components/FilePicker/FilePicker.d.ts +10 -10
- package/lib/typescript/commonjs/components/ForceUpdateDialog/ForceUpdateDialog.d.ts +2 -2
- package/lib/typescript/commonjs/components/FormField/FormField.d.ts +1 -1
- package/lib/typescript/commonjs/components/IconButton/IconButton.d.ts +2 -2
- package/lib/typescript/commonjs/components/ImageGallery/ImageGallery.d.ts +2 -1
- package/lib/typescript/commonjs/components/InlineSelect/InlineSelect.d.ts +7 -7
- package/lib/typescript/commonjs/components/Input/Input.d.ts +3 -2
- package/lib/typescript/commonjs/components/Menu/Menu.d.ts +1 -1
- package/lib/typescript/commonjs/components/Modal/Modal.d.ts +2 -1
- package/lib/typescript/commonjs/components/NumberInput/NumberInput.d.ts +1 -0
- package/lib/typescript/commonjs/components/OptionSheet/OptionSheet.d.ts +5 -5
- package/lib/typescript/commonjs/components/PhoneNumberInput/PhoneNumberInput.d.ts +1 -0
- package/lib/typescript/commonjs/components/PickerTrigger/PickerTrigger.d.ts +4 -4
- package/lib/typescript/commonjs/components/ProfilePicker/ProfilePicker.d.ts +2 -1
- package/lib/typescript/commonjs/components/ProgressBar/ProgressBar.d.ts +1 -1
- package/lib/typescript/commonjs/components/Radio/RadioDot.d.ts +2 -2
- package/lib/typescript/commonjs/components/Repeater/Repeater.d.ts +2 -2
- package/lib/typescript/commonjs/components/RichTextEditor/markdownActions.d.ts +3 -3
- package/lib/typescript/commonjs/components/Screen/Screen.d.ts +1 -0
- package/lib/typescript/commonjs/components/SearchBar/SearchBar.d.ts +2 -1
- package/lib/typescript/commonjs/components/SegmentedControl/SegmentedControl.d.ts +1 -1
- package/lib/typescript/commonjs/components/Select/Select.d.ts +6 -6
- package/lib/typescript/commonjs/components/Skeleton/Skeleton.d.ts +3 -3
- package/lib/typescript/commonjs/components/Skeleton/SkeletonClock.d.ts +3 -3
- package/lib/typescript/commonjs/components/Skeleton/SkeletonContent.d.ts +6 -6
- package/lib/typescript/commonjs/components/Skeleton/SkeletonList.d.ts +2 -2
- package/lib/typescript/commonjs/components/Skeleton/SkeletonProvider.d.ts +5 -5
- package/lib/typescript/commonjs/components/Skeleton/SkeletonSkip.d.ts +2 -2
- package/lib/typescript/commonjs/components/SlideToConfirm/SlideToConfirm.d.ts +1 -1
- package/lib/typescript/commonjs/components/Slider/Slider.d.ts +5 -0
- package/lib/typescript/commonjs/components/SliderField/SliderField.d.ts +1 -0
- package/lib/typescript/commonjs/components/Tabs/Tabs.d.ts +2 -2
- package/lib/typescript/commonjs/components/TagInput/TagInput.d.ts +2 -1
- package/lib/typescript/commonjs/components/Timeline/Timeline.d.ts +8 -8
- package/lib/typescript/commonjs/components/ZoomableImage/ZoomableImage.d.ts +4 -4
- package/lib/typescript/commonjs/hooks/useDragToDismiss.d.ts +2 -0
- package/lib/typescript/commonjs/specs/NativePdfRasterizer.d.ts +4 -4
- package/lib/typescript/commonjs/theme/animatedValue.d.ts +4 -4
- package/lib/typescript/commonjs/theme/types.d.ts +9 -3
- package/lib/typescript/commonjs/utils/feedback.d.ts +3 -3
- package/lib/typescript/commonjs/utils/warnUnknownProps.d.ts +2 -2
- package/lib/typescript/module/components/AppBar/AppBar.d.ts +1 -0
- package/lib/typescript/module/components/Autocomplete/Autocomplete.d.ts +1 -1
- package/lib/typescript/module/components/Avatar/Avatar.d.ts +2 -1
- package/lib/typescript/module/components/BottomSheet/BottomSheet.d.ts +5 -4
- package/lib/typescript/module/components/Carousel/Carousel.d.ts +2 -1
- package/lib/typescript/module/components/ChoiceGroup/ChoiceGroup.d.ts +4 -4
- package/lib/typescript/module/components/DateRangePicker/DateRangePicker.d.ts +2 -1
- package/lib/typescript/module/components/Descriptions/Descriptions.d.ts +2 -2
- package/lib/typescript/module/components/Drawer/Drawer.d.ts +1 -1
- package/lib/typescript/module/components/FieldBase/Chevron.d.ts +1 -1
- package/lib/typescript/module/components/FieldBase/FieldBase.d.ts +14 -13
- package/lib/typescript/module/components/FilePicker/FilePicker.d.ts +10 -10
- package/lib/typescript/module/components/ForceUpdateDialog/ForceUpdateDialog.d.ts +2 -2
- package/lib/typescript/module/components/FormField/FormField.d.ts +1 -1
- package/lib/typescript/module/components/IconButton/IconButton.d.ts +2 -2
- package/lib/typescript/module/components/ImageGallery/ImageGallery.d.ts +2 -1
- package/lib/typescript/module/components/InlineSelect/InlineSelect.d.ts +7 -7
- package/lib/typescript/module/components/Input/Input.d.ts +3 -2
- package/lib/typescript/module/components/Menu/Menu.d.ts +1 -1
- package/lib/typescript/module/components/Modal/Modal.d.ts +2 -1
- package/lib/typescript/module/components/NumberInput/NumberInput.d.ts +1 -0
- package/lib/typescript/module/components/OptionSheet/OptionSheet.d.ts +5 -5
- package/lib/typescript/module/components/PhoneNumberInput/PhoneNumberInput.d.ts +1 -0
- package/lib/typescript/module/components/PickerTrigger/PickerTrigger.d.ts +4 -4
- package/lib/typescript/module/components/ProfilePicker/ProfilePicker.d.ts +2 -1
- package/lib/typescript/module/components/ProgressBar/ProgressBar.d.ts +1 -1
- package/lib/typescript/module/components/Radio/RadioDot.d.ts +2 -2
- package/lib/typescript/module/components/Repeater/Repeater.d.ts +2 -2
- package/lib/typescript/module/components/RichTextEditor/markdownActions.d.ts +3 -3
- package/lib/typescript/module/components/Screen/Screen.d.ts +1 -0
- package/lib/typescript/module/components/SearchBar/SearchBar.d.ts +2 -1
- package/lib/typescript/module/components/SegmentedControl/SegmentedControl.d.ts +1 -1
- package/lib/typescript/module/components/Select/Select.d.ts +6 -6
- package/lib/typescript/module/components/Skeleton/Skeleton.d.ts +3 -3
- package/lib/typescript/module/components/Skeleton/SkeletonClock.d.ts +3 -3
- package/lib/typescript/module/components/Skeleton/SkeletonContent.d.ts +6 -6
- package/lib/typescript/module/components/Skeleton/SkeletonList.d.ts +2 -2
- package/lib/typescript/module/components/Skeleton/SkeletonProvider.d.ts +5 -5
- package/lib/typescript/module/components/Skeleton/SkeletonSkip.d.ts +2 -2
- package/lib/typescript/module/components/SlideToConfirm/SlideToConfirm.d.ts +1 -1
- package/lib/typescript/module/components/Slider/Slider.d.ts +5 -0
- package/lib/typescript/module/components/SliderField/SliderField.d.ts +1 -0
- package/lib/typescript/module/components/Tabs/Tabs.d.ts +2 -2
- package/lib/typescript/module/components/TagInput/TagInput.d.ts +2 -1
- package/lib/typescript/module/components/Timeline/Timeline.d.ts +8 -8
- package/lib/typescript/module/components/ZoomableImage/ZoomableImage.d.ts +4 -4
- package/lib/typescript/module/hooks/useDragToDismiss.d.ts +2 -0
- package/lib/typescript/module/specs/NativePdfRasterizer.d.ts +4 -4
- package/lib/typescript/module/theme/animatedValue.d.ts +4 -4
- package/lib/typescript/module/theme/types.d.ts +9 -3
- package/lib/typescript/module/utils/feedback.d.ts +3 -3
- package/lib/typescript/module/utils/warnUnknownProps.d.ts +2 -2
- package/package.json +9 -10
- package/src/specs/NativePdfRasterizer.ts +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* FilePicker
|
|
2
|
+
* FilePicker: attachment picking UI with pluggable native sources.
|
|
3
3
|
*
|
|
4
4
|
* The library owns the UI and behaviour: trigger (dashed card / list row /
|
|
5
5
|
* custom render prop), the source-chooser sheet (shared OptionSheet), enforced
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* reflects them back via per-file `status` / `progress` and gets retry
|
|
18
18
|
* taps through `onRetry`.
|
|
19
19
|
* - Heavy processing. The async `process` hook runs per accepted file
|
|
20
|
-
* (compression, EXIF strip, local copy) before it lands in `files
|
|
20
|
+
* (compression, EXIF strip, local copy) before it lands in `files`;
|
|
21
21
|
* plug the app's image pipeline in there.
|
|
22
22
|
*/
|
|
23
23
|
import type { PickedFile, PickerSource } from "@webority/mobile-core/pickers";
|
|
@@ -27,7 +27,7 @@ import type { HapticType } from "../../utils/index.js";
|
|
|
27
27
|
export type FilePickerVariant = "card" | "list";
|
|
28
28
|
export type FilePickerFileStatus = "idle" | "processing" | "uploading" | "done" | "error";
|
|
29
29
|
export interface FilePickerFile {
|
|
30
|
-
/** Stable identity
|
|
30
|
+
/** Stable identity, generated by the library when the source doesn't provide one. */
|
|
31
31
|
id: string;
|
|
32
32
|
name: string;
|
|
33
33
|
/** Local content URI (freshly picked files). */
|
|
@@ -40,13 +40,13 @@ export interface FilePickerFile {
|
|
|
40
40
|
type?: string | undefined;
|
|
41
41
|
/** Bytes. */
|
|
42
42
|
bytes?: number | undefined;
|
|
43
|
-
/** Display-only upload state
|
|
43
|
+
/** Display-only upload state: the app sets these, the library renders them. */
|
|
44
44
|
status?: FilePickerFileStatus | undefined;
|
|
45
|
-
/** 0
|
|
45
|
+
/** 0-1, rendered while `status === 'uploading'`. */
|
|
46
46
|
progress?: number | undefined;
|
|
47
47
|
/** Shown on the file while `status === 'error'`. */
|
|
48
48
|
error?: string | undefined;
|
|
49
|
-
/** Consumer payload
|
|
49
|
+
/** Consumer payload, preserved untouched through every operation. */
|
|
50
50
|
meta?: Record<string, unknown> | undefined;
|
|
51
51
|
}
|
|
52
52
|
/** Launch native picking through `pick()`: resolve `[]` for user-cancel, throw for real failures. */
|
|
@@ -110,11 +110,11 @@ export interface FilePickerProps {
|
|
|
110
110
|
/** Native picking adapters. One source launches directly; several open the chooser sheet. */
|
|
111
111
|
sources: ReadonlyArray<FilePickerSource>;
|
|
112
112
|
maxFiles?: number | undefined;
|
|
113
|
-
/** Per-file size cap
|
|
113
|
+
/** Per-file size cap; oversized picks are rejected with a visible error. */
|
|
114
114
|
maxSizeMB?: number | undefined;
|
|
115
115
|
/** Accepted mime globs, e.g. `['image/*', 'application/pdf']`. Unset = accept all. */
|
|
116
116
|
accept?: ReadonlyArray<string> | undefined;
|
|
117
|
-
/** Custom per-file rule
|
|
117
|
+
/** Custom per-file rule: return an error string to reject. */
|
|
118
118
|
validate?: ((file: FilePickerFile) => string | null | undefined) | undefined;
|
|
119
119
|
/**
|
|
120
120
|
* Async per-file transform between pick and `files` (compression, local
|
|
@@ -131,7 +131,7 @@ export interface FilePickerProps {
|
|
|
131
131
|
disabled?: boolean | undefined;
|
|
132
132
|
/** Hint under the trigger (e.g. "Up to 5 files, max 100MB each."). */
|
|
133
133
|
helperText?: string | undefined;
|
|
134
|
-
/** External error
|
|
134
|
+
/** External error. It wins over internal validation errors (form binding). */
|
|
135
135
|
error?: React.ReactNode | undefined;
|
|
136
136
|
labels?: Partial<FilePickerLabels> | undefined;
|
|
137
137
|
/** Haptics for pick/remove (selection) and rejections (error). Pass false to disable. */
|
|
@@ -141,7 +141,7 @@ export interface FilePickerProps {
|
|
|
141
141
|
onRemove?: ((file: FilePickerFile) => void) | undefined;
|
|
142
142
|
/** Each rejection message (also shown as the field error). */
|
|
143
143
|
onError?: ((message: string, file?: FilePickerFile) => void) | undefined;
|
|
144
|
-
/** Tap on a file tile/row
|
|
144
|
+
/** Tap on a file tile/row: wire previews (ImageGallery) here. */
|
|
145
145
|
onFilePress?: ((file: FilePickerFile) => void) | undefined;
|
|
146
146
|
/** When set, files with `status 'error'` show a retry affordance that calls this. */
|
|
147
147
|
onRetry?: ((file: FilePickerFile) => void) | undefined;
|
|
@@ -13,7 +13,7 @@ export interface ForceUpdateDialogProps {
|
|
|
13
13
|
/** Called when the dialog is dismissed (only fired when `mandatory` is `false`). */
|
|
14
14
|
onClose?: (() => void) | undefined;
|
|
15
15
|
/**
|
|
16
|
-
* If `true`, hides the "Later" action and disables backdrop dismissal
|
|
16
|
+
* If `true`, hides the "Later" action and disables backdrop dismissal;
|
|
17
17
|
* use this for major version bumps that must not be skipped.
|
|
18
18
|
*/
|
|
19
19
|
mandatory?: boolean | undefined;
|
|
@@ -37,7 +37,7 @@ export interface ForceUpdateDialogProps {
|
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
39
|
* Drop-in update prompt that opens the App Store / Play Store on tap.
|
|
40
|
-
* Pair this with `useVersionCheck()
|
|
40
|
+
* Pair this with `useVersionCheck()`: render it when `isUpdateRequired` is true.
|
|
41
41
|
*
|
|
42
42
|
* @example
|
|
43
43
|
* const { isUpdateRequired, updateUrl } = useVersionCheck(isAppReady);
|
|
@@ -39,7 +39,7 @@ export interface FormFieldProps {
|
|
|
39
39
|
/**
|
|
40
40
|
* Style override for the wrapper View that hosts `children` (the input slot).
|
|
41
41
|
* Useful for the `inline` layout when callers need to tweak the right-hand
|
|
42
|
-
* column (e.g., set a max width, align differently). Additive only
|
|
42
|
+
* column (e.g., set a max width, align differently). Additive only; the
|
|
43
43
|
* library's base style still applies underneath.
|
|
44
44
|
*/
|
|
45
45
|
inputContainerStyle?: StyleProp<ViewStyle> | undefined;
|
|
@@ -28,7 +28,7 @@ export interface IconButtonProps {
|
|
|
28
28
|
*/
|
|
29
29
|
iconVariant?: IconVariant | undefined;
|
|
30
30
|
onPress?: ((e: GestureResponderEvent) => void) | undefined;
|
|
31
|
-
/** Required
|
|
31
|
+
/** Required: icon-only controls need an accessible name. */
|
|
32
32
|
accessibilityLabel: string;
|
|
33
33
|
/** Read after the name, never drawn: what the press does, for a control whose name alone is not enough. */
|
|
34
34
|
accessibilityHint?: string | undefined;
|
|
@@ -38,7 +38,7 @@ export interface IconButtonProps {
|
|
|
38
38
|
variant?: IconButtonVariant | undefined;
|
|
39
39
|
size?: IconButtonSize | undefined;
|
|
40
40
|
shape?: IconButtonShape | undefined;
|
|
41
|
-
/** Selected/active
|
|
41
|
+
/** Selected/active: renders filled (solid) regardless of `variant` (e.g. an active nav tile). */
|
|
42
42
|
active?: boolean | undefined;
|
|
43
43
|
disabled?: boolean | undefined;
|
|
44
44
|
loading?: boolean | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* ImageGallery
|
|
2
|
+
* ImageGallery: themed gallery built on top of Carousel.
|
|
3
3
|
*
|
|
4
4
|
* Base view: a Carousel of cover-fitted images with optional thumbnails strip
|
|
5
5
|
* and counter pill. Tapping an image opens a fullscreen Lightbox that re-uses
|
|
@@ -57,6 +57,7 @@ export interface ImageGalleryProps {
|
|
|
57
57
|
loading?: boolean | undefined;
|
|
58
58
|
accessibilityLabel?: string | undefined;
|
|
59
59
|
containerStyle?: StyleProp<ViewStyle> | undefined;
|
|
60
|
+
/** Also derives `${testID}-lightbox` for the lightbox Carousel. */
|
|
60
61
|
testID?: string | undefined;
|
|
61
62
|
}
|
|
62
63
|
declare const ImageGallery: React.FC<ImageGalleryProps> & {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* InlineSelect
|
|
2
|
+
* InlineSelect: a compact, borderless select trigger for inside other fields.
|
|
3
3
|
*
|
|
4
4
|
* Renders just the selected label + chevron (no FieldBase box) and opens the
|
|
5
5
|
* shared OptionSheet picker. Designed to live in Input's `leftIcon` /
|
|
6
|
-
* `rightIcon` slots
|
|
7
|
-
* phone field, unit suffix on a measurement
|
|
6
|
+
* `rightIcon` slots (currency prefix on an amount field, country code on a
|
|
7
|
+
* phone field, unit suffix on a measurement), but works anywhere a bare
|
|
8
8
|
* dropdown trigger is needed (toolbars, list headers).
|
|
9
9
|
*
|
|
10
10
|
* Single-select only by design: a multi-select crammed into a field affix has
|
|
@@ -35,7 +35,7 @@ export interface InlineSelectLabels {
|
|
|
35
35
|
}
|
|
36
36
|
export declare const DEFAULT_INLINE_SELECT_LABELS: InlineSelectLabels;
|
|
37
37
|
export interface InlineSelectProps<T = SelectOption> {
|
|
38
|
-
/** Same contract as Select's `options
|
|
38
|
+
/** Same contract as Select's `options`: `SelectOption` shape by default, accessors for anything else. */
|
|
39
39
|
options: ReadonlyArray<T>;
|
|
40
40
|
/** Defaults to the option's `label` field when it is a `SelectOption`. */
|
|
41
41
|
getOptionLabel?: ((option: T) => string) | undefined;
|
|
@@ -82,7 +82,7 @@ export interface InlineSelectProps<T = SelectOption> {
|
|
|
82
82
|
* (`text-disabled` when disabled).
|
|
83
83
|
*/
|
|
84
84
|
color?: string | undefined;
|
|
85
|
-
/** Chevron colour override
|
|
85
|
+
/** Chevron colour override. Falls back to `color`'s resolution. */
|
|
86
86
|
chevronColor?: string | undefined;
|
|
87
87
|
/** Chevron size in pixels. Default: the field size's `icon`. */
|
|
88
88
|
chevronSize?: number | undefined;
|
|
@@ -90,11 +90,11 @@ export interface InlineSelectProps<T = SelectOption> {
|
|
|
90
90
|
style?: StyleProp<ViewStyle> | undefined;
|
|
91
91
|
/** Style for every option row in the sheet (padding, background, …). */
|
|
92
92
|
optionStyle?: StyleProp<ViewStyle> | undefined;
|
|
93
|
-
/** Extra style for the selected option row
|
|
93
|
+
/** Extra style for the selected option row. It wins over `optionStyle` and the default selected fill. */
|
|
94
94
|
selectedOptionStyle?: StyleProp<ViewStyle> | undefined;
|
|
95
95
|
/** Style for every option's label text in the sheet. */
|
|
96
96
|
optionTextStyle?: StyleProp<TextStyle> | undefined;
|
|
97
|
-
/** Extra style for the selected option's label text
|
|
97
|
+
/** Extra style for the selected option's label text. It wins over `optionTextStyle` and the default selected colour. */
|
|
98
98
|
selectedOptionTextStyle?: StyleProp<TextStyle> | undefined;
|
|
99
99
|
accessibilityLabel?: string | undefined;
|
|
100
100
|
testID?: string | undefined;
|
|
@@ -103,7 +103,7 @@ export interface InputProps extends Omit<TextInputProps, "style"> {
|
|
|
103
103
|
/** Trailing slot; same contract as `leftIcon`. */
|
|
104
104
|
rightIcon?: InputSlotIcon | undefined;
|
|
105
105
|
/**
|
|
106
|
-
* A fixed unit drawn after the value in the trailing slot
|
|
106
|
+
* A fixed unit drawn after the value in the trailing slot: `'km'`, `'%'`,
|
|
107
107
|
* `'/month'`. Same prop and same look as NumberInput's `unit`: the field's
|
|
108
108
|
* font size in the placeholder colour, so it reads as part of the field
|
|
109
109
|
* rather than of what was typed. Sits before `rightIcon` when both are set;
|
|
@@ -160,7 +160,7 @@ export interface InputProps extends Omit<TextInputProps, "style"> {
|
|
|
160
160
|
*/
|
|
161
161
|
format?: ((raw: string) => string) | undefined;
|
|
162
162
|
/**
|
|
163
|
-
* Reverse of `format
|
|
163
|
+
* Reverse of `format`: strips the formatted display back to the canonical
|
|
164
164
|
* value the consumer wants in state. If omitted, defaults to identity.
|
|
165
165
|
*/
|
|
166
166
|
parse?: ((formatted: string) => string) | undefined;
|
|
@@ -178,6 +178,7 @@ export interface InputProps extends Omit<TextInputProps, "style"> {
|
|
|
178
178
|
accessibilityLabel?: string | undefined;
|
|
179
179
|
/** Overrides for the password toggle's screen-reader names; merged over DEFAULT_INPUT_LABELS. */
|
|
180
180
|
labels?: Partial<InputLabels> | undefined;
|
|
181
|
+
/** Derives `${testID}-field` (the field box) and `${testID}-field-press` (its box-press wrapper). */
|
|
181
182
|
testID?: string | undefined;
|
|
182
183
|
}
|
|
183
184
|
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<TextInputInstance>>;
|
|
@@ -34,7 +34,7 @@ export interface MenuProps {
|
|
|
34
34
|
accessibilityLabel?: string | undefined;
|
|
35
35
|
/** Accessible names of the tap-outside area (`close`, default 'Close menu') and of a submenu's Back row (`back`, default 'Back'). */
|
|
36
36
|
labels?: Partial<MenuLabels> | undefined;
|
|
37
|
-
/** On the trigger wrapper; the open menu takes `<testID>-menu` and its
|
|
37
|
+
/** On the trigger wrapper; the open menu takes `<testID>-menu` and its dismiss backdrop `<testID>-modal-backdrop`. */
|
|
38
38
|
testID?: string | undefined;
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
@@ -41,7 +41,7 @@ export interface ModalProps {
|
|
|
41
41
|
restoreFocusRef?: React.RefObject<HostInstance | null> | undefined;
|
|
42
42
|
/**
|
|
43
43
|
* Fired once after the modal closes, MODAL_DISMISS_GRACE_MS after `open`
|
|
44
|
-
* flips false
|
|
44
|
+
* flips false, the earliest point it is safe to unmount the surrounding
|
|
45
45
|
* tree (navigate away, flip auth state) without racing the native dismiss
|
|
46
46
|
* on Android. Sequence follow-up work (or a follow-up modal) from here.
|
|
47
47
|
*/
|
|
@@ -59,6 +59,7 @@ export interface ModalProps {
|
|
|
59
59
|
placement?: PlacementPreference | undefined;
|
|
60
60
|
/** Horizontal alignment of the anchored presentation against the anchor. Default "center". */
|
|
61
61
|
align?: PlacementAlign | undefined;
|
|
62
|
+
/** Test handle of the native modal; its dismiss-tap target is `${testID}-backdrop`. */
|
|
62
63
|
testID?: string | undefined;
|
|
63
64
|
/**
|
|
64
65
|
* Draws no surface, radius, shadow, padding or width around children: the children are the card.
|
|
@@ -55,6 +55,7 @@ export interface NumberInputProps {
|
|
|
55
55
|
unitStyle?: StyleProp<TextStyle> | undefined;
|
|
56
56
|
labelStyle?: StyleProp<TextStyle> | undefined;
|
|
57
57
|
textInputProps?: Omit<TextInputProps, "value" | "onChangeText" | "onBlur" | "keyboardType" | "editable"> | undefined;
|
|
58
|
+
/** Derives `${testID}-field` (the field box) and `${testID}-field-press` (its box-press wrapper). */
|
|
58
59
|
testID?: string | undefined;
|
|
59
60
|
}
|
|
60
61
|
declare const NumberInput: React.ForwardRefExoticComponent<NumberInputProps & React.RefAttributes<NumberInputRef>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* OptionSheet
|
|
2
|
+
* OptionSheet: the shared bottom-sheet option picker.
|
|
3
3
|
*
|
|
4
4
|
* The picker behind Select and InlineSelect, exported so an app can open the
|
|
5
5
|
* same sheet from its own trigger: a slide-up sheet built on the library
|
|
@@ -117,20 +117,20 @@ export interface OptionSheetProps<T = SelectOption> {
|
|
|
117
117
|
/** Multi mode: checkboxes + Done footer instead of the selected dot. */
|
|
118
118
|
multi?: boolean | undefined;
|
|
119
119
|
searchable?: boolean | undefined;
|
|
120
|
-
/** Caret/selection colour of the search input
|
|
120
|
+
/** Caret/selection colour of the search input; callers mirror their focus colour. Default: `colors["focus-ring"]`. */
|
|
121
121
|
searchSelectionColor?: string | undefined;
|
|
122
122
|
accessibilityLabel?: string | undefined;
|
|
123
123
|
/** Style for every option row container (padding, background, etc.). Wins over the row defaults. */
|
|
124
124
|
optionStyle?: StyleProp<ViewStyle> | undefined;
|
|
125
|
-
/** Extra style merged onto the selected option row
|
|
125
|
+
/** Extra style merged onto the selected option row. It wins over `optionStyle` and the default selected fill. */
|
|
126
126
|
selectedOptionStyle?: StyleProp<ViewStyle> | undefined;
|
|
127
127
|
/** Style for every option's label text. Wins over the label defaults. */
|
|
128
128
|
optionTextStyle?: StyleProp<TextStyle> | undefined;
|
|
129
|
-
/** Extra style merged onto the selected option's label text
|
|
129
|
+
/** Extra style merged onto the selected option's label text. It wins over `optionTextStyle` and the default selected colour. */
|
|
130
130
|
selectedOptionTextStyle?: StyleProp<TextStyle> | undefined;
|
|
131
131
|
/** The haptic for the sheet's own open and dismiss; false turns it off. Default: the Modal's default. */
|
|
132
132
|
haptic?: HapticType | false | undefined;
|
|
133
|
-
/** Test selector on the sheet panel. */
|
|
133
|
+
/** Test selector on the sheet panel. The handle / title row's drag gesture is `${testID}-pan`. */
|
|
134
134
|
testID?: string | undefined;
|
|
135
135
|
}
|
|
136
136
|
export declare function OptionSheet<T = SelectOption>(props: OptionSheetProps<T>): React.ReactElement;
|
|
@@ -201,6 +201,7 @@ export interface PhoneNumberInputProps extends Pick<TextInputProps, "returnKeyTy
|
|
|
201
201
|
onFocus?: (() => void) | undefined;
|
|
202
202
|
onBlur?: (() => void) | undefined;
|
|
203
203
|
style?: StyleProp<ViewStyle> | undefined;
|
|
204
|
+
/** Derives `${testID}-field` (the field box) and `${testID}-field-press` (its box-press wrapper). */
|
|
204
205
|
testID?: string | undefined;
|
|
205
206
|
}
|
|
206
207
|
/** `+<code><national>`, presentational only; the value stays structured. */
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* PickerTrigger
|
|
2
|
+
* PickerTrigger: the tappable input field that opens a modal picker.
|
|
3
3
|
*
|
|
4
4
|
* Standalone read-only field built on FieldBase, used by DatePicker,
|
|
5
5
|
* TimePicker and DateRangePicker (and any consumer-built picker) to render
|
|
6
6
|
* the closed-state row that matches Input / Select pixel-for-pixel.
|
|
7
7
|
*
|
|
8
|
-
* The component is purely visual + interactive
|
|
8
|
+
* The component is purely visual + interactive; it does not own picker
|
|
9
9
|
* state. Consumers either:
|
|
10
10
|
* - Use the built-in trigger mode on a picker, which composes this
|
|
11
11
|
* internally and manages its own open/close.
|
|
@@ -44,7 +44,7 @@ export interface PickerTriggerProps {
|
|
|
44
44
|
* `theme.settings.components.field.requiredMarker` (default `'*'`).
|
|
45
45
|
*/
|
|
46
46
|
required?: boolean | undefined;
|
|
47
|
-
/** Tap handler
|
|
47
|
+
/** Tap handler: typically opens the modal picker. */
|
|
48
48
|
onPress: () => void;
|
|
49
49
|
/** Render a clear (×) affordance when `value` is non-empty. */
|
|
50
50
|
clearable?: boolean | undefined;
|
|
@@ -52,7 +52,7 @@ export interface PickerTriggerProps {
|
|
|
52
52
|
onClear?: (() => void) | undefined;
|
|
53
53
|
/** Left icon slot (e.g. calendar / clock). */
|
|
54
54
|
leftIcon?: React.ReactNode | undefined;
|
|
55
|
-
/** Trailing slot
|
|
55
|
+
/** Trailing slot: defaults to a chevron when unset. Pass `null` to suppress. */
|
|
56
56
|
trailing?: React.ReactNode | undefined;
|
|
57
57
|
disabled?: boolean | undefined;
|
|
58
58
|
size?: PickerTriggerSize | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* ProfilePicker
|
|
2
|
+
* ProfilePicker: a round profile photo with a camera badge at its
|
|
3
3
|
* bottom-right; tapping it picks a new photo. The mobile counterpart of
|
|
4
4
|
* webority-ui's AppImagePicker.
|
|
5
5
|
*
|
|
@@ -117,6 +117,7 @@ export interface ProfilePickerProps<F extends PickedFile = PickedFile> {
|
|
|
117
117
|
onError?: ((message: string) => void) | undefined;
|
|
118
118
|
accessibilityLabel?: string | undefined;
|
|
119
119
|
style?: StyleProp<ViewStyle> | undefined;
|
|
120
|
+
/** Test id of the root; the Avatar is `<testID>-avatar` and its picture `<testID>-avatar-image`. */
|
|
120
121
|
testID?: string | undefined;
|
|
121
122
|
}
|
|
122
123
|
declare function ProfilePicker<F extends PickedFile = PickedFile>(props: ProfilePickerProps<F> & {
|
|
@@ -7,7 +7,7 @@ export interface ProgressBarLabels {
|
|
|
7
7
|
}
|
|
8
8
|
export declare const DEFAULT_PROGRESS_BAR_LABELS: Readonly<ProgressBarLabels>;
|
|
9
9
|
export interface ProgressBarSegment {
|
|
10
|
-
/** Fraction of the full track (0
|
|
10
|
+
/** Fraction of the full track (0-1). */
|
|
11
11
|
value: number;
|
|
12
12
|
/** Explicit colour; falls back to `tone`. */
|
|
13
13
|
color?: string | undefined;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* RadioDot
|
|
2
|
+
* RadioDot: the bare animated radio indicator (ring + spring-scaled dot).
|
|
3
3
|
*
|
|
4
4
|
* Extracted from Radio so custom option templates (ChoiceGroup `renderOption`,
|
|
5
5
|
* bespoke cards) can embed the standard indicator without rebuilding the
|
|
6
|
-
* animation or the disabled/selected colour rules. Purely visual
|
|
6
|
+
* animation or the disabled/selected colour rules. Purely visual: no press
|
|
7
7
|
* handling, no a11y role; the parent control owns those.
|
|
8
8
|
*/
|
|
9
9
|
import type React from "react";
|
|
@@ -26,7 +26,7 @@ export interface RepeaterRenderArgs<T> {
|
|
|
26
26
|
export interface RepeaterProps<T> {
|
|
27
27
|
value: ReadonlyArray<T>;
|
|
28
28
|
onChange: (next: T[]) => void;
|
|
29
|
-
/** Builds a blank row. Called on add
|
|
29
|
+
/** Builds a blank row. Called on add; must return a NEW object each time. */
|
|
30
30
|
createRow: () => T;
|
|
31
31
|
renderRow: (args: RepeaterRenderArgs<T>) => React.ReactNode;
|
|
32
32
|
/** Copy for the add button, the empty text, the per-row heading (`labels.row`) and the remove button. */
|
|
@@ -57,7 +57,7 @@ export interface RepeaterProps<T> {
|
|
|
57
57
|
testID?: string | undefined;
|
|
58
58
|
}
|
|
59
59
|
/**
|
|
60
|
-
* Add / remove / edit a list of form rows
|
|
60
|
+
* Add / remove / edit a list of form rows: line items, phone numbers,
|
|
61
61
|
* addresses. Owns the array mechanics (immutably) so each screen stops
|
|
62
62
|
* re-deriving splice/map logic, and keeps the min/max rules in one place where
|
|
63
63
|
* they can't disagree between the add button and the remove button.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The text transforms behind the editor's toolbar, kept out of the component so
|
|
3
|
-
* the behaviour people actually notice
|
|
4
|
-
* caret lands when nothing is selected
|
|
3
|
+
* the behaviour people actually notice (toggling bold OFF again, and where the
|
|
4
|
+
* caret lands when nothing is selected) can be tested as data, with no
|
|
5
5
|
* rendering involved.
|
|
6
6
|
*
|
|
7
7
|
* The output targets our own `<Markdown>` renderer, so the vocabulary is the
|
|
@@ -28,7 +28,7 @@ export declare const normalizeSelection: (selection: EditorSelection, length: nu
|
|
|
28
28
|
*
|
|
29
29
|
* Wrapping applies to the selection; with nothing selected the markers are
|
|
30
30
|
* inserted and the caret lands between them. Applying an action to text that
|
|
31
|
-
* already carries it removes it instead of stacking a second copy
|
|
31
|
+
* already carries it removes it instead of stacking a second copy, which is
|
|
32
32
|
* the half people notice immediately when it is missing.
|
|
33
33
|
*/
|
|
34
34
|
export declare const applyMarkdownAction: (state: EditorState, action: MarkdownAction) => EditorState;
|
|
@@ -61,6 +61,7 @@ export interface ScreenProps<ItemT = unknown> {
|
|
|
61
61
|
scrollRef?: React.Ref<ScrollViewInstance | FlatList<ItemT>> | undefined;
|
|
62
62
|
onScroll?: ((event: NativeSyntheticEvent<NativeScrollEvent>) => void) | undefined;
|
|
63
63
|
contentContainerStyle?: StyleProp<ViewStyle> | undefined;
|
|
64
|
+
/** The root testID; the app bar takes `${testID}-app-bar`. */
|
|
64
65
|
testID?: string | undefined;
|
|
65
66
|
}
|
|
66
67
|
/**
|
|
@@ -28,7 +28,7 @@ export interface SearchBarProps extends Omit<TextInputProps, "style" | "value" |
|
|
|
28
28
|
/** How the label sits. Default `'top'`, the field family's static label; `'float'` rises on focus / value. */
|
|
29
29
|
labelMode?: SearchBarLabelMode | undefined;
|
|
30
30
|
labelStyle?: StyleProp<TextStyle> | undefined;
|
|
31
|
-
/** Current value. Optional / nullable
|
|
31
|
+
/** Current value. Optional / nullable; treated as empty string when undefined or null. */
|
|
32
32
|
value?: string | null | undefined;
|
|
33
33
|
onChangeText: (text: string) => void;
|
|
34
34
|
onSubmit?: ((text: string) => void) | undefined;
|
|
@@ -90,6 +90,7 @@ export interface SearchBarProps extends Omit<TextInputProps, "style" | "value" |
|
|
|
90
90
|
/** Style applied to the search text, after the library's own size, colour and font. */
|
|
91
91
|
inputStyle?: StyleProp<TextStyle> | undefined;
|
|
92
92
|
accessibilityLabel?: string | undefined;
|
|
93
|
+
/** Derives `${testID}-field` (the field box) and `${testID}-field-press` (its box-press wrapper). */
|
|
93
94
|
testID?: string | undefined;
|
|
94
95
|
}
|
|
95
96
|
declare const SearchBar: ForwardRefExoticComponent<SearchBarProps & RefAttributes<TextInputInstance>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Select
|
|
2
|
+
* Select: single + multi select with bottom-sheet picker.
|
|
3
3
|
*
|
|
4
4
|
* The trigger is a FieldBase row; the picker itself is the shared OptionSheet
|
|
5
5
|
* primitive (also behind InlineSelect), so the sheet look + behaviour never
|
|
@@ -30,7 +30,7 @@ export declare const DEFAULT_SELECT_LABELS: SelectLabels;
|
|
|
30
30
|
interface BaseSelectProps<T = SelectOption> {
|
|
31
31
|
/**
|
|
32
32
|
* Options to render. Default shape is `SelectOption` (`{ label, value, ... }`)
|
|
33
|
-
*
|
|
33
|
+
* For that shape, no accessors are needed. To use a different option shape
|
|
34
34
|
* (e.g. `{ id, name }` from a domain model), pass `getOptionLabel` /
|
|
35
35
|
* `getOptionValue` (and optionally `isOptionDisabled`/`getOptionDescription`/
|
|
36
36
|
* `getOptionIcon`) so Select can read it without per-call-site mapping.
|
|
@@ -73,7 +73,7 @@ interface BaseSelectProps<T = SelectOption> {
|
|
|
73
73
|
help?: React.ReactNode | undefined;
|
|
74
74
|
/**
|
|
75
75
|
* Heading shown at the top of the options bottom-sheet. Independent of
|
|
76
|
-
* `label` (the field label above the trigger)
|
|
76
|
+
* `label` (the field label above the trigger). Omit it for a sheet with no
|
|
77
77
|
* heading. Falls back to `label`/`placeholder` only for the sheet's a11y name.
|
|
78
78
|
*/
|
|
79
79
|
title?: string | undefined;
|
|
@@ -119,7 +119,7 @@ interface BaseSelectProps<T = SelectOption> {
|
|
|
119
119
|
*/
|
|
120
120
|
leftIcon?: SlotIcon | undefined;
|
|
121
121
|
/**
|
|
122
|
-
* Replaces the built-in arrow on the right of the trigger. Rendered static
|
|
122
|
+
* Replaces the built-in arrow on the right of the trigger. Rendered static;
|
|
123
123
|
* the default chevron's rotate-on-open is dropped, so pass an already-animated
|
|
124
124
|
* node if you want motion. Mirrors Input's `rightIcon`, same contract as `leftIcon`.
|
|
125
125
|
*/
|
|
@@ -138,11 +138,11 @@ interface BaseSelectProps<T = SelectOption> {
|
|
|
138
138
|
textStyle?: StyleProp<TextStyle> | undefined;
|
|
139
139
|
/** Style for every option row in the sheet (padding, background, …). */
|
|
140
140
|
optionStyle?: StyleProp<ViewStyle> | undefined;
|
|
141
|
-
/** Extra style for the selected option row
|
|
141
|
+
/** Extra style for the selected option row: it wins over `optionStyle` and the default selected fill. */
|
|
142
142
|
selectedOptionStyle?: StyleProp<ViewStyle> | undefined;
|
|
143
143
|
/** Style for every option's label text in the sheet. */
|
|
144
144
|
optionTextStyle?: StyleProp<TextStyle> | undefined;
|
|
145
|
-
/** Extra style for the selected option's label text
|
|
145
|
+
/** Extra style for the selected option's label text: it wins over `optionTextStyle` and the default selected colour. */
|
|
146
146
|
selectedOptionTextStyle?: StyleProp<TextStyle> | undefined;
|
|
147
147
|
testID?: string | undefined;
|
|
148
148
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Skeleton
|
|
2
|
+
* Skeleton: the leaf placeholder primitive.
|
|
3
3
|
*
|
|
4
4
|
* Every Skeleton on screen reads the shared shimmer/pulse clock from
|
|
5
5
|
* `SkeletonProvider` (see SkeletonClock.tsx). One native-driver loop per
|
|
@@ -46,8 +46,8 @@ export interface SkeletonProps {
|
|
|
46
46
|
* dimensions/radius. Override individual values via `width`, `height`,
|
|
47
47
|
* `radius` as needed.
|
|
48
48
|
* - `'rect'`: default, sharp corners.
|
|
49
|
-
* - `'rounded'`: `theme.radius.md` corners
|
|
50
|
-
* - `'circle'`: 50% radius
|
|
49
|
+
* - `'rounded'`: `theme.radius.md` corners, for cards / buttons.
|
|
50
|
+
* - `'circle'`: 50% radius, for avatars / icons (provide `width` = `height`).
|
|
51
51
|
* - `'text'`: small radius + roughly text-line height. `height` becomes
|
|
52
52
|
* `1.15× fontSize` if a `fontSize` would have been passed.
|
|
53
53
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* SkeletonClock
|
|
2
|
+
* SkeletonClock: single shared animation tick for every <Skeleton> on screen.
|
|
3
3
|
*
|
|
4
4
|
* Why this exists: previously every Skeleton primitive ran its own
|
|
5
5
|
* `Animated.loop` on its own `Animated.Value`. A list of 20 placeholders =
|
|
@@ -35,7 +35,7 @@ export interface SkeletonClockValue {
|
|
|
35
35
|
export interface SkeletonClockProviderProps {
|
|
36
36
|
/** Drives the shimmer band's speed. */
|
|
37
37
|
speed: SkeletonSpeed;
|
|
38
|
-
/** Pause the clock entirely
|
|
38
|
+
/** Pause the clock entirely (e.g., when reduced-motion is on). */
|
|
39
39
|
enabled: boolean;
|
|
40
40
|
/**
|
|
41
41
|
* Default variant flag. Both loops always run regardless (it's cheap),
|
|
@@ -54,7 +54,7 @@ export declare const SkeletonClockProvider: React.FC<SkeletonClockProviderProps>
|
|
|
54
54
|
/**
|
|
55
55
|
* Read the active clock. Returns a fallback "always-still" clock when no
|
|
56
56
|
* provider is mounted, so the primitives still render (statically) outside
|
|
57
|
-
* one
|
|
57
|
+
* one, which keeps demo/storybook usage friction-free.
|
|
58
58
|
*/
|
|
59
59
|
export declare const useSkeletonClock: () => SkeletonClockValue;
|
|
60
60
|
//# sourceMappingURL=SkeletonClock.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* SkeletonContent
|
|
2
|
+
* SkeletonContent: show placeholder shapes while data is loading, then
|
|
3
3
|
* cross-fade to the real children once it arrives.
|
|
4
4
|
*
|
|
5
5
|
* Three usage patterns, listed in order of preference:
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* </SkeletonContent>
|
|
12
12
|
*
|
|
13
13
|
* Renders `placeholder` verbatim while loading and `children` once loaded.
|
|
14
|
-
* Most precise and predictable
|
|
14
|
+
* Most precise and predictable. What you write is exactly what shimmers.
|
|
15
15
|
* Prefer this for any non-trivial layout.
|
|
16
16
|
*
|
|
17
17
|
* 2. **Self-describing components inside an auto-walked tree**:
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
* </View>
|
|
38
38
|
* </SkeletonContent>
|
|
39
39
|
*
|
|
40
|
-
* Same walker as (2)
|
|
40
|
+
* Same walker as (2): the Text/Image/View introspection handles
|
|
41
41
|
* primitive trees that mirror the loaded layout.
|
|
42
42
|
*
|
|
43
43
|
* Cross-fade: when `loading` flips from true to false, real children fade in
|
|
44
|
-
* over `fadeDuration` ms. The first render is guarded
|
|
44
|
+
* over `fadeDuration` ms. The first render is guarded; content that was
|
|
45
45
|
* never in a loading state does NOT fade on mount, only the actual
|
|
46
46
|
* loading→loaded transition does. Matches Chakra UI's `isLoaded` feel.
|
|
47
47
|
*/
|
|
@@ -66,7 +66,7 @@ export interface SkeletonContentProps {
|
|
|
66
66
|
/**
|
|
67
67
|
* Explicit placeholder JSX. When provided, the walker is bypassed entirely
|
|
68
68
|
* and `placeholder` is rendered verbatim while `loading` is true. This is
|
|
69
|
-
* the recommended path for any non-trivial layout
|
|
69
|
+
* the recommended path for any non-trivial layout; most precise and most
|
|
70
70
|
* predictable. Combine with `count` to repeat the shape.
|
|
71
71
|
*/
|
|
72
72
|
placeholder?: ReactNode | undefined;
|
|
@@ -82,7 +82,7 @@ export interface SkeletonContentProps {
|
|
|
82
82
|
/**
|
|
83
83
|
* Colour override forwarded to every walker-produced `<Skeleton>`. Either
|
|
84
84
|
* or both keys can be set; missing keys fall back to provider defaults /
|
|
85
|
-
* theme. Has no effect when `placeholder` is provided
|
|
85
|
+
* theme. Has no effect when `placeholder` is provided; author colours
|
|
86
86
|
* directly on the placeholder JSX instead.
|
|
87
87
|
*/
|
|
88
88
|
colors?: SkeletonColors | undefined;
|
|
@@ -16,7 +16,7 @@ export interface SkeletonListProps<ItemT> extends Omit<FlatListProps<ItemT>, "da
|
|
|
16
16
|
renderPlaceholder?: ((index: number) => ReactNode) | undefined;
|
|
17
17
|
/** How many placeholder rows to render while loading. Default: 3. */
|
|
18
18
|
placeholderCount?: number | undefined;
|
|
19
|
-
/** Animation style
|
|
19
|
+
/** Animation style: same as Skeleton. */
|
|
20
20
|
variant?: SkeletonVariant | undefined;
|
|
21
21
|
/** Colour override forwarded to the placeholder skeletons. */
|
|
22
22
|
colors?: SkeletonColors | undefined;
|
|
@@ -35,7 +35,7 @@ export interface SkeletonListProps<ItemT> extends Omit<FlatListProps<ItemT>, "da
|
|
|
35
35
|
*
|
|
36
36
|
* Inside a vertical ScrollView, pass `scrollEnabled={false}` and let the outer
|
|
37
37
|
* view scroll: once `loading` flips false a real VirtualizedList mounts, and RN
|
|
38
|
-
* logs a nesting error for a same-orientation list
|
|
38
|
+
* logs a nesting error for a same-orientation list, which only shows up after
|
|
39
39
|
* the data arrives, never on first render.
|
|
40
40
|
*
|
|
41
41
|
* @example
|