@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.
Files changed (160) hide show
  1. package/dist/index.cjs +1 -0
  2. package/dist/index.d.ts +1 -1
  3. package/dist/index.mjs +653 -451
  4. package/dist/react/components/CallGameCatalogue.d.ts +4 -0
  5. package/dist/react/components/CallPayoutTable.d.ts +12 -0
  6. package/dist/react/components/CallTicketBuilder.d.ts +3 -0
  7. package/dist/react/components/CorrelationChoicesSkeleton.d.ts +4 -0
  8. package/dist/react/components/CorrelationPricingDebug.d.ts +2 -0
  9. package/dist/react/components/CorrelationPropPlaceholder.d.ts +13 -0
  10. package/dist/react/components/DenseGameCatalogue.d.ts +2 -0
  11. package/dist/react/components/DenseUi.d.ts +30 -0
  12. package/dist/react/components/EntriesPage.d.ts +0 -4
  13. package/dist/react/components/EntrySubmission.d.ts +1 -1
  14. package/dist/react/components/EventSwipeModal.d.ts +4 -0
  15. package/dist/react/components/GameCardParts.d.ts +28 -0
  16. package/dist/react/components/GameModeCard.d.ts +37 -6
  17. package/dist/react/components/GamePage.d.ts +3 -1
  18. package/dist/react/components/GameSelector.d.ts +1 -19
  19. package/dist/react/components/GameSetupPage.d.ts +6 -2
  20. package/dist/react/components/GameShelfCatalogue.d.ts +2 -0
  21. package/dist/react/components/GameShowcaseCatalogue.d.ts +11 -0
  22. package/dist/react/components/GameSkeletons.d.ts +24 -0
  23. package/dist/react/components/GameVariantCatalogue.d.ts +6 -0
  24. package/dist/react/components/HowToPlayButton.d.ts +5 -2
  25. package/dist/react/components/LoadingIndicators.d.ts +27 -10
  26. package/dist/react/components/MatchRail.d.ts +52 -0
  27. package/dist/react/components/MatchTopBar.d.ts +19 -0
  28. package/dist/react/components/MultiLegTable.d.ts +5 -1
  29. package/dist/react/components/PageBackButton.d.ts +35 -6
  30. package/dist/react/components/PageSkeletons.d.ts +24 -0
  31. package/dist/react/components/PickGroupSection.d.ts +37 -0
  32. package/dist/react/components/PickerBrand.d.ts +0 -5
  33. package/dist/react/components/PicksSkeletons.d.ts +30 -0
  34. package/dist/react/components/PlaceEntryProvider.d.ts +75 -6
  35. package/dist/react/components/PlaybookChooser.d.ts +7 -0
  36. package/dist/react/components/PropositionFilters.d.ts +2 -1
  37. package/dist/react/components/PropositionParts.d.ts +38 -0
  38. package/dist/react/components/QuickPickButton.d.ts +26 -1
  39. package/dist/react/components/QuickPickMenu.d.ts +19 -1
  40. package/dist/react/components/SafetyNetPage.d.ts +4 -1
  41. package/dist/react/components/ScrollShelf.d.ts +5 -1
  42. package/dist/react/components/SelectionReview.d.ts +1 -1
  43. package/dist/react/components/SelectionsPage.d.ts +7 -2
  44. package/dist/react/components/ShelfKit.d.ts +43 -0
  45. package/dist/react/components/SportRail.d.ts +13 -7
  46. package/dist/react/components/SportSelector.d.ts +2 -24
  47. package/dist/react/components/SuccessPage.d.ts +4 -2
  48. package/dist/react/components/SwipeDeck.d.ts +32 -3
  49. package/dist/react/components/YesNoMultiLogo.d.ts +13 -0
  50. package/dist/react/components/_primitives/index.d.ts +54 -13
  51. package/dist/react/index.cjs +1 -0
  52. package/dist/react/index.d.ts +46 -19
  53. package/dist/react/index.mjs +653 -451
  54. package/dist/react/utils/dom.d.ts +7 -0
  55. package/dist/react/utils/index.d.ts +1 -1
  56. package/dist/react/utils/themes.d.ts +1 -1
  57. package/dist/react-native/components/CallGameCatalogue.d.ts +17 -0
  58. package/dist/react-native/components/CallPayoutTable.d.ts +12 -0
  59. package/dist/react-native/components/CallTicketBuilder.d.ts +33 -0
  60. package/dist/react-native/components/CorrelationChoicesSkeleton.d.ts +3 -0
  61. package/dist/react-native/components/CorrelationPricingDebug.d.ts +2 -0
  62. package/dist/react-native/components/CorrelationPropPlaceholder.d.ts +7 -0
  63. package/dist/react-native/components/DenseGameCatalogue.d.ts +2 -0
  64. package/dist/react-native/components/DenseUi.d.ts +52 -0
  65. package/dist/react-native/components/EntrySubmission.d.ts +1 -1
  66. package/dist/react-native/components/EventSwipeModal.d.ts +5 -0
  67. package/dist/react-native/components/GameCardParts.d.ts +29 -0
  68. package/dist/react-native/components/GameModeCard.d.ts +34 -5
  69. package/dist/react-native/components/GamePage.d.ts +4 -1
  70. package/dist/react-native/components/GameSelector.d.ts +1 -20
  71. package/dist/react-native/components/GameSetupPage.d.ts +5 -14
  72. package/dist/react-native/components/GameShelfCatalogue.d.ts +2 -0
  73. package/dist/react-native/components/GameSkeletons.d.ts +23 -0
  74. package/dist/react-native/components/HowToPlayButton.d.ts +5 -2
  75. package/dist/react-native/components/LoadingIndicators.d.ts +23 -11
  76. package/dist/react-native/components/MatchRail.d.ts +57 -0
  77. package/dist/react-native/components/MatchTopBar.d.ts +17 -0
  78. package/dist/react-native/components/MultiLegTable.d.ts +5 -1
  79. package/dist/react-native/components/PageBackButton.d.ts +32 -9
  80. package/dist/react-native/components/PageSkeletons.d.ts +23 -0
  81. package/dist/react-native/components/PickGroupSection.d.ts +37 -0
  82. package/dist/react-native/components/PickerBrand.d.ts +0 -4
  83. package/dist/react-native/components/PicksSkeletons.d.ts +31 -0
  84. package/dist/react-native/components/PlaceEntryProvider.d.ts +68 -6
  85. package/dist/react-native/components/PlaybookChooser.d.ts +7 -0
  86. package/dist/react-native/components/PropositionFilters.d.ts +2 -1
  87. package/dist/react-native/components/PropositionParts.d.ts +35 -0
  88. package/dist/react-native/components/QuickPickButton.d.ts +26 -1
  89. package/dist/react-native/components/QuickPickMenu.d.ts +20 -1
  90. package/dist/react-native/components/SafetyNetPage.d.ts +4 -1
  91. package/dist/react-native/components/ScrollShelf.d.ts +8 -1
  92. package/dist/react-native/components/SelectionReview.d.ts +1 -1
  93. package/dist/react-native/components/SelectionsPage.d.ts +6 -2
  94. package/dist/react-native/components/ShelfKit.d.ts +62 -0
  95. package/dist/react-native/components/SportRail.d.ts +13 -7
  96. package/dist/react-native/components/SportSelector.d.ts +2 -29
  97. package/dist/react-native/components/SuccessPage.d.ts +4 -2
  98. package/dist/react-native/components/SwipeDeck.d.ts +37 -3
  99. package/dist/react-native/components/YesNoMultiLogo.d.ts +12 -0
  100. package/dist/react-native/components/_primitives/index.d.ts +93 -12
  101. package/dist/react-native/index.cjs +1 -0
  102. package/dist/react-native/index.d.ts +46 -19
  103. package/dist/react-native/index.mjs +561 -437
  104. package/dist/react-native/utils/index.d.ts +1 -1
  105. package/dist/react-native/utils/themes.d.ts +1 -1
  106. package/dist/shared/api-client.d.ts +4 -3
  107. package/dist/shared/button-ui.d.ts +62 -0
  108. package/dist/shared/call-presentation.d.ts +28 -0
  109. package/dist/shared/canvas.d.ts +14 -0
  110. package/dist/shared/correlation-steering.d.ts +56 -0
  111. package/dist/shared/date-filters.d.ts +0 -22
  112. package/dist/shared/dense-ui.d.ts +54 -0
  113. package/dist/shared/entry-progress.d.ts +38 -0
  114. package/dist/shared/game-artwork.d.ts +63 -0
  115. package/dist/shared/game-flow.d.ts +34 -1
  116. package/dist/shared/game-icons.d.ts +8 -4
  117. package/dist/shared/game-library.d.ts +58 -0
  118. package/dist/shared/game-set-bet.d.ts +0 -1
  119. package/dist/shared/game-shelf-artwork.d.ts +3 -0
  120. package/dist/shared/game-shelf-presentation.d.ts +79 -0
  121. package/dist/shared/game-variants.d.ts +5 -0
  122. package/dist/shared/hooks.d.ts +8 -8
  123. package/dist/shared/how-to-play-html.d.ts +1 -1
  124. package/dist/shared/how-to-play-logo.d.ts +1 -1
  125. package/dist/shared/menu-placement.d.ts +26 -0
  126. package/dist/shared/mirror.d.ts +55 -5
  127. package/dist/shared/picker-brand.d.ts +22 -6
  128. package/dist/shared/playbook.d.ts +29 -0
  129. package/dist/shared/selection-actions.d.ts +82 -4
  130. package/dist/shared/selection-caps.d.ts +124 -0
  131. package/dist/shared/selection-variants.d.ts +10 -1
  132. package/dist/shared/shelf-covers.d.ts +92 -0
  133. package/dist/shared/shelf-ui.d.ts +47 -0
  134. package/dist/shared/swipe-deck.d.ts +11 -1
  135. package/dist/shared/themes.d.ts +70 -8
  136. package/dist/shared/tokens.d.ts +7 -0
  137. package/dist/shared/types.d.ts +49 -3
  138. package/dist/shared/ui-system.d.ts +70 -0
  139. package/dist/shared/ui-variant.d.ts +16 -0
  140. package/dist/shared/use-call-payouts.d.ts +8 -0
  141. package/dist/shared/utils.d.ts +20 -7
  142. package/package.json +7 -8
  143. package/dist/index.js +0 -1
  144. package/dist/react/components/GameSetBetPage.d.ts +0 -21
  145. package/dist/react/components/LadderPage.d.ts +0 -21
  146. package/dist/react/components/MirrorPage.d.ts +0 -21
  147. package/dist/react/components/PerfectPickPage.d.ts +0 -22
  148. package/dist/react/components/PickYourDividendPage.d.ts +0 -21
  149. package/dist/react/components/RuleSetupPage.d.ts +0 -27
  150. package/dist/react/components/SixAgainPage.d.ts +0 -16
  151. package/dist/react/index.js +0 -1
  152. package/dist/react/utils/design.d.ts +0 -55
  153. package/dist/react-native/components/GameSetBetPage.d.ts +0 -19
  154. package/dist/react-native/components/LadderPage.d.ts +0 -19
  155. package/dist/react-native/components/MirrorPage.d.ts +0 -19
  156. package/dist/react-native/components/PerfectPickPage.d.ts +0 -20
  157. package/dist/react-native/components/PickYourDividendPage.d.ts +0 -19
  158. package/dist/react-native/components/RuleSetupPage.d.ts +0 -23
  159. package/dist/react-native/components/SixAgainPage.d.ts +0 -14
  160. package/dist/react-native/index.js +0 -1
