baaz-custom-components 5.1.2 → 5.2.0
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/index.css +56 -0
- package/dist/index.d.mts +40 -9
- package/dist/index.d.ts +40 -9
- package/dist/index.js +450 -142
- package/dist/index.mjs +443 -140
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -392,6 +392,9 @@
|
|
|
392
392
|
.-mx-1 {
|
|
393
393
|
margin-inline: calc(var(--spacing) * -1);
|
|
394
394
|
}
|
|
395
|
+
.mx-1 {
|
|
396
|
+
margin-inline: calc(var(--spacing) * 1);
|
|
397
|
+
}
|
|
395
398
|
.mx-2 {
|
|
396
399
|
margin-inline: calc(var(--spacing) * 2);
|
|
397
400
|
}
|
|
@@ -573,6 +576,9 @@
|
|
|
573
576
|
.min-h-0 {
|
|
574
577
|
min-height: calc(var(--spacing) * 0);
|
|
575
578
|
}
|
|
579
|
+
.min-h-\[48px\] {
|
|
580
|
+
min-height: 48px;
|
|
581
|
+
}
|
|
576
582
|
.\!w-0 {
|
|
577
583
|
width: calc(var(--spacing) * 0) !important;
|
|
578
584
|
}
|
|
@@ -645,6 +651,9 @@
|
|
|
645
651
|
.w-max {
|
|
646
652
|
width: max-content;
|
|
647
653
|
}
|
|
654
|
+
.w-px {
|
|
655
|
+
width: 1px;
|
|
656
|
+
}
|
|
648
657
|
.max-w-\(--skeleton-width\) {
|
|
649
658
|
max-width: var(--skeleton-width);
|
|
650
659
|
}
|
|
@@ -746,6 +755,9 @@
|
|
|
746
755
|
.touch-none {
|
|
747
756
|
touch-action: none;
|
|
748
757
|
}
|
|
758
|
+
.resize {
|
|
759
|
+
resize: both;
|
|
760
|
+
}
|
|
749
761
|
.scroll-my-1 {
|
|
750
762
|
scroll-margin-block: calc(var(--spacing) * 1);
|
|
751
763
|
}
|
|
@@ -826,6 +838,9 @@
|
|
|
826
838
|
.overflow-y-auto {
|
|
827
839
|
overflow-y: auto;
|
|
828
840
|
}
|
|
841
|
+
.rounded {
|
|
842
|
+
border-radius: 0.25rem;
|
|
843
|
+
}
|
|
829
844
|
.rounded-\[2px\] {
|
|
830
845
|
border-radius: 2px;
|
|
831
846
|
}
|
|
@@ -1015,6 +1030,12 @@
|
|
|
1015
1030
|
background-color: color-mix(in oklab, var(--primary) 30%, transparent);
|
|
1016
1031
|
}
|
|
1017
1032
|
}
|
|
1033
|
+
.bg-primary\/90 {
|
|
1034
|
+
background-color: var(--primary);
|
|
1035
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1036
|
+
background-color: color-mix(in oklab, var(--primary) 90%, transparent);
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1018
1039
|
.bg-red-700 {
|
|
1019
1040
|
background-color: var(--color-red-700);
|
|
1020
1041
|
}
|
|
@@ -1054,6 +1075,9 @@
|
|
|
1054
1075
|
.p-1 {
|
|
1055
1076
|
padding: calc(var(--spacing) * 1);
|
|
1056
1077
|
}
|
|
1078
|
+
.p-1\.5 {
|
|
1079
|
+
padding: calc(var(--spacing) * 1.5);
|
|
1080
|
+
}
|
|
1057
1081
|
.p-2 {
|
|
1058
1082
|
padding: calc(var(--spacing) * 2);
|
|
1059
1083
|
}
|
|
@@ -1315,6 +1339,9 @@
|
|
|
1315
1339
|
-webkit-font-smoothing: antialiased;
|
|
1316
1340
|
-moz-osx-font-smoothing: grayscale;
|
|
1317
1341
|
}
|
|
1342
|
+
.accent-primary {
|
|
1343
|
+
accent-color: var(--primary);
|
|
1344
|
+
}
|
|
1318
1345
|
.opacity-0 {
|
|
1319
1346
|
opacity: 0%;
|
|
1320
1347
|
}
|
|
@@ -1563,6 +1590,12 @@
|
|
|
1563
1590
|
--tw-enter-scale: calc(95*1%);
|
|
1564
1591
|
--tw-enter-scale: .95;
|
|
1565
1592
|
}
|
|
1593
|
+
.fade-in {
|
|
1594
|
+
--tw-enter-opacity: 0;
|
|
1595
|
+
}
|
|
1596
|
+
.slide-in-from-left-2 {
|
|
1597
|
+
--tw-enter-translate-x: calc(2*var(--spacing)*-1);
|
|
1598
|
+
}
|
|
1566
1599
|
.group-focus-within\/menu-item\:opacity-100 {
|
|
1567
1600
|
&:is(:where(.group\/menu-item):focus-within *) {
|
|
1568
1601
|
opacity: 100%;
|
|
@@ -1970,6 +2003,13 @@
|
|
|
1970
2003
|
}
|
|
1971
2004
|
}
|
|
1972
2005
|
}
|
|
2006
|
+
.hover\:bg-primary {
|
|
2007
|
+
&:hover {
|
|
2008
|
+
@media (hover: hover) {
|
|
2009
|
+
background-color: var(--primary);
|
|
2010
|
+
}
|
|
2011
|
+
}
|
|
2012
|
+
}
|
|
1973
2013
|
.hover\:bg-primary\/90 {
|
|
1974
2014
|
&:hover {
|
|
1975
2015
|
@media (hover: hover) {
|
|
@@ -2106,6 +2146,17 @@
|
|
|
2106
2146
|
color: var(--accent-foreground);
|
|
2107
2147
|
}
|
|
2108
2148
|
}
|
|
2149
|
+
.focus\:ring-1 {
|
|
2150
|
+
&:focus {
|
|
2151
|
+
--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
|
|
2152
|
+
box-shadow:
|
|
2153
|
+
var(--tw-inset-shadow),
|
|
2154
|
+
var(--tw-inset-ring-shadow),
|
|
2155
|
+
var(--tw-ring-offset-shadow),
|
|
2156
|
+
var(--tw-ring-shadow),
|
|
2157
|
+
var(--tw-shadow);
|
|
2158
|
+
}
|
|
2159
|
+
}
|
|
2109
2160
|
.focus\:ring-2 {
|
|
2110
2161
|
&:focus {
|
|
2111
2162
|
--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
|
|
@@ -2117,6 +2168,11 @@
|
|
|
2117
2168
|
var(--tw-shadow);
|
|
2118
2169
|
}
|
|
2119
2170
|
}
|
|
2171
|
+
.focus\:ring-primary {
|
|
2172
|
+
&:focus {
|
|
2173
|
+
--tw-ring-color: var(--primary);
|
|
2174
|
+
}
|
|
2175
|
+
}
|
|
2120
2176
|
.focus\:ring-ring {
|
|
2121
2177
|
&:focus {
|
|
2122
2178
|
--tw-ring-color: var(--ring);
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
2
|
+
import react__default, { ReactNode } from 'react';
|
|
3
3
|
import { IApi } from '@svar-ui/react-grid';
|
|
4
4
|
|
|
5
5
|
type NavbarData = NavbarEntry[];
|
|
@@ -84,11 +84,11 @@ type Filters = {
|
|
|
84
84
|
}[];
|
|
85
85
|
};
|
|
86
86
|
type GridProps = {
|
|
87
|
-
data:
|
|
87
|
+
data: AnyRow[];
|
|
88
|
+
select?: boolean;
|
|
88
89
|
columns: GridColumn[];
|
|
89
90
|
sortKey?: string | null;
|
|
90
91
|
sortOrder?: SortOrder | null;
|
|
91
|
-
onSortChange?: (key: string, order: SortOrder) => void;
|
|
92
92
|
multiselect?: boolean;
|
|
93
93
|
reorder?: boolean;
|
|
94
94
|
overlay?: React.FC | string;
|
|
@@ -102,14 +102,20 @@ type GridProps = {
|
|
|
102
102
|
searchkey: string;
|
|
103
103
|
searchValue: string;
|
|
104
104
|
loading: boolean;
|
|
105
|
+
filterList: Filters[];
|
|
106
|
+
initialFilters?: any[];
|
|
107
|
+
children?: React.ReactNode;
|
|
108
|
+
onSortChange?: (key: string, order: SortOrder) => void;
|
|
105
109
|
onExportPdf?: () => void;
|
|
106
110
|
onExportExcel?: () => void;
|
|
107
111
|
onSearch: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
108
|
-
filterList: Filters[];
|
|
109
112
|
onFilterChange?: (payload: MultiFilterPayload) => void;
|
|
110
113
|
onApiReady?: (api: IApi) => void;
|
|
111
|
-
|
|
112
|
-
|
|
114
|
+
onFocusCell?: (params: {
|
|
115
|
+
row?: string | number;
|
|
116
|
+
column?: string | number;
|
|
117
|
+
eventSource?: string;
|
|
118
|
+
}) => boolean | void;
|
|
113
119
|
};
|
|
114
120
|
type FilterCondition = ActiveFilter & {
|
|
115
121
|
id: string;
|
|
@@ -131,7 +137,32 @@ type ActiveFilter = {
|
|
|
131
137
|
value?: FilterValue;
|
|
132
138
|
};
|
|
133
139
|
|
|
134
|
-
|
|
140
|
+
type RowId = string | number;
|
|
141
|
+
type AnyRow = {
|
|
142
|
+
id: RowId;
|
|
143
|
+
[key: string]: any;
|
|
144
|
+
};
|
|
145
|
+
interface SelectionAction {
|
|
146
|
+
id: string;
|
|
147
|
+
label: string;
|
|
148
|
+
icon?: react__default.ReactNode;
|
|
149
|
+
needsConfirmation?: boolean;
|
|
150
|
+
}
|
|
151
|
+
interface GridSelectionProps {
|
|
152
|
+
selectionEnabled?: boolean;
|
|
153
|
+
selectedIds?: RowId[];
|
|
154
|
+
onRowSelectionChange?: (id: RowId, rowData: AnyRow, checked: boolean) => void;
|
|
155
|
+
onSelectAllPage?: (pageData: AnyRow[], checked: boolean) => void;
|
|
156
|
+
}
|
|
157
|
+
interface GridHeaderSelectionProps {
|
|
158
|
+
selectedCount?: number;
|
|
159
|
+
selectedData?: AnyRow[];
|
|
160
|
+
selectionActions?: SelectionAction[];
|
|
161
|
+
onSelectionAction?: (actionId: string, selectedData: AnyRow[]) => void;
|
|
162
|
+
onClearSelection?: () => void;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
declare const Grid: react.ForwardRefExoticComponent<GridProps & GridSelectionProps & GridHeaderSelectionProps & react.RefAttributes<IApi | null>>;
|
|
135
166
|
|
|
136
167
|
type Props = {
|
|
137
168
|
cell: {
|
|
@@ -142,7 +173,7 @@ type Props = {
|
|
|
142
173
|
sortOrder?: SortOrder | null;
|
|
143
174
|
onSortChange?: (key: string, order: SortOrder) => void;
|
|
144
175
|
};
|
|
145
|
-
declare
|
|
176
|
+
declare const _default: react__default.MemoExoticComponent<({ cell, sortKey, sortOrder, onSortChange }: Props) => react__default.JSX.Element>;
|
|
146
177
|
|
|
147
178
|
type Pagination$1 = {
|
|
148
179
|
totalCount: number;
|
|
@@ -176,4 +207,4 @@ interface SlideToolbarProps {
|
|
|
176
207
|
|
|
177
208
|
declare const SlideToolbar: React.FC<SlideToolbarProps>;
|
|
178
209
|
|
|
179
|
-
export { type BreadcrumbProps, CustomBreadcrumb, Grid, type GridProps, Navbar, type NavbarData, type NavbarEntry, type NavbarProps, type NotificationDataTypes, Pagination, type Pagination$1 as PaginationProps, type RouteTree, type RouterAdapter, SlideToolbar, type SlideToolbarProps, SortableHeaderCell, type ToolbarItem, type UserData };
|
|
210
|
+
export { type BreadcrumbProps, CustomBreadcrumb, Grid, type GridProps, Navbar, type NavbarData, type NavbarEntry, type NavbarProps, type NotificationDataTypes, Pagination, type Pagination$1 as PaginationProps, type RouteTree, type RouterAdapter, SlideToolbar, type SlideToolbarProps, _default as SortableHeaderCell, type ToolbarItem, type UserData };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
2
|
+
import react__default, { ReactNode } from 'react';
|
|
3
3
|
import { IApi } from '@svar-ui/react-grid';
|
|
4
4
|
|
|
5
5
|
type NavbarData = NavbarEntry[];
|
|
@@ -84,11 +84,11 @@ type Filters = {
|
|
|
84
84
|
}[];
|
|
85
85
|
};
|
|
86
86
|
type GridProps = {
|
|
87
|
-
data:
|
|
87
|
+
data: AnyRow[];
|
|
88
|
+
select?: boolean;
|
|
88
89
|
columns: GridColumn[];
|
|
89
90
|
sortKey?: string | null;
|
|
90
91
|
sortOrder?: SortOrder | null;
|
|
91
|
-
onSortChange?: (key: string, order: SortOrder) => void;
|
|
92
92
|
multiselect?: boolean;
|
|
93
93
|
reorder?: boolean;
|
|
94
94
|
overlay?: React.FC | string;
|
|
@@ -102,14 +102,20 @@ type GridProps = {
|
|
|
102
102
|
searchkey: string;
|
|
103
103
|
searchValue: string;
|
|
104
104
|
loading: boolean;
|
|
105
|
+
filterList: Filters[];
|
|
106
|
+
initialFilters?: any[];
|
|
107
|
+
children?: React.ReactNode;
|
|
108
|
+
onSortChange?: (key: string, order: SortOrder) => void;
|
|
105
109
|
onExportPdf?: () => void;
|
|
106
110
|
onExportExcel?: () => void;
|
|
107
111
|
onSearch: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
108
|
-
filterList: Filters[];
|
|
109
112
|
onFilterChange?: (payload: MultiFilterPayload) => void;
|
|
110
113
|
onApiReady?: (api: IApi) => void;
|
|
111
|
-
|
|
112
|
-
|
|
114
|
+
onFocusCell?: (params: {
|
|
115
|
+
row?: string | number;
|
|
116
|
+
column?: string | number;
|
|
117
|
+
eventSource?: string;
|
|
118
|
+
}) => boolean | void;
|
|
113
119
|
};
|
|
114
120
|
type FilterCondition = ActiveFilter & {
|
|
115
121
|
id: string;
|
|
@@ -131,7 +137,32 @@ type ActiveFilter = {
|
|
|
131
137
|
value?: FilterValue;
|
|
132
138
|
};
|
|
133
139
|
|
|
134
|
-
|
|
140
|
+
type RowId = string | number;
|
|
141
|
+
type AnyRow = {
|
|
142
|
+
id: RowId;
|
|
143
|
+
[key: string]: any;
|
|
144
|
+
};
|
|
145
|
+
interface SelectionAction {
|
|
146
|
+
id: string;
|
|
147
|
+
label: string;
|
|
148
|
+
icon?: react__default.ReactNode;
|
|
149
|
+
needsConfirmation?: boolean;
|
|
150
|
+
}
|
|
151
|
+
interface GridSelectionProps {
|
|
152
|
+
selectionEnabled?: boolean;
|
|
153
|
+
selectedIds?: RowId[];
|
|
154
|
+
onRowSelectionChange?: (id: RowId, rowData: AnyRow, checked: boolean) => void;
|
|
155
|
+
onSelectAllPage?: (pageData: AnyRow[], checked: boolean) => void;
|
|
156
|
+
}
|
|
157
|
+
interface GridHeaderSelectionProps {
|
|
158
|
+
selectedCount?: number;
|
|
159
|
+
selectedData?: AnyRow[];
|
|
160
|
+
selectionActions?: SelectionAction[];
|
|
161
|
+
onSelectionAction?: (actionId: string, selectedData: AnyRow[]) => void;
|
|
162
|
+
onClearSelection?: () => void;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
declare const Grid: react.ForwardRefExoticComponent<GridProps & GridSelectionProps & GridHeaderSelectionProps & react.RefAttributes<IApi | null>>;
|
|
135
166
|
|
|
136
167
|
type Props = {
|
|
137
168
|
cell: {
|
|
@@ -142,7 +173,7 @@ type Props = {
|
|
|
142
173
|
sortOrder?: SortOrder | null;
|
|
143
174
|
onSortChange?: (key: string, order: SortOrder) => void;
|
|
144
175
|
};
|
|
145
|
-
declare
|
|
176
|
+
declare const _default: react__default.MemoExoticComponent<({ cell, sortKey, sortOrder, onSortChange }: Props) => react__default.JSX.Element>;
|
|
146
177
|
|
|
147
178
|
type Pagination$1 = {
|
|
148
179
|
totalCount: number;
|
|
@@ -176,4 +207,4 @@ interface SlideToolbarProps {
|
|
|
176
207
|
|
|
177
208
|
declare const SlideToolbar: React.FC<SlideToolbarProps>;
|
|
178
209
|
|
|
179
|
-
export { type BreadcrumbProps, CustomBreadcrumb, Grid, type GridProps, Navbar, type NavbarData, type NavbarEntry, type NavbarProps, type NotificationDataTypes, Pagination, type Pagination$1 as PaginationProps, type RouteTree, type RouterAdapter, SlideToolbar, type SlideToolbarProps, SortableHeaderCell, type ToolbarItem, type UserData };
|
|
210
|
+
export { type BreadcrumbProps, CustomBreadcrumb, Grid, type GridProps, Navbar, type NavbarData, type NavbarEntry, type NavbarProps, type NotificationDataTypes, Pagination, type Pagination$1 as PaginationProps, type RouteTree, type RouterAdapter, SlideToolbar, type SlideToolbarProps, _default as SortableHeaderCell, type ToolbarItem, type UserData };
|