@xaui/native 0.9.1-alpha.30 → 0.9.1-alpha.32
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/dist/chunk-36PRYGAM.js +13 -0
- package/dist/{chunk-E4TS6632.cjs → chunk-4MPSXDAB.cjs} +16 -16
- package/dist/{chunk-XQFAUDR2.cjs → chunk-4SLOOIE5.cjs} +2 -2
- package/dist/{chunk-FMZQW35T.js → chunk-4YJLNYUS.js} +13 -13
- package/dist/{chunk-ZP2E2H2G.cjs → chunk-54FJOKAN.cjs} +3 -3
- package/dist/{chunk-GPVNCJ3Z.cjs → chunk-6M7RUU7V.cjs} +68 -68
- package/dist/{chunk-XFSW3ZNI.cjs → chunk-7CTIE42J.cjs} +12 -12
- package/dist/{chunk-QGN2BBJO.cjs → chunk-AOEXU5UV.cjs} +8 -8
- package/dist/{chunk-Q3WFY5N3.js → chunk-AYOVBZAX.js} +10 -10
- package/dist/{chunk-6RVCGLKZ.js → chunk-BA2MPBCO.js} +60 -60
- package/dist/{chunk-5GO7MAVY.cjs → chunk-CM4LI5OH.cjs} +11 -11
- package/dist/{chunk-NBFWWQFW.cjs → chunk-CNNLMMFV.cjs} +13 -13
- package/dist/{chunk-TGZZ3RZU.cjs → chunk-CYS6U374.cjs} +4 -4
- package/dist/{chunk-UBQLKIZC.cjs → chunk-ETSYP3NH.cjs} +19 -19
- package/dist/{chunk-VJEER76X.js → chunk-GBFQZQ77.js} +9 -9
- package/dist/chunk-H4E4HDEP.cjs +13 -0
- package/dist/{chunk-NYRXUGVL.js → chunk-HVD5EX7V.js} +6 -6
- package/dist/{chunk-GVQOD3VW.js → chunk-HXL2QCMR.js} +3 -3
- package/dist/{chunk-GLGU2WFL.cjs → chunk-I6ZB3FZI.cjs} +1 -12
- package/dist/chunk-JCYWU5TO.js +92 -0
- package/dist/{chunk-7XKQJQF2.cjs → chunk-K4TWKF5U.cjs} +16 -16
- package/dist/{chunk-N527BTY4.cjs → chunk-K7LLERKT.cjs} +17 -17
- package/dist/chunk-KQKD3KB3.js +152 -0
- package/dist/{chunk-A5OCK3C2.js → chunk-L55CDXNI.js} +7 -7
- package/dist/chunk-LT6XHFXJ.cjs +185 -0
- package/dist/{chunk-URSKA2VR.js → chunk-MEYCZS32.js} +0 -11
- package/dist/{chunk-DFME724B.js → chunk-MHEL3NAN.js} +4 -4
- package/dist/{chunk-KWCHSIMI.cjs → chunk-MSMZBUZO.cjs} +13 -13
- package/dist/{chunk-27ZRTZEE.js → chunk-NFFL3E4N.js} +10 -10
- package/dist/{chunk-G7K652GC.js → chunk-NLASSGA7.js} +2 -2
- package/dist/{chunk-KOC3KQIT.js → chunk-NMAZ2TQF.js} +4 -4
- package/dist/{chunk-ZSLNGBDS.cjs → chunk-OX2YNMNS.cjs} +67 -67
- package/dist/{chunk-VZBWYWEI.cjs → chunk-PBR44KVV.cjs} +25 -25
- package/dist/{chunk-WR7YLDVV.cjs → chunk-PCWT2YBE.cjs} +3 -3
- package/dist/{chunk-BVJQ3UPZ.js → chunk-PPWXLZGL.js} +15 -15
- package/dist/{chunk-5Z4P6WHR.cjs → chunk-Q3D6KIVF.cjs} +11 -11
- package/dist/{chunk-X4HQ4H2V.js → chunk-SLUJFE6R.js} +16 -16
- package/dist/{chunk-4XPLPQLM.cjs → chunk-TVCS5UOE.cjs} +12 -12
- package/dist/{chunk-V4WDMM6Z.js → chunk-U3RDU3HU.js} +2 -2
- package/dist/{chunk-5RQ7AZPN.cjs → chunk-UORTYL63.cjs} +17 -17
- package/dist/{chunk-YKL6XHM6.js → chunk-UR6DNU2M.js} +10 -10
- package/dist/chunk-VSALV7VO.cjs +92 -0
- package/dist/{chunk-3FV4COTM.js → chunk-WJPQARJ5.js} +3 -3
- package/dist/{chunk-BFMTUMTU.js → chunk-XNNJM5DQ.js} +76 -76
- package/dist/{chunk-KPWZLUES.cjs → chunk-XWMB66ZM.cjs} +5 -5
- package/dist/{chunk-GI24YJPE.js → chunk-Y2B4XM3Y.js} +12 -12
- package/dist/{chunk-E2CWBQTV.js → chunk-YXPYOOHU.js} +1 -1
- package/dist/{chunk-7SEZGVTY.js → chunk-ZC35YYKS.js} +1 -1
- package/dist/components/alert/index.cjs +8 -7
- package/dist/components/alert/index.js +7 -6
- package/dist/components/button/index.cjs +9 -8
- package/dist/components/button/index.js +8 -7
- package/dist/components/card/index.cjs +6 -5
- package/dist/components/card/index.js +5 -4
- package/dist/components/checkbox/index.cjs +7 -6
- package/dist/components/checkbox/index.js +6 -5
- package/dist/components/chip/index.cjs +8 -7
- package/dist/components/chip/index.js +7 -6
- package/dist/components/divider/index.cjs +14 -0
- package/dist/components/divider/index.d.cts +117 -0
- package/dist/components/divider/index.d.ts +117 -0
- package/dist/components/divider/index.js +14 -0
- package/dist/components/input/index.cjs +5 -4
- package/dist/components/input/index.js +4 -3
- package/dist/components/input-group/index.cjs +7 -6
- package/dist/components/input-group/index.js +6 -5
- package/dist/components/input-otp/index.cjs +5 -4
- package/dist/components/input-otp/index.js +4 -3
- package/dist/components/radio/index.cjs +7 -6
- package/dist/components/radio/index.js +6 -5
- package/dist/components/skeleton/index.cjs +12 -0
- package/dist/components/skeleton/index.d.cts +120 -0
- package/dist/components/skeleton/index.d.ts +120 -0
- package/dist/components/skeleton/index.js +12 -0
- package/dist/components/spinner/index.cjs +6 -5
- package/dist/components/spinner/index.js +5 -4
- package/dist/components/switch/index.cjs +7 -6
- package/dist/components/switch/index.js +6 -5
- package/dist/components/text-area/index.cjs +6 -5
- package/dist/components/text-area/index.js +5 -4
- package/dist/components/typography/index.cjs +5 -4
- package/dist/components/typography/index.js +4 -3
- package/dist/components/view/index.cjs +5 -4
- package/dist/components/view/index.js +4 -3
- package/dist/index.cjs +43 -29
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +65 -51
- package/dist/system/index.cjs +12 -10
- package/dist/system/index.js +15 -13
- package/package.json +21 -1
|
@@ -2,19 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('../../chunk-
|
|
7
|
-
require('../../chunk-
|
|
5
|
+
var _chunkETSYP3NHcjs = require('../../chunk-ETSYP3NH.cjs');
|
|
6
|
+
require('../../chunk-CYS6U374.cjs');
|
|
7
|
+
require('../../chunk-6M7RUU7V.cjs');
|
|
8
8
|
require('../../chunk-7DPL3ZDS.cjs');
|
|
9
|
-
require('../../chunk-WR7YLDVV.cjs');
|
|
10
9
|
require('../../chunk-EJQCQPET.cjs');
|
|
10
|
+
require('../../chunk-PCWT2YBE.cjs');
|
|
11
|
+
require('../../chunk-54FJOKAN.cjs');
|
|
12
|
+
require('../../chunk-H4E4HDEP.cjs');
|
|
11
13
|
require('../../chunk-FNEUOBCV.cjs');
|
|
14
|
+
require('../../chunk-I6ZB3FZI.cjs');
|
|
12
15
|
require('../../chunk-57SJ4LJF.cjs');
|
|
13
|
-
require('../../chunk-ZP2E2H2G.cjs');
|
|
14
|
-
require('../../chunk-GLGU2WFL.cjs');
|
|
15
16
|
require('../../chunk-MC7SY2QH.cjs');
|
|
16
17
|
|
|
17
18
|
|
|
18
19
|
|
|
19
20
|
|
|
20
|
-
exports.Chip =
|
|
21
|
+
exports.Chip = _chunkETSYP3NHcjs.Chip; exports.chipRecipe = _chunkETSYP3NHcjs.chipRecipe; exports.useChip = _chunkETSYP3NHcjs.useChip;
|
|
@@ -2,16 +2,17 @@ import {
|
|
|
2
2
|
Chip,
|
|
3
3
|
chipRecipe,
|
|
4
4
|
useChip
|
|
5
|
-
} from "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
5
|
+
} from "../../chunk-4YJLNYUS.js";
|
|
6
|
+
import "../../chunk-U3RDU3HU.js";
|
|
7
|
+
import "../../chunk-XNNJM5DQ.js";
|
|
8
8
|
import "../../chunk-423RQBOX.js";
|
|
9
|
-
import "../../chunk-3FV4COTM.js";
|
|
10
9
|
import "../../chunk-EGLLDKN6.js";
|
|
10
|
+
import "../../chunk-WJPQARJ5.js";
|
|
11
|
+
import "../../chunk-YXPYOOHU.js";
|
|
12
|
+
import "../../chunk-36PRYGAM.js";
|
|
11
13
|
import "../../chunk-4GTAZM2C.js";
|
|
14
|
+
import "../../chunk-MEYCZS32.js";
|
|
12
15
|
import "../../chunk-A3EGFI6T.js";
|
|
13
|
-
import "../../chunk-E2CWBQTV.js";
|
|
14
|
-
import "../../chunk-URSKA2VR.js";
|
|
15
16
|
import "../../chunk-GGW42MY4.js";
|
|
16
17
|
export {
|
|
17
18
|
Chip,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkVSALV7VOcjs = require('../../chunk-VSALV7VO.cjs');
|
|
5
|
+
require('../../chunk-54FJOKAN.cjs');
|
|
6
|
+
require('../../chunk-H4E4HDEP.cjs');
|
|
7
|
+
require('../../chunk-FNEUOBCV.cjs');
|
|
8
|
+
require('../../chunk-I6ZB3FZI.cjs');
|
|
9
|
+
require('../../chunk-57SJ4LJF.cjs');
|
|
10
|
+
require('../../chunk-MC7SY2QH.cjs');
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
exports.Divider = _chunkVSALV7VOcjs.Divider; exports.dividerRecipe = _chunkVSALV7VOcjs.dividerRecipe;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import * as react_native from 'react-native';
|
|
4
|
+
import { ViewProps, StyleProp, ViewStyle, View } from 'react-native';
|
|
5
|
+
import { V as ViewStyleProps } from '../../style-props.type-CfnoGEP7.cjs';
|
|
6
|
+
import { S as Size, X as XAUITheme } from '../../theme.type-C2gNHpEx.cjs';
|
|
7
|
+
import { R as Recipe, S as SlotStyles } from '../../create-recipe-dC7wMfnj.cjs';
|
|
8
|
+
|
|
9
|
+
type DividerSlot = 'root';
|
|
10
|
+
type DividerOrientation = 'horizontal' | 'vertical';
|
|
11
|
+
type DividerSize = Size;
|
|
12
|
+
/**
|
|
13
|
+
* What the `Divider` itself understands. R14 — a name in here is the component's, so the
|
|
14
|
+
* style prop that shares it is not exposed: `size` is the divider's scale and never
|
|
15
|
+
* `ViewStyle`'s, and `color` is R7's tint.
|
|
16
|
+
*
|
|
17
|
+
* **No `variant`**, and it is the only component in the core without one. A variant is the
|
|
18
|
+
* design system's *vocabulary* (§1 bis) — a name that means the same thing across the
|
|
19
|
+
* library. On a rule there is nothing for that name to describe: no fill against a
|
|
20
|
+
* foreground, no border against a surface, no intent to report. It had three values naming
|
|
21
|
+
* the three separator tokens, which is a shade of grey wearing a word. `size` says how
|
|
22
|
+
* heavy the rule is and `color` says what colour it is, in React Native's own values —
|
|
23
|
+
* between them there is nothing a third name would add.
|
|
24
|
+
*/
|
|
25
|
+
type DividerOwnProps = {
|
|
26
|
+
/**
|
|
27
|
+
* Which way the rule runs. A horizontal one stretches across its parent and a vertical
|
|
28
|
+
* one stretches down it, so the axis a divider does *not* run along is the one it takes
|
|
29
|
+
* from whatever contains it.
|
|
30
|
+
*/
|
|
31
|
+
orientation?: DividerOrientation;
|
|
32
|
+
/**
|
|
33
|
+
* The thickness — height when horizontal, width when vertical. It is `size` and not
|
|
34
|
+
* `thickness` because that is the vocabulary word (§1 bis), and it is consistent with
|
|
35
|
+
* the rest of the library rather than in spite of it: "`size` drives height, never
|
|
36
|
+
* width" is exactly what this does, on the axis the orientation names.
|
|
37
|
+
*
|
|
38
|
+
* `xs` is the hairline and it is the default, unlike everywhere else in the library.
|
|
39
|
+
* A rule you notice is a rule that is too thick.
|
|
40
|
+
*/
|
|
41
|
+
size?: DividerSize;
|
|
42
|
+
/**
|
|
43
|
+
* A raw tint (`'#7c3aed'`), never a token (R7). There is one thing to colour on a rule,
|
|
44
|
+
* so it lands on the rule.
|
|
45
|
+
*/
|
|
46
|
+
color?: string;
|
|
47
|
+
/**
|
|
48
|
+
* R12 — the child element becomes the rule and keeps its resolved style. What it is
|
|
49
|
+
* for here is the animated one: an `Animated.View` that collapses a section takes the
|
|
50
|
+
* thickness and the colour from the recipe and the height from a shared value.
|
|
51
|
+
*/
|
|
52
|
+
asChild?: boolean;
|
|
53
|
+
style?: StyleProp<ViewStyle>;
|
|
54
|
+
/** Only meaningful under `asChild`, where it is the element that becomes the rule. */
|
|
55
|
+
children?: ReactNode;
|
|
56
|
+
};
|
|
57
|
+
type DividerProps = Omit<ViewProps, 'style'> & DividerOwnProps & Omit<ViewStyleProps, keyof DividerOwnProps | keyof ViewProps>;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* The line between two things.
|
|
61
|
+
*
|
|
62
|
+
* ```tsx
|
|
63
|
+
* <Column gap={12}>
|
|
64
|
+
* <Row>…</Row>
|
|
65
|
+
* <Divider />
|
|
66
|
+
* <Row>…</Row>
|
|
67
|
+
* </Column>
|
|
68
|
+
*
|
|
69
|
+
* <Row gap={12}>
|
|
70
|
+
* <Typography>Brouillon</Typography>
|
|
71
|
+
* <Divider orientation="vertical" />
|
|
72
|
+
* <Typography>Il y a deux minutes</Typography>
|
|
73
|
+
* </Row>
|
|
74
|
+
* ```
|
|
75
|
+
*
|
|
76
|
+
* **One node and no slots.** A rule is a filled box one point thick; there is nothing
|
|
77
|
+
* inside it. A divider with a word in the middle of it is a `Row` holding two of these
|
|
78
|
+
* and a `Typography`, which is the composition the library already has — inventing a
|
|
79
|
+
* `Divider.Label` would put a layout inside a line.
|
|
80
|
+
*
|
|
81
|
+
* **It takes the axis it does not run along from its parent.** `alignSelf: 'stretch'` is
|
|
82
|
+
* the whole mechanism: in a `Column` that is full width, in a `Row` it is full height, and
|
|
83
|
+
* on the axis the thickness fixes it is ignored. So a divider needs no width prop, and a
|
|
84
|
+
* horizontal one written inside a `Row` collapses on purpose rather than guessing.
|
|
85
|
+
*/
|
|
86
|
+
declare const Divider: react.ForwardRefExoticComponent<Omit<react_native.ViewProps, "style"> & {
|
|
87
|
+
orientation?: DividerOrientation;
|
|
88
|
+
size?: DividerSize;
|
|
89
|
+
color?: string;
|
|
90
|
+
asChild?: boolean;
|
|
91
|
+
style?: react_native.StyleProp<react_native.ViewStyle>;
|
|
92
|
+
children?: react.ReactNode;
|
|
93
|
+
} & Omit<ViewStyleProps, "color" | "pointerEvents" | "style" | "children" | "hitSlop" | "id" | "needsOffscreenAlphaCompositing" | "onLayout" | "removeClippedSubviews" | "testID" | "nativeID" | "collapsable" | "collapsableChildren" | "onBlur" | "onFocus" | "renderToHardwareTextureAndroid" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-modal" | "role" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "screenReaderFocusable" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "accessibilityRespondsToUserInteraction" | "asChild" | "size" | "orientation"> & react.RefAttributes<View>>;
|
|
94
|
+
|
|
95
|
+
declare const dividerRecipe: Recipe<"root", "default", {
|
|
96
|
+
readonly size: {
|
|
97
|
+
readonly xs: (theme: XAUITheme) => SlotStyles<DividerSlot>;
|
|
98
|
+
readonly sm: (theme: XAUITheme) => SlotStyles<DividerSlot>;
|
|
99
|
+
readonly md: (theme: XAUITheme) => SlotStyles<DividerSlot>;
|
|
100
|
+
readonly lg: (theme: XAUITheme) => SlotStyles<DividerSlot>;
|
|
101
|
+
};
|
|
102
|
+
/** Second, so it releases the axis `size` had to write blind. */
|
|
103
|
+
readonly orientation: {
|
|
104
|
+
readonly horizontal: () => {
|
|
105
|
+
root: {
|
|
106
|
+
width: "auto";
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
readonly vertical: () => {
|
|
110
|
+
root: {
|
|
111
|
+
height: "auto";
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
}>;
|
|
116
|
+
|
|
117
|
+
export { Divider, type DividerOrientation, type DividerProps, type DividerSize, type DividerSlot, dividerRecipe };
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import * as react_native from 'react-native';
|
|
4
|
+
import { ViewProps, StyleProp, ViewStyle, View } from 'react-native';
|
|
5
|
+
import { V as ViewStyleProps } from '../../style-props.type-CfnoGEP7.js';
|
|
6
|
+
import { S as Size, X as XAUITheme } from '../../theme.type-C2gNHpEx.js';
|
|
7
|
+
import { R as Recipe, S as SlotStyles } from '../../create-recipe-BdVd2ffi.js';
|
|
8
|
+
|
|
9
|
+
type DividerSlot = 'root';
|
|
10
|
+
type DividerOrientation = 'horizontal' | 'vertical';
|
|
11
|
+
type DividerSize = Size;
|
|
12
|
+
/**
|
|
13
|
+
* What the `Divider` itself understands. R14 — a name in here is the component's, so the
|
|
14
|
+
* style prop that shares it is not exposed: `size` is the divider's scale and never
|
|
15
|
+
* `ViewStyle`'s, and `color` is R7's tint.
|
|
16
|
+
*
|
|
17
|
+
* **No `variant`**, and it is the only component in the core without one. A variant is the
|
|
18
|
+
* design system's *vocabulary* (§1 bis) — a name that means the same thing across the
|
|
19
|
+
* library. On a rule there is nothing for that name to describe: no fill against a
|
|
20
|
+
* foreground, no border against a surface, no intent to report. It had three values naming
|
|
21
|
+
* the three separator tokens, which is a shade of grey wearing a word. `size` says how
|
|
22
|
+
* heavy the rule is and `color` says what colour it is, in React Native's own values —
|
|
23
|
+
* between them there is nothing a third name would add.
|
|
24
|
+
*/
|
|
25
|
+
type DividerOwnProps = {
|
|
26
|
+
/**
|
|
27
|
+
* Which way the rule runs. A horizontal one stretches across its parent and a vertical
|
|
28
|
+
* one stretches down it, so the axis a divider does *not* run along is the one it takes
|
|
29
|
+
* from whatever contains it.
|
|
30
|
+
*/
|
|
31
|
+
orientation?: DividerOrientation;
|
|
32
|
+
/**
|
|
33
|
+
* The thickness — height when horizontal, width when vertical. It is `size` and not
|
|
34
|
+
* `thickness` because that is the vocabulary word (§1 bis), and it is consistent with
|
|
35
|
+
* the rest of the library rather than in spite of it: "`size` drives height, never
|
|
36
|
+
* width" is exactly what this does, on the axis the orientation names.
|
|
37
|
+
*
|
|
38
|
+
* `xs` is the hairline and it is the default, unlike everywhere else in the library.
|
|
39
|
+
* A rule you notice is a rule that is too thick.
|
|
40
|
+
*/
|
|
41
|
+
size?: DividerSize;
|
|
42
|
+
/**
|
|
43
|
+
* A raw tint (`'#7c3aed'`), never a token (R7). There is one thing to colour on a rule,
|
|
44
|
+
* so it lands on the rule.
|
|
45
|
+
*/
|
|
46
|
+
color?: string;
|
|
47
|
+
/**
|
|
48
|
+
* R12 — the child element becomes the rule and keeps its resolved style. What it is
|
|
49
|
+
* for here is the animated one: an `Animated.View` that collapses a section takes the
|
|
50
|
+
* thickness and the colour from the recipe and the height from a shared value.
|
|
51
|
+
*/
|
|
52
|
+
asChild?: boolean;
|
|
53
|
+
style?: StyleProp<ViewStyle>;
|
|
54
|
+
/** Only meaningful under `asChild`, where it is the element that becomes the rule. */
|
|
55
|
+
children?: ReactNode;
|
|
56
|
+
};
|
|
57
|
+
type DividerProps = Omit<ViewProps, 'style'> & DividerOwnProps & Omit<ViewStyleProps, keyof DividerOwnProps | keyof ViewProps>;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* The line between two things.
|
|
61
|
+
*
|
|
62
|
+
* ```tsx
|
|
63
|
+
* <Column gap={12}>
|
|
64
|
+
* <Row>…</Row>
|
|
65
|
+
* <Divider />
|
|
66
|
+
* <Row>…</Row>
|
|
67
|
+
* </Column>
|
|
68
|
+
*
|
|
69
|
+
* <Row gap={12}>
|
|
70
|
+
* <Typography>Brouillon</Typography>
|
|
71
|
+
* <Divider orientation="vertical" />
|
|
72
|
+
* <Typography>Il y a deux minutes</Typography>
|
|
73
|
+
* </Row>
|
|
74
|
+
* ```
|
|
75
|
+
*
|
|
76
|
+
* **One node and no slots.** A rule is a filled box one point thick; there is nothing
|
|
77
|
+
* inside it. A divider with a word in the middle of it is a `Row` holding two of these
|
|
78
|
+
* and a `Typography`, which is the composition the library already has — inventing a
|
|
79
|
+
* `Divider.Label` would put a layout inside a line.
|
|
80
|
+
*
|
|
81
|
+
* **It takes the axis it does not run along from its parent.** `alignSelf: 'stretch'` is
|
|
82
|
+
* the whole mechanism: in a `Column` that is full width, in a `Row` it is full height, and
|
|
83
|
+
* on the axis the thickness fixes it is ignored. So a divider needs no width prop, and a
|
|
84
|
+
* horizontal one written inside a `Row` collapses on purpose rather than guessing.
|
|
85
|
+
*/
|
|
86
|
+
declare const Divider: react.ForwardRefExoticComponent<Omit<react_native.ViewProps, "style"> & {
|
|
87
|
+
orientation?: DividerOrientation;
|
|
88
|
+
size?: DividerSize;
|
|
89
|
+
color?: string;
|
|
90
|
+
asChild?: boolean;
|
|
91
|
+
style?: react_native.StyleProp<react_native.ViewStyle>;
|
|
92
|
+
children?: react.ReactNode;
|
|
93
|
+
} & Omit<ViewStyleProps, "color" | "pointerEvents" | "style" | "children" | "hitSlop" | "id" | "needsOffscreenAlphaCompositing" | "onLayout" | "removeClippedSubviews" | "testID" | "nativeID" | "collapsable" | "collapsableChildren" | "onBlur" | "onFocus" | "renderToHardwareTextureAndroid" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-modal" | "role" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "screenReaderFocusable" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "accessibilityRespondsToUserInteraction" | "asChild" | "size" | "orientation"> & react.RefAttributes<View>>;
|
|
94
|
+
|
|
95
|
+
declare const dividerRecipe: Recipe<"root", "default", {
|
|
96
|
+
readonly size: {
|
|
97
|
+
readonly xs: (theme: XAUITheme) => SlotStyles<DividerSlot>;
|
|
98
|
+
readonly sm: (theme: XAUITheme) => SlotStyles<DividerSlot>;
|
|
99
|
+
readonly md: (theme: XAUITheme) => SlotStyles<DividerSlot>;
|
|
100
|
+
readonly lg: (theme: XAUITheme) => SlotStyles<DividerSlot>;
|
|
101
|
+
};
|
|
102
|
+
/** Second, so it releases the axis `size` had to write blind. */
|
|
103
|
+
readonly orientation: {
|
|
104
|
+
readonly horizontal: () => {
|
|
105
|
+
root: {
|
|
106
|
+
width: "auto";
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
readonly vertical: () => {
|
|
110
|
+
root: {
|
|
111
|
+
height: "auto";
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
}>;
|
|
116
|
+
|
|
117
|
+
export { Divider, type DividerOrientation, type DividerProps, type DividerSize, type DividerSlot, dividerRecipe };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Divider,
|
|
3
|
+
dividerRecipe
|
|
4
|
+
} from "../../chunk-JCYWU5TO.js";
|
|
5
|
+
import "../../chunk-YXPYOOHU.js";
|
|
6
|
+
import "../../chunk-36PRYGAM.js";
|
|
7
|
+
import "../../chunk-4GTAZM2C.js";
|
|
8
|
+
import "../../chunk-MEYCZS32.js";
|
|
9
|
+
import "../../chunk-A3EGFI6T.js";
|
|
10
|
+
import "../../chunk-GGW42MY4.js";
|
|
11
|
+
export {
|
|
12
|
+
Divider,
|
|
13
|
+
dividerRecipe
|
|
14
|
+
};
|
|
@@ -7,11 +7,12 @@
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkQ3D6KIVFcjs = require('../../chunk-Q3D6KIVF.cjs');
|
|
11
|
+
require('../../chunk-54FJOKAN.cjs');
|
|
12
|
+
require('../../chunk-H4E4HDEP.cjs');
|
|
11
13
|
require('../../chunk-FNEUOBCV.cjs');
|
|
14
|
+
require('../../chunk-I6ZB3FZI.cjs');
|
|
12
15
|
require('../../chunk-57SJ4LJF.cjs');
|
|
13
|
-
require('../../chunk-ZP2E2H2G.cjs');
|
|
14
|
-
require('../../chunk-GLGU2WFL.cjs');
|
|
15
16
|
require('../../chunk-MC7SY2QH.cjs');
|
|
16
17
|
|
|
17
18
|
|
|
@@ -22,4 +23,4 @@ require('../../chunk-MC7SY2QH.cjs');
|
|
|
22
23
|
|
|
23
24
|
|
|
24
25
|
|
|
25
|
-
exports.Input =
|
|
26
|
+
exports.Input = _chunkQ3D6KIVFcjs.Input; exports.InputDescription = _chunkQ3D6KIVFcjs.InputDescription; exports.InputError = _chunkQ3D6KIVFcjs.InputError; exports.InputField = _chunkQ3D6KIVFcjs.InputField; exports.InputLabel = _chunkQ3D6KIVFcjs.InputLabel; exports.InputRoot = _chunkQ3D6KIVFcjs.InputRoot; exports.inputRecipe = _chunkQ3D6KIVFcjs.inputRecipe; exports.useInput = _chunkQ3D6KIVFcjs.useInput;
|
|
@@ -7,11 +7,12 @@ import {
|
|
|
7
7
|
InputRoot,
|
|
8
8
|
inputRecipe,
|
|
9
9
|
useInput
|
|
10
|
-
} from "../../chunk-
|
|
10
|
+
} from "../../chunk-L55CDXNI.js";
|
|
11
|
+
import "../../chunk-YXPYOOHU.js";
|
|
12
|
+
import "../../chunk-36PRYGAM.js";
|
|
11
13
|
import "../../chunk-4GTAZM2C.js";
|
|
14
|
+
import "../../chunk-MEYCZS32.js";
|
|
12
15
|
import "../../chunk-A3EGFI6T.js";
|
|
13
|
-
import "../../chunk-E2CWBQTV.js";
|
|
14
|
-
import "../../chunk-URSKA2VR.js";
|
|
15
16
|
import "../../chunk-GGW42MY4.js";
|
|
16
17
|
export {
|
|
17
18
|
Input,
|
|
@@ -7,13 +7,14 @@
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
11
|
-
require('../../chunk-
|
|
12
|
-
require('../../chunk-
|
|
10
|
+
var _chunkTVCS5UOEcjs = require('../../chunk-TVCS5UOE.cjs');
|
|
11
|
+
require('../../chunk-Q3D6KIVF.cjs');
|
|
12
|
+
require('../../chunk-PCWT2YBE.cjs');
|
|
13
|
+
require('../../chunk-54FJOKAN.cjs');
|
|
14
|
+
require('../../chunk-H4E4HDEP.cjs');
|
|
13
15
|
require('../../chunk-FNEUOBCV.cjs');
|
|
16
|
+
require('../../chunk-I6ZB3FZI.cjs');
|
|
14
17
|
require('../../chunk-57SJ4LJF.cjs');
|
|
15
|
-
require('../../chunk-ZP2E2H2G.cjs');
|
|
16
|
-
require('../../chunk-GLGU2WFL.cjs');
|
|
17
18
|
require('../../chunk-MC7SY2QH.cjs');
|
|
18
19
|
|
|
19
20
|
|
|
@@ -24,4 +25,4 @@ require('../../chunk-MC7SY2QH.cjs');
|
|
|
24
25
|
|
|
25
26
|
|
|
26
27
|
|
|
27
|
-
exports.InputGroup =
|
|
28
|
+
exports.InputGroup = _chunkTVCS5UOEcjs.InputGroup; exports.InputGroupField = _chunkTVCS5UOEcjs.InputGroupField; exports.InputGroupIcon = _chunkTVCS5UOEcjs.InputGroupIcon; exports.InputGroupPrefix = _chunkTVCS5UOEcjs.InputGroupPrefix; exports.InputGroupRoot = _chunkTVCS5UOEcjs.InputGroupRoot; exports.InputGroupSuffix = _chunkTVCS5UOEcjs.InputGroupSuffix; exports.decoratorPadding = _chunkTVCS5UOEcjs.decoratorPadding; exports.useInputGroup = _chunkTVCS5UOEcjs.useInputGroup;
|
|
@@ -7,13 +7,14 @@ import {
|
|
|
7
7
|
InputGroupSuffix,
|
|
8
8
|
decoratorPadding,
|
|
9
9
|
useInputGroup
|
|
10
|
-
} from "../../chunk-
|
|
11
|
-
import "../../chunk-
|
|
12
|
-
import "../../chunk-
|
|
10
|
+
} from "../../chunk-MHEL3NAN.js";
|
|
11
|
+
import "../../chunk-L55CDXNI.js";
|
|
12
|
+
import "../../chunk-WJPQARJ5.js";
|
|
13
|
+
import "../../chunk-YXPYOOHU.js";
|
|
14
|
+
import "../../chunk-36PRYGAM.js";
|
|
13
15
|
import "../../chunk-4GTAZM2C.js";
|
|
16
|
+
import "../../chunk-MEYCZS32.js";
|
|
14
17
|
import "../../chunk-A3EGFI6T.js";
|
|
15
|
-
import "../../chunk-E2CWBQTV.js";
|
|
16
|
-
import "../../chunk-URSKA2VR.js";
|
|
17
18
|
import "../../chunk-GGW42MY4.js";
|
|
18
19
|
export {
|
|
19
20
|
InputGroup,
|
|
@@ -8,13 +8,14 @@
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkPBR44KVVcjs = require('../../chunk-PBR44KVV.cjs');
|
|
12
12
|
require('../../chunk-7EIHHOHP.cjs');
|
|
13
13
|
require('../../chunk-EJQCQPET.cjs');
|
|
14
|
+
require('../../chunk-54FJOKAN.cjs');
|
|
15
|
+
require('../../chunk-H4E4HDEP.cjs');
|
|
14
16
|
require('../../chunk-FNEUOBCV.cjs');
|
|
17
|
+
require('../../chunk-I6ZB3FZI.cjs');
|
|
15
18
|
require('../../chunk-57SJ4LJF.cjs');
|
|
16
|
-
require('../../chunk-ZP2E2H2G.cjs');
|
|
17
|
-
require('../../chunk-GLGU2WFL.cjs');
|
|
18
19
|
require('../../chunk-MC7SY2QH.cjs');
|
|
19
20
|
|
|
20
21
|
|
|
@@ -26,4 +27,4 @@ require('../../chunk-MC7SY2QH.cjs');
|
|
|
26
27
|
|
|
27
28
|
|
|
28
29
|
|
|
29
|
-
exports.InputOTP =
|
|
30
|
+
exports.InputOTP = _chunkPBR44KVVcjs.InputOTP; exports.OTP_ALPHANUMERIC = _chunkPBR44KVVcjs.OTP_ALPHANUMERIC; exports.OTP_DIGITS = _chunkPBR44KVVcjs.OTP_DIGITS; exports.OTP_LETTERS = _chunkPBR44KVVcjs.OTP_LETTERS; exports.buildSlots = _chunkPBR44KVVcjs.buildSlots; exports.extractPastedCode = _chunkPBR44KVVcjs.extractPastedCode; exports.inputOTPRecipe = _chunkPBR44KVVcjs.inputOTPRecipe; exports.useInputOTP = _chunkPBR44KVVcjs.useInputOTP; exports.useInputOTPBox = _chunkPBR44KVVcjs.useInputOTPBox;
|
|
@@ -8,13 +8,14 @@ import {
|
|
|
8
8
|
inputOTPRecipe,
|
|
9
9
|
useInputOTP,
|
|
10
10
|
useInputOTPBox
|
|
11
|
-
} from "../../chunk-
|
|
11
|
+
} from "../../chunk-SLUJFE6R.js";
|
|
12
12
|
import "../../chunk-F6W3JQ7K.js";
|
|
13
13
|
import "../../chunk-EGLLDKN6.js";
|
|
14
|
+
import "../../chunk-YXPYOOHU.js";
|
|
15
|
+
import "../../chunk-36PRYGAM.js";
|
|
14
16
|
import "../../chunk-4GTAZM2C.js";
|
|
17
|
+
import "../../chunk-MEYCZS32.js";
|
|
15
18
|
import "../../chunk-A3EGFI6T.js";
|
|
16
|
-
import "../../chunk-E2CWBQTV.js";
|
|
17
|
-
import "../../chunk-URSKA2VR.js";
|
|
18
19
|
import "../../chunk-GGW42MY4.js";
|
|
19
20
|
export {
|
|
20
21
|
InputOTP,
|
|
@@ -5,16 +5,17 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkMSMZBUZOcjs = require('../../chunk-MSMZBUZO.cjs');
|
|
9
9
|
require('../../chunk-F6CQ6CBI.cjs');
|
|
10
|
-
require('../../chunk-GPVNCJ3Z.cjs');
|
|
11
|
-
require('../../chunk-7DPL3ZDS.cjs');
|
|
12
10
|
require('../../chunk-7EIHHOHP.cjs');
|
|
11
|
+
require('../../chunk-6M7RUU7V.cjs');
|
|
12
|
+
require('../../chunk-7DPL3ZDS.cjs');
|
|
13
13
|
require('../../chunk-EJQCQPET.cjs');
|
|
14
|
+
require('../../chunk-54FJOKAN.cjs');
|
|
15
|
+
require('../../chunk-H4E4HDEP.cjs');
|
|
14
16
|
require('../../chunk-FNEUOBCV.cjs');
|
|
17
|
+
require('../../chunk-I6ZB3FZI.cjs');
|
|
15
18
|
require('../../chunk-57SJ4LJF.cjs');
|
|
16
|
-
require('../../chunk-ZP2E2H2G.cjs');
|
|
17
|
-
require('../../chunk-GLGU2WFL.cjs');
|
|
18
19
|
require('../../chunk-MC7SY2QH.cjs');
|
|
19
20
|
|
|
20
21
|
|
|
@@ -23,4 +24,4 @@ require('../../chunk-MC7SY2QH.cjs');
|
|
|
23
24
|
|
|
24
25
|
|
|
25
26
|
|
|
26
|
-
exports.Radio =
|
|
27
|
+
exports.Radio = _chunkMSMZBUZOcjs.Radio; exports.RadioIndicator = _chunkMSMZBUZOcjs.RadioIndicator; exports.RadioLabel = _chunkMSMZBUZOcjs.RadioLabel; exports.RadioRoot = _chunkMSMZBUZOcjs.RadioRoot; exports.radioRecipe = _chunkMSMZBUZOcjs.radioRecipe; exports.useRadio = _chunkMSMZBUZOcjs.useRadio;
|
|
@@ -5,16 +5,17 @@ import {
|
|
|
5
5
|
RadioRoot,
|
|
6
6
|
radioRecipe,
|
|
7
7
|
useRadio
|
|
8
|
-
} from "../../chunk-
|
|
8
|
+
} from "../../chunk-NFFL3E4N.js";
|
|
9
9
|
import "../../chunk-BA2DBSAN.js";
|
|
10
|
-
import "../../chunk-BFMTUMTU.js";
|
|
11
|
-
import "../../chunk-423RQBOX.js";
|
|
12
10
|
import "../../chunk-F6W3JQ7K.js";
|
|
11
|
+
import "../../chunk-XNNJM5DQ.js";
|
|
12
|
+
import "../../chunk-423RQBOX.js";
|
|
13
13
|
import "../../chunk-EGLLDKN6.js";
|
|
14
|
+
import "../../chunk-YXPYOOHU.js";
|
|
15
|
+
import "../../chunk-36PRYGAM.js";
|
|
14
16
|
import "../../chunk-4GTAZM2C.js";
|
|
17
|
+
import "../../chunk-MEYCZS32.js";
|
|
15
18
|
import "../../chunk-A3EGFI6T.js";
|
|
16
|
-
import "../../chunk-E2CWBQTV.js";
|
|
17
|
-
import "../../chunk-URSKA2VR.js";
|
|
18
19
|
import "../../chunk-GGW42MY4.js";
|
|
19
20
|
export {
|
|
20
21
|
Radio,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkLT6XHFXJcjs = require('../../chunk-LT6XHFXJ.cjs');
|
|
5
|
+
require('../../chunk-FNEUOBCV.cjs');
|
|
6
|
+
require('../../chunk-I6ZB3FZI.cjs');
|
|
7
|
+
require('../../chunk-57SJ4LJF.cjs');
|
|
8
|
+
require('../../chunk-MC7SY2QH.cjs');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
exports.Skeleton = _chunkLT6XHFXJcjs.Skeleton; exports.skeletonRecipe = _chunkLT6XHFXJcjs.skeletonRecipe;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { ViewProps, StyleProp, ViewStyle, View } from 'react-native';
|
|
4
|
+
import { V as ViewStyleProps } from '../../style-props.type-CfnoGEP7.cjs';
|
|
5
|
+
import { R as RadiusKey } from '../../theme.type-C2gNHpEx.cjs';
|
|
6
|
+
import { R as Recipe, a as StyleFn } from '../../create-recipe-dC7wMfnj.cjs';
|
|
7
|
+
|
|
8
|
+
type SkeletonSlot = 'root';
|
|
9
|
+
/**
|
|
10
|
+
* Two levels, and they are the two backgrounds a placeholder is ever drawn on (§1 bis).
|
|
11
|
+
*
|
|
12
|
+
* A skeleton **reports nothing** and **is not pressed**, so the status families are absent
|
|
13
|
+
* the way they are from the `Card`, and so is `primary` — a placeholder in the accent
|
|
14
|
+
* announces the brand where there is nothing yet to announce.
|
|
15
|
+
*
|
|
16
|
+
* - **`default`** — the `default` fill. A block on the page.
|
|
17
|
+
* - **`secondary`** — `defaultSoft`, the same fill at half. A block on a `Card` or any
|
|
18
|
+
* other surface already carrying a neutral, where the full one reads as a hole.
|
|
19
|
+
*
|
|
20
|
+
* **No `tertiary` and no `ghost`**: a skeleton with a border and no fill is an empty box,
|
|
21
|
+
* and a skeleton with neither is nothing at all. Both are the shape of the component being
|
|
22
|
+
* a fill and only a fill.
|
|
23
|
+
*/
|
|
24
|
+
type SkeletonVariant = 'default' | 'secondary';
|
|
25
|
+
/**
|
|
26
|
+
* What the `Skeleton` itself understands. R14 — a name in here is the component's, so the
|
|
27
|
+
* style prop that shares it is not exposed: `color` is R7's tint.
|
|
28
|
+
*
|
|
29
|
+
* **No `asChild`** (R12), because `children` is already taken and means the opposite of
|
|
30
|
+
* what the prop would need it to. Here it is the content the block stands in for — what
|
|
31
|
+
* renders once `isLoading` is `false` — while `asChild` hands `Slot` an element to merge
|
|
32
|
+
* the block's own styles into. One `children` with two meanings, disambiguated by a second
|
|
33
|
+
* prop, is the kind of API this library exists not to ship. Styling is the escape hatch
|
|
34
|
+
* instead, and R14 gives every `ViewStyle` key as a prop.
|
|
35
|
+
*/
|
|
36
|
+
type SkeletonOwnProps = {
|
|
37
|
+
variant?: SkeletonVariant;
|
|
38
|
+
/**
|
|
39
|
+
* The corner. `full` is the circle an avatar placeholder needs, and it is why this is a
|
|
40
|
+
* prop rather than the caller's `borderRadius` — a circle is a shape the vocabulary
|
|
41
|
+
* names, and it has to survive a theme redrawing every corner in the library.
|
|
42
|
+
*/
|
|
43
|
+
radius?: RadiusKey;
|
|
44
|
+
/**
|
|
45
|
+
* A raw tint (`'#7c3aed'`), never a token (R7). There is one thing to colour on a block,
|
|
46
|
+
* so it lands on the block.
|
|
47
|
+
*/
|
|
48
|
+
color?: string;
|
|
49
|
+
/**
|
|
50
|
+
* `false` swaps the block for `children`. It is the prop that makes the component a
|
|
51
|
+
* gate rather than a shape you mount and unmount around your own content:
|
|
52
|
+
*
|
|
53
|
+
* ```tsx
|
|
54
|
+
* <Skeleton isLoading={!user} height={20} width={140}>
|
|
55
|
+
* <Typography>{user?.name}</Typography>
|
|
56
|
+
* </Skeleton>
|
|
57
|
+
* ```
|
|
58
|
+
*
|
|
59
|
+
* @default true
|
|
60
|
+
*/
|
|
61
|
+
isLoading?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* `false` freezes the block at full opacity and mounts no worklet.
|
|
64
|
+
*
|
|
65
|
+
* A boolean rather than HeroUI's `'shimmer' | 'pulse' | 'none'`: a shimmer is a
|
|
66
|
+
* gradient sweeping across the block, a gradient needs `react-native-svg`, and that is
|
|
67
|
+
* an optional peer a component in the core cannot require. One animation, so there is
|
|
68
|
+
* nothing for a name to choose between.
|
|
69
|
+
*/
|
|
70
|
+
animation?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* What the block stands in for, rendered once `isLoading` is `false`. A skeleton with no
|
|
73
|
+
* children is a block that never resolves, which is the right thing for a placeholder
|
|
74
|
+
* whose content is mounted elsewhere.
|
|
75
|
+
*/
|
|
76
|
+
children?: ReactNode;
|
|
77
|
+
style?: StyleProp<ViewStyle>;
|
|
78
|
+
};
|
|
79
|
+
type SkeletonProps = Omit<ViewProps, 'style'> & SkeletonOwnProps & Omit<ViewStyleProps, keyof SkeletonOwnProps | keyof ViewProps>;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* The shape of what has not arrived yet.
|
|
83
|
+
*
|
|
84
|
+
* ```tsx
|
|
85
|
+
* <Skeleton width={140} height={20} />
|
|
86
|
+
* <Skeleton width={48} height={48} radius="full" />
|
|
87
|
+
*
|
|
88
|
+
* <Skeleton isLoading={!user} height={20} width={140}>
|
|
89
|
+
* <Typography>{user?.name}</Typography>
|
|
90
|
+
* </Skeleton>
|
|
91
|
+
* ```
|
|
92
|
+
*
|
|
93
|
+
* **One node and no slots.** A placeholder is a rectangle; there is nothing inside it to
|
|
94
|
+
* name. A paragraph of them is three of these in a `Column`, which is composition doing
|
|
95
|
+
* what a `lines={3}` prop would otherwise hard-code — including the last line being
|
|
96
|
+
* shorter, which is the only reason the paragraph reads as a paragraph.
|
|
97
|
+
*
|
|
98
|
+
* **It has no `size`, and that is the design.** Only the caller knows the shape of the
|
|
99
|
+
* thing that is missing, so R14's `width` and `height` are the whole sizing API — full
|
|
100
|
+
* React Native names and values, `width="60%"` as readily as `width={140}`. A `size`
|
|
101
|
+
* token here would be a scale of rectangles nobody's content happens to be.
|
|
102
|
+
*
|
|
103
|
+
* **`isLoading={false}` renders `children`**, which is what makes it a gate rather than a
|
|
104
|
+
* shape you mount and unmount around your own content.
|
|
105
|
+
*/
|
|
106
|
+
declare const Skeleton: react.ForwardRefExoticComponent<Omit<ViewProps, "style"> & {
|
|
107
|
+
variant?: SkeletonVariant;
|
|
108
|
+
radius?: RadiusKey;
|
|
109
|
+
color?: string;
|
|
110
|
+
isLoading?: boolean;
|
|
111
|
+
animation?: boolean;
|
|
112
|
+
children?: react.ReactNode;
|
|
113
|
+
style?: StyleProp<ViewStyle>;
|
|
114
|
+
} & Omit<ViewStyleProps, "color" | "pointerEvents" | "style" | "children" | "hitSlop" | "id" | "needsOffscreenAlphaCompositing" | "onLayout" | "removeClippedSubviews" | "testID" | "nativeID" | "collapsable" | "collapsableChildren" | "onBlur" | "onFocus" | "renderToHardwareTextureAndroid" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-modal" | "role" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "screenReaderFocusable" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "accessibilityRespondsToUserInteraction" | "animation" | "radius" | "variant" | "isLoading"> & react.RefAttributes<View>>;
|
|
115
|
+
|
|
116
|
+
declare const skeletonRecipe: Recipe<"root", SkeletonVariant, {
|
|
117
|
+
readonly radius: Record<RadiusKey, StyleFn<"root">>;
|
|
118
|
+
}>;
|
|
119
|
+
|
|
120
|
+
export { Skeleton, type SkeletonProps, type SkeletonSlot, type SkeletonVariant, skeletonRecipe };
|