@@ -1,8 +1,8 @@
1
1
  import { default as React } from 'react';
2
2
  import { BladeTheme } from '../utils/themes';
3
- import { FlyDirection } from '../../shared/swipe-deck';
3
+ import { FlyDirection, SwipeVariant } from '../../shared/swipe-deck';
4
4
  import { Proposition } from '../../shared/types';
5
- export type { FlyDirection };
5
+ export type { FlyDirection, SwipeVariant };
6
6
  export interface SwipeCardApi {
7
7
  fly: (direction: FlyDirection) => void;
8
8
  }
@@ -13,16 +13,45 @@ export interface SwipeCardProps {
13
13
  depth?: number;
14
14
  enterFrom?: FlyDirection | null;
15
15
  canSkip?: boolean;
16
+ /** `run` shows only the top card and fades it instead of stamping it. @default 'stack' */
17
+ variant?: SwipeVariant;
16
18
  onResolve: (id: number, answer: 'yes' | 'no' | null) => void;
17
19
  registerApi?: (api: SwipeCardApi | null) => void;
18
20
  onDragStateChange?: (dragging: boolean) => void;
19
21
  children: React.ReactNode;
20
22
  }
21
- export declare function SwipeCard({ prop, theme: themeProp, depth, enterFrom, canSkip, onResolve, registerApi, onDragStateChange, children, }: SwipeCardProps): import("react/jsx-runtime").JSX.Element;
23
+ export declare function SwipeCard({ prop, theme: themeProp, depth, enterFrom, canSkip, variant, onResolve, registerApi, onDragStateChange, children, }: SwipeCardProps): import("react/jsx-runtime").JSX.Element;
22
24
  export interface SwipeCardFaceProps {
23
25
  prop: Proposition;
24
26
  }
