@ztwoint/z-ui 0.1.44 → 0.1.46
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/avatar/avatar.d.ts +185 -0
- package/dist/components/avatar/avatar.js +55 -0
- package/dist/components/table/components/pagination/index.d.ts +1 -0
- package/dist/components/table/components/pagination/pagination.hook.d.ts +1 -1
- package/dist/components/table/components/pagination/pagination.hook.js +20 -16
- package/dist/components/table/components/table-filter/filters/checkbox.js +35 -51
- package/dist/components/table/components/table-filter/filters/text.js +41 -39
- package/dist/components/table/components/table-filter/index.d.ts +4 -1
- package/dist/components/table/components/table-filter/selected-filters-display/index.d.ts +2 -0
- package/dist/components/table/components/table-filter/selected-filters-display/selected-filters-display.d.ts +3 -0
- package/dist/components/table/components/table-filter/selected-filters-display/selected-filters-display.js +30 -0
- package/dist/components/table/components/table-filter/selected-filters-display/selected-filters-display.type.d.ts +12 -0
- package/dist/components/table/components/table-filter/selected-filters-display/selected-filters-display.utils.d.ts +6 -0
- package/dist/components/table/components/table-filter/selected-filters-display/selected-filters-display.utils.js +26 -0
- package/dist/components/table/components/table-filter/table-filter-button.d.ts +2 -0
- package/dist/components/table/components/table-filter/table-filter-button.js +103 -0
- package/dist/components/table/components/table-filter/table-filter-column-button.d.ts +3 -0
- package/dist/components/table/components/table-filter/table-filter-column-button.js +78 -0
- package/dist/components/table/components/table-filter/table-filter-column-button.type.d.ts +3 -0
- package/dist/components/table/components/table-filter/table-filter-provider.d.ts +14 -0
- package/dist/components/table/components/table-filter/table-filter-provider.js +32 -0
- package/dist/components/table/components/table-filter/table-filter.context.d.ts +21 -0
- package/dist/components/table/components/table-filter/table-filter.context.js +13 -0
- package/dist/components/table/components/table-filter/table-filter.hook.d.ts +1 -2
- package/dist/components/table/components/table-filter/table-filter.hook.js +39 -37
- package/dist/components/table/index.d.ts +1 -2
- package/dist/components/table/table-provider.d.ts +1 -1
- package/dist/components/table/table-provider.js +13 -13
- package/dist/components/table/table.type.d.ts +2 -0
- package/dist/components/table/table.utils.d.ts +0 -1
- package/dist/components/table/table.utils.js +5 -3
- package/dist/components/table-card/table-card.js +69 -64
- package/dist/components/table-card/table-card.type.d.ts +7 -7
- package/dist/css/styles/tailwind.css +1 -1
- package/dist/hooks/useClickOutside.d.ts +1 -0
- package/dist/hooks/useClickOutside.js +14 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +110 -110
- package/dist/types/components/avatar/avatar.d.ts +185 -0
- package/dist/types/components/table/components/pagination/index.d.ts +1 -0
- package/dist/types/components/table/components/pagination/pagination.hook.d.ts +1 -1
- package/dist/types/components/table/components/table-filter/index.d.ts +4 -1
- package/dist/types/components/table/components/table-filter/selected-filters-display/index.d.ts +2 -0
- package/dist/types/components/table/components/table-filter/selected-filters-display/selected-filters-display.d.ts +3 -0
- package/dist/types/components/table/components/table-filter/selected-filters-display/selected-filters-display.type.d.ts +12 -0
- package/dist/types/components/table/components/table-filter/selected-filters-display/selected-filters-display.utils.d.ts +6 -0
- package/dist/types/components/table/components/table-filter/table-filter-button.d.ts +2 -0
- package/dist/types/components/table/components/table-filter/table-filter-column-button.d.ts +3 -0
- package/dist/types/components/table/components/table-filter/table-filter-column-button.type.d.ts +3 -0
- package/dist/types/components/table/components/table-filter/table-filter-provider.d.ts +14 -0
- package/dist/types/components/table/components/table-filter/table-filter.context.d.ts +21 -0
- package/dist/types/components/table/components/table-filter/table-filter.hook.d.ts +1 -2
- package/dist/types/components/table/index.d.ts +1 -2
- package/dist/types/components/table/table-provider.d.ts +1 -1
- package/dist/types/components/table/table.type.d.ts +2 -0
- package/dist/types/components/table/table.utils.d.ts +0 -1
- package/dist/types/components/table-card/table-card.type.d.ts +7 -7
- package/dist/types/hooks/useClickOutside.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +2 -1
- package/dist/components/table/components/table-filter/table-filter.d.ts +0 -9
- package/dist/components/table/components/table-filter/table-filter.js +0 -120
- package/dist/types/components/table/components/table-filter/table-filter.d.ts +0 -9
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useClickOutside: (ref: React.RefObject<HTMLElement | null>, callback: () => void) => void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { useEffect as r } from "react";
|
|
2
|
+
const s = (t, n) => {
|
|
3
|
+
r(() => {
|
|
4
|
+
function e(o) {
|
|
5
|
+
t.current && !t.current.contains(o.target) && n();
|
|
6
|
+
}
|
|
7
|
+
return document.addEventListener("mousedown", e), document.addEventListener("touchstart", e), () => {
|
|
8
|
+
document.removeEventListener("mousedown", e), document.removeEventListener("touchstart", e);
|
|
9
|
+
};
|
|
10
|
+
}, [t, n]);
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
s as useClickOutside
|
|
14
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export * from './components/table';
|
|
|
16
16
|
export * from './components/tooltip/tooltip';
|
|
17
17
|
export * from './components/table-card';
|
|
18
18
|
export * from './components/badge/badge';
|
|
19
|
+
export * from './components/avatar/avatar';
|
|
19
20
|
export * from './components/assets/icons/apartment-building';
|
|
20
21
|
export * from './components/assets/icons/chevron-down';
|
|
21
22
|
export * from './components/assets/icons/chevron-left';
|
package/dist/index.js
CHANGED
|
@@ -1,131 +1,132 @@
|
|
|
1
1
|
/* empty css */
|
|
2
|
-
import { Alert as p, AlertDescription as n, AlertTitle as
|
|
2
|
+
import { Alert as p, AlertDescription as n, AlertTitle as m } from "./components/alert/alert.js";
|
|
3
3
|
import { AlertCirclesIcon as f } from "./components/alert/icons/circles-icon.js";
|
|
4
4
|
import { Button as i, buttonVariants as Z } from "./components/button/button.js";
|
|
5
|
-
import { Z2SideNavBarProvider as
|
|
5
|
+
import { Z2SideNavBarProvider as S } from "./components/collapsible-side-nav-bar/side-nav-bar-provider.js";
|
|
6
6
|
import { Z2SideNavBar as D, Z2SidebarVariants as T } from "./components/collapsible-side-nav-bar/side-nav-bar.js";
|
|
7
|
-
import { Z2SideNavBarHeader as
|
|
7
|
+
import { Z2SideNavBarHeader as C } from "./components/collapsible-side-nav-bar/side-nav-bar-header.js";
|
|
8
8
|
import { Z2SideNavBarContent as w } from "./components/collapsible-side-nav-bar/side-nav-bar-content.js";
|
|
9
9
|
import { Z2SideNavBarFooter as s } from "./components/collapsible-side-nav-bar/side-nav-bar-footer.js";
|
|
10
10
|
import { Z2SideNavBarGroup as v } from "./components/collapsible-side-nav-bar/side-nav-bar-group.js";
|
|
11
11
|
import { Z2SideNavBarItem as M } from "./components/collapsible-side-nav-bar/side-nav-bar-item.js";
|
|
12
|
-
import { Z2SideNavBarSeparator as
|
|
13
|
-
import { useZ2SideNavBar as
|
|
12
|
+
import { Z2SideNavBarSeparator as P } from "./components/collapsible-side-nav-bar/side-nav-bar-separator.js";
|
|
13
|
+
import { useZ2SideNavBar as N } from "./components/collapsible-side-nav-bar/context.js";
|
|
14
14
|
import { Z2Popover as F } from "./components/collapsible-side-nav-bar/popover/popover.js";
|
|
15
15
|
import { ChevronUpIcon as _ } from "./components/assets/icons/chevron-up-icon.js";
|
|
16
|
-
import { default as
|
|
17
|
-
import { default as
|
|
18
|
-
import { default as
|
|
16
|
+
import { default as h } from "./components/assets/icons/sub-nav-indicator.js";
|
|
17
|
+
import { default as R } from "./components/assets/icons/circles-icon.js";
|
|
18
|
+
import { default as V } from "./components/assets/icons/database-copy.js";
|
|
19
19
|
import { default as k } from "./components/assets/icons/window-left-copy.js";
|
|
20
20
|
import { default as J } from "./components/assets/icons/sidebar-left-show-copy.js";
|
|
21
21
|
import { SIDEBAR_WIDTH as Y, SIDEBAR_WIDTH_COLLAPSED as j } from "./components/collapsible-side-nav-bar/constants.js";
|
|
22
22
|
import { CountryFlags as z } from "./components/country-flags/country-flags.js";
|
|
23
|
-
import { Z2Dialog as X, Z2DialogClose as $, Z2DialogContent as oo, Z2DialogDescription as
|
|
24
|
-
import { DropdownContext as fo, Z2Dropdown as xo, Z2DropdownContent as io, Z2DropdownInput as Zo, Z2DropdownItem as
|
|
25
|
-
import { Z2DropdownMenu as
|
|
23
|
+
import { Z2Dialog as X, Z2DialogClose as $, Z2DialogContent as oo, Z2DialogDescription as ro, Z2DialogFooter as eo, Z2DialogHeader as to, Z2DialogOverlay as ao, Z2DialogPortal as po, Z2DialogTitle as no, Z2DialogTrigger as mo } from "./components/dialog/dialog.js";
|
|
24
|
+
import { DropdownContext as fo, Z2Dropdown as xo, Z2DropdownContent as io, Z2DropdownInput as Zo, Z2DropdownItem as So, Z2DropdownSub as uo, Z2DropdownSubContent as Do, Z2DropdownSubItem as To, Z2DropdownSubTrigger as bo } from "./components/dropdown/z2-dropdown.js";
|
|
25
|
+
import { Z2DropdownMenu as go, Z2DropdownMenuCheckboxItem as wo, Z2DropdownMenuContent as co, Z2DropdownMenuGroup as so, Z2DropdownMenuItem as Io, Z2DropdownMenuLabel as vo, Z2DropdownMenuPortal as Bo, Z2DropdownMenuRadioGroup as Mo, Z2DropdownMenuRadioItem as Ao, Z2DropdownMenuSeparator as Po, Z2DropdownMenuShortcut as Lo, Z2DropdownMenuSub as No, Z2DropdownMenuSubContent as Eo, Z2DropdownMenuSubTrigger as Fo, Z2DropdownMenuTrigger as Ho } from "./components/dropdown-menu/z2-dropdown-menu.js";
|
|
26
26
|
import { FileUploadArea as yo } from "./components/file-upload-area/file-upload-area.js";
|
|
27
|
-
import { DEFAULT_ACCEPT as
|
|
28
|
-
import { Input as
|
|
27
|
+
import { DEFAULT_ACCEPT as Go } from "./components/file-upload-area/file-upload-area.const.js";
|
|
28
|
+
import { Input as Uo } from "./components/input/input.js";
|
|
29
29
|
import { NavHeader as Wo } from "./components/nav-header/nav-header.js";
|
|
30
30
|
import { NavItem as Oo } from "./components/nav-header/nav-item/nav-item.js";
|
|
31
|
-
import { Z2Select as Qo, Z2SelectContent as Yo, Z2SelectGroup as jo, Z2SelectItem as qo, Z2SelectLabel as zo, Z2SelectScrollDownButton as Ko, Z2SelectScrollUpButton as Xo, Z2SelectSeparator as $o, Z2SelectTrigger as
|
|
32
|
-
import { Z2Stepper as
|
|
33
|
-
import { Z2StepperItem as
|
|
34
|
-
import { Z2Tabs as
|
|
35
|
-
import { Table as
|
|
36
|
-
import { TableBody as
|
|
37
|
-
import { extractCellValue as
|
|
38
|
-
import { DEFAULT_EMPTY_MESSAGE as
|
|
39
|
-
import { TableContext as
|
|
40
|
-
import { TableCell as
|
|
41
|
-
import { TextCell as
|
|
42
|
-
import { NumberCell as
|
|
43
|
-
import { BooleanCell as
|
|
44
|
-
import { TableHeader as
|
|
31
|
+
import { Z2Select as Qo, Z2SelectContent as Yo, Z2SelectGroup as jo, Z2SelectItem as qo, Z2SelectLabel as zo, Z2SelectScrollDownButton as Ko, Z2SelectScrollUpButton as Xo, Z2SelectSeparator as $o, Z2SelectTrigger as or, Z2SelectValue as rr } from "./components/select/z2-select.js";
|
|
32
|
+
import { Z2Stepper as tr } from "./components/stepper/stepper.js";
|
|
33
|
+
import { Z2StepperItem as pr } from "./components/stepper-item/stepper-item.js";
|
|
34
|
+
import { Z2Tabs as mr, Z2TabsContent as lr, Z2TabsList as fr, Z2TabsTrigger as xr } from "./components/tab/tab.js";
|
|
35
|
+
import { Table as Zr, TableProvider as dr } from "./components/table/table-provider.js";
|
|
36
|
+
import { TableBody as ur } from "./components/table/table.js";
|
|
37
|
+
import { extractCellValue as Tr } from "./components/table/table.utils.js";
|
|
38
|
+
import { DEFAULT_EMPTY_MESSAGE as Cr, TABLE_CSS_CLASSES as gr } from "./components/table/table.const.js";
|
|
39
|
+
import { TableContext as cr, useTableContext as sr } from "./components/table/table.context.js";
|
|
40
|
+
import { TableCell as vr } from "./components/table/components/table-cell.js";
|
|
41
|
+
import { TextCell as Mr } from "./components/table/components/cell/text-cell.js";
|
|
42
|
+
import { NumberCell as Pr } from "./components/table/components/cell/number-cell.js";
|
|
43
|
+
import { BooleanCell as Nr } from "./components/table/components/cell/boolean-cell.js";
|
|
44
|
+
import { TableHeader as Fr } from "./components/table/components/table-header/table-header.js";
|
|
45
45
|
import "react/jsx-runtime";
|
|
46
|
-
import { TableRow as
|
|
47
|
-
import { TableEmptyState as
|
|
48
|
-
import { TableLoadingState as
|
|
49
|
-
import { Pagination as
|
|
50
|
-
import { TableHeaderWrapper as
|
|
51
|
-
import { TableHeaderContent as
|
|
52
|
-
import { TableFooter as
|
|
53
|
-
import { TableFooterContent as
|
|
54
|
-
import { MagnifierIcon as
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import { PaginationQuickJumper as ar } from "./components/table/components/pagination/components/pagination-quick-jumper.js";
|
|
46
|
+
import { TableRow as _r } from "./components/table/components/table-row.js";
|
|
47
|
+
import { TableEmptyState as hr } from "./components/table/components/table-empty-state.js";
|
|
48
|
+
import { TableLoadingState as Rr } from "./components/table/components/table-loading-state.js";
|
|
49
|
+
import { Pagination as Vr } from "./components/table/components/pagination/pagination.js";
|
|
50
|
+
import { TableHeaderWrapper as kr } from "./components/table/components/table-header-wrapper.js";
|
|
51
|
+
import { TableHeaderContent as Jr } from "./components/table/components/table-header-content.js";
|
|
52
|
+
import { TableFooter as Yr } from "./components/table/components/table-footer.js";
|
|
53
|
+
import { TableFooterContent as qr } from "./components/table/components/table-footer-content.js";
|
|
54
|
+
import { MagnifierIcon as Kr } from "./components/assets/icons/magnifier-icon.js";
|
|
55
|
+
import { PaginationInfo as $r } from "./components/table/components/pagination/components/pagination-info.js";
|
|
56
|
+
import { PaginationQuickJumper as re } from "./components/table/components/pagination/components/pagination-quick-jumper.js";
|
|
58
57
|
import "react";
|
|
59
|
-
import { Z2Tooltip as
|
|
60
|
-
import { default as
|
|
61
|
-
import { Badge as
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
58
|
+
import { Z2Tooltip as te } from "./components/tooltip/tooltip.js";
|
|
59
|
+
import { default as pe } from "./components/table-card/table-card.js";
|
|
60
|
+
import { Badge as me, badgeVariants as le } from "./components/badge/badge.js";
|
|
61
|
+
import { Avatar as xe, AvatarWithLabel as ie } from "./components/avatar/avatar.js";
|
|
62
|
+
import { InfoIcon as de } from "./components/assets/icons/info-icon.js";
|
|
63
|
+
import { useTheme as ue } from "./lib/theme.hook.js";
|
|
64
|
+
import { cn as Te } from "./lib/utils.js";
|
|
65
|
+
import { Z2PopoverTrigger as Ce } from "./components/collapsible-side-nav-bar/popover/popover-trigger.js";
|
|
66
|
+
import { Z2PopoverContent as we } from "./components/collapsible-side-nav-bar/popover/popover-content.js";
|
|
67
67
|
export {
|
|
68
68
|
p as Alert,
|
|
69
69
|
f as AlertCirclesIcon,
|
|
70
70
|
n as AlertDescription,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
m as AlertTitle,
|
|
72
|
+
xe as Avatar,
|
|
73
|
+
ie as AvatarWithLabel,
|
|
74
|
+
me as Badge,
|
|
75
|
+
Nr as BooleanCell,
|
|
74
76
|
i as Button,
|
|
75
77
|
_ as ChevronUpIcon,
|
|
76
|
-
|
|
78
|
+
R as CirclesIcon,
|
|
77
79
|
z as CountryFlags,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
80
|
+
Go as DEFAULT_ACCEPT,
|
|
81
|
+
Cr as DEFAULT_EMPTY_MESSAGE,
|
|
82
|
+
V as DatabaseCopy,
|
|
81
83
|
fo as DropdownContext,
|
|
82
84
|
yo as FileUploadArea,
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
85
|
+
de as InfoIcon,
|
|
86
|
+
Uo as Input,
|
|
87
|
+
Kr as MagnifierIcon,
|
|
86
88
|
Wo as NavHeader,
|
|
87
89
|
Oo as NavItem,
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
90
|
+
Pr as NumberCell,
|
|
91
|
+
$r as PaginationInfo,
|
|
92
|
+
re as PaginationQuickJumper,
|
|
91
93
|
Y as SIDEBAR_WIDTH,
|
|
92
94
|
j as SIDEBAR_WIDTH_COLLAPSED,
|
|
93
95
|
J as SidebarLeftShowCopy,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
Ae as TextCell,
|
|
96
|
+
h as SubNavIndicator,
|
|
97
|
+
gr as TABLE_CSS_CLASSES,
|
|
98
|
+
Zr as Table,
|
|
99
|
+
ur as TableBody,
|
|
100
|
+
pe as TableCard,
|
|
101
|
+
vr as TableCell,
|
|
102
|
+
cr as TableContext,
|
|
103
|
+
hr as TableEmptyState,
|
|
104
|
+
Yr as TableFooter,
|
|
105
|
+
qr as TableFooterContent,
|
|
106
|
+
Fr as TableHeader,
|
|
107
|
+
Jr as TableHeaderContent,
|
|
108
|
+
kr as TableHeaderWrapper,
|
|
109
|
+
Rr as TableLoadingState,
|
|
110
|
+
Vr as TablePagination,
|
|
111
|
+
dr as TableProvider,
|
|
112
|
+
_r as TableRow,
|
|
113
|
+
Mr as TextCell,
|
|
113
114
|
k as WindowLeftCopy,
|
|
114
115
|
X as Z2Dialog,
|
|
115
116
|
$ as Z2DialogClose,
|
|
116
117
|
oo as Z2DialogContent,
|
|
117
|
-
|
|
118
|
-
|
|
118
|
+
ro as Z2DialogDescription,
|
|
119
|
+
eo as Z2DialogFooter,
|
|
119
120
|
to as Z2DialogHeader,
|
|
120
121
|
ao as Z2DialogOverlay,
|
|
121
122
|
po as Z2DialogPortal,
|
|
122
123
|
no as Z2DialogTitle,
|
|
123
|
-
|
|
124
|
+
mo as Z2DialogTrigger,
|
|
124
125
|
xo as Z2Dropdown,
|
|
125
126
|
io as Z2DropdownContent,
|
|
126
127
|
Zo as Z2DropdownInput,
|
|
127
|
-
|
|
128
|
-
|
|
128
|
+
So as Z2DropdownItem,
|
|
129
|
+
go as Z2DropdownMenu,
|
|
129
130
|
wo as Z2DropdownMenuCheckboxItem,
|
|
130
131
|
co as Z2DropdownMenuContent,
|
|
131
132
|
so as Z2DropdownMenuGroup,
|
|
@@ -134,19 +135,19 @@ export {
|
|
|
134
135
|
Bo as Z2DropdownMenuPortal,
|
|
135
136
|
Mo as Z2DropdownMenuRadioGroup,
|
|
136
137
|
Ao as Z2DropdownMenuRadioItem,
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
138
|
+
Po as Z2DropdownMenuSeparator,
|
|
139
|
+
Lo as Z2DropdownMenuShortcut,
|
|
140
|
+
No as Z2DropdownMenuSub,
|
|
141
|
+
Eo as Z2DropdownMenuSubContent,
|
|
141
142
|
Fo as Z2DropdownMenuSubTrigger,
|
|
142
143
|
Ho as Z2DropdownMenuTrigger,
|
|
143
|
-
|
|
144
|
+
uo as Z2DropdownSub,
|
|
144
145
|
Do as Z2DropdownSubContent,
|
|
145
146
|
To as Z2DropdownSubItem,
|
|
146
147
|
bo as Z2DropdownSubTrigger,
|
|
147
148
|
F as Z2Popover,
|
|
148
|
-
|
|
149
|
-
|
|
149
|
+
we as Z2PopoverContent,
|
|
150
|
+
Ce as Z2PopoverTrigger,
|
|
150
151
|
Qo as Z2Select,
|
|
151
152
|
Yo as Z2SelectContent,
|
|
152
153
|
jo as Z2SelectGroup,
|
|
@@ -155,30 +156,29 @@ export {
|
|
|
155
156
|
Ko as Z2SelectScrollDownButton,
|
|
156
157
|
Xo as Z2SelectScrollUpButton,
|
|
157
158
|
$o as Z2SelectSeparator,
|
|
158
|
-
|
|
159
|
-
|
|
159
|
+
or as Z2SelectTrigger,
|
|
160
|
+
rr as Z2SelectValue,
|
|
160
161
|
D as Z2SideNavBar,
|
|
161
162
|
w as Z2SideNavBarContent,
|
|
162
163
|
s as Z2SideNavBarFooter,
|
|
163
164
|
v as Z2SideNavBarGroup,
|
|
164
|
-
|
|
165
|
+
C as Z2SideNavBarHeader,
|
|
165
166
|
M as Z2SideNavBarItem,
|
|
166
|
-
|
|
167
|
-
|
|
167
|
+
S as Z2SideNavBarProvider,
|
|
168
|
+
P as Z2SideNavBarSeparator,
|
|
168
169
|
T as Z2SidebarVariants,
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
170
|
+
tr as Z2Stepper,
|
|
171
|
+
pr as Z2StepperItem,
|
|
172
|
+
mr as Z2Tabs,
|
|
173
|
+
lr as Z2TabsContent,
|
|
174
|
+
fr as Z2TabsList,
|
|
175
|
+
xr as Z2TabsTrigger,
|
|
176
|
+
te as Z2Tooltip,
|
|
177
|
+
le as badgeVariants,
|
|
177
178
|
Z as buttonVariants,
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
E as useZ2SideNavBar
|
|
179
|
+
Te as cn,
|
|
180
|
+
Tr as extractCellValue,
|
|
181
|
+
sr as useTableContext,
|
|
182
|
+
ue as useTheme,
|
|
183
|
+
N as useZ2SideNavBar
|
|
184
184
|
};
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Props for the Avatar Root component.
|
|
3
|
+
* @interface RootProps
|
|
4
|
+
*/
|
|
5
|
+
interface RootProps {
|
|
6
|
+
/** Size variant of the avatar. Affects width, height, border radius, and text size */
|
|
7
|
+
size: 'xxs' | 'xs' | 'sm' | 'md';
|
|
8
|
+
/** Color theme of the avatar using design system color tokens */
|
|
9
|
+
color: 'orange' | 'purple' | 'green' | 'blue';
|
|
10
|
+
/** Child components, typically Avatar.Label or Avatar.Element */
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
/** Additional CSS classes for custom styling */
|
|
13
|
+
className?: string;
|
|
14
|
+
/** Ref object for the root div element */
|
|
15
|
+
ref?: React.RefObject<HTMLDivElement>;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Avatar Root component - the container for avatar content.
|
|
19
|
+
*
|
|
20
|
+
* @param props - The component props
|
|
21
|
+
* @param props.size - Size variant (xxs: 18px, xs: 22px, sm: 26px, md: 30px)
|
|
22
|
+
* @param props.color - Color theme using design system tokens
|
|
23
|
+
* @param props.children - Child components (typically Avatar.Label)
|
|
24
|
+
* @param props.className - Additional CSS classes
|
|
25
|
+
* @param props.ref - Ref for the root div element
|
|
26
|
+
* @returns The rendered avatar container
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```tsx
|
|
30
|
+
* <Avatar.Root size="sm" color="orange">
|
|
31
|
+
* <Avatar.Label label="JD" />
|
|
32
|
+
* </Avatar.Root>
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
declare function Root({ size, color, children, className, ref, ...props }: RootProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
/**
|
|
37
|
+
* Props for the Avatar Element component.
|
|
38
|
+
* @interface ElementProps
|
|
39
|
+
*/
|
|
40
|
+
interface ElementProps {
|
|
41
|
+
/** Text content to display in the avatar (typically initials) */
|
|
42
|
+
label: string;
|
|
43
|
+
/** Additional CSS classes for custom styling */
|
|
44
|
+
className?: string;
|
|
45
|
+
/** Ref object for the span element */
|
|
46
|
+
ref?: React.RefObject<HTMLSpanElement>;
|
|
47
|
+
/** When true, merges props with the first child instead of rendering a span */
|
|
48
|
+
asChild?: boolean;
|
|
49
|
+
/** Child components (only used when asChild is true) */
|
|
50
|
+
children?: React.ReactNode;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Avatar Element component - flexible text/content renderer with asChild support.
|
|
54
|
+
*
|
|
55
|
+
* @param props - The component props
|
|
56
|
+
* @param props.label - Text to display (typically user initials)
|
|
57
|
+
* @param props.className - Additional CSS classes
|
|
58
|
+
* @param props.ref - Ref for the element
|
|
59
|
+
* @param props.asChild - When true, uses Radix Slot to merge with first child
|
|
60
|
+
* @param props.children - Child components (only when asChild is true)
|
|
61
|
+
* @returns The rendered element with avatar text styling
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```tsx
|
|
65
|
+
* <Avatar.Element label="JD" />
|
|
66
|
+
*
|
|
67
|
+
* // With asChild for custom elements
|
|
68
|
+
* <Avatar.Element label="JD" asChild>
|
|
69
|
+
* <button>Custom Button</button>
|
|
70
|
+
* </Avatar.Element>
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
declare function Element({ label, className, ref, asChild, children, ...props }: ElementProps): import("react/jsx-runtime").JSX.Element;
|
|
74
|
+
/**
|
|
75
|
+
* Props for the Avatar Label component.
|
|
76
|
+
* @interface LabelProps
|
|
77
|
+
*/
|
|
78
|
+
interface LabelProps {
|
|
79
|
+
/** Text content to display in the avatar (typically user initials) */
|
|
80
|
+
label: string;
|
|
81
|
+
/** Additional CSS classes for custom styling */
|
|
82
|
+
className?: string;
|
|
83
|
+
/** Ref object for the span element */
|
|
84
|
+
ref?: React.RefObject<HTMLSpanElement>;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Avatar Label component - simplified wrapper around Avatar.Element.
|
|
88
|
+
*
|
|
89
|
+
* @param props - The component props
|
|
90
|
+
* @param props.label - Text to display (typically user initials)
|
|
91
|
+
* @param props.className - Additional CSS classes
|
|
92
|
+
* @param props.ref - Ref for the span element
|
|
93
|
+
* @returns The rendered label with avatar text styling
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* ```tsx
|
|
97
|
+
* <Avatar.Label label="JD" />
|
|
98
|
+
* <Avatar.Label label="AB" className="text-yellow-300" />
|
|
99
|
+
* ```
|
|
100
|
+
*/
|
|
101
|
+
declare function Label({ label, className, ref, ...props }: LabelProps): import("react/jsx-runtime").JSX.Element;
|
|
102
|
+
/**
|
|
103
|
+
* Props for the AvatarWithLabel convenience component.
|
|
104
|
+
* @interface AvatarWithLabelProps
|
|
105
|
+
*/
|
|
106
|
+
interface AvatarWithLabelProps {
|
|
107
|
+
/** Text content to display in the avatar (typically user initials) */
|
|
108
|
+
label: string;
|
|
109
|
+
/** Size variant of the avatar. Affects width, height, border radius, and text size */
|
|
110
|
+
size: 'xxs' | 'xs' | 'sm' | 'md';
|
|
111
|
+
/** Color theme of the avatar using design system color tokens */
|
|
112
|
+
color: 'orange' | 'purple' | 'green' | 'blue';
|
|
113
|
+
/** Additional CSS classes for custom styling */
|
|
114
|
+
className?: string;
|
|
115
|
+
/** Ref object for the root div element */
|
|
116
|
+
ref?: React.RefObject<HTMLDivElement>;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* AvatarWithLabel - A convenience component that combines Avatar.Root and Avatar.Label.
|
|
120
|
+
* Perfect for simple use cases where you just need an avatar with text.
|
|
121
|
+
*
|
|
122
|
+
* @param props - The component props
|
|
123
|
+
* @param props.label - Text to display (typically user initials)
|
|
124
|
+
* @param props.size - Size variant (xxs: 18px, xs: 22px, sm: 26px, md: 30px)
|
|
125
|
+
* @param props.color - Color theme using design system tokens
|
|
126
|
+
* @param props.className - Additional CSS classes
|
|
127
|
+
* @param props.ref - Ref for the root div element
|
|
128
|
+
* @returns The rendered avatar with label
|
|
129
|
+
*
|
|
130
|
+
* @example
|
|
131
|
+
* ```tsx
|
|
132
|
+
* <AvatarWithLabel label="JD" size="sm" color="orange" />
|
|
133
|
+
* <AvatarWithLabel label="AB" size="md" color="blue" className="rounded-full" />
|
|
134
|
+
* ```
|
|
135
|
+
*/
|
|
136
|
+
declare function AvatarWithLabel({ label, size, color, className, ref, ...props }: AvatarWithLabelProps): import("react/jsx-runtime").JSX.Element;
|
|
137
|
+
/**
|
|
138
|
+
* Avatar compound component with multiple variants for flexible usage.
|
|
139
|
+
*
|
|
140
|
+
* @namespace Avatar
|
|
141
|
+
* @property {React.ComponentType<RootProps>} Root - Container component for avatar content
|
|
142
|
+
* @property {React.ComponentType<ElementProps>} Element - Flexible text/content renderer with asChild support
|
|
143
|
+
* @property {React.ComponentType<LabelProps>} Label - Simplified text renderer (wrapper around Element)
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* ```tsx
|
|
147
|
+
* // Basic usage
|
|
148
|
+
* <Avatar.Root size="sm" color="orange">
|
|
149
|
+
* <Avatar.Label label="JD" />
|
|
150
|
+
* </Avatar.Root>
|
|
151
|
+
*
|
|
152
|
+
* // With custom styling
|
|
153
|
+
* <Avatar.Root size="md" color="blue" className="rounded-full border-2 border-white">
|
|
154
|
+
* <Avatar.Label label="AB" className="text-yellow-300" />
|
|
155
|
+
* </Avatar.Root>
|
|
156
|
+
*
|
|
157
|
+
* // Using Element with asChild for custom components
|
|
158
|
+
* <Avatar.Root size="sm" color="green">
|
|
159
|
+
* <Avatar.Element label="CD" asChild>
|
|
160
|
+
* <button onClick={handleClick}>Clickable Avatar</button>
|
|
161
|
+
* </Avatar.Element>
|
|
162
|
+
* </Avatar.Root>
|
|
163
|
+
* ```
|
|
164
|
+
*/
|
|
165
|
+
declare const Avatar: {
|
|
166
|
+
Root: typeof Root;
|
|
167
|
+
Element: typeof Element;
|
|
168
|
+
Label: typeof Label;
|
|
169
|
+
};
|
|
170
|
+
/**
|
|
171
|
+
* @fileoverview Avatar component library providing both compound and convenience components.
|
|
172
|
+
*
|
|
173
|
+
* This module exports:
|
|
174
|
+
* - Avatar: A compound component with Root, Element, and Label sub-components
|
|
175
|
+
* - AvatarWithLabel: A convenience component that combines Root and Label
|
|
176
|
+
*
|
|
177
|
+
* Features:
|
|
178
|
+
* - Multiple sizes (xxs, xs, sm, md) with responsive scaling
|
|
179
|
+
* - Color themes using design system tokens
|
|
180
|
+
* - Customizable styling via className
|
|
181
|
+
* - Radix Slot support for advanced composition
|
|
182
|
+
* - TypeScript support with comprehensive prop types
|
|
183
|
+
* - Optimized typography for readability at all sizes
|
|
184
|
+
*/
|
|
185
|
+
export { Avatar, AvatarWithLabel, ElementProps, LabelProps, RootProps, AvatarWithLabelProps };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { Pagination, default } from './pagination';
|
|
2
|
+
export { PaginationInfo, PaginationQuickJumper } from './components';
|
|
2
3
|
export type { PaginationProps, PaginationInfoProps, PaginationQuickJumperProps, } from './pagination.type';
|
|
3
4
|
export { usePagination } from './pagination.hook';
|
|
4
5
|
export { usePaginationQuickJumper } from './components/pagination-quick-jumper.hook';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PaginationHookProps, PaginationHookReturn } from './pagination.type';
|
|
2
|
-
export declare const usePagination: (
|
|
2
|
+
export declare const usePagination: ({ currentPage, totalPage, maxVisiblePages, }: PaginationHookProps) => PaginationHookReturn & {
|
|
3
3
|
goToPage: (page: number) => boolean;
|
|
4
4
|
canGoToPage: (page: number) => boolean;
|
|
5
5
|
};
|
|
@@ -1 +1,4 @@
|
|
|
1
|
-
export { TableFilter } from './table-filter';
|
|
1
|
+
export { TableFilterProvider, TableFilter } from './table-filter-provider';
|
|
2
|
+
export { TableFilterButton } from './table-filter-button';
|
|
3
|
+
export { TableFilterColumnButton } from './table-filter-column-button';
|
|
4
|
+
export { useTableFilterContext } from './table-filter.context';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FilterRule, TableSchema } from '../../../table.type';
|
|
2
|
+
export interface SelectedFilterDisplayProps {
|
|
3
|
+
selectedFilters: FilterRule[];
|
|
4
|
+
schema: TableSchema;
|
|
5
|
+
}
|
|
6
|
+
export interface FilterDisplayItem {
|
|
7
|
+
field: string;
|
|
8
|
+
fieldTitle: string;
|
|
9
|
+
value: string | string[];
|
|
10
|
+
condition?: string;
|
|
11
|
+
count?: number;
|
|
12
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FilterRule, TableSchema, FilterOption } from '../../../table.type';
|
|
2
|
+
import { FilterDisplayItem } from './selected-filters-display.type';
|
|
3
|
+
export declare const formatFilterValue: (value: string | string[]) => string;
|
|
4
|
+
export declare const getFilterCount: (filterRule: FilterRule, filterOptions?: FilterOption[]) => number | undefined;
|
|
5
|
+
export declare const createFilterDisplayItems: (selectedFilters: FilterRule[], schema: TableSchema) => FilterDisplayItem[];
|
|
6
|
+
export declare const calculateTotalCount: (filterDisplayItems: FilterDisplayItem[]) => number;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { TableFilterProps } from './table-filter.type';
|
|
3
|
+
import { TableFilterButton } from './table-filter-button';
|
|
4
|
+
import { TableFilterColumnButton } from './table-filter-column-button';
|
|
5
|
+
export interface TableFilterProviderProps extends TableFilterProps {
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare const TableFilterProvider: React.FC<TableFilterProviderProps>;
|
|
9
|
+
interface TableFilterCompoundComponent extends React.FC<TableFilterProviderProps> {
|
|
10
|
+
FilterButton: typeof TableFilterButton;
|
|
11
|
+
FilterColumnButton: typeof TableFilterColumnButton;
|
|
12
|
+
}
|
|
13
|
+
export declare const TableFilter: TableFilterCompoundComponent;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { TableSchema, TableFilter as TableFilterType, FilterRule } from '../../table.type';
|
|
3
|
+
import { FilterComponentType } from './table-filter.type';
|
|
4
|
+
export interface TableFilterContextValue {
|
|
5
|
+
selectedColumn: string | null;
|
|
6
|
+
setSelectedColumn: (column: string | null) => void;
|
|
7
|
+
getFilterForColumn: (columnKey: string) => FilterRule | undefined;
|
|
8
|
+
hasFilterForColumn: (columnKey: string) => boolean;
|
|
9
|
+
hasAppliedFilterForColumn: (columnKey: string) => boolean;
|
|
10
|
+
updateColumnFilter: (columnKey: string, condition?: string, value?: string | string[]) => void;
|
|
11
|
+
clearAllFilters: () => void;
|
|
12
|
+
applyFilters: () => void;
|
|
13
|
+
hasActiveFilters: boolean;
|
|
14
|
+
filterableFields: TableSchema;
|
|
15
|
+
tempFilters: FilterRule[];
|
|
16
|
+
schema: TableSchema;
|
|
17
|
+
filter: TableFilterType;
|
|
18
|
+
filterComponents?: Record<string, FilterComponentType>;
|
|
19
|
+
}
|
|
20
|
+
export declare const TableFilterContext: React.Context<TableFilterContextValue | undefined>;
|
|
21
|
+
export declare const useTableFilterContext: () => TableFilterContextValue;
|
|
@@ -2,16 +2,15 @@ import React from 'react';
|
|
|
2
2
|
import { TableFilterProps } from './table-filter.type';
|
|
3
3
|
import { FilterRule } from '../../table.type';
|
|
4
4
|
declare const useTableFilter: ({ filter, schema }: TableFilterProps) => {
|
|
5
|
-
isOpen: boolean;
|
|
6
5
|
selectedColumn: string | null;
|
|
7
6
|
setSelectedColumn: React.Dispatch<React.SetStateAction<string | null>>;
|
|
8
7
|
getFilterForColumn: (columnKey: string) => FilterRule | undefined;
|
|
9
8
|
hasFilterForColumn: (columnKey: string) => boolean;
|
|
9
|
+
hasAppliedFilterForColumn: (columnKey: string) => boolean;
|
|
10
10
|
updateColumnFilter: (columnKey: string, condition?: string, value?: string | string[]) => void;
|
|
11
11
|
clearAllFilters: () => void;
|
|
12
12
|
applyFilters: () => void;
|
|
13
13
|
hasActiveFilters: boolean;
|
|
14
|
-
setIsOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
15
14
|
tempFilters: FilterRule[];
|
|
16
15
|
filterableFields: import("../../table.type").TableSchemaColumn[];
|
|
17
16
|
};
|