@opexa/portal-components 0.0.1110 → 0.0.1112
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/components/DigitainLauncher/DigitainAuthWall.d.ts +7 -0
- package/dist/components/DigitainLauncher/DigitainAuthWall.js +20 -0
- package/dist/components/DigitainLauncher/DigitainContainer.d.ts +11 -0
- package/dist/components/DigitainLauncher/DigitainContainer.js +108 -0
- package/dist/components/DigitainLauncher/DigitainLauncher.js +3 -3
- package/dist/components/DigitainLauncher/DigitainLoadingPanel.d.ts +6 -0
- package/dist/components/DigitainLauncher/DigitainLoadingPanel.js +15 -0
- package/dist/components/DigitainLauncher/DigitainLoadingView.d.ts +10 -0
- package/dist/components/DigitainLauncher/DigitainLoadingView.js +10 -0
- package/dist/components/DigitainLauncher/types.d.ts +2 -1
- package/dist/components/PortalProvider/SetupDomain.js +4 -9
- package/dist/types/index.d.ts +1 -1
- package/dist/ui/Badge/Badge.d.ts +12 -12
- package/dist/ui/Badge/badge.anatomy.d.ts +1 -1
- package/dist/ui/Badge/badge.recipe.d.ts +3 -3
- package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
- package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
- package/dist/ui/Combobox/Combobox.d.ts +42 -42
- package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
- package/dist/ui/Field/Field.d.ts +21 -21
- package/dist/ui/Field/field.recipe.d.ts +3 -3
- package/dist/ui/Menu/Menu.d.ts +90 -90
- package/dist/ui/Menu/menu.recipe.d.ts +5 -5
- package/dist/ui/Select/Select.d.ts +45 -45
- package/dist/ui/Select/select.recipe.d.ts +3 -3
- package/dist/ui/Table/Table.d.ts +21 -21
- package/dist/ui/Table/table.anatomy.d.ts +1 -1
- package/dist/ui/Table/table.recipe.d.ts +3 -3
- package/dist/ui/Tabs/Tabs.d.ts +15 -15
- package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
- package/package.json +1 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ImageProps } from 'next/image';
|
|
2
|
+
export interface DigitainAuthWallProps {
|
|
3
|
+
signInUrl?: string | null;
|
|
4
|
+
fallbackBackgroundImage?: ImageProps['src'] | null;
|
|
5
|
+
}
|
|
6
|
+
/** Shown when the user must sign in before opening the sportsbook. */
|
|
7
|
+
export declare function DigitainAuthWall(props: DigitainAuthWallProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import Image from 'next/image';
|
|
4
|
+
import { useShallow } from 'zustand/shallow';
|
|
5
|
+
import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
|
|
6
|
+
import { Button } from '../../ui/Button/index.js';
|
|
7
|
+
/** Shown when the user must sign in before opening the sportsbook. */
|
|
8
|
+
export function DigitainAuthWall(props) {
|
|
9
|
+
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
10
|
+
signIn: ctx.signIn,
|
|
11
|
+
})));
|
|
12
|
+
return (_jsxs("div", { className: "relative w-full min-h-[calc(100dvh-4rem)]", children: [props.fallbackBackgroundImage && (_jsx(Image, { src: props.fallbackBackgroundImage, alt: "Background", fill: true, className: "rounded-xl object-cover", sizes: "100vw" })), _jsx("div", { className: "absolute right-0 bottom-0 left-0 hidden h-1/2 rounded-xl bg-gradient-to-b from-[#00000000] to-bg-primary-alt lg:block" }), _jsx("div", { className: "pointer-events-none absolute inset-0 z-[1] rounded-xl bg-gradient-to-b from-black/45 via-black/20 to-black/50 lg:hidden", "aria-hidden": true }), _jsx("div", { className: "absolute inset-0 z-10 flex flex-col justify-center px-4 py-8 sm:px-6 lg:justify-end lg:pb-12 lg:pt-8", children: _jsxs("div", { className: "mx-auto w-full max-w-[42.5rem] text-center", children: [_jsxs("div", { className: "mb-8 space-y-3", children: [_jsx("h2", { className: "font-bold text-gray-900 text-xl uppercase lg:text-[40px]", children: "Sports Book Login Required" }), _jsx("p", { className: "text-gray-600 text-xs leading-relaxed lg:text-lg", children: "The Sports Book is our online platform where you can explore real-time betting odds, place bets on a wide range of sports, and track your activity." }), _jsx("p", { className: "text-gray-600 text-xs leading-relaxed lg:text-lg", children: "Access is restricted to authenticated users. Please login to continue and unlock full access to the platform." })] }), _jsx(Button, { className: "mx-auto w-fit", onClick: () => {
|
|
13
|
+
if (props.signInUrl) {
|
|
14
|
+
window.location.href = props.signInUrl;
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
globalStore.signIn.setOpen(true);
|
|
18
|
+
}
|
|
19
|
+
}, children: "Login" })] }) })] }));
|
|
20
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ImageProps } from 'next/image';
|
|
2
|
+
import type { DigitainBootstrapperParams } from './types';
|
|
3
|
+
export interface DigitainContainerProps {
|
|
4
|
+
params: DigitainBootstrapperParams;
|
|
5
|
+
fallbackBackgroundImage?: ImageProps['src'] | null;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Assumes `bootstrapper.min.js` is already included by `DigitainLauncher` (any auth state).
|
|
9
|
+
* Watches for `window.Bootstrapper`, then boots. MutationObserver + rAF backstops onLoad timing.
|
|
10
|
+
*/
|
|
11
|
+
export declare function DigitainContainer(props: DigitainContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import isMobile from 'is-mobile';
|
|
4
|
+
import { useRouter } from 'next/navigation';
|
|
5
|
+
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
6
|
+
import { useSessionQuery } from '../../client/hooks/useSessionQuery.js';
|
|
7
|
+
import { toaster } from '../../client/utils/toaster.js';
|
|
8
|
+
import { DigitainLoadingView } from './DigitainLoadingView.js';
|
|
9
|
+
const SCRIPT_FAIL_TIMEOUT_MS = 20_000;
|
|
10
|
+
/**
|
|
11
|
+
* Assumes `bootstrapper.min.js` is already included by `DigitainLauncher` (any auth state).
|
|
12
|
+
* Watches for `window.Bootstrapper`, then boots. MutationObserver + rAF backstops onLoad timing.
|
|
13
|
+
*/
|
|
14
|
+
export function DigitainContainer(props) {
|
|
15
|
+
const session = useSessionQuery();
|
|
16
|
+
const router = useRouter();
|
|
17
|
+
const paramsRef = useRef(props.params);
|
|
18
|
+
paramsRef.current = props.params;
|
|
19
|
+
const bootedRef = useRef(false);
|
|
20
|
+
const waitingForScriptRef = useRef(true);
|
|
21
|
+
const [isBooting, setIsBooting] = useState(true);
|
|
22
|
+
const [progress, setProgress] = useState(0);
|
|
23
|
+
const [stepIndex, setStepIndex] = useState(0);
|
|
24
|
+
const failLoad = useCallback((description) => {
|
|
25
|
+
if (bootedRef.current)
|
|
26
|
+
return;
|
|
27
|
+
bootedRef.current = true;
|
|
28
|
+
waitingForScriptRef.current = false;
|
|
29
|
+
setIsBooting(false);
|
|
30
|
+
toaster.error({ title: 'Error', description });
|
|
31
|
+
}, []);
|
|
32
|
+
const runBoot = useCallback(() => {
|
|
33
|
+
if (bootedRef.current)
|
|
34
|
+
return true;
|
|
35
|
+
const B = window.Bootstrapper;
|
|
36
|
+
if (!B)
|
|
37
|
+
return false;
|
|
38
|
+
bootedRef.current = true;
|
|
39
|
+
waitingForScriptRef.current = false;
|
|
40
|
+
setStepIndex(1);
|
|
41
|
+
setProgress(88);
|
|
42
|
+
void B.boot(paramsRef.current, {
|
|
43
|
+
name: isMobile() ? 'Mobile' : 'AsianView',
|
|
44
|
+
})
|
|
45
|
+
.catch(() => {
|
|
46
|
+
/* partner lib may reject; still transition UI */
|
|
47
|
+
})
|
|
48
|
+
.finally(() => {
|
|
49
|
+
setStepIndex(2);
|
|
50
|
+
setProgress(100);
|
|
51
|
+
});
|
|
52
|
+
window.setTimeout(() => setIsBooting(false), 1000);
|
|
53
|
+
return true;
|
|
54
|
+
}, []);
|
|
55
|
+
useEffect(() => {
|
|
56
|
+
if (session.data?.status === 'authenticated') {
|
|
57
|
+
router.refresh();
|
|
58
|
+
}
|
|
59
|
+
}, [session.data?.status, router]);
|
|
60
|
+
// Smooth 0% → 45% only while the script is still missing (max ~8s of ramp for UX)
|
|
61
|
+
useEffect(() => {
|
|
62
|
+
const t0 = performance.now();
|
|
63
|
+
let raf;
|
|
64
|
+
const tick = () => {
|
|
65
|
+
if (!waitingForScriptRef.current)
|
|
66
|
+
return;
|
|
67
|
+
const elapsed = performance.now() - t0;
|
|
68
|
+
const cap = 45;
|
|
69
|
+
setProgress((prev) => Math.max(prev, Math.min(cap, (elapsed / 8000) * cap)));
|
|
70
|
+
raf = requestAnimationFrame(tick);
|
|
71
|
+
};
|
|
72
|
+
raf = requestAnimationFrame(tick);
|
|
73
|
+
return () => cancelAnimationFrame(raf);
|
|
74
|
+
}, []);
|
|
75
|
+
// Throttled MutationObserver: re-check for `window.Bootstrapper` on DOM changes (e.g. script tag injection order).
|
|
76
|
+
useEffect(() => {
|
|
77
|
+
let raf = null;
|
|
78
|
+
const tryBoot = () => {
|
|
79
|
+
if (raf != null)
|
|
80
|
+
return;
|
|
81
|
+
raf = requestAnimationFrame(() => {
|
|
82
|
+
raf = null;
|
|
83
|
+
if (runBoot()) {
|
|
84
|
+
observer.disconnect();
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
};
|
|
88
|
+
// Synchronous first try (e.g. script already cached in another tab)
|
|
89
|
+
tryBoot();
|
|
90
|
+
const observer = new MutationObserver(tryBoot);
|
|
91
|
+
observer.observe(document.documentElement, { childList: true, subtree: true });
|
|
92
|
+
return () => {
|
|
93
|
+
observer.disconnect();
|
|
94
|
+
if (raf != null)
|
|
95
|
+
cancelAnimationFrame(raf);
|
|
96
|
+
};
|
|
97
|
+
}, [runBoot]);
|
|
98
|
+
// Fails if the script never becomes bootable
|
|
99
|
+
useEffect(() => {
|
|
100
|
+
const t = window.setTimeout(() => {
|
|
101
|
+
if (bootedRef.current)
|
|
102
|
+
return;
|
|
103
|
+
failLoad('Sportsbook failed to load in time. Please refresh or try again later.');
|
|
104
|
+
}, SCRIPT_FAIL_TIMEOUT_MS);
|
|
105
|
+
return () => clearTimeout(t);
|
|
106
|
+
}, [failLoad]);
|
|
107
|
+
return (_jsxs("div", { className: "w-full min-h-[calc(100dvh-4rem)]", children: [isBooting ? (_jsx(DigitainLoadingView, { fallbackBackgroundImage: props.fallbackBackgroundImage, loadingProgress: progress, loadingActiveStepIndex: stepIndex })) : null, _jsx("div", { id: "digitain-container", className: isBooting ? 'hidden' : 'w-full min-h-[calc(100dvh-4rem)]' })] }));
|
|
108
|
+
}
|
|
@@ -2,8 +2,8 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
2
2
|
import Script from 'next/script';
|
|
3
3
|
import { getSession } from '../../server/services/getSession.js';
|
|
4
4
|
import { Protected } from '../Protected/index.js';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { DigitainAuthWall } from './DigitainAuthWall.js';
|
|
6
|
+
import { DigitainContainer } from './DigitainContainer.js';
|
|
7
7
|
import { defaultDigitainParams, getDigitainLaunchToken } from './utils.js';
|
|
8
8
|
export async function DigitainLauncher(props) {
|
|
9
9
|
const session = await getSession();
|
|
@@ -15,5 +15,5 @@ export async function DigitainLauncher(props) {
|
|
|
15
15
|
params.server = props.hostname;
|
|
16
16
|
}
|
|
17
17
|
const finalizedParams = { ...params };
|
|
18
|
-
return (_jsxs(_Fragment, { children: [_jsx(Script, { src: `//${props.hostname}/js/partner/bootstrapper.min.js
|
|
18
|
+
return (_jsxs(_Fragment, { children: [_jsx(Script, { id: "digitain-bootstrapper-script", src: `//${props.hostname}/js/partner/bootstrapper.min.js`, strategy: "afterInteractive" }), _jsx(Protected, { fallback: _jsx(DigitainAuthWall, { signInUrl: props.signInUrl, fallbackBackgroundImage: props.fallbackBackgroundImage }), children: _jsx(DigitainContainer, { params: finalizedParams, fallbackBackgroundImage: props.fallbackBackgroundImage }) })] }));
|
|
19
19
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface DigitainLoadingPanelProps {
|
|
2
|
+
progress: number;
|
|
3
|
+
activeStepIndex: number;
|
|
4
|
+
}
|
|
5
|
+
/** Centered copy + progress only—no card shell; meant to sit on a dark overlay. */
|
|
6
|
+
export declare function DigitainLoadingPanel({ progress, activeStepIndex, }: DigitainLoadingPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { twMerge } from 'tailwind-merge';
|
|
4
|
+
import { Progress } from '../../ui/Progress/index.js';
|
|
5
|
+
const STEPS = ['Initializing', 'Loading', 'Opening Sportsbook'];
|
|
6
|
+
/** Centered copy + progress only—no card shell; meant to sit on a dark overlay. */
|
|
7
|
+
export function DigitainLoadingPanel({ progress, activeStepIndex, }) {
|
|
8
|
+
const clamped = Math.min(100, Math.max(0, progress));
|
|
9
|
+
const current = Math.min(STEPS.length - 1, Math.max(0, activeStepIndex));
|
|
10
|
+
return (_jsxs("div", { className: "w-full max-w-[22rem] mx-auto space-y-8 text-center", role: "status", "aria-live": "polite", "aria-busy": "true", "aria-label": "Loading sportsbook", children: [_jsxs("div", { className: "space-y-2", children: [_jsx("p", { className: "font-semibold text-lg text-white drop-shadow-sm sm:text-xl", children: "Sportsbook" }), _jsx("p", { className: "text-sm text-white/80", children: "Please wait while we load the sportsbook." })] }), _jsx("ol", { className: "list-none space-y-2 pl-0 text-left text-sm sm:text-base", children: STEPS.map((label, i) => {
|
|
11
|
+
const isCurrent = i === current;
|
|
12
|
+
const isDone = i < current;
|
|
13
|
+
return (_jsxs("li", { className: twMerge(isCurrent && 'font-medium text-button-tertiary-fg', !isCurrent && isDone && 'text-white/90', !isCurrent && !isDone && 'text-white/45'), children: [_jsxs("span", { className: "tabular-nums", children: [i + 1, "."] }), " ", label, isCurrent && (_jsx("span", { className: "text-button-tertiary-fg", children: " \u2014 in progress" }))] }, label));
|
|
14
|
+
}) }), _jsxs("div", { className: "space-y-2", children: [_jsxs("div", { className: "flex items-center justify-between gap-3 text-white/70 text-xs sm:text-sm", children: [_jsx("span", { children: "Progress" }), _jsxs("span", { className: "font-medium tabular-nums text-white", children: [Math.round(clamped), "%"] })] }), _jsx(Progress.Root, { min: 0, max: 100, value: clamped, variant: "solid", className: "w-full", "aria-label": "Loading progress", children: _jsx(Progress.Track, { className: "h-2 !rounded-full bg-white/20", children: _jsx(Progress.Range, { className: "!bg-button-tertiary-fg" }) }) })] })] }));
|
|
15
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ImageProps } from 'next/image';
|
|
2
|
+
export interface DigitainLoadingViewProps {
|
|
3
|
+
fallbackBackgroundImage?: ImageProps['src'] | null;
|
|
4
|
+
loadingProgress: number;
|
|
5
|
+
loadingActiveStepIndex: number;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Dimmed full-area overlay (below the app header) with optional hero image behind it.
|
|
9
|
+
*/
|
|
10
|
+
export declare function DigitainLoadingView(props: DigitainLoadingViewProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import Image from 'next/image';
|
|
4
|
+
import { DigitainLoadingPanel } from './DigitainLoadingPanel.js';
|
|
5
|
+
/**
|
|
6
|
+
* Dimmed full-area overlay (below the app header) with optional hero image behind it.
|
|
7
|
+
*/
|
|
8
|
+
export function DigitainLoadingView(props) {
|
|
9
|
+
return (_jsxs("div", { className: "w-full min-h-[calc(100dvh-4rem)]", children: [props.fallbackBackgroundImage ? (_jsx("div", { className: "relative min-h-[calc(100dvh-4rem)] w-full overflow-hidden rounded-xl", children: _jsx(Image, { src: props.fallbackBackgroundImage, alt: "", fill: true, className: "object-cover", sizes: "100vw" }) })) : null, _jsx("div", { className: "fixed inset-x-0 top-16 bottom-0 z-[1000] flex min-h-0 items-center justify-center overflow-y-auto overscroll-contain bg-black/65 px-4 py-6 backdrop-blur-md sm:px-10 sm:py-10", children: _jsx("div", { className: "my-auto w-full max-w-md py-2 pb-[max(1.5rem,env(safe-area-inset-bottom))]", children: _jsx(DigitainLoadingPanel, { progress: props.loadingProgress, activeStepIndex: props.loadingActiveStepIndex }) }) })] }));
|
|
10
|
+
}
|
|
@@ -48,7 +48,8 @@ export interface DigitiainBootstrapper {
|
|
|
48
48
|
}
|
|
49
49
|
declare global {
|
|
50
50
|
interface Window {
|
|
51
|
-
|
|
51
|
+
/** Set by the Digitain `bootstrapper.min.js` script when it loads. */
|
|
52
|
+
Bootstrapper?: DigitiainBootstrapper;
|
|
52
53
|
}
|
|
53
54
|
}
|
|
54
55
|
export {};
|
|
@@ -4,21 +4,16 @@ import { useTimeout } from 'usehooks-ts';
|
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
import { useSessionQuery } from '../../client/hooks/useSessionQuery.js';
|
|
6
6
|
import { useUpdateSessionMutation } from '../../client/hooks/useUpdateSessionMutation.js';
|
|
7
|
-
const MarketSchema = z
|
|
8
|
-
.string()
|
|
9
|
-
.min(5)
|
|
10
|
-
.max(6)
|
|
11
|
-
.regex(/^[0-9]+$/)
|
|
12
|
-
.nullable()
|
|
13
|
-
.optional()
|
|
14
|
-
.catch(null);
|
|
7
|
+
const MarketSchema = z.string().nullable().optional().catch(null);
|
|
15
8
|
export function SetupDomain() {
|
|
16
9
|
const query = useSessionQuery();
|
|
17
10
|
const mutation = useUpdateSessionMutation();
|
|
18
11
|
const params = useSearchParams();
|
|
19
12
|
useTimeout(() => {
|
|
20
13
|
const oldDomain = query.data?.domain;
|
|
21
|
-
const
|
|
14
|
+
const m = params.get('m');
|
|
15
|
+
const market = params.get('market');
|
|
16
|
+
const newMarket = MarketSchema.parse(m || market);
|
|
22
17
|
const newDomain = newMarket
|
|
23
18
|
? `${window.location.host}/${newMarket}`
|
|
24
19
|
: `${window.location.host}`;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -188,7 +188,7 @@ export interface RecommendedGame {
|
|
|
188
188
|
export interface TopGame {
|
|
189
189
|
id: string;
|
|
190
190
|
name: string;
|
|
191
|
-
provider?:
|
|
191
|
+
provider?: GameProvider;
|
|
192
192
|
}
|
|
193
193
|
export type GameSessionStatus = 'PENDING' | 'STARTING' | 'READY' | 'ENDED' | 'CANCELLED';
|
|
194
194
|
export interface GameSessionLaunchOptions {
|
package/dist/ui/Badge/Badge.d.ts
CHANGED
|
@@ -37,7 +37,7 @@ export declare const Root: import("react").ComponentType<import("@ark-ui/react")
|
|
|
37
37
|
root: string;
|
|
38
38
|
};
|
|
39
39
|
};
|
|
40
|
-
}, Record<"label" | "
|
|
40
|
+
}, Record<"label" | "root" | "icon" | "indicator", string | string[]>, undefined, {
|
|
41
41
|
size: {
|
|
42
42
|
md: {
|
|
43
43
|
root: string;
|
|
@@ -72,7 +72,7 @@ export declare const Root: import("react").ComponentType<import("@ark-ui/react")
|
|
|
72
72
|
root: string;
|
|
73
73
|
};
|
|
74
74
|
};
|
|
75
|
-
}, Record<"label" | "
|
|
75
|
+
}, Record<"label" | "root" | "icon" | "indicator", string | string[]>, import("tailwind-variants").TVReturnType<{
|
|
76
76
|
size: {
|
|
77
77
|
md: {
|
|
78
78
|
root: string;
|
|
@@ -107,7 +107,7 @@ export declare const Root: import("react").ComponentType<import("@ark-ui/react")
|
|
|
107
107
|
root: string;
|
|
108
108
|
};
|
|
109
109
|
};
|
|
110
|
-
}, Record<"label" | "
|
|
110
|
+
}, Record<"label" | "root" | "icon" | "indicator", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
111
111
|
interface BadgeLabelProps extends ComponentPropsWithRef<'span'> {
|
|
112
112
|
asChild?: boolean;
|
|
113
113
|
}
|
|
@@ -146,7 +146,7 @@ export declare const Label: import("react").ComponentType<import("@ark-ui/react"
|
|
|
146
146
|
root: string;
|
|
147
147
|
};
|
|
148
148
|
};
|
|
149
|
-
}, Record<"label" | "
|
|
149
|
+
}, Record<"label" | "root" | "icon" | "indicator", string | string[]>, undefined, {
|
|
150
150
|
size: {
|
|
151
151
|
md: {
|
|
152
152
|
root: string;
|
|
@@ -181,7 +181,7 @@ export declare const Label: import("react").ComponentType<import("@ark-ui/react"
|
|
|
181
181
|
root: string;
|
|
182
182
|
};
|
|
183
183
|
};
|
|
184
|
-
}, Record<"label" | "
|
|
184
|
+
}, Record<"label" | "root" | "icon" | "indicator", string | string[]>, import("tailwind-variants").TVReturnType<{
|
|
185
185
|
size: {
|
|
186
186
|
md: {
|
|
187
187
|
root: string;
|
|
@@ -216,7 +216,7 @@ export declare const Label: import("react").ComponentType<import("@ark-ui/react"
|
|
|
216
216
|
root: string;
|
|
217
217
|
};
|
|
218
218
|
};
|
|
219
|
-
}, Record<"label" | "
|
|
219
|
+
}, Record<"label" | "root" | "icon" | "indicator", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
220
220
|
interface BadgeIndicatorProps extends ComponentPropsWithRef<'svg'> {
|
|
221
221
|
asChild?: boolean;
|
|
222
222
|
}
|
|
@@ -255,7 +255,7 @@ export declare const Indicator: import("react").ComponentType<import("@ark-ui/re
|
|
|
255
255
|
root: string;
|
|
256
256
|
};
|
|
257
257
|
};
|
|
258
|
-
}, Record<"label" | "
|
|
258
|
+
}, Record<"label" | "root" | "icon" | "indicator", string | string[]>, undefined, {
|
|
259
259
|
size: {
|
|
260
260
|
md: {
|
|
261
261
|
root: string;
|
|
@@ -290,7 +290,7 @@ export declare const Indicator: import("react").ComponentType<import("@ark-ui/re
|
|
|
290
290
|
root: string;
|
|
291
291
|
};
|
|
292
292
|
};
|
|
293
|
-
}, Record<"label" | "
|
|
293
|
+
}, Record<"label" | "root" | "icon" | "indicator", string | string[]>, import("tailwind-variants").TVReturnType<{
|
|
294
294
|
size: {
|
|
295
295
|
md: {
|
|
296
296
|
root: string;
|
|
@@ -325,7 +325,7 @@ export declare const Indicator: import("react").ComponentType<import("@ark-ui/re
|
|
|
325
325
|
root: string;
|
|
326
326
|
};
|
|
327
327
|
};
|
|
328
|
-
}, Record<"label" | "
|
|
328
|
+
}, Record<"label" | "root" | "icon" | "indicator", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
329
329
|
interface BadgeIconProps extends ComponentPropsWithRef<'svg'> {
|
|
330
330
|
asChild?: boolean;
|
|
331
331
|
}
|
|
@@ -364,7 +364,7 @@ export declare const Icon: import("react").ComponentType<import("@ark-ui/react")
|
|
|
364
364
|
root: string;
|
|
365
365
|
};
|
|
366
366
|
};
|
|
367
|
-
}, Record<"label" | "
|
|
367
|
+
}, Record<"label" | "root" | "icon" | "indicator", string | string[]>, undefined, {
|
|
368
368
|
size: {
|
|
369
369
|
md: {
|
|
370
370
|
root: string;
|
|
@@ -399,7 +399,7 @@ export declare const Icon: import("react").ComponentType<import("@ark-ui/react")
|
|
|
399
399
|
root: string;
|
|
400
400
|
};
|
|
401
401
|
};
|
|
402
|
-
}, Record<"label" | "
|
|
402
|
+
}, Record<"label" | "root" | "icon" | "indicator", string | string[]>, import("tailwind-variants").TVReturnType<{
|
|
403
403
|
size: {
|
|
404
404
|
md: {
|
|
405
405
|
root: string;
|
|
@@ -434,5 +434,5 @@ export declare const Icon: import("react").ComponentType<import("@ark-ui/react")
|
|
|
434
434
|
root: string;
|
|
435
435
|
};
|
|
436
436
|
};
|
|
437
|
-
}, Record<"label" | "
|
|
437
|
+
}, Record<"label" | "root" | "icon" | "indicator", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
438
438
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const badgeAnatomy: import("@ark-ui/react/anatomy").AnatomyInstance<"label" | "
|
|
1
|
+
export declare const badgeAnatomy: import("@ark-ui/react/anatomy").AnatomyInstance<"label" | "root" | "icon" | "indicator">;
|
|
@@ -33,7 +33,7 @@ export declare const badgeRecipe: import("tailwind-variants").TVReturnType<{
|
|
|
33
33
|
root: string;
|
|
34
34
|
};
|
|
35
35
|
};
|
|
36
|
-
}, Record<"label" | "
|
|
36
|
+
}, Record<"label" | "root" | "icon" | "indicator", string | string[]>, undefined, {
|
|
37
37
|
size: {
|
|
38
38
|
md: {
|
|
39
39
|
root: string;
|
|
@@ -68,7 +68,7 @@ export declare const badgeRecipe: import("tailwind-variants").TVReturnType<{
|
|
|
68
68
|
root: string;
|
|
69
69
|
};
|
|
70
70
|
};
|
|
71
|
-
}, Record<"label" | "
|
|
71
|
+
}, Record<"label" | "root" | "icon" | "indicator", string | string[]>, import("tailwind-variants").TVReturnType<{
|
|
72
72
|
size: {
|
|
73
73
|
md: {
|
|
74
74
|
root: string;
|
|
@@ -103,4 +103,4 @@ export declare const badgeRecipe: import("tailwind-variants").TVReturnType<{
|
|
|
103
103
|
root: string;
|
|
104
104
|
};
|
|
105
105
|
};
|
|
106
|
-
}, Record<"label" | "
|
|
106
|
+
}, Record<"label" | "root" | "icon" | "indicator", string | string[]>, undefined, unknown, unknown, undefined>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Checkbox } from '@ark-ui/react/checkbox';
|
|
2
2
|
export declare const withContext: <Props extends {
|
|
3
3
|
[x: string]: any;
|
|
4
|
-
}>(Component: import("react").ComponentType<Props>, slot: "label" | "
|
|
4
|
+
}>(Component: import("react").ComponentType<Props>, slot: "label" | "group" | "root" | "control" | "indicator") => import("react").ComponentType<import("@ark-ui/react").Assign<Props, import("tailwind-variants").VariantProps<import("tailwind-variants").TVReturnType<{
|
|
5
5
|
size: {
|
|
6
6
|
md: {
|
|
7
7
|
control: string;
|
|
@@ -15,7 +15,7 @@ export declare const withContext: <Props extends {
|
|
|
15
15
|
gray: {};
|
|
16
16
|
neutral: {};
|
|
17
17
|
};
|
|
18
|
-
}, Record<"label" | "
|
|
18
|
+
}, Record<"label" | "group" | "root" | "control" | "indicator", string | string[]>, undefined, {
|
|
19
19
|
size: {
|
|
20
20
|
md: {
|
|
21
21
|
control: string;
|
|
@@ -29,7 +29,7 @@ export declare const withContext: <Props extends {
|
|
|
29
29
|
gray: {};
|
|
30
30
|
neutral: {};
|
|
31
31
|
};
|
|
32
|
-
}, Record<"label" | "
|
|
32
|
+
}, Record<"label" | "group" | "root" | "control" | "indicator", string | string[]>, import("tailwind-variants").TVReturnType<{
|
|
33
33
|
size: {
|
|
34
34
|
md: {
|
|
35
35
|
control: string;
|
|
@@ -43,9 +43,9 @@ export declare const withContext: <Props extends {
|
|
|
43
43
|
gray: {};
|
|
44
44
|
neutral: {};
|
|
45
45
|
};
|
|
46
|
-
}, Record<"label" | "
|
|
46
|
+
}, Record<"label" | "group" | "root" | "control" | "indicator", string | string[]>, undefined, unknown, unknown, undefined>>>>>, withProvider: <Props extends {
|
|
47
47
|
[x: string]: any;
|
|
48
|
-
}>(Component: import("react").ComponentType<Props>, slot: "label" | "
|
|
48
|
+
}>(Component: import("react").ComponentType<Props>, slot: "label" | "group" | "root" | "control" | "indicator") => import("react").ComponentType<import("@ark-ui/react").Assign<Props, import("tailwind-variants").VariantProps<import("tailwind-variants").TVReturnType<{
|
|
49
49
|
size: {
|
|
50
50
|
md: {
|
|
51
51
|
control: string;
|
|
@@ -59,7 +59,7 @@ export declare const withContext: <Props extends {
|
|
|
59
59
|
gray: {};
|
|
60
60
|
neutral: {};
|
|
61
61
|
};
|
|
62
|
-
}, Record<"label" | "
|
|
62
|
+
}, Record<"label" | "group" | "root" | "control" | "indicator", string | string[]>, undefined, {
|
|
63
63
|
size: {
|
|
64
64
|
md: {
|
|
65
65
|
control: string;
|
|
@@ -73,7 +73,7 @@ export declare const withContext: <Props extends {
|
|
|
73
73
|
gray: {};
|
|
74
74
|
neutral: {};
|
|
75
75
|
};
|
|
76
|
-
}, Record<"label" | "
|
|
76
|
+
}, Record<"label" | "group" | "root" | "control" | "indicator", string | string[]>, import("tailwind-variants").TVReturnType<{
|
|
77
77
|
size: {
|
|
78
78
|
md: {
|
|
79
79
|
control: string;
|
|
@@ -87,7 +87,7 @@ export declare const withContext: <Props extends {
|
|
|
87
87
|
gray: {};
|
|
88
88
|
neutral: {};
|
|
89
89
|
};
|
|
90
|
-
}, Record<"label" | "
|
|
90
|
+
}, Record<"label" | "group" | "root" | "control" | "indicator", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
91
91
|
export declare const Root: import("react").ComponentType<import("@ark-ui/react").Assign<Checkbox.RootProps & import("react").RefAttributes<HTMLLabelElement>, import("tailwind-variants").VariantProps<import("tailwind-variants").TVReturnType<{
|
|
92
92
|
size: {
|
|
93
93
|
md: {
|
|
@@ -102,7 +102,7 @@ export declare const Root: import("react").ComponentType<import("@ark-ui/react")
|
|
|
102
102
|
gray: {};
|
|
103
103
|
neutral: {};
|
|
104
104
|
};
|
|
105
|
-
}, Record<"label" | "
|
|
105
|
+
}, Record<"label" | "group" | "root" | "control" | "indicator", string | string[]>, undefined, {
|
|
106
106
|
size: {
|
|
107
107
|
md: {
|
|
108
108
|
control: string;
|
|
@@ -116,7 +116,7 @@ export declare const Root: import("react").ComponentType<import("@ark-ui/react")
|
|
|
116
116
|
gray: {};
|
|
117
117
|
neutral: {};
|
|
118
118
|
};
|
|
119
|
-
}, Record<"label" | "
|
|
119
|
+
}, Record<"label" | "group" | "root" | "control" | "indicator", string | string[]>, import("tailwind-variants").TVReturnType<{
|
|
120
120
|
size: {
|
|
121
121
|
md: {
|
|
122
122
|
control: string;
|
|
@@ -130,7 +130,7 @@ export declare const Root: import("react").ComponentType<import("@ark-ui/react")
|
|
|
130
130
|
gray: {};
|
|
131
131
|
neutral: {};
|
|
132
132
|
};
|
|
133
|
-
}, Record<"label" | "
|
|
133
|
+
}, Record<"label" | "group" | "root" | "control" | "indicator", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
134
134
|
export declare const Control: import("react").ComponentType<import("@ark-ui/react").Assign<Checkbox.ControlProps & import("react").RefAttributes<HTMLDivElement>, import("tailwind-variants").VariantProps<import("tailwind-variants").TVReturnType<{
|
|
135
135
|
size: {
|
|
136
136
|
md: {
|
|
@@ -145,7 +145,7 @@ export declare const Control: import("react").ComponentType<import("@ark-ui/reac
|
|
|
145
145
|
gray: {};
|
|
146
146
|
neutral: {};
|
|
147
147
|
};
|
|
148
|
-
}, Record<"label" | "
|
|
148
|
+
}, Record<"label" | "group" | "root" | "control" | "indicator", string | string[]>, undefined, {
|
|
149
149
|
size: {
|
|
150
150
|
md: {
|
|
151
151
|
control: string;
|
|
@@ -159,7 +159,7 @@ export declare const Control: import("react").ComponentType<import("@ark-ui/reac
|
|
|
159
159
|
gray: {};
|
|
160
160
|
neutral: {};
|
|
161
161
|
};
|
|
162
|
-
}, Record<"label" | "
|
|
162
|
+
}, Record<"label" | "group" | "root" | "control" | "indicator", string | string[]>, import("tailwind-variants").TVReturnType<{
|
|
163
163
|
size: {
|
|
164
164
|
md: {
|
|
165
165
|
control: string;
|
|
@@ -173,7 +173,7 @@ export declare const Control: import("react").ComponentType<import("@ark-ui/reac
|
|
|
173
173
|
gray: {};
|
|
174
174
|
neutral: {};
|
|
175
175
|
};
|
|
176
|
-
}, Record<"label" | "
|
|
176
|
+
}, Record<"label" | "group" | "root" | "control" | "indicator", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
177
177
|
export declare const Group: import("react").ComponentType<import("@ark-ui/react").Assign<Checkbox.GroupProps & import("react").RefAttributes<HTMLDivElement>, import("tailwind-variants").VariantProps<import("tailwind-variants").TVReturnType<{
|
|
178
178
|
size: {
|
|
179
179
|
md: {
|
|
@@ -188,7 +188,7 @@ export declare const Group: import("react").ComponentType<import("@ark-ui/react"
|
|
|
188
188
|
gray: {};
|
|
189
189
|
neutral: {};
|
|
190
190
|
};
|
|
191
|
-
}, Record<"label" | "
|
|
191
|
+
}, Record<"label" | "group" | "root" | "control" | "indicator", string | string[]>, undefined, {
|
|
192
192
|
size: {
|
|
193
193
|
md: {
|
|
194
194
|
control: string;
|
|
@@ -202,7 +202,7 @@ export declare const Group: import("react").ComponentType<import("@ark-ui/react"
|
|
|
202
202
|
gray: {};
|
|
203
203
|
neutral: {};
|
|
204
204
|
};
|
|
205
|
-
}, Record<"label" | "
|
|
205
|
+
}, Record<"label" | "group" | "root" | "control" | "indicator", string | string[]>, import("tailwind-variants").TVReturnType<{
|
|
206
206
|
size: {
|
|
207
207
|
md: {
|
|
208
208
|
control: string;
|
|
@@ -216,7 +216,7 @@ export declare const Group: import("react").ComponentType<import("@ark-ui/react"
|
|
|
216
216
|
gray: {};
|
|
217
217
|
neutral: {};
|
|
218
218
|
};
|
|
219
|
-
}, Record<"label" | "
|
|
219
|
+
}, Record<"label" | "group" | "root" | "control" | "indicator", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
220
220
|
export declare const Indicator: import("react").ComponentType<import("@ark-ui/react").Assign<Checkbox.IndicatorProps & import("react").RefAttributes<HTMLDivElement>, import("tailwind-variants").VariantProps<import("tailwind-variants").TVReturnType<{
|
|
221
221
|
size: {
|
|
222
222
|
md: {
|
|
@@ -231,7 +231,7 @@ export declare const Indicator: import("react").ComponentType<import("@ark-ui/re
|
|
|
231
231
|
gray: {};
|
|
232
232
|
neutral: {};
|
|
233
233
|
};
|
|
234
|
-
}, Record<"label" | "
|
|
234
|
+
}, Record<"label" | "group" | "root" | "control" | "indicator", string | string[]>, undefined, {
|
|
235
235
|
size: {
|
|
236
236
|
md: {
|
|
237
237
|
control: string;
|
|
@@ -245,7 +245,7 @@ export declare const Indicator: import("react").ComponentType<import("@ark-ui/re
|
|
|
245
245
|
gray: {};
|
|
246
246
|
neutral: {};
|
|
247
247
|
};
|
|
248
|
-
}, Record<"label" | "
|
|
248
|
+
}, Record<"label" | "group" | "root" | "control" | "indicator", string | string[]>, import("tailwind-variants").TVReturnType<{
|
|
249
249
|
size: {
|
|
250
250
|
md: {
|
|
251
251
|
control: string;
|
|
@@ -259,7 +259,7 @@ export declare const Indicator: import("react").ComponentType<import("@ark-ui/re
|
|
|
259
259
|
gray: {};
|
|
260
260
|
neutral: {};
|
|
261
261
|
};
|
|
262
|
-
}, Record<"label" | "
|
|
262
|
+
}, Record<"label" | "group" | "root" | "control" | "indicator", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
263
263
|
export declare const Label: import("react").ComponentType<import("@ark-ui/react").Assign<Checkbox.LabelProps & import("react").RefAttributes<HTMLSpanElement>, import("tailwind-variants").VariantProps<import("tailwind-variants").TVReturnType<{
|
|
264
264
|
size: {
|
|
265
265
|
md: {
|
|
@@ -274,7 +274,7 @@ export declare const Label: import("react").ComponentType<import("@ark-ui/react"
|
|
|
274
274
|
gray: {};
|
|
275
275
|
neutral: {};
|
|
276
276
|
};
|
|
277
|
-
}, Record<"label" | "
|
|
277
|
+
}, Record<"label" | "group" | "root" | "control" | "indicator", string | string[]>, undefined, {
|
|
278
278
|
size: {
|
|
279
279
|
md: {
|
|
280
280
|
control: string;
|
|
@@ -288,7 +288,7 @@ export declare const Label: import("react").ComponentType<import("@ark-ui/react"
|
|
|
288
288
|
gray: {};
|
|
289
289
|
neutral: {};
|
|
290
290
|
};
|
|
291
|
-
}, Record<"label" | "
|
|
291
|
+
}, Record<"label" | "group" | "root" | "control" | "indicator", string | string[]>, import("tailwind-variants").TVReturnType<{
|
|
292
292
|
size: {
|
|
293
293
|
md: {
|
|
294
294
|
control: string;
|
|
@@ -302,6 +302,6 @@ export declare const Label: import("react").ComponentType<import("@ark-ui/react"
|
|
|
302
302
|
gray: {};
|
|
303
303
|
neutral: {};
|
|
304
304
|
};
|
|
305
|
-
}, Record<"label" | "
|
|
305
|
+
}, Record<"label" | "group" | "root" | "control" | "indicator", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
306
306
|
export declare const HiddenInput: import("react").ForwardRefExoticComponent<Checkbox.HiddenInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
307
307
|
export declare const Context: (props: Checkbox.ContextProps) => import("react").ReactNode;
|
|
@@ -12,7 +12,7 @@ export declare const checkboxRecipe: import("tailwind-variants").TVReturnType<{
|
|
|
12
12
|
gray: {};
|
|
13
13
|
neutral: {};
|
|
14
14
|
};
|
|
15
|
-
}, Record<"label" | "
|
|
15
|
+
}, Record<"label" | "group" | "root" | "control" | "indicator", string | string[]>, undefined, {
|
|
16
16
|
size: {
|
|
17
17
|
md: {
|
|
18
18
|
control: string;
|
|
@@ -26,7 +26,7 @@ export declare const checkboxRecipe: import("tailwind-variants").TVReturnType<{
|
|
|
26
26
|
gray: {};
|
|
27
27
|
neutral: {};
|
|
28
28
|
};
|
|
29
|
-
}, Record<"label" | "
|
|
29
|
+
}, Record<"label" | "group" | "root" | "control" | "indicator", string | string[]>, import("tailwind-variants").TVReturnType<{
|
|
30
30
|
size: {
|
|
31
31
|
md: {
|
|
32
32
|
control: string;
|
|
@@ -40,4 +40,4 @@ export declare const checkboxRecipe: import("tailwind-variants").TVReturnType<{
|
|
|
40
40
|
gray: {};
|
|
41
41
|
neutral: {};
|
|
42
42
|
};
|
|
43
|
-
}, Record<"label" | "
|
|
43
|
+
}, Record<"label" | "group" | "root" | "control" | "indicator", string | string[]>, undefined, unknown, unknown, undefined>>;
|