25
27
  export declare function SwipeCardFace({ prop }: SwipeCardFaceProps): import("react/jsx-runtime").JSX.Element;
28
+ /**
29
+ * Set by {@link SwipeRunControls}: flies a copy of a new pick's tile from the
30
+ * pad that made it onto `tile`. Returns a cancel, or null when it can't fly.
31
+ */
32
+ export type RunLaunch = (answer: 'yes' | 'no', tile: HTMLElement) => (() => void) | null;
33
+ /**
34
+ * The run's picks, numbered top-down beside the question — 1 is the first. A pick
35
+ * made here flies in from its pad when `launch` is wired to the controls;
36
+ * the rest drop in. Tapping one hands it to `onRecall` to be answered again.
37
+ */
38
+ export declare function SwipeRunStack({ launch, onRecall, canRecall }: {
39
+ launch?: React.MutableRefObject<RunLaunch | null>;
40
+ onRecall?: (id: number) => void;
41
+ canRecall?: (id: number) => boolean;
42
+ }): import("react/jsx-runtime").JSX.Element;
43
+ export interface SwipeRunControlsProps {
44
+ onFly: (direction: FlyDirection) => void;
45
+ onUndo: () => void;
46
+ canUndo: boolean;
47
+ canSkip: boolean;
48
+ /** Whether the top card can take this answer right now. */
49
+ canAnswer: (answer: 'yes' | 'no') => boolean;
50
+ /** Shared with {@link SwipeRunStack} so new picks fly from these pads. */
51
+ launch?: React.MutableRefObject<RunLaunch | null>;
52
+ }
53
+ /** The run's controls: tall Yes/No pads with the gesture spelt out, then Undo and Skip. */
54
+ export declare function SwipeRunControls({ onFly, onUndo, canUndo, canSkip, canAnswer, launch }: SwipeRunControlsProps): import("react/jsx-runtime").JSX.Element;
26
55
  export interface SwipeDeckProps {
27
56
  onBack?: () => void;
28
57
  onNext?: () => void;
@@ -0,0 +1,13 @@
1
+ export interface YesNoMultiLogoProps {
2
+ /** Wordmark font size in px; the tiles and pipe scale with it. @default 22 */
3
+ size?: number;
4
+ className?: string;
5
+ }
6
+ /**
7
+ * The YESNO Multi horizontal logo: YESNO wordmark, the stacked-tile mark, a pipe, Multi®.
8
+ * Drawn in type and shapes from the brand master (62_YESNO_Multi_Horizontal.svg) so it
9
+ * follows the theme ink. RN twin: src/react-native/components/YesNoMultiLogo.tsx.
10
+ */
11
+ export declare function YesNoMultiLogo({ size, className }: YesNoMultiLogoProps): import("react/jsx-runtime").JSX.Element;
12
+ /** The page sign-off every page ends with: the logo, small and quiet, centred under the content. */
13
+ export declare function YesNoMultiFooter(): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,7 @@
1
1
  import { default as React, CSSProperties, MouseEvent, ReactNode } from 'react';
2
2
  import { BladeTheme } from '../../../shared/themes';
3
+ import { ButtonVariant, ButtonSize } from '../../../shared/button-ui';
4
+ import { YesNoLabels } from '../../../shared/utils';
3
5
  /** Minimum hit area for anything tappable, in px (Apple 44pt / Material 48dp). Shrink the paint, never the target. */
4
6
  export declare const TOUCH_TARGET = 44;
5
7
  export declare function useBreakpoint(minWidth?: number): boolean;
@@ -31,23 +33,57 @@ export declare function Stack({ gap, align, justify, className, style, children,
31
33
  export declare function Row({ gap, align, justify, wrap, className, style, children, as, }: StackProps & {
32
34
  wrap?: boolean;
33
35
  }): import("react/jsx-runtime").JSX.Element;
34
- export type PressableVariant = 'primary' | 'secondary' | 'ghost' | 'danger';
35
- export interface PressableProps {
36
+ type PressHandlers = Pick<React.DOMAttributes<HTMLElement>, 'onMouseEnter' | 'onMouseLeave' | 'onPointerDown' | 'onPointerUp' | 'onFocus' | 'onBlur'>;
37
+ /**
38
+ * The one hover / press / keyboard-focus tracker behind every tappable control.
39
+ * Pass the caller's own handlers so both run. RN twin: `usePress` in RN _primitives.
40
+ */
41
+ export declare function usePress(theirs?: PressHandlers): {
42
+ hovered: boolean;
43
+ pressed: boolean;
44
+ focused: boolean;
45
+ handlers: PressHandlers;
46
+ };
47
+ /** The shared transition + press sink for anything built on `usePress`. */
48
+ export declare function pressMotion(theme: BladeTheme, pressed: boolean, disabled?: boolean): CSSProperties;
49
+ export interface ButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'style'> {
36
50
  theme: BladeTheme;
37
- variant?: PressableVariant;
38
- size?: 'sm' | 'md' | 'lg';
39
- disabled?: boolean;
51
+ /** primary: the screen's main action. secondary: the filled alternative. quiet: a tint pill for small actions. */
52
+ variant?: ButtonVariant;
53
+ /** lg (52) for the page's main action; md (44) everywhere else. */
54
+ size?: ButtonSize;
40
55
  block?: boolean;
41
- radius?: 'sm' | 'md' | 'lg' | 'pill';
56
+ /** onClick without the event. */
42
57
  onPress?: () => void;
43
- onDoubleClick?: () => void;
44
- type?: 'button' | 'submit';
45
- className?: string;
46
58
  style?: CSSProperties;
47
- children?: ReactNode;
48
- ariaLabel?: string;
49
59
  }
50
- export declare const Pressable: React.ForwardRefExoticComponent<PressableProps & React.RefAttributes<HTMLButtonElement>>;
60
+ /** The kit's one action button. Chips, icon buttons and Yes/No have their own components. */
61
+ export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
62
+ export interface PressCardProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'style'> {
63
+ theme: BladeTheme;
64
+ /** Hold the primary ring: the chosen card, or a keyboard-focused row. */
65
+ lit?: boolean;
66
+ /** The card's own shape. Give its border as borderWidth / borderStyle — the card owns borderColor. */
67
+ style?: CSSProperties;
68
+ }
69
+ /** A whole card that is one button. It keeps its own shape; its hairline turns primary on hover and it sinks on press. */
70
+ export declare const PressCard: React.ForwardRefExoticComponent<PressCardProps & React.RefAttributes<HTMLButtonElement>>;
71
+ export type IconButtonProps = Omit<ButtonProps, 'variant' | 'size' | 'block'> & {
72
+ 'aria-label': string;
73
+ size?: number;
74
+ tone?: 'default' | 'danger';
75
+ };
76
+ /**
77
+ * Icon-only button (back, close, remove, previous / next): a round disc with a
78
+ * hairline ring and the shared hover tint. `size` is the painted disc; the hit
79
+ * area never drops below 44 — a smaller disc keeps its own footprint in the
80
+ * layout and reaches out with negative margins.
81
+ */
82
+ export declare const IconButton: React.ForwardRefExoticComponent<Omit<ButtonProps, "variant" | "size" | "block"> & {
83
+ 'aria-label': string;
84
+ size?: number;
85
+ tone?: "default" | "danger";
86
+ } & React.RefAttributes<HTMLButtonElement>>;
51
87
  export interface TextProps {
52
88
  theme: BladeTheme;
53
89
  variant?: 'display' | 'heading' | 'subheading' | 'body' | 'caption' | 'eyebrow';
@@ -69,6 +105,9 @@ export declare function Divider({ theme, orientation, style, }: {
69
105
  export type YesNoValue = 'yes' | 'no';
70
106
  export type YesNoAnswer = YesNoValue | null | undefined;
71
107
  export type YesNoSize = 'xs' | 'sm' | 'md';
108
+ export type { YesNoLabels };
109
+ export declare const YesNoLabelsProvider: React.Provider<YesNoLabels>;
110
+ export declare function useYesNoLabels(): YesNoLabels;
72
111
  export interface YesNoButtonsProps {
73
112
  theme: BladeTheme;
74
113
  /** Currently selected side, if any. */
@@ -79,13 +118,15 @@ export interface YesNoButtonsProps {
79
118
  /** Fill the row, each side taking half — the roomy card layouts want this. */
80
119
  stretch?: boolean;
81
120
  disabled?: boolean;
121
+ yesDisabled?: boolean;
122
+ noDisabled?: boolean;
82
123
  yesLabel?: string;
83
124
  noLabel?: string;
84
125
  className?: string;
85
126
  style?: CSSProperties;
86
127
  }
87
128
  /** The interactive Yes/No pair. Identical everywhere it is used. */
88
- export declare function YesNoButtons({ theme, value, onYes, onNo, size, stretch, disabled, yesLabel, noLabel, className, style, }: YesNoButtonsProps): import("react/jsx-runtime").JSX.Element;
129
+ export declare function YesNoButtons({ theme, value, onYes, onNo, size, stretch, disabled, yesDisabled, noDisabled, yesLabel, noLabel, className, style, }: YesNoButtonsProps): import("react/jsx-runtime").JSX.Element;
89
130
  /** Read-only Yes/No chip — the settled answer, same product tokens. */
90
131
  export declare function YesNoTag({ theme, value, size, style, }: {
91
132
  theme: BladeTheme;