@simple-parlay/components 1.30.6-pre.4 → 1.30.6-pre.6
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.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +288 -290
- package/dist/react/components/PlaceEntryProvider.d.ts +3 -1
- package/dist/react/components/PropositionFilters.d.ts +3 -1
- package/dist/react/components/ScrollShelf.d.ts +5 -1
- package/dist/react/components/SportRail.d.ts +13 -7
- package/dist/react/components/SportSelector.d.ts +1 -1
- package/dist/react/components/_primitives/index.d.ts +4 -0
- package/dist/react/index.d.ts +2 -0
- package/dist/react/index.js +1 -1
- package/dist/react/index.mjs +288 -290
- package/dist/react/utils/index.d.ts +1 -1
- package/dist/react-native/components/LoadingIndicators.d.ts +1 -1
- package/dist/react-native/components/PlaceEntryProvider.d.ts +3 -1
- package/dist/react-native/components/PropositionFilters.d.ts +3 -1
- package/dist/react-native/components/ScrollShelf.d.ts +8 -1
- package/dist/react-native/components/SportRail.d.ts +13 -7
- package/dist/react-native/components/SportSelector.d.ts +1 -1
- package/dist/react-native/components/_primitives/index.d.ts +5 -1
- package/dist/react-native/index.d.ts +2 -0
- package/dist/react-native/index.js +1 -1
- package/dist/react-native/index.mjs +378 -381
- package/dist/react-native/utils/index.d.ts +1 -1
- package/dist/shared/date-filters.d.ts +5 -4
- package/dist/shared/hooks.d.ts +1 -1
- package/dist/shared/picker-brand.d.ts +22 -0
- package/dist/shared/selection-actions.d.ts +3 -2
- package/dist/shared/selection-caps.d.ts +4 -0
- package/dist/shared/types.d.ts +6 -0
- package/dist/shared/utils.d.ts +11 -1
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { YesNoLabels } from '../../shared/utils';
|
|
2
3
|
import { Game, Proposition, SportSummary, GameEntry, TopPayoutsResponse, ShareData, ScreenSize } from '../types';
|
|
3
4
|
import { BladeTheme, BladeThemeSet, ColorScheme } from '../utils/themes';
|
|
4
5
|
import { SportDisplayNameOverrides, CategoryDisplayNameOverrides } from '../utils';
|
|
@@ -141,6 +142,7 @@ export interface PlaceEntryProviderProps {
|
|
|
141
142
|
renderPropositionSilk?: RenderPropositionSilk;
|
|
142
143
|
selectionVariant?: SelectionVariant;
|
|
143
144
|
disableEventSwipe?: boolean;
|
|
145
|
+
yesNoLabels?: YesNoLabels;
|
|
144
146
|
enableSportFavourites?: boolean;
|
|
145
147
|
onEntryPlaced?: (entry: GameEntry) => void;
|
|
146
148
|
onBeforeSubmit?: (betAmount: number) => void | Promise<void>;
|
|
@@ -155,4 +157,4 @@ export interface PlaceEntryProviderProps {
|
|
|
155
157
|
/** Map entry categories to UI labels. */
|
|
156
158
|
categoryDisplayNames?: CategoryDisplayNameOverrides;
|
|
157
159
|
}
|
|
158
|
-
export declare function PlaceEntryProvider({ apiUrl, apiKey, fetchImpl, getAuthHeaders, userId, getUserBalance, children, theme: themeProp, colorScheme, demoGames, demoPropositions, demoEntries, demoMaxPayouts, gameCategory, jurisdiction, initialGameId, filterSport, initialSport, initialEventId, initialEventLabel, sportBaseKey, disableQuickPick, renderTeamLogo, renderPropositionSilk, selectionVariant, disableEventSwipe, enableSportFavourites, onEntryPlaced, onBeforeSubmit, onCancel, onShare, onRecharge, onClearEventFilter, screenSize, howToPlayMarkdown: howToPlayMarkdownProp, sportDisplayNames, categoryDisplayNames, }: PlaceEntryProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
160
|
+
export declare function PlaceEntryProvider({ apiUrl, apiKey, fetchImpl, getAuthHeaders, userId, getUserBalance, children, theme: themeProp, colorScheme, demoGames, demoPropositions, demoEntries, demoMaxPayouts, gameCategory, jurisdiction, initialGameId, filterSport, initialSport, initialEventId, initialEventLabel, sportBaseKey, disableQuickPick, renderTeamLogo, renderPropositionSilk, selectionVariant, disableEventSwipe, enableSportFavourites, yesNoLabels, onEntryPlaced, onBeforeSubmit, onCancel, onShare, onRecharge, onClearEventFilter, screenSize, howToPlayMarkdown: howToPlayMarkdownProp, sportDisplayNames, categoryDisplayNames, }: PlaceEntryProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,9 +6,10 @@ export interface FilterChipOption {
|
|
|
6
6
|
export interface FilterChipGroup {
|
|
7
7
|
label?: string;
|
|
8
8
|
options: FilterChipOption[];
|
|
9
|
-
value: string | null;
|
|
9
|
+
value: string | null | string[];
|
|
10
10
|
onChange: (value: string | null) => void;
|
|
11
11
|
}
|
|
12
|
+
export declare function isChipActive(groupValue: FilterChipGroup['value'], optValue: string | null): boolean;
|
|
12
13
|
export interface FilterChipCarouselProps {
|
|
13
14
|
groups: FilterChipGroup[];
|
|
14
15
|
theme: BladeTheme;
|
|
@@ -22,3 +23,4 @@ export interface FilterChipRowProps extends FilterChipGroup {
|
|
|
22
23
|
className?: string;
|
|
23
24
|
}
|
|
24
25
|
export declare function FilterChipRow({ label, options, value, onChange, theme, bodyFont, className, }: FilterChipRowProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare function FilterChipPanel({ groups, theme, bodyFont, className }: FilterChipCarouselProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -6,6 +6,10 @@ export interface ScrollShelfProps {
|
|
|
6
6
|
itemCount?: number;
|
|
7
7
|
/** Extra padding inside the scroller — cards need room for their shadow. */
|
|
8
8
|
contentClassName?: string;
|
|
9
|
+
/** Colour the edge fades melt into. Defaults to the page background. */
|
|
10
|
+
fadeColor?: string;
|
|
11
|
+
/** Drop the arrow discs — they overhang, which a pill-shaped shelf clips. */
|
|
12
|
+
hideArrows?: boolean;
|
|
9
13
|
className?: string;
|
|
10
14
|
/**
|
|
11
15
|
* `dragged()` is true right after a mouse drag-scroll, so item click handlers
|
|
@@ -18,4 +22,4 @@ export interface ScrollShelfProps {
|
|
|
18
22
|
* edge fades that say "more this way", and mouse-only arrow discs. Shared so
|
|
19
23
|
* the filter chips and the sport rail scroll identically.
|
|
20
24
|
*/
|
|
21
|
-
export declare function ScrollShelf({ theme, itemCount, contentClassName, className, children, }: ScrollShelfProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare function ScrollShelf({ theme, itemCount, contentClassName, fadeColor, hideArrows, className, children, }: ScrollShelfProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,17 +4,23 @@ export interface SportRailProps {
|
|
|
4
4
|
label?: string | null;
|
|
5
5
|
/** Line under the heading. Pass `null` to drop it; omit for the default hint. */
|
|
6
6
|
sublabel?: string | null;
|
|
7
|
-
/**
|
|
8
|
-
|
|
7
|
+
/** Controls parked on the heading's right — the track keeps the full width. */
|
|
8
|
+
actions?: React.ReactNode;
|
|
9
9
|
className?: string;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
|
-
* The sport step
|
|
13
|
-
* setup page
|
|
14
|
-
*
|
|
15
|
-
*
|
|
12
|
+
* The sport step. It sits on a game's setup page, and — for the games that have
|
|
13
|
+
* no setup page — above the proposition list, so there is always one place to
|
|
14
|
+
* change it. Never on the game grid.
|
|
15
|
+
*
|
|
16
|
+
* One oval track: every sport rides it as its short code, and the selected one
|
|
17
|
+
* opens out to its full name on a filled thumb. Codes keep the track compact,
|
|
18
|
+
* the selection says what it is in plain English.
|
|
19
|
+
*
|
|
20
|
+
* A bet is one sport: once the slip has picks the track locks, and the only way
|
|
21
|
+
* across is to clear the bet — silently wiping the card on a mis-tap was worse.
|
|
16
22
|
*
|
|
17
23
|
* Renders nothing at all when the sport is not a choice, which is every
|
|
18
24
|
* single-sport game.
|
|
19
25
|
*/
|
|
20
|
-
export declare function SportRail({ label, sublabel,
|
|
26
|
+
export declare function SportRail({ label, sublabel, actions, className }: SportRailProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -42,4 +42,4 @@ export declare function CompositePropositionText({ prop, colors: c, size, compon
|
|
|
42
42
|
*/
|
|
43
43
|
renderTeamLogo?: RenderTeamLogo;
|
|
44
44
|
}): import("react/jsx-runtime").JSX.Element;
|
|
45
|
-
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;
|
|
45
|
+
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;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { default as React, CSSProperties, MouseEvent, ReactNode } from 'react';
|
|
2
2
|
import { BladeTheme } from '../../../shared/themes';
|
|
3
|
+
import { YesNoLabels } from '../../../shared/utils';
|
|
3
4
|
/** Minimum hit area for anything tappable, in px (Apple 44pt / Material 48dp). Shrink the paint, never the target. */
|
|
4
5
|
export declare const TOUCH_TARGET = 44;
|
|
5
6
|
export declare function useBreakpoint(minWidth?: number): boolean;
|
|
@@ -69,6 +70,9 @@ export declare function Divider({ theme, orientation, style, }: {
|
|
|
69
70
|
export type YesNoValue = 'yes' | 'no';
|
|
70
71
|
export type YesNoAnswer = YesNoValue | null | undefined;
|
|
71
72
|
export type YesNoSize = 'xs' | 'sm' | 'md';
|
|
73
|
+
export type { YesNoLabels };
|
|
74
|
+
export declare const YesNoLabelsProvider: React.Provider<YesNoLabels>;
|
|
75
|
+
export declare function useYesNoLabels(): YesNoLabels;
|
|
72
76
|
export interface YesNoButtonsProps {
|
|
73
77
|
theme: BladeTheme;
|
|
74
78
|
/** Currently selected side, if any. */
|
package/dist/react/index.d.ts
CHANGED
|
@@ -14,6 +14,8 @@ export { GameEntries } from './components/GameEntries';
|
|
|
14
14
|
export { QuickPickButton } from './components/QuickPickButton';
|
|
15
15
|
export type { QuickPickButtonProps } from './components/QuickPickButton';
|
|
16
16
|
export { PlaceEntryProvider, usePlaceEntry } from './components/PlaceEntryProvider';
|
|
17
|
+
export { useYesNoLabels } from './components/_primitives';
|
|
18
|
+
export type { YesNoLabels } from '../shared/utils';
|
|
17
19
|
export type { PlaceEntryProviderProps, PlaceEntryContextValue } from './components/PlaceEntryProvider';
|
|
18
20
|
export { GamePage, GamePageTitle, GamePageActions } from './components/GamePage';
|
|
19
21
|
export type { GamePageProps } from './components/GamePage';
|