@simple-parlay/components 1.30.6-pre.10 → 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 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +653 -467
- package/dist/react/components/CallPayoutTable.d.ts +7 -1
- 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 +6 -2
- package/dist/react/components/GameSelector.d.ts +1 -27
- package/dist/react/components/GameShowcaseCatalogue.d.ts +3 -1
- package/dist/react/components/GameSkeletons.d.ts +24 -0
- package/dist/react/components/HowToPlayButton.d.ts +2 -1
- package/dist/react/components/LoadingIndicators.d.ts +27 -10
- package/dist/react/components/MatchRail.d.ts +23 -1
- package/dist/react/components/MatchTopBar.d.ts +19 -0
- package/dist/react/components/MultiLegTable.d.ts +3 -1
- package/dist/react/components/PageBackButton.d.ts +28 -7
- 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 +34 -3
- package/dist/react/components/PropositionFilters.d.ts +0 -1
- package/dist/react/components/PropositionParts.d.ts +38 -0
- package/dist/react/components/QuickPickButton.d.ts +24 -1
- package/dist/react/components/QuickPickMenu.d.ts +19 -1
- package/dist/react/components/SafetyNetPage.d.ts +19 -0
- 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 +1 -1
- package/dist/react/components/SportSelector.d.ts +1 -36
- 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 +47 -12
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.d.ts +10 -2
- package/dist/react/index.mjs +653 -467
- package/dist/react/utils/themes.d.ts +1 -1
- package/dist/react-native/components/CallGameCatalogue.d.ts +1 -0
- package/dist/react-native/components/CallPayoutTable.d.ts +7 -1
- package/dist/react-native/components/DenseUi.d.ts +2 -9
- 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 +3 -1
- package/dist/react-native/components/GameSelector.d.ts +0 -27
- package/dist/react-native/components/GameShelfCatalogue.d.ts +0 -5
- package/dist/react-native/components/GameSkeletons.d.ts +23 -0
- package/dist/react-native/components/HowToPlayButton.d.ts +2 -1
- package/dist/react-native/components/LoadingIndicators.d.ts +22 -10
- package/dist/react-native/components/MatchRail.d.ts +23 -2
- package/dist/react-native/components/MatchTopBar.d.ts +17 -0
- package/dist/react-native/components/MultiLegTable.d.ts +3 -1
- package/dist/react-native/components/PageBackButton.d.ts +26 -10
- 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 +34 -3
- package/dist/react-native/components/PropositionFilters.d.ts +0 -1
- package/dist/react-native/components/PropositionParts.d.ts +35 -0
- package/dist/react-native/components/QuickPickButton.d.ts +24 -1
- package/dist/react-native/components/QuickPickMenu.d.ts +20 -1
- package/dist/react-native/components/SafetyNetPage.d.ts +17 -0
- 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 +1 -1
- package/dist/react-native/components/SportSelector.d.ts +1 -33
- 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 +83 -10
- package/dist/react-native/index.cjs +1 -1
- package/dist/react-native/index.d.ts +10 -2
- package/dist/react-native/index.mjs +561 -438
- package/dist/react-native/utils/themes.d.ts +1 -1
- package/dist/shared/button-ui.d.ts +62 -0
- package/dist/shared/call-presentation.d.ts +9 -1
- package/dist/shared/canvas.d.ts +14 -0
- package/dist/shared/correlation-steering.d.ts +7 -0
- package/dist/shared/date-filters.d.ts +0 -23
- package/dist/shared/entry-progress.d.ts +38 -0
- package/dist/shared/game-artwork.d.ts +2 -0
- package/dist/shared/game-flow.d.ts +20 -0
- package/dist/shared/game-icons.d.ts +2 -1
- package/dist/shared/game-shelf-presentation.d.ts +38 -2
- package/dist/shared/hooks.d.ts +1 -1
- package/dist/shared/selection-actions.d.ts +70 -3
- package/dist/shared/selection-caps.d.ts +66 -10
- package/dist/shared/selection-variants.d.ts +5 -0
- 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 +10 -0
- package/dist/shared/themes.d.ts +48 -8
- package/dist/shared/tokens.d.ts +7 -0
- package/dist/shared/types.d.ts +6 -1
- package/dist/shared/ui-system.d.ts +4 -3
- package/dist/shared/utils.d.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Proposition, RenderTeamLogo, SportSelectorProps } from '../../shared/types';
|
|
3
|
+
import { BladeTheme } from '../../shared/themes';
|
|
4
|
+
/** A header key names two teams when it splits on " vs " — `MatchupTeams`' own test. */
|
|
5
|
+
export declare function isMatchupKey(key?: string | null): boolean;
|
|
6
|
+
/** The runner's silk, for single-event rows; under an "A vs B" header the logos are already up top. */
|
|
7
|
+
export declare function runnerLogo(prop: Proposition, renderTeamLogo: SportSelectorProps['renderTeamLogo'], headerKey?: string | null): React.ReactNode;
|
|
8
|
+
export declare function CompositePropositionText({ prop, colors: c, size, componentById, textStyle, textColor, renderTeamLogo, theme, }: {
|
|
9
|
+
prop: Proposition;
|
|
10
|
+
colors: {
|
|
11
|
+
primary: string;
|
|
12
|
+
text: string;
|
|
13
|
+
textMuted?: string;
|
|
14
|
+
textAltMuted?: string;
|
|
15
|
+
backgroundAlt?: string;
|
|
16
|
+
border?: string;
|
|
17
|
+
};
|
|
18
|
+
size?: 'sm' | 'md';
|
|
19
|
+
componentById?: ReadonlyMap<number, Proposition>;
|
|
20
|
+
/** Replaces the size-derived type — the variant layouts set their own. */
|
|
21
|
+
textStyle?: {
|
|
22
|
+
fontSize: number;
|
|
23
|
+
fontWeight: '400' | '500' | '600' | '700';
|
|
24
|
+
lineHeight?: number;
|
|
25
|
+
textAlign?: 'left' | 'center';
|
|
26
|
+
};
|
|
27
|
+
/** Replaces `colors.text` on the question itself, legs included. */
|
|
28
|
+
textColor?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Supplied, a leg names its fixture with the two club badges instead of a
|
|
31
|
+
* text chip — far lighter in a row. Falls back to the chip without it.
|
|
32
|
+
*/
|
|
33
|
+
renderTeamLogo?: RenderTeamLogo;
|
|
34
|
+
theme?: BladeTheme;
|
|
35
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
1
2
|
import { BladeTheme } from '../types';
|
|
2
3
|
export interface QuickPickButtonProps {
|
|
3
4
|
onPress: () => void;
|
|
@@ -9,5 +10,27 @@ export interface QuickPickButtonProps {
|
|
|
9
10
|
theme?: BladeTheme;
|
|
10
11
|
menu?: boolean;
|
|
11
12
|
expanded?: boolean;
|
|
13
|
+
/** What a press will do, e.g. "Fill 6 for me". Shown by the deck style. */
|
|
14
|
+
hint?: string;
|
|
12
15
|
}
|
|
13
|
-
export
|
|
16
|
+
export interface QuickPickDeckButtonProps {
|
|
17
|
+
onPress: () => void;
|
|
18
|
+
onDoubleClick?: () => void;
|
|
19
|
+
/** What a press will do, e.g. "Fill 6 for me". */
|
|
20
|
+
hint?: string;
|
|
21
|
+
/** solid on its own; paper beside a main button, so that one stays the first choice. */
|
|
22
|
+
tone?: 'solid' | 'paper';
|
|
23
|
+
theme?: BladeTheme;
|
|
24
|
+
menu?: boolean;
|
|
25
|
+
expanded?: boolean;
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
style?: StyleProp<ViewStyle>;
|
|
28
|
+
}
|
|
29
|
+
/** QuickPick's shuffle mark. */
|
|
30
|
+
export declare function QuickPickIcon({ size, color }: {
|
|
31
|
+
size?: number;
|
|
32
|
+
color: string;
|
|
33
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
/** QuickPick as a small deck: the game icons' stacked tiles, an accent shuffle tile and a line saying what it will do. */
|
|
35
|
+
export declare function QuickPickDeckButton({ onPress, onDoubleClick, hint, tone, theme: themeProp, menu, expanded, disabled, style, }: QuickPickDeckButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export declare function QuickPickButton({ onPress, onDoubleClick, label, size, yesColor, noColor, theme: themeProp, menu, expanded, hint, }: QuickPickButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { TouchableOpacity } from 'react-native';
|
|
3
|
+
import { BladeTheme } from '../../shared/themes';
|
|
1
4
|
export interface QuickPickMenuColors {
|
|
2
5
|
background: string;
|
|
3
6
|
backgroundAlt: string;
|
|
@@ -6,6 +9,8 @@ export interface QuickPickMenuColors {
|
|
|
6
9
|
}
|
|
7
10
|
export interface QuickPickMenuProps {
|
|
8
11
|
counts: number[];
|
|
12
|
+
/** The size the card is on now, marked in the Shelf menu. */
|
|
13
|
+
current?: number;
|
|
9
14
|
onPick: (count: number) => void;
|
|
10
15
|
onDoubleAction?: () => void;
|
|
11
16
|
colors: QuickPickMenuColors;
|
|
@@ -13,5 +18,19 @@ export interface QuickPickMenuProps {
|
|
|
13
18
|
direction?: 'down' | 'up';
|
|
14
19
|
/** Themed elevation for the dropdown (pass `elevatedShadow(theme)`). */
|
|
15
20
|
menuShadow?: string;
|
|
21
|
+
/** Rounds the menu's corners to the theme's radius when set. */
|
|
22
|
+
theme?: BladeTheme;
|
|
23
|
+
/** What the trigger will do, shown by the deck QuickPick style. */
|
|
24
|
+
hint?: string;
|
|
25
|
+
/** "Fill the other 6": keep the player's picks, fill the empty slots. */
|
|
26
|
+
onFill?: () => void;
|
|
27
|
+
fillLabel?: string;
|
|
28
|
+
/** "Randomise all 8": throw the card away and pick it afresh. */
|
|
29
|
+
onRandomise?: () => void;
|
|
30
|
+
randomiseLabel?: string;
|
|
16
31
|
}
|
|
17
|
-
|
|
32
|
+
/** A list / menu row: the shared hoverTint over the row, nothing else. Web twin: MenuRow in the web QuickPickMenu. */
|
|
33
|
+
export declare function MenuRow({ theme: themeProp, style, ...rest }: ComponentProps<typeof TouchableOpacity> & {
|
|
34
|
+
theme?: BladeTheme;
|
|
35
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export declare function QuickPickMenu({ counts, current, onPick, onDoubleAction, colors, align, direction, menuShadow, theme, hint, onFill, fillLabel, onRandomise, randomiseLabel }: QuickPickMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SafetyNetConfig } from '../../shared/safety-net';
|
|
3
|
+
export interface SafetyNetPageProps {
|
|
4
|
+
onQuickPick?: () => void;
|
|
5
|
+
onPickYourOwn?: () => void;
|
|
6
|
+
onBack?: () => void;
|
|
7
|
+
hideTitle?: boolean;
|
|
8
|
+
config?: SafetyNetConfig | null;
|
|
9
|
+
backLabel?: string;
|
|
10
|
+
/** Replace the default game heading; pass null when the host supplies a header. */
|
|
11
|
+
header?: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export declare function SafetyNetPageTitle({ onBack, hideActions, }?: {
|
|
14
|
+
onBack?: () => void;
|
|
15
|
+
hideActions?: boolean;
|
|
16
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function SafetyNetPage({ onQuickPick, onPickYourOwn, onBack, hideTitle, header, config: configOverride, backLabel, }: SafetyNetPageProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,7 +6,7 @@ export interface SelectionsPageProps {
|
|
|
6
6
|
onBack?: () => void;
|
|
7
7
|
/** Hide the built-in title section (use `<SelectionsPageTitle />` separately) */
|
|
8
8
|
hideTitle?: boolean;
|
|
9
|
-
/** Hide the built-in action buttons (use `<SelectionsPageActions />` separately) */
|
|
9
|
+
/** Hide the built-in action buttons (use `<SelectionsPageActions />` separately, with `<SelectionUndoSnackbar />` just above it) */
|
|
10
10
|
hideActions?: boolean;
|
|
11
11
|
defaultView?: SelectionsView;
|
|
12
12
|
view?: SelectionsView;
|
|
@@ -19,7 +19,11 @@ export declare function SelectionsPageTitle({ onBack, onNext, hideActions }?: {
|
|
|
19
19
|
onNext?: () => void;
|
|
20
20
|
hideActions?: boolean;
|
|
21
21
|
}): import("react/jsx-runtime").JSX.Element;
|
|
22
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* What the last QuickPick or Clear picks did, with Undo: a white bar just above the dock, gone after 6s.
|
|
24
|
+
* Game Shelf picks only. Hosts that render `<SelectionsPageActions />` themselves mount this just above their dock.
|
|
25
|
+
*/
|
|
26
|
+
export declare function SelectionUndoSnackbar(): import("react/jsx-runtime").JSX.Element | null;
|
|
23
27
|
export declare function SelectionsPageActions({ onNext, onBack, hideButtons, }: {
|
|
24
28
|
onNext?: () => void;
|
|
25
29
|
onBack?: () => void;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TouchableOpacity, StyleProp, ViewStyle, ViewProps } from 'react-native';
|
|
3
|
+
import { BladeTheme } from '../types';
|
|
4
|
+
import { DrawnCover } from '../../shared/shelf-covers';
|
|
5
|
+
import { ShelfPipState } from '../../shared/shelf-ui';
|
|
6
|
+
export declare function useShelfTheme(theme?: BladeTheme): BladeTheme;
|
|
7
|
+
/** A white card on the light page: hairline border, soft shadow, radius 16. */
|
|
8
|
+
export declare function ShelfCard({ theme: themeProp, padded, style, ...rest }: ViewProps & {
|
|
9
|
+
theme?: BladeTheme;
|
|
10
|
+
padded?: boolean;
|
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
/** The one action bar: a white card at the bottom of the page (RN has no sticky, so it closes the page). */
|
|
13
|
+
export declare function ShelfDock({ theme: themeProp, style, ...rest }: ViewProps & {
|
|
14
|
+
theme?: BladeTheme;
|
|
15
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export interface ShelfOptionProps {
|
|
17
|
+
theme?: BladeTheme;
|
|
18
|
+
selected: boolean;
|
|
19
|
+
/** A second, smaller line (a count or a detail); makes the option 52 tall. */
|
|
20
|
+
sub?: React.ReactNode;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
onPress?: () => void;
|
|
23
|
+
accessibilityLabel?: string;
|
|
24
|
+
accessibilityRole?: 'button' | 'tab' | 'radio' | 'menuitem';
|
|
25
|
+
testID?: string;
|
|
26
|
+
style?: StyleProp<ViewStyle>;
|
|
27
|
+
children: React.ReactNode;
|
|
28
|
+
}
|
|
29
|
+
/** Every chip, filter, tab and option: teal with light text when chosen, white with a hairline when not. */
|
|
30
|
+
export declare function ShelfOption({ theme: themeProp, selected, sub, disabled, onPress, accessibilityLabel, accessibilityRole, testID, style, children }: ShelfOptionProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
/** One progress mark per pick: right fills teal, a miss is outlined, still to play is a hairline grey. */
|
|
32
|
+
export declare function ShelfPips({ theme: themeProp, states, label, style }: {
|
|
33
|
+
theme?: BladeTheme;
|
|
34
|
+
states: readonly ShelfPipState[];
|
|
35
|
+
label?: string;
|
|
36
|
+
style?: StyleProp<ViewStyle>;
|
|
37
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
/**
|
|
39
|
+
* A cover or banner's drawn art (`theme.shelf.coverStyle`): its pattern, tiles and mark. `frame` places
|
|
40
|
+
* the art box in px; inside it everything is a share of the box. Sits over its parent, full bleed.
|
|
41
|
+
* Web twin: DrawnArt in the web ShelfKit.
|
|
42
|
+
*/
|
|
43
|
+
export declare function DrawnArt({ drawn, frame, dim }: {
|
|
44
|
+
drawn: DrawnCover;
|
|
45
|
+
frame: {
|
|
46
|
+
left?: number;
|
|
47
|
+
right?: number;
|
|
48
|
+
top: number;
|
|
49
|
+
size: number;
|
|
50
|
+
};
|
|
51
|
+
dim?: boolean;
|
|
52
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
/**
|
|
54
|
+
* A borderless picture button (shelf cover, category banner): a press sinks it;
|
|
55
|
+
* hover and `lit` draw a 3px `ring` inside its edge. Web: the `.gs-item` CSS and
|
|
56
|
+
* ShelfCategoryBanner's ring overlay.
|
|
57
|
+
*/
|
|
58
|
+
export declare function ShelfArtButton({ ring, radius, lit, children, style, ...rest }: React.ComponentProps<typeof TouchableOpacity> & {
|
|
59
|
+
ring: string;
|
|
60
|
+
radius: number;
|
|
61
|
+
lit?: boolean;
|
|
62
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,7 +5,7 @@ export interface SportRailProps {
|
|
|
5
5
|
label?: string | null;
|
|
6
6
|
/** Line under the heading. Pass `null` to drop it; omit for the default hint. */
|
|
7
7
|
sublabel?: string | null;
|
|
8
|
-
/** Controls
|
|
8
|
+
/** Controls under the track — search and Swipe on the picks screen. */
|
|
9
9
|
actions?: React.ReactNode;
|
|
10
10
|
style?: StyleProp<ViewStyle>;
|
|
11
11
|
}
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Proposition, RenderTeamLogo, 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,31 +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 CompositePropositionText({ prop, colors: c, size, componentById, textStyle, textColor, renderTeamLogo, }: {
|
|
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
|
-
/**
|
|
37
|
-
* Supplied, a leg names its fixture with the two club badges instead of a
|
|
38
|
-
* text chip — far lighter in a row. Falls back to the chip without it.
|
|
39
|
-
*/
|
|
40
|
-
renderTeamLogo?: RenderTeamLogo;
|
|
41
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
42
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,9 +1,17 @@
|
|
|
1
1
|
import { default as React, ReactNode } from 'react';
|
|
2
|
-
import { ViewStyle, TextStyle, StyleProp, Animated } from 'react-native';
|
|
2
|
+
import { Text as RNText, TouchableOpacity, ViewStyle, TextStyle, StyleProp, Animated } from 'react-native';
|
|
3
3
|
import { BladeTheme } from '../../../shared/themes';
|
|
4
4
|
import { YesNoLabels } from '../../../shared/utils';
|
|
5
|
+
import { ButtonVariant, ButtonSize } from '../../../shared/button-ui';
|
|
5
6
|
/** Twin of the web `TOUCH_TARGET`: minimum hit area in px. Shrink the paint, never the target. */
|
|
6
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>>;
|
|
7
15
|
/**
|
|
8
16
|
* Scroll a horizontal `ScrollView` to `x`. RN-web's patched `scrollTo` never
|
|
9
17
|
* moves the node. We need to handle platforms separately. RN 0.86 broke previous
|
|
@@ -47,21 +55,87 @@ export declare function Stack({ gap, align, justify, style, children }: StackPro
|
|
|
47
55
|
export declare function Row({ gap, align, justify, wrap, style, children, }: StackProps & {
|
|
48
56
|
wrap?: boolean;
|
|
49
57
|
}): import("react/jsx-runtime").JSX.Element;
|
|
50
|
-
|
|
51
|
-
|
|
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 {
|
|
52
76
|
theme: BladeTheme;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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;
|
|
56
81
|
block?: boolean;
|
|
57
|
-
|
|
82
|
+
disabled?: boolean;
|
|
58
83
|
onPress?: () => void;
|
|
59
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;
|
|
60
95
|
style?: StyleProp<ViewStyle>;
|
|
96
|
+
textStyle?: StyleProp<TextStyle>;
|
|
97
|
+
/** Leading element (an icon or spinner) before a text label. */
|
|
98
|
+
icon?: ReactNode;
|
|
61
99
|
children?: ReactNode;
|
|
62
|
-
accessibilityLabel?: string;
|
|
63
100
|
}
|
|
64
|
-
|
|
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;
|
|
65
139
|
export interface TextProps {
|
|
66
140
|
theme: BladeTheme;
|
|
67
141
|
variant?: 'display' | 'heading' | 'subheading' | 'body' | 'caption' | 'eyebrow';
|
|
@@ -100,7 +174,6 @@ export interface YesNoButtonsProps {
|
|
|
100
174
|
noLabel?: string;
|
|
101
175
|
style?: StyleProp<ViewStyle>;
|
|
102
176
|
}
|
|
103
|
-
/** The interactive Yes/No pair. Identical everywhere it is used. */
|
|
104
177
|
export declare function YesNoButtons({ theme, value, onYes, onNo, size, stretch, disabled, yesDisabled, noDisabled, yesLabel, noLabel, style, }: YesNoButtonsProps): import("react/jsx-runtime").JSX.Element;
|
|
105
178
|
/** Read-only Yes/No chip — the settled answer, same product tokens. */
|
|
106
179
|
export declare function YesNoTag({ theme, value, size, style, }: {
|