@xaui/native 0.9.1-alpha.3 → 0.9.1-alpha.31
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-3FV4COTM.js +68 -0
- package/dist/chunk-423RQBOX.js +21 -0
- package/dist/chunk-42FMGB5M.js +661 -0
- package/dist/chunk-4GTAZM2C.js +174 -0
- package/dist/chunk-4XPLPQLM.cjs +147 -0
- package/dist/{chunk-3QBT3Q65.cjs → chunk-57SJ4LJF.cjs} +7 -2
- package/dist/chunk-5GO7MAVY.cjs +74 -0
- package/dist/chunk-5PTBRJM7.cjs +346 -0
- package/dist/chunk-5RQ7AZPN.cjs +455 -0
- package/dist/chunk-5Z4P6WHR.cjs +525 -0
- package/dist/chunk-7DPL3ZDS.cjs +21 -0
- package/dist/chunk-7EIHHOHP.cjs +42 -0
- package/dist/chunk-7SEZGVTY.js +62 -0
- package/dist/chunk-7XKQJQF2.cjs +70 -0
- package/dist/{chunk-X2K2FX3W.js → chunk-A3EGFI6T.js} +6 -1
- package/dist/chunk-A5OCK3C2.js +525 -0
- package/dist/chunk-AETWQQWU.cjs +92 -0
- package/dist/chunk-ANNUYP55.cjs +431 -0
- package/dist/chunk-BA2DBSAN.js +102 -0
- package/dist/chunk-BFMTUMTU.js +669 -0
- package/dist/chunk-BVJQ3UPZ.js +62 -0
- package/dist/chunk-DFME724B.js +147 -0
- package/dist/chunk-E2CWBQTV.js +119 -0
- package/dist/chunk-EGLLDKN6.js +9 -0
- package/dist/chunk-EJQCQPET.cjs +9 -0
- package/dist/chunk-F6CQ6CBI.cjs +112 -0
- package/dist/chunk-F6W3JQ7K.js +42 -0
- package/dist/chunk-FNEUOBCV.cjs +174 -0
- package/dist/chunk-G7K652GC.js +145 -0
- package/dist/chunk-GGW42MY4.js +20 -0
- package/dist/chunk-GLGU2WFL.cjs +190 -0
- package/dist/chunk-GPVNCJ3Z.cjs +696 -0
- package/dist/chunk-GVQOD3VW.js +74 -0
- package/dist/chunk-IHOCANCQ.js +293 -0
- package/dist/chunk-JDFV4W6N.cjs +700 -0
- package/dist/chunk-KOC3KQIT.js +124 -0
- package/dist/chunk-KPWZLUES.cjs +124 -0
- package/dist/chunk-L7JN6OBQ.cjs +314 -0
- package/dist/chunk-MC7SY2QH.cjs +20 -0
- package/dist/chunk-MDVSCWJI.js +314 -0
- package/dist/chunk-N527BTY4.cjs +366 -0
- package/dist/chunk-NYRXUGVL.js +104 -0
- package/dist/{chunk-AW63PTQ4.cjs → chunk-OHEHPQLC.cjs} +72 -72
- package/dist/chunk-Q3WFY5N3.js +366 -0
- package/dist/chunk-QGN2BBJO.cjs +104 -0
- package/dist/chunk-RDTKAAHX.js +346 -0
- package/dist/chunk-TGZZ3RZU.cjs +86 -0
- package/dist/{chunk-2KXQATVL.js → chunk-TZG3DERP.js} +46 -46
- package/dist/chunk-URSKA2VR.js +190 -0
- package/dist/chunk-V4WDMM6Z.js +86 -0
- package/dist/chunk-VJEER76X.js +455 -0
- package/dist/chunk-VZBWYWEI.cjs +736 -0
- package/dist/chunk-WR7YLDVV.cjs +68 -0
- package/dist/chunk-X4HQ4H2V.js +701 -0
- package/dist/chunk-XFSW3ZNI.cjs +145 -0
- package/dist/chunk-XQFAUDR2.cjs +62 -0
- package/dist/chunk-ZH5XVNHG.js +92 -0
- package/dist/chunk-ZH6BHLQR.js +431 -0
- package/dist/chunk-ZP2E2H2G.cjs +119 -0
- package/dist/chunk-ZVWXM3UK.cjs +293 -0
- package/dist/close-button.type-BUYuoSt2.d.ts +36 -0
- package/dist/close-button.type-CHsgZ3wO.d.cts +36 -0
- package/dist/components/alert/index.cjs +20 -0
- package/dist/components/alert/index.d.cts +169 -0
- package/dist/components/alert/index.d.ts +169 -0
- package/dist/components/alert/index.js +20 -0
- package/dist/components/button/index.cjs +21 -0
- package/dist/components/button/index.d.cts +613 -0
- package/dist/components/button/index.d.ts +613 -0
- package/dist/components/button/index.js +21 -0
- package/dist/components/card/index.cjs +22 -0
- package/dist/components/card/index.d.cts +620 -0
- package/dist/components/card/index.d.ts +620 -0
- package/dist/components/card/index.js +22 -0
- package/dist/components/checkbox/index.cjs +26 -0
- package/dist/components/checkbox/index.d.cts +1136 -0
- package/dist/components/checkbox/index.d.ts +1136 -0
- package/dist/components/checkbox/index.js +26 -0
- package/dist/components/chip/index.cjs +20 -0
- package/dist/components/chip/index.d.cts +608 -0
- package/dist/components/chip/index.d.ts +608 -0
- package/dist/components/chip/index.js +20 -0
- package/dist/components/divider/index.cjs +13 -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 +13 -0
- package/dist/components/input/index.cjs +25 -0
- package/dist/components/input/index.d.cts +205 -0
- package/dist/components/input/index.d.ts +205 -0
- package/dist/components/input/index.js +25 -0
- package/dist/components/input-group/index.cjs +27 -0
- package/dist/components/input-group/index.d.cts +270 -0
- package/dist/components/input-group/index.d.ts +270 -0
- package/dist/components/input-group/index.js +27 -0
- package/dist/components/input-otp/index.cjs +29 -0
- package/dist/components/input-otp/index.d.cts +325 -0
- package/dist/components/input-otp/index.d.ts +325 -0
- package/dist/components/input-otp/index.js +29 -0
- package/dist/components/radio/index.cjs +26 -0
- package/dist/components/radio/index.d.cts +1102 -0
- package/dist/components/radio/index.d.ts +1102 -0
- package/dist/components/radio/index.js +26 -0
- package/dist/components/spinner/index.cjs +16 -0
- package/dist/components/spinner/index.d.cts +104 -0
- package/dist/components/spinner/index.d.ts +104 -0
- package/dist/components/spinner/index.js +16 -0
- package/dist/components/switch/index.cjs +27 -0
- package/dist/components/switch/index.d.cts +1154 -0
- package/dist/components/switch/index.d.ts +1154 -0
- package/dist/components/switch/index.js +27 -0
- package/dist/components/text-area/index.cjs +14 -0
- package/dist/components/text-area/index.d.cts +73 -0
- package/dist/components/text-area/index.d.ts +73 -0
- package/dist/components/text-area/index.js +14 -0
- package/dist/components/typography/index.cjs +15 -0
- package/dist/components/typography/index.d.cts +116 -0
- package/dist/components/typography/index.d.ts +116 -0
- package/dist/components/typography/index.js +15 -0
- package/dist/components/view/index.cjs +17 -0
- package/dist/components/view/index.d.cts +152 -0
- package/dist/components/view/index.d.ts +152 -0
- package/dist/components/view/index.js +17 -0
- package/dist/create-recipe-BdVd2ffi.d.ts +114 -0
- package/dist/create-recipe-dC7wMfnj.d.cts +114 -0
- package/dist/icon.type-Kml72iSz.d.ts +73 -0
- package/dist/icon.type-d_i9ma-i.d.cts +73 -0
- package/dist/index.cjs +252 -4
- package/dist/index.d.cts +110 -4
- package/dist/index.d.ts +110 -4
- package/dist/index.js +271 -23
- package/dist/input.type-BUMDlzL9.d.cts +167 -0
- package/dist/input.type-D2qgi03E.d.ts +167 -0
- package/dist/pressable-feedback.type-BA2C9sSz.d.cts +127 -0
- package/dist/pressable-feedback.type-Bs4dQlGj.d.ts +127 -0
- package/dist/style-props.type-CfnoGEP7.d.cts +31 -0
- package/dist/style-props.type-CfnoGEP7.d.ts +31 -0
- package/dist/system/index.cjs +60 -3
- package/dist/system/index.d.cts +347 -181
- package/dist/system/index.d.ts +347 -181
- package/dist/system/index.js +71 -14
- package/dist/theme/index.cjs +4 -3
- package/dist/theme/index.d.cts +34 -23
- package/dist/theme/index.d.ts +34 -23
- package/dist/theme/index.js +3 -2
- package/dist/{theme.type-C9bFJKFm.d.cts → theme.type-C2gNHpEx.d.cts} +1 -1
- package/dist/{theme.type-C9bFJKFm.d.ts → theme.type-C2gNHpEx.d.ts} +1 -1
- package/package.json +184 -18
- package/dist/chunk-QAMNNTGM.js +0 -637
- package/dist/chunk-V63JO65F.cjs +0 -637
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Radio,
|
|
3
|
+
RadioIndicator,
|
|
4
|
+
RadioLabel,
|
|
5
|
+
RadioRoot,
|
|
6
|
+
radioRecipe,
|
|
7
|
+
useRadio
|
|
8
|
+
} from "../../chunk-IHOCANCQ.js";
|
|
9
|
+
import "../../chunk-BA2DBSAN.js";
|
|
10
|
+
import "../../chunk-F6W3JQ7K.js";
|
|
11
|
+
import "../../chunk-BFMTUMTU.js";
|
|
12
|
+
import "../../chunk-423RQBOX.js";
|
|
13
|
+
import "../../chunk-EGLLDKN6.js";
|
|
14
|
+
import "../../chunk-4GTAZM2C.js";
|
|
15
|
+
import "../../chunk-A3EGFI6T.js";
|
|
16
|
+
import "../../chunk-E2CWBQTV.js";
|
|
17
|
+
import "../../chunk-URSKA2VR.js";
|
|
18
|
+
import "../../chunk-GGW42MY4.js";
|
|
19
|
+
export {
|
|
20
|
+
Radio,
|
|
21
|
+
RadioIndicator,
|
|
22
|
+
RadioLabel,
|
|
23
|
+
RadioRoot,
|
|
24
|
+
radioRecipe,
|
|
25
|
+
useRadio
|
|
26
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkKPWZLUEScjs = require('../../chunk-KPWZLUES.cjs');
|
|
5
|
+
require('../../chunk-7XKQJQF2.cjs');
|
|
6
|
+
require('../../chunk-7EIHHOHP.cjs');
|
|
7
|
+
require('../../chunk-7DPL3ZDS.cjs');
|
|
8
|
+
require('../../chunk-EJQCQPET.cjs');
|
|
9
|
+
require('../../chunk-FNEUOBCV.cjs');
|
|
10
|
+
require('../../chunk-57SJ4LJF.cjs');
|
|
11
|
+
require('../../chunk-GLGU2WFL.cjs');
|
|
12
|
+
require('../../chunk-MC7SY2QH.cjs');
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
exports.Spinner = _chunkKPWZLUEScjs.Spinner; exports.spinnerRecipe = _chunkKPWZLUEScjs.spinnerRecipe;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import * as react_native from 'react-native';
|
|
3
|
+
import { ViewProps, StyleProp, ViewStyle, View } from 'react-native';
|
|
4
|
+
import { V as ViewStyleProps } from '../../style-props.type-CfnoGEP7.cjs';
|
|
5
|
+
import { S as Size, X as XAUITheme } from '../../theme.type-C2gNHpEx.cjs';
|
|
6
|
+
import { R as Recipe, S as SlotStyles } from '../../create-recipe-dC7wMfnj.cjs';
|
|
7
|
+
|
|
8
|
+
type SpinnerSlot = 'root' | 'arc';
|
|
9
|
+
/**
|
|
10
|
+
* Seven names, and each one is **an ink** — a spinner has no fill for a variant to paint.
|
|
11
|
+
*
|
|
12
|
+
* That is what makes this a narrowing of §1 bis rather than a second vocabulary. On a
|
|
13
|
+
* `Chip`, `fg` means "the colour that reads *on* this variant's surface", which is why
|
|
14
|
+
* `primary` resolves to `accentForeground` — white. A spinner has no surface, so here a
|
|
15
|
+
* variant names the colour of the thing itself:
|
|
16
|
+
*
|
|
17
|
+
* - **`primary`** — `accent`. The brand, waiting.
|
|
18
|
+
* - **`secondary`** — the accent as it reads on the page rather than on a fill.
|
|
19
|
+
* - **`default`** — `foreground`. A spinner beside text, in the text's own ink.
|
|
20
|
+
* - **`tertiary`** — `muted`. The quiet one, for a refresh nobody is waiting on.
|
|
21
|
+
* - **`success` / `warning` / `danger`** — the three status families, for the wait whose
|
|
22
|
+
* outcome is already named: deleting is a `danger` wait.
|
|
23
|
+
*
|
|
24
|
+
* **No `ghost`**, because a spinner with no ink is not a spinner, and **no `-soft`
|
|
25
|
+
* slices**, because a soft slice is a fill softened and there is no fill here. Both are
|
|
26
|
+
* absences with a reason, which is the test §1 bis sets for narrowing the union.
|
|
27
|
+
*/
|
|
28
|
+
type SpinnerVariant = 'primary' | 'secondary' | 'default' | 'tertiary' | 'success' | 'warning' | 'danger';
|
|
29
|
+
type SpinnerSize = Size;
|
|
30
|
+
/**
|
|
31
|
+
* What the `Spinner` itself understands. R14 — a name in here is the component's, so the
|
|
32
|
+
* style prop that shares it is not exposed: `size` is the spinner's scale and never
|
|
33
|
+
* `ViewStyle`'s, and `color` is R7's tint.
|
|
34
|
+
*
|
|
35
|
+
* **No `asChild`**, and this is the one root in the library without one (R12). `Slot`
|
|
36
|
+
* merges a root's props into a single element, and that element keeps its own children —
|
|
37
|
+
* so a caller's element could become the track, but the arc is a second node it has no way
|
|
38
|
+
* to receive. Handing over the track alone would render a ring that never turns, silently.
|
|
39
|
+
* Styling is the escape hatch instead, and R14 gives every `ViewStyle` key as a prop.
|
|
40
|
+
*/
|
|
41
|
+
type SpinnerOwnProps = {
|
|
42
|
+
variant?: SpinnerVariant;
|
|
43
|
+
/** The diameter, and the thickness that goes with it. */
|
|
44
|
+
size?: SpinnerSize;
|
|
45
|
+
/**
|
|
46
|
+
* A raw tint (`'#7c3aed'`), never a token (R7). There is one thing to colour on a
|
|
47
|
+
* spinner, so it lands on the ring — and on the track behind it, at the same fraction
|
|
48
|
+
* the variant's own ink is faded to.
|
|
49
|
+
*/
|
|
50
|
+
color?: string;
|
|
51
|
+
/**
|
|
52
|
+
* `false` stops the rotation and mounts no worklet. The ring stays, so a list of rows
|
|
53
|
+
* switched off with `animation={false}` does not change height.
|
|
54
|
+
*
|
|
55
|
+
* A boolean rather than the `AnimationProp` union `PressableFeedback` takes: there is
|
|
56
|
+
* one animation here, so there is nothing for an object to switch off one at a time.
|
|
57
|
+
*/
|
|
58
|
+
animation?: boolean;
|
|
59
|
+
style?: StyleProp<ViewStyle>;
|
|
60
|
+
};
|
|
61
|
+
type SpinnerProps = Omit<ViewProps, 'style'> & SpinnerOwnProps & Omit<ViewStyleProps, keyof SpinnerOwnProps | keyof ViewProps>;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* The wait, drawn.
|
|
65
|
+
*
|
|
66
|
+
* ```tsx
|
|
67
|
+
* <Spinner />
|
|
68
|
+
* <Spinner variant="danger" size="sm" />
|
|
69
|
+
* <Spinner color="#7c3aed" accessibilityLabel="Chargement des projets" />
|
|
70
|
+
* ```
|
|
71
|
+
*
|
|
72
|
+
* **Two rings and no slots.** The root is the track — the full circle, in the variant's
|
|
73
|
+
* ink at a fraction of its opacity — and its one child is the arc that turns over it,
|
|
74
|
+
* the same circle with a quarter missing. There is nothing between them for a slot to
|
|
75
|
+
* name, and the two are one figure rather than two parts.
|
|
76
|
+
*
|
|
77
|
+
* It is HeroUI's spinner drawn with borders instead of a gradient stroke. Theirs fades a
|
|
78
|
+
* single arc from opaque to 55%, which needs an SVG `linearGradient` and therefore
|
|
79
|
+
* `react-native-svg` — an optional peer, which a component in the fifteen-component core
|
|
80
|
+
* cannot require. Two circles of one ink at two opacities read as the same figure and
|
|
81
|
+
* cost two views.
|
|
82
|
+
*
|
|
83
|
+
* **`size` is the diameter**, and the only measurement a circle has. A spinner that filled
|
|
84
|
+
* its parent would be a progress bar, so R14's `width` is available and deliberately not
|
|
85
|
+
* what `size` means.
|
|
86
|
+
*/
|
|
87
|
+
declare const Spinner: react.ForwardRefExoticComponent<Omit<react_native.ViewProps, "style"> & {
|
|
88
|
+
variant?: SpinnerVariant;
|
|
89
|
+
size?: SpinnerSize;
|
|
90
|
+
color?: string;
|
|
91
|
+
animation?: boolean;
|
|
92
|
+
style?: StyleProp<ViewStyle>;
|
|
93
|
+
} & Omit<ViewStyleProps, "variant" | "size" | "color" | "style" | "children" | "hitSlop" | "id" | "needsOffscreenAlphaCompositing" | "onLayout" | "pointerEvents" | "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"> & react.RefAttributes<View>>;
|
|
94
|
+
|
|
95
|
+
declare const spinnerRecipe: Recipe<"root" | "arc", SpinnerVariant, {
|
|
96
|
+
readonly size: {
|
|
97
|
+
readonly xs: (theme: XAUITheme) => SlotStyles<SpinnerSlot>;
|
|
98
|
+
readonly sm: (theme: XAUITheme) => SlotStyles<SpinnerSlot>;
|
|
99
|
+
readonly md: (theme: XAUITheme) => SlotStyles<SpinnerSlot>;
|
|
100
|
+
readonly lg: (theme: XAUITheme) => SlotStyles<SpinnerSlot>;
|
|
101
|
+
};
|
|
102
|
+
}>;
|
|
103
|
+
|
|
104
|
+
export { Spinner, type SpinnerProps, type SpinnerSize, type SpinnerSlot, type SpinnerVariant, spinnerRecipe };
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import * as react_native from 'react-native';
|
|
3
|
+
import { ViewProps, StyleProp, ViewStyle, View } from 'react-native';
|
|
4
|
+
import { V as ViewStyleProps } from '../../style-props.type-CfnoGEP7.js';
|
|
5
|
+
import { S as Size, X as XAUITheme } from '../../theme.type-C2gNHpEx.js';
|
|
6
|
+
import { R as Recipe, S as SlotStyles } from '../../create-recipe-BdVd2ffi.js';
|
|
7
|
+
|
|
8
|
+
type SpinnerSlot = 'root' | 'arc';
|
|
9
|
+
/**
|
|
10
|
+
* Seven names, and each one is **an ink** — a spinner has no fill for a variant to paint.
|
|
11
|
+
*
|
|
12
|
+
* That is what makes this a narrowing of §1 bis rather than a second vocabulary. On a
|
|
13
|
+
* `Chip`, `fg` means "the colour that reads *on* this variant's surface", which is why
|
|
14
|
+
* `primary` resolves to `accentForeground` — white. A spinner has no surface, so here a
|
|
15
|
+
* variant names the colour of the thing itself:
|
|
16
|
+
*
|
|
17
|
+
* - **`primary`** — `accent`. The brand, waiting.
|
|
18
|
+
* - **`secondary`** — the accent as it reads on the page rather than on a fill.
|
|
19
|
+
* - **`default`** — `foreground`. A spinner beside text, in the text's own ink.
|
|
20
|
+
* - **`tertiary`** — `muted`. The quiet one, for a refresh nobody is waiting on.
|
|
21
|
+
* - **`success` / `warning` / `danger`** — the three status families, for the wait whose
|
|
22
|
+
* outcome is already named: deleting is a `danger` wait.
|
|
23
|
+
*
|
|
24
|
+
* **No `ghost`**, because a spinner with no ink is not a spinner, and **no `-soft`
|
|
25
|
+
* slices**, because a soft slice is a fill softened and there is no fill here. Both are
|
|
26
|
+
* absences with a reason, which is the test §1 bis sets for narrowing the union.
|
|
27
|
+
*/
|
|
28
|
+
type SpinnerVariant = 'primary' | 'secondary' | 'default' | 'tertiary' | 'success' | 'warning' | 'danger';
|
|
29
|
+
type SpinnerSize = Size;
|
|
30
|
+
/**
|
|
31
|
+
* What the `Spinner` itself understands. R14 — a name in here is the component's, so the
|
|
32
|
+
* style prop that shares it is not exposed: `size` is the spinner's scale and never
|
|
33
|
+
* `ViewStyle`'s, and `color` is R7's tint.
|
|
34
|
+
*
|
|
35
|
+
* **No `asChild`**, and this is the one root in the library without one (R12). `Slot`
|
|
36
|
+
* merges a root's props into a single element, and that element keeps its own children —
|
|
37
|
+
* so a caller's element could become the track, but the arc is a second node it has no way
|
|
38
|
+
* to receive. Handing over the track alone would render a ring that never turns, silently.
|
|
39
|
+
* Styling is the escape hatch instead, and R14 gives every `ViewStyle` key as a prop.
|
|
40
|
+
*/
|
|
41
|
+
type SpinnerOwnProps = {
|
|
42
|
+
variant?: SpinnerVariant;
|
|
43
|
+
/** The diameter, and the thickness that goes with it. */
|
|
44
|
+
size?: SpinnerSize;
|
|
45
|
+
/**
|
|
46
|
+
* A raw tint (`'#7c3aed'`), never a token (R7). There is one thing to colour on a
|
|
47
|
+
* spinner, so it lands on the ring — and on the track behind it, at the same fraction
|
|
48
|
+
* the variant's own ink is faded to.
|
|
49
|
+
*/
|
|
50
|
+
color?: string;
|
|
51
|
+
/**
|
|
52
|
+
* `false` stops the rotation and mounts no worklet. The ring stays, so a list of rows
|
|
53
|
+
* switched off with `animation={false}` does not change height.
|
|
54
|
+
*
|
|
55
|
+
* A boolean rather than the `AnimationProp` union `PressableFeedback` takes: there is
|
|
56
|
+
* one animation here, so there is nothing for an object to switch off one at a time.
|
|
57
|
+
*/
|
|
58
|
+
animation?: boolean;
|
|
59
|
+
style?: StyleProp<ViewStyle>;
|
|
60
|
+
};
|
|
61
|
+
type SpinnerProps = Omit<ViewProps, 'style'> & SpinnerOwnProps & Omit<ViewStyleProps, keyof SpinnerOwnProps | keyof ViewProps>;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* The wait, drawn.
|
|
65
|
+
*
|
|
66
|
+
* ```tsx
|
|
67
|
+
* <Spinner />
|
|
68
|
+
* <Spinner variant="danger" size="sm" />
|
|
69
|
+
* <Spinner color="#7c3aed" accessibilityLabel="Chargement des projets" />
|
|
70
|
+
* ```
|
|
71
|
+
*
|
|
72
|
+
* **Two rings and no slots.** The root is the track — the full circle, in the variant's
|
|
73
|
+
* ink at a fraction of its opacity — and its one child is the arc that turns over it,
|
|
74
|
+
* the same circle with a quarter missing. There is nothing between them for a slot to
|
|
75
|
+
* name, and the two are one figure rather than two parts.
|
|
76
|
+
*
|
|
77
|
+
* It is HeroUI's spinner drawn with borders instead of a gradient stroke. Theirs fades a
|
|
78
|
+
* single arc from opaque to 55%, which needs an SVG `linearGradient` and therefore
|
|
79
|
+
* `react-native-svg` — an optional peer, which a component in the fifteen-component core
|
|
80
|
+
* cannot require. Two circles of one ink at two opacities read as the same figure and
|
|
81
|
+
* cost two views.
|
|
82
|
+
*
|
|
83
|
+
* **`size` is the diameter**, and the only measurement a circle has. A spinner that filled
|
|
84
|
+
* its parent would be a progress bar, so R14's `width` is available and deliberately not
|
|
85
|
+
* what `size` means.
|
|
86
|
+
*/
|
|
87
|
+
declare const Spinner: react.ForwardRefExoticComponent<Omit<react_native.ViewProps, "style"> & {
|
|
88
|
+
variant?: SpinnerVariant;
|
|
89
|
+
size?: SpinnerSize;
|
|
90
|
+
color?: string;
|
|
91
|
+
animation?: boolean;
|
|
92
|
+
style?: StyleProp<ViewStyle>;
|
|
93
|
+
} & Omit<ViewStyleProps, "variant" | "size" | "color" | "style" | "children" | "hitSlop" | "id" | "needsOffscreenAlphaCompositing" | "onLayout" | "pointerEvents" | "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"> & react.RefAttributes<View>>;
|
|
94
|
+
|
|
95
|
+
declare const spinnerRecipe: Recipe<"root" | "arc", SpinnerVariant, {
|
|
96
|
+
readonly size: {
|
|
97
|
+
readonly xs: (theme: XAUITheme) => SlotStyles<SpinnerSlot>;
|
|
98
|
+
readonly sm: (theme: XAUITheme) => SlotStyles<SpinnerSlot>;
|
|
99
|
+
readonly md: (theme: XAUITheme) => SlotStyles<SpinnerSlot>;
|
|
100
|
+
readonly lg: (theme: XAUITheme) => SlotStyles<SpinnerSlot>;
|
|
101
|
+
};
|
|
102
|
+
}>;
|
|
103
|
+
|
|
104
|
+
export { Spinner, type SpinnerProps, type SpinnerSize, type SpinnerSlot, type SpinnerVariant, spinnerRecipe };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Spinner,
|
|
3
|
+
spinnerRecipe
|
|
4
|
+
} from "../../chunk-KOC3KQIT.js";
|
|
5
|
+
import "../../chunk-BVJQ3UPZ.js";
|
|
6
|
+
import "../../chunk-F6W3JQ7K.js";
|
|
7
|
+
import "../../chunk-423RQBOX.js";
|
|
8
|
+
import "../../chunk-EGLLDKN6.js";
|
|
9
|
+
import "../../chunk-4GTAZM2C.js";
|
|
10
|
+
import "../../chunk-A3EGFI6T.js";
|
|
11
|
+
import "../../chunk-URSKA2VR.js";
|
|
12
|
+
import "../../chunk-GGW42MY4.js";
|
|
13
|
+
export {
|
|
14
|
+
Spinner,
|
|
15
|
+
spinnerRecipe
|
|
16
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
var _chunkJDFV4W6Ncjs = require('../../chunk-JDFV4W6N.cjs');
|
|
10
|
+
require('../../chunk-7EIHHOHP.cjs');
|
|
11
|
+
require('../../chunk-GPVNCJ3Z.cjs');
|
|
12
|
+
require('../../chunk-7DPL3ZDS.cjs');
|
|
13
|
+
require('../../chunk-EJQCQPET.cjs');
|
|
14
|
+
require('../../chunk-FNEUOBCV.cjs');
|
|
15
|
+
require('../../chunk-57SJ4LJF.cjs');
|
|
16
|
+
require('../../chunk-ZP2E2H2G.cjs');
|
|
17
|
+
require('../../chunk-GLGU2WFL.cjs');
|
|
18
|
+
require('../../chunk-MC7SY2QH.cjs');
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
exports.Switch = _chunkJDFV4W6Ncjs.Switch; exports.SwitchLabel = _chunkJDFV4W6Ncjs.SwitchLabel; exports.SwitchRoot = _chunkJDFV4W6Ncjs.SwitchRoot; exports.SwitchThumb = _chunkJDFV4W6Ncjs.SwitchThumb; exports.SwitchTrack = _chunkJDFV4W6Ncjs.SwitchTrack; exports.switchRecipe = _chunkJDFV4W6Ncjs.switchRecipe; exports.useSwitch = _chunkJDFV4W6Ncjs.useSwitch;
|