@cryptlex/web-components 1.6.2 → 1.6.4
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/data-table/column-picker.es.js +3 -2
- package/dist/components/data-table/column-picker.es.js.map +1 -1
- package/dist/components/data-table/data-table.es.js +37 -36
- package/dist/components/data-table/data-table.es.js.map +1 -1
- package/dist/components/data-table/page-size.es.js.map +1 -1
- package/dist/components/data-table/table-actions.es.js +3 -2
- package/dist/components/data-table/table-actions.es.js.map +1 -1
- package/dist/components/data-table/table-filter.es.js.map +1 -1
- package/dist/components/key-value-card/key-value-card.es.js +6 -5
- package/dist/components/key-value-card/key-value-card.es.js.map +1 -1
- package/dist/components/sidebar/app-layout.es.js +3 -2
- package/dist/components/sidebar/app-layout.es.js.map +1 -1
- package/dist/components/sidebar/breadcrumb.es.js +3 -2
- package/dist/components/sidebar/breadcrumb.es.js.map +1 -1
- package/dist/components/static-data-table/static-data-table.es.js +30 -0
- package/dist/components/static-data-table/static-data-table.es.js.map +1 -0
- package/dist/components/ui/accordion.es.js +4 -4
- package/dist/components/ui/accordion.es.js.map +1 -1
- package/dist/components/ui/badge.es.js +3 -3
- package/dist/components/ui/badge.es.js.map +1 -1
- package/dist/components/ui/breadcrumb.es.js +1 -1
- package/dist/components/ui/breadcrumb.es.js.map +1 -1
- package/dist/components/ui/button.es.js +19 -19
- package/dist/components/ui/button.es.js.map +1 -1
- package/dist/components/ui/calendar.es.js +2 -2
- package/dist/components/ui/calendar.es.js.map +1 -1
- package/dist/components/ui/card.es.js +36 -36
- package/dist/components/ui/card.es.js.map +1 -1
- package/dist/components/ui/command.es.js +12 -12
- package/dist/components/ui/command.es.js.map +1 -1
- package/dist/components/ui/copy-button.es.js +3 -2
- package/dist/components/ui/copy-button.es.js.map +1 -1
- package/dist/components/ui/dialog.es.js +8 -8
- package/dist/components/ui/dialog.es.js.map +1 -1
- package/dist/components/ui/drawer.es.js +4 -4
- package/dist/components/ui/drawer.es.js.map +1 -1
- package/dist/components/ui/dropdown-menu.es.js +3 -3
- package/dist/components/ui/dropdown-menu.es.js.map +1 -1
- package/dist/components/ui/input-otp.es.js +1 -1
- package/dist/components/ui/input-otp.es.js.map +1 -1
- package/dist/components/ui/input.es.js +23 -18
- package/dist/components/ui/input.es.js.map +1 -1
- package/dist/components/ui/label.es.js +4 -4
- package/dist/components/ui/label.es.js.map +1 -1
- package/dist/components/ui/mutli-select.es.js +1 -0
- package/dist/components/ui/mutli-select.es.js.map +1 -1
- package/dist/components/ui/navigation-menu.es.js +2 -2
- package/dist/components/ui/navigation-menu.es.js.map +1 -1
- package/dist/components/ui/pagination.es.js.map +1 -1
- package/dist/components/ui/password-input.es.js +12 -21
- package/dist/components/ui/password-input.es.js.map +1 -1
- package/dist/components/ui/search-input.es.js +24 -36
- package/dist/components/ui/search-input.es.js.map +1 -1
- package/dist/components/ui/select.es.js +1 -1
- package/dist/components/ui/select.es.js.map +1 -1
- package/dist/components/ui/sheet.es.js +17 -17
- package/dist/components/ui/sheet.es.js.map +1 -1
- package/dist/components/ui/sidebar.es.js +10 -10
- package/dist/components/ui/sidebar.es.js.map +1 -1
- package/dist/components/ui/tabs.es.js +5 -5
- package/dist/components/ui/tabs.es.js.map +1 -1
- package/dist/components/ui/textarea.es.js +19 -0
- package/dist/components/ui/textarea.es.js.map +1 -0
- package/dist/index.es.d.ts +8 -4
- package/dist/index.es.js +80 -78
- package/dist/index.es.js.map +1 -1
- package/lib/index.css +2 -55
- package/lib/tailwind.preset.css +57 -0
- package/package.json +1 -1
- package/dist/components/static-data-table/data-table.es.js +0 -30
- package/dist/components/static-data-table/data-table.es.js.map +0 -1
package/dist/index.es.d.ts
CHANGED
|
@@ -128,12 +128,12 @@ export declare const Button: React_2.ForwardRefExoticComponent<ButtonProps & Rea
|
|
|
128
128
|
export declare interface ButtonProps extends React_2.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
129
129
|
asChild?: boolean;
|
|
130
130
|
loading?: boolean;
|
|
131
|
-
icon?: LucideIcon;
|
|
131
|
+
icon?: (() => LucideIcon);
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
export declare const buttonVariants: (props?: ({
|
|
135
135
|
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
136
|
-
size?: "default" | "xs" | "sm" | "lg" | null | undefined;
|
|
136
|
+
size?: "default" | "xs" | "sm" | "icon" | "lg" | null | undefined;
|
|
137
137
|
} & ClassProp) | undefined) => string;
|
|
138
138
|
|
|
139
139
|
export declare const Calendar: React_2.FC<CalendarProps>;
|
|
@@ -444,7 +444,7 @@ export declare const DropdownMenuSub: React_2.FC<DropdownMenuPrimitive.DropdownM
|
|
|
444
444
|
export declare const DropdownMenuSubContent: React_2.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
445
445
|
|
|
446
446
|
/**
|
|
447
|
-
* TODO
|
|
447
|
+
* TODO (mudasirpandith)
|
|
448
448
|
* Focus on trigger.
|
|
449
449
|
* Focus on content after trigger is pressed?
|
|
450
450
|
* List keyboard navigation in buttons within DropdownItems
|
|
@@ -478,7 +478,7 @@ export declare type FilterablePropertyType = (typeof FILTERABLE_PROPERTY_TYPES)[
|
|
|
478
478
|
|
|
479
479
|
export declare type FilterComparisonOperator = (typeof FILTER_COMPARISON_OPERATORS)[number];
|
|
480
480
|
|
|
481
|
-
export declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues
|
|
481
|
+
export declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React_2.JSX.Element;
|
|
482
482
|
|
|
483
483
|
export declare function FormatDate(date: string | null | undefined): string | null;
|
|
484
484
|
|
|
@@ -565,6 +565,8 @@ export declare const InputOTPSlot: React_2.ForwardRefExoticComponent<Omit<React_
|
|
|
565
565
|
} & React_2.RefAttributes<HTMLDivElement>>;
|
|
566
566
|
|
|
567
567
|
export declare interface InputProps extends React_2.InputHTMLAttributes<HTMLInputElement> {
|
|
568
|
+
icon?: LucideIcon;
|
|
569
|
+
buttonProps?: ButtonProps;
|
|
568
570
|
}
|
|
569
571
|
|
|
570
572
|
export declare type JwtDecode = {
|
|
@@ -944,6 +946,8 @@ export declare const TabsList: React_2.ForwardRefExoticComponent<Omit<TabsPrimit
|
|
|
944
946
|
|
|
945
947
|
export declare const TabsTrigger: React_2.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & React_2.RefAttributes<HTMLButtonElement>>;
|
|
946
948
|
|
|
949
|
+
export declare const Textarea: React_2.ForwardRefExoticComponent<Omit<React_2.DetailedHTMLProps<React_2.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref"> & React_2.RefAttributes<HTMLTextAreaElement>>;
|
|
950
|
+
|
|
947
951
|
export declare const Toaster: ({ ...props }: ToasterProps) => JSX_2.Element;
|
|
948
952
|
|
|
949
953
|
declare type ToasterProps = React.ComponentProps<typeof Toaster_2>;
|
package/dist/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Accordion as t, AccordionContent as a, AccordionItem as n, AccordionTrigger as i } from "./components/ui/accordion.es.js";
|
|
2
2
|
import { Avatar as m, AvatarFallback as l, AvatarImage as d } from "./components/ui/avatar.es.js";
|
|
3
|
-
import { Badge as
|
|
4
|
-
import { Breadcrumb as g, BreadcrumbEllipsis as C, BreadcrumbItem as b, BreadcrumbLink as
|
|
3
|
+
import { Badge as T } from "./components/ui/badge.es.js";
|
|
4
|
+
import { Breadcrumb as g, BreadcrumbEllipsis as C, BreadcrumbItem as b, BreadcrumbLink as x, BreadcrumbList as D, BreadcrumbPage as f, BreadcrumbSeparator as c } from "./components/ui/breadcrumb.es.js";
|
|
5
5
|
import { Button as M, buttonVariants as I } from "./components/ui/button.es.js";
|
|
6
6
|
import { Calendar as P } from "./components/ui/calendar.es.js";
|
|
7
7
|
import { Card as O, CardContent as A, CardDescription as F, CardFooter as _, CardHeader as w, CardTitle as R } from "./components/ui/card.es.js";
|
|
@@ -10,8 +10,8 @@ import { Checkbox as k } from "./components/ui/checkbox.es.js";
|
|
|
10
10
|
import { Collapsible as V, CollapsibleContent as Y, CollapsibleTrigger as K } from "./components/ui/collapsible.es.js";
|
|
11
11
|
import { Command as X, CommandDialog as j, CommandEmpty as q, CommandGroup as J, CommandInput as Q, CommandItem as W, CommandList as Z, CommandSeparator as $, CommandShortcut as ee } from "./components/ui/command.es.js";
|
|
12
12
|
import { COPY_BUTTON_STATE_TIMEOUT as re, CopyButton as te } from "./components/ui/copy-button.es.js";
|
|
13
|
-
import { Dialog as ne, DialogClose as ie, DialogContent as pe, DialogDescription as me, DialogFooter as le, DialogHeader as de, DialogOverlay as ue, DialogPortal as
|
|
14
|
-
import { Drawer as be, DrawerClose as
|
|
13
|
+
import { Dialog as ne, DialogClose as ie, DialogContent as pe, DialogDescription as me, DialogFooter as le, DialogHeader as de, DialogOverlay as ue, DialogPortal as Te, DialogTitle as Se, DialogTrigger as ge } from "./components/ui/dialog.es.js";
|
|
14
|
+
import { Drawer as be, DrawerClose as xe, DrawerContent as De, DrawerDescription as fe, DrawerFooter as ce, DrawerHeader as se, DrawerOverlay as Me, DrawerPortal as Ie, DrawerTitle as Le, DrawerTrigger as Pe } from "./components/ui/drawer.es.js";
|
|
15
15
|
import { DropdownMenu as Oe, DropdownMenuCheckboxItem as Ae, DropdownMenuContent as Fe, DropdownMenuGroup as _e, DropdownMenuItem as we, DropdownMenuLabel as Re, DropdownMenuPortal as ve, DropdownMenuRadioGroup as Be, DropdownMenuRadioItem as Ne, DropdownMenuShortcut as he, DropdownMenuSub as ye, DropdownMenuSubContent as Ge, DropdownMenuSubTrigger as Ue, DropdownMenuTrigger as ke } from "./components/ui/dropdown-menu.es.js";
|
|
16
16
|
import { Form as Ve, FormControl as Ye, FormDescription as Ke, FormField as ze, FormItem as Xe, FormLabel as je, FormMessage as qe, useFormField as Je } from "./components/ui/form.es.js";
|
|
17
17
|
import { Input as We } from "./components/ui/input.es.js";
|
|
@@ -20,7 +20,7 @@ import { Label as ao } from "./components/ui/label.es.js";
|
|
|
20
20
|
import { LinkButton as io } from "./components/ui/link-button.es.js";
|
|
21
21
|
import { Loader as mo } from "./components/ui/loader.es.js";
|
|
22
22
|
import "./components/ui/mutli-select.es.js";
|
|
23
|
-
import { NavigationMenu as uo, NavigationMenuContent as
|
|
23
|
+
import { NavigationMenu as uo, NavigationMenuContent as To, NavigationMenuIndicator as So, NavigationMenuItem as go, NavigationMenuLink as Co, NavigationMenuList as bo, NavigationMenuListItem as xo, NavigationMenuTrigger as Do, NavigationMenuViewport as fo, navigationMenuTriggerStyle as co } from "./components/ui/navigation-menu.es.js";
|
|
24
24
|
import { Pagination as Mo, PaginationContent as Io, PaginationEllipsis as Lo, PaginationItem as Po, PaginationLink as Eo, PaginationNext as Oo, PaginationPrevious as Ao } from "./components/ui/pagination.es.js";
|
|
25
25
|
import { PasswordInput as _o } from "./components/ui/password-input.es.js";
|
|
26
26
|
import { Popover as Ro, PopoverAnchor as vo, PopoverContent as Bo, PopoverTrigger as No } from "./components/ui/popover.es.js";
|
|
@@ -29,49 +29,50 @@ import { SearchInput as ko } from "./components/ui/search-input.es.js";
|
|
|
29
29
|
import { Select as Vo, SelectContent as Yo, SelectGroup as Ko, SelectItem as zo, SelectScrollDownButton as Xo, SelectScrollUpButton as jo, SelectTrigger as qo, SelectValue as Jo } from "./components/ui/select.es.js";
|
|
30
30
|
import { Separator as Wo } from "./components/ui/separator.es.js";
|
|
31
31
|
import { Sheet as $o, SheetClose as er, SheetContent as or, SheetDescription as rr, SheetFooter as tr, SheetHeader as ar, SheetOverlay as nr, SheetPortal as ir, SheetTitle as pr, SheetTrigger as mr } from "./components/ui/sheet.es.js";
|
|
32
|
-
import { Sidebar as dr, SidebarContent as ur, SidebarFooter as
|
|
32
|
+
import { Sidebar as dr, SidebarContent as ur, SidebarFooter as Tr, SidebarGroup as Sr, SidebarGroupAction as gr, SidebarGroupContent as Cr, SidebarGroupLabel as br, SidebarHeader as xr, SidebarInput as Dr, SidebarInset as fr, SidebarMenu as cr, SidebarMenuAction as sr, SidebarMenuBadge as Mr, SidebarMenuButton as Ir, SidebarMenuItem as Lr, SidebarMenuSkeleton as Pr, SidebarMenuSub as Er, SidebarMenuSubButton as Or, SidebarMenuSubItem as Ar, SidebarProvider as Fr, SidebarRail as _r, SidebarSeparator as wr, SidebarTrigger as Rr, useSidebar as vr } from "./components/ui/sidebar.es.js";
|
|
33
33
|
import { Skeleton as Nr } from "./components/ui/skeleton.es.js";
|
|
34
34
|
import { Toaster as yr } from "./components/ui/sonner.es.js";
|
|
35
35
|
import { Table as Ur, TableBody as kr, TableCaption as Hr, TableCell as Vr, TableFooter as Yr, TableHead as Kr, TableHeader as zr, TableRow as Xr } from "./components/ui/table.es.js";
|
|
36
36
|
import { Tabs as qr, TabsContent as Jr, TabsList as Qr, TabsTrigger as Wr } from "./components/ui/tabs.es.js";
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
37
|
+
import { Textarea as $r } from "./components/ui/textarea.es.js";
|
|
38
|
+
import { Tooltip as ot, TooltipContent as rt, TooltipProvider as tt, TooltipTrigger as at } from "./components/ui/tooltip.es.js";
|
|
39
|
+
import { StaticDataTable as it } from "./components/static-data-table/static-data-table.es.js";
|
|
40
|
+
import { TablePageLayout as mt } from "./components/ui/table-page-layout.es.js";
|
|
41
|
+
import { useIsMobile as dt } from "./hooks/use-mobile.es.js";
|
|
42
|
+
import { cn as Tt, getThemeHue as St, logout as gt, setThemeHue as Ct } from "./utils/index.es.js";
|
|
43
|
+
import { ACTIONS_COLUMN_ID as xt, DataTable as Dt } from "./components/data-table/data-table.es.js";
|
|
44
|
+
import { TABLE_CHECK_BOX_COLUMN as ct, TABLE_DEFAULT_DATE_COLUMNS as st, TABLE_ID_COLUMN as Mt } from "./components/data-table/table-commons.es.js";
|
|
45
|
+
import { ALL_OS as Lt, COMPARISON_OPERATOR_LABELS as Pt, DEFAULT_FILTERABLE_FIELDS as Et, FILTERABLE_PROPERTY_TYPES as Ot, FILTER_COMPARISON_OPERATORS as At, OPERATORS_FOR_FILTER_TYPE as Ft, RESOURCE_DEFINITIONS as _t, RESOURCE_NAMES as wt, getLicenseStatus as Rt, getResourceDisplayName as vt, getValidityDisplay as Bt, getValueFromData as Nt, secondsToDuration as ht } from "./components/data-table/table-utils/constants.es.js";
|
|
46
|
+
import { createTableFetchFn as Gt } from "./components/data-table/table-utils/createTableFetchFn.es.js";
|
|
47
|
+
import { FormatDate as kt } from "./components/data-table/table-utils/date.es.js";
|
|
48
|
+
import { getLinkDisplay as Vt } from "./components/data-table/table-utils/link-display.es.js";
|
|
49
|
+
import { convertCamelCaseToTitleCase as Kt, convertToTitleCase as zt, pluralizeTimes as Xt } from "./components/data-table/table-utils/string.es.js";
|
|
50
|
+
import { DYNAMIC_INPUT_TARGET as qt } from "./components/data-table/table-utils/types.es.js";
|
|
51
|
+
import { KeyValueCard as Qt } from "./components/key-value-card/key-value-card.es.js";
|
|
52
|
+
import { AppLayout as Zt } from "./components/sidebar/app-layout.es.js";
|
|
53
|
+
import { NavMain as ea } from "./components/sidebar/nav-main.es.js";
|
|
54
|
+
import { SideBar as ra } from "./components/sidebar/sidebar.es.js";
|
|
54
55
|
export {
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
xt as ACTIONS_COLUMN_ID,
|
|
57
|
+
Lt as ALL_OS,
|
|
57
58
|
t as Accordion,
|
|
58
59
|
a as AccordionContent,
|
|
59
60
|
n as AccordionItem,
|
|
60
61
|
i as AccordionTrigger,
|
|
61
|
-
|
|
62
|
+
Zt as AppLayout,
|
|
62
63
|
m as Avatar,
|
|
63
64
|
l as AvatarFallback,
|
|
64
65
|
d as AvatarImage,
|
|
65
|
-
|
|
66
|
+
T as Badge,
|
|
66
67
|
g as Breadcrumb,
|
|
67
68
|
C as BreadcrumbEllipsis,
|
|
68
69
|
b as BreadcrumbItem,
|
|
69
|
-
|
|
70
|
-
|
|
70
|
+
x as BreadcrumbLink,
|
|
71
|
+
D as BreadcrumbList,
|
|
71
72
|
f as BreadcrumbPage,
|
|
72
73
|
c as BreadcrumbSeparator,
|
|
73
74
|
M as Button,
|
|
74
|
-
|
|
75
|
+
Pt as COMPARISON_OPERATOR_LABELS,
|
|
75
76
|
re as COPY_BUTTON_STATE_TIMEOUT,
|
|
76
77
|
P as Calendar,
|
|
77
78
|
O as Card,
|
|
@@ -99,9 +100,9 @@ export {
|
|
|
99
100
|
$ as CommandSeparator,
|
|
100
101
|
ee as CommandShortcut,
|
|
101
102
|
te as CopyButton,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
Et as DEFAULT_FILTERABLE_FIELDS,
|
|
104
|
+
qt as DYNAMIC_INPUT_TARGET,
|
|
105
|
+
Dt as DataTable,
|
|
105
106
|
ne as Dialog,
|
|
106
107
|
ie as DialogClose,
|
|
107
108
|
pe as DialogContent,
|
|
@@ -109,12 +110,12 @@ export {
|
|
|
109
110
|
le as DialogFooter,
|
|
110
111
|
de as DialogHeader,
|
|
111
112
|
ue as DialogOverlay,
|
|
112
|
-
|
|
113
|
-
|
|
113
|
+
Te as DialogPortal,
|
|
114
|
+
Se as DialogTitle,
|
|
114
115
|
ge as DialogTrigger,
|
|
115
116
|
be as Drawer,
|
|
116
|
-
|
|
117
|
-
|
|
117
|
+
xe as DrawerClose,
|
|
118
|
+
De as DrawerContent,
|
|
118
119
|
fe as DrawerDescription,
|
|
119
120
|
ce as DrawerFooter,
|
|
120
121
|
se as DrawerHeader,
|
|
@@ -136,8 +137,8 @@ export {
|
|
|
136
137
|
Ge as DropdownMenuSubContent,
|
|
137
138
|
Ue as DropdownMenuSubTrigger,
|
|
138
139
|
ke as DropdownMenuTrigger,
|
|
139
|
-
|
|
140
|
-
|
|
140
|
+
Ot as FILTERABLE_PROPERTY_TYPES,
|
|
141
|
+
At as FILTER_COMPARISON_OPERATORS,
|
|
141
142
|
Ve as Form,
|
|
142
143
|
Ye as FormControl,
|
|
143
144
|
Ke as FormDescription,
|
|
@@ -145,27 +146,27 @@ export {
|
|
|
145
146
|
Xe as FormItem,
|
|
146
147
|
je as FormLabel,
|
|
147
148
|
qe as FormMessage,
|
|
148
|
-
|
|
149
|
+
kt as FormatDate,
|
|
149
150
|
We as Input,
|
|
150
151
|
$e as InputOTP,
|
|
151
152
|
eo as InputOTPGroup,
|
|
152
153
|
oo as InputOTPSeparator,
|
|
153
154
|
ro as InputOTPSlot,
|
|
154
|
-
|
|
155
|
+
Qt as KeyValueCard,
|
|
155
156
|
ao as Label,
|
|
156
157
|
io as LinkButton,
|
|
157
158
|
mo as Loader,
|
|
158
|
-
|
|
159
|
+
ea as NavMain,
|
|
159
160
|
uo as NavigationMenu,
|
|
160
|
-
|
|
161
|
-
|
|
161
|
+
To as NavigationMenuContent,
|
|
162
|
+
So as NavigationMenuIndicator,
|
|
162
163
|
go as NavigationMenuItem,
|
|
163
164
|
Co as NavigationMenuLink,
|
|
164
165
|
bo as NavigationMenuList,
|
|
165
|
-
|
|
166
|
-
|
|
166
|
+
xo as NavigationMenuListItem,
|
|
167
|
+
Do as NavigationMenuTrigger,
|
|
167
168
|
fo as NavigationMenuViewport,
|
|
168
|
-
|
|
169
|
+
Ft as OPERATORS_FOR_FILTER_TYPE,
|
|
169
170
|
Mo as Pagination,
|
|
170
171
|
Io as PaginationContent,
|
|
171
172
|
Lo as PaginationEllipsis,
|
|
@@ -178,8 +179,8 @@ export {
|
|
|
178
179
|
vo as PopoverAnchor,
|
|
179
180
|
Bo as PopoverContent,
|
|
180
181
|
No as PopoverTrigger,
|
|
181
|
-
|
|
182
|
-
|
|
182
|
+
_t as RESOURCE_DEFINITIONS,
|
|
183
|
+
wt as RESOURCE_NAMES,
|
|
183
184
|
yo as RadioGroup,
|
|
184
185
|
Go as RadioGroupItem,
|
|
185
186
|
ko as SearchInput,
|
|
@@ -202,16 +203,16 @@ export {
|
|
|
202
203
|
ir as SheetPortal,
|
|
203
204
|
pr as SheetTitle,
|
|
204
205
|
mr as SheetTrigger,
|
|
205
|
-
|
|
206
|
+
ra as SideBar,
|
|
206
207
|
dr as Sidebar,
|
|
207
208
|
ur as SidebarContent,
|
|
208
|
-
|
|
209
|
-
|
|
209
|
+
Tr as SidebarFooter,
|
|
210
|
+
Sr as SidebarGroup,
|
|
210
211
|
gr as SidebarGroupAction,
|
|
211
212
|
Cr as SidebarGroupContent,
|
|
212
213
|
br as SidebarGroupLabel,
|
|
213
|
-
|
|
214
|
-
|
|
214
|
+
xr as SidebarHeader,
|
|
215
|
+
Dr as SidebarInput,
|
|
215
216
|
fr as SidebarInset,
|
|
216
217
|
cr as SidebarMenu,
|
|
217
218
|
sr as SidebarMenuAction,
|
|
@@ -227,10 +228,10 @@ export {
|
|
|
227
228
|
wr as SidebarSeparator,
|
|
228
229
|
Rr as SidebarTrigger,
|
|
229
230
|
Nr as Skeleton,
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
231
|
+
it as StaticDataTable,
|
|
232
|
+
ct as TABLE_CHECK_BOX_COLUMN,
|
|
233
|
+
st as TABLE_DEFAULT_DATE_COLUMNS,
|
|
234
|
+
Mt as TABLE_ID_COLUMN,
|
|
234
235
|
Ur as Table,
|
|
235
236
|
kr as TableBody,
|
|
236
237
|
Hr as TableCaption,
|
|
@@ -238,35 +239,36 @@ export {
|
|
|
238
239
|
Yr as TableFooter,
|
|
239
240
|
Kr as TableHead,
|
|
240
241
|
zr as TableHeader,
|
|
241
|
-
|
|
242
|
+
mt as TablePageLayout,
|
|
242
243
|
Xr as TableRow,
|
|
243
244
|
qr as Tabs,
|
|
244
245
|
Jr as TabsContent,
|
|
245
246
|
Qr as TabsList,
|
|
246
247
|
Wr as TabsTrigger,
|
|
248
|
+
$r as Textarea,
|
|
247
249
|
yr as Toaster,
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
250
|
+
ot as Tooltip,
|
|
251
|
+
rt as TooltipContent,
|
|
252
|
+
tt as TooltipProvider,
|
|
253
|
+
at as TooltipTrigger,
|
|
252
254
|
I as buttonVariants,
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
255
|
+
Tt as cn,
|
|
256
|
+
Kt as convertCamelCaseToTitleCase,
|
|
257
|
+
zt as convertToTitleCase,
|
|
258
|
+
Gt as createTableFetchFn,
|
|
259
|
+
Rt as getLicenseStatus,
|
|
260
|
+
Vt as getLinkDisplay,
|
|
261
|
+
vt as getResourceDisplayName,
|
|
262
|
+
St as getThemeHue,
|
|
263
|
+
Bt as getValidityDisplay,
|
|
264
|
+
Nt as getValueFromData,
|
|
265
|
+
gt as logout,
|
|
264
266
|
co as navigationMenuTriggerStyle,
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
267
|
+
Xt as pluralizeTimes,
|
|
268
|
+
ht as secondsToDuration,
|
|
269
|
+
Ct as setThemeHue,
|
|
268
270
|
Je as useFormField,
|
|
269
|
-
|
|
271
|
+
dt as useIsMobile,
|
|
270
272
|
vr as useSidebar
|
|
271
273
|
};
|
|
272
274
|
//# sourceMappingURL=index.es.js.map
|
package/dist/index.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/index.css
CHANGED
|
@@ -1,56 +1,3 @@
|
|
|
1
|
-
@import url('tokens.css');
|
|
2
1
|
@import 'tailwindcss';
|
|
3
|
-
@import './
|
|
4
|
-
|
|
5
|
-
@layer base {
|
|
6
|
-
* {
|
|
7
|
-
@apply border-border;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
a {
|
|
11
|
-
@apply link;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
h1 {
|
|
15
|
-
@apply h1;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
h2 {
|
|
19
|
-
@apply h2;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
h3 {
|
|
23
|
-
@apply h3;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
h4 {
|
|
27
|
-
@apply h4;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
h5 {
|
|
31
|
-
@apply h5;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
h6 {
|
|
35
|
-
@apply h6;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
body {
|
|
39
|
-
@apply bg-background text-foreground;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
*::-webkit-scrollbar {
|
|
43
|
-
width: 6px;
|
|
44
|
-
height: 6px;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
*::-webkit-scrollbar-track {
|
|
48
|
-
background: white;
|
|
49
|
-
border-radius: 2px;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
*::-webkit-scrollbar-thumb {
|
|
53
|
-
background-color: gray;
|
|
54
|
-
border: 3px solid gray;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
2
|
+
@import './tokens.css';
|
|
3
|
+
@import './tailwind.preset.css';
|
package/lib/tailwind.preset.css
CHANGED
|
@@ -231,4 +231,61 @@
|
|
|
231
231
|
/* Fluid grid with minimum width */
|
|
232
232
|
@utility grid-fluid {
|
|
233
233
|
@apply grid grid-cols-[repeat(auto-fill,_minmax(var(--fluid-grid-min),_1fr))] gap-4;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
@utility input {
|
|
237
|
+
@apply w-full rounded-md border border-input bg-background px-3 py-2 body placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
@layer base {
|
|
241
|
+
* {
|
|
242
|
+
@apply border-border outline-ring/50;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
a {
|
|
246
|
+
@apply link;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
h1 {
|
|
250
|
+
@apply h1;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
h2 {
|
|
254
|
+
@apply h2;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
h3 {
|
|
258
|
+
@apply h3;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
h4 {
|
|
262
|
+
@apply h4;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
h5 {
|
|
266
|
+
@apply h5;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
h6 {
|
|
270
|
+
@apply h6;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
body {
|
|
274
|
+
@apply bg-background text-foreground;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
*::-webkit-scrollbar {
|
|
278
|
+
width: 6px;
|
|
279
|
+
height: 6px;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
*::-webkit-scrollbar-track {
|
|
283
|
+
background: white;
|
|
284
|
+
border-radius: 2px;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
*::-webkit-scrollbar-thumb {
|
|
288
|
+
background-color: gray;
|
|
289
|
+
border: 3px solid gray;
|
|
290
|
+
}
|
|
234
291
|
}
|
package/package.json
CHANGED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { Badge as h } from "../ui/badge.es.js";
|
|
3
|
-
import { Table as g, TableHeader as x, TableRow as c, TableHead as f, TableCell as t, TableBody as u } from "../ui/table.es.js";
|
|
4
|
-
import { getResourceDisplayName as y, getValueFromData as N } from "../data-table/table-utils/constants.es.js";
|
|
5
|
-
function A({ accessors: d, data: o, affectedData: n }) {
|
|
6
|
-
return /* @__PURE__ */ i(g, { children: [
|
|
7
|
-
/* @__PURE__ */ e(x, { className: "text-left align-middle sticky top-0 z-10 bg-card", children: /* @__PURE__ */ i(c, { children: [
|
|
8
|
-
d.map((r) => /* @__PURE__ */ e(
|
|
9
|
-
f,
|
|
10
|
-
{
|
|
11
|
-
className: "px-4 py-2 text-left text-sm font-medium cursor-pointer whitespace-nowrap bg-card",
|
|
12
|
-
children: y(String(r), "admin-portal")
|
|
13
|
-
},
|
|
14
|
-
String(r)
|
|
15
|
-
)),
|
|
16
|
-
n && /* @__PURE__ */ e(t, { className: "px-4 py-2 text-left text-sm font-medium cursor-pointer whitespace-nowrap bg-card", children: "Affected" })
|
|
17
|
-
] }) }),
|
|
18
|
-
/* @__PURE__ */ e(u, { children: o.map((r, m) => /* @__PURE__ */ i(c, { children: [
|
|
19
|
-
d.map((a) => {
|
|
20
|
-
const p = r[a];
|
|
21
|
-
return Array.isArray(p) ? /* @__PURE__ */ e(t, { className: "flex gap-4", children: p.map((l, s) => /* @__PURE__ */ e(h, { children: (l == null ? void 0 : l.name) || l }, s)) }, String(a)) : /* @__PURE__ */ e(t, { children: N(r, a) }, String(a));
|
|
22
|
-
}),
|
|
23
|
-
n && /* @__PURE__ */ e(t, { children: n.includes(r) ? /* @__PURE__ */ e("span", { className: "text-success-foreground", children: "✔" }) : /* @__PURE__ */ e("span", { className: "text-destructive-foreground", children: "✖" }) })
|
|
24
|
-
] }, m)) })
|
|
25
|
-
] });
|
|
26
|
-
}
|
|
27
|
-
export {
|
|
28
|
-
A as StaticDataTable
|
|
29
|
-
};
|
|
30
|
-
//# sourceMappingURL=data-table.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"data-table.es.js","sources":["../../../lib/components/static-data-table/data-table.tsx"],"sourcesContent":["import { getResourceDisplayName, getValueFromData } from '@/components/data-table';\nimport { Badge } from '@/components/ui/badge';\nimport { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@/components/ui/table';\n\n\nexport interface StaticDataTableProps<T> {\n accessors: (keyof T)[];\n data: T[];\n affectedData?: T[];\n}\n\nexport function StaticDataTable<T>({ accessors, data, affectedData }: StaticDataTableProps<T>) {\n return (\n <Table>\n <TableHeader className=\"text-left align-middle sticky top-0 z-10 bg-card\">\n <TableRow>\n {accessors.map((accessor) => (\n <TableHead\n key={String(accessor)}\n className=\"px-4 py-2 text-left text-sm font-medium cursor-pointer whitespace-nowrap bg-card\"\n >\n {getResourceDisplayName(String(accessor), 'admin-portal')}\n </TableHead>\n ))}\n {affectedData && (\n <TableCell className=\"px-4 py-2 text-left text-sm font-medium cursor-pointer whitespace-nowrap bg-card\">\n Affected\n </TableCell>\n )}\n </TableRow>\n </TableHeader>\n <TableBody>\n {data.map((item, index) => (\n <TableRow key={index}>\n {accessors.map((accessor) => {\n const value = item[accessor];\n // Handle arrays (e.g., userGroups) with badges\n if (Array.isArray(value)) {\n return (\n <TableCell key={String(accessor)} className=\"flex gap-4\">\n {value.map((subItem, subIndex) => (\n <Badge key={subIndex}>{subItem?.name || subItem}</Badge>\n ))}\n </TableCell>\n );\n }\n // Handle other data types\n return (\n <TableCell key={String(accessor)}>{getValueFromData(item, accessor)}</TableCell>\n );\n })}\n {affectedData && (\n <TableCell>\n {affectedData.includes(item) ? (\n <span className=\"text-success-foreground\">✔</span>\n ) : (\n <span className=\"text-destructive-foreground\">✖</span>\n )}\n </TableCell>\n )}\n </TableRow>\n ))}\n </TableBody>\n </Table>\n );\n}\n"],"names":["StaticDataTable","accessors","data","affectedData","Table","jsx","TableHeader","jsxs","TableRow","accessor","TableHead","getResourceDisplayName","TableCell","TableBody","item","index","value","subItem","subIndex","Badge","getValueFromData"],"mappings":";;;;AAWO,SAASA,EAAmB,EAAE,WAAAC,GAAW,MAAAC,GAAM,cAAAC,KAAyC;AAC7F,2BACGC,GACC,EAAA,UAAA;AAAA,IAAA,gBAAAC,EAACC,GAAY,EAAA,WAAU,oDACrB,UAAA,gBAAAC,EAACC,GACE,EAAA,UAAA;AAAA,MAAUP,EAAA,IAAI,CAACQ,MACd,gBAAAJ;AAAA,QAACK;AAAA,QAAA;AAAA,UAEC,WAAU;AAAA,UAET,UAAuBC,EAAA,OAAOF,CAAQ,GAAG,cAAc;AAAA,QAAA;AAAA,QAHnD,OAAOA,CAAQ;AAAA,MAAA,CAKvB;AAAA,MACAN,KACC,gBAAAE,EAACO,GAAU,EAAA,WAAU,oFAAmF,UAExG,WAAA,CAAA;AAAA,IAAA,EAAA,CAEJ,EACF,CAAA;AAAA,IACA,gBAAAP,EAACQ,KACE,UAAKX,EAAA,IAAI,CAACY,GAAMC,wBACdP,GACE,EAAA,UAAA;AAAA,MAAUP,EAAA,IAAI,CAACQ,MAAa;AACrB,cAAAO,IAAQF,EAAKL,CAAQ;AAEvB,eAAA,MAAM,QAAQO,CAAK,sBAElBJ,GAAiC,EAAA,WAAU,cACzC,UAAMI,EAAA,IAAI,CAACC,GAASC,wBAClBC,GAAsB,EAAA,WAAAF,KAAA,gBAAAA,EAAS,SAAQA,EAA5B,GAAAC,CAAoC,CACjD,EAHa,GAAA,OAAOT,CAAQ,CAI/B,IAKF,gBAAAJ,EAACO,KAAkC,UAAiBQ,EAAAN,GAAML,CAAQ,EAAlD,GAAA,OAAOA,CAAQ,CAAqC;AAAA,MAAA,CAEvE;AAAA,MACAN,KACE,gBAAAE,EAAAO,GAAA,EACE,YAAa,SAASE,CAAI,IACxB,gBAAAT,EAAA,QAAA,EAAK,WAAU,2BAA0B,eAAC,IAE3C,gBAAAA,EAAC,UAAK,WAAU,+BAA8B,cAAC,CAAA,EAEnD,CAAA;AAAA,IAAA,EAzBW,GAAAU,CA2Bf,CACD,EACH,CAAA;AAAA,EAAA,GACF;AAEJ;"}
|