@thebasenet/ui 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/dist/brand/index.d.mts +55 -0
- package/dist/brand/index.d.ts +55 -0
- package/dist/brand/index.js +152 -0
- package/dist/brand/index.js.map +1 -0
- package/dist/brand/index.mjs +152 -0
- package/dist/brand/index.mjs.map +1 -0
- package/dist/components/index.d.mts +122 -0
- package/dist/components/index.d.ts +122 -0
- package/dist/components/index.js +848 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/index.mjs +7956 -0
- package/dist/components/index.mjs.map +1 -0
- package/dist/index.d.mts +32 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.js +2801 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +32365 -0
- package/dist/index.mjs.map +1 -0
- package/dist/tokens/index.d.mts +190 -0
- package/dist/tokens/index.d.ts +190 -0
- package/dist/tokens/index.js +104 -0
- package/dist/tokens/index.js.map +1 -0
- package/dist/tokens/index.mjs +104 -0
- package/dist/tokens/index.mjs.map +1 -0
- package/dist/ui/index.d.mts +302 -0
- package/dist/ui/index.d.ts +302 -0
- package/dist/ui/index.js +2058 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/index.mjs +31585 -0
- package/dist/ui/index.mjs.map +1 -0
- package/dist/utils/cn.d.mts +5 -0
- package/dist/utils/cn.d.ts +5 -0
- package/dist/utils/cn.js +11 -0
- package/dist/utils/cn.js.map +1 -0
- package/dist/utils/cn.mjs +3197 -0
- package/dist/utils/cn.mjs.map +1 -0
- package/package.json +102 -0
- package/styles/animations.css +63 -0
- package/styles/globals.css +31 -0
- package/styles/theme.css +97 -0
- package/styles/variables.css +238 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import React__default, { ReactNode } from 'react';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
type LoaderProps = {
|
|
5
|
+
size?: number | string;
|
|
6
|
+
color?: string;
|
|
7
|
+
variant?: "primary" | "secondary";
|
|
8
|
+
className?: string;
|
|
9
|
+
};
|
|
10
|
+
declare const Loader: React__default.FC<LoaderProps>;
|
|
11
|
+
|
|
12
|
+
interface PageLoaderProps {
|
|
13
|
+
message?: string;
|
|
14
|
+
}
|
|
15
|
+
declare function PageLoader({ message }: PageLoaderProps): react_jsx_runtime.JSX.Element;
|
|
16
|
+
|
|
17
|
+
interface EmptyStateProps {
|
|
18
|
+
title?: string;
|
|
19
|
+
message?: string;
|
|
20
|
+
imageSrc?: string;
|
|
21
|
+
size?: number;
|
|
22
|
+
component?: React__default.ReactNode;
|
|
23
|
+
className?: string;
|
|
24
|
+
icon?: React__default.ReactNode;
|
|
25
|
+
}
|
|
26
|
+
declare const EmptyState: React__default.FC<EmptyStateProps>;
|
|
27
|
+
|
|
28
|
+
interface LoadingStateProps {
|
|
29
|
+
/** Number of skeleton rows to render */
|
|
30
|
+
rows?: number;
|
|
31
|
+
/** Show a circular skeleton avatar before each row */
|
|
32
|
+
showAvatar?: boolean;
|
|
33
|
+
className?: string;
|
|
34
|
+
rowClassName?: string;
|
|
35
|
+
}
|
|
36
|
+
declare const LoadingState: React__default.FC<LoadingStateProps>;
|
|
37
|
+
|
|
38
|
+
interface ErrorStateProps {
|
|
39
|
+
title?: string;
|
|
40
|
+
message?: string;
|
|
41
|
+
onRetry?: () => void;
|
|
42
|
+
}
|
|
43
|
+
declare const ErrorState: React__default.FC<ErrorStateProps>;
|
|
44
|
+
|
|
45
|
+
declare function useIsMobile(): boolean;
|
|
46
|
+
interface CustomModalProps {
|
|
47
|
+
title: string;
|
|
48
|
+
children: ReactNode | ((closeModal: () => void) => ReactNode);
|
|
49
|
+
trigger?: ReactNode;
|
|
50
|
+
triggerAsChild?: boolean;
|
|
51
|
+
description?: string;
|
|
52
|
+
open?: boolean;
|
|
53
|
+
onOpenChange?: (open: boolean) => void;
|
|
54
|
+
className?: string;
|
|
55
|
+
contentClassName?: string;
|
|
56
|
+
showModalHeader?: boolean;
|
|
57
|
+
showModalDescription?: boolean;
|
|
58
|
+
/** Override the default icon shown in the modal header */
|
|
59
|
+
customIcon?: ReactNode;
|
|
60
|
+
footer?: ReactNode;
|
|
61
|
+
}
|
|
62
|
+
declare const CustomModal: React__default.FC<CustomModalProps>;
|
|
63
|
+
|
|
64
|
+
type BackButtonProps = {
|
|
65
|
+
onClick?: () => void;
|
|
66
|
+
};
|
|
67
|
+
declare const BackButton: ({ onClick }: BackButtonProps) => react_jsx_runtime.JSX.Element;
|
|
68
|
+
|
|
69
|
+
interface ThemeSwitcherProps {
|
|
70
|
+
variant?: "default" | "outline" | "ghost" | "secondary";
|
|
71
|
+
size?: "default" | "sm" | "lg" | "icon";
|
|
72
|
+
className?: string;
|
|
73
|
+
}
|
|
74
|
+
declare const ThemeSwitcher: ({ variant, size, className, }: ThemeSwitcherProps) => react_jsx_runtime.JSX.Element;
|
|
75
|
+
|
|
76
|
+
type ProfileImageProps = {
|
|
77
|
+
/** Render the avatar wrapped in a next/link */
|
|
78
|
+
asLink?: boolean;
|
|
79
|
+
/** Avatar diameter in px */
|
|
80
|
+
size?: number;
|
|
81
|
+
className?: string;
|
|
82
|
+
/** Full URL to the profile picture */
|
|
83
|
+
profilePicUrl?: string;
|
|
84
|
+
/** Show a verified badge indicator */
|
|
85
|
+
isVerified?: boolean;
|
|
86
|
+
/** Show an online presence indicator */
|
|
87
|
+
isOnline?: boolean;
|
|
88
|
+
isOverflowHidden?: boolean;
|
|
89
|
+
/** href for the link when asLink=true (defaults to "/profile/{userId}") */
|
|
90
|
+
link?: string;
|
|
91
|
+
/** Used for the image alt text */
|
|
92
|
+
userName?: string;
|
|
93
|
+
/** Used to build the default link (/profile/{userId}) */
|
|
94
|
+
userId?: string;
|
|
95
|
+
};
|
|
96
|
+
declare const ProfileImage: ({ asLink, size, profilePicUrl, isVerified, isOnline, isOverflowHidden, className, link, userName, userId, }: ProfileImageProps) => react_jsx_runtime.JSX.Element;
|
|
97
|
+
|
|
98
|
+
interface Country {
|
|
99
|
+
countryCode: string;
|
|
100
|
+
countryName: string;
|
|
101
|
+
/** Optional — phone dial code, e.g. "+1" */
|
|
102
|
+
dialCode?: string;
|
|
103
|
+
/** Optional — emoji flag */
|
|
104
|
+
flag?: string;
|
|
105
|
+
}
|
|
106
|
+
interface CountrySelectorProps {
|
|
107
|
+
/** Array of country objects to display */
|
|
108
|
+
countries: Country[];
|
|
109
|
+
value?: string;
|
|
110
|
+
onChange?: (countryCode: string) => void;
|
|
111
|
+
setValue?: (field: string, value: any) => void;
|
|
112
|
+
fieldName?: string;
|
|
113
|
+
placeholder?: string;
|
|
114
|
+
error?: string;
|
|
115
|
+
label?: string;
|
|
116
|
+
required?: boolean;
|
|
117
|
+
disabled?: boolean;
|
|
118
|
+
className?: string;
|
|
119
|
+
}
|
|
120
|
+
declare const CountrySelector: React__default.FC<CountrySelectorProps>;
|
|
121
|
+
|
|
122
|
+
export { BackButton, type Country, CountrySelector, type CountrySelectorProps, CustomModal, type CustomModalProps, EmptyState, ErrorState, Loader, LoadingState, PageLoader, ProfileImage, ThemeSwitcher, useIsMobile };
|