@fanfare-io/fanfare-sdk-solid 0.18.0 → 0.19.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.
@@ -1,14 +1,48 @@
1
+ /**
2
+ * Countdown Component
3
+ *
4
+ * Displays time remaining until a target date.
5
+ * Automatically updates every second.
6
+ *
7
+ * Two layouts:
8
+ * - "swiss" (default): Prominent display with animated digits and labels above
9
+ * - "compact": Simple text-based countdown that inherits parent styling
10
+ *
11
+ * The Solid adapter resolves the remaining time on the client, from the device
12
+ * clock, because the adapter renders on the client. The React adapter anchors
13
+ * to a server-supplied instant because it renders on the server, where a
14
+ * device clock is not available and the markup has to match on hydration.
15
+ */
16
+ export type CountdownSize = "default" | "hero";
17
+ export type CountdownTone = "calm" | "warning" | "critical";
1
18
  export interface CountdownProps {
19
+ /** Target date/time to count down to */
2
20
  targetDate: Date | string | number;
21
+ /** Callback when countdown reaches zero */
3
22
  onComplete?: () => void;
23
+ /** Label to show when expired */
4
24
  expiredLabel?: string;
5
- class?: string;
25
+ /** Additional CSS classes */
6
26
  className?: string;
27
+ /** Show days in countdown */
7
28
  showDays?: boolean;
29
+ /** Show hours in countdown */
8
30
  showHours?: boolean;
31
+ /** Show minutes in countdown */
9
32
  showMinutes?: boolean;
33
+ /** Show seconds in countdown */
10
34
  showSeconds?: boolean;
35
+ /** Layout: "swiss" for prominent animated display, "compact" for simple text */
11
36
  layout?: "swiss" | "compact";
37
+ /** Size: "default" (compact display) or "hero" (52px monospace, urgency-driver). */
38
+ size?: CountdownSize;
39
+ /**
40
+ * Presentational urgency tone. Caller derives from phase + time-remaining and passes it.
41
+ * - calm: foreground color (default)
42
+ * - warning: warning token color
43
+ * - critical: danger token color (in retro, also flips the unit container bg)
44
+ */
45
+ tone?: CountdownTone;
12
46
  }
13
47
  export declare function Countdown(props: CountdownProps): import("solid-js").JSX.Element;
14
48
  export declare namespace Countdown {
@@ -1,7 +1,7 @@
1
1
  export { Badge, badgeVariants, type BadgeProps, type BadgeVariant } from './badge';
2
2
  export { Button, buttonVariants, type ButtonProps } from './button';
3
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';
4
+ export { Countdown, type CountdownProps, type CountdownSize, type CountdownTone } from './countdown';
5
5
  export { FadePresence, type FadePresenceProps } from './fade-presence';
6
6
  export { FanfareLogo, type FanfareLogoProps } from './fanfare-logo';
7
7
  export { Input, type InputProps } from './input';
package/dist/index.d.ts CHANGED
@@ -14,8 +14,8 @@ export { THEME_CSS_VARS, ThemeProvider, buildThemeCssVars } from './theme';
14
14
  export type { ResolvedTheme, ThemeCssVar, ThemeProviderProps, WidgetThemeConfig, WidgetVariant } from './theme';
15
15
  export { AuthForm, AuthInput, OTPInput } from './components/auth';
16
16
  export type { AuthFormProps, AuthInputProps } from './components/auth';
17
- export { Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Input, buttonVariants, } from './components/primitives';
18
- export type { ButtonProps } from './components/primitives';
17
+ export { Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Countdown, Input, buttonVariants, } from './components/primitives';
18
+ export type { ButtonProps, CountdownProps, CountdownSize, CountdownTone } from './components/primitives';
19
19
  export { InfoPanel, PanelBody, PanelFooter, PanelHeading, PanelLayout, normalizeOutcomeReason, } from './components/module';
20
20
  export type { InfoPanelProps, OutcomeReason, PanelBodyProps, PanelFooterProps, PanelHeadingProps, PanelHeadingVariant, PanelLayoutProps, } from './components/module';
21
21
  export { AccessCodeForm, ChallengeGate, EndedModule, ErrorView, GrantedPanel, OutcomePanel, } from './components/compositions';