@rovula/ui 0.0.14 → 0.0.15
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/cjs/bundle.js +3 -3
- package/dist/cjs/bundle.js.map +1 -1
- package/dist/cjs/types/components/Avatar/Avatar.d.ts +4 -5
- package/dist/cjs/types/components/Avatar/Avatar.stories.d.ts +3 -3
- package/dist/cjs/types/components/Avatar/Avatar.styles.d.ts +1 -1
- package/dist/cjs/types/components/Avatar/index.d.ts +3 -0
- package/dist/cjs/types/components/Navbar/Navbar.d.ts +1 -1
- package/dist/cjs/types/components/Navbar/Navbar.stories.d.ts +1 -9
- package/dist/cjs/types/components/Navbar/index.d.ts +2 -0
- package/dist/cjs/types/index.d.ts +5 -0
- package/dist/components/Avatar/index.js +3 -0
- package/dist/components/Navbar/index.js +2 -0
- package/dist/esm/bundle.js +3 -3
- package/dist/esm/bundle.js.map +1 -1
- package/dist/esm/types/components/Avatar/Avatar.d.ts +4 -5
- package/dist/esm/types/components/Avatar/Avatar.stories.d.ts +3 -3
- package/dist/esm/types/components/Avatar/Avatar.styles.d.ts +1 -1
- package/dist/esm/types/components/Avatar/index.d.ts +3 -0
- package/dist/esm/types/components/Navbar/Navbar.d.ts +1 -1
- package/dist/esm/types/components/Navbar/Navbar.stories.d.ts +1 -9
- package/dist/esm/types/components/Navbar/index.d.ts +2 -0
- package/dist/esm/types/index.d.ts +5 -0
- package/dist/index.d.ts +52 -2
- package/dist/index.js +2 -0
- package/package.json +1 -1
- package/src/components/Avatar/Avatar.tsx +4 -4
- package/src/components/Avatar/index.ts +4 -0
- package/src/components/Navbar/Navbar.tsx +1 -1
- package/src/components/Navbar/index.ts +3 -0
- package/src/index.ts +5 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { AvatarImage } from "./AvatarBase";
|
|
3
2
|
type BaseAvatarProps = {
|
|
4
3
|
imageUrl?: string;
|
|
5
4
|
text?: string;
|
|
@@ -13,20 +12,20 @@ type BaseAvatarProps = {
|
|
|
13
12
|
fallbackClassName?: string;
|
|
14
13
|
style?: React.CSSProperties;
|
|
15
14
|
};
|
|
16
|
-
type
|
|
15
|
+
type AvatarTextProps = {
|
|
17
16
|
text: string;
|
|
18
17
|
type: "text";
|
|
19
18
|
} & BaseAvatarProps;
|
|
20
|
-
type
|
|
19
|
+
type AvatarImageProps = {
|
|
21
20
|
imageUrl: string;
|
|
22
21
|
fallback: React.ReactNode;
|
|
23
22
|
type: "image";
|
|
24
23
|
} & BaseAvatarProps;
|
|
25
|
-
type
|
|
24
|
+
type AvatarIconProps = {
|
|
26
25
|
icon: string;
|
|
27
26
|
type: "icon";
|
|
28
27
|
} & BaseAvatarProps;
|
|
29
|
-
export type AvatarProps =
|
|
28
|
+
export type AvatarProps = AvatarTextProps | AvatarImageProps | AvatarIconProps;
|
|
30
29
|
export declare const formatAvatarName: (text: string) => string;
|
|
31
30
|
declare const Avatar: React.FC<AvatarProps>;
|
|
32
31
|
export default Avatar;
|
|
@@ -14,7 +14,7 @@ declare const meta: {
|
|
|
14
14
|
fallback?: React.ReactNode;
|
|
15
15
|
icon?: React.ReactNode;
|
|
16
16
|
children?: React.ReactNode;
|
|
17
|
-
size?: "sm" | "md" | "lg" | "
|
|
17
|
+
size?: "sm" | "md" | "lg" | "xxs" | "xs" | undefined;
|
|
18
18
|
rounded?: "none" | "normal" | "full" | undefined;
|
|
19
19
|
className?: string | undefined;
|
|
20
20
|
imageClassName?: string | undefined;
|
|
@@ -27,7 +27,7 @@ declare const meta: {
|
|
|
27
27
|
text?: string | undefined;
|
|
28
28
|
icon?: React.ReactNode;
|
|
29
29
|
children?: React.ReactNode;
|
|
30
|
-
size?: "sm" | "md" | "lg" | "
|
|
30
|
+
size?: "sm" | "md" | "lg" | "xxs" | "xs" | undefined;
|
|
31
31
|
rounded?: "none" | "normal" | "full" | undefined;
|
|
32
32
|
className?: string | undefined;
|
|
33
33
|
imageClassName?: string | undefined;
|
|
@@ -40,7 +40,7 @@ declare const meta: {
|
|
|
40
40
|
text?: string | undefined;
|
|
41
41
|
fallback?: React.ReactNode;
|
|
42
42
|
children?: React.ReactNode;
|
|
43
|
-
size?: "sm" | "md" | "lg" | "
|
|
43
|
+
size?: "sm" | "md" | "lg" | "xxs" | "xs" | undefined;
|
|
44
44
|
rounded?: "none" | "normal" | "full" | undefined;
|
|
45
45
|
className?: string | undefined;
|
|
46
46
|
imageClassName?: string | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const avatarVariants: (props?: ({
|
|
2
|
-
size?: "sm" | "md" | "lg" | "
|
|
2
|
+
size?: "sm" | "md" | "lg" | "xxs" | "xs" | null | undefined;
|
|
3
3
|
rounded?: "none" | "normal" | "full" | null | undefined;
|
|
4
4
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: React.FC<
|
|
5
|
-
position?: "static" | "sticky" | undefined;
|
|
6
|
-
children?: React.ReactNode;
|
|
7
|
-
leftNav?: React.ReactNode;
|
|
8
|
-
rightNav?: React.ReactNode;
|
|
9
|
-
center?: React.ReactNode;
|
|
10
|
-
container?: boolean | undefined;
|
|
11
|
-
className?: string | undefined;
|
|
12
|
-
}>;
|
|
4
|
+
component: React.FC<import("./Navbar").NavbarProps>;
|
|
13
5
|
tags: string[];
|
|
14
6
|
parameters: {
|
|
15
7
|
layout: string;
|
|
@@ -7,6 +7,8 @@ export { default as Dropdown } from "./components/Dropdown/Dropdown";
|
|
|
7
7
|
export { Checkbox } from "./components/Checkbox/Checkbox";
|
|
8
8
|
export { Label } from "./components/Label/Label";
|
|
9
9
|
export { Input } from "./components/Input/Input";
|
|
10
|
+
export { Navbar } from "./components/Navbar";
|
|
11
|
+
export { Avatar, AvatarGroup } from "./components/Avatar";
|
|
10
12
|
export * from "./components/Table/Table";
|
|
11
13
|
export * from "./components/DataTable/DataTable";
|
|
12
14
|
export * from "./components/Dialog/Dialog";
|
|
@@ -14,5 +16,8 @@ export * from "./components/AlertDialog/AlertDialog";
|
|
|
14
16
|
export type { ButtonProps } from "./components/Button/Button";
|
|
15
17
|
export type { InputProps } from "./components/TextInput/TextInput";
|
|
16
18
|
export type { DropdownProps, Options } from "./components/Dropdown/Dropdown";
|
|
19
|
+
export type { NavbarProps } from "./components/Navbar/Navbar";
|
|
20
|
+
export type { AvatarProps } from "./components/Avatar/Avatar";
|
|
21
|
+
export type { AvatarGroupProps } from "./components/Avatar/AvatarGroup";
|
|
17
22
|
export { resloveTimestamp, getStartDateOfDay, getEndDateOfDay, getStartEndTimestampOfDay, getTimestampUTC, } from "./utils/datetime";
|
|
18
23
|
export { cn } from "./utils/cn";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import React__default, { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import React__default, { ReactElement, ReactNode, FC } from 'react';
|
|
3
3
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
4
4
|
import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
|
|
5
5
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
@@ -165,6 +165,56 @@ declare const Input: React__default.ForwardRefExoticComponent<{
|
|
|
165
165
|
className?: string | undefined;
|
|
166
166
|
} & Omit<React__default.InputHTMLAttributes<HTMLInputElement>, "size"> & React__default.RefAttributes<HTMLInputElement>>;
|
|
167
167
|
|
|
168
|
+
type NavbarProps = {
|
|
169
|
+
position?: "static" | "sticky";
|
|
170
|
+
children?: ReactNode;
|
|
171
|
+
leftNav?: ReactNode;
|
|
172
|
+
rightNav?: ReactNode;
|
|
173
|
+
center?: ReactNode;
|
|
174
|
+
container?: boolean;
|
|
175
|
+
className?: string;
|
|
176
|
+
};
|
|
177
|
+
declare const Navbar: FC<NavbarProps>;
|
|
178
|
+
|
|
179
|
+
type BaseAvatarProps = {
|
|
180
|
+
imageUrl?: string;
|
|
181
|
+
text?: string;
|
|
182
|
+
fallback?: React.ReactNode;
|
|
183
|
+
icon?: React.ReactNode;
|
|
184
|
+
children?: React.ReactNode;
|
|
185
|
+
size?: "xxs" | "xs" | "sm" | "md" | "lg";
|
|
186
|
+
rounded?: "full" | "normal" | "none";
|
|
187
|
+
className?: string;
|
|
188
|
+
imageClassName?: string;
|
|
189
|
+
fallbackClassName?: string;
|
|
190
|
+
style?: React.CSSProperties;
|
|
191
|
+
};
|
|
192
|
+
type AvatarTextProps = {
|
|
193
|
+
text: string;
|
|
194
|
+
type: "text";
|
|
195
|
+
} & BaseAvatarProps;
|
|
196
|
+
type AvatarImageProps = {
|
|
197
|
+
imageUrl: string;
|
|
198
|
+
fallback: React.ReactNode;
|
|
199
|
+
type: "image";
|
|
200
|
+
} & BaseAvatarProps;
|
|
201
|
+
type AvatarIconProps = {
|
|
202
|
+
icon: string;
|
|
203
|
+
type: "icon";
|
|
204
|
+
} & BaseAvatarProps;
|
|
205
|
+
type AvatarProps = AvatarTextProps | AvatarImageProps | AvatarIconProps;
|
|
206
|
+
declare const Avatar: React.FC<AvatarProps>;
|
|
207
|
+
|
|
208
|
+
type AvatarGroupProps = {
|
|
209
|
+
maxDisplay?: number;
|
|
210
|
+
borderWidth?: number;
|
|
211
|
+
borderColor?: string;
|
|
212
|
+
remainingText?: string;
|
|
213
|
+
children?: ReactNode;
|
|
214
|
+
remainingAvatar?: ReactNode;
|
|
215
|
+
};
|
|
216
|
+
declare const AvatarGroup: FC<AvatarGroupProps>;
|
|
217
|
+
|
|
168
218
|
declare const Table: React.ForwardRefExoticComponent<{
|
|
169
219
|
rootRef?: React.LegacyRef<HTMLDivElement> | undefined;
|
|
170
220
|
} & React.HTMLAttributes<HTMLTableElement> & React.RefAttributes<HTMLTableElement>>;
|
|
@@ -231,4 +281,4 @@ declare const getTimestampUTC: (date: Date) => number;
|
|
|
231
281
|
|
|
232
282
|
declare function cn(...inputs: ClassValue[]): string;
|
|
233
283
|
|
|
234
|
-
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Button, type ButtonProps, Checkbox, DataTable, type DataTableProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Dropdown, type DropdownProps, Input, type InputProps, Label, type Options, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, Text, TextInput, cn, getEndDateOfDay, getStartDateOfDay, getStartEndTimestampOfDay, getTimestampUTC, resloveTimestamp };
|
|
284
|
+
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, Button, type ButtonProps, Checkbox, DataTable, type DataTableProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Dropdown, type DropdownProps, Input, type InputProps, Label, Navbar, type NavbarProps, type Options, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, Text, TextInput, cn, getEndDateOfDay, getStartDateOfDay, getStartEndTimestampOfDay, getTimestampUTC, resloveTimestamp };
|
package/dist/index.js
CHANGED
|
@@ -9,6 +9,8 @@ export { default as Dropdown } from "./components/Dropdown/Dropdown";
|
|
|
9
9
|
export { Checkbox } from "./components/Checkbox/Checkbox";
|
|
10
10
|
export { Label } from "./components/Label/Label";
|
|
11
11
|
export { Input } from "./components/Input/Input";
|
|
12
|
+
export { Navbar } from "./components/Navbar";
|
|
13
|
+
export { Avatar, AvatarGroup } from "./components/Avatar";
|
|
12
14
|
export * from "./components/Table/Table";
|
|
13
15
|
export * from "./components/DataTable/DataTable";
|
|
14
16
|
export * from "./components/Dialog/Dialog";
|
package/package.json
CHANGED
|
@@ -19,23 +19,23 @@ type BaseAvatarProps = {
|
|
|
19
19
|
style?: React.CSSProperties;
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
type
|
|
22
|
+
type AvatarTextProps = {
|
|
23
23
|
text: string;
|
|
24
24
|
type: "text";
|
|
25
25
|
} & BaseAvatarProps;
|
|
26
26
|
|
|
27
|
-
type
|
|
27
|
+
type AvatarImageProps = {
|
|
28
28
|
imageUrl: string;
|
|
29
29
|
fallback: React.ReactNode;
|
|
30
30
|
type: "image";
|
|
31
31
|
} & BaseAvatarProps;
|
|
32
32
|
|
|
33
|
-
type
|
|
33
|
+
type AvatarIconProps = {
|
|
34
34
|
icon: string;
|
|
35
35
|
type: "icon";
|
|
36
36
|
} & BaseAvatarProps;
|
|
37
37
|
|
|
38
|
-
export type AvatarProps =
|
|
38
|
+
export type AvatarProps = AvatarTextProps | AvatarImageProps | AvatarIconProps;
|
|
39
39
|
|
|
40
40
|
export const formatAvatarName = (text: string) => {
|
|
41
41
|
if (!text.length) return "-";
|
package/src/index.ts
CHANGED
|
@@ -9,6 +9,8 @@ export { default as Dropdown } from "./components/Dropdown/Dropdown";
|
|
|
9
9
|
export { Checkbox } from "./components/Checkbox/Checkbox";
|
|
10
10
|
export { Label } from "./components/Label/Label";
|
|
11
11
|
export { Input } from "./components/Input/Input";
|
|
12
|
+
export { Navbar } from "./components/Navbar";
|
|
13
|
+
export { Avatar, AvatarGroup } from "./components/Avatar";
|
|
12
14
|
export * from "./components/Table/Table";
|
|
13
15
|
export * from "./components/DataTable/DataTable";
|
|
14
16
|
export * from "./components/Dialog/Dialog";
|
|
@@ -18,6 +20,9 @@ export * from "./components/AlertDialog/AlertDialog";
|
|
|
18
20
|
export type { ButtonProps } from "./components/Button/Button";
|
|
19
21
|
export type { InputProps } from "./components/TextInput/TextInput";
|
|
20
22
|
export type { DropdownProps, Options } from "./components/Dropdown/Dropdown";
|
|
23
|
+
export type { NavbarProps } from "./components/Navbar/Navbar";
|
|
24
|
+
export type { AvatarProps } from "./components/Avatar/Avatar";
|
|
25
|
+
export type { AvatarGroupProps } from "./components/Avatar/AvatarGroup";
|
|
21
26
|
|
|
22
27
|
// UTILS
|
|
23
28
|
export {
|