@deckai/deck-ui 0.0.6 → 0.0.7
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/README.md +1 -0
- package/dist/index.cjs +1014 -0
- package/dist/index.cjs.map +1 -0
- package/dist/{src/index.d.cts → index.d.cts} +157 -48
- package/dist/{src/index.d.ts → index.d.ts} +157 -48
- package/dist/index.js +963 -0
- package/dist/index.js.map +1 -0
- package/dist/{src/styles → styles}/fonts.css +4 -4
- package/dist/styles/fonts.css.map +1 -0
- package/dist/styles/styles.css +1 -1
- package/dist/styles/styles.css.map +1 -0
- package/package.json +5 -5
- package/dist/src/index.cjs +0 -579
- package/dist/src/index.cjs.map +0 -1
- package/dist/src/index.js +0 -535
- package/dist/src/index.js.map +0 -1
- package/dist/src/styles/fonts.css.map +0 -1
- package/dist/src/styles/styles.css +0 -54
- package/dist/src/styles/styles.css.map +0 -1
- package/dist/tailwind-BOs_0iUp.d.cts +0 -34
- package/dist/tailwind-BOs_0iUp.d.ts +0 -34
- package/dist/tailwind.config.cjs +0 -264
- package/dist/tailwind.config.cjs.map +0 -1
- package/dist/tailwind.config.d.cts +0 -51
- package/dist/tailwind.config.d.ts +0 -51
- package/dist/tailwind.config.js +0 -258
- package/dist/tailwind.config.js.map +0 -1
- /package/dist/{src/styles → styles}/fonts.d.cts +0 -0
- /package/dist/{src/styles → styles}/fonts.d.ts +0 -0
- /package/dist/{src/styles → styles}/styles.d.cts +0 -0
- /package/dist/{src/styles → styles}/styles.d.ts +0 -0
|
@@ -1,23 +1,72 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import React__default, {
|
|
2
|
+
import React__default, { SVGProps, ButtonHTMLAttributes, HTMLAttributes } from 'react';
|
|
3
3
|
import { IconName } from '@deckai/icons';
|
|
4
|
-
import { C as Colors, T as TextColorVariant, P as PrimaryShades, S as SecondaryShades, a as TertiaryShades, b as Typography, I as IconColors } from '../tailwind-BOs_0iUp.js';
|
|
5
|
-
import { IconName as IconName$1 } from '@deckai/icons/src/types/icon-names';
|
|
6
4
|
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
5
|
+
import { IconName as IconName$1 } from '@deckai/icons/src/types/icon-names';
|
|
7
6
|
|
|
8
7
|
type OptionProps = {
|
|
9
8
|
label: string;
|
|
10
9
|
value: string;
|
|
11
10
|
onChange?: (value: string) => void;
|
|
11
|
+
selected?: boolean;
|
|
12
|
+
};
|
|
13
|
+
declare const Option: ({ value, label, onChange, selected }: OptionProps) => React__default.JSX.Element;
|
|
14
|
+
|
|
15
|
+
type ColorShade = "5" | "10" | "15" | "20" | "25" | "30" | "50" | "100" | "200" | "300" | "400" | "500" | "600" | "DEFAULT";
|
|
16
|
+
type TextColorVariant = "primary" | "secondary" | "white" | "primary-blue";
|
|
17
|
+
type BackgroundShades = Pick<Record<ColorShade, string>, "50" | "100">;
|
|
18
|
+
type PrimaryShades = Pick<Record<ColorShade, string>, "50" | "100">;
|
|
19
|
+
type SecondaryShades = Pick<Record<ColorShade, string>, "50" | "100" | "200" | "300" | "400" | "500" | "600">;
|
|
20
|
+
type TertiaryShades = Pick<Record<ColorShade, string>, "5" | "10" | "15" | "20" | "25" | "30">;
|
|
21
|
+
type StrokeShades = Pick<Record<ColorShade, string>, "DEFAULT">;
|
|
22
|
+
type TextShades = Record<TextColorVariant, string>;
|
|
23
|
+
type Colors = {
|
|
24
|
+
background: BackgroundShades;
|
|
25
|
+
primary: PrimaryShades;
|
|
26
|
+
secondary: SecondaryShades;
|
|
27
|
+
tertiary: TertiaryShades;
|
|
28
|
+
stroke: StrokeShades | string;
|
|
29
|
+
text: TextShades;
|
|
30
|
+
overlay: string;
|
|
31
|
+
};
|
|
32
|
+
type HeadingSize = "xl" | "lg" | "md" | "sm" | "xs";
|
|
33
|
+
type BodySize = "lg" | "lg-semibold" | "md" | "default" | "default-medium" | "default-semibold" | "default-bold" | "xs" | "xs-medium" | "xxs" | "xxs-medium" | "xxs-semibold";
|
|
34
|
+
type LabelSize = "default";
|
|
35
|
+
type Typography = {
|
|
36
|
+
heading: Record<HeadingSize, TypographyConfig>;
|
|
37
|
+
body: Record<BodySize, TypographyConfig>;
|
|
38
|
+
label: Record<LabelSize, TypographyConfig>;
|
|
12
39
|
};
|
|
13
|
-
|
|
40
|
+
type TypographyConfig = {
|
|
41
|
+
fontSize: string;
|
|
42
|
+
lineHeight?: string;
|
|
43
|
+
letterSpacing?: string;
|
|
44
|
+
fontWeight: string;
|
|
45
|
+
textTransform?: string;
|
|
46
|
+
};
|
|
47
|
+
type IconColors = "primary" | "secondary" | "white" | "primaryBlue";
|
|
48
|
+
|
|
49
|
+
type IconProps = {
|
|
50
|
+
name: IconName;
|
|
51
|
+
/** @default 24 */
|
|
52
|
+
size?: number | `${Breakpoint$1}:${number}`;
|
|
53
|
+
/** @default primary */
|
|
54
|
+
color?: IconColors;
|
|
55
|
+
title?: string;
|
|
56
|
+
className?: string;
|
|
57
|
+
style?: React__default.CSSProperties;
|
|
58
|
+
} & Omit<SVGProps<SVGSVGElement>, "aria-hidden" | "aria-label">;
|
|
59
|
+
type Breakpoint$1 = "sm" | "md" | "lg" | "xl" | "2xl";
|
|
60
|
+
declare const Icon: React__default.ForwardRefExoticComponent<Omit<IconProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
|
|
61
|
+
|
|
62
|
+
type PressableProps = ButtonHTMLAttributes<HTMLButtonElement>;
|
|
63
|
+
declare const Pressable: React__default.FC<PressableProps>;
|
|
14
64
|
|
|
15
65
|
type NavbarItemProps = {
|
|
16
66
|
iconName: IconName;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
};
|
|
20
|
-
declare const NavbarItem: ({ label, iconName, onClick, ...props }: NavbarItemProps) => React__default.JSX.Element;
|
|
67
|
+
hasNotification?: boolean;
|
|
68
|
+
} & Pick<IconProps, "color" | "title"> & PressableProps;
|
|
69
|
+
declare const NavbarItem: ({ iconName, hasNotification, color, title, ...props }: NavbarItemProps) => React__default.JSX.Element;
|
|
21
70
|
|
|
22
71
|
type NavbarProps = {
|
|
23
72
|
searchOptions: OptionProps[];
|
|
@@ -25,11 +74,9 @@ type NavbarProps = {
|
|
|
25
74
|
navbarItems: NavbarItemProps[];
|
|
26
75
|
onLogoClick?: () => void;
|
|
27
76
|
onProfileClick?: () => void;
|
|
77
|
+
avatarImage: string;
|
|
28
78
|
};
|
|
29
|
-
declare const Navbar: ({ searchOptions, onSearchChange, navbarItems, onLogoClick, onProfileClick }: NavbarProps) => React__default.JSX.Element;
|
|
30
|
-
|
|
31
|
-
type PressableProps = ButtonHTMLAttributes<HTMLButtonElement>;
|
|
32
|
-
declare const Pressable: React__default.FC<PressableProps>;
|
|
79
|
+
declare const Navbar: ({ searchOptions, onSearchChange, navbarItems, onLogoClick, onProfileClick, avatarImage }: NavbarProps) => React__default.JSX.Element;
|
|
33
80
|
|
|
34
81
|
type TextElement = "p" | "span" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "strong" | "em" | "blockquote" | "pre" | "code" | "small" | "label" | "a";
|
|
35
82
|
type HTMLPropsMap = {
|
|
@@ -61,8 +108,10 @@ type TypographyKey = {
|
|
|
61
108
|
[T in TypographyCategory]: `${T}-${TypographyValue<T>}`;
|
|
62
109
|
}[TypographyCategory];
|
|
63
110
|
type Weight = "light" | "regular" | "semibold" | "bold";
|
|
111
|
+
type Breakpoint = "sm" | "md" | "lg" | "xl" | "2xl";
|
|
112
|
+
type ResponsiveVariant = TypographyKey | `${Breakpoint}:${TypographyKey}`;
|
|
64
113
|
type TextProps<T extends TextElement = "p"> = {
|
|
65
|
-
variant?:
|
|
114
|
+
variant?: ResponsiveVariant | ResponsiveVariant[];
|
|
66
115
|
color?: ColorKey | "inherit";
|
|
67
116
|
as?: T;
|
|
68
117
|
className?: string;
|
|
@@ -79,26 +128,28 @@ type LinkProps = {
|
|
|
79
128
|
} & Pick<TextProps, "variant" | "color"> & React__default.AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
80
129
|
declare const Link: ({ children, color, variant, href, className, ...props }: LinkProps) => React__default.JSX.Element;
|
|
81
130
|
|
|
82
|
-
type
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
style?: React__default.CSSProperties;
|
|
91
|
-
} & Omit<SVGProps<SVGSVGElement>, "aria-hidden" | "aria-label">;
|
|
92
|
-
declare const Icon: React__default.ForwardRefExoticComponent<Omit<{
|
|
93
|
-
name: IconName;
|
|
94
|
-
/** @default 24 */
|
|
95
|
-
size?: number | string;
|
|
96
|
-
/** @default primary */
|
|
97
|
-
color?: IconColors;
|
|
98
|
-
title?: string;
|
|
131
|
+
type TabItem = {
|
|
132
|
+
value: string;
|
|
133
|
+
label: string;
|
|
134
|
+
content: React__default.ReactNode;
|
|
135
|
+
};
|
|
136
|
+
type TabsProps = {
|
|
137
|
+
items: TabItem[];
|
|
138
|
+
defaultValue?: string;
|
|
99
139
|
className?: string;
|
|
100
|
-
|
|
101
|
-
}
|
|
140
|
+
onChange?: (value: string) => void;
|
|
141
|
+
};
|
|
142
|
+
declare const Tabs: React__default.ForwardRefExoticComponent<TabsProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
143
|
+
|
|
144
|
+
type WorkCardProps = {
|
|
145
|
+
socialIconName: "instagram-filled" | "tiktok-filled" | "youtube-filled";
|
|
146
|
+
tags: string[];
|
|
147
|
+
caption: string;
|
|
148
|
+
/** play count should already be formatted with k or m */
|
|
149
|
+
playCount: string;
|
|
150
|
+
backgroundImage: string;
|
|
151
|
+
};
|
|
152
|
+
declare const WorkCard: ({ socialIconName, tags, caption, playCount, backgroundImage }: WorkCardProps) => React__default.JSX.Element;
|
|
102
153
|
|
|
103
154
|
type BreadcrumbItem = {
|
|
104
155
|
label: string;
|
|
@@ -134,11 +185,13 @@ declare const Combobox: ({ options, placeholder, value, onChange, end, className
|
|
|
134
185
|
|
|
135
186
|
type TagProps = {
|
|
136
187
|
children: React__default.ReactNode;
|
|
188
|
+
padded?: boolean;
|
|
189
|
+
color?: "primary" | "text";
|
|
137
190
|
} & HTMLAttributes<HTMLDivElement>;
|
|
138
|
-
declare const Tag: ({ children, ...props }: TagProps) => React__default.JSX.Element;
|
|
191
|
+
declare const Tag: ({ children, padded, color, ...props }: TagProps) => React__default.JSX.Element;
|
|
139
192
|
|
|
140
193
|
type SocialCardProps = {
|
|
141
|
-
icon: IconName
|
|
194
|
+
icon: IconName;
|
|
142
195
|
followers: string;
|
|
143
196
|
engagement: string;
|
|
144
197
|
} & PressableProps;
|
|
@@ -153,10 +206,24 @@ declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchPrimitive.Switc
|
|
|
153
206
|
description?: string;
|
|
154
207
|
} & React.RefAttributes<HTMLButtonElement>>;
|
|
155
208
|
|
|
209
|
+
type BadgeProps = {
|
|
210
|
+
variant?: "pink" | "orange" | "green";
|
|
211
|
+
iconName?: IconName;
|
|
212
|
+
} & React.HTMLAttributes<HTMLSpanElement>;
|
|
213
|
+
declare const Badge: React.ForwardRefExoticComponent<{
|
|
214
|
+
variant?: "pink" | "orange" | "green";
|
|
215
|
+
iconName?: IconName;
|
|
216
|
+
} & React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
|
|
217
|
+
|
|
156
218
|
type ProfileCardProps = {
|
|
157
219
|
profileImage: string;
|
|
220
|
+
name: string;
|
|
221
|
+
location: string;
|
|
222
|
+
memberSince?: string;
|
|
223
|
+
interests?: string[];
|
|
224
|
+
badges?: BadgeProps[];
|
|
158
225
|
};
|
|
159
|
-
declare const ProfileCard: ({ profileImage }: ProfileCardProps) => React__default.JSX.Element;
|
|
226
|
+
declare const ProfileCard: ({ profileImage, name, location, memberSince, interests, badges }: ProfileCardProps) => React__default.JSX.Element;
|
|
160
227
|
|
|
161
228
|
type ContactItemProps = {
|
|
162
229
|
iconName: IconName$1;
|
|
@@ -168,8 +235,9 @@ declare const ContactItem: ({ iconName, children, href, ...linkProps }: ContactI
|
|
|
168
235
|
type AboutCardProps = {
|
|
169
236
|
interests: string[];
|
|
170
237
|
contactItems: ContactItemProps[];
|
|
238
|
+
description: string;
|
|
171
239
|
};
|
|
172
|
-
declare const AboutCard: ({ interests, contactItems }: AboutCardProps) => React__default.JSX.Element;
|
|
240
|
+
declare const AboutCard: ({ interests, contactItems, description, ...props }: AboutCardProps) => React__default.JSX.Element;
|
|
173
241
|
|
|
174
242
|
type AvatarProps = {
|
|
175
243
|
src: string;
|
|
@@ -185,15 +253,6 @@ type LogoProps = {
|
|
|
185
253
|
};
|
|
186
254
|
declare const Logo: ({ width, height }: LogoProps) => React__default.JSX.Element;
|
|
187
255
|
|
|
188
|
-
type BadgeProps = {
|
|
189
|
-
variant?: "pink" | "orange" | "green";
|
|
190
|
-
iconName?: IconName;
|
|
191
|
-
} & React.HTMLAttributes<HTMLSpanElement>;
|
|
192
|
-
declare const Badge: React.ForwardRefExoticComponent<{
|
|
193
|
-
variant?: "pink" | "orange" | "green";
|
|
194
|
-
iconName?: IconName;
|
|
195
|
-
} & React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
|
|
196
|
-
|
|
197
256
|
type ButtonProps = {
|
|
198
257
|
/** @default filled */
|
|
199
258
|
variant?: "filled" | "outlined";
|
|
@@ -222,7 +281,57 @@ declare const Button: React.ForwardRefExoticComponent<{
|
|
|
222
281
|
type InputProps = {
|
|
223
282
|
className?: string;
|
|
224
283
|
end?: React.ReactNode;
|
|
225
|
-
|
|
226
|
-
|
|
284
|
+
/** renders an icon in the end slot */
|
|
285
|
+
iconName?: IconName;
|
|
286
|
+
} & React.InputHTMLAttributes<HTMLInputElement> & Pick<IconProps, "color" | "size" | "title">;
|
|
287
|
+
declare const Input: ({ className, end, iconName, color, size, title, ...props }: InputProps) => React.JSX.Element;
|
|
288
|
+
|
|
289
|
+
declare const config: {
|
|
290
|
+
content: string[];
|
|
291
|
+
theme: {
|
|
292
|
+
extend: {
|
|
293
|
+
colors: Colors;
|
|
294
|
+
fontSize: {
|
|
295
|
+
[x: string]: [string, object];
|
|
296
|
+
};
|
|
297
|
+
fontFamily: {
|
|
298
|
+
sans: [string, string];
|
|
299
|
+
};
|
|
300
|
+
fontWeight: {
|
|
301
|
+
light: string;
|
|
302
|
+
regular: string;
|
|
303
|
+
normal: string;
|
|
304
|
+
semibold: string;
|
|
305
|
+
bold: string;
|
|
306
|
+
};
|
|
307
|
+
};
|
|
308
|
+
};
|
|
309
|
+
plugins: {
|
|
310
|
+
handler: () => void;
|
|
311
|
+
}[];
|
|
312
|
+
safelist: string[];
|
|
313
|
+
keyframes: {
|
|
314
|
+
"fade-in": {
|
|
315
|
+
from: {
|
|
316
|
+
opacity: string;
|
|
317
|
+
};
|
|
318
|
+
to: {
|
|
319
|
+
opacity: string;
|
|
320
|
+
};
|
|
321
|
+
};
|
|
322
|
+
"fade-out": {
|
|
323
|
+
from: {
|
|
324
|
+
opacity: string;
|
|
325
|
+
};
|
|
326
|
+
to: {
|
|
327
|
+
opacity: string;
|
|
328
|
+
};
|
|
329
|
+
};
|
|
330
|
+
};
|
|
331
|
+
animation: {
|
|
332
|
+
"fade-in": string;
|
|
333
|
+
"fade-out": string;
|
|
334
|
+
};
|
|
335
|
+
};
|
|
227
336
|
|
|
228
|
-
export { AboutCard, type AboutCardProps, Avatar, type AvatarProps, Badge, type BadgeProps, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, Combobox, type ComboboxProps, ContactItem, type ContactItemProps, Icon, type IconProps, Input, type InputProps, Link, type LinkProps, Logo, type LogoProps, Navbar, NavbarItem, type NavbarItemProps, type NavbarProps, Option, type OptionProps, Pressable, type PressableProps, ProfileCard, type ProfileCardProps, SocialCard, type SocialCardProps, Switch, type SwitchProps, Tag, type TagProps, Text, type TextProps, Tooltip, type TooltipProps };
|
|
337
|
+
export { AboutCard, type AboutCardProps, Avatar, type AvatarProps, Badge, type BadgeProps, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, Combobox, type ComboboxProps, ContactItem, type ContactItemProps, Icon, type IconProps, Input, type InputProps, Link, type LinkProps, Logo, type LogoProps, Navbar, NavbarItem, type NavbarItemProps, type NavbarProps, Option, type OptionProps, Pressable, type PressableProps, ProfileCard, type ProfileCardProps, SocialCard, type SocialCardProps, Switch, type SwitchProps, Tabs, type TabsProps, Tag, type TagProps, Text, type TextProps, Tooltip, type TooltipProps, WorkCard, type WorkCardProps, config as tailwindConfig };
|