uibee 3.1.1 → 3.1.3
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/src/components/index.d.ts +59 -27
- package/dist/src/components/index.js +825 -339
- package/dist/style.css +283 -67
- package/package.json +1 -1
- package/src/components/buttons/button.tsx +6 -3
- package/src/components/index.ts +2 -17
- package/src/components/navbar/navbar.tsx +0 -5
- package/src/components/navbar/navbarDropdown.tsx +0 -2
- package/src/components/navbar/navbarItem.tsx +0 -2
- package/src/components/table/body.tsx +260 -153
- package/src/components/table/constants.ts +53 -0
- package/src/components/table/empty.tsx +31 -0
- package/src/components/table/format.ts +29 -22
- package/src/components/table/header.tsx +115 -70
- package/src/components/table/menu.tsx +43 -27
- package/src/components/table/pagination.tsx +162 -136
- package/src/components/table/skeleton.tsx +56 -0
- package/src/components/table/table.tsx +261 -34
- package/src/components/table/types.ts +94 -0
- package/src/components/table/utils.ts +12 -0
- package/src/components/toggle/theme.tsx +0 -3
- package/src/globals.css +11 -0
- package/src/utils/auth/callback.ts +0 -2
- package/src/utils/index.ts +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React$1, { ElementType, JSX, ReactNode } from "react";
|
|
2
2
|
import { Components } from "react-markdown";
|
|
3
|
-
import {
|
|
3
|
+
import { Language, LoginPageProps, ToastType } from "uibee/components";
|
|
4
4
|
|
|
5
5
|
//#region src/components/inputs/input.d.ts
|
|
6
6
|
type InputProps = Omit<React.ComponentProps<'input'>, 'name'> & {
|
|
@@ -587,6 +587,55 @@ declare function Alert({
|
|
|
587
587
|
className
|
|
588
588
|
}: AlertProps): import("react").JSX.Element;
|
|
589
589
|
//#endregion
|
|
590
|
+
//#region src/components/table/types.d.ts
|
|
591
|
+
type TableColor = 'green' | 'yellow' | 'red' | 'blue' | 'gray' | 'orange' | 'purple';
|
|
592
|
+
type Column<T extends Record<string, unknown> = Record<string, unknown>> = {
|
|
593
|
+
key: keyof T & string;
|
|
594
|
+
label?: string;
|
|
595
|
+
sortable?: boolean;
|
|
596
|
+
width?: string;
|
|
597
|
+
align?: 'left' | 'center' | 'right';
|
|
598
|
+
highlight?: Record<string, TableColor>;
|
|
599
|
+
render?: (value: unknown, row: T) => ReactNode;
|
|
600
|
+
truncate?: boolean;
|
|
601
|
+
};
|
|
602
|
+
type SortState = {
|
|
603
|
+
column: string;
|
|
604
|
+
order: 'asc' | 'desc';
|
|
605
|
+
};
|
|
606
|
+
type Density = 'compact' | 'comfortable' | 'spacious';
|
|
607
|
+
type TableVariant = 'original' | 'modern';
|
|
608
|
+
type TableProps<T extends Record<string, unknown> = Record<string, unknown>> = {
|
|
609
|
+
data: T[];
|
|
610
|
+
columns: Column<T>[];
|
|
611
|
+
idKey?: keyof T & string;
|
|
612
|
+
variant?: TableVariant;
|
|
613
|
+
density?: Density;
|
|
614
|
+
striped?: boolean;
|
|
615
|
+
className?: string;
|
|
616
|
+
loading?: boolean;
|
|
617
|
+
loadingRows?: number;
|
|
618
|
+
emptyState?: ReactNode;
|
|
619
|
+
redirectPath?: string | {
|
|
620
|
+
path: string;
|
|
621
|
+
key?: string;
|
|
622
|
+
};
|
|
623
|
+
onRowClick?: (row: T, id: string) => void;
|
|
624
|
+
renderExpandedRow?: (row: T) => ReactNode;
|
|
625
|
+
selectable?: boolean;
|
|
626
|
+
selectedIds?: string[];
|
|
627
|
+
onSelectionChange?: (ids: string[]) => void;
|
|
628
|
+
urlState?: boolean;
|
|
629
|
+
sort?: SortState;
|
|
630
|
+
onSort?: (sort: SortState) => void;
|
|
631
|
+
pageSize?: number;
|
|
632
|
+
totalRows?: number;
|
|
633
|
+
page?: number;
|
|
634
|
+
onPageChange?: (page: number) => void;
|
|
635
|
+
hidePagination?: boolean;
|
|
636
|
+
menuItems?: (row: T, id: string) => ReactNode;
|
|
637
|
+
};
|
|
638
|
+
//#endregion
|
|
590
639
|
//#region src/components/table/menu.d.ts
|
|
591
640
|
declare function MenuButton({
|
|
592
641
|
icon,
|
|
@@ -603,35 +652,18 @@ declare function MenuButton({
|
|
|
603
652
|
}): React$1.JSX.Element;
|
|
604
653
|
//#endregion
|
|
605
654
|
//#region src/components/table/table.d.ts
|
|
606
|
-
|
|
607
|
-
data: object[];
|
|
608
|
-
columns: Column[];
|
|
609
|
-
menuItems?: (data: object, id: string) => React.ReactNode;
|
|
610
|
-
redirectPath?: string | {
|
|
611
|
-
path: string;
|
|
612
|
-
key?: string;
|
|
613
|
-
};
|
|
614
|
-
variant?: 'default' | 'minimal';
|
|
615
|
-
idKey?: string;
|
|
616
|
-
};
|
|
617
|
-
declare function Table({
|
|
618
|
-
data,
|
|
619
|
-
columns,
|
|
620
|
-
menuItems,
|
|
621
|
-
redirectPath,
|
|
622
|
-
variant,
|
|
623
|
-
idKey
|
|
624
|
-
}: TableProps): import("react").JSX.Element;
|
|
655
|
+
declare function Table<T extends Record<string, unknown> = Record<string, unknown>>(props: TableProps<T>): import("react").JSX.Element;
|
|
625
656
|
//#endregion
|
|
626
657
|
//#region src/components/table/pagination.d.ts
|
|
627
658
|
type PaginationProps = {
|
|
628
|
-
|
|
629
|
-
|
|
659
|
+
totalRows: number;
|
|
660
|
+
pageSize: number;
|
|
661
|
+
variant?: TableVariant;
|
|
662
|
+
urlState?: boolean;
|
|
663
|
+
page?: number;
|
|
664
|
+
onPageChange?: (page: number) => void;
|
|
630
665
|
};
|
|
631
|
-
declare function Pagination(
|
|
632
|
-
pageSize,
|
|
633
|
-
totalRows
|
|
634
|
-
}: PaginationProps): import("react").JSX.Element;
|
|
666
|
+
declare function Pagination(props: PaginationProps): import("react").JSX.Element;
|
|
635
667
|
//#endregion
|
|
636
668
|
//#region src/components/markdownrender/markdownRender.d.ts
|
|
637
669
|
declare function MarkdownRender({
|
|
@@ -703,4 +735,4 @@ declare function Toggle<T>({
|
|
|
703
735
|
right
|
|
704
736
|
}: ToggleProps<T>): import("react").JSX.Element;
|
|
705
737
|
//#endregion
|
|
706
|
-
export { Accordion, AccordionGroup, Alert, type BilingualString, Button, Card, Checkbox, ConfirmPopup, Footer, type FooterColumn, type FooterProps, type FooterSocialLink, type FooterSocialLink as LoginSocialLinkData, Highlight, IconBubble, Input, type Lang, LanguageToggle, LeftBarPanel, LoginPage, Logo, LogoSmall, MarkdownRender, MenuButton, MultiSelect, NavDropdown, NavItem, Navbar, PageContainer, Pagination, PulseDot, Radio, Range, SearchInput, Select, SeverityPill, StatCard, Switch, TabPanel, Table, Tabs, TagInput, Textarea, ThemeToggle, Toaster, Toggle, VersionTag, loginAddress, loginCopyright, loginEmail, loginSocialLinks, loginSponsor, toast };
|
|
738
|
+
export { Accordion, AccordionGroup, Alert, type BilingualString, Button, Card, Checkbox, type Column, ConfirmPopup, type Density, Footer, type FooterColumn, type FooterProps, type FooterSocialLink, type FooterSocialLink as LoginSocialLinkData, Highlight, IconBubble, Input, type Lang, LanguageToggle, LeftBarPanel, LoginPage, Logo, LogoSmall, MarkdownRender, MenuButton, MultiSelect, NavDropdown, NavItem, Navbar, PageContainer, Pagination, PulseDot, Radio, Range, SearchInput, Select, SeverityPill, type SortState, StatCard, Switch, TabPanel, Table, type TableColor, type TableProps, type TableVariant, Tabs, TagInput, Textarea, ThemeToggle, Toaster, Toggle, VersionTag, loginAddress, loginCopyright, loginEmail, loginSocialLinks, loginSponsor, toast };
|