@simple-parlay/components 1.30.6-pre → 1.30.6-pre.11
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/index.cjs +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +653 -451
- package/dist/react/components/CallGameCatalogue.d.ts +4 -0
- package/dist/react/components/CallPayoutTable.d.ts +12 -0
- package/dist/react/components/CallTicketBuilder.d.ts +3 -0
- package/dist/react/components/CorrelationChoicesSkeleton.d.ts +4 -0
- package/dist/react/components/CorrelationPricingDebug.d.ts +2 -0
- package/dist/react/components/CorrelationPropPlaceholder.d.ts +13 -0
- package/dist/react/components/DenseGameCatalogue.d.ts +2 -0
- package/dist/react/components/DenseUi.d.ts +30 -0
- package/dist/react/components/EntriesPage.d.ts +0 -4
- package/dist/react/components/EntrySubmission.d.ts +1 -1
- package/dist/react/components/EventSwipeModal.d.ts +4 -0
- package/dist/react/components/GameCardParts.d.ts +28 -0
- package/dist/react/components/GameModeCard.d.ts +37 -6
- package/dist/react/components/GamePage.d.ts +3 -1
- package/dist/react/components/GameSelector.d.ts +1 -19
- package/dist/react/components/GameSetupPage.d.ts +6 -2
- package/dist/react/components/GameShelfCatalogue.d.ts +2 -0
- package/dist/react/components/GameShowcaseCatalogue.d.ts +11 -0
- package/dist/react/components/GameSkeletons.d.ts +24 -0
- package/dist/react/components/GameVariantCatalogue.d.ts +6 -0
- package/dist/react/components/HowToPlayButton.d.ts +5 -2
- package/dist/react/components/LoadingIndicators.d.ts +27 -10
- package/dist/react/components/MatchRail.d.ts +52 -0
- package/dist/react/components/MatchTopBar.d.ts +19 -0
- package/dist/react/components/MultiLegTable.d.ts +5 -1
- package/dist/react/components/PageBackButton.d.ts +35 -6
- package/dist/react/components/PageSkeletons.d.ts +24 -0
- package/dist/react/components/PickGroupSection.d.ts +37 -0
- package/dist/react/components/PickerBrand.d.ts +0 -5
- package/dist/react/components/PicksSkeletons.d.ts +30 -0
- package/dist/react/components/PlaceEntryProvider.d.ts +75 -6
- package/dist/react/components/PlaybookChooser.d.ts +7 -0
- package/dist/react/components/PropositionFilters.d.ts +2 -1
- package/dist/react/components/PropositionParts.d.ts +38 -0
- package/dist/react/components/QuickPickButton.d.ts +26 -1
- package/dist/react/components/QuickPickMenu.d.ts +19 -1
- package/dist/react/components/SafetyNetPage.d.ts +4 -1
- package/dist/react/components/ScrollShelf.d.ts +5 -1
- package/dist/react/components/SelectionReview.d.ts +1 -1
- package/dist/react/components/SelectionsPage.d.ts +7 -2
- package/dist/react/components/ShelfKit.d.ts +43 -0
- package/dist/react/components/SportRail.d.ts +13 -7
- package/dist/react/components/SportSelector.d.ts +2 -24
- package/dist/react/components/SuccessPage.d.ts +4 -2
- package/dist/react/components/SwipeDeck.d.ts +32 -3
- package/dist/react/components/YesNoMultiLogo.d.ts +13 -0
- package/dist/react/components/_primitives/index.d.ts +54 -13
- package/dist/react/index.cjs +1 -0
- package/dist/react/index.d.ts +46 -19
- package/dist/react/index.mjs +653 -451
- package/dist/react/utils/dom.d.ts +7 -0
- package/dist/react/utils/index.d.ts +1 -1
- package/dist/react/utils/themes.d.ts +1 -1
- package/dist/react-native/components/CallGameCatalogue.d.ts +17 -0
- package/dist/react-native/components/CallPayoutTable.d.ts +12 -0
- package/dist/react-native/components/CallTicketBuilder.d.ts +33 -0
- package/dist/react-native/components/CorrelationChoicesSkeleton.d.ts +3 -0
- package/dist/react-native/components/CorrelationPricingDebug.d.ts +2 -0
- package/dist/react-native/components/CorrelationPropPlaceholder.d.ts +7 -0
- package/dist/react-native/components/DenseGameCatalogue.d.ts +2 -0
- package/dist/react-native/components/DenseUi.d.ts +52 -0
- package/dist/react-native/components/EntrySubmission.d.ts +1 -1
- package/dist/react-native/components/EventSwipeModal.d.ts +5 -0
- package/dist/react-native/components/GameCardParts.d.ts +29 -0
- package/dist/react-native/components/GameModeCard.d.ts +34 -5
- package/dist/react-native/components/GamePage.d.ts +4 -1
- package/dist/react-native/components/GameSelector.d.ts +1 -20
- package/dist/react-native/components/GameSetupPage.d.ts +5 -14
- package/dist/react-native/components/GameShelfCatalogue.d.ts +2 -0
- package/dist/react-native/components/GameSkeletons.d.ts +23 -0
- package/dist/react-native/components/HowToPlayButton.d.ts +5 -2
- package/dist/react-native/components/LoadingIndicators.d.ts +23 -11
- package/dist/react-native/components/MatchRail.d.ts +57 -0
- package/dist/react-native/components/MatchTopBar.d.ts +17 -0
- package/dist/react-native/components/MultiLegTable.d.ts +5 -1
- package/dist/react-native/components/PageBackButton.d.ts +32 -9
- package/dist/react-native/components/PageSkeletons.d.ts +23 -0
- package/dist/react-native/components/PickGroupSection.d.ts +37 -0
- package/dist/react-native/components/PickerBrand.d.ts +0 -4
- package/dist/react-native/components/PicksSkeletons.d.ts +31 -0
- package/dist/react-native/components/PlaceEntryProvider.d.ts +68 -6
- package/dist/react-native/components/PlaybookChooser.d.ts +7 -0
- package/dist/react-native/components/PropositionFilters.d.ts +2 -1
- package/dist/react-native/components/PropositionParts.d.ts +35 -0
- package/dist/react-native/components/QuickPickButton.d.ts +26 -1
- package/dist/react-native/components/QuickPickMenu.d.ts +20 -1
- package/dist/react-native/components/SafetyNetPage.d.ts +4 -1
- package/dist/react-native/components/ScrollShelf.d.ts +8 -1
- package/dist/react-native/components/SelectionReview.d.ts +1 -1
- package/dist/react-native/components/SelectionsPage.d.ts +6 -2
- package/dist/react-native/components/ShelfKit.d.ts +62 -0
- package/dist/react-native/components/SportRail.d.ts +13 -7
- package/dist/react-native/components/SportSelector.d.ts +2 -29
- package/dist/react-native/components/SuccessPage.d.ts +4 -2
- package/dist/react-native/components/SwipeDeck.d.ts +37 -3
- package/dist/react-native/components/YesNoMultiLogo.d.ts +12 -0
- package/dist/react-native/components/_primitives/index.d.ts +93 -12
- package/dist/react-native/index.cjs +1 -0
- package/dist/react-native/index.d.ts +46 -19
- package/dist/react-native/index.mjs +561 -437
- package/dist/react-native/utils/index.d.ts +1 -1
- package/dist/react-native/utils/themes.d.ts +1 -1
- package/dist/shared/api-client.d.ts +4 -3
- package/dist/shared/button-ui.d.ts +62 -0
- package/dist/shared/call-presentation.d.ts +28 -0
- package/dist/shared/canvas.d.ts +14 -0
- package/dist/shared/correlation-steering.d.ts +56 -0
- package/dist/shared/date-filters.d.ts +0 -22
- package/dist/shared/dense-ui.d.ts +54 -0
- package/dist/shared/entry-progress.d.ts +38 -0
- package/dist/shared/game-artwork.d.ts +63 -0
- package/dist/shared/game-flow.d.ts +34 -1
- package/dist/shared/game-icons.d.ts +8 -4
- package/dist/shared/game-library.d.ts +58 -0
- package/dist/shared/game-set-bet.d.ts +0 -1
- package/dist/shared/game-shelf-artwork.d.ts +3 -0
- package/dist/shared/game-shelf-presentation.d.ts +79 -0
- package/dist/shared/game-variants.d.ts +5 -0
- package/dist/shared/hooks.d.ts +8 -8
- package/dist/shared/how-to-play-html.d.ts +1 -1
- package/dist/shared/how-to-play-logo.d.ts +1 -1
- package/dist/shared/menu-placement.d.ts +26 -0
- package/dist/shared/mirror.d.ts +55 -5
- package/dist/shared/picker-brand.d.ts +22 -6
- package/dist/shared/playbook.d.ts +29 -0
- package/dist/shared/selection-actions.d.ts +82 -4
- package/dist/shared/selection-caps.d.ts +124 -0
- package/dist/shared/selection-variants.d.ts +10 -1
- package/dist/shared/shelf-covers.d.ts +92 -0
- package/dist/shared/shelf-ui.d.ts +47 -0
- package/dist/shared/swipe-deck.d.ts +11 -1
- package/dist/shared/themes.d.ts +70 -8
- package/dist/shared/tokens.d.ts +7 -0
- package/dist/shared/types.d.ts +49 -3
- package/dist/shared/ui-system.d.ts +70 -0
- package/dist/shared/ui-variant.d.ts +16 -0
- package/dist/shared/use-call-payouts.d.ts +8 -0
- package/dist/shared/utils.d.ts +20 -7
- package/package.json +7 -8
- package/dist/index.js +0 -1
- package/dist/react/components/GameSetBetPage.d.ts +0 -21
- package/dist/react/components/LadderPage.d.ts +0 -21
- package/dist/react/components/MirrorPage.d.ts +0 -21
- package/dist/react/components/PerfectPickPage.d.ts +0 -22
- package/dist/react/components/PickYourDividendPage.d.ts +0 -21
- package/dist/react/components/RuleSetupPage.d.ts +0 -27
- package/dist/react/components/SixAgainPage.d.ts +0 -16
- package/dist/react/index.js +0 -1
- package/dist/react/utils/design.d.ts +0 -55
- package/dist/react-native/components/GameSetBetPage.d.ts +0 -19
- package/dist/react-native/components/LadderPage.d.ts +0 -19
- package/dist/react-native/components/MirrorPage.d.ts +0 -19
- package/dist/react-native/components/PerfectPickPage.d.ts +0 -20
- package/dist/react-native/components/PickYourDividendPage.d.ts +0 -19
- package/dist/react-native/components/RuleSetupPage.d.ts +0 -23
- package/dist/react-native/components/SixAgainPage.d.ts +0 -14
- package/dist/react-native/index.js +0 -1
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Proposition, SportSelectorProps } from '../../shared/types';
|
|
3
|
-
/** A header key names two teams when it splits on " vs " — `MatchupTeams`' own test. */
|
|
4
|
-
export declare function isMatchupKey(key?: string | null): boolean;
|
|
5
|
-
/** The runner's silk, for single-event rows; under an "A vs B" header the logos are already up top. */
|
|
6
|
-
export declare function runnerLogo(prop: Proposition, renderTeamLogo: SportSelectorProps['renderTeamLogo'], headerKey?: string | null): React.ReactNode;
|
|
1
|
+
import { SportSelectorProps } from '../../shared/types';
|
|
7
2
|
/** "A vs B" as a header — names stack beside the "vs" on a phone, one line from 640px up. */
|
|
8
3
|
export declare function MatchupTeams({ matchup, renderTeamLogo, altText, mutedColor, size, }: {
|
|
9
4
|
matchup: string;
|
|
@@ -12,26 +7,4 @@ export declare function MatchupTeams({ matchup, renderTeamLogo, altText, mutedCo
|
|
|
12
7
|
mutedColor: string;
|
|
13
8
|
size?: 'sm' | 'md';
|
|
14
9
|
}): import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export declare function
|
|
16
|
-
prop: Proposition;
|
|
17
|
-
colors: {
|
|
18
|
-
primary: string;
|
|
19
|
-
text: string;
|
|
20
|
-
textMuted?: string;
|
|
21
|
-
textAltMuted?: string;
|
|
22
|
-
backgroundAlt?: string;
|
|
23
|
-
border?: string;
|
|
24
|
-
};
|
|
25
|
-
size?: 'sm' | 'md';
|
|
26
|
-
componentById?: ReadonlyMap<number, Proposition>;
|
|
27
|
-
/** Replaces the size-derived type — the variant layouts set their own. */
|
|
28
|
-
textStyle?: {
|
|
29
|
-
fontSize: number;
|
|
30
|
-
fontWeight: '400' | '500' | '600' | '700';
|
|
31
|
-
lineHeight?: number;
|
|
32
|
-
textAlign?: 'left' | 'center';
|
|
33
|
-
};
|
|
34
|
-
/** Replaces `colors.text` on the question itself, legs included. */
|
|
35
|
-
textColor?: string;
|
|
36
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
37
|
-
export declare function SportSelector({ game, propositions, selections, onToggleSelection, onNext, onBack, loading, error, theme: themeProp, colorScheme, hideActions, initialSport, renderTeamLogo, disableQuickPick, selectedPropositionCount, onPropositionCountChange, gameCategory, headerExtra, variant, disableEventSwipe, }: SportSelectorProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function SportSelector({ game, propositions, selections, onToggleSelection, onNext, onBack, loading, error, theme: themeProp, colorScheme, hideActions, initialSport, renderTeamLogo, disableQuickPick, selectedPropositionCount, onPropositionCountChange, gameCategory, headerExtra, railSlot, variant, disableEventSwipe, }: SportSelectorProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -11,11 +11,13 @@ export interface SuccessPageProps {
|
|
|
11
11
|
/** Hide the built-in action buttons (use `<SuccessPageActions />` separately) */
|
|
12
12
|
hideActions?: boolean;
|
|
13
13
|
}
|
|
14
|
-
export declare function SuccessPageTitle({ onBack, hideActions, }?: {
|
|
14
|
+
export declare function SuccessPageTitle({ onBack, onDone, hideActions, }?: {
|
|
15
15
|
onBack?: () => void;
|
|
16
|
+
/** Non-shelf systems: the header's × (shelf's lives in its dock as "View my entries"). */
|
|
17
|
+
onDone?: () => void;
|
|
16
18
|
hideActions?: boolean;
|
|
17
19
|
}): import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
/** Renders Place Another
|
|
20
|
+
/** Renders Place Another (shelf: View my entries + Play again). Must be inside `<PlaceEntryProvider>`. */
|
|
19
21
|
export declare function SuccessPageActions({ onPlayAgain, onDone, onShare, }: {
|
|
20
22
|
onPlayAgain?: () => void;
|
|
21
23
|
onDone?: () => void;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { View } from 'react-native';
|
|
2
3
|
import { BladeTheme } from '../utils/themes';
|
|
3
|
-
import { FlyDirection } from '../../shared/swipe-deck';
|
|
4
|
+
import { FlyDirection, SwipeVariant } from '../../shared/swipe-deck';
|
|
4
5
|
import { Proposition } from '../../shared/types';
|
|
5
|
-
export type { FlyDirection };
|
|
6
|
+
export type { FlyDirection, SwipeVariant };
|
|
6
7
|
export interface SwipeCardApi {
|
|
7
8
|
fly: (direction: FlyDirection) => void;
|
|
8
9
|
}
|
|
@@ -13,16 +14,49 @@ export interface SwipeCardProps {
|
|
|
13
14
|
depth?: number;
|
|
14
15
|
enterFrom?: FlyDirection | null;
|
|
15
16
|
canSkip?: boolean;
|
|
17
|
+
/** `run` shows only the top card and fades it instead of stamping it. @default 'stack' */
|
|
18
|
+
variant?: SwipeVariant;
|
|
16
19
|
onResolve: (id: number, answer: 'yes' | 'no' | null) => void;
|
|
17
20
|
registerApi?: (api: SwipeCardApi | null) => void;
|
|
18
21
|
onDragStateChange?: (dragging: boolean) => void;
|
|
19
22
|
children: React.ReactNode;
|
|
20
23
|
}
|
|
21
|
-
export declare function SwipeCard({ prop, theme: themeProp, depth, enterFrom, canSkip, onResolve, registerApi, onDragStateChange, children, }: SwipeCardProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare function SwipeCard({ prop, theme: themeProp, depth, enterFrom, canSkip, variant, onResolve, registerApi, onDragStateChange, children, }: SwipeCardProps): import("react/jsx-runtime").JSX.Element;
|
|
22
25
|
export interface SwipeCardFaceProps {
|
|
23
26
|
prop: Proposition;
|
|
24
27
|
}
|
|
25
28
|
export declare function SwipeCardFace({ prop }: SwipeCardFaceProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
/**
|
|
30
|
+
* Set by {@link SwipeRunControls}: measures the pad that made a new pick and
|
|
31
|
+
* its `tile`, flies a copy between them, then calls `land`. Returns a cancel,
|
|
32
|
+
* or null when it can't fly.
|
|
33
|
+
*/
|
|
34
|
+
export type RunLaunch = (answer: 'yes' | 'no', tile: View, face: {
|
|
35
|
+
number: number;
|
|
36
|
+
color: string;
|
|
37
|
+
}, land: () => void) => (() => void) | null;
|
|
38
|
+
/**
|
|
39
|
+
* The run's picks, numbered top-down beside the question — 1 is the first. A pick
|
|
40
|
+
* made here flies in from its pad when `launch` is wired to the controls;
|
|
41
|
+
* the rest drop in. Tapping one hands it to `onRecall` to be answered again.
|
|
42
|
+
*/
|
|
43
|
+
export declare function SwipeRunStack({ launch, onRecall, canRecall }: {
|
|
44
|
+
launch?: React.MutableRefObject<RunLaunch | null>;
|
|
45
|
+
onRecall?: (id: number) => void;
|
|
46
|
+
canRecall?: (id: number) => boolean;
|
|
47
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
export interface SwipeRunControlsProps {
|
|
49
|
+
onFly: (direction: FlyDirection) => void;
|
|
50
|
+
onUndo: () => void;
|
|
51
|
+
canUndo: boolean;
|
|
52
|
+
canSkip: boolean;
|
|
53
|
+
/** Whether the top card can take this answer right now. */
|
|
54
|
+
canAnswer: (answer: 'yes' | 'no') => boolean;
|
|
55
|
+
/** Shared with {@link SwipeRunStack} so new picks fly from these pads. */
|
|
56
|
+
launch?: React.MutableRefObject<RunLaunch | null>;
|
|
57
|
+
}
|
|
58
|
+
/** The run's controls: tall Yes/No pads with the gesture spelt out, then Undo and Skip. */
|
|
59
|
+
export declare function SwipeRunControls({ onFly, onUndo, canUndo, canSkip, canAnswer, launch }: SwipeRunControlsProps): import("react/jsx-runtime").JSX.Element;
|
|
26
60
|
export interface SwipeDeckProps {
|
|
27
61
|
onBack?: () => void;
|
|
28
62
|
onNext?: () => void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface YesNoMultiLogoProps {
|
|
2
|
+
/** Wordmark font size in px; the tiles and pipe scale with it. @default 22 */
|
|
3
|
+
size?: number;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* The YESNO Multi horizontal logo: YESNO wordmark, the stacked-tile mark, a pipe, Multi®.
|
|
7
|
+
* Drawn in type and shapes from the brand master (62_YESNO_Multi_Horizontal.svg) so it
|
|
8
|
+
* follows the theme ink. Web twin: src/react/components/YesNoMultiLogo.tsx.
|
|
9
|
+
*/
|
|
10
|
+
export declare function YesNoMultiLogo({ size }: YesNoMultiLogoProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
/** The page sign-off every page ends with: the logo, small and quiet, centred under the content. */
|
|
12
|
+
export declare function YesNoMultiFooter(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,17 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { ViewStyle, TextStyle, StyleProp, Animated } from 'react-native';
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
import { Text as RNText, TouchableOpacity, ViewStyle, TextStyle, StyleProp, Animated } from 'react-native';
|
|
3
3
|
import { BladeTheme } from '../../../shared/themes';
|
|
4
|
+
import { YesNoLabels } from '../../../shared/utils';
|
|
5
|
+
import { ButtonVariant, ButtonSize } from '../../../shared/button-ui';
|
|
4
6
|
/** Twin of the web `TOUCH_TARGET`: minimum hit area in px. Shrink the paint, never the target. */
|
|
5
7
|
export declare const TOUCH_TARGET = 44;
|
|
8
|
+
/** Gives every ThemedText below it the host theme's fonts. */
|
|
9
|
+
export declare function FontScope({ theme, children }: {
|
|
10
|
+
theme: BladeTheme;
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
/** React Native's Text, set in the theme's font. Drop-in: same props and ref. */
|
|
14
|
+
export declare const ThemedText: React.ForwardRefExoticComponent<import('react-native').TextProps & React.RefAttributes<RNText>>;
|
|
6
15
|
/**
|
|
7
16
|
* Scroll a horizontal `ScrollView` to `x`. RN-web's patched `scrollTo` never
|
|
8
17
|
* moves the node. We need to handle platforms separately. RN 0.86 broke previous
|
|
@@ -11,6 +20,8 @@ export declare const TOUCH_TARGET = 44;
|
|
|
11
20
|
export declare function scrollRowTo(ref: {
|
|
12
21
|
current: unknown;
|
|
13
22
|
}, x: number, animated?: boolean): void;
|
|
23
|
+
export declare function webDocOf(node: unknown): Document;
|
|
24
|
+
export declare function webWinOf(node: unknown): Window;
|
|
14
25
|
/**
|
|
15
26
|
* Hover handlers for the react-native-web twin — RN's own prop types omit them
|
|
16
27
|
* and they are inert on native. Spread it (`{...hoverHandlers(a, b)}`) instead
|
|
@@ -44,21 +55,87 @@ export declare function Stack({ gap, align, justify, style, children }: StackPro
|
|
|
44
55
|
export declare function Row({ gap, align, justify, wrap, style, children, }: StackProps & {
|
|
45
56
|
wrap?: boolean;
|
|
46
57
|
}): import("react/jsx-runtime").JSX.Element;
|
|
47
|
-
|
|
48
|
-
|
|
58
|
+
/**
|
|
59
|
+
* The one hover / press tracker behind every tappable control. Spread `handlers`
|
|
60
|
+
* on a TouchableOpacity (keep `activeOpacity={1}`: the look carries the press).
|
|
61
|
+
* Hover only fires on react-native-web pointers; native never hovers.
|
|
62
|
+
*/
|
|
63
|
+
export declare function usePress(): {
|
|
64
|
+
hovered: boolean;
|
|
65
|
+
pressed: boolean;
|
|
66
|
+
handlers: {
|
|
67
|
+
onPressIn: () => void;
|
|
68
|
+
onPressOut: () => void;
|
|
69
|
+
onMouseEnter: () => void;
|
|
70
|
+
onMouseLeave: () => void;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
/** The shared press sink for anything built on `usePress`. */
|
|
74
|
+
export declare function pressMotion(pressed: boolean, disabled?: boolean): ViewStyle;
|
|
75
|
+
export interface ButtonProps {
|
|
49
76
|
theme: BladeTheme;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
77
|
+
/** primary: the screen's main action. secondary: the filled alternative. quiet: a tint pill for small actions. */
|
|
78
|
+
variant?: ButtonVariant;
|
|
79
|
+
/** lg (52) for the page's main action; md (44) everywhere else. */
|
|
80
|
+
size?: ButtonSize;
|
|
53
81
|
block?: boolean;
|
|
54
|
-
|
|
82
|
+
disabled?: boolean;
|
|
55
83
|
onPress?: () => void;
|
|
56
84
|
onLongPress?: () => void;
|
|
85
|
+
accessibilityLabel?: string;
|
|
86
|
+
accessibilityHint?: string;
|
|
87
|
+
accessibilityRole?: 'button' | 'menuitem' | 'link';
|
|
88
|
+
/** Merged with the button's own disabled state: expanded for disclosures, busy while placing. */
|
|
89
|
+
accessibilityState?: {
|
|
90
|
+
expanded?: boolean;
|
|
91
|
+
busy?: boolean;
|
|
92
|
+
selected?: boolean;
|
|
93
|
+
};
|
|
94
|
+
testID?: string;
|
|
57
95
|
style?: StyleProp<ViewStyle>;
|
|
96
|
+
textStyle?: StyleProp<TextStyle>;
|
|
97
|
+
/** Leading element (an icon or spinner) before a text label. */
|
|
98
|
+
icon?: ReactNode;
|
|
58
99
|
children?: ReactNode;
|
|
59
|
-
accessibilityLabel?: string;
|
|
60
100
|
}
|
|
61
|
-
|
|
101
|
+
/** The kit's one action button. Web twin: `Button` in src/react/components/_primitives. */
|
|
102
|
+
export declare function Button({ theme, variant, size, block, disabled, onPress, onLongPress, accessibilityLabel, accessibilityHint, accessibilityRole, accessibilityState, testID, style, textStyle, icon, children, }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
103
|
+
/** Text colour for a Button's custom children (icons, two-line labels). */
|
|
104
|
+
export declare function buttonInk(theme: BladeTheme, variant?: ButtonVariant, disabled?: boolean): string;
|
|
105
|
+
export type PressCardProps = React.ComponentProps<typeof TouchableOpacity> & {
|
|
106
|
+
theme: BladeTheme;
|
|
107
|
+
lit?: boolean;
|
|
108
|
+
};
|
|
109
|
+
/** A whole card that is one button. It keeps its own shape; its hairline turns primary on hover and it sinks on press. */
|
|
110
|
+
export declare function PressCard({ theme, lit, style, ...rest }: PressCardProps): import("react/jsx-runtime").JSX.Element;
|
|
111
|
+
export interface IconButtonProps {
|
|
112
|
+
theme: BladeTheme;
|
|
113
|
+
accessibilityLabel: string;
|
|
114
|
+
onPress?: () => void;
|
|
115
|
+
disabled?: boolean;
|
|
116
|
+
/** The painted disc; the hit area never drops below 44. */
|
|
117
|
+
size?: number;
|
|
118
|
+
/** danger: the hover ring turns the error colour (remove a pick). */
|
|
119
|
+
tone?: 'default' | 'danger';
|
|
120
|
+
/** Merged with the button's own disabled state: expanded for disclosures. */
|
|
121
|
+
accessibilityState?: {
|
|
122
|
+
expanded?: boolean;
|
|
123
|
+
selected?: boolean;
|
|
124
|
+
};
|
|
125
|
+
testID?: string;
|
|
126
|
+
style?: StyleProp<ViewStyle>;
|
|
127
|
+
/** Drawn in `iconButtonInk` — pass it to the icon. */
|
|
128
|
+
children?: ReactNode;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Icon-only button (back, close, remove, previous / next): a round disc with a
|
|
132
|
+
* hairline ring and the shared hover tint. A disc under 44 keeps its own
|
|
133
|
+
* footprint and reaches out to a 44 hit area with negative margins.
|
|
134
|
+
* Web twin: `IconButton` in src/react/components/_primitives.
|
|
135
|
+
*/
|
|
136
|
+
export declare function IconButton({ theme, accessibilityLabel, onPress, disabled, size, tone, accessibilityState, testID, style, children }: IconButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
137
|
+
/** The icon colour inside an IconButton at rest (hover recolours the ring, not the glyph, on native). */
|
|
138
|
+
export declare function iconButtonInk(theme: BladeTheme): string;
|
|
62
139
|
export interface TextProps {
|
|
63
140
|
theme: BladeTheme;
|
|
64
141
|
variant?: 'display' | 'heading' | 'subheading' | 'body' | 'caption' | 'eyebrow';
|
|
@@ -78,6 +155,9 @@ export declare function Divider({ theme, orientation, style, }: {
|
|
|
78
155
|
export type YesNoValue = 'yes' | 'no';
|
|
79
156
|
export type YesNoAnswer = YesNoValue | null | undefined;
|
|
80
157
|
export type YesNoSize = 'xs' | 'sm' | 'md';
|
|
158
|
+
export type { YesNoLabels };
|
|
159
|
+
export declare const YesNoLabelsProvider: React.Provider<YesNoLabels>;
|
|
160
|
+
export declare function useYesNoLabels(): YesNoLabels;
|
|
81
161
|
export interface YesNoButtonsProps {
|
|
82
162
|
theme: BladeTheme;
|
|
83
163
|
/** Currently selected side, if any. */
|
|
@@ -88,12 +168,13 @@ export interface YesNoButtonsProps {
|
|
|
88
168
|
/** Fill the row, each side taking half — the roomy card layouts want this. */
|
|
89
169
|
stretch?: boolean;
|
|
90
170
|
disabled?: boolean;
|
|
171
|
+
yesDisabled?: boolean;
|
|
172
|
+
noDisabled?: boolean;
|
|
91
173
|
yesLabel?: string;
|
|
92
174
|
noLabel?: string;
|
|
93
175
|
style?: StyleProp<ViewStyle>;
|
|
94
176
|
}
|
|
95
|
-
|
|
96
|
-
export declare function YesNoButtons({ theme, value, onYes, onNo, size, stretch, disabled, yesLabel, noLabel, style, }: YesNoButtonsProps): import("react/jsx-runtime").JSX.Element;
|
|
177
|
+
export declare function YesNoButtons({ theme, value, onYes, onNo, size, stretch, disabled, yesDisabled, noDisabled, yesLabel, noLabel, style, }: YesNoButtonsProps): import("react/jsx-runtime").JSX.Element;
|
|
97
178
|
/** Read-only Yes/No chip — the settled answer, same product tokens. */
|
|
98
179
|
export declare function YesNoTag({ theme, value, size, style, }: {
|
|
99
180
|
theme: BladeTheme;
|