@lt-three/love3 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -40
- package/dist/native/analytics/animation.d.ts +1 -1
- package/dist/native/analytics/animation.js +1 -1
- package/dist/native/analytics/chart.types.d.ts +3 -3
- package/dist/native/analytics/metric-card.d.ts +3 -3
- package/dist/native/analytics/metric-card.js +3 -3
- package/dist/native/analytics/multi-line-chart.d.ts +9 -8
- package/dist/native/analytics/multi-line-chart.js +14 -13
- package/dist/native/analytics/pie-chart.d.ts +7 -7
- package/dist/native/analytics/pie-chart.js +8 -8
- package/dist/native/analytics/single-number.d.ts +4 -4
- package/dist/native/analytics/single-number.js +2 -2
- package/dist/native/atom/avatar.d.ts +6 -6
- package/dist/native/atom/avatar.js +2 -2
- package/dist/native/atom/badge.d.ts +5 -5
- package/dist/native/atom/button.d.ts +12 -12
- package/dist/native/atom/button.js +8 -8
- package/dist/native/atom/checkbox.d.ts +4 -4
- package/dist/native/atom/checkbox.js +2 -2
- package/dist/native/atom/colored-value.d.ts +4 -4
- package/dist/native/atom/colored-value.js +4 -4
- package/dist/native/atom/image.d.ts +7 -7
- package/dist/native/atom/image.js +2 -2
- package/dist/native/atom/label.d.ts +5 -5
- package/dist/native/atom/label.js +2 -2
- package/dist/native/atom/link.d.ts +5 -5
- package/dist/native/atom/link.js +5 -5
- package/dist/native/atom/readout.d.ts +7 -7
- package/dist/native/atom/readout.js +3 -3
- package/dist/native/atom/search-input.d.ts +2 -2
- package/dist/native/atom/search-input.js +2 -2
- package/dist/native/atom/select.d.ts +14 -14
- package/dist/native/atom/select.js +8 -8
- package/dist/native/atom/separator.d.ts +2 -3
- package/dist/native/atom/separator.js +2 -3
- package/dist/native/atom/skeleton.d.ts +3 -3
- package/dist/native/atom/skeleton.js +3 -3
- package/dist/native/atom/slider.d.ts +6 -6
- package/dist/native/atom/slider.js +3 -3
- package/dist/native/atom/spinner.d.ts +4 -4
- package/dist/native/atom/spinner.js +2 -2
- package/dist/native/atom/switch.d.ts +4 -4
- package/dist/native/atom/switch.js +3 -3
- package/dist/native/atom/symbol.d.ts +7 -7
- package/dist/native/atom/symbol.js +7 -7
- package/dist/native/atom/symbol.types.d.ts +8 -8
- package/dist/native/atom/symbol.types.js +7 -7
- package/dist/native/atom/text-field.d.ts +15 -15
- package/dist/native/atom/text-field.js +5 -5
- package/dist/native/atom/theme-toggle.d.ts +7 -7
- package/dist/native/atom/theme-toggle.js +4 -4
- package/dist/native/atom/timezone-select.d.ts +5 -5
- package/dist/native/atom/timezone-select.js +4 -4
- package/dist/native/atom/typography.d.ts +2 -2
- package/dist/native/atom/typography.js +2 -2
- package/dist/native/base/button.d.ts +13 -13
- package/dist/native/base/button.js +4 -4
- package/dist/native/base/form.d.ts +15 -15
- package/dist/native/base/form.js +11 -11
- package/dist/native/base/glass-card.d.ts +3 -3
- package/dist/native/base/glass-card.js +3 -3
- package/dist/native/base/input.d.ts +8 -8
- package/dist/native/base/input.js +7 -7
- package/dist/native/base/sheet.d.ts +27 -27
- package/dist/native/base/sheet.js +15 -15
- package/dist/native/form/checkbox.d.ts +3 -3
- package/dist/native/form/checkbox.js +2 -2
- package/dist/native/form/date-picker.d.ts +9 -9
- package/dist/native/form/date-picker.js +9 -9
- package/dist/native/form/form.d.ts +5 -6
- package/dist/native/form/form.js +4 -5
- package/dist/native/form/radio-group.d.ts +5 -5
- package/dist/native/form/radio-group.js +4 -4
- package/dist/native/form/select.d.ts +2 -2
- package/dist/native/form/select.js +2 -2
- package/dist/native/form/slider.d.ts +2 -2
- package/dist/native/form/slider.js +2 -2
- package/dist/native/form/switch.d.ts +2 -2
- package/dist/native/form/switch.js +2 -2
- package/dist/native/form/text-area.d.ts +2 -2
- package/dist/native/form/text-area.js +1 -1
- package/dist/native/form/text-input.d.ts +5 -5
- package/dist/native/form/text-input.js +8 -8
- package/dist/native/layout/accordion.d.ts +5 -5
- package/dist/native/layout/accordion.js +2 -2
- package/dist/native/layout/card.d.ts +8 -8
- package/dist/native/layout/card.js +3 -3
- package/dist/native/layout/description.d.ts +2 -2
- package/dist/native/layout/description.js +2 -2
- package/dist/native/layout/error.d.ts +5 -5
- package/dist/native/layout/error.js +2 -2
- package/dist/native/layout/information.d.ts +4 -4
- package/dist/native/layout/information.js +3 -3
- package/dist/native/layout/locked.d.ts +15 -15
- package/dist/native/layout/locked.js +7 -7
- package/dist/native/layout/modal.d.ts +8 -8
- package/dist/native/layout/modal.js +5 -5
- package/dist/native/layout/not-found.d.ts +4 -4
- package/dist/native/layout/not-found.js +3 -3
- package/dist/native/layout/page-frame.d.ts +8 -8
- package/dist/native/layout/page-frame.js +3 -3
- package/dist/native/layout/panel.d.ts +5 -5
- package/dist/native/layout/panel.js +5 -5
- package/dist/native/layout/reorderable-list.d.ts +14 -14
- package/dist/native/layout/reorderable-list.js +10 -10
- package/dist/native/layout/sheet.d.ts +10 -10
- package/dist/native/layout/sheet.js +4 -4
- package/dist/native/layout/simple-dialog.d.ts +3 -3
- package/dist/native/layout/simple-dialog.js +2 -2
- package/dist/native/layout/simple-table.d.ts +18 -18
- package/dist/native/layout/simple-table.js +1 -1
- package/dist/native/layout/tab-bar.d.ts +10 -10
- package/dist/native/layout/tab-bar.js +4 -4
- package/dist/native/layout/tabs.d.ts +6 -6
- package/dist/native/layout/tabs.js +4 -4
- package/dist/native/layout/tuning-panel.d.ts +10 -10
- package/dist/native/layout/tuning-panel.js +15 -15
- package/dist/native/lib/autocomplete.d.ts +1 -1
- package/dist/native/lib/autocomplete.js +1 -1
- package/dist/native/lib/breakpoints.d.ts +3 -3
- package/dist/native/lib/breakpoints.js +3 -3
- package/dist/native/lib/chart-palette.d.ts +2 -2
- package/dist/native/lib/chart-palette.js +2 -2
- package/dist/native/lib/confirm.d.ts +15 -16
- package/dist/native/lib/confirm.js +9 -10
- package/dist/native/lib/control.d.ts +9 -9
- package/dist/native/lib/external-store.d.ts +4 -5
- package/dist/native/lib/keyboard.d.ts +7 -7
- package/dist/native/lib/keyboard.js +7 -7
- package/dist/native/lib/labels.d.ts +6 -6
- package/dist/native/lib/labels.js +6 -6
- package/dist/native/lib/loading.d.ts +3 -3
- package/dist/native/lib/loading.js +3 -3
- package/dist/native/lib/network.d.ts +5 -6
- package/dist/native/lib/network.js +5 -6
- package/dist/native/lib/scheme.d.ts +7 -7
- package/dist/native/lib/scheme.js +3 -3
- package/dist/native/lib/snackbar.d.ts +12 -13
- package/dist/native/lib/snackbar.js +7 -8
- package/dist/native/lib/theme.d.ts +15 -15
- package/dist/native/lib/theme.js +15 -15
- package/dist/native/lib/timezone.d.ts +13 -13
- package/dist/native/lib/timezone.js +13 -13
- package/dist/native/lib/token-color.d.ts +1 -1
- package/dist/native/lib/token-color.js +1 -1
- package/dist/native/lib/tuning-context.d.ts +2 -2
- package/dist/native/lib/tuning.d.ts +10 -10
- package/dist/native/lib/tuning.js +8 -8
- package/dist/native/lib/typography.d.ts +3 -3
- package/dist/native/lib/typography.js +3 -3
- package/dist/native/lib/utils.d.ts +3 -3
- package/dist/native/lib/utils.js +3 -3
- package/dist/native/once/confirm.d.ts +2 -2
- package/dist/native/once/confirm.js +2 -2
- package/dist/native/once/error-boundary.d.ts +3 -3
- package/dist/native/once/error-boundary.js +2 -2
- package/dist/native/once/loading-lock.d.ts +3 -3
- package/dist/native/once/loading-lock.js +3 -3
- package/dist/native/once/offline-banner.d.ts +6 -6
- package/dist/native/once/offline-banner.js +5 -5
- package/dist/native/once/snackbar.d.ts +7 -7
- package/dist/native/once/snackbar.js +5 -5
- package/dist/native/styles.css +21 -21
- package/dist/shared/analytics.d.ts +23 -23
- package/dist/shared/button.d.ts +1 -1
- package/dist/shared/form.d.ts +7 -7
- package/dist/shared/form.js +2 -2
- package/dist/tokens/contrast-pairs.d.ts +9 -9
- package/dist/tokens/contrast-pairs.js +10 -10
- package/dist/tokens/index.d.ts +1 -1
- package/dist/tokens/index.js +1 -1
- package/dist/tokens/styles.gen.css +87 -87
- package/dist/tokens/tokens.gen.d.ts +2 -2
- package/dist/tokens/tokens.gen.js +2 -2
- package/dist/tuning/catalog.d.ts +8 -8
- package/dist/tuning/catalog.js +9 -9
- package/dist/tuning/color.d.ts +4 -4
- package/dist/tuning/color.js +5 -5
- package/dist/tuning/css.d.ts +13 -13
- package/dist/tuning/css.js +17 -17
- package/dist/tuning/model.d.ts +11 -11
- package/dist/tuning/model.js +11 -11
- package/dist/tuning/native.d.ts +18 -18
- package/dist/tuning/native.js +18 -18
- package/dist/tuning/schema.d.ts +15 -15
- package/dist/tuning/schema.js +22 -22
- package/dist/tuning/types.d.ts +25 -25
- package/dist/tuning/types.js +6 -6
- package/dist/web/analytics/line-chart.d.ts +6 -6
- package/dist/web/analytics/line-chart.js +3 -3
- package/dist/web/analytics/metric-card.d.ts +6 -6
- package/dist/web/analytics/metric-card.js +5 -5
- package/dist/web/analytics/multi-line-chart.d.ts +23 -23
- package/dist/web/analytics/multi-line-chart.js +33 -33
- package/dist/web/atom/avatar.d.ts +1 -1
- package/dist/web/atom/checkbox.d.ts +6 -6
- package/dist/web/atom/checkbox.js +2 -2
- package/dist/web/atom/colored-value.d.ts +4 -4
- package/dist/web/atom/colored-value.js +4 -4
- package/dist/web/atom/help.d.ts +1 -1
- package/dist/web/atom/segmented-control.d.ts +13 -14
- package/dist/web/atom/segmented-control.js +6 -7
- package/dist/web/atom/select.d.ts +7 -7
- package/dist/web/atom/select.js +5 -5
- package/dist/web/atom/slider.d.ts +3 -3
- package/dist/web/atom/slider.js +2 -2
- package/dist/web/atom/switch.d.ts +3 -3
- package/dist/web/atom/text-area.d.ts +9 -8
- package/dist/web/atom/text-area.js +9 -8
- package/dist/web/atom/text-field.d.ts +5 -4
- package/dist/web/atom/text-field.js +5 -4
- package/dist/web/atom/toggle-chip.d.ts +6 -6
- package/dist/web/atom/toggle-chip.js +4 -4
- package/dist/web/atom/tooltip.d.ts +6 -6
- package/dist/web/atom/tooltip.js +2 -2
- package/dist/web/base/accordion.js +1 -1
- package/dist/web/base/breadcrumb.d.ts +1 -1
- package/dist/web/base/breadcrumb.js +1 -1
- package/dist/web/base/card.d.ts +3 -3
- package/dist/web/base/card.js +2 -2
- package/dist/web/base/dialog.d.ts +1 -1
- package/dist/web/base/dialog.js +1 -1
- package/dist/web/base/form.d.ts +7 -7
- package/dist/web/base/form.js +5 -5
- package/dist/web/base/pagination.d.ts +5 -5
- package/dist/web/base/pagination.js +1 -1
- package/dist/web/base/sheet.d.ts +1 -1
- package/dist/web/base/sheet.js +1 -1
- package/dist/web/base/slider.d.ts +1 -1
- package/dist/web/base/sonner.d.ts +2 -2
- package/dist/web/base/sonner.js +2 -2
- package/dist/web/base/spinner.js +1 -1
- package/dist/web/form/checkbox.d.ts +8 -8
- package/dist/web/form/checkbox.js +3 -3
- package/dist/web/form/radio-group.js +3 -3
- package/dist/web/form/select.js +1 -1
- package/dist/web/form/slider.d.ts +3 -3
- package/dist/web/form/slider.js +3 -3
- package/dist/web/form/switch.d.ts +3 -3
- package/dist/web/form/switch.js +4 -4
- package/dist/web/form/text-area.js +1 -1
- package/dist/web/form/text-input.d.ts +1 -1
- package/dist/web/form/text-input.js +1 -1
- package/dist/web/layout/accordion.d.ts +5 -5
- package/dist/web/layout/accordion.js +2 -2
- package/dist/web/layout/alert-modal.d.ts +11 -11
- package/dist/web/layout/alert-modal.js +7 -7
- package/dist/web/layout/card.d.ts +1 -1
- package/dist/web/layout/information.d.ts +9 -9
- package/dist/web/layout/information.js +7 -7
- package/dist/web/layout/modal.d.ts +1 -1
- package/dist/web/layout/page-frame.d.ts +14 -14
- package/dist/web/layout/page-frame.js +7 -7
- package/dist/web/layout/scroll-area.d.ts +1 -1
- package/dist/web/layout/sheet.d.ts +4 -4
- package/dist/web/layout/simple-table.d.ts +18 -18
- package/dist/web/layout/simple-table.js +2 -2
- package/dist/web/layout/tabs.d.ts +4 -4
- package/dist/web/layout/titled-modal.d.ts +10 -11
- package/dist/web/layout/titled-modal.js +7 -8
- package/dist/web/lib/css-vars.d.ts +6 -6
- package/dist/web/lib/css-vars.js +5 -5
- package/dist/web/lib/dialog.d.ts +4 -4
- package/dist/web/lib/labels.d.ts +8 -8
- package/dist/web/lib/labels.js +8 -8
- package/dist/web/lib/modal-open-focus.d.ts +7 -7
- package/dist/web/lib/modal-open-focus.js +9 -9
- package/dist/web/lib/restore-focus.d.ts +4 -4
- package/dist/web/lib/restore-focus.js +4 -4
- package/dist/web/styles.css +33 -33
- package/package.json +2 -2
|
@@ -12,21 +12,21 @@ import { scheduleOnRN } from "react-native-worklets";
|
|
|
12
12
|
|
|
13
13
|
//#region src/native/base/sheet.tsx
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* The base for a bottom sheet. Mirrors the web base/sheet (a wrapper around Radix Dialog).
|
|
16
16
|
*
|
|
17
|
-
*
|
|
18
|
-
* `atom/select`
|
|
19
|
-
*
|
|
17
|
+
* This holds only "how the surface appears"; conventions for headings and body are decided by `layout/sheet`.
|
|
18
|
+
* Things that want their own content, such as the `atom/select` picker, cannot go through `layout/`
|
|
19
|
+
* (the dependency would run backwards), so, as on the web, the base lives in base and both use it.
|
|
20
20
|
*/
|
|
21
|
-
/**
|
|
21
|
+
/** The content padding. Even when `padded` is false, the bottom safe area is always secured. */
|
|
22
22
|
const GUTTER = 16;
|
|
23
23
|
/**
|
|
24
|
-
* `Modal`
|
|
25
|
-
*
|
|
26
|
-
*
|
|
24
|
+
* Do not use `Modal`'s `animationType="slide"`. It slides up **together with the scrim**,
|
|
25
|
+
* so the dark overlay appears to grow from the bottom and looks cheap. Here the scrim's fade and the panel's
|
|
26
|
+
* slide are driven by separate curves.
|
|
27
27
|
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
28
|
+
* The dialog role (`role="dialog"`, `aria-modal`), focus trapping and Esc (`onRequestClose`) are provided by `Modal`
|
|
29
|
+
* (react-native-web's `Modal` emits the role and the trap. It has no name of its own, so pass `aria-label(ledby)`).
|
|
30
30
|
*/
|
|
31
31
|
function SheetShell({ open, onOpenChange, dismissOnBackdropPress = true, maxHeightRatio = .85, onClosed, "aria-labelledby": ariaLabelledBy, "aria-label": ariaLabel, "aria-describedby": ariaDescribedBy, children }) {
|
|
32
32
|
const { height: windowHeight } = useWindowDimensions();
|
|
@@ -120,7 +120,7 @@ function SheetShell({ open, onOpenChange, dismissOnBackdropPress = true, maxHeig
|
|
|
120
120
|
})
|
|
121
121
|
});
|
|
122
122
|
}
|
|
123
|
-
/**
|
|
123
|
+
/** The grab cue (grabber), the heading and the close button. */
|
|
124
124
|
function SheetHeader({ title, description, closeLabel = CLOSE_LABEL, onClose, titleId, descriptionId }) {
|
|
125
125
|
const ink = useTokenColor("--ink-500");
|
|
126
126
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(View, {
|
|
@@ -155,10 +155,10 @@ function SheetHeader({ title, description, closeLabel = CLOSE_LABEL, onClose, ti
|
|
|
155
155
|
})] });
|
|
156
156
|
}
|
|
157
157
|
/**
|
|
158
|
-
*
|
|
158
|
+
* The sheet body.
|
|
159
159
|
*
|
|
160
|
-
* `contentContainerClassName`
|
|
161
|
-
*
|
|
160
|
+
* `contentContainerClassName` **does not work** with react-native-css (the padding silently disappears and
|
|
161
|
+
* text gets clipped at the edge). Always write padding in `contentContainerStyle`.
|
|
162
162
|
*/
|
|
163
163
|
function SheetScroll({ padded = true, hasFooter = false, children }) {
|
|
164
164
|
const insets = useSafeAreaInsets();
|
|
@@ -173,7 +173,7 @@ function SheetScroll({ padded = true, hasFooter = false, children }) {
|
|
|
173
173
|
children
|
|
174
174
|
});
|
|
175
175
|
}
|
|
176
|
-
/**
|
|
176
|
+
/** The sheet footer. Adds the safe area so it does not slip under the home indicator. */
|
|
177
177
|
function SheetFooter({ children }) {
|
|
178
178
|
const insets = useSafeAreaInsets();
|
|
179
179
|
return /* @__PURE__ */ jsx(View, {
|
|
@@ -2,12 +2,12 @@ import { BaseInputProps } from "../../shared/form.js";
|
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
//#region src/native/form/checkbox.d.ts
|
|
4
4
|
export type CheckboxProps = BaseInputProps<boolean> & {
|
|
5
|
-
/**
|
|
5
|
+
/** Label placed to the right of the checkbox. Distinct from the field's `label` (this one becomes the checkbox's name). */
|
|
6
6
|
checkboxLabel: ReactNode;
|
|
7
7
|
};
|
|
8
8
|
/**
|
|
9
|
-
* TanStack Form
|
|
10
|
-
* `value` / `onValueChange`
|
|
9
|
+
* Checkbox integrated with TanStack Form. Like the web `form/checkbox`,
|
|
10
|
+
* pass `value` / `onValueChange` for controlled mode (the field is not used); omit them to read from the field context.
|
|
11
11
|
*/
|
|
12
12
|
export declare function Checkbox(props: CheckboxProps): import("react").JSX.Element;
|
|
13
13
|
//#endregion
|
|
@@ -5,8 +5,8 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
5
5
|
|
|
6
6
|
//#region src/native/form/checkbox.tsx
|
|
7
7
|
/**
|
|
8
|
-
* TanStack Form
|
|
9
|
-
* `value` / `onValueChange`
|
|
8
|
+
* Checkbox integrated with TanStack Form. Like the web `form/checkbox`,
|
|
9
|
+
* pass `value` / `onValueChange` for controlled mode (the field is not used); omit them to read from the field context.
|
|
10
10
|
*/
|
|
11
11
|
function Checkbox(props) {
|
|
12
12
|
if (props.value !== void 0 && props.onValueChange !== void 0) return /* @__PURE__ */ jsx(Layout, {
|
|
@@ -4,20 +4,20 @@ export type DatePickerProps = FieldInputProps & {
|
|
|
4
4
|
mode?: "date" | "time" | "datetime";
|
|
5
5
|
minimumDate?: Date;
|
|
6
6
|
maximumDate?: Date;
|
|
7
|
-
/**
|
|
7
|
+
/** Formats the displayed value. Defaults to the locale's date notation. */
|
|
8
8
|
format?: (value: Date) => string;
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
11
|
-
* TanStack Form
|
|
11
|
+
* Date/time input integrated with TanStack Form. Corresponds to the web `form/date-picker`.
|
|
12
12
|
*
|
|
13
|
-
* web
|
|
14
|
-
* OS
|
|
15
|
-
*
|
|
16
|
-
* react-native-web
|
|
17
|
-
*
|
|
13
|
+
* The web version shows a react-day-picker calendar in a popover, whereas native uses
|
|
14
|
+
* the OS-standard picker (`@react-native-community/datetimepicker`).
|
|
15
|
+
* It follows each OS's convention: a persistent inline spinner on iOS, a dialog opened by tapping on Android.
|
|
16
|
+
* react-native-web (preview, vitest) has no web implementation in that library, so it is rendered by a
|
|
17
|
+
* substitute such as `<input type="date">` (`web/datetimepicker.tsx`), with an "OK" shown below as on iOS.
|
|
18
18
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
19
|
+
* The value comes from the field context (there is no controlled mode).
|
|
20
|
+
* The trigger is a **button** that opens the picker; its name is "label, current value" (same as `atom/select`).
|
|
21
21
|
*/
|
|
22
22
|
export declare function DatePicker({ label, required, description, helpText, placeholder, disabled, debounce, className, wrapperClassName, mode, minimumDate, maximumDate, format, "data-testid": testID }: DatePickerProps): import("react").JSX.Element;
|
|
23
23
|
//#endregion
|
|
@@ -11,23 +11,23 @@ import Feather from "@expo/vector-icons/Feather";
|
|
|
11
11
|
import DateTimePicker from "@react-native-community/datetimepicker";
|
|
12
12
|
|
|
13
13
|
//#region src/native/form/date-picker.tsx
|
|
14
|
-
/**
|
|
14
|
+
/** Name given to the picker when the date/time input has none (for example when `label` is an element). */
|
|
15
15
|
const PICKER_LABEL = {
|
|
16
16
|
date: "日付",
|
|
17
17
|
time: "時刻",
|
|
18
18
|
datetime: "日時"
|
|
19
19
|
};
|
|
20
20
|
/**
|
|
21
|
-
* TanStack Form
|
|
21
|
+
* Date/time input integrated with TanStack Form. Corresponds to the web `form/date-picker`.
|
|
22
22
|
*
|
|
23
|
-
* web
|
|
24
|
-
* OS
|
|
25
|
-
*
|
|
26
|
-
* react-native-web
|
|
27
|
-
*
|
|
23
|
+
* The web version shows a react-day-picker calendar in a popover, whereas native uses
|
|
24
|
+
* the OS-standard picker (`@react-native-community/datetimepicker`).
|
|
25
|
+
* It follows each OS's convention: a persistent inline spinner on iOS, a dialog opened by tapping on Android.
|
|
26
|
+
* react-native-web (preview, vitest) has no web implementation in that library, so it is rendered by a
|
|
27
|
+
* substitute such as `<input type="date">` (`web/datetimepicker.tsx`), with an "OK" shown below as on iOS.
|
|
28
28
|
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
29
|
+
* The value comes from the field context (there is no controlled mode).
|
|
30
|
+
* The trigger is a **button** that opens the picker; its name is "label, current value" (same as `atom/select`).
|
|
31
31
|
*/
|
|
32
32
|
function DatePicker({ label, required, description, helpText, placeholder, disabled, debounce, className, wrapperClassName, mode = "date", minimumDate, maximumDate, format, "data-testid": testID }) {
|
|
33
33
|
const [value, setValue] = useFieldValue({ debounce });
|
|
@@ -4,18 +4,17 @@ import { ReactNode } from "react";
|
|
|
4
4
|
//#region src/native/form/form.d.ts
|
|
5
5
|
export type SubmitButtonProps = Omit<ButtonProps, "onPress"> & {
|
|
6
6
|
children: ReactNode;
|
|
7
|
-
/**
|
|
7
|
+
/** Allow submitting even when the value is still the initial one. */
|
|
8
8
|
allowDefaultValue?: boolean;
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* web
|
|
11
|
+
* The form's submit button. It is disabled under the same conditions while submitting, unchanged, or failing validation
|
|
12
|
+
* (register it in `createFormHook`'s `formComponents` and use it as `form.SubmitButton`).
|
|
13
|
+
* The web side of love3 has no counterpart yet.
|
|
14
14
|
*/
|
|
15
15
|
export declare function SubmitButton({ disabled, allowDefaultValue, children, ...props }: SubmitButtonProps): import("react").JSX.Element;
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
18
|
-
* 移植元は `description` を受け取るだけで描かなかったので、描くようにした。
|
|
17
|
+
* Wrapper for array fields (label, children, supplementary text, error). Renders `description` as well.
|
|
19
18
|
*/
|
|
20
19
|
export declare function ArrayFields({ label, required, description, children }: Pick<FieldInputProps, "label" | "required" | "description"> & {
|
|
21
20
|
children: ReactNode;
|
package/dist/native/form/form.js
CHANGED
|
@@ -5,9 +5,9 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
5
5
|
|
|
6
6
|
//#region src/native/form/form.tsx
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* web
|
|
8
|
+
* The form's submit button. It is disabled under the same conditions while submitting, unchanged, or failing validation
|
|
9
|
+
* (register it in `createFormHook`'s `formComponents` and use it as `form.SubmitButton`).
|
|
10
|
+
* The web side of love3 has no counterpart yet.
|
|
11
11
|
*/
|
|
12
12
|
function SubmitButton({ disabled, allowDefaultValue = false, children, ...props }) {
|
|
13
13
|
const form = useFormContext();
|
|
@@ -26,8 +26,7 @@ function SubmitButton({ disabled, allowDefaultValue = false, children, ...props
|
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
30
|
-
* 移植元は `description` を受け取るだけで描かなかったので、描くようにした。
|
|
29
|
+
* Wrapper for array fields (label, children, supplementary text, error). Renders `description` as well.
|
|
31
30
|
*/
|
|
32
31
|
function ArrayFields({ label, required, description, children }) {
|
|
33
32
|
return /* @__PURE__ */ jsxs(FormItem, { children: [
|
|
@@ -8,16 +8,16 @@ export type RadioOption = {
|
|
|
8
8
|
};
|
|
9
9
|
export type RadioGroupProps = FieldInputProps & {
|
|
10
10
|
options: RadioOption[];
|
|
11
|
-
/** `list`
|
|
11
|
+
/** `list` stacks vertically; `box` lays out horizontally with a 1px border. The same two forms as web. */
|
|
12
12
|
type?: "list" | "box";
|
|
13
13
|
};
|
|
14
14
|
/**
|
|
15
|
-
* TanStack Form
|
|
15
|
+
* Radio group integrated with TanStack Form. Corresponds to the web `form/radio-group`.
|
|
16
16
|
*
|
|
17
|
-
*
|
|
17
|
+
* The knob is a 16px **circle** (same as web; `rounded-full`): unselected has a line-control border, selected has an indigo border and a center dot.
|
|
18
18
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
19
|
+
* The group is a `radiogroup` named by its label (`aria-labelledby`). Each option is a `radio` (named by the option's `label`),
|
|
20
|
+
* and each option points to the description and the error (one field holds several inputs, so ids are separated per option).
|
|
21
21
|
*/
|
|
22
22
|
export declare function RadioGroup({ label, required, description, helpText, wrapperClassName, ...rest }: RadioGroupProps): import("react").JSX.Element;
|
|
23
23
|
//#endregion
|
|
@@ -9,12 +9,12 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
9
9
|
|
|
10
10
|
//#region src/native/form/radio-group.tsx
|
|
11
11
|
/**
|
|
12
|
-
* TanStack Form
|
|
12
|
+
* Radio group integrated with TanStack Form. Corresponds to the web `form/radio-group`.
|
|
13
13
|
*
|
|
14
|
-
*
|
|
14
|
+
* The knob is a 16px **circle** (same as web; `rounded-full`): unselected has a line-control border, selected has an indigo border and a center dot.
|
|
15
15
|
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
16
|
+
* The group is a `radiogroup` named by its label (`aria-labelledby`). Each option is a `radio` (named by the option's `label`),
|
|
17
|
+
* and each option points to the description and the error (one field holds several inputs, so ids are separated per option).
|
|
18
18
|
*/
|
|
19
19
|
function RadioGroup({ label, required, description, helpText, wrapperClassName, ...rest }) {
|
|
20
20
|
return /* @__PURE__ */ jsxs(FormItem, {
|
|
@@ -5,8 +5,8 @@ export type SelectProps = FieldInputProps & {
|
|
|
5
5
|
options: (SelectOption | SelectOptionGroup)[];
|
|
6
6
|
};
|
|
7
7
|
/**
|
|
8
|
-
* TanStack Form
|
|
9
|
-
*
|
|
8
|
+
* Select integrated with TanStack Form. Same props as the web `form/select` (no controlled mode; use `atom/select` for a controlled version).
|
|
9
|
+
* The value comes from the field context. The default placeholder is the same as web's, "選択してください" ("Please select").
|
|
10
10
|
*/
|
|
11
11
|
export declare function Select({ label, required, description, helpText, placeholder, disabled, debounce, options, className, wrapperClassName }: SelectProps): import("react").JSX.Element;
|
|
12
12
|
//#endregion
|
|
@@ -6,8 +6,8 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
6
6
|
|
|
7
7
|
//#region src/native/form/select.tsx
|
|
8
8
|
/**
|
|
9
|
-
* TanStack Form
|
|
10
|
-
*
|
|
9
|
+
* Select integrated with TanStack Form. Same props as the web `form/select` (no controlled mode; use `atom/select` for a controlled version).
|
|
10
|
+
* The value comes from the field context. The default placeholder is the same as web's, "選択してください" ("Please select").
|
|
11
11
|
*/
|
|
12
12
|
function Select({ label, required, description, helpText, placeholder = SELECT_PLACEHOLDER_LABEL, disabled, debounce, options, className, wrapperClassName }) {
|
|
13
13
|
const [value, setValue] = useFieldValue({ debounce });
|
|
@@ -7,8 +7,8 @@ export type SliderProps = FieldInputProps & {
|
|
|
7
7
|
formattedValue?: string;
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
10
|
-
* TanStack Form
|
|
11
|
-
*
|
|
10
|
+
* Slider integrated with TanStack Form. Corresponds to the web `form/slider` (single value only; ranges do not exist on native).
|
|
11
|
+
* The label and current-value row belongs to `atom/slider`. Use `atom/slider` if you need a controlled version.
|
|
12
12
|
*/
|
|
13
13
|
export declare function Slider({ label, required, description, helpText, disabled, debounce, min, max, step, formattedValue, className, wrapperClassName }: SliderProps): import("react").JSX.Element;
|
|
14
14
|
//#endregion
|
|
@@ -5,8 +5,8 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
5
5
|
|
|
6
6
|
//#region src/native/form/slider.tsx
|
|
7
7
|
/**
|
|
8
|
-
* TanStack Form
|
|
9
|
-
*
|
|
8
|
+
* Slider integrated with TanStack Form. Corresponds to the web `form/slider` (single value only; ranges do not exist on native).
|
|
9
|
+
* The label and current-value row belongs to `atom/slider`. Use `atom/slider` if you need a controlled version.
|
|
10
10
|
*/
|
|
11
11
|
function Slider({ label, required, description, helpText, disabled, debounce, min, max, step, formattedValue, className, wrapperClassName }) {
|
|
12
12
|
const [value, setValue] = useFieldValue({ debounce });
|
|
@@ -2,8 +2,8 @@ import { BaseInputProps } from "../../shared/form.js";
|
|
|
2
2
|
//#region src/native/form/switch.d.ts
|
|
3
3
|
export type SwitchProps = BaseInputProps<boolean>;
|
|
4
4
|
/**
|
|
5
|
-
* TanStack Form
|
|
6
|
-
* `value` / `onValueChange`
|
|
5
|
+
* Switch integrated with TanStack Form. Like the web `form/switch`, it lays out a single row: label on the left, switch on the right.
|
|
6
|
+
* Pass `value` / `onValueChange` for controlled mode (the field is not used); omit them to read from the field context.
|
|
7
7
|
*/
|
|
8
8
|
export declare function Switch(props: SwitchProps): import("react").JSX.Element;
|
|
9
9
|
//#endregion
|
|
@@ -6,8 +6,8 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
6
6
|
|
|
7
7
|
//#region src/native/form/switch.tsx
|
|
8
8
|
/**
|
|
9
|
-
* TanStack Form
|
|
10
|
-
* `value` / `onValueChange`
|
|
9
|
+
* Switch integrated with TanStack Form. Like the web `form/switch`, it lays out a single row: label on the left, switch on the right.
|
|
10
|
+
* Pass `value` / `onValueChange` for controlled mode (the field is not used); omit them to read from the field context.
|
|
11
11
|
*/
|
|
12
12
|
function Switch(props) {
|
|
13
13
|
if (props.value !== void 0 && props.onValueChange !== void 0) return /* @__PURE__ */ jsx(Layout, {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { FieldInputProps } from "../../shared/form.js";
|
|
2
2
|
//#region src/native/form/text-area.d.ts
|
|
3
3
|
export type TextareaProps = FieldInputProps & {
|
|
4
|
-
/**
|
|
4
|
+
/** Approximate number of visible lines (default 5 ≈ web's min-h-[200px]). */
|
|
5
5
|
numberOfLines?: number;
|
|
6
6
|
};
|
|
7
7
|
/**
|
|
8
|
-
* TanStack Form
|
|
8
|
+
* Multi-line input integrated with TanStack Form. Corresponds to the web `form/text-area`.
|
|
9
9
|
*/
|
|
10
10
|
export declare function Textarea({ label, required, description, helpText, placeholder, disabled, debounce, className, wrapperClassName, numberOfLines, "data-testid": testID }: TextareaProps): import("react").JSX.Element;
|
|
11
11
|
//#endregion
|
|
@@ -7,7 +7,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
7
7
|
|
|
8
8
|
//#region src/native/form/text-area.tsx
|
|
9
9
|
/**
|
|
10
|
-
* TanStack Form
|
|
10
|
+
* Multi-line input integrated with TanStack Form. Corresponds to the web `form/text-area`.
|
|
11
11
|
*/
|
|
12
12
|
function Textarea({ label, required, description, helpText, placeholder, disabled, debounce, className, wrapperClassName, numberOfLines = 5, "data-testid": testID }) {
|
|
13
13
|
const [value, setValue] = useFieldValue({ debounce });
|
|
@@ -2,17 +2,17 @@ import { TextFieldProps, TextFieldType } from "../atom/text-field.js";
|
|
|
2
2
|
import { FieldInputProps } from "../../shared/form.js";
|
|
3
3
|
//#region src/native/form/text-input.d.ts
|
|
4
4
|
export type TextInputProps = FieldInputProps & {
|
|
5
|
-
/** `number`
|
|
5
|
+
/** `number` switches to the numeric keyboard and stores the value as a number (null when emptied). */
|
|
6
6
|
type?: TextFieldType;
|
|
7
|
-
/**
|
|
7
|
+
/** Autofill kind (same meaning as web's `TextInput.autoComplete`; same type as `atom/text-field`). */
|
|
8
8
|
autoComplete?: TextFieldProps["autoComplete"];
|
|
9
9
|
autoCapitalize?: "none" | "sentences" | "words" | "characters";
|
|
10
10
|
multiline?: boolean;
|
|
11
11
|
};
|
|
12
12
|
/**
|
|
13
|
-
* TanStack Form
|
|
14
|
-
*
|
|
15
|
-
*
|
|
13
|
+
* Text input integrated with TanStack Form. Corresponds to the web `form/text-input`.
|
|
14
|
+
* The value comes from the field context, and `debounce` handling is delegated to the shared `useFieldValue`.
|
|
15
|
+
* The input frame itself uses `atom/text-field` (the counterpart of web's `base/input`).
|
|
16
16
|
*/
|
|
17
17
|
export declare function TextInput({ label, required, description, helpText, placeholder, disabled, debounce, className, wrapperClassName, type, autoComplete, autoCapitalize, multiline, "data-testid": testID }: TextInputProps): import("react").JSX.Element;
|
|
18
18
|
//#endregion
|
|
@@ -8,11 +8,11 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
8
8
|
//#region src/native/form/text-input.tsx
|
|
9
9
|
const DECIMAL = /^[+-]?(?:\d+\.?\d*|\.\d+)$/;
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
* -
|
|
13
|
-
* -
|
|
14
|
-
*
|
|
15
|
-
* -
|
|
11
|
+
* Parses the text typed into a number field.
|
|
12
|
+
* - Leading and trailing whitespace is ignored, and empty input (including `" "`) means "no value" (null)
|
|
13
|
+
* - Full-width digits and symbols are normalized to half-width (`12.5` → `12.5`). `,` is accepted as the decimal point (`1,5` → 1.5; locale).
|
|
14
|
+
* Thousands separators (`1,000`) cannot be told apart (read as 1); digit grouping is assumed not to be entered
|
|
15
|
+
* - Unreadable text (`abc`, `-`, `0x10`, `Infinity`, overflow) yields `ok: false`
|
|
16
16
|
*/
|
|
17
17
|
function parseNumber(text) {
|
|
18
18
|
const normalized = text.normalize("NFKC").replaceAll("−", "-").replace(",", ".").trim();
|
|
@@ -28,9 +28,9 @@ function parseNumber(text) {
|
|
|
28
28
|
} : { ok: false };
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
|
-
* TanStack Form
|
|
32
|
-
*
|
|
33
|
-
*
|
|
31
|
+
* Text input integrated with TanStack Form. Corresponds to the web `form/text-input`.
|
|
32
|
+
* The value comes from the field context, and `debounce` handling is delegated to the shared `useFieldValue`.
|
|
33
|
+
* The input frame itself uses `atom/text-field` (the counterpart of web's `base/input`).
|
|
34
34
|
*/
|
|
35
35
|
function TextInput({ label, required, description, helpText, placeholder, disabled, debounce, className, wrapperClassName, type = "text", autoComplete, autoCapitalize, multiline, "data-testid": testID }) {
|
|
36
36
|
const [value, setValue, field] = useFieldValue({ debounce });
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
2
|
//#region src/native/layout/accordion.d.ts
|
|
3
3
|
export type AccordionEntry = {
|
|
4
|
-
/**
|
|
4
|
+
/** Item identifier. */
|
|
5
5
|
value: string;
|
|
6
6
|
trigger: ReactNode;
|
|
7
7
|
content: ReactNode;
|
|
8
8
|
};
|
|
9
9
|
export type AccordionProps = {
|
|
10
10
|
items: AccordionEntry[];
|
|
11
|
-
/** `single`
|
|
11
|
+
/** `single` opens one item at a time; `multiple` allows several open at once. */
|
|
12
12
|
type?: "single" | "multiple";
|
|
13
13
|
defaultValue?: string[];
|
|
14
14
|
className?: string;
|
|
15
15
|
itemClassName?: string;
|
|
16
|
-
/**
|
|
16
|
+
/** Extra classes for the open/close row (the trigger). */
|
|
17
17
|
triggerClassName?: string;
|
|
18
18
|
contentClassName?: string;
|
|
19
19
|
};
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
21
|
+
* A data-driven accordion, like the web `layout/accordion`: just pass `items`.
|
|
22
|
+
* Dividers are 1px hairlines only, and only the open/close chevron animates.
|
|
23
23
|
*/
|
|
24
24
|
export declare function Accordion({ items, type, defaultValue, className, itemClassName, triggerClassName, contentClassName }: AccordionProps): import("react").JSX.Element;
|
|
25
25
|
//#endregion
|
|
@@ -9,8 +9,8 @@ import Feather from "@expo/vector-icons/Feather";
|
|
|
9
9
|
//#region src/native/layout/accordion.tsx
|
|
10
10
|
if (Platform.OS === "android" && UIManager.setLayoutAnimationEnabledExperimental) UIManager.setLayoutAnimationEnabledExperimental(true);
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
12
|
+
* A data-driven accordion, like the web `layout/accordion`: just pass `items`.
|
|
13
|
+
* Dividers are 1px hairlines only, and only the open/close chevron animates.
|
|
14
14
|
*/
|
|
15
15
|
function Accordion({ items, type = "single", defaultValue = [], className, itemClassName, triggerClassName, contentClassName }) {
|
|
16
16
|
const [open, setOpen] = useState(defaultValue);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
2
|
//#region src/native/layout/card.d.ts
|
|
3
|
-
/**
|
|
3
|
+
/** A text or number action (it serves as its own spoken name). */
|
|
4
4
|
type TextAction = string | number;
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
6
|
+
* The action at the right end of the header. **When the tappable action (`actionOnPress`) is not text (an icon, for example),
|
|
7
|
+
* a spoken name (`actionLabel`) is required** (otherwise the button would have no name).
|
|
8
8
|
*/
|
|
9
9
|
type CardActionProps = {
|
|
10
10
|
action?: undefined;
|
|
@@ -26,8 +26,8 @@ type CardActionProps = {
|
|
|
26
26
|
export type CardProps = CardActionProps & {
|
|
27
27
|
title?: ReactNode;
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
29
|
+
* Makes the title a heading (`role="heading"` and `aria-level`). Pass it when the title should be part of the screen's heading structure.
|
|
30
|
+
* When omitted it is plain text (same meaning as web's `headingLevel`).
|
|
31
31
|
*/
|
|
32
32
|
headingLevel?: 2 | 3 | 4 | 5 | 6;
|
|
33
33
|
description?: ReactNode;
|
|
@@ -37,10 +37,10 @@ export type CardProps = CardActionProps & {
|
|
|
37
37
|
contentClassName?: string;
|
|
38
38
|
};
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
41
|
-
*
|
|
40
|
+
* The same "title, description, action, body, footer" structure as the web `layout/card`.
|
|
41
|
+
* The shell (surface radius, a very faint 1px rule, raised surface) belongs to `Panel`.
|
|
42
42
|
*
|
|
43
|
-
*
|
|
43
|
+
* If you only want to lay out your own spacing and dividers inside, use `Panel`, the bare surface, directly.
|
|
44
44
|
*/
|
|
45
45
|
export declare function Card({ title, headingLevel, description, action, actionOnPress, actionLabel, content, footer, className, contentClassName }: CardProps): import("react").JSX.Element;
|
|
46
46
|
//#endregion
|
|
@@ -6,10 +6,10 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
6
6
|
|
|
7
7
|
//#region src/native/layout/card.tsx
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
9
|
+
* The same "title, description, action, body, footer" structure as the web `layout/card`.
|
|
10
|
+
* The shell (surface radius, a very faint 1px rule, raised surface) belongs to `Panel`.
|
|
11
11
|
*
|
|
12
|
-
*
|
|
12
|
+
* If you only want to lay out your own spacing and dividers inside, use `Panel`, the bare surface, directly.
|
|
13
13
|
*/
|
|
14
14
|
function Card({ title, headingLevel, description, action, actionOnPress, actionLabel, content, footer, className, contentClassName }) {
|
|
15
15
|
const hasHeader = !!title || !!description || !!action;
|
|
@@ -9,8 +9,8 @@ export type DescriptionProps = {
|
|
|
9
9
|
sections: DescriptionSection[];
|
|
10
10
|
};
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
12
|
+
* Stacks heading + body sections separated by 1px rules.
|
|
13
|
+
* Corresponds to the web `layout/description` (terms of service, explanation screens, etc.).
|
|
14
14
|
*/
|
|
15
15
|
export declare function Description({ sections }: DescriptionProps): import("react").JSX.Element;
|
|
16
16
|
//#endregion
|
|
@@ -6,8 +6,8 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
6
6
|
|
|
7
7
|
//#region src/native/layout/description.tsx
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
9
|
+
* Stacks heading + body sections separated by 1px rules.
|
|
10
|
+
* Corresponds to the web `layout/description` (terms of service, explanation screens, etc.).
|
|
11
11
|
*/
|
|
12
12
|
function Description({ sections }) {
|
|
13
13
|
return /* @__PURE__ */ jsx(View, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region src/native/layout/error.d.ts
|
|
2
2
|
export type ErrorViewProps = {
|
|
3
|
-
/**
|
|
3
|
+
/** Display text. This is a shared package, so the caller owns it (no i18n is brought in). */
|
|
4
4
|
labels: {
|
|
5
5
|
title: string;
|
|
6
6
|
description?: string;
|
|
@@ -8,14 +8,14 @@ export type ErrorViewProps = {
|
|
|
8
8
|
};
|
|
9
9
|
onRetry: () => void;
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
* `h-full`
|
|
11
|
+
* By default it fills the screen and centers its content. When inserted as part of scrolling content,
|
|
12
|
+
* `h-full` cannot be resolved, so override the height with `className`.
|
|
13
13
|
*/
|
|
14
14
|
className?: string;
|
|
15
15
|
};
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
18
|
-
* `once/error-boundary
|
|
17
|
+
* The screen shown on error.
|
|
18
|
+
* It is also used as the content of `once/error-boundary`.
|
|
19
19
|
*/
|
|
20
20
|
export declare function ErrorView({ labels, onRetry, className }: ErrorViewProps): import("react").JSX.Element;
|
|
21
21
|
//#endregion
|
|
@@ -8,8 +8,8 @@ import Feather from "@expo/vector-icons/Feather";
|
|
|
8
8
|
|
|
9
9
|
//#region src/native/layout/error.tsx
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
* `once/error-boundary
|
|
11
|
+
* The screen shown on error.
|
|
12
|
+
* It is also used as the content of `once/error-boundary`.
|
|
13
13
|
*/
|
|
14
14
|
function ErrorView({ labels, onRetry, className }) {
|
|
15
15
|
const ink = useTokenColor("--ink-1000");
|
|
@@ -11,15 +11,15 @@ export type InformationField = {
|
|
|
11
11
|
};
|
|
12
12
|
export type InformationProps = {
|
|
13
13
|
fields: InformationField[];
|
|
14
|
-
/**
|
|
14
|
+
/** Shows values larger (for a detail screen header, etc.). */
|
|
15
15
|
highlighted?: boolean;
|
|
16
16
|
className?: string;
|
|
17
17
|
};
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* A definition list that lays out labels and values. Corresponds to the web `layout/information`.
|
|
20
20
|
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
21
|
+
* Web has room to split into several columns, but native lacks the width, so it
|
|
22
|
+
* **always renders a single column** (rows with the label on the left and the value on the right).
|
|
23
23
|
*/
|
|
24
24
|
export declare function Information({ fields, highlighted, className }: InformationProps): import("react").JSX.Element;
|
|
25
25
|
//#endregion
|