@fanfare-io/fanfare-sdk-solid 0.1.0
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/LICENSE +202 -0
- package/README.md +53 -0
- package/dist/components/auth/access-code-input.d.ts +17 -0
- package/dist/components/auth/auth-form.d.ts +34 -0
- package/dist/components/auth/auth-input.d.ts +19 -0
- package/dist/components/auth/email-input.d.ts +14 -0
- package/dist/components/auth/index.d.ts +6 -0
- package/dist/components/auth/otp-input.d.ts +21 -0
- package/dist/components/auth/phone-input.d.ts +14 -0
- package/dist/components/compositions/access-code-form.d.ts +25 -0
- package/dist/components/compositions/challenge-gate.d.ts +24 -0
- package/dist/components/compositions/ended-module.d.ts +13 -0
- package/dist/components/compositions/error-view.d.ts +21 -0
- package/dist/components/compositions/granted-panel.d.ts +14 -0
- package/dist/components/compositions/index.d.ts +14 -0
- package/dist/components/compositions/journey-gate.d.ts +27 -0
- package/dist/components/compositions/outcome-panel.d.ts +12 -0
- package/dist/components/internal/appointment-day-tabs.d.ts +18 -0
- package/dist/components/internal/appointment-module.d.ts +27 -0
- package/dist/components/internal/appointment-slot-grid.d.ts +9 -0
- package/dist/components/internal/appointment-slot-item.d.ts +9 -0
- package/dist/components/internal/auction-module.d.ts +32 -0
- package/dist/components/internal/draw-module.d.ts +27 -0
- package/dist/components/internal/index.d.ts +15 -0
- package/dist/components/internal/loading-view.d.ts +9 -0
- package/dist/components/internal/queue-module.d.ts +28 -0
- package/dist/components/internal/start-view.d.ts +19 -0
- package/dist/components/internal/timed-release-module.d.ts +28 -0
- package/dist/components/internal/upcoming-module.d.ts +15 -0
- package/dist/components/internal/waitlist-view.d.ts +14 -0
- package/dist/components/module/alert-panel.d.ts +17 -0
- package/dist/components/module/index.d.ts +5 -0
- package/dist/components/module/info-panel.d.ts +8 -0
- package/dist/components/module/outcome-reason.d.ts +27 -0
- package/dist/components/module/panel-heading.d.ts +13 -0
- package/dist/components/module/panel-layout.d.ts +21 -0
- package/dist/components/primitives/badge.d.ts +17 -0
- package/dist/components/primitives/button.d.ts +16 -0
- package/dist/components/primitives/card.d.ts +49 -0
- package/dist/components/primitives/countdown.d.ts +16 -0
- package/dist/components/primitives/fade-presence.d.ts +11 -0
- package/dist/components/primitives/fanfare-logo.d.ts +8 -0
- package/dist/components/primitives/index.d.ts +11 -0
- package/dist/components/primitives/input.d.ts +18 -0
- package/dist/components/primitives/progress.d.ts +11 -0
- package/dist/components/primitives/skeleton.d.ts +8 -0
- package/dist/components/primitives/spinner.d.ts +14 -0
- package/dist/components/primitives/transition.d.ts +13 -0
- package/dist/components/provider.d.ts +27 -0
- package/dist/components/web/fanfare-web-component-provider.d.ts +20 -0
- package/dist/components/web/web-component-styles.d.ts +4 -0
- package/dist/components/widgets/auction/auction-actions.d.ts +21 -0
- package/dist/components/widgets/auction/auction-bid-display.d.ts +19 -0
- package/dist/components/widgets/auction/index.d.ts +7 -0
- package/dist/components/widgets/draw/draw-actions.d.ts +22 -0
- package/dist/components/widgets/draw/index.d.ts +6 -0
- package/dist/components/widgets/experience-widget.d.ts +127 -0
- package/dist/components/widgets/index.d.ts +11 -0
- package/dist/components/widgets/queue/index.d.ts +6 -0
- package/dist/components/widgets/queue/queue-actions.d.ts +20 -0
- package/dist/components/widgets/timed-release/index.d.ts +6 -0
- package/dist/components/widgets/timed-release/timed-release-actions.d.ts +21 -0
- package/dist/components/widgets/waitlist/index.d.ts +6 -0
- package/dist/components/widgets/waitlist/waitlist-actions.d.ts +22 -0
- package/dist/hooks/index.d.ts +12 -0
- package/dist/hooks/use-auth.d.ts +11 -0
- package/dist/hooks/use-experience-journey.d.ts +17 -0
- package/dist/hooks/use-journey-snapshot.d.ts +8 -0
- package/dist/hooks/use-nanostore.d.ts +7 -0
- package/dist/i18n/i18n-context.d.ts +19 -0
- package/dist/i18n/i18n-provider.d.ts +16 -0
- package/dist/i18n/index.d.ts +12 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +6370 -0
- package/dist/internal-sdk.d.ts +2 -0
- package/dist/lib/animations.d.ts +31 -0
- package/dist/lib/appointment-format.d.ts +26 -0
- package/dist/lib/confetti.d.ts +3 -0
- package/dist/lib/currency.d.ts +9 -0
- package/dist/lib/phone-formatter-lite.d.ts +4 -0
- package/dist/lib/use-grant-celebration.d.ts +2 -0
- package/dist/lib/utils.d.ts +13 -0
- package/dist/register.d.ts +52 -0
- package/dist/styles/base.css +2301 -0
- package/dist/styles/index.d.ts +2 -0
- package/dist/styles/theme.css +82 -0
- package/dist/theme/index.d.ts +8 -0
- package/dist/theme/theme-context.d.ts +10 -0
- package/dist/theme/theme-provider.d.ts +15 -0
- package/dist/theme/theme-utils.d.ts +6 -0
- package/dist/theme/theme.types.d.ts +47 -0
- package/dist/theme/use-theme.d.ts +8 -0
- package/dist/utils/solid.d.ts +1 -0
- package/dist/utils/to-accessor.d.ts +3 -0
- package/docs/SLOTS.md +91 -0
- package/package.json +128 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { DrawDisplayState } from '@fanfare-io/fanfare-sdk-core/internals';
|
|
2
|
+
import { ReadableAtom } from 'nanostores';
|
|
3
|
+
import { OutcomeReason } from '../module';
|
|
4
|
+
export interface DrawModuleProps {
|
|
5
|
+
state$?: ReadableAtom<DrawDisplayState>;
|
|
6
|
+
sequencePhase: "enterable" | "participating" | "settling" | "granted" | "ended";
|
|
7
|
+
canEnter: boolean;
|
|
8
|
+
canLeave: boolean;
|
|
9
|
+
onEnter: () => Promise<void>;
|
|
10
|
+
onLeave: () => Promise<void>;
|
|
11
|
+
isEntering: boolean;
|
|
12
|
+
isLeaving: boolean;
|
|
13
|
+
countdownTo?: Date;
|
|
14
|
+
grant?: string;
|
|
15
|
+
expiresAt?: number | Date;
|
|
16
|
+
checkoutUrl?: string;
|
|
17
|
+
onCheckoutClick?: () => void;
|
|
18
|
+
outcomeReason?: OutcomeReason;
|
|
19
|
+
onReenter?: () => Promise<void>;
|
|
20
|
+
isReentering?: boolean;
|
|
21
|
+
class?: string;
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare function DrawModule(props: DrawModuleProps): import("solid-js").JSX.Element;
|
|
25
|
+
export declare namespace DrawModule {
|
|
26
|
+
var displayName: string;
|
|
27
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal Widget Views
|
|
3
|
+
*
|
|
4
|
+
* These are internal components used by ExperienceWidget for stage rendering.
|
|
5
|
+
* Not exported publicly in the React package (but Solid may export for advanced usage).
|
|
6
|
+
*/
|
|
7
|
+
export { LoadingView, type LoadingViewProps } from './loading-view';
|
|
8
|
+
export { StartView, type StartViewProps } from './start-view';
|
|
9
|
+
export { WaitlistView, type WaitlistViewProps } from './waitlist-view';
|
|
10
|
+
export { AppointmentModule, type AppointmentModuleProps } from './appointment-module';
|
|
11
|
+
export { AuctionModule, type AuctionModuleProps } from './auction-module';
|
|
12
|
+
export { DrawModule, type DrawModuleProps } from './draw-module';
|
|
13
|
+
export { QueueModule, type QueueModuleProps } from './queue-module';
|
|
14
|
+
export { TimedReleaseModule, type TimedReleaseModuleProps } from './timed-release-module';
|
|
15
|
+
export { UpcomingModule, type UpcomingModuleProps } from './upcoming-module';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface LoadingViewProps {
|
|
2
|
+
message?: string;
|
|
3
|
+
class?: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function LoadingView(props: LoadingViewProps): import("solid-js").JSX.Element;
|
|
7
|
+
export declare namespace LoadingView {
|
|
8
|
+
var displayName: string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { QueueDisplayState } from '@fanfare-io/fanfare-sdk-core/internals';
|
|
2
|
+
import { ReadableAtom } from 'nanostores';
|
|
3
|
+
import { OutcomeReason } from '../module';
|
|
4
|
+
export interface QueueModuleProps {
|
|
5
|
+
state$?: ReadableAtom<QueueDisplayState>;
|
|
6
|
+
sequencePhase: "enterable" | "participating" | "granted" | "ended";
|
|
7
|
+
canEnter: boolean;
|
|
8
|
+
canLeave: boolean;
|
|
9
|
+
onEnter: () => Promise<void>;
|
|
10
|
+
onLeave: () => Promise<void>;
|
|
11
|
+
isEntering: boolean;
|
|
12
|
+
isLeaving: boolean;
|
|
13
|
+
/** When the queue stops accepting entries — drives the "Queue closes in" countdown. */
|
|
14
|
+
closeAt?: Date;
|
|
15
|
+
grant?: string;
|
|
16
|
+
expiresAt?: number | Date;
|
|
17
|
+
checkoutUrl?: string;
|
|
18
|
+
onCheckoutClick?: () => void;
|
|
19
|
+
outcomeReason?: OutcomeReason;
|
|
20
|
+
onReenter?: () => Promise<void>;
|
|
21
|
+
isReentering?: boolean;
|
|
22
|
+
class?: string;
|
|
23
|
+
className?: string;
|
|
24
|
+
}
|
|
25
|
+
export declare function QueueModule(props: QueueModuleProps): import("solid-js").JSX.Element;
|
|
26
|
+
export declare namespace QueueModule {
|
|
27
|
+
var displayName: string;
|
|
28
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
2
|
+
import { PanelHeadingVariant } from '../module';
|
|
3
|
+
export interface StartViewProps {
|
|
4
|
+
variant?: PanelHeadingVariant;
|
|
5
|
+
label?: JSX.Element;
|
|
6
|
+
title?: JSX.Element;
|
|
7
|
+
description?: JSX.Element;
|
|
8
|
+
countdownTo?: Date;
|
|
9
|
+
info?: JSX.Element;
|
|
10
|
+
ctaLabel?: JSX.Element;
|
|
11
|
+
onStart?: () => void;
|
|
12
|
+
isLoading?: boolean;
|
|
13
|
+
class?: string;
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function StartView(props: StartViewProps): JSX.Element;
|
|
17
|
+
export declare namespace StartView {
|
|
18
|
+
var displayName: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { TimedReleaseDisplayState } from '@fanfare-io/fanfare-sdk-core/internals';
|
|
2
|
+
import { ReadableAtom } from 'nanostores';
|
|
3
|
+
import { OutcomeReason } from '../module';
|
|
4
|
+
export interface TimedReleaseModuleProps {
|
|
5
|
+
state$?: ReadableAtom<TimedReleaseDisplayState>;
|
|
6
|
+
sequencePhase: "enterable" | "participating" | "granted" | "ended";
|
|
7
|
+
canEnter: boolean;
|
|
8
|
+
canLeave: boolean;
|
|
9
|
+
onEnter: () => Promise<void>;
|
|
10
|
+
onLeave: () => Promise<void>;
|
|
11
|
+
onComplete?: () => Promise<void>;
|
|
12
|
+
isEntering: boolean;
|
|
13
|
+
isLeaving: boolean;
|
|
14
|
+
countdownTo?: Date;
|
|
15
|
+
checkoutUrl?: string;
|
|
16
|
+
onCheckoutClick?: () => void;
|
|
17
|
+
grant?: string;
|
|
18
|
+
expiresAt?: number | Date;
|
|
19
|
+
outcomeReason?: OutcomeReason;
|
|
20
|
+
onReenter?: () => Promise<void>;
|
|
21
|
+
isReentering?: boolean;
|
|
22
|
+
class?: string;
|
|
23
|
+
className?: string;
|
|
24
|
+
}
|
|
25
|
+
export declare function TimedReleaseModule(props: TimedReleaseModuleProps): import("solid-js").JSX.Element;
|
|
26
|
+
export declare namespace TimedReleaseModule {
|
|
27
|
+
var displayName: string;
|
|
28
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface UpcomingModuleProps {
|
|
2
|
+
title?: string;
|
|
3
|
+
description?: string;
|
|
4
|
+
startsAt?: Date | number;
|
|
5
|
+
onCountdownComplete?: () => void;
|
|
6
|
+
canEnter?: boolean;
|
|
7
|
+
onEnter?: () => void;
|
|
8
|
+
isEntering?: boolean;
|
|
9
|
+
class?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function UpcomingModule(props: UpcomingModuleProps): import("solid-js").JSX.Element;
|
|
13
|
+
export declare namespace UpcomingModule {
|
|
14
|
+
var displayName: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface WaitlistViewProps {
|
|
2
|
+
title?: string;
|
|
3
|
+
description?: string;
|
|
4
|
+
startsAt?: Date | number;
|
|
5
|
+
onCountdownComplete?: () => void;
|
|
6
|
+
onLeave?: () => void;
|
|
7
|
+
isLeaving?: boolean;
|
|
8
|
+
class?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function WaitlistView(props: WaitlistViewProps): import("solid-js").JSX.Element;
|
|
12
|
+
export declare namespace WaitlistView {
|
|
13
|
+
var displayName: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { JSX } from 'solid-js';
|
|
3
|
+
declare const containerVariants: (props?: ({
|
|
4
|
+
tone?: "success" | "danger" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
export interface AlertPanelProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, "title">, Omit<VariantProps<typeof containerVariants>, "tone"> {
|
|
7
|
+
tone?: "danger" | "success";
|
|
8
|
+
icon?: JSX.Element;
|
|
9
|
+
title?: JSX.Element;
|
|
10
|
+
description?: JSX.Element;
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function AlertPanel(props: AlertPanelProps): JSX.Element;
|
|
14
|
+
export declare namespace AlertPanel {
|
|
15
|
+
var displayName: string;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { AlertPanel, type AlertPanelProps } from './alert-panel';
|
|
2
|
+
export { InfoPanel, type InfoPanelProps } from './info-panel';
|
|
3
|
+
export { normalizeOutcomeReason, type OutcomeReason } from './outcome-reason';
|
|
4
|
+
export { PanelHeading, type PanelHeadingProps, type PanelHeadingVariant } from './panel-heading';
|
|
5
|
+
export { PanelBody, PanelFooter, PanelLayout, type PanelBodyProps, type PanelFooterProps, type PanelLayoutProps, } from './panel-layout';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
2
|
+
export type InfoPanelProps = JSX.HTMLAttributes<HTMLDivElement> & {
|
|
3
|
+
className?: string;
|
|
4
|
+
};
|
|
5
|
+
export declare function InfoPanel(props: InfoPanelProps): JSX.Element;
|
|
6
|
+
export declare namespace InfoPanel {
|
|
7
|
+
var displayName: string;
|
|
8
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Outcome-reason taxonomy (UI-facing)
|
|
3
|
+
*
|
|
4
|
+
* Distribution modules render an outcome state when a user can't proceed —
|
|
5
|
+
* because the admission grant expired, they weren't selected, the window
|
|
6
|
+
* closed, etc. This union is the *module-facing* taxonomy, narrower than
|
|
7
|
+
* the freeform strings the journey machine emits.
|
|
8
|
+
*
|
|
9
|
+
* `normalizeOutcomeReason` maps every known machine code (and any
|
|
10
|
+
* already-normalized UI value) to a member of the union. Unknown values
|
|
11
|
+
* fall back to `"ended"`.
|
|
12
|
+
*
|
|
13
|
+
* journey machine code -> UI outcome reason
|
|
14
|
+
* ----------------------------------------------
|
|
15
|
+
* expired -> expired
|
|
16
|
+
* queue_denied -> not_selected
|
|
17
|
+
* draw_denied -> not_selected
|
|
18
|
+
* timed_release_denied -> sold_out
|
|
19
|
+
* already_completed -> ended
|
|
20
|
+
* closed -> ended
|
|
21
|
+
* unknown / other -> ended
|
|
22
|
+
*
|
|
23
|
+
* Static story lanes pass UI values directly (e.g. `"outbid"`); those
|
|
24
|
+
* pass through unchanged.
|
|
25
|
+
*/
|
|
26
|
+
export type OutcomeReason = "expired" | "not_selected" | "sold_out" | "outbid" | "reserve_not_met" | "ended";
|
|
27
|
+
export declare function normalizeOutcomeReason(reason: string | undefined): OutcomeReason;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
2
|
+
export type PanelHeadingVariant = "default" | "secondary" | "success" | "warning" | "danger" | "outline";
|
|
3
|
+
export type PanelHeadingProps = Omit<JSX.HTMLAttributes<HTMLDivElement>, "title"> & {
|
|
4
|
+
variant?: PanelHeadingVariant;
|
|
5
|
+
label?: JSX.Element;
|
|
6
|
+
title?: JSX.Element;
|
|
7
|
+
description?: JSX.Element;
|
|
8
|
+
className?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare function PanelHeading(props: PanelHeadingProps): JSX.Element;
|
|
11
|
+
export declare namespace PanelHeading {
|
|
12
|
+
var displayName: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
2
|
+
import { CardProps } from '../primitives/card';
|
|
3
|
+
export type PanelBodyProps = JSX.HTMLAttributes<HTMLDivElement> & {
|
|
4
|
+
className?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function PanelBody(props: PanelBodyProps): JSX.Element;
|
|
7
|
+
export declare namespace PanelBody {
|
|
8
|
+
var displayName: string;
|
|
9
|
+
}
|
|
10
|
+
export type PanelFooterProps = JSX.HTMLAttributes<HTMLDivElement> & {
|
|
11
|
+
className?: string;
|
|
12
|
+
};
|
|
13
|
+
export declare function PanelFooter(props: PanelFooterProps): JSX.Element;
|
|
14
|
+
export declare namespace PanelFooter {
|
|
15
|
+
var displayName: string;
|
|
16
|
+
}
|
|
17
|
+
export type PanelLayoutProps = CardProps;
|
|
18
|
+
export declare function PanelLayout(props: PanelLayoutProps): JSX.Element;
|
|
19
|
+
export declare namespace PanelLayout {
|
|
20
|
+
var displayName: string;
|
|
21
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { JSX } from 'solid-js';
|
|
3
|
+
declare const badgeVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "secondary" | "success" | "warning" | "danger" | "outline" | null | undefined;
|
|
5
|
+
solid?: boolean | null | undefined;
|
|
6
|
+
styleVariant?: "default" | "retro" | "rounded" | "clean" | null | undefined;
|
|
7
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
|
+
export type BadgeVariant = "default" | "secondary" | "success" | "warning" | "danger" | "outline";
|
|
9
|
+
export interface BadgeProps extends Omit<JSX.HTMLAttributes<HTMLSpanElement>, "color">, Omit<VariantProps<typeof badgeVariants>, "solid" | "styleVariant"> {
|
|
10
|
+
solidBackground?: boolean;
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function Badge(props: BadgeProps): JSX.Element;
|
|
14
|
+
export declare namespace Badge {
|
|
15
|
+
var displayName: string;
|
|
16
|
+
}
|
|
17
|
+
export { badgeVariants };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { JSX } from 'solid-js';
|
|
3
|
+
declare const buttonVariants: (props?: ({
|
|
4
|
+
variant?: "primary" | "secondary" | "link" | "outline" | "ghost" | "destructive" | null | undefined;
|
|
5
|
+
size?: "sm" | "md" | "lg" | "xs" | null | undefined;
|
|
6
|
+
styleVariant?: "default" | "retro" | "rounded" | "clean" | null | undefined;
|
|
7
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
|
+
export interface ButtonProps extends JSX.ButtonHTMLAttributes<HTMLButtonElement>, Omit<VariantProps<typeof buttonVariants>, "styleVariant"> {
|
|
9
|
+
loading?: boolean;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function Button(props: ButtonProps): JSX.Element;
|
|
13
|
+
export declare namespace Button {
|
|
14
|
+
var displayName: string;
|
|
15
|
+
}
|
|
16
|
+
export { buttonVariants };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { JSX } from 'solid-js';
|
|
3
|
+
declare const cardVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "outlined" | "elevated" | null | undefined;
|
|
5
|
+
styleVariant?: "default" | "retro" | "rounded" | "clean" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
export interface CardProps extends JSX.HTMLAttributes<HTMLDivElement>, Omit<VariantProps<typeof cardVariants>, "styleVariant"> {
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function Card(props: CardProps): JSX.Element;
|
|
11
|
+
export declare namespace Card {
|
|
12
|
+
var displayName: string;
|
|
13
|
+
}
|
|
14
|
+
export { cardVariants };
|
|
15
|
+
export type CardHeaderProps = JSX.HTMLAttributes<HTMLDivElement> & {
|
|
16
|
+
className?: string;
|
|
17
|
+
};
|
|
18
|
+
export declare function CardHeader(props: CardHeaderProps): JSX.Element;
|
|
19
|
+
export declare namespace CardHeader {
|
|
20
|
+
var displayName: string;
|
|
21
|
+
}
|
|
22
|
+
export type CardTitleProps = JSX.HTMLAttributes<HTMLHeadingElement> & {
|
|
23
|
+
className?: string;
|
|
24
|
+
};
|
|
25
|
+
export declare function CardTitle(props: CardTitleProps): JSX.Element;
|
|
26
|
+
export declare namespace CardTitle {
|
|
27
|
+
var displayName: string;
|
|
28
|
+
}
|
|
29
|
+
export type CardDescriptionProps = JSX.HTMLAttributes<HTMLParagraphElement> & {
|
|
30
|
+
className?: string;
|
|
31
|
+
};
|
|
32
|
+
export declare function CardDescription(props: CardDescriptionProps): JSX.Element;
|
|
33
|
+
export declare namespace CardDescription {
|
|
34
|
+
var displayName: string;
|
|
35
|
+
}
|
|
36
|
+
export type CardContentProps = JSX.HTMLAttributes<HTMLDivElement> & {
|
|
37
|
+
className?: string;
|
|
38
|
+
};
|
|
39
|
+
export declare function CardContent(props: CardContentProps): JSX.Element;
|
|
40
|
+
export declare namespace CardContent {
|
|
41
|
+
var displayName: string;
|
|
42
|
+
}
|
|
43
|
+
export type CardFooterProps = JSX.HTMLAttributes<HTMLDivElement> & {
|
|
44
|
+
className?: string;
|
|
45
|
+
};
|
|
46
|
+
export declare function CardFooter(props: CardFooterProps): JSX.Element;
|
|
47
|
+
export declare namespace CardFooter {
|
|
48
|
+
var displayName: string;
|
|
49
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface CountdownProps {
|
|
2
|
+
targetDate: Date | string | number;
|
|
3
|
+
onComplete?: () => void;
|
|
4
|
+
expiredLabel?: string;
|
|
5
|
+
class?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
showDays?: boolean;
|
|
8
|
+
showHours?: boolean;
|
|
9
|
+
showMinutes?: boolean;
|
|
10
|
+
showSeconds?: boolean;
|
|
11
|
+
layout?: "swiss" | "compact";
|
|
12
|
+
}
|
|
13
|
+
export declare function Countdown(props: CountdownProps): import("solid-js").JSX.Element;
|
|
14
|
+
export declare namespace Countdown {
|
|
15
|
+
var displayName: string;
|
|
16
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
2
|
+
export interface FadePresenceProps {
|
|
3
|
+
show: boolean;
|
|
4
|
+
children?: JSX.Element;
|
|
5
|
+
class?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function FadePresence(props: FadePresenceProps): JSX.Element;
|
|
9
|
+
export declare namespace FadePresence {
|
|
10
|
+
var displayName: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
2
|
+
export interface FanfareLogoProps extends JSX.SvgSVGAttributes<SVGSVGElement> {
|
|
3
|
+
className?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare function FanfareLogo(props: FanfareLogoProps): JSX.Element;
|
|
6
|
+
export declare namespace FanfareLogo {
|
|
7
|
+
var displayName: string;
|
|
8
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { Badge, badgeVariants, type BadgeProps, type BadgeVariant } from './badge';
|
|
2
|
+
export { Button, buttonVariants, type ButtonProps } from './button';
|
|
3
|
+
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, cardVariants, type CardContentProps, type CardDescriptionProps, type CardFooterProps, type CardHeaderProps, type CardProps, type CardTitleProps, } from './card';
|
|
4
|
+
export { Countdown, type CountdownProps } from './countdown';
|
|
5
|
+
export { FadePresence, type FadePresenceProps } from './fade-presence';
|
|
6
|
+
export { FanfareLogo, type FanfareLogoProps } from './fanfare-logo';
|
|
7
|
+
export { Input, type InputProps } from './input';
|
|
8
|
+
export { Progress, type ProgressProps } from './progress';
|
|
9
|
+
export { Skeleton, type SkeletonProps } from './skeleton';
|
|
10
|
+
export { Spinner, spinnerVariants, type SpinnerProps } from './spinner';
|
|
11
|
+
export { Transition, type TransitionMode, type TransitionProps } from './transition';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
2
|
+
export interface InputProps extends JSX.InputHTMLAttributes<HTMLInputElement> {
|
|
3
|
+
label?: string;
|
|
4
|
+
error?: string;
|
|
5
|
+
/**
|
|
6
|
+
* Visual error state without inline text. Use when the message is rendered
|
|
7
|
+
* elsewhere (e.g. an AlertPanel under the input) but the field should still
|
|
8
|
+
* show its red border / invalid styling.
|
|
9
|
+
*/
|
|
10
|
+
hasError?: boolean;
|
|
11
|
+
inlineLabel?: boolean;
|
|
12
|
+
inlineError?: boolean;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function Input(props: InputProps): JSX.Element;
|
|
16
|
+
export declare namespace Input {
|
|
17
|
+
var displayName: string;
|
|
18
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
2
|
+
export interface ProgressProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
value?: number;
|
|
4
|
+
max?: number;
|
|
5
|
+
showLabel?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function Progress(props: ProgressProps): JSX.Element;
|
|
9
|
+
export declare namespace Progress {
|
|
10
|
+
var displayName: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
2
|
+
export type SkeletonProps = JSX.HTMLAttributes<HTMLDivElement> & {
|
|
3
|
+
className?: string;
|
|
4
|
+
};
|
|
5
|
+
export declare function Skeleton(props: SkeletonProps): JSX.Element;
|
|
6
|
+
export declare namespace Skeleton {
|
|
7
|
+
var displayName: string;
|
|
8
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { JSX } from 'solid-js';
|
|
3
|
+
declare const spinnerVariants: (props?: ({
|
|
4
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
5
|
+
styleVariant?: "default" | "retro" | "rounded" | "clean" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
export interface SpinnerProps extends JSX.SvgSVGAttributes<SVGSVGElement>, Omit<VariantProps<typeof spinnerVariants>, "styleVariant"> {
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function Spinner(props: SpinnerProps): JSX.Element;
|
|
11
|
+
export declare namespace Spinner {
|
|
12
|
+
var displayName: string;
|
|
13
|
+
}
|
|
14
|
+
export { spinnerVariants };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
2
|
+
export type TransitionMode = "fade" | "slide" | "scale" | "none";
|
|
3
|
+
export interface TransitionProps {
|
|
4
|
+
children: JSX.Element;
|
|
5
|
+
transitionKey: string | number;
|
|
6
|
+
mode?: TransitionMode;
|
|
7
|
+
layout?: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function Transition(props: TransitionProps): JSX.Element;
|
|
11
|
+
export declare namespace Transition {
|
|
12
|
+
var displayName: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { FanfareSDK } from '@fanfare-io/fanfare-sdk-core';
|
|
2
|
+
import { Locale, PartialTranslationMessages, TranslationMessageKey } from '@fanfare-io/fanfare-sdk-i18n';
|
|
3
|
+
import { JSX } from 'solid-js';
|
|
4
|
+
interface FanfareProviderProps {
|
|
5
|
+
sdk: FanfareSDK;
|
|
6
|
+
locale?: Locale;
|
|
7
|
+
translations?: PartialTranslationMessages<TranslationMessageKey>;
|
|
8
|
+
children: JSX.Element;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Fanfare provider for SolidJS apps
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* const sdk = await Fanfare.init({ ... });
|
|
16
|
+
*
|
|
17
|
+
* <FanfareProvider sdk={sdk}>
|
|
18
|
+
* <App />
|
|
19
|
+
* </FanfareProvider>
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare function FanfareProvider(props: FanfareProviderProps): JSX.Element;
|
|
23
|
+
/**
|
|
24
|
+
* Hook to access Fanfare SDK in SolidJS
|
|
25
|
+
*/
|
|
26
|
+
export declare function useFanfare(): FanfareSDK;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FanfareConfig } from '@fanfare-io/fanfare-sdk-core';
|
|
2
|
+
import { BrandTheme, WidgetVariant } from '@fanfare-io/fanfare-sdk-core/theme';
|
|
3
|
+
import { Locale, PartialTranslationMessages, TranslationMessageKey } from '@fanfare-io/fanfare-sdk-i18n';
|
|
4
|
+
import { JSX } from 'solid-js';
|
|
5
|
+
export interface FanfareWebComponentProviderProps {
|
|
6
|
+
config: FanfareConfig | null;
|
|
7
|
+
disabledReason?: string | null;
|
|
8
|
+
autoRestore?: boolean;
|
|
9
|
+
autoResume?: boolean;
|
|
10
|
+
locale?: Locale;
|
|
11
|
+
translations?: PartialTranslationMessages<TranslationMessageKey>;
|
|
12
|
+
themeConfig?: BrandTheme | null;
|
|
13
|
+
variant?: WidgetVariant;
|
|
14
|
+
className?: string;
|
|
15
|
+
children: JSX.Element;
|
|
16
|
+
}
|
|
17
|
+
export declare function FanfareWebComponentProvider(props: FanfareWebComponentProviderProps): JSX.Element;
|
|
18
|
+
export declare namespace FanfareWebComponentProvider {
|
|
19
|
+
var displayName: string;
|
|
20
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type AuctionStatus = "open" | "bidding" | "winning" | "outbid" | "won" | "lost" | "ended";
|
|
2
|
+
export interface AuctionActionsProps {
|
|
3
|
+
status: AuctionStatus;
|
|
4
|
+
currentBid: number;
|
|
5
|
+
minNextBid: number;
|
|
6
|
+
bidIncrement: number;
|
|
7
|
+
onBid?: (amount: number) => void;
|
|
8
|
+
onProceed?: () => void;
|
|
9
|
+
isBidding?: boolean;
|
|
10
|
+
bidLabel?: string;
|
|
11
|
+
proceedLabel?: string;
|
|
12
|
+
currencyCode?: string;
|
|
13
|
+
locale?: string;
|
|
14
|
+
showQuickBids?: boolean;
|
|
15
|
+
class?: string;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function AuctionActions(props: AuctionActionsProps): import("solid-js").JSX.Element;
|
|
19
|
+
export declare namespace AuctionActions {
|
|
20
|
+
var displayName: string;
|
|
21
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface AuctionBidDisplayProps {
|
|
2
|
+
currentBid: number;
|
|
3
|
+
myBid?: number | null;
|
|
4
|
+
minNextBid: number;
|
|
5
|
+
bidIncrement: number;
|
|
6
|
+
reservePrice?: number;
|
|
7
|
+
reserveMet?: boolean;
|
|
8
|
+
bidCount?: number;
|
|
9
|
+
isWinning?: boolean;
|
|
10
|
+
currencyCode?: string;
|
|
11
|
+
locale?: string;
|
|
12
|
+
size?: "sm" | "md" | "lg";
|
|
13
|
+
class?: string;
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function AuctionBidDisplay(props: AuctionBidDisplayProps): import("solid-js").JSX.Element;
|
|
17
|
+
export declare namespace AuctionBidDisplay {
|
|
18
|
+
var displayName: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auction Widget Internal Components
|
|
3
|
+
*
|
|
4
|
+
* Building blocks for the AuctionWidget.
|
|
5
|
+
*/
|
|
6
|
+
export { AuctionActions, type AuctionActionsProps, type AuctionStatus } from './auction-actions';
|
|
7
|
+
export { AuctionBidDisplay, type AuctionBidDisplayProps } from './auction-bid-display';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type DrawStatus = "open" | "entered" | "drawing" | "won" | "lost" | "ended";
|
|
2
|
+
export interface DrawActionsProps {
|
|
3
|
+
status: DrawStatus;
|
|
4
|
+
onEnter?: () => void;
|
|
5
|
+
onWithdraw?: () => void;
|
|
6
|
+
onShare?: () => void;
|
|
7
|
+
onProceed?: () => void;
|
|
8
|
+
isEntering?: boolean;
|
|
9
|
+
isWithdrawing?: boolean;
|
|
10
|
+
enterLabel?: string;
|
|
11
|
+
withdrawLabel?: string;
|
|
12
|
+
shareLabel?: string;
|
|
13
|
+
proceedLabel?: string;
|
|
14
|
+
showShare?: boolean;
|
|
15
|
+
layout?: "horizontal" | "vertical";
|
|
16
|
+
class?: string;
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare function DrawActions(props: DrawActionsProps): import("solid-js").JSX.Element;
|
|
20
|
+
export declare namespace DrawActions {
|
|
21
|
+
var displayName: string;
|
|
22
|
+
}
|