@chrome-consulting/krit-ui 0.0.49
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/README.md +69 -0
- package/dist/assets/index.d.ts +201 -0
- package/dist/components/ui/attachmentsSection.d.ts +54 -0
- package/dist/components/ui/badge.d.ts +32 -0
- package/dist/components/ui/badgeVariants.d.ts +6 -0
- package/dist/components/ui/banner.d.ts +60 -0
- package/dist/components/ui/bottom-menu.d.ts +41 -0
- package/dist/components/ui/button.d.ts +27 -0
- package/dist/components/ui/buttonVariants.d.ts +4 -0
- package/dist/components/ui/calendar.d.ts +18 -0
- package/dist/components/ui/card.d.ts +87 -0
- package/dist/components/ui/carousel.d.ts +52 -0
- package/dist/components/ui/checkbox.d.ts +30 -0
- package/dist/components/ui/collapsible-section.d.ts +37 -0
- package/dist/components/ui/collapsible.d.ts +18 -0
- package/dist/components/ui/command.d.ts +102 -0
- package/dist/components/ui/confirm-modal.d.ts +33 -0
- package/dist/components/ui/data-table.d.ts +94 -0
- package/dist/components/ui/date-picker.d.ts +69 -0
- package/dist/components/ui/dialog.d.ts +66 -0
- package/dist/components/ui/dot.d.ts +10 -0
- package/dist/components/ui/dropdown-menu.d.ts +67 -0
- package/dist/components/ui/file-input.d.ts +36 -0
- package/dist/components/ui/filters-column-header.d.ts +28 -0
- package/dist/components/ui/form.d.ts +86 -0
- package/dist/components/ui/form.lib.d.ts +23 -0
- package/dist/components/ui/header.d.ts +39 -0
- package/dist/components/ui/input.d.ts +30 -0
- package/dist/components/ui/label.d.ts +23 -0
- package/dist/components/ui/multi-select.d.ts +100 -0
- package/dist/components/ui/nav-panel.d.ts +52 -0
- package/dist/components/ui/nav.d.ts +52 -0
- package/dist/components/ui/network-error-message.d.ts +46 -0
- package/dist/components/ui/notification.d.ts +34 -0
- package/dist/components/ui/notificationVariants.d.ts +4 -0
- package/dist/components/ui/number-input.d.ts +149 -0
- package/dist/components/ui/page-layout.d.ts +28 -0
- package/dist/components/ui/page-view-mode-toggle.d.ts +22 -0
- package/dist/components/ui/pagination.d.ts +121 -0
- package/dist/components/ui/popover.d.ts +36 -0
- package/dist/components/ui/post-card.d.ts +273 -0
- package/dist/components/ui/preloader.d.ts +23 -0
- package/dist/components/ui/previewFull.d.ts +40 -0
- package/dist/components/ui/previews.d.ts +69 -0
- package/dist/components/ui/previewsCompactList.d.ts +18 -0
- package/dist/components/ui/previewsShared.d.ts +8 -0
- package/dist/components/ui/profile.d.ts +41 -0
- package/dist/components/ui/radio-group.d.ts +48 -0
- package/dist/components/ui/resizable.d.ts +65 -0
- package/dist/components/ui/scroll-area.d.ts +5 -0
- package/dist/components/ui/secondary-panel-section.d.ts +20 -0
- package/dist/components/ui/segmented-control.d.ts +35 -0
- package/dist/components/ui/select-header-filter.d.ts +23 -0
- package/dist/components/ui/select.d.ts +91 -0
- package/dist/components/ui/separator.d.ts +34 -0
- package/dist/components/ui/sheet.d.ts +118 -0
- package/dist/components/ui/skeleton.d.ts +24 -0
- package/dist/components/ui/sort-component.d.ts +46 -0
- package/dist/components/ui/sortable-header.d.ts +12 -0
- package/dist/components/ui/switch.d.ts +25 -0
- package/dist/components/ui/table.d.ts +104 -0
- package/dist/components/ui/tabs.d.ts +52 -0
- package/dist/components/ui/tabsVariants.d.ts +6 -0
- package/dist/components/ui/text-area.d.ts +37 -0
- package/dist/components/ui/theme-provider.d.ts +136 -0
- package/dist/components/ui/time-picker.d.ts +29 -0
- package/dist/components/ui/time-picker.lib.d.ts +6 -0
- package/dist/components/ui/toast.d.ts +80 -0
- package/dist/components/ui/toaster.d.ts +22 -0
- package/dist/components/ui/tooltip.d.ts +65 -0
- package/dist/components/ui/tree-view.d.ts +96 -0
- package/dist/components/ui/widget-plan-fact.d.ts +86 -0
- package/dist/date.d.ts +8 -0
- package/dist/hooks/useColumnFilters.d.ts +6 -0
- package/dist/hooks/useColumnSizing.d.ts +20 -0
- package/dist/hooks/useCombinedRefs.d.ts +1 -0
- package/dist/hooks/useConfirm.d.ts +49 -0
- package/dist/hooks/useNotify.d.ts +28 -0
- package/dist/hooks/usePreviewsFilePicker.d.ts +40 -0
- package/dist/hooks/useSidebar.d.ts +10 -0
- package/dist/hooks/useStoredExpand.d.ts +18 -0
- package/dist/hooks/useStoredFields.d.ts +4 -0
- package/dist/hooks/useStoredTabs.d.ts +4 -0
- package/dist/hooks/useTableStates.d.ts +26 -0
- package/dist/hooks/useTheme.d.ts +1 -0
- package/dist/hooks/useToast.d.ts +44 -0
- package/dist/hooks/useTranslation.d.ts +4 -0
- package/dist/krit-ui.d.ts +2 -0
- package/dist/krit-ui.js +27485 -0
- package/dist/krit-ui.umd.cjs +140 -0
- package/dist/lib/attachments.d.ts +245 -0
- package/dist/lib/cookies.d.ts +1 -0
- package/dist/lib/file.d.ts +52 -0
- package/dist/lib/infinite-scroll.d.ts +13 -0
- package/dist/lib/selectUtils.d.ts +14 -0
- package/dist/lib/text.d.ts +1 -0
- package/dist/lib/zod.d.ts +27 -0
- package/dist/main.d.ts +85 -0
- package/dist/style.css +1 -0
- package/dist/utils.d.ts +2 -0
- package/package.json +122 -0
- package/tailwind.config.cjs +273 -0
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const attachmentItemSchema: z.ZodUnion<[z.ZodObject<{
|
|
3
|
+
id: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
4
|
+
contentType: z.ZodString;
|
|
5
|
+
url: z.ZodOptional<z.ZodString>;
|
|
6
|
+
file: z.ZodOptional<z.ZodType<File, z.ZodTypeDef, File>>;
|
|
7
|
+
fileName: z.ZodOptional<z.ZodString>;
|
|
8
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
isMain: z.ZodOptional<z.ZodBoolean>;
|
|
10
|
+
inProgress: z.ZodOptional<z.ZodBoolean>;
|
|
11
|
+
downloadUrl: z.ZodOptional<z.ZodString>;
|
|
12
|
+
previewUrl: z.ZodOptional<z.ZodString>;
|
|
13
|
+
onDownload: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnknown>>;
|
|
14
|
+
onRemove: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnknown>>;
|
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
id: string | number;
|
|
17
|
+
contentType: string;
|
|
18
|
+
size?: number | undefined;
|
|
19
|
+
url?: string | undefined;
|
|
20
|
+
onRemove?: ((...args: unknown[]) => unknown) | undefined;
|
|
21
|
+
file?: File | undefined;
|
|
22
|
+
fileName?: string | undefined;
|
|
23
|
+
isMain?: boolean | undefined;
|
|
24
|
+
inProgress?: boolean | undefined;
|
|
25
|
+
downloadUrl?: string | undefined;
|
|
26
|
+
previewUrl?: string | undefined;
|
|
27
|
+
onDownload?: ((...args: unknown[]) => unknown) | undefined;
|
|
28
|
+
}, {
|
|
29
|
+
id: string | number;
|
|
30
|
+
contentType: string;
|
|
31
|
+
size?: number | undefined;
|
|
32
|
+
url?: string | undefined;
|
|
33
|
+
onRemove?: ((...args: unknown[]) => unknown) | undefined;
|
|
34
|
+
file?: File | undefined;
|
|
35
|
+
fileName?: string | undefined;
|
|
36
|
+
isMain?: boolean | undefined;
|
|
37
|
+
inProgress?: boolean | undefined;
|
|
38
|
+
downloadUrl?: string | undefined;
|
|
39
|
+
previewUrl?: string | undefined;
|
|
40
|
+
onDownload?: ((...args: unknown[]) => unknown) | undefined;
|
|
41
|
+
}>, z.ZodObject<{
|
|
42
|
+
id: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
43
|
+
contentType: z.ZodString;
|
|
44
|
+
url: z.ZodOptional<z.ZodString>;
|
|
45
|
+
file: z.ZodType<File, z.ZodTypeDef, File>;
|
|
46
|
+
fileName: z.ZodOptional<z.ZodString>;
|
|
47
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
48
|
+
isMain: z.ZodOptional<z.ZodBoolean>;
|
|
49
|
+
inProgress: z.ZodOptional<z.ZodBoolean>;
|
|
50
|
+
downloadUrl: z.ZodOptional<z.ZodString>;
|
|
51
|
+
previewUrl: z.ZodOptional<z.ZodString>;
|
|
52
|
+
onDownload: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnknown>>;
|
|
53
|
+
onRemove: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnknown>>;
|
|
54
|
+
}, "strip", z.ZodTypeAny, {
|
|
55
|
+
id: string | number;
|
|
56
|
+
file: File;
|
|
57
|
+
contentType: string;
|
|
58
|
+
size?: number | undefined;
|
|
59
|
+
url?: string | undefined;
|
|
60
|
+
onRemove?: ((...args: unknown[]) => unknown) | undefined;
|
|
61
|
+
fileName?: string | undefined;
|
|
62
|
+
isMain?: boolean | undefined;
|
|
63
|
+
inProgress?: boolean | undefined;
|
|
64
|
+
downloadUrl?: string | undefined;
|
|
65
|
+
previewUrl?: string | undefined;
|
|
66
|
+
onDownload?: ((...args: unknown[]) => unknown) | undefined;
|
|
67
|
+
}, {
|
|
68
|
+
id: string | number;
|
|
69
|
+
file: File;
|
|
70
|
+
contentType: string;
|
|
71
|
+
size?: number | undefined;
|
|
72
|
+
url?: string | undefined;
|
|
73
|
+
onRemove?: ((...args: unknown[]) => unknown) | undefined;
|
|
74
|
+
fileName?: string | undefined;
|
|
75
|
+
isMain?: boolean | undefined;
|
|
76
|
+
inProgress?: boolean | undefined;
|
|
77
|
+
downloadUrl?: string | undefined;
|
|
78
|
+
previewUrl?: string | undefined;
|
|
79
|
+
onDownload?: ((...args: unknown[]) => unknown) | undefined;
|
|
80
|
+
}>]>;
|
|
81
|
+
export type AttachmentItem = z.infer<typeof attachmentItemSchema>;
|
|
82
|
+
export declare const attachmentsSchema: z.ZodArray<z.ZodObject<{
|
|
83
|
+
label: z.ZodString;
|
|
84
|
+
items: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
85
|
+
id: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
86
|
+
contentType: z.ZodString;
|
|
87
|
+
url: z.ZodOptional<z.ZodString>;
|
|
88
|
+
file: z.ZodOptional<z.ZodType<File, z.ZodTypeDef, File>>;
|
|
89
|
+
fileName: z.ZodOptional<z.ZodString>;
|
|
90
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
91
|
+
isMain: z.ZodOptional<z.ZodBoolean>;
|
|
92
|
+
inProgress: z.ZodOptional<z.ZodBoolean>;
|
|
93
|
+
downloadUrl: z.ZodOptional<z.ZodString>;
|
|
94
|
+
previewUrl: z.ZodOptional<z.ZodString>;
|
|
95
|
+
onDownload: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnknown>>;
|
|
96
|
+
onRemove: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnknown>>;
|
|
97
|
+
}, "strip", z.ZodTypeAny, {
|
|
98
|
+
id: string | number;
|
|
99
|
+
contentType: string;
|
|
100
|
+
size?: number | undefined;
|
|
101
|
+
url?: string | undefined;
|
|
102
|
+
onRemove?: ((...args: unknown[]) => unknown) | undefined;
|
|
103
|
+
file?: File | undefined;
|
|
104
|
+
fileName?: string | undefined;
|
|
105
|
+
isMain?: boolean | undefined;
|
|
106
|
+
inProgress?: boolean | undefined;
|
|
107
|
+
downloadUrl?: string | undefined;
|
|
108
|
+
previewUrl?: string | undefined;
|
|
109
|
+
onDownload?: ((...args: unknown[]) => unknown) | undefined;
|
|
110
|
+
}, {
|
|
111
|
+
id: string | number;
|
|
112
|
+
contentType: string;
|
|
113
|
+
size?: number | undefined;
|
|
114
|
+
url?: string | undefined;
|
|
115
|
+
onRemove?: ((...args: unknown[]) => unknown) | undefined;
|
|
116
|
+
file?: File | undefined;
|
|
117
|
+
fileName?: string | undefined;
|
|
118
|
+
isMain?: boolean | undefined;
|
|
119
|
+
inProgress?: boolean | undefined;
|
|
120
|
+
downloadUrl?: string | undefined;
|
|
121
|
+
previewUrl?: string | undefined;
|
|
122
|
+
onDownload?: ((...args: unknown[]) => unknown) | undefined;
|
|
123
|
+
}>, z.ZodObject<{
|
|
124
|
+
id: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
125
|
+
contentType: z.ZodString;
|
|
126
|
+
url: z.ZodOptional<z.ZodString>;
|
|
127
|
+
file: z.ZodType<File, z.ZodTypeDef, File>;
|
|
128
|
+
fileName: z.ZodOptional<z.ZodString>;
|
|
129
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
130
|
+
isMain: z.ZodOptional<z.ZodBoolean>;
|
|
131
|
+
inProgress: z.ZodOptional<z.ZodBoolean>;
|
|
132
|
+
downloadUrl: z.ZodOptional<z.ZodString>;
|
|
133
|
+
previewUrl: z.ZodOptional<z.ZodString>;
|
|
134
|
+
onDownload: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnknown>>;
|
|
135
|
+
onRemove: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnknown>>;
|
|
136
|
+
}, "strip", z.ZodTypeAny, {
|
|
137
|
+
id: string | number;
|
|
138
|
+
file: File;
|
|
139
|
+
contentType: string;
|
|
140
|
+
size?: number | undefined;
|
|
141
|
+
url?: string | undefined;
|
|
142
|
+
onRemove?: ((...args: unknown[]) => unknown) | undefined;
|
|
143
|
+
fileName?: string | undefined;
|
|
144
|
+
isMain?: boolean | undefined;
|
|
145
|
+
inProgress?: boolean | undefined;
|
|
146
|
+
downloadUrl?: string | undefined;
|
|
147
|
+
previewUrl?: string | undefined;
|
|
148
|
+
onDownload?: ((...args: unknown[]) => unknown) | undefined;
|
|
149
|
+
}, {
|
|
150
|
+
id: string | number;
|
|
151
|
+
file: File;
|
|
152
|
+
contentType: string;
|
|
153
|
+
size?: number | undefined;
|
|
154
|
+
url?: string | undefined;
|
|
155
|
+
onRemove?: ((...args: unknown[]) => unknown) | undefined;
|
|
156
|
+
fileName?: string | undefined;
|
|
157
|
+
isMain?: boolean | undefined;
|
|
158
|
+
inProgress?: boolean | undefined;
|
|
159
|
+
downloadUrl?: string | undefined;
|
|
160
|
+
previewUrl?: string | undefined;
|
|
161
|
+
onDownload?: ((...args: unknown[]) => unknown) | undefined;
|
|
162
|
+
}>]>, "many">;
|
|
163
|
+
disableIfEmpty: z.ZodOptional<z.ZodBoolean>;
|
|
164
|
+
hideIfEmpty: z.ZodOptional<z.ZodBoolean>;
|
|
165
|
+
canAdd: z.ZodOptional<z.ZodBoolean>;
|
|
166
|
+
maxFiles: z.ZodOptional<z.ZodNumber>;
|
|
167
|
+
}, "strip", z.ZodTypeAny, {
|
|
168
|
+
label: string;
|
|
169
|
+
items: ({
|
|
170
|
+
id: string | number;
|
|
171
|
+
contentType: string;
|
|
172
|
+
size?: number | undefined;
|
|
173
|
+
url?: string | undefined;
|
|
174
|
+
onRemove?: ((...args: unknown[]) => unknown) | undefined;
|
|
175
|
+
file?: File | undefined;
|
|
176
|
+
fileName?: string | undefined;
|
|
177
|
+
isMain?: boolean | undefined;
|
|
178
|
+
inProgress?: boolean | undefined;
|
|
179
|
+
downloadUrl?: string | undefined;
|
|
180
|
+
previewUrl?: string | undefined;
|
|
181
|
+
onDownload?: ((...args: unknown[]) => unknown) | undefined;
|
|
182
|
+
} | {
|
|
183
|
+
id: string | number;
|
|
184
|
+
file: File;
|
|
185
|
+
contentType: string;
|
|
186
|
+
size?: number | undefined;
|
|
187
|
+
url?: string | undefined;
|
|
188
|
+
onRemove?: ((...args: unknown[]) => unknown) | undefined;
|
|
189
|
+
fileName?: string | undefined;
|
|
190
|
+
isMain?: boolean | undefined;
|
|
191
|
+
inProgress?: boolean | undefined;
|
|
192
|
+
downloadUrl?: string | undefined;
|
|
193
|
+
previewUrl?: string | undefined;
|
|
194
|
+
onDownload?: ((...args: unknown[]) => unknown) | undefined;
|
|
195
|
+
})[];
|
|
196
|
+
disableIfEmpty?: boolean | undefined;
|
|
197
|
+
hideIfEmpty?: boolean | undefined;
|
|
198
|
+
canAdd?: boolean | undefined;
|
|
199
|
+
maxFiles?: number | undefined;
|
|
200
|
+
}, {
|
|
201
|
+
label: string;
|
|
202
|
+
items: ({
|
|
203
|
+
id: string | number;
|
|
204
|
+
contentType: string;
|
|
205
|
+
size?: number | undefined;
|
|
206
|
+
url?: string | undefined;
|
|
207
|
+
onRemove?: ((...args: unknown[]) => unknown) | undefined;
|
|
208
|
+
file?: File | undefined;
|
|
209
|
+
fileName?: string | undefined;
|
|
210
|
+
isMain?: boolean | undefined;
|
|
211
|
+
inProgress?: boolean | undefined;
|
|
212
|
+
downloadUrl?: string | undefined;
|
|
213
|
+
previewUrl?: string | undefined;
|
|
214
|
+
onDownload?: ((...args: unknown[]) => unknown) | undefined;
|
|
215
|
+
} | {
|
|
216
|
+
id: string | number;
|
|
217
|
+
file: File;
|
|
218
|
+
contentType: string;
|
|
219
|
+
size?: number | undefined;
|
|
220
|
+
url?: string | undefined;
|
|
221
|
+
onRemove?: ((...args: unknown[]) => unknown) | undefined;
|
|
222
|
+
fileName?: string | undefined;
|
|
223
|
+
isMain?: boolean | undefined;
|
|
224
|
+
inProgress?: boolean | undefined;
|
|
225
|
+
downloadUrl?: string | undefined;
|
|
226
|
+
previewUrl?: string | undefined;
|
|
227
|
+
onDownload?: ((...args: unknown[]) => unknown) | undefined;
|
|
228
|
+
})[];
|
|
229
|
+
disableIfEmpty?: boolean | undefined;
|
|
230
|
+
hideIfEmpty?: boolean | undefined;
|
|
231
|
+
canAdd?: boolean | undefined;
|
|
232
|
+
maxFiles?: number | undefined;
|
|
233
|
+
}>, "many">;
|
|
234
|
+
export type Attachments = z.infer<typeof attachmentsSchema>;
|
|
235
|
+
export type ContentType = 'video' | 'audio' | 'image' | 'pdf' | 'word' | 'excel' | 'archive';
|
|
236
|
+
export declare const defaultAccepts: ContentType[];
|
|
237
|
+
export declare const acceptMap: Map<string, string>;
|
|
238
|
+
export declare const MAX_TOTAL_SIZE_MB = 40;
|
|
239
|
+
export declare const MAX_VIDEO_SIZE_MB = 20;
|
|
240
|
+
export declare const MAX_AUDIO_SIZE_MB = 10;
|
|
241
|
+
export declare const MAX_PDF_SIZE_MB = 1;
|
|
242
|
+
export declare const MAX_IMAGE_SIZE_MB = 1;
|
|
243
|
+
export declare const MAX_WORD_SIZE_MB = 20;
|
|
244
|
+
export declare const MAX_EXCEL_SIZE_MB = 20;
|
|
245
|
+
export declare const MAX_ARCHIVE_SIZE_MB = 20;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const cookies: (text?: string) => Map<string, string>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/** Двоичный мегабайт (1024² байт) */
|
|
2
|
+
export declare const MB_IN_BYTES: number;
|
|
3
|
+
/** Переводит мегабайты в байты */
|
|
4
|
+
export declare const mbToBytes: (mb?: number) => number;
|
|
5
|
+
/** Размер в МБ для отображения, два знака после запятой */
|
|
6
|
+
export declare const bytesToMb: (bytes?: number) => string;
|
|
7
|
+
export declare const compressImage: (file: File, { quality, type }?: {
|
|
8
|
+
quality?: number | undefined;
|
|
9
|
+
type?: string | undefined;
|
|
10
|
+
}) => Promise<File>;
|
|
11
|
+
export declare const compressFile: (file: File, { quality, type }?: {
|
|
12
|
+
quality?: number | undefined;
|
|
13
|
+
type?: string | undefined;
|
|
14
|
+
}) => Promise<File>;
|
|
15
|
+
export type ValidateFileResult = {
|
|
16
|
+
ok: true;
|
|
17
|
+
} | {
|
|
18
|
+
ok: false;
|
|
19
|
+
fileTypeError?: string;
|
|
20
|
+
fileSizeError?: string;
|
|
21
|
+
};
|
|
22
|
+
export declare const validateFileSize: (file: File, maxFileSize: number) => ValidateFileResult;
|
|
23
|
+
export declare const validateFileType: (file: File, validTypes: string) => Promise<ValidateFileResult>;
|
|
24
|
+
export declare const validateFile: (file: File, validTypes: string, maxFileSize?: number) => Promise<ValidateFileResult>;
|
|
25
|
+
export declare const getFileThumbnail: (file: File) => string | Promise<string> | undefined;
|
|
26
|
+
export declare const filesToAttachments: (files: File[]) => Promise<({
|
|
27
|
+
id: string | number;
|
|
28
|
+
contentType: string;
|
|
29
|
+
size?: number | undefined;
|
|
30
|
+
url?: string | undefined;
|
|
31
|
+
onRemove?: ((...args: unknown[]) => unknown) | undefined;
|
|
32
|
+
file?: File | undefined;
|
|
33
|
+
fileName?: string | undefined;
|
|
34
|
+
isMain?: boolean | undefined;
|
|
35
|
+
inProgress?: boolean | undefined;
|
|
36
|
+
downloadUrl?: string | undefined;
|
|
37
|
+
previewUrl?: string | undefined;
|
|
38
|
+
onDownload?: ((...args: unknown[]) => unknown) | undefined;
|
|
39
|
+
} | {
|
|
40
|
+
id: string | number;
|
|
41
|
+
file: File;
|
|
42
|
+
contentType: string;
|
|
43
|
+
size?: number | undefined;
|
|
44
|
+
url?: string | undefined;
|
|
45
|
+
onRemove?: ((...args: unknown[]) => unknown) | undefined;
|
|
46
|
+
fileName?: string | undefined;
|
|
47
|
+
isMain?: boolean | undefined;
|
|
48
|
+
inProgress?: boolean | undefined;
|
|
49
|
+
downloadUrl?: string | undefined;
|
|
50
|
+
previewUrl?: string | undefined;
|
|
51
|
+
onDownload?: ((...args: unknown[]) => unknown) | undefined;
|
|
52
|
+
})[]>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type InfiniteScrollProps = {
|
|
3
|
+
loading?: boolean;
|
|
4
|
+
hasMore?: boolean;
|
|
5
|
+
next: () => unknown;
|
|
6
|
+
threshold?: number;
|
|
7
|
+
root?: Element | Document | null;
|
|
8
|
+
rootMargin?: string;
|
|
9
|
+
reverse?: boolean;
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
};
|
|
12
|
+
export declare const InfiniteScroll: ({ loading, hasMore, next, threshold, root, rootMargin, reverse, children, }: InfiniteScrollProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { OptionType } from '../components/ui/select';
|
|
2
|
+
type DataItem = {
|
|
3
|
+
[key: string]: string | number | boolean | object;
|
|
4
|
+
};
|
|
5
|
+
export declare function toOptions<T extends DataItem>({ data, idField, nameField, additionalNameField, labelTemplate, lockedValues, lowerCaseValues, }: {
|
|
6
|
+
data: T[] | undefined;
|
|
7
|
+
idField: keyof T;
|
|
8
|
+
nameField?: keyof T;
|
|
9
|
+
additionalNameField?: keyof T;
|
|
10
|
+
labelTemplate?: string;
|
|
11
|
+
lockedValues?: string[] | undefined;
|
|
12
|
+
lowerCaseValues?: boolean;
|
|
13
|
+
}): OptionType[];
|
|
14
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const renderTextWithBoldMarkdown: (text: string) => string | (string | import("react/jsx-runtime").JSX.Element)[];
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { default as i18next } from 'i18next';
|
|
2
|
+
import { ZodErrorMap } from 'zod';
|
|
3
|
+
export type MakeZodI18nMap = (option?: ZodI18nMapOption) => ZodErrorMap;
|
|
4
|
+
export type ZodI18nMapOption = {
|
|
5
|
+
t?: (typeof i18next)['t'];
|
|
6
|
+
ns?: string | readonly string[];
|
|
7
|
+
handlePath?: {
|
|
8
|
+
keyPrefix?: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export interface RefineOptions {
|
|
12
|
+
params: {
|
|
13
|
+
i18n: {
|
|
14
|
+
key: string;
|
|
15
|
+
values?: Record<string, string>;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export declare const getRefineArgs: <T = string>(checker: (value: T) => unknown, tKey: string, { count }?: {
|
|
20
|
+
count?: number;
|
|
21
|
+
}) => [(value: T) => unknown, RefineOptions];
|
|
22
|
+
export declare const zRequired: <T = unknown>(tKey: string, { count }?: {
|
|
23
|
+
count?: number;
|
|
24
|
+
}) => [(value: T) => unknown, RefineOptions];
|
|
25
|
+
export declare const zMin: <T>(tKey: string, { count }?: {
|
|
26
|
+
count?: number;
|
|
27
|
+
}) => [(value: T) => unknown, RefineOptions];
|
package/dist/main.d.ts
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
export * from './components/ui/badge';
|
|
2
|
+
export * from './components/ui/badgeVariants';
|
|
3
|
+
export * from './components/ui/button';
|
|
4
|
+
export * from './components/ui/buttonVariants';
|
|
5
|
+
export * from './components/ui/calendar';
|
|
6
|
+
export * from './components/ui/card';
|
|
7
|
+
export * from './components/ui/checkbox';
|
|
8
|
+
export * from './components/ui/collapsible-section';
|
|
9
|
+
export * from './components/ui/collapsible';
|
|
10
|
+
export * from './components/ui/command';
|
|
11
|
+
export * from './components/ui/data-table';
|
|
12
|
+
export * from './components/ui/date-picker';
|
|
13
|
+
export * from './components/ui/dialog';
|
|
14
|
+
export * from './components/ui/dot';
|
|
15
|
+
export * from './components/ui/dropdown-menu';
|
|
16
|
+
export * from './components/ui/form.lib';
|
|
17
|
+
export * from './components/ui/form';
|
|
18
|
+
export * from './components/ui/input';
|
|
19
|
+
export * from './components/ui/label';
|
|
20
|
+
export * from './components/ui/network-error-message';
|
|
21
|
+
export * from './components/ui/notification';
|
|
22
|
+
export * from './components/ui/notificationVariants';
|
|
23
|
+
export * from './components/ui/popover';
|
|
24
|
+
export * from './components/ui/post-card';
|
|
25
|
+
export * from './components/ui/preloader';
|
|
26
|
+
export * from './components/ui/pagination';
|
|
27
|
+
export * from './components/ui/profile';
|
|
28
|
+
export * from './components/ui/select';
|
|
29
|
+
export * from './components/ui/table';
|
|
30
|
+
export * from './components/ui/tree-view';
|
|
31
|
+
export * from './components/ui/toast';
|
|
32
|
+
export * from './components/ui/toaster';
|
|
33
|
+
export * from './components/ui/separator';
|
|
34
|
+
export * from './components/ui/sortable-header';
|
|
35
|
+
export * from './components/ui/file-input';
|
|
36
|
+
export * from './components/ui/text-area';
|
|
37
|
+
export * from './components/ui/switch';
|
|
38
|
+
export * from './components/ui/previews';
|
|
39
|
+
export * from './components/ui/previewsCompactList';
|
|
40
|
+
export * from './components/ui/multi-select';
|
|
41
|
+
export * from './components/ui/resizable';
|
|
42
|
+
export * from './components/ui/theme-provider';
|
|
43
|
+
export * from './components/ui/header';
|
|
44
|
+
export * from './components/ui/page-layout';
|
|
45
|
+
export * from './components/ui/tabs';
|
|
46
|
+
export * from './components/ui/confirm-modal';
|
|
47
|
+
export * from './components/ui/nav';
|
|
48
|
+
export * from './components/ui/nav-panel';
|
|
49
|
+
export * from './components/ui/tooltip';
|
|
50
|
+
export * from './components/ui/segmented-control';
|
|
51
|
+
export * from './components/ui/radio-group';
|
|
52
|
+
export * from './components/ui/banner';
|
|
53
|
+
export * from './components/ui/bottom-menu';
|
|
54
|
+
export * from './components/ui/attachmentsSection';
|
|
55
|
+
export * from './components/ui/time-picker';
|
|
56
|
+
export * from './components/ui/carousel';
|
|
57
|
+
export * from './components/ui/filters-column-header';
|
|
58
|
+
export * from './components/ui/number-input';
|
|
59
|
+
export * from './components/ui/sheet';
|
|
60
|
+
export * from './components/ui/scroll-area';
|
|
61
|
+
export * from './components/ui/secondary-panel-section';
|
|
62
|
+
export * from './components/ui/widget-plan-fact';
|
|
63
|
+
export * from './components/ui/sort-component';
|
|
64
|
+
export * from './components/ui/page-view-mode-toggle';
|
|
65
|
+
export * from './utils';
|
|
66
|
+
export * from './hooks/useToast';
|
|
67
|
+
export * from './hooks/useNotify';
|
|
68
|
+
export * from './hooks/useTheme';
|
|
69
|
+
export * from './hooks/useConfirm';
|
|
70
|
+
export * from './hooks/usePreviewsFilePicker';
|
|
71
|
+
export * from './hooks/useCombinedRefs';
|
|
72
|
+
export * from './lib/file';
|
|
73
|
+
export * from './lib/zod';
|
|
74
|
+
export * from './hooks/useSidebar';
|
|
75
|
+
export * from './lib/cookies';
|
|
76
|
+
export * from './hooks/useStoredTabs';
|
|
77
|
+
export * from './hooks/useStoredExpand';
|
|
78
|
+
export * from './hooks/useColumnSizing';
|
|
79
|
+
export * from './hooks/useTableStates';
|
|
80
|
+
export * from './hooks/useStoredFields';
|
|
81
|
+
export * from './lib/attachments';
|
|
82
|
+
export * from './hooks/useColumnFilters';
|
|
83
|
+
export * from './lib/selectUtils';
|
|
84
|
+
export * from './assets';
|
|
85
|
+
export { Loader2 } from 'lucide-react';
|