@pan-stack/ui 0.0.0-stage → 0.2.31

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.
@@ -0,0 +1,4428 @@
1
+ import { Accordion as Accordion$1, AlertDialog as AlertDialog$1, AspectRatio as AspectRatio$1, Avatar as Avatar$1, Separator as Separator$1, Checkbox as Checkbox$1, Collapsible as Collapsible$1, Dialog as Dialog$1, ContextMenu as ContextMenu$1, Direction, DropdownMenu as DropdownMenu$1, Label as Label$1, RadioGroup as RadioGroup$1, Select as Select$1, Switch as Switch$1, HoverCard as HoverCard$1, Menubar as Menubar$1, NavigationMenu as NavigationMenu$1, Popover as Popover$1, Progress as Progress$1, ScrollArea as ScrollArea$1, Tooltip as Tooltip$1, Slider as Slider$1, Tabs as Tabs$1, Toggle as Toggle$1, ToggleGroup as ToggleGroup$1 } from 'radix-ui';
2
+ import * as React$1 from 'react';
3
+ import React__default, { ReactNode, ComponentProps, SVGProps } from 'react';
4
+ import * as class_variance_authority_types from 'class-variance-authority/types';
5
+ import { VariantProps } from 'class-variance-authority';
6
+ import { DayPicker, DayButton, Locale } from 'react-day-picker';
7
+ import useEmblaCarousel, { UseEmblaCarouselType } from 'embla-carousel-react';
8
+ import * as RechartsPrimitive from 'recharts';
9
+ import { Combobox as Combobox$1 } from '@base-ui/react';
10
+ import { Command as Command$1 } from 'cmdk';
11
+ import { Drawer as Drawer$1 } from 'vaul';
12
+ import { FieldValues, FieldPath, ControllerProps } from 'react-hook-form';
13
+ import { LucideIcon } from 'lucide-react';
14
+ import { OTPInput } from 'input-otp';
15
+ import * as ResizablePrimitive from 'react-resizable-panels';
16
+ import { ToasterProps, toast as toast$1 } from 'sonner';
17
+ import { ItemInstance } from '@headless-tree/core';
18
+ import { ThemeProvider as ThemeProvider$1 } from 'next-themes';
19
+ import * as _tanstack_react_table from '@tanstack/react-table';
20
+ import { Column, Table as Table$1, Row as Row$5, VisibilityState, ColumnFiltersState, PaginationState, SortingState, ColumnDef } from '@tanstack/react-table';
21
+ export { createColumnHelper } from '@tanstack/react-table';
22
+ import { Editor, JSONContent } from '@tiptap/react';
23
+ import { SuggestionOptions } from '@tiptap/suggestion';
24
+ import { AnyExtension } from '@tiptap/core';
25
+ import { i18n, Resource } from 'i18next';
26
+ export { i18n as I18n, default as i18n } from 'i18next';
27
+ export { I18nextProvider, useTranslation } from 'react-i18next';
28
+ import { ClassValue } from 'clsx';
29
+
30
+ declare function Accordion({ className, ...props }: React$1.ComponentProps<typeof Accordion$1.Root>): React$1.JSX.Element;
31
+ declare function AccordionItem({ className, ...props }: React$1.ComponentProps<typeof Accordion$1.Item>): React$1.JSX.Element;
32
+ declare function AccordionTrigger({ className, children, ...props }: React$1.ComponentProps<typeof Accordion$1.Trigger>): React$1.JSX.Element;
33
+ declare function AccordionContent({ className, children, ...props }: React$1.ComponentProps<typeof Accordion$1.Content>): React$1.JSX.Element;
34
+
35
+ declare const buttonVariants: (props?: ({
36
+ variant?: "default" | "destructive" | "secondary" | "outline" | "ghost" | "link" | "warning" | "success" | null | undefined;
37
+ size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
38
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
39
+ declare function Button({ className, variant, size, asChild, tooltip, showTooltip, 'aria-label': ariaLabel, title, disabled, ...props }: React$1.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
40
+ asChild?: boolean;
41
+ tooltip?: string;
42
+ showTooltip?: boolean;
43
+ }): React$1.JSX.Element;
44
+ type BaseButtonProps = React$1.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
45
+ tooltip?: string;
46
+ isAllow?: boolean;
47
+ icon?: React$1.ReactNode;
48
+ showTooltip?: boolean;
49
+ show?: boolean;
50
+ loading?: boolean;
51
+ variant?: 'destructive' | 'default' | 'warning' | 'success' | 'secondary' | 'outline' | 'ghost' | 'link';
52
+ };
53
+
54
+ declare function AlertDialog({ ...props }: React$1.ComponentProps<typeof AlertDialog$1.Root>): React$1.JSX.Element;
55
+ declare function AlertDialogTrigger({ ...props }: React$1.ComponentProps<typeof AlertDialog$1.Trigger>): React$1.JSX.Element;
56
+ declare function AlertDialogPortal({ ...props }: React$1.ComponentProps<typeof AlertDialog$1.Portal>): React$1.JSX.Element;
57
+ declare function AlertDialogOverlay({ className, ...props }: React$1.ComponentProps<typeof AlertDialog$1.Overlay>): React$1.JSX.Element;
58
+ declare function AlertDialogContent({ className, size, ...props }: React$1.ComponentProps<typeof AlertDialog$1.Content> & {
59
+ size?: 'default' | 'sm';
60
+ }): React$1.JSX.Element;
61
+ declare function AlertDialogHeader({ className, ...props }: React$1.ComponentProps<'div'>): React$1.JSX.Element;
62
+ declare function AlertDialogFooter({ className, ...props }: React$1.ComponentProps<'div'>): React$1.JSX.Element;
63
+ declare function AlertDialogMedia({ className, ...props }: React$1.ComponentProps<'div'>): React$1.JSX.Element;
64
+ declare function AlertDialogTitle({ className, ...props }: React$1.ComponentProps<typeof AlertDialog$1.Title>): React$1.JSX.Element;
65
+ declare function AlertDialogDescription({ className, ...props }: React$1.ComponentProps<typeof AlertDialog$1.Description>): React$1.JSX.Element;
66
+ declare function AlertDialogAction({ className, variant, size, ...props }: React$1.ComponentProps<typeof AlertDialog$1.Action> & Pick<React$1.ComponentProps<typeof Button>, 'variant' | 'size'>): React$1.JSX.Element;
67
+ declare function AlertDialogCancel({ className, variant, size, ...props }: React$1.ComponentProps<typeof AlertDialog$1.Cancel> & Pick<React$1.ComponentProps<typeof Button>, 'variant' | 'size'>): React$1.JSX.Element;
68
+
69
+ declare const alertVariants: (props?: ({
70
+ variant?: "default" | "destructive" | null | undefined;
71
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
72
+ declare function Alert({ className, variant, ...props }: React$1.ComponentProps<'div'> & VariantProps<typeof alertVariants>): React$1.JSX.Element;
73
+ declare function AlertTitle({ className, ...props }: React$1.ComponentProps<'div'>): React$1.JSX.Element;
74
+ declare function AlertDescription({ className, ...props }: React$1.ComponentProps<'div'>): React$1.JSX.Element;
75
+ declare function AlertAction({ className, ...props }: React$1.ComponentProps<'div'>): React$1.JSX.Element;
76
+
77
+ declare function AspectRatio({ ...props }: React.ComponentProps<typeof AspectRatio$1.Root>): React$1.JSX.Element;
78
+
79
+ declare function Avatar({ className, size, ...props }: React$1.ComponentProps<typeof Avatar$1.Root> & {
80
+ size?: 'default' | 'sm' | 'lg';
81
+ }): React$1.JSX.Element;
82
+ declare function AvatarImage({ className, ...props }: React$1.ComponentProps<typeof Avatar$1.Image>): React$1.JSX.Element;
83
+ declare function AvatarFallback({ className, ...props }: React$1.ComponentProps<typeof Avatar$1.Fallback>): React$1.JSX.Element;
84
+ declare function AvatarBadge({ className, ...props }: React$1.ComponentProps<'span'>): React$1.JSX.Element;
85
+ declare function AvatarGroup({ className, ...props }: React$1.ComponentProps<'div'>): React$1.JSX.Element;
86
+ declare function AvatarGroupCount({ className, ...props }: React$1.ComponentProps<'div'>): React$1.JSX.Element;
87
+
88
+ declare const badgeVariants: (props?: ({
89
+ variant?: "default" | "destructive" | "secondary" | "outline" | "ghost" | "link" | null | undefined;
90
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
91
+ declare function Badge({ className, variant, asChild, ...props }: React$1.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & {
92
+ asChild?: boolean;
93
+ }): React$1.JSX.Element;
94
+
95
+ /**
96
+ * BorderBeam — vệt sáng gradient chạy dọc theo viền của phần tử cha.
97
+ * Port ý tưởng từ antd `border-beam` (offset-path + mask) sang idiom shadcn,
98
+ * thuần CSS (không phụ thuộc thư viện animation), tôn trọng prefers-reduced-motion.
99
+ *
100
+ * Đặt bên trong một container có `position: relative` và bo góc:
101
+ * <div className="relative overflow-hidden rounded-xl border p-6">
102
+ * Nội dung...
103
+ * <BorderBeam />
104
+ * </div>
105
+ */
106
+ interface BorderBeamProps extends Omit<React$1.ComponentProps<'div'>, 'color'> {
107
+ /** Kích thước (px) của vệt sáng dọc theo viền. Mặc định 60. */
108
+ size?: number;
109
+ /** Thời lượng 1 vòng chạy (giây). Mặc định 6. */
110
+ duration?: number;
111
+ /** Trễ trước khi bắt đầu (giây). Mặc định 0. */
112
+ delay?: number;
113
+ /** Độ dày viền (px). Mặc định 1.5. */
114
+ borderWidth?: number;
115
+ /** Màu đầu gradient. Mặc định `var(--primary)`. */
116
+ colorFrom?: string;
117
+ /** Màu cuối gradient (trước khi mờ dần). Mặc định `var(--ring)`. */
118
+ colorTo?: string;
119
+ /** Chạy ngược chiều. */
120
+ reverse?: boolean;
121
+ }
122
+ declare function BorderBeam({ size, duration, delay, borderWidth, colorFrom, colorTo, reverse, className, style, ...props }: BorderBeamProps): React$1.JSX.Element;
123
+
124
+ declare function Breadcrumb({ className, ...props }: React$1.ComponentProps<'nav'>): React$1.JSX.Element;
125
+ declare function BreadcrumbList({ className, ...props }: React$1.ComponentProps<'ol'>): React$1.JSX.Element;
126
+ declare function BreadcrumbItem({ className, ...props }: React$1.ComponentProps<'li'>): React$1.JSX.Element;
127
+ declare function BreadcrumbLink({ asChild, className, ...props }: React$1.ComponentProps<'a'> & {
128
+ asChild?: boolean;
129
+ }): React$1.JSX.Element;
130
+ declare function BreadcrumbPage({ className, ...props }: React$1.ComponentProps<'span'>): React$1.JSX.Element;
131
+ declare function BreadcrumbSeparator({ children, className, ...props }: React$1.ComponentProps<'li'>): React$1.JSX.Element;
132
+ declare function BreadcrumbEllipsis({ className, ...props }: React$1.ComponentProps<'span'>): React$1.JSX.Element;
133
+
134
+ declare function Separator({ className, orientation, decorative, ...props }: React$1.ComponentProps<typeof Separator$1.Root>): React$1.JSX.Element;
135
+
136
+ declare const buttonGroupVariants: (props?: ({
137
+ orientation?: "horizontal" | "vertical" | null | undefined;
138
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
139
+ declare function ButtonGroup({ className, orientation, ...props }: React.ComponentProps<'div'> & VariantProps<typeof buttonGroupVariants>): React$1.JSX.Element;
140
+ declare function ButtonGroupText({ className, asChild, ...props }: React.ComponentProps<'div'> & {
141
+ asChild?: boolean;
142
+ }): React$1.JSX.Element;
143
+ declare function ButtonGroupSeparator({ className, orientation, ...props }: React.ComponentProps<typeof Separator>): React$1.JSX.Element;
144
+
145
+ type ButtonSaveDraftProps = {
146
+ title?: string;
147
+ className?: string;
148
+ } & React__default.ComponentProps<typeof Button>;
149
+ declare function ButtonSaveDraft({ title, className, ...props }: ButtonSaveDraftProps): React__default.JSX.Element;
150
+
151
+ declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, locale, formatters, components, ...props }: React$1.ComponentProps<typeof DayPicker> & {
152
+ buttonVariant?: React$1.ComponentProps<typeof Button>['variant'];
153
+ }): React$1.JSX.Element;
154
+ declare function CalendarDayButton({ className, day, modifiers, locale, ...props }: React$1.ComponentProps<typeof DayButton> & {
155
+ locale?: Partial<Locale>;
156
+ }): React$1.JSX.Element;
157
+
158
+ declare function Card({ className, size, ...props }: React$1.ComponentProps<'div'> & {
159
+ size?: 'default' | 'sm';
160
+ }): React$1.JSX.Element;
161
+ declare function CardHeader({ className, ...props }: React$1.ComponentProps<'div'>): React$1.JSX.Element;
162
+ declare function CardTitle({ className, ...props }: React$1.ComponentProps<'div'>): React$1.JSX.Element;
163
+ declare function CardDescription({ className, ...props }: React$1.ComponentProps<'div'>): React$1.JSX.Element;
164
+ declare function CardAction({ className, ...props }: React$1.ComponentProps<'div'>): React$1.JSX.Element;
165
+ declare function CardContent({ className, ...props }: React$1.ComponentProps<'div'>): React$1.JSX.Element;
166
+ declare function CardFooter({ className, ...props }: React$1.ComponentProps<'div'>): React$1.JSX.Element;
167
+
168
+ type CarouselApi = UseEmblaCarouselType[1];
169
+ type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
170
+ type CarouselOptions = UseCarouselParameters[0];
171
+ type CarouselPlugin = UseCarouselParameters[1];
172
+ type CarouselProps = {
173
+ opts?: CarouselOptions;
174
+ plugins?: CarouselPlugin;
175
+ orientation?: 'horizontal' | 'vertical';
176
+ setApi?: (api: CarouselApi) => void;
177
+ };
178
+ type CarouselContextProps = {
179
+ carouselRef: ReturnType<typeof useEmblaCarousel>[0];
180
+ api: ReturnType<typeof useEmblaCarousel>[1];
181
+ scrollPrev: () => void;
182
+ scrollNext: () => void;
183
+ canScrollPrev: boolean;
184
+ canScrollNext: boolean;
185
+ } & CarouselProps;
186
+ declare function useCarousel(): CarouselContextProps;
187
+ declare function Carousel({ orientation, opts, setApi, plugins, className, children, ...props }: React$1.ComponentProps<'div'> & CarouselProps): React$1.JSX.Element;
188
+ declare function CarouselContent({ className, ...props }: React$1.ComponentProps<'div'>): React$1.JSX.Element;
189
+ declare function CarouselItem({ className, ...props }: React$1.ComponentProps<'div'>): React$1.JSX.Element;
190
+ declare function CarouselPrevious({ className, variant, size, ...props }: React$1.ComponentProps<typeof Button>): React$1.JSX.Element;
191
+ declare function CarouselNext({ className, variant, size, ...props }: React$1.ComponentProps<typeof Button>): React$1.JSX.Element;
192
+
193
+ declare const THEMES$1: {
194
+ readonly light: "";
195
+ readonly dark: ".dark";
196
+ };
197
+ type ChartConfig = {
198
+ [k in string]: {
199
+ label?: React$1.ReactNode;
200
+ icon?: React$1.ComponentType;
201
+ } & ({
202
+ color?: string;
203
+ theme?: never;
204
+ } | {
205
+ color?: never;
206
+ theme: Record<keyof typeof THEMES$1, string>;
207
+ });
208
+ };
209
+ declare function ChartContainer({ id, className, children, config, ...props }: React$1.ComponentProps<'div'> & {
210
+ config: ChartConfig;
211
+ children: React$1.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>['children'];
212
+ }): React$1.JSX.Element;
213
+ declare const ChartStyle: ({ id, config }: {
214
+ id: string;
215
+ config: ChartConfig;
216
+ }) => React$1.JSX.Element | null;
217
+ declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
218
+ declare function ChartTooltipContent({ active, payload, className, indicator, hideLabel, hideIndicator, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey, }: React$1.ComponentProps<typeof RechartsPrimitive.Tooltip> & React$1.ComponentProps<'div'> & {
219
+ hideLabel?: boolean;
220
+ hideIndicator?: boolean;
221
+ indicator?: 'line' | 'dot' | 'dashed';
222
+ nameKey?: string;
223
+ labelKey?: string;
224
+ }): React$1.JSX.Element | null;
225
+ declare const ChartLegend: typeof RechartsPrimitive.Legend;
226
+ declare function ChartLegendContent({ className, hideIcon, payload, verticalAlign, nameKey, }: React$1.ComponentProps<'div'> & Pick<RechartsPrimitive.LegendProps, 'payload' | 'verticalAlign'> & {
227
+ hideIcon?: boolean;
228
+ nameKey?: string;
229
+ }): React$1.JSX.Element | null;
230
+
231
+ declare function Checkbox({ className, ...props }: React$1.ComponentProps<typeof Checkbox$1.Root>): React$1.JSX.Element;
232
+
233
+ /**
234
+ * Collapse — vùng nội dung gập/mở nhiều panel (như antd `Collapse`). shadcn có `Collapsible`
235
+ * (1 vùng) và `Accordion` (Radix) nhưng KHÔNG có kiểu multi-panel + API của antd (items, accordion,
236
+ * ghost, size, expandIcon, extra, collapsible trigger). Port API cốt lõi antd sang idiom repo:
237
+ * thuần React + Tailwind (`cn`) + `lucide-react`, animate bằng CSS grid-rows (không đo JS).
238
+ *
239
+ * Controlled (`activeKey` + `onChange`) hoặc uncontrolled (`defaultActiveKey`).
240
+ *
241
+ * Khác biệt so với antd (cố ý, giữ gọn cho design-system):
242
+ * - `size`: dùng 'sm' | 'default' | 'lg' (thay small/medium/large).
243
+ * - Không kèm: semantic classNames/styles, component token, forceRender khi destroyOnHidden.
244
+ *
245
+ * Cách dùng:
246
+ * <Collapse defaultActiveKey={['1']} items={[{ key:'1', label:'Mục 1', children:'Nội dung' }]} />
247
+ * // hoặc:
248
+ * <Collapse accordion>
249
+ * <Collapse.Panel itemKey="1" header="Mục 1">Nội dung</Collapse.Panel>
250
+ * </Collapse>
251
+ */
252
+ type CollapseTrigger = 'header' | 'icon' | 'disabled';
253
+ type CollapseSize = 'sm' | 'default' | 'lg';
254
+ interface CollapseItem {
255
+ key: string;
256
+ label: React$1.ReactNode;
257
+ children?: React$1.ReactNode;
258
+ /** Phần tử phụ ở góc phải header (không kích hoạt gập/mở khi bấm). */
259
+ extra?: React$1.ReactNode;
260
+ /** Ẩn mũi tên. */
261
+ showArrow?: boolean;
262
+ /** Cách kích hoạt riêng cho panel này (ghi đè cấp Collapse). */
263
+ collapsible?: CollapseTrigger;
264
+ /** Render nội dung ngay cả khi đóng (mặc định lazy). */
265
+ forceRender?: boolean;
266
+ disabled?: boolean;
267
+ className?: string;
268
+ }
269
+ interface CollapseProps {
270
+ items?: CollapseItem[];
271
+ activeKey?: string | string[];
272
+ defaultActiveKey?: string | string[];
273
+ onChange?: (keys: string[]) => void;
274
+ /** Chỉ mở 1 panel tại một thời điểm. */
275
+ accordion?: boolean;
276
+ /** Viền quanh khối (mặc định true). */
277
+ bordered?: boolean;
278
+ /** Bỏ viền + nền trong suốt. */
279
+ ghost?: boolean;
280
+ size?: CollapseSize;
281
+ /** Tùy biến icon mở/đóng. */
282
+ expandIcon?: (info: {
283
+ isActive: boolean;
284
+ disabled: boolean;
285
+ }) => React$1.ReactNode;
286
+ /** Vị trí icon: đầu (mặc định) hoặc cuối header. */
287
+ expandIconPosition?: 'start' | 'end';
288
+ /** Cách kích hoạt gập/mở toàn bộ. */
289
+ collapsible?: CollapseTrigger;
290
+ /** Hủy nội dung panel khi đóng. */
291
+ destroyOnHidden?: boolean;
292
+ className?: string;
293
+ children?: React$1.ReactNode;
294
+ }
295
+ interface CollapsePanelProps {
296
+ /** Định danh panel (React `key` không đọc được ở props nên dùng `itemKey`). */
297
+ itemKey: string;
298
+ header: React$1.ReactNode;
299
+ extra?: React$1.ReactNode;
300
+ showArrow?: boolean;
301
+ collapsible?: CollapseTrigger;
302
+ forceRender?: boolean;
303
+ disabled?: boolean;
304
+ className?: string;
305
+ children?: React$1.ReactNode;
306
+ }
307
+ /** Marker — Collapse đọc props của Panel, không render trực tiếp (giống antd). */
308
+ declare function CollapsePanel(_props: CollapsePanelProps): React$1.ReactElement | null;
309
+ declare function Collapse({ items, activeKey, defaultActiveKey, onChange, accordion, bordered, ghost, size, expandIcon, expandIconPosition, collapsible, destroyOnHidden, className, children, }: CollapseProps): React$1.JSX.Element;
310
+ declare namespace Collapse {
311
+ var Panel: typeof CollapsePanel;
312
+ }
313
+
314
+ declare function Collapsible({ ...props }: React.ComponentProps<typeof Collapsible$1.Root>): React$1.JSX.Element;
315
+ declare function CollapsibleTrigger({ ...props }: React.ComponentProps<typeof Collapsible$1.CollapsibleTrigger>): React$1.JSX.Element;
316
+ declare function CollapsibleContent({ ...props }: React.ComponentProps<typeof Collapsible$1.CollapsibleContent>): React$1.JSX.Element;
317
+
318
+ declare const Combobox: typeof Combobox$1.Root;
319
+ declare function ComboboxValue({ ...props }: Combobox$1.Value.Props): React$1.JSX.Element;
320
+ declare function ComboboxTrigger({ className, children, ...props }: Combobox$1.Trigger.Props): React$1.JSX.Element;
321
+ declare function ComboboxInput({ className, children, disabled, showTrigger, showClear, ...props }: Combobox$1.Input.Props & {
322
+ showTrigger?: boolean;
323
+ showClear?: boolean;
324
+ }): React$1.JSX.Element;
325
+ declare function ComboboxContent({ className, side, sideOffset, align, alignOffset, anchor, ...props }: Combobox$1.Popup.Props & Pick<Combobox$1.Positioner.Props, 'side' | 'align' | 'sideOffset' | 'alignOffset' | 'anchor'>): React$1.JSX.Element;
326
+ declare function ComboboxList({ className, ...props }: Combobox$1.List.Props): React$1.JSX.Element;
327
+ declare function ComboboxItem({ className, children, ...props }: Combobox$1.Item.Props): React$1.JSX.Element;
328
+ declare function ComboboxGroup({ className, ...props }: Combobox$1.Group.Props): React$1.JSX.Element;
329
+ declare function ComboboxLabel({ className, ...props }: Combobox$1.GroupLabel.Props): React$1.JSX.Element;
330
+ declare function ComboboxCollection({ ...props }: Combobox$1.Collection.Props): React$1.JSX.Element;
331
+ declare function ComboboxEmpty({ className, ...props }: Combobox$1.Empty.Props): React$1.JSX.Element;
332
+ declare function ComboboxSeparator({ className, ...props }: Combobox$1.Separator.Props): React$1.JSX.Element;
333
+ declare function ComboboxChips({ className, ...props }: React$1.ComponentPropsWithRef<typeof Combobox$1.Chips> & Combobox$1.Chips.Props): React$1.JSX.Element;
334
+ declare function ComboboxChip({ className, children, showRemove, ...props }: Combobox$1.Chip.Props & {
335
+ showRemove?: boolean;
336
+ }): React$1.JSX.Element;
337
+ declare function ComboboxChipsInput({ className, ...props }: Combobox$1.Input.Props): React$1.JSX.Element;
338
+ declare function useComboboxAnchor(): React$1.RefObject<HTMLDivElement | null>;
339
+
340
+ declare function Dialog({ ...props }: React$1.ComponentProps<typeof Dialog$1.Root>): React$1.JSX.Element;
341
+ declare function DialogTrigger({ ...props }: React$1.ComponentProps<typeof Dialog$1.Trigger>): React$1.JSX.Element;
342
+ declare function DialogPortal({ ...props }: React$1.ComponentProps<typeof Dialog$1.Portal>): React$1.JSX.Element;
343
+ declare function DialogClose({ ...props }: React$1.ComponentProps<typeof Dialog$1.Close>): React$1.JSX.Element;
344
+ declare function DialogOverlay({ className, ...props }: React$1.ComponentProps<typeof Dialog$1.Overlay>): React$1.JSX.Element;
345
+ declare function DialogContent({ className, children, showCloseButton, ...props }: React$1.ComponentProps<typeof Dialog$1.Content> & {
346
+ showCloseButton?: boolean;
347
+ }): React$1.JSX.Element;
348
+ declare function DialogHeader({ className, ...props }: React$1.ComponentProps<'div'>): React$1.JSX.Element;
349
+ declare function DialogFooter({ className, showCloseButton, children, ...props }: React$1.ComponentProps<'div'> & {
350
+ showCloseButton?: boolean;
351
+ }): React$1.JSX.Element;
352
+ declare function DialogTitle({ className, ...props }: React$1.ComponentProps<typeof Dialog$1.Title>): React$1.JSX.Element;
353
+ declare function DialogDescription({ className, ...props }: React$1.ComponentProps<typeof Dialog$1.Description>): React$1.JSX.Element;
354
+
355
+ declare function Command({ className, ...props }: React$1.ComponentProps<typeof Command$1>): React$1.JSX.Element;
356
+ declare function CommandDialog({ title, description, children, className, showCloseButton, ...props }: React$1.ComponentProps<typeof Dialog> & {
357
+ title?: string;
358
+ description?: string;
359
+ className?: string;
360
+ showCloseButton?: boolean;
361
+ }): React$1.JSX.Element;
362
+ declare function CommandInput({ className, ...props }: React$1.ComponentProps<typeof Command$1.Input>): React$1.JSX.Element;
363
+ declare function CommandList({ className, ...props }: React$1.ComponentProps<typeof Command$1.List>): React$1.JSX.Element;
364
+ declare function CommandEmpty({ className, ...props }: React$1.ComponentProps<typeof Command$1.Empty>): React$1.JSX.Element;
365
+ declare function CommandGroup({ className, ...props }: React$1.ComponentProps<typeof Command$1.Group>): React$1.JSX.Element;
366
+ declare function CommandSeparator({ className, ...props }: React$1.ComponentProps<typeof Command$1.Separator>): React$1.JSX.Element;
367
+ declare function CommandItem({ className, children, ...props }: React$1.ComponentProps<typeof Command$1.Item>): React$1.JSX.Element;
368
+ declare function CommandShortcut({ className, ...props }: React$1.ComponentProps<'span'>): React$1.JSX.Element;
369
+
370
+ /** Bảng màu preset mặc định — phủ các sắc độ thường dùng cho theme Studio. */
371
+ declare const DEFAULT_COLOR_PRESETS: string[];
372
+ interface ColorPickerProps {
373
+ /** Giá trị màu hiện tại dạng hex (`#rrggbb`). */
374
+ value?: string;
375
+ /** Gọi khi màu đổi — luôn trả hex chuẩn hoá `#rrggbb`. */
376
+ onChange?: (value: string) => void;
377
+ /** Danh sách màu preset (mặc định {@link DEFAULT_COLOR_PRESETS}). */
378
+ presets?: string[];
379
+ disabled?: boolean;
380
+ className?: string;
381
+ id?: string;
382
+ 'aria-label'?: string;
383
+ }
384
+ /**
385
+ * ColorPicker — input color HTML bọc chuẩn DS + swatch preset + ô nhập hex.
386
+ * Dùng cho theme editor (Settings Studio). Component ĐỘC LẬP, không sửa component có sẵn.
387
+ */
388
+ declare function ColorPicker({ value, onChange, presets, disabled, className, id, 'aria-label': ariaLabel, }: ColorPickerProps): React$1.JSX.Element;
389
+
390
+ declare function ContextMenu({ ...props }: React$1.ComponentProps<typeof ContextMenu$1.Root>): React$1.JSX.Element;
391
+ declare function ContextMenuTrigger({ className, ...props }: React$1.ComponentProps<typeof ContextMenu$1.Trigger>): React$1.JSX.Element;
392
+ declare function ContextMenuGroup({ ...props }: React$1.ComponentProps<typeof ContextMenu$1.Group>): React$1.JSX.Element;
393
+ declare function ContextMenuPortal({ ...props }: React$1.ComponentProps<typeof ContextMenu$1.Portal>): React$1.JSX.Element;
394
+ declare function ContextMenuSub({ ...props }: React$1.ComponentProps<typeof ContextMenu$1.Sub>): React$1.JSX.Element;
395
+ declare function ContextMenuRadioGroup({ ...props }: React$1.ComponentProps<typeof ContextMenu$1.RadioGroup>): React$1.JSX.Element;
396
+ declare function ContextMenuContent({ className, ...props }: React$1.ComponentProps<typeof ContextMenu$1.Content> & {
397
+ side?: 'top' | 'right' | 'bottom' | 'left';
398
+ }): React$1.JSX.Element;
399
+ declare function ContextMenuItem({ className, inset, variant, ...props }: React$1.ComponentProps<typeof ContextMenu$1.Item> & {
400
+ inset?: boolean;
401
+ variant?: 'default' | 'destructive';
402
+ }): React$1.JSX.Element;
403
+ declare function ContextMenuSubTrigger({ className, inset, children, ...props }: React$1.ComponentProps<typeof ContextMenu$1.SubTrigger> & {
404
+ inset?: boolean;
405
+ }): React$1.JSX.Element;
406
+ declare function ContextMenuSubContent({ className, ...props }: React$1.ComponentProps<typeof ContextMenu$1.SubContent>): React$1.JSX.Element;
407
+ declare function ContextMenuCheckboxItem({ className, children, checked, inset, ...props }: React$1.ComponentProps<typeof ContextMenu$1.CheckboxItem> & {
408
+ inset?: boolean;
409
+ }): React$1.JSX.Element;
410
+ declare function ContextMenuRadioItem({ className, children, inset, ...props }: React$1.ComponentProps<typeof ContextMenu$1.RadioItem> & {
411
+ inset?: boolean;
412
+ }): React$1.JSX.Element;
413
+ declare function ContextMenuLabel({ className, inset, ...props }: React$1.ComponentProps<typeof ContextMenu$1.Label> & {
414
+ inset?: boolean;
415
+ }): React$1.JSX.Element;
416
+ declare function ContextMenuSeparator({ className, ...props }: React$1.ComponentProps<typeof ContextMenu$1.Separator>): React$1.JSX.Element;
417
+ declare function ContextMenuShortcut({ className, ...props }: React$1.ComponentProps<'span'>): React$1.JSX.Element;
418
+
419
+ interface DatePickerProps$1 {
420
+ value?: string | null;
421
+ onChange?: (value: string) => void;
422
+ placeholder?: string;
423
+ className?: string;
424
+ disabled?: boolean;
425
+ inputText?: boolean;
426
+ validateOnBlur?: boolean;
427
+ disallowFuture?: boolean;
428
+ disallowPast?: boolean;
429
+ minDate?: Date;
430
+ maxDate?: Date;
431
+ startMonth?: Date;
432
+ endMonth?: Date;
433
+ inputClassName?: string;
434
+ field?: any;
435
+ hookForm?: any;
436
+ }
437
+ type DatePickerInputProps$1 = Omit<React$1.ComponentProps<'input'>, 'onChange' | 'value' | 'defaultValue'> & DatePickerProps$1;
438
+ declare function DatePickerInput({ value, onChange, placeholder, className, inputClassName, disabled, inputText, validateOnBlur, disallowFuture, disallowPast, minDate, maxDate, field, hookForm, startMonth, endMonth, ...props }: DatePickerInputProps$1): React$1.JSX.Element;
439
+
440
+ interface DatePickerProps {
441
+ value?: string | null;
442
+ onChange?: (value: string) => void;
443
+ placeholder?: string;
444
+ className?: string;
445
+ disabled?: boolean;
446
+ }
447
+ declare function DatePicker({ value, onChange, placeholder, className, disabled, }: DatePickerProps): React$1.JSX.Element;
448
+
449
+ /**
450
+ * Descriptions — hiển thị nhiều trường thông tin theo dạng bảng nhãn/giá trị.
451
+ * Port theo API của antd `Descriptions` sang idiom shadcn + Tailwind (CSS grid),
452
+ * có responsive theo 1 mốc "mobile" (< 640px) — bỏ qua tablet/iPad.
453
+ *
454
+ * Responsive (mặc định):
455
+ * - Số cột co về `mobileColumn` (mặc định 1) khi ở mobile.
456
+ * - Hướng nhãn/nội dung co về `mobileLayout` (mặc định 'vertical' = nhãn trên,
457
+ * nội dung dưới) để tránh cột nhãn thấp còn nội dung dài "lêu nghêu".
458
+ * Người dùng ghi đè được cả hai: `mobileColumn={2}`, `mobileLayout="horizontal"`.
459
+ *
460
+ * Cách dùng:
461
+ * <Descriptions title="Thông tin" column={3} bordered>
462
+ * <Descriptions.Item label="Họ tên">Nguyễn Văn A</Descriptions.Item>
463
+ * <Descriptions.Item label="Ghi chú" span={2}>...</Descriptions.Item>
464
+ * </Descriptions>
465
+ * hoặc truyền `items`.
466
+ */
467
+ type DescriptionsSize = 'sm' | 'default' | 'lg';
468
+ type DescriptionsLayout = 'horizontal' | 'vertical';
469
+ type DescriptionsItemType = {
470
+ key?: React$1.Key;
471
+ label?: React$1.ReactNode;
472
+ span?: number;
473
+ children?: React$1.ReactNode;
474
+ className?: string;
475
+ labelClassName?: string;
476
+ contentClassName?: string;
477
+ };
478
+ interface DescriptionsProps extends Omit<React$1.ComponentProps<'div'>, 'title'> {
479
+ title?: React$1.ReactNode;
480
+ extra?: React$1.ReactNode;
481
+ /** Số cột trong 1 hàng ở desktop. Mặc định 3. */
482
+ column?: number;
483
+ /** Số cột khi ở mobile (< 640px). Mặc định 1. Có thể chỉnh thành 2. */
484
+ mobileColumn?: number;
485
+ /** Hướng nhãn/nội dung ở desktop. Mặc định 'horizontal'. */
486
+ layout?: DescriptionsLayout;
487
+ /** Hướng nhãn/nội dung ở mobile. Mặc định 'vertical' (nhãn trên, nội dung dưới). */
488
+ mobileLayout?: DescriptionsLayout;
489
+ bordered?: boolean;
490
+ /** Hiển thị dấu `:` sau nhãn (chỉ khi hướng ngang, không viền). Mặc định true. */
491
+ colon?: boolean;
492
+ size?: DescriptionsSize;
493
+ /** Class áp cho mọi nhãn. */
494
+ labelClassName?: string;
495
+ /** Class áp cho mọi nội dung. */
496
+ contentClassName?: string;
497
+ /** Danh sách item — thay thế cho việc lồng `<Descriptions.Item>`. */
498
+ items?: DescriptionsItemType[];
499
+ }
500
+ declare function Descriptions({ title, extra, column, mobileColumn, layout, mobileLayout, bordered, colon, size, labelClassName, contentClassName, items, className, children, ...props }: DescriptionsProps): React$1.JSX.Element;
501
+ declare namespace Descriptions {
502
+ var Item: typeof DescriptionsItem;
503
+ }
504
+ /** Item của Descriptions. Chỉ dùng bên trong `<Descriptions>`. */
505
+ declare function DescriptionsItem(props: DescriptionsItemType): React$1.JSX.Element;
506
+ declare namespace DescriptionsItem {
507
+ var displayName: string;
508
+ }
509
+
510
+ declare function DirectionProvider({ dir, direction, children, }: React$1.ComponentProps<typeof Direction.DirectionProvider> & {
511
+ direction?: React$1.ComponentProps<typeof Direction.DirectionProvider>['dir'];
512
+ }): React$1.JSX.Element;
513
+ declare const useDirection: any;
514
+
515
+ declare function Drawer({ ...props }: React$1.ComponentProps<typeof Drawer$1.Root>): React$1.JSX.Element;
516
+ declare function DrawerTrigger({ ...props }: React$1.ComponentProps<typeof Drawer$1.Trigger>): React$1.JSX.Element;
517
+ declare function DrawerPortal({ ...props }: React$1.ComponentProps<typeof Drawer$1.Portal>): React$1.JSX.Element;
518
+ declare function DrawerClose({ ...props }: React$1.ComponentProps<typeof Drawer$1.Close>): React$1.JSX.Element;
519
+ declare function DrawerOverlay({ className, ...props }: React$1.ComponentProps<typeof Drawer$1.Overlay>): React$1.JSX.Element;
520
+ declare function DrawerContent({ className, children, ...props }: React$1.ComponentProps<typeof Drawer$1.Content>): React$1.JSX.Element;
521
+ declare function DrawerHeader({ className, ...props }: React$1.ComponentProps<'div'>): React$1.JSX.Element;
522
+ declare function DrawerFooter({ className, ...props }: React$1.ComponentProps<'div'>): React$1.JSX.Element;
523
+ declare function DrawerTitle({ className, ...props }: React$1.ComponentProps<typeof Drawer$1.Title>): React$1.JSX.Element;
524
+ declare function DrawerDescription({ className, ...props }: React$1.ComponentProps<typeof Drawer$1.Description>): React$1.JSX.Element;
525
+
526
+ declare function DropdownMenu({ ...props }: React$1.ComponentProps<typeof DropdownMenu$1.Root>): React$1.JSX.Element;
527
+ declare function DropdownMenuPortal({ ...props }: React$1.ComponentProps<typeof DropdownMenu$1.Portal>): React$1.JSX.Element;
528
+ declare function DropdownMenuTrigger({ ...props }: React$1.ComponentProps<typeof DropdownMenu$1.Trigger>): React$1.JSX.Element;
529
+ declare function DropdownMenuContent({ className, align, sideOffset, ...props }: React$1.ComponentProps<typeof DropdownMenu$1.Content>): React$1.JSX.Element;
530
+ declare function DropdownMenuGroup({ ...props }: React$1.ComponentProps<typeof DropdownMenu$1.Group>): React$1.JSX.Element;
531
+ declare function DropdownMenuItem({ className, inset, variant, ...props }: React$1.ComponentProps<typeof DropdownMenu$1.Item> & {
532
+ inset?: boolean;
533
+ variant?: 'default' | 'destructive';
534
+ }): React$1.JSX.Element;
535
+ declare function DropdownMenuCheckboxItem({ className, children, checked, inset, ...props }: React$1.ComponentProps<typeof DropdownMenu$1.CheckboxItem> & {
536
+ inset?: boolean;
537
+ }): React$1.JSX.Element;
538
+ declare function DropdownMenuRadioGroup({ ...props }: React$1.ComponentProps<typeof DropdownMenu$1.RadioGroup>): React$1.JSX.Element;
539
+ declare function DropdownMenuRadioItem({ className, children, inset, ...props }: React$1.ComponentProps<typeof DropdownMenu$1.RadioItem> & {
540
+ inset?: boolean;
541
+ }): React$1.JSX.Element;
542
+ declare function DropdownMenuLabel({ className, inset, ...props }: React$1.ComponentProps<typeof DropdownMenu$1.Label> & {
543
+ inset?: boolean;
544
+ }): React$1.JSX.Element;
545
+ declare function DropdownMenuSeparator({ className, ...props }: React$1.ComponentProps<typeof DropdownMenu$1.Separator>): React$1.JSX.Element;
546
+ declare function DropdownMenuShortcut({ className, ...props }: React$1.ComponentProps<'span'>): React$1.JSX.Element;
547
+ declare function DropdownMenuSub({ ...props }: React$1.ComponentProps<typeof DropdownMenu$1.Sub>): React$1.JSX.Element;
548
+ declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: React$1.ComponentProps<typeof DropdownMenu$1.SubTrigger> & {
549
+ inset?: boolean;
550
+ }): React$1.JSX.Element;
551
+ declare function DropdownMenuSubContent({ className, ...props }: React$1.ComponentProps<typeof DropdownMenu$1.SubContent>): React$1.JSX.Element;
552
+
553
+ declare function Empty({ className, ...props }: React.ComponentProps<'div'>): React$1.JSX.Element;
554
+ declare function EmptyHeader({ className, ...props }: React.ComponentProps<'div'>): React$1.JSX.Element;
555
+ declare const emptyMediaVariants: (props?: ({
556
+ variant?: "default" | "icon" | null | undefined;
557
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
558
+ declare function EmptyMedia({ className, variant, ...props }: React.ComponentProps<'div'> & VariantProps<typeof emptyMediaVariants>): React$1.JSX.Element;
559
+ declare function EmptyTitle({ className, ...props }: React.ComponentProps<'div'>): React$1.JSX.Element;
560
+ declare function EmptyDescription({ className, ...props }: React.ComponentProps<'p'>): React$1.JSX.Element;
561
+ declare function EmptyContent({ className, ...props }: React.ComponentProps<'div'>): React$1.JSX.Element;
562
+
563
+ declare function Label({ className, ...props }: React$1.ComponentProps<typeof Label$1.Root>): React$1.JSX.Element;
564
+
565
+ declare function FieldSet({ className, ...props }: React.ComponentProps<'fieldset'>): React$1.JSX.Element;
566
+ declare function FieldLegend({ className, variant, ...props }: React.ComponentProps<'legend'> & {
567
+ variant?: 'legend' | 'label';
568
+ }): React$1.JSX.Element;
569
+ declare function FieldGroup({ className, ...props }: React.ComponentProps<'div'>): React$1.JSX.Element;
570
+ declare const fieldVariants: (props?: ({
571
+ orientation?: "horizontal" | "vertical" | "responsive" | null | undefined;
572
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
573
+ declare function Field({ className, orientation, ...props }: React.ComponentProps<'div'> & VariantProps<typeof fieldVariants>): React$1.JSX.Element;
574
+ declare function FieldContent({ className, ...props }: React.ComponentProps<'div'>): React$1.JSX.Element;
575
+ declare function FieldLabel({ className, ...props }: React.ComponentProps<typeof Label>): React$1.JSX.Element;
576
+ declare function FieldTitle({ className, ...props }: React.ComponentProps<'div'>): React$1.JSX.Element;
577
+ declare function FieldDescription({ className, ...props }: React.ComponentProps<'p'>): React$1.JSX.Element;
578
+ declare function FieldSeparator({ children, className, ...props }: React.ComponentProps<'div'> & {
579
+ children?: React.ReactNode;
580
+ }): React$1.JSX.Element;
581
+ declare function FieldError({ className, children, errors, ...props }: React.ComponentProps<'div'> & {
582
+ errors?: Array<{
583
+ message?: string;
584
+ } | undefined>;
585
+ }): React$1.JSX.Element | null;
586
+
587
+ interface FileLinkItem {
588
+ /** Tên tệp hiện cho người dùng (vd "Mẫu thông báo.doc"). */
589
+ label: string;
590
+ /** Đường dẫn tải/xem. Không có → thẻ vẫn hiện nhưng không bấm được (mockup). */
591
+ href?: string;
592
+ /** Dung lượng dạng chữ, tự do (vd "42 KB") — chỉ để hiển thị. */
593
+ size?: string;
594
+ }
595
+ interface FileLinkProps extends Omit<React$1.HTMLAttributes<HTMLElement>, 'children'>, FileLinkItem {
596
+ }
597
+ /** Một tệp — hàng có icon, tên tệp, dung lượng và icon tải ở cuối. */
598
+ declare function FileLink({ label, href, size, className, ...rest }: FileLinkProps): React$1.JSX.Element;
599
+ interface FileListProps extends React$1.HTMLAttributes<HTMLUListElement> {
600
+ files?: FileLinkItem[];
601
+ /** Chữ hiện khi danh sách rỗng. */
602
+ emptyText?: string;
603
+ }
604
+ /** Danh sách tệp — mỗi dòng là một `FileLink`. */
605
+ declare function FileList({ files, emptyText, className, ...rest }: FileListProps): React$1.JSX.Element;
606
+
607
+ type Any = any;
608
+ type AnyError = any;
609
+ type AnyKeyValue = any;
610
+ type AnyRecord = Record<string, any>;
611
+
612
+ type Combobox2Props = {
613
+ options?: {
614
+ value: string;
615
+ label: string;
616
+ data?: Any;
617
+ }[];
618
+ defaultOptions?: {
619
+ value: string;
620
+ label: string;
621
+ }[];
622
+ placeholder: string;
623
+ onChange?: (value: string | {
624
+ value: string;
625
+ label: string;
626
+ } | string[] | {
627
+ value: string;
628
+ label: string;
629
+ }[]) => void;
630
+ value?: string | string[];
631
+ className?: string;
632
+ buttonTriggerProps?: React__default.ComponentProps<typeof Button>;
633
+ apiRequest?: (keyword?: string) => Promise<{
634
+ value: string;
635
+ label: string;
636
+ }[]>;
637
+ keywordName?: string;
638
+ multiple?: boolean;
639
+ labelInValue?: boolean;
640
+ /**
641
+ * Nếu là true, thì options sẽ được ghi đè bởi options đầu vào cả trong trường hợp options đầu vào không có dữ liệu
642
+ */
643
+ isOverrideOptions?: boolean;
644
+ hasError?: boolean;
645
+ /**
646
+ * Có cho phép tìm kiếm trong combobox không
647
+ */
648
+ searchable?: boolean;
649
+ triggerRef?: React__default.Ref<HTMLButtonElement>;
650
+ setValueTooltip?: (value: string) => void;
651
+ disabled?: boolean;
652
+ showClearable?: boolean;
653
+ /**
654
+ * Có hiển thị nút "Chọn tất cả" khi multiple = true không. Mặc định là true
655
+ */
656
+ showSelectAll?: boolean;
657
+ renderLabel?: (option: {
658
+ value: string;
659
+ label: string;
660
+ data?: Any;
661
+ }) => React__default.ReactNode;
662
+ /**
663
+ * Khi multiple = true, có truncate text (hiển thị ...) hay không. Mặc định là true
664
+ */
665
+ truncateMultipleValues?: boolean;
666
+ /**
667
+ * Truncate text của trigger cho cả single/multiple để tránh kéo giãn layout.
668
+ */
669
+ truncateTriggerLabel?: boolean;
670
+ maxLength?: number;
671
+ deselectOnReselect?: boolean;
672
+ /**
673
+ * Nếu là true, chỉ gọi apiRequest 1 lần duy nhất.
674
+ * Các lần search sau sẽ filter trực tiếp từ state options đã load.
675
+ */
676
+ apiSearch?: boolean;
677
+ /**
678
+ * Cho phép chọn giá trị tự nhập (không có trong danh sách gợi ý). Chỉ áp dụng single-select.
679
+ */
680
+ creatable?: boolean;
681
+ };
682
+ declare function Combobox2({ options: manualOptions, isOverrideOptions, defaultOptions, placeholder, onChange, value: initialValue, buttonTriggerProps, apiRequest, keywordName, multiple, labelInValue, hasError, searchable, triggerRef, setValueTooltip, disabled, showClearable, showSelectAll, renderLabel, truncateMultipleValues, truncateTriggerLabel, maxLength, deselectOnReselect, apiSearch, creatable, }: Combobox2Props): React__default.JSX.Element;
683
+
684
+ interface TreeOption$1 {
685
+ id: string;
686
+ value: string;
687
+ label: string;
688
+ children?: TreeOption$1[];
689
+ }
690
+ interface TreeComboboxProps {
691
+ options: TreeOption$1[];
692
+ value?: string | string[];
693
+ onChange?: (value: string | string[]) => void;
694
+ placeholder?: string;
695
+ disabled?: boolean;
696
+ hasError?: boolean;
697
+ className?: string;
698
+ showClearable?: boolean;
699
+ searchable?: boolean;
700
+ selectableParents?: boolean;
701
+ triggerClassName?: string;
702
+ maxLength?: number;
703
+ showCheckboxes?: boolean;
704
+ multiple?: boolean;
705
+ summaryExcludeValues?: string[];
706
+ summaryFormatter?: (labels: string[]) => string;
707
+ expandRootsOnOpen?: boolean;
708
+ }
709
+ declare function TreeCombobox({ options, value: initialValue, onChange, placeholder, disabled, hasError, className, showClearable, searchable, selectableParents, // Mặc định cho phép chọn node cha để tương thích ngược
710
+ triggerClassName, maxLength, showCheckboxes, multiple, summaryExcludeValues, summaryFormatter, expandRootsOnOpen, }: TreeComboboxProps): React__default.JSX.Element;
711
+
712
+ /** Một dòng ánh xạ: trường nguồn → kiểu dữ liệu → trường đích. */
713
+ interface FieldMapping {
714
+ source: string;
715
+ type: string;
716
+ dest: string;
717
+ }
718
+ interface FieldMappingEditorProps {
719
+ value?: FieldMapping[];
720
+ onChange?: (rows: FieldMapping[]) => void;
721
+ onBlur?: () => void;
722
+ /** options for the data-type select; default String/Number/Date/Boolean. */
723
+ typeOptions?: {
724
+ label: string;
725
+ value: string;
726
+ }[];
727
+ /** label for the add-row button; default "Thêm trường". */
728
+ addLabel?: string;
729
+ disabled?: boolean;
730
+ 'aria-invalid'?: boolean;
731
+ className?: string;
732
+ }
733
+ /**
734
+ * Bảng ánh xạ trường dữ liệu có thể chỉnh sửa — fully controlled qua
735
+ * `value`/`onChange`. Mỗi dòng gồm trường nguồn (Input), kiểu dữ liệu (Select),
736
+ * trường đích (Input) và nút xoá. Cảnh báo khi có nguồn nhưng chưa map đích.
737
+ */
738
+ declare function FieldMappingEditor({ value, onChange, onBlur, typeOptions, addLabel, disabled, 'aria-invalid': ariaInvalid, className, }: FieldMappingEditorProps): React$1.JSX.Element;
739
+
740
+ /** Định dạng số byte sang chuỗi dễ đọc (KB/MB). */
741
+ declare function formatBytes(bytes: number): string;
742
+ interface FileUploadProps {
743
+ /** Giá trị controlled. Đơn tệp trừ khi bật `multiple`. */
744
+ value?: File | File[] | null;
745
+ onChange?: (value: File | File[] | null) => void;
746
+ /**
747
+ * Chạy NGAY SAU `onChange`, nhận cùng giá trị.
748
+ *
749
+ * Có prop này để màn nghiệp vụ chạy việc phụ thuộc tệp vừa chọn (tải lên, đọc nội dung) mà không
750
+ * phải bọc lại `onChange` — `onChange` là chỗ react-hook-form cắm vào, giành mất là hỏng binding.
751
+ */
752
+ afterChange?: (value: File | File[] | null) => void;
753
+ onBlur?: () => void;
754
+ /** Cho phép chọn nhiều tệp. Mặc định false. */
755
+ multiple?: boolean;
756
+ /** Bộ lọc kiểu tệp cho input, vd ".xlsx,.csv,.json". */
757
+ accept?: string;
758
+ /** Gợi ý kích thước tối đa (MB) hiển thị trong helper text. */
759
+ maxSizeMB?: number;
760
+ disabled?: boolean;
761
+ id?: string;
762
+ 'aria-invalid'?: boolean;
763
+ /** Dòng helper dưới vùng thả, vd "Hỗ trợ .xlsx, .csv, .json — tối đa 20MB". */
764
+ hint?: React$1.ReactNode;
765
+ className?: string;
766
+ /** Nhãn đứng TRÊN khung nét đứt. Bỏ trống ⇒ không render dòng nào. */
767
+ title?: React$1.ReactNode;
768
+ /** Dòng chữ chính trong khung nét đứt. */
769
+ primaryText?: React$1.ReactNode;
770
+ /** Có giá trị ⇒ hiện thêm nút bấm chọn tệp trong khung. Bỏ trống ⇒ không có nút. */
771
+ browseFilesLabel?: string;
772
+ /**
773
+ * `aria-label` của nút gỡ tệp đã chọn. Bỏ trống ⇒ `Xóa tệp <tên tệp>`.
774
+ *
775
+ * Có prop này vì màn convert theo bản bàn giao phải giữ nguyên văn nhãn cũ (vd `Gỡ file đính
776
+ * kèm`), trong khi nhãn mặc định kèm tên tệp đọc dễ hơn cho màn mới.
777
+ */
778
+ removeFileLabel?: string;
779
+ }
780
+ /**
781
+ * Vùng kéo–thả / chọn tệp dạng controlled (value/onChange) — phù hợp để bọc
782
+ * trong một field react-hook-form. Ở chế độ đơn tệp, `value` là File|null và
783
+ * `onChange` phát ra File|null; ở chế độ multiple, `value` là File[] và
784
+ * `onChange` phát ra File[].
785
+ */
786
+ declare function FileUpload({ value, onChange, afterChange, onBlur, multiple, accept, maxSizeMB, disabled, id, 'aria-invalid': ariaInvalid, hint, className, title, primaryText, browseFilesLabel, removeFileLabel, }: FileUploadProps): React$1.JSX.Element;
787
+
788
+ interface OptionCardItem {
789
+ value: string;
790
+ label: string;
791
+ description?: string;
792
+ icon?: LucideIcon;
793
+ disabled?: boolean;
794
+ }
795
+ interface OptionCardGroupProps {
796
+ options: OptionCardItem[];
797
+ value?: string;
798
+ onChange?: (value: string) => void;
799
+ onBlur?: () => void;
800
+ /** number of columns on >=sm screens; default = options.length (capped at 4). */
801
+ columns?: number;
802
+ 'aria-invalid'?: boolean;
803
+ disabled?: boolean;
804
+ className?: string;
805
+ }
806
+ /**
807
+ * Nhóm "thẻ" chọn-một xếp theo hàng, như radio group giàu hình hơn: mỗi thẻ có
808
+ * icon, tiêu đề đậm và phụ đề xám. Thẻ được chọn được tô viền primary + ring +
809
+ * nền primary/5. Fully controlled (value/onChange) để tự wire vào react-hook-form.
810
+ */
811
+ declare function OptionCardGroup({ options, value, onChange, onBlur, columns, 'aria-invalid': ariaInvalid, disabled, className, }: OptionCardGroupProps): React$1.JSX.Element;
812
+
813
+ declare function Input({ className, type, ...props }: React$1.ComponentProps<'input'>): React$1.JSX.Element;
814
+
815
+ declare function InputPassword({ className, ...props }: React$1.ComponentProps<'input'>): React$1.JSX.Element;
816
+
817
+ declare function RadioGroup({ className, ...props }: React$1.ComponentProps<typeof RadioGroup$1.Root>): React$1.JSX.Element;
818
+ declare function RadioGroupItem({ className, ...props }: React$1.ComponentProps<typeof RadioGroup$1.Item>): React$1.JSX.Element;
819
+
820
+ declare function Select({ ...props }: React$1.ComponentProps<typeof Select$1.Root>): React$1.JSX.Element;
821
+ declare function SelectGroup({ className, ...props }: React$1.ComponentProps<typeof Select$1.Group>): React$1.JSX.Element;
822
+ declare function SelectValue({ ...props }: React$1.ComponentProps<typeof Select$1.Value>): React$1.JSX.Element;
823
+ declare function SelectTrigger({ className, size, children, ...props }: React$1.ComponentProps<typeof Select$1.Trigger> & {
824
+ size?: 'sm' | 'default';
825
+ }): React$1.JSX.Element;
826
+ declare function SelectContent({ className, children, position, align, ...props }: React$1.ComponentProps<typeof Select$1.Content>): React$1.JSX.Element;
827
+ declare function SelectLabel({ className, ...props }: React$1.ComponentProps<typeof Select$1.Label>): React$1.JSX.Element;
828
+ declare function SelectItem({ className, children, ...props }: React$1.ComponentProps<typeof Select$1.Item>): React$1.JSX.Element;
829
+ declare function SelectSeparator({ className, ...props }: React$1.ComponentProps<typeof Select$1.Separator>): React$1.JSX.Element;
830
+ declare function SelectScrollUpButton({ className, ...props }: React$1.ComponentProps<typeof Select$1.ScrollUpButton>): React$1.JSX.Element;
831
+ declare function SelectScrollDownButton({ className, ...props }: React$1.ComponentProps<typeof Select$1.ScrollDownButton>): React$1.JSX.Element;
832
+
833
+ declare function Switch({ className, size, ...props }: React$1.ComponentProps<typeof Switch$1.Root> & {
834
+ size?: 'sm' | 'default';
835
+ }): React$1.JSX.Element;
836
+
837
+ declare function Textarea({ className, ...props }: React$1.ComponentProps<'textarea'>): React$1.JSX.Element;
838
+
839
+ type DatePickerInputProps = ComponentProps<typeof DatePickerInput>;
840
+ type FormLayoutProps = {
841
+ horizontal?: boolean;
842
+ controlFirst?: boolean;
843
+ };
844
+ type FormControlProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>, TTransformedValues = TFieldValues> = {
845
+ name: TName;
846
+ label: ReactNode;
847
+ description?: ReactNode;
848
+ required?: boolean;
849
+ control: ControllerProps<TFieldValues, TName, TTransformedValues>['control'];
850
+ };
851
+ type FormFieldRenderArgs<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>, TTransformedValues> = Parameters<ControllerProps<TFieldValues, TName, TTransformedValues>['render']>[0] & {
852
+ invalid: boolean;
853
+ };
854
+ type FormFieldProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>, TTransformedValues = TFieldValues> = FormControlProps<TFieldValues, TName, TTransformedValues> & FormLayoutProps & {
855
+ render: (args: FormFieldRenderArgs<TFieldValues, TName, TTransformedValues>) => ReactNode;
856
+ };
857
+ declare function FormField<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>, TTransformedValues = TFieldValues>({ control, name, label, description, required, horizontal, controlFirst, render, }: FormFieldProps<TFieldValues, TName, TTransformedValues>): React$1.JSX.Element;
858
+ type FormInputProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> = FormControlProps<TFieldValues, TName> & FormLayoutProps & {
859
+ fieldProps?: Omit<ComponentProps<typeof Input>, 'name' | 'value' | 'onChange' | 'onBlur' | 'ref' | 'aria-invalid' | 'id'>;
860
+ };
861
+ declare function FormInput<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>({ fieldProps, ...formProps }: FormInputProps<TFieldValues, TName>): React$1.JSX.Element;
862
+ type FormPasswordProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> = FormControlProps<TFieldValues, TName> & FormLayoutProps & {
863
+ fieldProps?: Omit<ComponentProps<typeof InputPassword>, 'name' | 'value' | 'onChange' | 'onBlur' | 'ref' | 'aria-invalid' | 'id'>;
864
+ };
865
+ declare function FormPassword<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>({ fieldProps, ...formProps }: FormPasswordProps<TFieldValues, TName>): React$1.JSX.Element;
866
+ type FormTextareaProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> = FormControlProps<TFieldValues, TName> & FormLayoutProps & {
867
+ fieldProps?: Omit<ComponentProps<typeof Textarea>, 'name' | 'value' | 'onChange' | 'onBlur' | 'ref' | 'aria-invalid' | 'id'>;
868
+ };
869
+ declare function FormTextarea<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>({ fieldProps, ...formProps }: FormTextareaProps<TFieldValues, TName>): React$1.JSX.Element;
870
+ type FormSelectProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> = FormControlProps<TFieldValues, TName> & FormLayoutProps & {
871
+ options: {
872
+ label: string;
873
+ value: string;
874
+ }[];
875
+ placeholder?: string;
876
+ emptyValue?: string;
877
+ children?: ReactNode;
878
+ transform?: (value: string) => string | null | number | boolean;
879
+ fieldProps?: {
880
+ /** @deprecated Radix Select — không còn dùng; giữ để tương thích API cũ */
881
+ select?: Record<string, unknown>;
882
+ /** @deprecated — dùng `buttonTriggerProps` */
883
+ trigger?: Omit<ComponentProps<typeof SelectTrigger>, 'aria-invalid' | 'id' | 'onBlur'>;
884
+ searchable?: boolean;
885
+ showClearable?: boolean;
886
+ buttonTriggerProps?: Combobox2Props['buttonTriggerProps'];
887
+ };
888
+ };
889
+ declare function FormSelect<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>({ options, placeholder, transform, emptyValue, fieldProps, required, ...formProps }: FormSelectProps<TFieldValues, TName>): React$1.JSX.Element;
890
+ type ComboboxOption = {
891
+ label: string;
892
+ value: string;
893
+ };
894
+ type FormComboboxProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> = FormControlProps<TFieldValues, TName> & FormLayoutProps & {
895
+ emptyValue?: number | string | null;
896
+ fieldProps: {
897
+ options: ComboboxOption[];
898
+ placeholder?: string;
899
+ className?: string;
900
+ showTrigger?: boolean;
901
+ showClear?: boolean;
902
+ };
903
+ };
904
+ declare function FormCombobox<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>({ fieldProps, emptyValue, ...formProps }: FormComboboxProps<TFieldValues, TName>): React$1.JSX.Element;
905
+ type FormCombobox2Props<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> = FormControlProps<TFieldValues, TName> & FormLayoutProps & {
906
+ fieldProps: Omit<Combobox2Props, 'value' | 'onChange' | 'hasError'> & {
907
+ afterChange?: Combobox2Props['onChange'];
908
+ };
909
+ };
910
+ declare function FormCombobox2<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>({ fieldProps, ...formProps }: FormCombobox2Props<TFieldValues, TName>): React$1.JSX.Element;
911
+ type FormTreeComboboxProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> = FormControlProps<TFieldValues, TName> & FormLayoutProps & {
912
+ fieldProps: {
913
+ options: TreeOption$1[];
914
+ placeholder?: string;
915
+ multiple?: boolean;
916
+ searchable?: boolean;
917
+ showCheckboxes?: boolean;
918
+ className?: string;
919
+ };
920
+ };
921
+ declare function FormTreeCombobox<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>({ fieldProps, ...formProps }: FormTreeComboboxProps<TFieldValues, TName>): React$1.JSX.Element;
922
+ type RadioGroupOption = {
923
+ label: string;
924
+ value: string;
925
+ disabled?: boolean;
926
+ };
927
+ type FormRadioGroupProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> = FormControlProps<TFieldValues, TName> & FormLayoutProps & {
928
+ options: RadioGroupOption[];
929
+ orientation?: 'vertical' | 'horizontal';
930
+ transform?: (value: string) => string | null | number | boolean;
931
+ repairValue?: (value: string) => string;
932
+ fieldProps?: Omit<ComponentProps<typeof RadioGroup>, 'value' | 'onValueChange' | 'name'>;
933
+ };
934
+ declare function FormRadioGroup<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>({ options, orientation, transform, repairValue, fieldProps, ...formProps }: FormRadioGroupProps<TFieldValues, TName>): React$1.JSX.Element;
935
+ type FormCheckboxProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> = FormControlProps<TFieldValues, TName> & FormLayoutProps & {
936
+ fieldProps?: Omit<ComponentProps<typeof Checkbox>, 'checked' | 'onCheckedChange' | 'name' | 'ref'>;
937
+ };
938
+ declare function FormCheckbox<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>({ fieldProps, ...formProps }: FormCheckboxProps<TFieldValues, TName>): React$1.JSX.Element;
939
+ type FormDatePickerProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> = FormControlProps<TFieldValues, TName> & FormLayoutProps & {
940
+ hookForm?: DatePickerInputProps['hookForm'];
941
+ fieldProps?: Omit<DatePickerInputProps, 'value' | 'onChange' | 'field' | 'hookForm'>;
942
+ };
943
+ declare function FormDatePicker<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>({ hookForm, fieldProps, ...formProps }: FormDatePickerProps<TFieldValues, TName>): React$1.JSX.Element;
944
+ type FormSwitchProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> = FormControlProps<TFieldValues, TName> & FormLayoutProps & {
945
+ fieldProps?: Omit<ComponentProps<typeof Switch>, 'checked' | 'onCheckedChange' | 'name' | 'ref'>;
946
+ };
947
+ declare function FormSwitch<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>({ fieldProps, ...formProps }: FormSwitchProps<TFieldValues, TName>): React$1.JSX.Element;
948
+ type FormFileUploadProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> = FormControlProps<TFieldValues, TName> & FormLayoutProps & {
949
+ fieldProps?: Omit<ComponentProps<typeof FileUpload>, 'value' | 'onChange' | 'onBlur' | 'aria-invalid' | 'id'>;
950
+ };
951
+ declare function FormFileUpload<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>({ fieldProps, ...formProps }: FormFileUploadProps<TFieldValues, TName>): React$1.JSX.Element;
952
+ type FormOptionCardsProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> = FormControlProps<TFieldValues, TName> & FormLayoutProps & {
953
+ fieldProps: Omit<ComponentProps<typeof OptionCardGroup>, 'value' | 'onChange' | 'onBlur' | 'aria-invalid'>;
954
+ };
955
+ declare function FormOptionCards<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>({ fieldProps, ...formProps }: FormOptionCardsProps<TFieldValues, TName>): React$1.JSX.Element;
956
+ type FormFieldMappingProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> = FormControlProps<TFieldValues, TName> & FormLayoutProps & {
957
+ fieldProps?: Omit<ComponentProps<typeof FieldMappingEditor>, 'value' | 'onChange' | 'onBlur' | 'aria-invalid'>;
958
+ };
959
+ declare function FormFieldMapping<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>({ fieldProps, ...formProps }: FormFieldMappingProps<TFieldValues, TName>): React$1.JSX.Element;
960
+ /** @deprecated Use {@link FormField} instead */
961
+ declare const FormBase: typeof FormField;
962
+
963
+ declare function HoverCard({ ...props }: React$1.ComponentProps<typeof HoverCard$1.Root>): React$1.JSX.Element;
964
+ declare function HoverCardTrigger({ ...props }: React$1.ComponentProps<typeof HoverCard$1.Trigger>): React$1.JSX.Element;
965
+ declare function HoverCardContent({ className, align, sideOffset, ...props }: React$1.ComponentProps<typeof HoverCard$1.Content>): React$1.JSX.Element;
966
+
967
+ declare function InputGroup({ className, ...props }: React$1.ComponentProps<'div'>): React$1.JSX.Element;
968
+ declare const inputGroupAddonVariants: (props?: ({
969
+ align?: "inline-start" | "inline-end" | "block-start" | "block-end" | null | undefined;
970
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
971
+ declare function InputGroupAddon({ className, align, ...props }: React$1.ComponentProps<'div'> & VariantProps<typeof inputGroupAddonVariants>): React$1.JSX.Element;
972
+ declare const inputGroupButtonVariants: (props?: ({
973
+ size?: "xs" | "sm" | "icon-xs" | "icon-sm" | null | undefined;
974
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
975
+ declare function InputGroupButton({ className, type, variant, size, ...props }: Omit<React$1.ComponentProps<typeof Button>, 'size'> & VariantProps<typeof inputGroupButtonVariants>): React$1.JSX.Element;
976
+ declare function InputGroupText({ className, ...props }: React$1.ComponentProps<'span'>): React$1.JSX.Element;
977
+ declare function InputGroupInput({ className, ...props }: React$1.ComponentProps<'input'>): React$1.JSX.Element;
978
+ declare function InputGroupTextarea({ className, ...props }: React$1.ComponentProps<'textarea'>): React$1.JSX.Element;
979
+
980
+ declare function InputOTP({ className, containerClassName, ...props }: React$1.ComponentProps<typeof OTPInput> & {
981
+ containerClassName?: string;
982
+ }): React$1.JSX.Element;
983
+ declare function InputOTPGroup({ className, ...props }: React$1.ComponentProps<'div'>): React$1.JSX.Element;
984
+ declare function InputOTPSlot({ index, className, ...props }: React$1.ComponentProps<'div'> & {
985
+ index: number;
986
+ }): React$1.JSX.Element;
987
+ declare function InputOTPSeparator({ ...props }: React$1.ComponentProps<'div'>): React$1.JSX.Element;
988
+
989
+ /** Whitelist icon lucide dùng cho Properties (ST-9). Key = tên icon dùng khi lưu spec. */
990
+ declare const ICON_WHITELIST: Record<string, LucideIcon>;
991
+ /** Tên icon hợp lệ (union các key của whitelist mặc định). */
992
+ declare const ICON_WHITELIST_NAMES: string[];
993
+ interface IconPickerProps {
994
+ /** Tên icon đang chọn (một trong các key của `icons`). */
995
+ value?: string;
996
+ /** Gọi khi chọn icon — trả tên icon. */
997
+ onChange?: (name: string) => void;
998
+ /** Bản đồ icon cho phép chọn (mặc định {@link ICON_WHITELIST}). */
999
+ icons?: Record<string, LucideIcon>;
1000
+ placeholder?: string;
1001
+ disabled?: boolean;
1002
+ className?: string;
1003
+ id?: string;
1004
+ 'aria-label'?: string;
1005
+ }
1006
+ /**
1007
+ * IconPicker — Command + Popover + grid icon lucide (whitelist). Dùng cho Properties (ST-9).
1008
+ * Component ĐỘC LẬP, không sửa component có sẵn.
1009
+ */
1010
+ declare function IconPicker({ value, onChange, icons, placeholder, disabled, className, id, 'aria-label': ariaLabel, }: IconPickerProps): React$1.JSX.Element;
1011
+
1012
+ declare function ItemGroup({ className, ...props }: React$1.ComponentProps<'div'>): React$1.JSX.Element;
1013
+ declare function ItemSeparator({ className, ...props }: React$1.ComponentProps<typeof Separator>): React$1.JSX.Element;
1014
+ declare const itemVariants: (props?: ({
1015
+ variant?: "default" | "outline" | "muted" | null | undefined;
1016
+ size?: "default" | "xs" | "sm" | null | undefined;
1017
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
1018
+ declare function Item({ className, variant, size, asChild, ...props }: React$1.ComponentProps<'div'> & VariantProps<typeof itemVariants> & {
1019
+ asChild?: boolean;
1020
+ }): React$1.JSX.Element;
1021
+ declare const itemMediaVariants: (props?: ({
1022
+ variant?: "default" | "icon" | "image" | null | undefined;
1023
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
1024
+ declare function ItemMedia({ className, variant, ...props }: React$1.ComponentProps<'div'> & VariantProps<typeof itemMediaVariants>): React$1.JSX.Element;
1025
+ declare function ItemContent({ className, ...props }: React$1.ComponentProps<'div'>): React$1.JSX.Element;
1026
+ declare function ItemTitle({ className, ...props }: React$1.ComponentProps<'div'>): React$1.JSX.Element;
1027
+ declare function ItemDescription({ className, ...props }: React$1.ComponentProps<'p'>): React$1.JSX.Element;
1028
+ declare function ItemActions({ className, ...props }: React$1.ComponentProps<'div'>): React$1.JSX.Element;
1029
+ declare function ItemHeader({ className, ...props }: React$1.ComponentProps<'div'>): React$1.JSX.Element;
1030
+ declare function ItemFooter({ className, ...props }: React$1.ComponentProps<'div'>): React$1.JSX.Element;
1031
+
1032
+ declare function Kbd({ className, ...props }: React.ComponentProps<'kbd'>): React$1.JSX.Element;
1033
+ declare function KbdGroup({ className, ...props }: React.ComponentProps<'div'>): React$1.JSX.Element;
1034
+
1035
+ interface MasonryProps extends React$1.HTMLAttributes<HTMLDivElement> {
1036
+ /** Số cột (mặc định 3). */
1037
+ columns?: number;
1038
+ /** Khoảng cách ngang + dọc giữa các item (px, mặc định 16). */
1039
+ gutter?: number;
1040
+ /** Danh sách item (nếu không truyền thì dùng `children`). */
1041
+ items?: React$1.ReactNode[];
1042
+ }
1043
+ declare function Masonry({ columns, gutter, items, children, className, style, ...rest }: MasonryProps): React$1.JSX.Element;
1044
+
1045
+ declare function Menubar({ className, ...props }: React$1.ComponentProps<typeof Menubar$1.Root>): React$1.JSX.Element;
1046
+ declare function MenubarMenu({ ...props }: React$1.ComponentProps<typeof Menubar$1.Menu>): React$1.JSX.Element;
1047
+ declare function MenubarGroup({ ...props }: React$1.ComponentProps<typeof Menubar$1.Group>): React$1.JSX.Element;
1048
+ declare function MenubarPortal({ ...props }: React$1.ComponentProps<typeof Menubar$1.Portal>): React$1.JSX.Element;
1049
+ declare function MenubarRadioGroup({ ...props }: React$1.ComponentProps<typeof Menubar$1.RadioGroup>): React$1.JSX.Element;
1050
+ declare function MenubarTrigger({ className, ...props }: React$1.ComponentProps<typeof Menubar$1.Trigger>): React$1.JSX.Element;
1051
+ declare function MenubarContent({ className, align, alignOffset, sideOffset, ...props }: React$1.ComponentProps<typeof Menubar$1.Content>): React$1.JSX.Element;
1052
+ declare function MenubarItem({ className, inset, variant, ...props }: React$1.ComponentProps<typeof Menubar$1.Item> & {
1053
+ inset?: boolean;
1054
+ variant?: 'default' | 'destructive';
1055
+ }): React$1.JSX.Element;
1056
+ declare function MenubarCheckboxItem({ className, children, checked, inset, ...props }: React$1.ComponentProps<typeof Menubar$1.CheckboxItem> & {
1057
+ inset?: boolean;
1058
+ }): React$1.JSX.Element;
1059
+ declare function MenubarRadioItem({ className, children, inset, ...props }: React$1.ComponentProps<typeof Menubar$1.RadioItem> & {
1060
+ inset?: boolean;
1061
+ }): React$1.JSX.Element;
1062
+ declare function MenubarLabel({ className, inset, ...props }: React$1.ComponentProps<typeof Menubar$1.Label> & {
1063
+ inset?: boolean;
1064
+ }): React$1.JSX.Element;
1065
+ declare function MenubarSeparator({ className, ...props }: React$1.ComponentProps<typeof Menubar$1.Separator>): React$1.JSX.Element;
1066
+ declare function MenubarShortcut({ className, ...props }: React$1.ComponentProps<'span'>): React$1.JSX.Element;
1067
+ declare function MenubarSub({ ...props }: React$1.ComponentProps<typeof Menubar$1.Sub>): React$1.JSX.Element;
1068
+ declare function MenubarSubTrigger({ className, inset, children, ...props }: React$1.ComponentProps<typeof Menubar$1.SubTrigger> & {
1069
+ inset?: boolean;
1070
+ }): React$1.JSX.Element;
1071
+ declare function MenubarSubContent({ className, ...props }: React$1.ComponentProps<typeof Menubar$1.SubContent>): React$1.JSX.Element;
1072
+
1073
+ type NativeSelectProps = Omit<React$1.ComponentProps<'select'>, 'size'> & {
1074
+ size?: 'sm' | 'default';
1075
+ };
1076
+ declare function NativeSelect({ className, size, ...props }: NativeSelectProps): React$1.JSX.Element;
1077
+ declare function NativeSelectOption({ ...props }: React$1.ComponentProps<'option'>): React$1.JSX.Element;
1078
+ declare function NativeSelectOptGroup({ className, ...props }: React$1.ComponentProps<'optgroup'>): React$1.JSX.Element;
1079
+
1080
+ declare function NavigationMenu({ className, children, viewport, ...props }: React$1.ComponentProps<typeof NavigationMenu$1.Root> & {
1081
+ viewport?: boolean;
1082
+ }): React$1.JSX.Element;
1083
+ declare function NavigationMenuList({ className, ...props }: React$1.ComponentProps<typeof NavigationMenu$1.List>): React$1.JSX.Element;
1084
+ declare function NavigationMenuItem({ className, ...props }: React$1.ComponentProps<typeof NavigationMenu$1.Item>): React$1.JSX.Element;
1085
+ declare const navigationMenuTriggerStyle: (props?: class_variance_authority_types.ClassProp | undefined) => string;
1086
+ declare function NavigationMenuTrigger({ className, children, ...props }: React$1.ComponentProps<typeof NavigationMenu$1.Trigger>): React$1.JSX.Element;
1087
+ declare function NavigationMenuContent({ className, ...props }: React$1.ComponentProps<typeof NavigationMenu$1.Content>): React$1.JSX.Element;
1088
+ declare function NavigationMenuViewport({ className, ...props }: React$1.ComponentProps<typeof NavigationMenu$1.Viewport>): React$1.JSX.Element;
1089
+ declare function NavigationMenuLink({ className, ...props }: React$1.ComponentProps<typeof NavigationMenu$1.Link>): React$1.JSX.Element;
1090
+ declare function NavigationMenuIndicator({ className, ...props }: React$1.ComponentProps<typeof NavigationMenu$1.Indicator>): React$1.JSX.Element;
1091
+
1092
+ declare function Pagination({ className, ...props }: React$1.ComponentProps<'nav'>): React$1.JSX.Element;
1093
+ declare function PaginationContent({ className, ...props }: React$1.ComponentProps<'ul'>): React$1.JSX.Element;
1094
+ declare function PaginationItem({ ...props }: React$1.ComponentProps<'li'>): React$1.JSX.Element;
1095
+ type PaginationLinkProps = {
1096
+ isActive?: boolean;
1097
+ } & Pick<React$1.ComponentProps<typeof Button>, 'size'> & React$1.ComponentProps<'a'>;
1098
+ declare function PaginationLink({ className, isActive, size, ...props }: PaginationLinkProps): React$1.JSX.Element;
1099
+ declare function PaginationPrevious({ className, text, ...props }: React$1.ComponentProps<typeof PaginationLink> & {
1100
+ text?: string;
1101
+ }): React$1.JSX.Element;
1102
+ declare function PaginationNext({ className, text, ...props }: React$1.ComponentProps<typeof PaginationLink> & {
1103
+ text?: string;
1104
+ }): React$1.JSX.Element;
1105
+ declare function PaginationEllipsis({ className, ...props }: React$1.ComponentProps<'span'>): React$1.JSX.Element;
1106
+
1107
+ declare function Popover({ ...props }: React$1.ComponentProps<typeof Popover$1.Root>): React$1.JSX.Element;
1108
+ declare function PopoverTrigger({ ...props }: React$1.ComponentProps<typeof Popover$1.Trigger>): React$1.JSX.Element;
1109
+ declare function PopoverContent({ className, align, sideOffset, ...props }: React$1.ComponentProps<typeof Popover$1.Content>): React$1.JSX.Element;
1110
+ declare function PopoverAnchor({ ...props }: React$1.ComponentProps<typeof Popover$1.Anchor>): React$1.JSX.Element;
1111
+ declare function PopoverHeader({ className, ...props }: React$1.ComponentProps<'div'>): React$1.JSX.Element;
1112
+ declare function PopoverTitle({ className, ...props }: React$1.ComponentProps<'h2'>): React$1.JSX.Element;
1113
+ declare function PopoverDescription({ className, ...props }: React$1.ComponentProps<'p'>): React$1.JSX.Element;
1114
+
1115
+ /**
1116
+ * Popconfirm — hộp xác nhận nhỏ bung ra ngay cạnh phần tử trigger.
1117
+ * Port theo API của antd `Popconfirm` sang idiom shadcn (dựng trên Popover + Button).
1118
+ *
1119
+ * Cách dùng:
1120
+ * <Popconfirm title="Xóa mục này?" description="Không thể hoàn tác." onConfirm={handleDelete}>
1121
+ * <Button variant="destructive">Xóa</Button>
1122
+ * </Popconfirm>
1123
+ *
1124
+ * `onConfirm` có thể trả về Promise — nút OK sẽ hiện trạng thái loading và
1125
+ * popup chỉ đóng khi Promise resolve.
1126
+ */
1127
+ type ButtonProps = React$1.ComponentProps<typeof Button>;
1128
+ interface PopconfirmProps {
1129
+ /** Phần tử kích hoạt (bắt buộc là 1 element nhận ref). */
1130
+ children: React$1.ReactElement;
1131
+ title: React$1.ReactNode;
1132
+ description?: React$1.ReactNode;
1133
+ onConfirm?: (e?: React$1.MouseEvent<HTMLElement>) => void | Promise<unknown>;
1134
+ onCancel?: (e?: React$1.MouseEvent<HTMLElement>) => void;
1135
+ okText?: React$1.ReactNode;
1136
+ cancelText?: React$1.ReactNode;
1137
+ /** 'default' -> nút primary; 'danger' -> nút destructive. */
1138
+ okType?: 'default' | 'danger';
1139
+ okButtonProps?: ButtonProps;
1140
+ cancelButtonProps?: ButtonProps;
1141
+ showCancel?: boolean;
1142
+ /** Ẩn/hiện icon cảnh báo. Truyền `null` để bỏ icon, hoặc node tùy ý. */
1143
+ icon?: React$1.ReactNode;
1144
+ disabled?: boolean;
1145
+ open?: boolean;
1146
+ defaultOpen?: boolean;
1147
+ onOpenChange?: (open: boolean) => void;
1148
+ side?: React$1.ComponentProps<typeof PopoverContent>['side'];
1149
+ align?: React$1.ComponentProps<typeof PopoverContent>['align'];
1150
+ className?: string;
1151
+ }
1152
+ declare function Popconfirm({ children, title, description, onConfirm, onCancel, okText, cancelText, okType, okButtonProps, cancelButtonProps, showCancel, icon, disabled, open, defaultOpen, onOpenChange, side, align, className, }: PopconfirmProps): React$1.JSX.Element;
1153
+
1154
+ declare function Progress({ className, value, ...props }: React$1.ComponentProps<typeof Progress$1.Root>): React$1.JSX.Element;
1155
+
1156
+ declare function ResizablePanelGroup({ className, ...props }: ResizablePrimitive.GroupProps): React$1.JSX.Element;
1157
+ declare function ResizablePanel({ ...props }: ResizablePrimitive.PanelProps): React$1.JSX.Element;
1158
+ declare function ResizableHandle({ withHandle, className, ...props }: ResizablePrimitive.SeparatorProps & {
1159
+ withHandle?: boolean;
1160
+ }): React$1.JSX.Element;
1161
+
1162
+ declare function ScrollArea({ className, children, ...props }: React$1.ComponentProps<typeof ScrollArea$1.Root>): React$1.JSX.Element;
1163
+ declare function ScrollBar({ className, orientation, ...props }: React$1.ComponentProps<typeof ScrollArea$1.ScrollAreaScrollbar>): React$1.JSX.Element;
1164
+
1165
+ declare function Sheet({ ...props }: React$1.ComponentProps<typeof Dialog$1.Root>): React$1.JSX.Element;
1166
+ declare function SheetTrigger({ ...props }: React$1.ComponentProps<typeof Dialog$1.Trigger>): React$1.JSX.Element;
1167
+ declare function SheetClose({ ...props }: React$1.ComponentProps<typeof Dialog$1.Close>): React$1.JSX.Element;
1168
+ declare function SheetContent({ className, children, side, showCloseButton, ...props }: React$1.ComponentProps<typeof Dialog$1.Content> & {
1169
+ side?: 'top' | 'right' | 'bottom' | 'left';
1170
+ showCloseButton?: boolean;
1171
+ }): React$1.JSX.Element;
1172
+ declare function SheetHeader({ className, ...props }: React$1.ComponentProps<'div'>): React$1.JSX.Element;
1173
+ declare function SheetFooter({ className, ...props }: React$1.ComponentProps<'div'>): React$1.JSX.Element;
1174
+ declare function SheetTitle({ className, ...props }: React$1.ComponentProps<typeof Dialog$1.Title>): React$1.JSX.Element;
1175
+ declare function SheetDescription({ className, ...props }: React$1.ComponentProps<typeof Dialog$1.Description>): React$1.JSX.Element;
1176
+
1177
+ declare function TooltipProvider({ delayDuration, ...props }: React$1.ComponentProps<typeof Tooltip$1.Provider>): React$1.JSX.Element;
1178
+ declare function Tooltip({ ...props }: React$1.ComponentProps<typeof Tooltip$1.Root>): React$1.JSX.Element;
1179
+ declare function TooltipTrigger({ ...props }: React$1.ComponentProps<typeof Tooltip$1.Trigger>): React$1.JSX.Element;
1180
+ declare function TooltipContent({ className, classNameArrow, sideOffset, children, ...props }: React$1.ComponentProps<typeof Tooltip$1.Content> & {
1181
+ classNameArrow?: string;
1182
+ }): React$1.JSX.Element;
1183
+
1184
+ type SidebarContextProps = {
1185
+ state: 'expanded' | 'collapsed';
1186
+ open: boolean;
1187
+ setOpen: (open: boolean) => void;
1188
+ openMobile: boolean;
1189
+ setOpenMobile: (open: boolean) => void;
1190
+ isMobile: boolean;
1191
+ toggleSidebar: () => void;
1192
+ };
1193
+ declare function useSidebar(): SidebarContextProps;
1194
+ declare function SidebarProvider({ defaultOpen, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }: React$1.ComponentProps<'div'> & {
1195
+ defaultOpen?: boolean;
1196
+ open?: boolean;
1197
+ onOpenChange?: (open: boolean) => void;
1198
+ }): React$1.JSX.Element;
1199
+ declare function Sidebar({ side, variant, collapsible, className, children, dir, ...props }: React$1.ComponentProps<'div'> & {
1200
+ side?: 'left' | 'right';
1201
+ variant?: 'sidebar' | 'floating' | 'inset';
1202
+ collapsible?: 'offcanvas' | 'icon' | 'none';
1203
+ }): React$1.JSX.Element;
1204
+ declare function SidebarTrigger({ className, onClick, ...props }: React$1.ComponentProps<typeof Button>): React$1.JSX.Element;
1205
+ declare function SidebarRail({ className, ...props }: React$1.ComponentProps<'button'>): React$1.JSX.Element;
1206
+ declare function SidebarInset({ className, ...props }: React$1.ComponentProps<'main'>): React$1.JSX.Element;
1207
+ declare function SidebarInput({ className, ...props }: React$1.ComponentProps<typeof Input>): React$1.JSX.Element;
1208
+ declare function SidebarHeader({ className, ...props }: React$1.ComponentProps<'div'>): React$1.JSX.Element;
1209
+ declare function SidebarFooter({ className, ...props }: React$1.ComponentProps<'div'>): React$1.JSX.Element;
1210
+ declare function SidebarSeparator({ className, ...props }: React$1.ComponentProps<typeof Separator>): React$1.JSX.Element;
1211
+ declare function SidebarContent({ className, ...props }: React$1.ComponentProps<'div'>): React$1.JSX.Element;
1212
+ declare function SidebarGroup({ className, ...props }: React$1.ComponentProps<'div'>): React$1.JSX.Element;
1213
+ declare function SidebarGroupLabel({ className, asChild, ...props }: React$1.ComponentProps<'div'> & {
1214
+ asChild?: boolean;
1215
+ }): React$1.JSX.Element;
1216
+ declare function SidebarGroupAction({ className, asChild, ...props }: React$1.ComponentProps<'button'> & {
1217
+ asChild?: boolean;
1218
+ }): React$1.JSX.Element;
1219
+ declare function SidebarGroupContent({ className, ...props }: React$1.ComponentProps<'div'>): React$1.JSX.Element;
1220
+ declare function SidebarMenu({ className, ...props }: React$1.ComponentProps<'ul'>): React$1.JSX.Element;
1221
+ declare function SidebarMenuItem({ className, ...props }: React$1.ComponentProps<'li'>): React$1.JSX.Element;
1222
+ declare const sidebarMenuButtonVariants: (props?: ({
1223
+ variant?: "default" | "outline" | null | undefined;
1224
+ size?: "default" | "sm" | "lg" | null | undefined;
1225
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
1226
+ declare function SidebarMenuButton({ asChild, isActive, variant, size, tooltip, className, ...props }: React$1.ComponentProps<'button'> & {
1227
+ asChild?: boolean;
1228
+ isActive?: boolean;
1229
+ tooltip?: string | React$1.ComponentProps<typeof TooltipContent>;
1230
+ } & VariantProps<typeof sidebarMenuButtonVariants>): React$1.JSX.Element;
1231
+ declare function SidebarMenuAction({ className, asChild, showOnHover, ...props }: React$1.ComponentProps<'button'> & {
1232
+ asChild?: boolean;
1233
+ showOnHover?: boolean;
1234
+ }): React$1.JSX.Element;
1235
+ declare function SidebarMenuBadge({ className, ...props }: React$1.ComponentProps<'div'>): React$1.JSX.Element;
1236
+ declare function SidebarMenuSkeleton({ className, showIcon, ...props }: React$1.ComponentProps<'div'> & {
1237
+ showIcon?: boolean;
1238
+ }): React$1.JSX.Element;
1239
+ declare function SidebarMenuSub({ className, ...props }: React$1.ComponentProps<'ul'>): React$1.JSX.Element;
1240
+ declare function SidebarMenuSubItem({ className, ...props }: React$1.ComponentProps<'li'>): React$1.JSX.Element;
1241
+ declare function SidebarMenuSubButton({ asChild, size, isActive, noTruncate, className, ...props }: React$1.ComponentProps<'a'> & {
1242
+ asChild?: boolean;
1243
+ size?: 'sm' | 'md';
1244
+ isActive?: boolean;
1245
+ noTruncate?: boolean;
1246
+ }): React$1.JSX.Element;
1247
+
1248
+ declare function Skeleton({ className, ...props }: React.ComponentProps<'div'>): React$1.JSX.Element;
1249
+
1250
+ declare function Slider({ className, defaultValue, value, min, max, ...props }: React$1.ComponentProps<typeof Slider$1.Root>): React$1.JSX.Element;
1251
+
1252
+ declare const Toaster: ({ ...props }: ToasterProps) => React$1.JSX.Element;
1253
+
1254
+ declare function Spinner({ className, ...props }: React.ComponentProps<'svg'>): React$1.JSX.Element;
1255
+
1256
+ /**
1257
+ * Splitter — bố cục chia vùng kéo được (resizable split panel).
1258
+ * Port API/hành vi của antd `Splitter` sang idiom của repo này: THUẦN
1259
+ * React + Tailwind token (`cn`) + `lucide-react`, KHÔNG dùng
1260
+ * `@rc-component/*`, KHÔNG CSS-in-JS, KHÔNG `@ant-design/icons`.
1261
+ *
1262
+ * Khác biệt so với bản antd (cố ý, để giữ gọn cho design-system):
1263
+ * - Đo container bằng `ResizeObserver` NATIVE (không phải @rc-component).
1264
+ * - Kéo bằng Pointer Events (`onPointerDown/Move/Up` + `setPointerCapture`)
1265
+ * thay cho mouse/touch riêng — hỗ trợ cảm ứng tốt hơn.
1266
+ * - Nút thu gọn (collapse) LUÔN hiển thị (không có chế độ hover-only
1267
+ * `showCollapsibleIcon:'auto'` của antd) để trạng thái tĩnh nhìn rõ nút.
1268
+ * - KHÔNG hỗ trợ: `lazy`, semantic `classNames`/`styles`, `destroyOnHidden`,
1269
+ * double-click reset, custom `draggerIcon`/`collapsibleIcon`, RTL.
1270
+ *
1271
+ * Cách dùng:
1272
+ * <Splitter style={{ height: 200 }}>
1273
+ * <Splitter.Panel defaultSize="40%" min="20%" max="70%">A</Splitter.Panel>
1274
+ * <Splitter.Panel>B</Splitter.Panel>
1275
+ * </Splitter>
1276
+ *
1277
+ * Kích thước (`size`/`defaultSize`/`min`/`max`) nhận `number` (px) hoặc
1278
+ * chuỗi phần trăm `'NN%'` — giống antd.
1279
+ */
1280
+ type SizeInput = number | string;
1281
+ type Orientation = 'horizontal' | 'vertical';
1282
+ interface SplitterPanelProps {
1283
+ /** Ngưỡng nhỏ nhất (px hoặc '%'). */
1284
+ min?: SizeInput;
1285
+ /** Ngưỡng lớn nhất (px hoặc '%'). */
1286
+ max?: SizeInput;
1287
+ /** Kích thước có kiểm soát (controlled) (px hoặc '%'). */
1288
+ size?: SizeInput;
1289
+ /** Kích thước khởi tạo (uncontrolled) (px hoặc '%'). */
1290
+ defaultSize?: SizeInput;
1291
+ /**
1292
+ * Cho phép thu gọn nhanh. `true` = thu gọn được từ cả hai phía.
1293
+ * `{ start }` = nút thu gọn phía đầu (thanh chia TRƯỚC panel này),
1294
+ * `{ end }` = nút thu gọn phía cuối (thanh chia SAU panel này).
1295
+ */
1296
+ collapsible?: boolean | {
1297
+ start?: boolean;
1298
+ end?: boolean;
1299
+ };
1300
+ /** Cho kéo thay đổi kích thước. Mặc định true. */
1301
+ resizable?: boolean;
1302
+ className?: string;
1303
+ style?: React$1.CSSProperties;
1304
+ children?: React$1.ReactNode;
1305
+ }
1306
+ interface SplitterProps {
1307
+ /** Hướng chia. Mặc định 'horizontal'. */
1308
+ orientation?: Orientation;
1309
+ /** Alias cũ của antd cho hướng dọc. `orientation` được ưu tiên nếu có cả hai. */
1310
+ vertical?: boolean;
1311
+ className?: string;
1312
+ style?: React$1.CSSProperties;
1313
+ children?: React$1.ReactNode;
1314
+ /** Callback khi kích thước đổi (px). */
1315
+ onResize?: (sizes: number[]) => void;
1316
+ /** Callback trước khi bắt đầu kéo (px). */
1317
+ onResizeStart?: (sizes: number[]) => void;
1318
+ /** Callback khi kết thúc kéo (px). */
1319
+ onResizeEnd?: (sizes: number[]) => void;
1320
+ /** Callback khi thu gọn/mở lại. */
1321
+ onCollapse?: (collapsed: boolean[], sizes: number[]) => void;
1322
+ }
1323
+ /** Panel — chỉ dùng làm con trực tiếp của `<Splitter>`. */
1324
+ declare function SplitterPanel(_props: SplitterPanelProps): React$1.ReactElement | null;
1325
+ declare namespace SplitterPanel {
1326
+ var displayName: string;
1327
+ }
1328
+ declare function Splitter({ orientation, vertical, className, style, children, onResize, onResizeStart, onResizeEnd, onCollapse, }: SplitterProps): React$1.JSX.Element;
1329
+ declare namespace Splitter {
1330
+ var Panel: typeof SplitterPanel;
1331
+ }
1332
+
1333
+ interface ExtendedTableProps extends React$1.HTMLAttributes<HTMLTableElement> {
1334
+ divClassname?: string;
1335
+ }
1336
+ declare const Table: React$1.ForwardRefExoticComponent<ExtendedTableProps & {
1337
+ noWrapper?: boolean;
1338
+ divClassname?: string;
1339
+ hasBorder?: boolean;
1340
+ } & React$1.RefAttributes<HTMLTableElement>>;
1341
+ declare function TableHeader({ className, ...props }: React$1.ComponentProps<'thead'>): React$1.JSX.Element;
1342
+ declare function TableBody({ className, ...props }: React$1.ComponentProps<'tbody'>): React$1.JSX.Element;
1343
+ declare function TableFooter({ className, ...props }: React$1.ComponentProps<'tfoot'>): React$1.JSX.Element;
1344
+ declare function TableRow({ className, ...props }: React$1.ComponentProps<'tr'>): React$1.JSX.Element;
1345
+ declare function TableHead({ className, ...props }: React$1.ComponentProps<'th'>): React$1.JSX.Element;
1346
+ declare function TableCell({ className, ...props }: React$1.ComponentProps<'td'>): React$1.JSX.Element;
1347
+ declare function TableCaption({ className, ...props }: React$1.ComponentProps<'caption'>): React$1.JSX.Element;
1348
+
1349
+ declare function Tabs({ className, orientation, ...props }: React$1.ComponentProps<typeof Tabs$1.Root>): React$1.JSX.Element;
1350
+ declare const tabsListVariants: (props?: ({
1351
+ variant?: "default" | "line" | null | undefined;
1352
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
1353
+ declare function TabsList({ className, variant, ...props }: React$1.ComponentProps<typeof Tabs$1.List> & VariantProps<typeof tabsListVariants>): React$1.JSX.Element;
1354
+ declare function TabsTrigger({ className, ...props }: React$1.ComponentProps<typeof Tabs$1.Trigger>): React$1.JSX.Element;
1355
+ declare function TabsContent({ className, ...props }: React$1.ComponentProps<typeof Tabs$1.Content>): React$1.JSX.Element;
1356
+
1357
+ /** 3 phương thức toast được route theo DS. `rest` = tham số phụ (chỉ sonner dùng). */
1358
+ interface ToastAdapter {
1359
+ success: (msg: unknown, ...rest: unknown[]) => void;
1360
+ error: (msg: unknown, ...rest: unknown[]) => void;
1361
+ info: (msg: unknown, ...rest: unknown[]) => void;
1362
+ /**
1363
+ * TUỲ CHỌN có chủ ý (OD-CB3EB-mi-D11): thêm thành viên tuỳ chọn là ADDITIVE nên adapter bên ngoài
1364
+ * đang implement 3 phương thức vẫn biên dịch — `@pan-stack/ui` là package phát hành, không được phá
1365
+ * hợp đồng của người dùng ngoài. Không khai ⇒ Proxy fallback về sonner (hành vi cũ).
1366
+ */
1367
+ warning?: (msg: unknown, ...rest: unknown[]) => void;
1368
+ }
1369
+ /**
1370
+ * Đăng ký adapter toast theo DS đang active. `null` → về sonner (shadcn/default,
1371
+ * zero-behavior-change). Gọi từ DesignSystemProvider (preview) hoặc main.tsx (app export).
1372
+ */
1373
+ declare function setToastAdapter(adapter: ToastAdapter | null): void;
1374
+ declare const toast: typeof toast$1;
1375
+ declare const toastError: (error: any, message?: string) => Promise<void>;
1376
+ declare const toastAddError: (error: any, message?: string) => Promise<void>;
1377
+ declare const toastUpdateError: (error: any, message?: string) => Promise<void>;
1378
+
1379
+ declare function createAntdToastAdapter(): ToastAdapter;
1380
+
1381
+ declare function createMuiToastAdapter(): ToastAdapter;
1382
+
1383
+ declare const toggleVariants: (props?: ({
1384
+ variant?: "default" | "outline" | null | undefined;
1385
+ size?: "default" | "sm" | "lg" | null | undefined;
1386
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
1387
+ declare function Toggle({ className, variant, size, ...props }: React$1.ComponentProps<typeof Toggle$1.Root> & VariantProps<typeof toggleVariants>): React$1.JSX.Element;
1388
+
1389
+ declare function ToggleGroup({ className, variant, size, spacing, orientation, children, ...props }: React$1.ComponentProps<typeof ToggleGroup$1.Root> & VariantProps<typeof toggleVariants> & {
1390
+ spacing?: number;
1391
+ orientation?: 'horizontal' | 'vertical';
1392
+ }): React$1.JSX.Element;
1393
+ declare function ToggleGroupItem({ className, children, variant, size, ...props }: React$1.ComponentProps<typeof ToggleGroup$1.Item> & VariantProps<typeof toggleVariants>): React$1.JSX.Element;
1394
+
1395
+ interface TourStep {
1396
+ content?: React__default.ReactNode;
1397
+ selectorId: string;
1398
+ title: React__default.ReactNode;
1399
+ width?: number;
1400
+ height?: number;
1401
+ onClickWithinArea?: () => void;
1402
+ position?: 'top' | 'bottom' | 'left' | 'right';
1403
+ popoverOffsetTop?: number;
1404
+ }
1405
+ interface TourContextType {
1406
+ currentStep: number;
1407
+ totalSteps: number;
1408
+ nextStep: () => void;
1409
+ previousStep: () => void;
1410
+ endTour: () => void;
1411
+ isActive: boolean;
1412
+ startTour: () => void;
1413
+ setSteps: (steps: TourStep[]) => void;
1414
+ steps: TourStep[];
1415
+ isTourCompleted: boolean;
1416
+ setIsTourCompleted: (completed: boolean) => void;
1417
+ }
1418
+ interface TourProviderProps {
1419
+ children: React__default.ReactNode;
1420
+ onComplete?: () => void;
1421
+ className?: string;
1422
+ isTourCompleted?: boolean;
1423
+ }
1424
+ declare function TourProvider({ children, onComplete, className, isTourCompleted }: TourProviderProps): React__default.JSX.Element;
1425
+ declare function useTour(): TourContextType;
1426
+ declare const setLocalStorageTourCompleted: () => void;
1427
+ declare const setLocalStorageTourCanceled: () => void;
1428
+ declare const getLocalStorageTourStatus: () => string | null;
1429
+ declare const removeLocalStorageTourStatus: () => void;
1430
+ declare function TourAlertDialog({ isOpen, appLogo, setIsOpen, onCancel, productTitle, welcomeLead, welcomeDescription, }: {
1431
+ isOpen: boolean;
1432
+ appLogo: React__default.ReactNode;
1433
+ setIsOpen: (isOpen: boolean) => void;
1434
+ onCancel?: () => void;
1435
+ /** Tên sản phẩm / hệ thống (dòng in đậm) */
1436
+ productTitle?: string;
1437
+ /** Dòng mở đầu phía trên tên sản phẩm */
1438
+ welcomeLead?: string;
1439
+ /** Mô tả ngắn dưới tiêu đề */
1440
+ welcomeDescription?: React__default.ReactNode;
1441
+ }): React__default.JSX.Element | null;
1442
+
1443
+ /**
1444
+ * Transfer — hộp chọn hai cột (double column transfer). Port API cốt lõi của antd
1445
+ * `Transfer` sang idiom repo này: THUẦN React + Tailwind token (`cn`) +
1446
+ * `lucide-react`, ghép từ primitive có sẵn (`Checkbox`, `Button`, `Input`,
1447
+ * `ScrollArea`). KHÔNG dùng `@rc-component/*`, KHÔNG CSS-in-JS, KHÔNG `@ant-design/icons`.
1448
+ *
1449
+ * Cột trái = `source`, cột phải = `target`. Chọn item ở một cột rồi bấm nút mũi tên
1450
+ * để chuyển. Là component CÓ KIỂM SOÁT theo antd (`targetKeys` + `onChange`), nhưng
1451
+ * ở đây cho phép cả KHÔNG kiểm soát qua `defaultTargetKeys` để tiện dùng nhanh.
1452
+ *
1453
+ * Khác biệt so với antd (cố ý, giữ gọn cho design-system):
1454
+ * - Không hỗ trợ: `pagination`, `render props children`, `table/tree transfer`,
1455
+ * semantic `classNames/styles`, `status`, `selectionsIcon`, `actions` tùy biến.
1456
+ * - `oneWay`: ẩn nút chuyển-trái + ẩn checkbox cột phải; mỗi item phải có nút X để gỡ.
1457
+ *
1458
+ * Cách dùng:
1459
+ * <Transfer
1460
+ * dataSource={items}
1461
+ * targetKeys={targetKeys}
1462
+ * onChange={setTargetKeys}
1463
+ * titles={['Nguồn', 'Đã chọn']}
1464
+ * showSearch
1465
+ * />
1466
+ */
1467
+ interface TransferItem {
1468
+ key: string;
1469
+ title?: string;
1470
+ description?: React$1.ReactNode;
1471
+ disabled?: boolean;
1472
+ [k: string]: unknown;
1473
+ }
1474
+ type TransferDirection = 'left' | 'right';
1475
+ /** Tham số truyền vào render-prop `children` để tự vẽ thân danh sách mỗi cột (vd cắm Tree — "tree transfer"). */
1476
+ interface TransferListBodyProps<T extends TransferItem = TransferItem> {
1477
+ direction: TransferDirection;
1478
+ /** Item của cột (đã lọc theo tìm kiếm nếu bật). */
1479
+ filteredItems: T[];
1480
+ /** Key đang chọn TRONG cột này. */
1481
+ selectedKeys: string[];
1482
+ /** Chọn/bỏ chọn 1 item. */
1483
+ onItemSelect: (key: string, selected: boolean) => void;
1484
+ /** Chọn/bỏ chọn nhiều item. */
1485
+ onItemSelectAll: (keys: string[], selected: boolean) => void;
1486
+ disabled?: boolean;
1487
+ }
1488
+ interface TransferLocale {
1489
+ itemUnit: string;
1490
+ itemsUnit: string;
1491
+ searchPlaceholder: string;
1492
+ notFoundContent: React$1.ReactNode;
1493
+ }
1494
+ interface TransferProps<T extends TransferItem = TransferItem> {
1495
+ /** Nguồn dữ liệu. Item không nằm trong `targetKeys` hiển thị ở cột trái. */
1496
+ dataSource: T[];
1497
+ /** Key của item ở cột phải (controlled). */
1498
+ targetKeys?: string[];
1499
+ /** Key cột phải khởi tạo (uncontrolled). */
1500
+ defaultTargetKeys?: string[];
1501
+ /** Key các item đang chọn ở cả hai cột (controlled). */
1502
+ selectedKeys?: string[];
1503
+ /** Gọi khi chuyển cột xong. */
1504
+ onChange?: (nextTargetKeys: string[], direction: TransferDirection, moveKeys: string[]) => void;
1505
+ /** Gọi khi thay đổi lựa chọn. */
1506
+ onSelectChange?: (sourceSelectedKeys: string[], targetSelectedKeys: string[]) => void;
1507
+ /** Tiêu đề [trái, phải]. */
1508
+ titles?: [React$1.ReactNode, React$1.ReactNode];
1509
+ /** Render nội dung mỗi item. Mặc định: title (fallback key). */
1510
+ render?: (item: T) => React$1.ReactNode;
1511
+ /** Hiện ô tìm kiếm ở mỗi cột. */
1512
+ showSearch?: boolean;
1513
+ /** Lọc item khi tìm kiếm. Mặc định: khớp title/description/key (không phân biệt hoa thường). */
1514
+ filterOption?: (inputValue: string, item: T, direction: TransferDirection) => boolean;
1515
+ /** Vô hiệu hóa toàn bộ. */
1516
+ disabled?: boolean;
1517
+ /** Một chiều: chỉ chuyển sang phải, item cột phải có nút gỡ. */
1518
+ oneWay?: boolean;
1519
+ /** Hiện checkbox "chọn tất cả" ở đầu cột. Mặc định true. */
1520
+ showSelectAll?: boolean;
1521
+ /** i18n. */
1522
+ locale?: Partial<TransferLocale>;
1523
+ /** Trích key từ item (nếu item không có trường `key`). */
1524
+ rowKey?: (item: T) => string;
1525
+ /** Render footer mỗi cột. */
1526
+ footer?: (info: {
1527
+ direction: TransferDirection;
1528
+ }) => React$1.ReactNode;
1529
+ className?: string;
1530
+ /** Class cho vùng danh sách (mỗi cột). */
1531
+ listClassName?: string;
1532
+ /** Style cho vùng danh sách (mỗi cột) — vd chiều cao. */
1533
+ listStyle?: React$1.CSSProperties;
1534
+ /**
1535
+ * Render-prop thay THÂN danh sách mỗi cột. Nhận `TransferListBodyProps` (direction,
1536
+ * filteredItems, selectedKeys, onItemSelect, onItemSelectAll). Trả `undefined`/`null` cho
1537
+ * một hướng ⇒ hướng đó dùng danh sách mặc định. Dùng để cắm Tree vào ("tree transfer").
1538
+ */
1539
+ children?: (props: TransferListBodyProps<T>) => React$1.ReactNode;
1540
+ }
1541
+ declare function Transfer<T extends TransferItem = TransferItem>(props: TransferProps<T>): React$1.JSX.Element;
1542
+
1543
+ interface TreeCheckboxItem {
1544
+ /** Chuỗi hoặc ReactNode (icon/badge). `getItemName` của cây dùng bản chữ từ `ariaLabel` / `extractPlainText`. */
1545
+ name: React__default.ReactNode;
1546
+ children?: string[];
1547
+ /**
1548
+ * Nhãn thuần văn bản dùng làm accessible name (`aria-label`) cho checkbox của node —
1549
+ * cần khi `name` không phải chuỗi đơn giản (vd sau này hiển thị kèm icon/badge).
1550
+ * Không truyền thì tự suy ra từ `name`; nếu vẫn rỗng, dùng ID của node để không bao
1551
+ * giờ lộ ra `aria-label="[object Object]"`.
1552
+ */
1553
+ ariaLabel?: string;
1554
+ }
1555
+ type TreeCheckboxHandle = {
1556
+ /** Đọc mã đã chọn tại thời điểm gọi (dùng trước submit — tránh state React lệch). */
1557
+ getCheckedCodes: () => string[];
1558
+ };
1559
+ interface TreeCheckboxProps {
1560
+ items: Record<string, TreeCheckboxItem>;
1561
+ rootItemId?: string;
1562
+ initialExpandedItems?: string[];
1563
+ initialCheckedItems?: string[];
1564
+ onChange?: (checkedItems: string[]) => void;
1565
+ indent?: number;
1566
+ showDescription?: boolean;
1567
+ disabled?: boolean;
1568
+ }
1569
+ declare const TreeCheckbox: React__default.ForwardRefExoticComponent<TreeCheckboxProps & React__default.RefAttributes<TreeCheckboxHandle>>;
1570
+
1571
+ interface TreeProps extends React$1.HTMLAttributes<HTMLDivElement> {
1572
+ indent?: number;
1573
+ tree?: any;
1574
+ }
1575
+ declare function Tree({ indent, tree, className, ...props }: TreeProps): React$1.JSX.Element;
1576
+ interface TreeItemProps<T = any> extends React$1.HTMLAttributes<HTMLButtonElement> {
1577
+ item: ItemInstance<T>;
1578
+ indent?: number;
1579
+ asChild?: boolean;
1580
+ }
1581
+ declare function TreeItem<T = any>({ item, className, asChild, children, ...props }: Omit<TreeItemProps<T>, 'indent'>): React$1.JSX.Element;
1582
+ interface TreeItemLabelProps<T = any> extends React$1.HTMLAttributes<HTMLSpanElement> {
1583
+ item?: ItemInstance<T>;
1584
+ }
1585
+ declare function TreeItemLabel<T = any>({ item: propItem, children, className, ...props }: TreeItemLabelProps<T>): React$1.JSX.Element | null;
1586
+ declare function TreeDragLine({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): React$1.JSX.Element | null;
1587
+
1588
+ declare function BackToPageButton({ variant, tooltip, children, icon, iconPosition, ...props }: BaseButtonProps & {
1589
+ iconPosition?: 'left' | 'right';
1590
+ }): React$1.JSX.Element;
1591
+
1592
+ declare function ColorPalette({ className }: {
1593
+ className?: string;
1594
+ }): React$1.JSX.Element;
1595
+
1596
+ /**
1597
+ * Biến thể hiển thị của hộp thoại xác nhận hành động:
1598
+ * - `info` (xanh dương): xác nhận thông thường, vd "Xác nhận khởi tạo tiến trình".
1599
+ * - `danger` (đỏ): hành động nguy hiểm, vd "Xác nhận hủy tiến trình" — thường kèm lý do bắt buộc.
1600
+ * - `warning` (vàng/hổ phách): cảnh báo, vd "Xác nhận khởi tạo lại tiến trình" — thường kèm khung Lưu ý.
1601
+ */
1602
+ type ConfirmActionVariant = 'info' | 'danger' | 'warning';
1603
+ interface ConfirmActionDialogProps {
1604
+ open: boolean;
1605
+ onOpenChange: (open: boolean) => void;
1606
+ /** Biến thể hiển thị (màu + icon). Mặc định `info`. */
1607
+ variant?: ConfirmActionVariant;
1608
+ title: React.ReactNode;
1609
+ /** Mô tả; có thể chứa các đoạn in đậm. */
1610
+ description?: React.ReactNode;
1611
+ /** Khi `true`, hiện ô lý do bắt buộc; nút Đồng ý bị khóa cho tới khi nhập. */
1612
+ requireReason?: boolean;
1613
+ /** Nhãn ô lý do. Mặc định "Lý do". */
1614
+ reasonLabel?: React.ReactNode;
1615
+ reasonPlaceholder?: string;
1616
+ /** Số ký tự tối đa của lý do. Mặc định 500. */
1617
+ reasonMaxLength?: number;
1618
+ /**
1619
+ * Khi có giá trị, người dùng phải GÕ ĐÚNG chuỗi này (vd tên bản ghi / "XÓA") thì nút
1620
+ * xác nhận mới bật — dùng cho hành động nguy hiểm cần cân nhắc. Kết hợp được với `requireReason`.
1621
+ */
1622
+ requireMatch?: string;
1623
+ /** Nội dung khung Lưu ý (tuỳ chọn). */
1624
+ note?: React.ReactNode;
1625
+ /** Nhãn khung Lưu ý. Mặc định "Lưu ý". */
1626
+ noteLabel?: React.ReactNode;
1627
+ /** Nhãn nút xác nhận. Mặc định "Đồng ý". */
1628
+ confirmText?: string;
1629
+ /** Nhãn nút hủy. Mặc định "Hủy bỏ". */
1630
+ cancelText?: string;
1631
+ /** Nhận chuỗi lý do khi `requireReason` bật. */
1632
+ onConfirm: (reason?: string) => void | Promise<void>;
1633
+ }
1634
+ declare function ConfirmActionDialog({ open, onOpenChange, variant, title, description, requireReason, reasonLabel, reasonPlaceholder, reasonMaxLength, requireMatch, note, noteLabel, confirmText, cancelText, onConfirm, }: ConfirmActionDialogProps): React$1.JSX.Element;
1635
+
1636
+ type ConfirmBulkDeleteDialogProps = {
1637
+ open: boolean;
1638
+ onOpenChange: (open: boolean) => void;
1639
+ count: number;
1640
+ entityName?: string;
1641
+ itemLabels?: string[];
1642
+ confirmText?: string;
1643
+ cancelText?: string;
1644
+ deleting?: boolean;
1645
+ children?: React.ReactNode;
1646
+ onConfirm: () => void;
1647
+ };
1648
+ declare function ConfirmBulkDeleteDialog({ open, onOpenChange, count, entityName, confirmText, cancelText, deleting, children, onConfirm, }: ConfirmBulkDeleteDialogProps): React$1.JSX.Element;
1649
+
1650
+ interface ConfirmDeleteDialogProps {
1651
+ open: boolean;
1652
+ onOpenChange: (open: boolean) => void;
1653
+ title?: React.ReactNode;
1654
+ description?: React.ReactNode;
1655
+ confirmText?: string;
1656
+ cancelText?: string;
1657
+ onConfirm: () => void;
1658
+ }
1659
+ declare function ConfirmDeleteDialog({ open, onOpenChange, title, description, confirmText, cancelText, onConfirm, }: ConfirmDeleteDialogProps): React$1.JSX.Element;
1660
+
1661
+ interface ConfirmDialogProps {
1662
+ open: boolean;
1663
+ onOpenChange: (open: boolean) => void;
1664
+ title: string;
1665
+ description?: string;
1666
+ confirmText?: string;
1667
+ confirmType?: 'default' | 'danger';
1668
+ onConfirm: () => void | Promise<void>;
1669
+ }
1670
+ declare function ConfirmDialog({ open, onOpenChange, title, description, confirmText, confirmType, onConfirm, }: ConfirmDialogProps): React$1.JSX.Element;
1671
+
1672
+ declare function CopyButtonIcon({ variant, text, size, color, }: {
1673
+ variant?: 'outline' | 'ghost';
1674
+ text: string;
1675
+ size?: number | 'table';
1676
+ color?: string;
1677
+ }): React$1.JSX.Element;
1678
+
1679
+ interface ExpandSheetProps {
1680
+ title: string;
1681
+ subtitle?: string;
1682
+ children?: React.ReactNode;
1683
+ open?: boolean;
1684
+ onOpenChange?: (open: boolean) => void;
1685
+ defaultWidth?: number;
1686
+ /** Mở sheet ở chế độ full-width ngay khi hiển thị (vd màn ánh xạ rộng). */
1687
+ defaultExpanded?: boolean;
1688
+ footer?: React.ReactNode;
1689
+ headerMeta?: React.ReactNode;
1690
+ showCloseText?: boolean;
1691
+ closeText?: string;
1692
+ }
1693
+ declare function ExpandSheet({ title, subtitle, children, open: controlledOpen, onOpenChange, defaultWidth, defaultExpanded, footer, headerMeta, showCloseText, closeText, }: ExpandSheetProps): React$1.JSX.Element;
1694
+
1695
+ declare const defaultNS = "common";
1696
+ declare const fallbackLng = "vi";
1697
+ declare const supportedLngs: string[];
1698
+ declare function createI18nInstance(lng?: string, loadPath?: string): i18n;
1699
+ /**
1700
+ * Factory cho app HOST đã có resource tĩnh sẵn trong bundle (không cần fetch HTTP như
1701
+ * `createI18nInstance`) — dùng khi app tự merge resource JSON của mình (namespace riêng) rồi truyền
1702
+ * vào đây, thay vì tự `import i18next from 'i18next'` + `initReactI18next` trực tiếp. Đây là điểm
1703
+ * duy nhất app host cần gọi để KHÔNG phải khai `i18next`/`react-i18next` trong package.json của
1704
+ * mình — DS là nơi sở hữu 2 lib này.
1705
+ *
1706
+ * Interpolation dùng mặc định `{{var}}` (chuẩn i18next) — khác `createI18nInstance` (dùng `{var}`
1707
+ * cho HTTP backend load trực tiếp file JSON gốc chưa qua adapt).
1708
+ */
1709
+ declare function createStaticI18nInstance(config: {
1710
+ resources: Resource;
1711
+ lng: string;
1712
+ defaultNS?: string;
1713
+ ns?: string[];
1714
+ }): i18n;
1715
+
1716
+ interface I18nProviderProps {
1717
+ children: React.ReactNode;
1718
+ /** Locale mặc định, nếu không truyền sẽ tự detect từ cookie NEXT_LOCALE */
1719
+ defaultLocale?: string;
1720
+ /** Load path cho backend, mặc định: /locales/{{lng}}/{{ns}}.json */
1721
+ loadPath?: string;
1722
+ }
1723
+ declare function I18nProvider({ children, defaultLocale, loadPath }: I18nProviderProps): React$1.JSX.Element | null;
1724
+
1725
+ interface InfoCardProps {
1726
+ /** Tiêu đề section. */
1727
+ title: React.ReactNode;
1728
+ /** Icon hiển thị trong huy hiệu tròn cạnh tiêu đề. */
1729
+ icon?: LucideIcon;
1730
+ /** Cho phép thu gọn (hiện nút chevron). Mặc định true. */
1731
+ collapsible?: boolean;
1732
+ /** Trạng thái mở ban đầu khi collapsible (chế độ UNCONTROLLED). Mặc định true. */
1733
+ defaultOpen?: boolean;
1734
+ /** Trạng thái mở KIỂM SOÁT từ bên ngoài (controlled). Khi truyền, component không
1735
+ * tự giữ state nữa — cha quyết định mở/đóng (vd nút "Mở tất cả"/"Đóng tất cả").
1736
+ * Cần đi kèm `onOpenChange` để chevron vẫn bấm được. */
1737
+ open?: boolean;
1738
+ /** Callback khi user bấm chevron (chỉ dùng khi `open` được truyền — controlled). */
1739
+ onOpenChange?: (open: boolean) => void;
1740
+ /** Nội dung phụ bên phải header (vd badge, nút). */
1741
+ headerExtra?: React.ReactNode;
1742
+ children: React.ReactNode;
1743
+ className?: string;
1744
+ }
1745
+ /** Card có icon-title, có thể thu gọn — khung cho các nhóm thông tin chi tiết.
1746
+ * Uncontrolled mặc định (tự giữ state qua `defaultOpen`); truyền `open` (+ `onOpenChange`)
1747
+ * để chuyển sang controlled — cha điều khiển mở/đóng (vd broadcast "Mở tất cả"). */
1748
+ declare function InfoCard({ title, icon: Icon, collapsible, defaultOpen, open: openProp, onOpenChange, headerExtra, children, className, }: InfoCardProps): React$1.JSX.Element;
1749
+ interface DescriptionListProps {
1750
+ children: React.ReactNode;
1751
+ /** Số cột (mặc định 1). Dùng 2 cho layout rộng. */
1752
+ columns?: 1 | 2;
1753
+ className?: string;
1754
+ }
1755
+ /** Danh sách dòng nhãn–giá trị. Bọc nhiều <FieldCard/>. */
1756
+ declare function DescriptionList({ children, columns, className }: DescriptionListProps): React$1.JSX.Element;
1757
+ interface FieldCardProps {
1758
+ label: React.ReactNode;
1759
+ children: React.ReactNode;
1760
+ /** Bề rộng cột nhãn (mặc định 8rem). */
1761
+ labelWidth?: string;
1762
+ className?: string;
1763
+ }
1764
+ /** Một dòng nhãn–giá trị: nhãn xám trái, giá trị phải. */
1765
+ declare function FieldCard({ label, children, labelWidth, className }: FieldCardProps): React$1.JSX.Element;
1766
+
1767
+ declare function KTCard({ children, titleElement, actionsElement, }: {
1768
+ children: React.ReactNode;
1769
+ titleElement: React.ReactNode;
1770
+ actionsElement: React.ReactNode;
1771
+ }): React$1.JSX.Element;
1772
+
1773
+ interface LabeledProgressProps {
1774
+ /** Số bản ghi đã xử lý. */
1775
+ value: number;
1776
+ /** Tổng số bản ghi. */
1777
+ total: number;
1778
+ /** Nhãn trái, vd "Đang xử lý… tự động cập nhật sau 10 giây". */
1779
+ label?: React.ReactNode;
1780
+ /** Đơn vị sau bộ đếm, mặc định "bản ghi". */
1781
+ unit?: string;
1782
+ className?: string;
1783
+ }
1784
+ /** Thanh tiến trình có nhãn cho tác vụ xử lý theo lô — nhãn trái + bộ đếm phải, thanh bên dưới. */
1785
+ declare function LabeledProgress({ value, total, label, unit, className }: LabeledProgressProps): React$1.JSX.Element;
1786
+
1787
+ type LanguageOption$1 = {
1788
+ code: string;
1789
+ label: string;
1790
+ };
1791
+ declare function LanguageSwitcherI18next({ languages, onChange, }: {
1792
+ languages: LanguageOption$1[];
1793
+ onChange?: (newLocale: string) => void;
1794
+ }): React$1.JSX.Element;
1795
+
1796
+ type LanguageOption = {
1797
+ code: string;
1798
+ label: string;
1799
+ };
1800
+ /** Variant cho app dùng next-intl — truyền `locale` từ `useLocale()` ở caller. */
1801
+ declare function LanguageSwitcherNextIntl({ locale, languages, onChange, }: {
1802
+ locale: string;
1803
+ languages: LanguageOption[];
1804
+ onChange: (newLocale: string) => void;
1805
+ }): React$1.JSX.Element;
1806
+ /** @deprecated Dùng `LanguageSwitcherNextIntl` */
1807
+ declare const LanguageSwitcher: typeof LanguageSwitcherNextIntl;
1808
+
1809
+ type LanguageToggleI18nextProps = {
1810
+ variant?: VariantProps<typeof buttonVariants>['variant'];
1811
+ size?: VariantProps<typeof buttonVariants>['size'];
1812
+ className?: string;
1813
+ id?: string;
1814
+ };
1815
+ declare function LanguageToggleI18next({ variant, size, className, id, }: LanguageToggleI18nextProps): React$1.JSX.Element;
1816
+
1817
+ declare const Loading: ({ className }: {
1818
+ className?: string;
1819
+ }) => React$1.JSX.Element;
1820
+
1821
+ interface MaskedFieldProps {
1822
+ value: string;
1823
+ /** Số ký tự chấm tròn hiển thị khi đang che; mặc định 8. */
1824
+ maskLength?: number;
1825
+ /** Hiện giá trị ngay từ đầu; mặc định false. */
1826
+ defaultRevealed?: boolean;
1827
+ className?: string;
1828
+ }
1829
+ /**
1830
+ * Giá trị bị che mặc định kèm nút bật/tắt để lộ — dùng cho bí mật như token
1831
+ * xác thực API. Khi lộ sẽ hiển thị giá trị thật bằng font monospace.
1832
+ */
1833
+ declare function MaskedField({ value, maskLength, defaultRevealed, className }: MaskedFieldProps): React$1.JSX.Element;
1834
+
1835
+ /** Dropdown chọn Light / Dark / System — variant thay cho toggle 1-click (`mode-toggle.tsx`). */
1836
+ declare function ModeToggleDropdown(): React$1.JSX.Element;
1837
+ /** @deprecated Dùng `ModeToggleDropdown` */
1838
+ declare const ModeToggleV2: typeof ModeToggleDropdown;
1839
+
1840
+ /** Toggle sáng/tối một click — variant thay cho dropdown (`mode-toggle-v2.tsx`). */
1841
+ declare function ModeToggle(): React$1.JSX.Element;
1842
+
1843
+ /**
1844
+ * Bảng màu ngữ nghĩa cho banner/note (tự dựng trên div thường để cho phép nhiều
1845
+ * tone tuỳ biến — không phụ thuộc vào variant default/destructive của `alert`).
1846
+ */
1847
+ type NoticeTone = 'info' | 'warning' | 'danger' | 'success' | 'neutral';
1848
+ interface NoticeBannerProps {
1849
+ /** Tone màu. Mặc định 'info'; 'warning' = amber/vàng. */
1850
+ tone?: NoticeTone;
1851
+ /** Tiêu đề in đậm (tuỳ chọn). */
1852
+ title?: React.ReactNode;
1853
+ /** Icon ghi đè icon mặc định theo tone. */
1854
+ icon?: LucideIcon;
1855
+ /** Hiện icon. Mặc định true. */
1856
+ showIcon?: boolean;
1857
+ /** Nội dung phần thân. */
1858
+ children?: React.ReactNode;
1859
+ /** Slot hành động căn phải (vd nút). */
1860
+ action?: React.ReactNode;
1861
+ className?: string;
1862
+ }
1863
+ /** Banner/note màu nội tuyến — dùng cho cảnh báo, lưu ý trong dialog... */
1864
+ declare function NoticeBanner({ tone, title, icon, showIcon, children, action, className, }: NoticeBannerProps): React$1.JSX.Element;
1865
+
1866
+ declare function QueryProvider({ children }: {
1867
+ children: React.ReactNode;
1868
+ }): React$1.JSX.Element;
1869
+
1870
+ declare function RenderDateTime({ datetime, prefix, showTime, inline, }: {
1871
+ datetime: string | undefined;
1872
+ prefix?: React.ReactNode;
1873
+ showTime?: boolean;
1874
+ inline?: boolean;
1875
+ }): React$1.JSX.Element | null;
1876
+
1877
+ declare function RenderDate({ datetime, prefix, defaultValue, }: {
1878
+ datetime: string | null | undefined;
1879
+ prefix?: string;
1880
+ defaultValue?: string;
1881
+ }): React$1.JSX.Element;
1882
+
1883
+ declare function RenderTime({ datetime }: {
1884
+ datetime: string;
1885
+ }): React$1.JSX.Element;
1886
+
1887
+ declare function RenderUser({ user, defaultValue, renderExtraTop, renderExtraBottom, iconVariant, }: {
1888
+ user: Partial<{
1889
+ name: string;
1890
+ email: string;
1891
+ username: string;
1892
+ phone: string;
1893
+ fullName: string;
1894
+ }> | undefined;
1895
+ defaultValue?: string;
1896
+ renderExtraTop?: React.ReactNode[];
1897
+ renderExtraBottom?: React.ReactNode[];
1898
+ iconVariant?: 'default' | 'primary';
1899
+ }): React$1.JSX.Element;
1900
+
1901
+ type RenderCodeSize = 'xs' | 'sm' | 'md';
1902
+ interface CopyIconButtonProps {
1903
+ /** Chuỗi cần copy vào clipboard. Rỗng ⇒ không hiển thị nút. */
1904
+ value: string | number | null | undefined;
1905
+ /** Cỡ (đồng bộ với RenderCode). Mặc định `sm`. */
1906
+ size?: RenderCodeSize;
1907
+ /** Tooltip khi hover. Mặc định `'Sao chép mã'`. */
1908
+ tooltip?: string;
1909
+ /** Toast khi copy thành công. Mặc định `'Đã sao chép mã'`. */
1910
+ successMessage?: string;
1911
+ /** Class bổ sung cho button. */
1912
+ className?: string;
1913
+ /**
1914
+ * Luôn hiển thị nút (không hover-reveal). Bật cho khối lớn/detail sheet để
1915
+ * người dùng thấy ngay; tắt (mặc định) cho table cell nhiều dòng để đỡ nhiễu.
1916
+ */
1917
+ alwaysVisible?: boolean;
1918
+ }
1919
+ declare function CopyIconButton({ value, size, tooltip, successMessage, className, alwaysVisible, }: CopyIconButtonProps): React$1.JSX.Element | null;
1920
+ declare function CodeText({ value, size, muted, strong, breakAll, className, }: {
1921
+ value: ReactNode;
1922
+ size?: RenderCodeSize;
1923
+ muted?: boolean;
1924
+ strong?: boolean;
1925
+ breakAll?: boolean;
1926
+ className?: string;
1927
+ }): React$1.JSX.Element;
1928
+ interface RenderCodeProps {
1929
+ /** Giá trị mã hiển thị. `null`/`undefined`/rỗng ⇒ hiện `emptyText`. */
1930
+ value: string | number | null | undefined;
1931
+ /** Cỡ chữ + icon copy (xs/sm/md). Mặc định `sm`. */
1932
+ size?: RenderCodeSize;
1933
+ /** Chuỗi hiển thị khi không có giá trị. Mặc định `'—'` (không copy được). */
1934
+ emptyText?: ReactNode;
1935
+ /** Chữ mờ (muted-foreground) — dùng cho mã phụ trợ. */
1936
+ muted?: boolean;
1937
+ /** Chữ đậm (font-semibold) — dùng cho mã CHÍNH của bảng/detail. */
1938
+ strong?: boolean;
1939
+ /** Class bổ sung cho wrapper ngoài. */
1940
+ className?: string;
1941
+ /** Class bổ sung cho phần text mã. */
1942
+ valueClassName?: string;
1943
+ /** Node hiển thị TRƯỚC mã (icon...). Không tham gia copy. */
1944
+ prefix?: ReactNode;
1945
+ /** Node hiển thị SAU mã, TRƯỚC icon copy. Không tham gia copy. */
1946
+ suffix?: ReactNode;
1947
+ /** Text để copy — nếu khác `value` (vd copy full path/URL đầy đủ). Mặc định = `String(value)`. */
1948
+ copyValue?: string;
1949
+ /** Cho phép wrap-break các chuỗi dài (UUID/URL). */
1950
+ breakAll?: boolean;
1951
+ /** Tooltip khi hover nút copy. Mặc định `'Sao chép mã'`. */
1952
+ tooltip?: string;
1953
+ /** Thông báo toast khi copy thành công. Mặc định `'Đã sao chép mã'`. */
1954
+ successMessage?: string;
1955
+ /** Ẩn icon copy hoàn toàn. Hiếm khi dùng — chỉ khi mã nằm trong khối đã có copy button riêng. */
1956
+ hideCopy?: boolean;
1957
+ /** Luôn hiện nút copy (không hover-reveal). Mặc định `false` (chỉ hiện khi hover row/cell). */
1958
+ alwaysVisibleCopy?: boolean;
1959
+ }
1960
+ /**
1961
+ * Hiển thị một giá trị "mã" (code, id, uuid, packet-id, run-code, key...) kèm nút copy nhỏ.
1962
+ *
1963
+ * <ul>
1964
+ * <li>Font mono + `tabular-nums` + `font-medium` để mã đọc rõ, số đều ô.</li>
1965
+ * <li>Icon copy hover-reveal (dùng `group/copyable`) — không nhiễu bảng nhiều cột,
1966
+ * vẫn tab-focus được bằng bàn phím.</li>
1967
+ * <li>Sau khi copy: icon đổi thành check xanh + toast `'Đã sao chép mã'` (1.5s).</li>
1968
+ * <li>Không có giá trị ⇒ hiển thị `emptyText` (mặc định `'—'`) chữ mờ, không có nút copy.</li>
1969
+ * </ul>
1970
+ */
1971
+ declare function RenderCode({ value, size, emptyText, muted, strong, className, valueClassName, prefix, suffix, copyValue, breakAll, tooltip, successMessage, hideCopy, alwaysVisibleCopy, }: RenderCodeProps): React$1.JSX.Element;
1972
+
1973
+ declare const Required: ({ show }: {
1974
+ show?: boolean;
1975
+ }) => React$1.JSX.Element | null;
1976
+
1977
+ declare function SetDefaultButtonIcon({ variant, size, icon, tooltip, className, showTooltip, ...props }: BaseButtonProps): React$1.JSX.Element;
1978
+
1979
+ /**
1980
+ * Bảng màu ngữ nghĩa cho thẻ KPI (cùng họ với `status-badge`). Mỗi tone gồm nền
1981
+ * nhạt + chữ đậm cho huy hiệu icon, tái dùng đúng pattern light/dark.
1982
+ */
1983
+ type StatTone = 'gray' | 'amber' | 'blue' | 'orange' | 'green' | 'red';
1984
+ interface StatCardProps {
1985
+ /** Nhãn nhỏ (xám) phía trên con số. */
1986
+ label: React.ReactNode;
1987
+ /** Giá trị lớn — con số KPI. */
1988
+ value: React.ReactNode;
1989
+ /** Icon hiển thị trong huy hiệu vuông bo góc. */
1990
+ icon?: LucideIcon;
1991
+ /** Tone màu — tô huy hiệu icon và làm điểm nhấn cho giá trị. Mặc định `blue`. */
1992
+ tone?: StatTone;
1993
+ className?: string;
1994
+ }
1995
+ /** Thẻ KPI cho hàng tiêu đề dashboard: nhãn + số lớn bên trái, huy hiệu icon bên phải. */
1996
+ declare function StatCard({ label, value, icon: Icon, tone, className }: StatCardProps): React$1.JSX.Element;
1997
+
1998
+ /**
1999
+ * Bảng màu ngữ nghĩa cho badge trạng thái (tách khỏi shadcn `badge` để không lẫn
2000
+ * với variant gốc). Mỗi tone gồm nền nhạt + chữ đậm + màu chấm tròn.
2001
+ */
2002
+ type StatusTone = 'gray' | 'amber' | 'blue' | 'orange' | 'green' | 'red';
2003
+ interface StatusBadgeProps {
2004
+ /** Nhãn hiển thị. */
2005
+ children: React.ReactNode;
2006
+ /** Tone màu ngữ nghĩa. */
2007
+ tone?: StatusTone;
2008
+ /** Hiện chấm tròn ở đầu badge. */
2009
+ dot?: boolean;
2010
+ /** Icon tuỳ chọn (ưu tiên hơn `dot`). */
2011
+ icon?: LucideIcon;
2012
+ /** Animate icon (vd loader xoay cho trạng thái đang xử lý). */
2013
+ spin?: boolean;
2014
+ className?: string;
2015
+ /** Tooltip / title khi nhãn bị truncate. */
2016
+ title?: string;
2017
+ }
2018
+ declare function StatusBadge({ children, tone, dot, icon: Icon, spin, className, title, }: StatusBadgeProps): React$1.JSX.Element;
2019
+
2020
+ interface Step {
2021
+ id: string | number;
2022
+ title: string;
2023
+ subtitle?: string;
2024
+ }
2025
+ interface StepsProps {
2026
+ steps: Step[];
2027
+ currentStep: number;
2028
+ onStepChange?: (step: number) => void;
2029
+ /** Nội dung của bước đang chọn. Optional: dùng Steps làm thanh tiến trình thuần (không có
2030
+ * vùng nội dung) là hợp lệ — panui emit đúng dạng này cho `component: Steps` trong `ui:`. */
2031
+ children?: ReactNode;
2032
+ headerClassName?: string;
2033
+ headerLeftContent?: ReactNode;
2034
+ headerRightContent?: ReactNode;
2035
+ titleClassName?: string;
2036
+ subtitleClassName?: string;
2037
+ contentClassName?: string;
2038
+ footerClassName?: string;
2039
+ /** Nội dung cột giữa footer (hướng dẫn). Truyền ReactNode để tô màu (*) hoặc định dạng phức tạp. */
2040
+ footerDescription?: ReactNode;
2041
+ /** Các nút bên phải footer, hiển thị đúng thứ tự phần tử mảng (trái → phải). Khi truyền, thay thế nút Quay lại / Tiếp tục mặc định. */
2042
+ footerActions?: ReactNode[];
2043
+ /** Hiển thị dòng “Bước x / n • …” bên trái footer (mặc định true). */
2044
+ showFooterProgress?: boolean;
2045
+ prevButtonContent?: ReactNode;
2046
+ nextButtonContent?: ReactNode;
2047
+ onPrev?: () => void;
2048
+ onNext?: () => void;
2049
+ showPrevButton?: boolean;
2050
+ showNextButton?: boolean;
2051
+ disablePrevButton?: boolean;
2052
+ disableNextButton?: boolean;
2053
+ stepIndicatorClassName?: string;
2054
+ stepTitleClassName?: string;
2055
+ stepSubtitleClassName?: string;
2056
+ connectorClassName?: string;
2057
+ /** Ghi đè màu bước đã hoàn tất (mặc định dùng token success) */
2058
+ completedStepColor?: string;
2059
+ /** Ghi đè màu bước đang active (mặc định dùng token primary) */
2060
+ activeStepColor?: string;
2061
+ /** Ghi đè màu connector / bước chưa làm (mặc định dùng token border) */
2062
+ inactiveStepColor?: string;
2063
+ }
2064
+ declare function Steps({ steps, currentStep, onStepChange, children, headerClassName, headerLeftContent, headerRightContent, titleClassName, subtitleClassName, contentClassName, footerClassName, footerDescription, footerActions, showFooterProgress, prevButtonContent, nextButtonContent, onPrev, onNext, showPrevButton, showNextButton, disablePrevButton, disableNextButton, stepIndicatorClassName, stepTitleClassName, stepSubtitleClassName, connectorClassName, completedStepColor, activeStepColor, inactiveStepColor, }: StepsProps): React__default.JSX.Element;
2065
+
2066
+ declare function Team({ name, logo: Logo, plan }: {
2067
+ name: string;
2068
+ logo: React.ElementType;
2069
+ plan: string;
2070
+ }): React$1.JSX.Element;
2071
+
2072
+ declare function ThemeProvider({ children, ...props }: React$1.ComponentProps<typeof ThemeProvider$1>): React$1.JSX.Element;
2073
+
2074
+ /**
2075
+ * Khởi tạo i18next (namespace `common`) — idempotent. Gọi trước khi render
2076
+ * component dùng i18n. Trong preview design-sync: gọi ở đầu file preview.
2077
+ * Trong design render từ bundle: `window.WorkspaceUI.initI18n()`.
2078
+ */
2079
+ declare function initI18n(lng?: string): void;
2080
+
2081
+ /** Thứ tự sắp xếp các sự kiện trên timeline. */
2082
+ type TimelineSort = 'asc' | 'desc';
2083
+ interface TimelineStat {
2084
+ /** Nhãn hiển thị, vd "Đã ghi: 800". */
2085
+ label: string;
2086
+ /** Tông màu ngữ nghĩa của chip. */
2087
+ tone: 'green' | 'red' | 'gray';
2088
+ /** Icon tuỳ chọn (mặc định: CheckCircle2 cho green, X cho red). */
2089
+ icon?: LucideIcon;
2090
+ }
2091
+ interface TimelineItem {
2092
+ id: string;
2093
+ /** Mốc thời gian đã định dạng sẵn, vd "18/05/2026 08:30:00". */
2094
+ timestamp: string;
2095
+ /** Badge trạng thái tuỳ chọn ở đầu dòng. */
2096
+ badge?: {
2097
+ label: string;
2098
+ tone: StatusTone;
2099
+ icon?: LucideIcon;
2100
+ spin?: boolean;
2101
+ };
2102
+ /** Tên sự kiện/hành động (in đậm). */
2103
+ title: string;
2104
+ /** Người/đối tượng thực hiện (chữ mờ). */
2105
+ actor?: string;
2106
+ /** Mô tả tự do. */
2107
+ description?: React.ReactNode;
2108
+ /** Danh sách chip thống kê tuỳ chọn. */
2109
+ stats?: TimelineStat[];
2110
+ /** Dòng mã (monospace) làm nổi, vd "ERR_CONN_001 — Connection timeout after 30s". */
2111
+ code?: string;
2112
+ }
2113
+ interface TimelineProps {
2114
+ /** Caller truyền theo thứ tự thời gian tăng dần (cũ → mới). */
2115
+ items: TimelineItem[];
2116
+ /** Thứ tự sắp xếp (controlled). */
2117
+ sort?: TimelineSort;
2118
+ /** Callback khi đổi thứ tự (controlled). */
2119
+ onSortChange?: (s: TimelineSort) => void;
2120
+ /** Thứ tự ban đầu khi uncontrolled. Mặc định 'asc' (cũ đến mới). */
2121
+ defaultSort?: TimelineSort;
2122
+ className?: string;
2123
+ }
2124
+ /**
2125
+ * Timeline dọc cho tab "Lịch sử" — danh sách sự kiện audit theo thời gian, có
2126
+ * điều khiển sắp xếp cũ↔mới. Hỗ trợ uncontrolled (mặc định) hoặc controlled
2127
+ * qua cặp `sort`/`onSortChange` (giống info-card).
2128
+ */
2129
+ declare function Timeline({ items, sort, onSortChange, defaultSort, className }: TimelineProps): React$1.JSX.Element;
2130
+
2131
+ type TypographyVariant = 'title' | 'text' | 'paragraph' | 'link';
2132
+ type TypographyType = 'secondary' | 'success' | 'warning' | 'danger';
2133
+ type TitleLevel = 1 | 2 | 3 | 4 | 5;
2134
+ interface TypographyProps extends React$1.HTMLAttributes<HTMLElement> {
2135
+ /** Biến thể: title | text | paragraph | link (mặc định text). */
2136
+ variant?: TypographyVariant;
2137
+ /** Cấp tiêu đề 1..5 (chỉ khi variant=title, mặc định 1). */
2138
+ level?: TitleLevel;
2139
+ /** Màu ngữ nghĩa. */
2140
+ type?: TypographyType;
2141
+ /** Ghi đè thẻ HTML (vd 'p', 'div'). */
2142
+ as?: React$1.ElementType;
2143
+ /** true = cắt 1 dòng (truncate); số = cắt N dòng (line-clamp). */
2144
+ ellipsis?: boolean | number;
2145
+ disabled?: boolean;
2146
+ strong?: boolean;
2147
+ italic?: boolean;
2148
+ underline?: boolean;
2149
+ /** gạch ngang (del). */
2150
+ del?: boolean;
2151
+ code?: boolean;
2152
+ keyboard?: boolean;
2153
+ mark?: boolean;
2154
+ /** URL cho variant=link. */
2155
+ href?: string;
2156
+ children?: React$1.ReactNode;
2157
+ }
2158
+ declare function Typography({ variant, level, type, as, ellipsis, disabled, strong, italic, underline, del, code, keyboard, mark, href, className, children, ...rest }: TypographyProps): React$1.JSX.Element;
2159
+
2160
+ /**
2161
+ * Adapter điều hướng cho admin shell — core KHÔNG phụ thuộc router cụ thể
2162
+ * (không import next/navigation hay @tanstack/react-router). App cấp adapter
2163
+ * qua AdminNavProvider; mọi link/active-state trong shell đi qua đây nên dễ
2164
+ * kiểm soát ở mọi vị trí (sidebar, top-nav, breadcrumb, user menu).
2165
+ */
2166
+ type AdminNavLinkProps = {
2167
+ to: string;
2168
+ children?: React.ReactNode;
2169
+ } & Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'href'>;
2170
+ interface AdminNavAdapter {
2171
+ /** Link component — nhận `to`, render phần tử điều hướng của router. */
2172
+ Link: React.ComponentType<AdminNavLinkProps>;
2173
+ /** Hook trả về pathname hiện tại (reactive theo router của app). */
2174
+ usePathname: () => string;
2175
+ /** Điều hướng tới `to`. */
2176
+ push: (to: string) => void;
2177
+ /** Quay lại trang trước. */
2178
+ back: () => void;
2179
+ }
2180
+ declare function AdminNavProvider({ adapter, children }: {
2181
+ adapter: AdminNavAdapter;
2182
+ children: React.ReactNode;
2183
+ }): React$1.JSX.Element;
2184
+ declare function useAdminNav(): AdminNavAdapter;
2185
+
2186
+ /** Mục menu admin (sidebar + top-nav). Hỗ trợ 1 cấp con. */
2187
+ type AdminMenuItem = {
2188
+ title: string;
2189
+ url: string;
2190
+ icon?: LucideIcon;
2191
+ /** Vai trò yêu cầu — app tự lọc trước khi truyền vào shell (DI). */
2192
+ requiredRoles?: string[];
2193
+ /** Quyền (legacy NavGroup) — app tự lọc. */
2194
+ permissions?: string[];
2195
+ show?: boolean;
2196
+ items?: AdminSubMenuItem[];
2197
+ };
2198
+ type AdminSubMenuItem = {
2199
+ title: string;
2200
+ url: string;
2201
+ requiredRoles?: string[];
2202
+ permissions?: string[];
2203
+ show?: boolean;
2204
+ };
2205
+ /**
2206
+ * Một mục có "đang chọn" theo pathname không.
2207
+ * `exact` mặc định bật cho route gốc ('/admin', '/') để link dashboard không
2208
+ * sáng khi đang ở route con; còn lại dùng prefix-match.
2209
+ */
2210
+ declare function isMenuItemActive(pathname: string, url: string, exact?: boolean): boolean;
2211
+
2212
+ type AdminOrgUnit = {
2213
+ id: string;
2214
+ name: string;
2215
+ code: string;
2216
+ fullName: string;
2217
+ status: number;
2218
+ type: number;
2219
+ };
2220
+ type AdminIamRole = {
2221
+ id: string;
2222
+ code: string;
2223
+ name: string;
2224
+ };
2225
+ /** Thông tin user truyền vào shell (DI từ app). Giữ tối thiểu các field chung:
2226
+ * fullName (name), username, email, avatar (image), đơn vị (orgUnit), vai trò IAM. */
2227
+ type AdminUser = {
2228
+ name: string | null | undefined;
2229
+ username?: string | null;
2230
+ email?: string | null;
2231
+ image?: string | null;
2232
+ orgUnit?: AdminOrgUnit;
2233
+ iamRoles?: AdminIamRole[];
2234
+ };
2235
+ /** Brand inject vào shell — app cấp logo (vd. quốc huy) + tiêu đề. */
2236
+ type AdminBrand = {
2237
+ logo: ReactNode;
2238
+ title: string;
2239
+ subtitle?: string;
2240
+ };
2241
+ /** Các callback hành vi của shell — đều tùy chọn trừ signOut. */
2242
+ type AdminShellCallbacks = {
2243
+ signOut: () => void;
2244
+ onProfile?: () => void;
2245
+ onChangePassword?: () => void;
2246
+ /** Mở hướng dẫn cơ bản (tour). Không truyền → ẩn mục này. */
2247
+ onShowTour?: () => void;
2248
+ /** Quản lý phiên đăng nhập của user hiện tại. Không truyền → ẩn mục này. */
2249
+ onMySessions?: () => void;
2250
+ };
2251
+
2252
+ /** Logo mark generic — dùng `currentColor` để khớp `text-primary`. App có thể
2253
+ * thay bằng brand riêng qua prop `brand.logo` của shell. */
2254
+ declare function AppLogo(props: SVGProps<SVGSVGElement>): React$1.JSX.Element;
2255
+
2256
+ declare function NavGroup({ title, items, appId, hasPermissions, sidebarGroupClassName, }: {
2257
+ title?: string;
2258
+ items: AdminMenuItem[];
2259
+ appId?: number | null;
2260
+ hasPermissions?: (permissions: string[]) => boolean;
2261
+ sidebarGroupClassName?: string;
2262
+ }): React$1.JSX.Element;
2263
+
2264
+ declare function NavUser({ user, signOut, onProfile, onChangePassword, onShowTour, onMySessions, }: {
2265
+ user: AdminUser;
2266
+ } & AdminShellCallbacks): React$1.JSX.Element;
2267
+
2268
+ declare function AppSidebar({ brand, menuItems, navGroupTitle, user, appId, hasPermissions, signOut, onProfile, onChangePassword, onShowTour, onMySessions, }: {
2269
+ brand: AdminBrand;
2270
+ menuItems: AdminMenuItem[];
2271
+ navGroupTitle?: string;
2272
+ user: AdminUser;
2273
+ appId?: number | null;
2274
+ hasPermissions?: (permissions: string[]) => boolean;
2275
+ } & AdminShellCallbacks): React$1.JSX.Element;
2276
+
2277
+ /** Node menu cho dropdown top-nav — hỗ trợ lồng nhiều cấp (đệ quy). */
2278
+ type NavNode = {
2279
+ title: string;
2280
+ url?: string;
2281
+ icon?: LucideIcon;
2282
+ items?: NavNode[];
2283
+ };
2284
+ declare function TopNavigation({ brand, menuItems, demoNode, user, signOut, onChangePassword, onShowTour, onMySessions, defaultMoreMenuOpen, }: {
2285
+ brand: AdminBrand;
2286
+ menuItems: AdminMenuItem[];
2287
+ /** Node menu lồng nhiều cấp (minh hoạ) — không truyền thì không hiển thị. */
2288
+ demoNode?: NavNode;
2289
+ user: AdminUser;
2290
+ /**
2291
+ * Chỉ dùng cho demo/ảnh chụp tĩnh: mở sẵn menu "Thêm" (More) khi có mục bị
2292
+ * gom. Ứng dụng thật KHÔNG cần truyền (menu tự đóng, mở khi click).
2293
+ */
2294
+ defaultMoreMenuOpen?: boolean;
2295
+ } & AdminShellCallbacks): React$1.JSX.Element;
2296
+
2297
+ /**
2298
+ * Shell admin generic: tự chọn sidebar / top-nav qua `useLayout()`.
2299
+ * App inject user/menu/brand/callbacks (DI) — core không phụ thuộc auth/router.
2300
+ * Cần bọc trong `LayoutProvider` (mi/contexts/layout-context) và (nếu link động)
2301
+ * `AdminNavProvider` (mi/admin/nav-adapter).
2302
+ */
2303
+ declare function AdminLayoutContent({ children, user, menuItems, brand, navGroupTitle, appId, demoNode, demoMoreMenuOpen, signOut, onProfile, onChangePassword, onShowTour, onMySessions, }: {
2304
+ children: React.ReactNode;
2305
+ user: AdminUser;
2306
+ menuItems: AdminMenuItem[];
2307
+ brand: AdminBrand;
2308
+ navGroupTitle?: string;
2309
+ appId?: number | null;
2310
+ demoNode?: NavNode;
2311
+ /** Demo/ảnh tĩnh: mở sẵn menu "Thêm" (More) của top-nav khi có mục bị gom. */
2312
+ demoMoreMenuOpen?: boolean;
2313
+ } & AdminShellCallbacks): React$1.JSX.Element | null;
2314
+
2315
+ declare function LayoutHeaderBreadcrumb({ dashboardHref, values, }: {
2316
+ values: {
2317
+ label: string;
2318
+ href?: string;
2319
+ }[];
2320
+ dashboardHref?: string | null;
2321
+ }): React$1.JSX.Element;
2322
+
2323
+ declare function LayoutToggle(): React$1.JSX.Element;
2324
+
2325
+ declare const AdminPageTitle: ({ title, icon, extra, }: {
2326
+ title: string | React.ReactNode;
2327
+ icon?: React.ReactNode;
2328
+ /** Badge/meta sát chữ title, bên trong heading. */
2329
+ extra?: React.ReactNode;
2330
+ }) => React$1.JSX.Element;
2331
+ declare const AdminPageActions: ({ actions, className }: {
2332
+ actions: React.ReactNode[];
2333
+ className?: string;
2334
+ }) => React$1.JSX.Element | null;
2335
+ declare const AdminPageContent: ({ title, icon, actions, children, subtitle, titleExtra, showBackButton, backHref, fallbackHref, onBackClick, helpOptions, documentTitle, documentTitleSuffix, }: {
2336
+ title: string | React.ReactNode;
2337
+ icon?: React.ReactNode;
2338
+ actions?: React.ReactNode[];
2339
+ children: React.ReactNode;
2340
+ subtitle?: string | React.ReactNode;
2341
+ /** Badge/meta sát chữ title (trong heading), không nằm trong nhóm actions. */
2342
+ titleExtra?: React.ReactNode;
2343
+ showBackButton?: boolean;
2344
+ backHref?: string;
2345
+ fallbackHref?: string;
2346
+ /** Khi có: nút quay lại gọi callback thay vì điều hướng mặc định. */
2347
+ onBackClick?: () => void;
2348
+ helpOptions?: {
2349
+ content?: {
2350
+ title?: React.ReactNode;
2351
+ content: React.ReactNode;
2352
+ };
2353
+ video?: {
2354
+ title?: React.ReactNode;
2355
+ url: string;
2356
+ };
2357
+ };
2358
+ /** Override document.title khi `title` là ReactNode. */
2359
+ documentTitle?: string;
2360
+ /** Hậu tố document.title: `${title} | ${suffix}`. Không truyền → không đổi title. */
2361
+ documentTitleSuffix?: string;
2362
+ }) => React$1.JSX.Element;
2363
+ declare function AdminPageLayout({ children, breadcrumb, dashboardHref, headerSlot, }: {
2364
+ children: React.ReactNode;
2365
+ breadcrumb: {
2366
+ label: string;
2367
+ href?: string;
2368
+ }[];
2369
+ dashboardHref?: string | null;
2370
+ /** Slot góc phải header (vd. chuông thông báo của app). */
2371
+ headerSlot?: React.ReactNode;
2372
+ }): React$1.JSX.Element;
2373
+
2374
+ /** Một tín hiệu tin cậy trên panel thương hiệu (icon + dòng chữ ngắn). */
2375
+ type LoginTrustItem = {
2376
+ icon: LucideIcon;
2377
+ text: string;
2378
+ };
2379
+ type LoginShellProps = {
2380
+ /** Biểu mẫu đăng nhập (do app cấp — RHF/Keycloak/… nằm ở app, không ở đây). */
2381
+ children: ReactNode;
2382
+ /** Logo thương hiệu. Mặc định dùng `AppLogo` (khớp `text-sidebar-primary`). */
2383
+ logo?: ReactNode;
2384
+ /** Dòng eyebrow nhỏ, IN HOA phía trên tên hệ thống (vd. tên bộ/ngành). */
2385
+ brandEyebrow?: ReactNode;
2386
+ /** Tên hệ thống hiển thị cạnh logo (hero + mobile). */
2387
+ brandName?: ReactNode;
2388
+ /** Tiêu đề thẻ biểu mẫu (panel phải). */
2389
+ title: ReactNode;
2390
+ /** Mô tả ngắn dưới tiêu đề biểu mẫu. */
2391
+ subtitle?: ReactNode;
2392
+ /** Tiêu đề lớn trên panel thương hiệu (panel trái). */
2393
+ heroTitle?: ReactNode;
2394
+ /** Đoạn mô tả dưới `heroTitle`. */
2395
+ heroDescription?: ReactNode;
2396
+ /** Dòng tagline IN HOA trên `heroTitle` (panel trái). */
2397
+ tagline?: ReactNode;
2398
+ /** Danh sách tín hiệu tin cậy (icon + text) trên panel thương hiệu. */
2399
+ trustItems?: LoginTrustItem[];
2400
+ /** Nội dung chân trang dưới thẻ biểu mẫu (vd. dòng pháp lý). */
2401
+ footer?: ReactNode;
2402
+ /** Slot góc phải panel biểu mẫu (vd. nút đổi ngôn ngữ / chế độ tối). */
2403
+ headerSlot?: ReactNode;
2404
+ className?: string;
2405
+ };
2406
+ /**
2407
+ * Khung đăng nhập split-panel, tái sử dụng cho các sản phẩm cùng dòng.
2408
+ *
2409
+ * - Panel trái: hero thương hiệu (nền son đỏ + ánh vàng kim) — chỉ hiện ≥ lg.
2410
+ * - Panel phải: thẻ biểu mẫu căn giữa; app cắm biểu mẫu thật qua `children`.
2411
+ *
2412
+ * Thuần trình bày (không router `Link`, không i18n `t()`, không Keycloak). Toàn
2413
+ * bộ màu lấy từ token DS (`--sidebar*`, `--card`, `--border`…) nên đổi palette
2414
+ * cho app mới chỉ cần override token, không sửa code.
2415
+ */
2416
+ declare function LoginShell({ children, logo, brandEyebrow, brandName, title, subtitle, heroTitle, heroDescription, tagline, trustItems, footer, headerSlot, className, }: LoginShellProps): React$1.JSX.Element;
2417
+
2418
+ declare function AddButtonIcon({ variant, size, 'aria-label': ariaLabel, tooltip, className, showTooltip, ...props }: BaseButtonProps): React$1.JSX.Element;
2419
+
2420
+ declare function AddButton({ variant, tooltip, children, loading, 'aria-label': ariaLabel, ...props }: BaseButtonProps): React$1.JSX.Element;
2421
+
2422
+ declare function ButtonTooltipWrapper({ children, title, variant, isAllow, show, }: {
2423
+ children: React.ReactNode;
2424
+ title: string;
2425
+ variant?: 'destructive' | 'default' | 'warning' | 'success' | 'secondary' | 'outline' | 'ghost' | 'link';
2426
+ isAllow?: boolean;
2427
+ show?: boolean;
2428
+ }): React$1.JSX.Element | null;
2429
+
2430
+ declare function CancelButton({ variant, tooltip, children, 'aria-label': ariaLabel, ...props }: BaseButtonProps): React$1.JSX.Element;
2431
+
2432
+ declare function DeleteButtonIcon({ variant, size, 'aria-label': ariaLabel, tooltip, className, showTooltip, show, ...props }: BaseButtonProps): React$1.JSX.Element;
2433
+
2434
+ declare function EditButtonIcon({ variant, size, 'aria-label': ariaLabel, tooltip, className, showTooltip, ...props }: BaseButtonProps): React$1.JSX.Element;
2435
+
2436
+ /** Nút xuất danh sách / Excel (có nhãn) — variant outline mặc định. */
2437
+ declare function ExportButton({ variant, tooltip, children, loading, 'aria-label': ariaLabel, ...props }: BaseButtonProps): React$1.JSX.Element;
2438
+
2439
+ /** Nút xem lịch sử chạy (icon) — dùng cho cột thao tác. */
2440
+ declare function HistoryButtonIcon({ variant, size, 'aria-label': ariaLabel, tooltip, className, showTooltip, ...props }: BaseButtonProps): React$1.JSX.Element;
2441
+
2442
+ type IconTooltipButtonProps = BaseButtonProps & {
2443
+ title: string;
2444
+ icon: React.ReactNode;
2445
+ };
2446
+ declare function IconTooltipButton({ title, icon, showTooltip, show, variant, size, className, isAllow, ...props }: IconTooltipButtonProps): React$1.JSX.Element;
2447
+
2448
+ declare function PermissionButton({ isAllow, show, ...props }: BaseButtonProps): React$1.JSX.Element | null;
2449
+
2450
+ /**
2451
+ * Nút kích hoạt / dừng cấu hình (icon). Đổi tooltip + màu theo trạng thái qua
2452
+ * prop `tooltip`/`className` từ phía gọi (mặc định trung tính).
2453
+ */
2454
+ declare function PowerButtonIcon({ variant, size, 'aria-label': ariaLabel, tooltip, className, showTooltip, ...props }: BaseButtonProps): React$1.JSX.Element;
2455
+
2456
+ /** Nút làm mới danh sách (có nhãn) — variant outline mặc định. */
2457
+ declare function RefreshButton({ variant, tooltip, children, loading, 'aria-label': ariaLabel, ...props }: BaseButtonProps): React$1.JSX.Element;
2458
+
2459
+ /**
2460
+ * Nút đặt lại / làm mới điều kiện (icon), luôn có tooltip mặc định để người dùng hiểu hành động.
2461
+ */
2462
+ declare function ResetButtonIcon({ variant, size, tooltip, showTooltip, show, className, isAllow, 'aria-label': ariaLabel, ...props }: BaseButtonProps): React$1.JSX.Element | null;
2463
+
2464
+ declare function ResetButton({ variant, tooltip, children, 'aria-label': ariaLabel, ...props }: BaseButtonProps): React$1.JSX.Element;
2465
+
2466
+ declare function SaveButton({ variant, tooltip, children, loading, loadingText, 'aria-label': ariaLabel, ...props }: BaseButtonProps & {
2467
+ loadingText?: string;
2468
+ }): React$1.JSX.Element;
2469
+
2470
+ declare function SaveDraftButton({ variant, tooltip, children, loading, loadingText, className, 'aria-label': ariaLabel, ...props }: BaseButtonProps & {
2471
+ loadingText?: string;
2472
+ }): React$1.JSX.Element;
2473
+
2474
+ /** Nút dừng/hủy tiến trình (icon) — màu cảnh báo, dùng cho cột thao tác. */
2475
+ declare function StopButtonIcon({ variant, size, 'aria-label': ariaLabel, tooltip, className, showTooltip, show, ...props }: BaseButtonProps): React$1.JSX.Element;
2476
+
2477
+ declare function TooltipButton({ tooltip, children, 'aria-label': ariaLabel, ...props }: BaseButtonProps): React$1.JSX.Element;
2478
+
2479
+ declare function UpdateButton({ variant, tooltip, children, loading, 'aria-label': ariaLabel, ...props }: BaseButtonProps): React$1.JSX.Element;
2480
+
2481
+ /** Nút xem chi tiết (icon) — dùng cho cột thao tác trong bảng. */
2482
+ declare function ViewButtonIcon({ variant, size, tooltip, 'aria-label': ariaLabel, className, showTooltip, ...props }: BaseButtonProps): React$1.JSX.Element;
2483
+
2484
+ /** Nút xem dữ liệu gốc / payload đã gửi (icon) — dùng cho cột thao tác. */
2485
+ declare function ViewSourceButtonIcon({ variant, size, 'aria-label': ariaLabel, tooltip, className, showTooltip, ...props }: BaseButtonProps): React$1.JSX.Element;
2486
+
2487
+ declare function DeleteButton({ variant, tooltip, children, ...props }: BaseButtonProps): React$1.JSX.Element;
2488
+
2489
+ type LayoutMode = 'sidebar' | 'top-nav' | '';
2490
+ interface LayoutContextType {
2491
+ mode: LayoutMode;
2492
+ toggleMode: () => void;
2493
+ setMode: (mode: LayoutMode) => void;
2494
+ }
2495
+ declare const getLayoutMode: () => LayoutMode;
2496
+ declare function LayoutProvider({ children }: {
2497
+ children: React.ReactNode;
2498
+ }): React$1.JSX.Element;
2499
+ declare function useLayout(): LayoutContextType;
2500
+
2501
+ type TenantThemeConfig = {
2502
+ /** Màu chủ đạo (hex), bắt buộc — áp vào `--primary` và `--ring`. */
2503
+ primary: string;
2504
+ /** Màu sidebar (hex), tuỳ chọn — thiếu thì dùng luôn `primary`. Áp vào `--sidebar` và `--sidebar-ring`. */
2505
+ sidebar?: string;
2506
+ };
2507
+ interface TenantThemeContextType {
2508
+ theme: TenantThemeConfig;
2509
+ isLoading: boolean;
2510
+ error: unknown;
2511
+ /** Gọi lại fetch thủ công — hữu ích khi cần buộc tải lại sau khi khách hàng đổi màu ở trang cấu hình. */
2512
+ refresh: () => void;
2513
+ }
2514
+ declare const TENANT_THEME_STORAGE_KEY = "tenant-theme-cache-v1";
2515
+ /**
2516
+ * Áp `TenantThemeConfig` vào CSS variable thật của design system (xem `src/styles/globals.css`).
2517
+ * Hàm THUẦN — không đụng React, set trực tiếp qua `document.documentElement.style.setProperty` nên
2518
+ * test được độc lập (không cần render component).
2519
+ *
2520
+ * Không đổi `--primary-foreground`/`--sidebar-foreground` (chữ trên nền màu) vì chỉ có hex nền của
2521
+ * khách hàng, không đủ thông tin để tính lại màu chữ tương phản đúng — giữ nguyên theme gốc.
2522
+ */
2523
+ declare function applyTenantThemeVars(theme: TenantThemeConfig): void;
2524
+ /**
2525
+ * MOCK — giả lập gọi API backend thật lấy màu thương hiệu theo tenant.
2526
+ *
2527
+ * Dự án thật THAY hàm này bằng lời gọi API thật (vd `GET /tenant/theme`), GIỮ NGUYÊN chữ ký hàm
2528
+ * `(tenantId?) => Promise<TenantThemeConfig>` rồi truyền vào prop `fetchTenantTheme` của
2529
+ * `TenantThemeProvider` — không cần sửa gì trong Provider.
2530
+ */
2531
+ declare function mockFetchTenantTheme(tenantId?: string): Promise<TenantThemeConfig>;
2532
+ interface TenantThemeProviderProps {
2533
+ tenantId?: string;
2534
+ /** Mặc định = `mockFetchTenantTheme`. Dự án thật truyền hàm gọi API backend thật, cùng chữ ký. */
2535
+ fetchTenantTheme?: (tenantId?: string) => Promise<TenantThemeConfig>;
2536
+ /** Màu dùng khi CHƯA có cache và CHƯA fetch xong. Mặc định = màu hệ thống (preset 'green'). */
2537
+ fallback?: TenantThemeConfig;
2538
+ children: React.ReactNode;
2539
+ }
2540
+ declare function TenantThemeProvider({ tenantId, fetchTenantTheme, fallback, children, }: TenantThemeProviderProps): React$1.JSX.Element;
2541
+ declare function useTenantTheme(): TenantThemeContextType;
2542
+
2543
+ /** Một chỉ số nổi bật trong khối hero (giá trị lớn + nhãn ngắn). */
2544
+ type LandingStat = {
2545
+ value: ReactNode;
2546
+ label: ReactNode;
2547
+ };
2548
+ /** Một mục nghiệp vụ trong lưới tính năng (icon + tiêu đề + mô tả). */
2549
+ type LandingFeature = {
2550
+ icon: LucideIcon;
2551
+ title: ReactNode;
2552
+ description: ReactNode;
2553
+ };
2554
+ type LandingShellProps = {
2555
+ /** Logo thương hiệu. Mặc định dùng `AppLogo` (khớp `text-sidebar-primary`). */
2556
+ logo?: ReactNode;
2557
+ /** Tên hệ thống hiển thị cạnh logo trên hero. */
2558
+ brandName?: ReactNode;
2559
+ /** Dòng eyebrow nhỏ IN HOA phía trên tiêu đề hero (vd. tên cổng/bộ ngành). */
2560
+ eyebrow?: ReactNode;
2561
+ /** Tiêu đề lớn của hero. */
2562
+ title: ReactNode;
2563
+ /** Dòng thứ hai của tiêu đề, tô màu vàng kim (`text-sidebar-primary`). */
2564
+ titleHighlight?: ReactNode;
2565
+ /** Đoạn mô tả dưới tiêu đề hero. */
2566
+ description?: ReactNode;
2567
+ /** Danh sách chỉ số nổi bật dưới hero. */
2568
+ stats?: LandingStat[];
2569
+ /** Nhãn nút CTA chính — cổng vào màn đăng nhập. Mặc định "Đăng nhập". */
2570
+ loginLabel?: ReactNode;
2571
+ /** Callback khi bấm nút đăng nhập (app tự wire điều hướng — DS không có router). */
2572
+ onLoginClick?: () => void;
2573
+ /** Nhãn CTA phụ (tùy chọn). */
2574
+ secondaryLabel?: ReactNode;
2575
+ /** Đích của CTA phụ (neo/anchor trong trang). */
2576
+ secondaryHref?: string;
2577
+ /** Eyebrow của khối tính năng. */
2578
+ featuresEyebrow?: ReactNode;
2579
+ /** Tiêu đề khối tính năng. */
2580
+ featuresTitle?: ReactNode;
2581
+ /** Mô tả khối tính năng. */
2582
+ featuresDescription?: ReactNode;
2583
+ /** Danh sách nghiệp vụ hiển thị dạng lưới. */
2584
+ features: LandingFeature[];
2585
+ /** Tiêu đề khối CTA cuối trang. */
2586
+ finalTitle?: ReactNode;
2587
+ /** Mô tả khối CTA cuối trang. */
2588
+ finalDescription?: ReactNode;
2589
+ /** Dòng chân trang nhỏ dưới CTA cuối (vd. dòng pháp lý). */
2590
+ footnote?: ReactNode;
2591
+ className?: string;
2592
+ };
2593
+ /**
2594
+ * Khung trang giới thiệu (landing) công khai, tái sử dụng cho sản phẩm cùng dòng.
2595
+ *
2596
+ * Cấu trúc: Hero (thương hiệu + tiêu đề + chỉ số + CTA đăng nhập) → lưới tính năng
2597
+ * → CTA đóng trang. Nút CTA chính là lối vào màn đăng nhập — app wire điều hướng
2598
+ * thật qua `onLoginClick`.
2599
+ *
2600
+ * Thuần trình bày (không router `Link`, không i18n `t()`, không animation cuộn).
2601
+ * Toàn bộ màu lấy từ token DS (`--sidebar*`, `--background`, `--card`…) nên đổi
2602
+ * palette cho app mới chỉ cần override token, không sửa code.
2603
+ */
2604
+ declare function LandingShell({ logo, brandName, eyebrow, title, titleHighlight, description, stats, loginLabel, onLoginClick, secondaryLabel, secondaryHref, featuresEyebrow, featuresTitle, featuresDescription, features, finalTitle, finalDescription, footnote, className, }: LandingShellProps): React$1.JSX.Element;
2605
+
2606
+ /**
2607
+ * tokens.ts — Theme token cho PanPowerPoint.
2608
+ *
2609
+ * Đợt này CHỈ 1 theme "F Theme" (FPT IS). Layout KHÔNG hard-code màu —
2610
+ * luôn đọc qua `t.ink`, `t.brand.orange`… → thêm theme sau = thêm 1 token set,
2611
+ * không sửa layout nào.
2612
+ *
2613
+ * Mục 7 tài liệu 021.
2614
+ */
2615
+ interface ThemeTokens {
2616
+ /** Tên hiển thị theme. */
2617
+ name: string;
2618
+ /** Nền trang. */
2619
+ bg: string;
2620
+ /** Nền khối phụ (card/surface). */
2621
+ surface: string;
2622
+ /** Nền tối (cho dark-cover…). */
2623
+ surfaceDark: string;
2624
+ /** Chữ tiêu đề (navy đậm). */
2625
+ ink: string;
2626
+ /** Chữ thường. */
2627
+ body: string;
2628
+ /** Chữ phụ/nhạt. */
2629
+ muted: string;
2630
+ /** Đường kẻ/viền. */
2631
+ line: string;
2632
+ /** Bộ màu thương hiệu — 3 chấm + accent. */
2633
+ brand: {
2634
+ blue: string;
2635
+ orange: string;
2636
+ green: string;
2637
+ };
2638
+ /** Màu nhấn chính (mặc định = brand.blue). */
2639
+ accent: string;
2640
+ radius: {
2641
+ sm: string;
2642
+ md: string;
2643
+ lg: string;
2644
+ pill: string;
2645
+ };
2646
+ fontHead: string;
2647
+ fontBody: string;
2648
+ /** Màu chữ trên nền tối/brand. */
2649
+ onDark: string;
2650
+ }
2651
+ /** F Theme — FPT IS (token set duy nhất đợt này). */
2652
+ declare const fTheme: ThemeTokens;
2653
+ /** Registry token theo key (mở rộng sau: thêm 1 entry). */
2654
+ declare const THEMES: Record<string, ThemeTokens>;
2655
+ declare function resolveTheme(key: string | undefined): ThemeTokens;
2656
+
2657
+ /**
2658
+ * types.ts — Hợp đồng dùng chung giữa Shell · Layout plugin · Primitives.
2659
+ *
2660
+ * Mục 3, 4, 5, 6 tài liệu 021.
2661
+ */
2662
+
2663
+ type Motion = 'rich' | 'minimal' | 'none';
2664
+ type Size = 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
2665
+ type Family = 'cover' | 'section' | 'content' | 'process' | 'closing';
2666
+ type Chrome = 'content' | 'bare';
2667
+ /** Preset marker đầu dòng cho JSON. */
2668
+ type BulletPreset = 'dot' | 'check' | 'number' | 'dash' | 'chevron' | 'none';
2669
+ interface PpImage {
2670
+ src: string;
2671
+ caption?: string;
2672
+ alt?: string;
2673
+ /** Hiển thị trong khung trình duyệt (mặc định true). */
2674
+ framed?: boolean;
2675
+ }
2676
+ interface PpColumn {
2677
+ heading?: string;
2678
+ body?: string;
2679
+ /** Bullet list trong cột (optional). */
2680
+ items?: string[];
2681
+ }
2682
+ interface PpCard {
2683
+ title?: string;
2684
+ desc?: string;
2685
+ /** Nhãn nhỏ/badge trên thẻ (optional). */
2686
+ tag?: string;
2687
+ }
2688
+ interface PpStep {
2689
+ title?: string;
2690
+ desc?: string;
2691
+ }
2692
+ interface PpTimelineItem {
2693
+ time?: string;
2694
+ title?: string;
2695
+ desc?: string;
2696
+ }
2697
+ interface PpStat {
2698
+ value?: string;
2699
+ label?: string;
2700
+ desc?: string;
2701
+ }
2702
+ interface PpBigNumber {
2703
+ value?: string;
2704
+ label?: string;
2705
+ desc?: string;
2706
+ }
2707
+ interface PpQuote {
2708
+ text?: string;
2709
+ author?: string;
2710
+ role?: string;
2711
+ }
2712
+ interface PpMeta {
2713
+ eventDate?: string;
2714
+ org?: string;
2715
+ /** Số chương cho section-divider (vd "02"). */
2716
+ sectionNo?: string;
2717
+ /** Liên hệ cho thank-you. */
2718
+ contact?: string;
2719
+ [k: string]: string | undefined;
2720
+ }
2721
+ /** Nội dung 1 ngôn ngữ của 1 slide (= 1 entry JSON đã resolve i18n). */
2722
+ interface SlideContent {
2723
+ layout: string;
2724
+ motion?: Motion;
2725
+ /** Header nội dung (chrome=content). */
2726
+ pageTitle?: string;
2727
+ /** Chữ nhỏ in hoa. */
2728
+ kicker?: string;
2729
+ title?: string;
2730
+ subtitle?: string;
2731
+ /** Danh sách dòng (bullet list). */
2732
+ body?: string[];
2733
+ /** Preset marker đầu dòng. */
2734
+ bullet?: BulletPreset;
2735
+ image?: PpImage;
2736
+ columns?: PpColumn[];
2737
+ cards?: PpCard[];
2738
+ steps?: PpStep[];
2739
+ /** Mục lục (agenda). */
2740
+ items?: string[];
2741
+ bigNumber?: PpBigNumber;
2742
+ quote?: PpQuote;
2743
+ timeline?: PpTimelineItem[];
2744
+ stats?: PpStat[];
2745
+ meta?: PpMeta;
2746
+ /** Field tự do (kitchen-sink _note…). */
2747
+ [k: string]: unknown;
2748
+ }
2749
+ /** Slide đa-ngôn-ngữ trong deck JSON. */
2750
+ type SlideI18n = Record<string, SlideContent>;
2751
+ /**
2752
+ * Thương hiệu của deck (khối `brand` trong *.deck.json) — 2 logo của header: đơn vị làm sản phẩm + khách hàng.
2753
+ * Ảnh: đường dẫn `/presentation/<tệp>` (thư mục `--assets` của `pan ppt serve`) hoặc URL. Không khai = logo mặc định
2754
+ * của Shell (FPT IS · Bộ Tư Pháp).
2755
+ */
2756
+ interface PpBrand {
2757
+ /** Logo đơn vị làm sản phẩm (header phải; góc đáy ở khung bare); `null` = ẩn. */
2758
+ logo?: string | null;
2759
+ /** Tên đơn vị: alt của logo, hoặc chữ khi không có ảnh. */
2760
+ name?: string;
2761
+ /** Logo khách hàng (header trái, cạnh logo đơn vị); `null` = ẩn ô khách. */
2762
+ customerLogo?: string | null;
2763
+ customerName?: string;
2764
+ /** Chữ chân slide bên phải (khung content) — thay "CSDL Công Chứng". */
2765
+ footer?: string;
2766
+ }
2767
+ /** Logo nào hiện trên slide: cả hai, chỉ đơn vị làm sản phẩm, chỉ khách hàng, hoặc không logo nào. */
2768
+ type LogoShow = 'both' | 'brand' | 'customer' | 'none';
2769
+ /** Một deck = 1 file *.deck.json. */
2770
+ interface Deck {
2771
+ name: string;
2772
+ default?: string;
2773
+ theme?: string;
2774
+ brand?: PpBrand;
2775
+ slides: Record<string, SlideI18n>;
2776
+ }
2777
+ /** Meta của 1 layout plugin (gallery + validate quét field này). */
2778
+ interface LayoutMeta {
2779
+ key: string;
2780
+ family: Family;
2781
+ label: string;
2782
+ /** Field nó đọc — gợi ý cho gallery/validate. */
2783
+ uses: string[];
2784
+ /** 'content' (header nội dung) | 'bare' (full-bleed). */
2785
+ chrome: Chrome;
2786
+ /** Motion gợi ý mặc định. */
2787
+ motion: Motion;
2788
+ /** Nội dung mẫu để gallery preview. */
2789
+ sample: Partial<SlideContent>;
2790
+ }
2791
+ /** API reveal: cấp delay theo thứ tự xuất hiện; shell gom timing tổng. */
2792
+ interface RevealApi {
2793
+ /**
2794
+ * seq(weight?) trả về delayMs cho phần tử kế tiếp theo thứ tự gọi.
2795
+ * weight nhân hold (mặc định 1) — phần tử nặng (ảnh) chờ lâu hơn.
2796
+ */
2797
+ seq: (weight?: number) => number;
2798
+ /** runMs hiệu lực (đã theo motion). */
2799
+ runMs: number;
2800
+ motion: Motion;
2801
+ }
2802
+ interface LayoutProps {
2803
+ c: SlideContent;
2804
+ t: ThemeTokens;
2805
+ kit: Primitives;
2806
+ reveal: RevealApi;
2807
+ size: Size;
2808
+ }
2809
+ /** Marker đầu dòng: preset (string) | ReactNode | render-fn theo index. */
2810
+ type ListMarker = BulletPreset | ReactNode | ((index: number) => ReactNode);
2811
+ /** Slots chrome — ReactNode override (mục 6b). */
2812
+ interface PpSlots {
2813
+ /** Mặc định: 3 chấm xanh/cam/lục. */
2814
+ headerMark?: ReactNode;
2815
+ /** Mặc định: logo FPT IS trong chip trắng; `null` = ẩn. */
2816
+ brandLogo?: ReactNode;
2817
+ /** Mặc định: ô "Add logo khách hàng" nét đứt. */
2818
+ customerLogo?: ReactNode;
2819
+ footerLeft?: ReactNode;
2820
+ /** Thay cả góc phải chân slide (khung content: chữ + số trang; khung bare: logo ở góc đáy). */
2821
+ footerRight?: ReactNode;
2822
+ /** Chỉ thay chữ chân slide bên phải của khung content (mặc định "CSDL Công Chứng"). */
2823
+ footerText?: ReactNode;
2824
+ /** Layer nền ReactNode tùy biến (đè default theo theme). */
2825
+ background?: ReactNode;
2826
+ /** Override marker đầu dòng toàn slide. */
2827
+ listMarker?: ListMarker;
2828
+ /** Tắt số trang. */
2829
+ showPageNumber?: boolean;
2830
+ }
2831
+ interface KickerProps {
2832
+ children: ReactNode;
2833
+ align?: 'left' | 'center';
2834
+ delayMs?: number;
2835
+ }
2836
+ interface HeadingProps {
2837
+ children: ReactNode;
2838
+ size?: Size;
2839
+ className?: string;
2840
+ delayMs?: number;
2841
+ align?: 'left' | 'center';
2842
+ /** Tô gradient brand cho tiêu đề. */
2843
+ gradient?: boolean;
2844
+ }
2845
+ interface SubtitleProps {
2846
+ children: ReactNode;
2847
+ delayMs?: number;
2848
+ align?: 'left' | 'center';
2849
+ className?: string;
2850
+ }
2851
+ interface PageHeaderProps {
2852
+ title?: string;
2853
+ kicker?: string;
2854
+ delayMs?: number;
2855
+ }
2856
+ interface BulletListProps {
2857
+ items?: string[];
2858
+ marker?: ListMarker;
2859
+ size?: Size;
2860
+ /** delay cho từng dòng (reveal). */
2861
+ reveal?: RevealApi;
2862
+ }
2863
+ interface CardProps {
2864
+ card: PpCard;
2865
+ index?: number;
2866
+ delayMs?: number;
2867
+ }
2868
+ interface StatBlockProps {
2869
+ stat: PpStat;
2870
+ delayMs?: number;
2871
+ }
2872
+ interface BigNumberProps {
2873
+ data: PpBigNumber;
2874
+ delayMs?: number;
2875
+ }
2876
+ interface QuoteBlockProps {
2877
+ data: PpQuote;
2878
+ delayMs?: number;
2879
+ }
2880
+ interface ImageFrameProps {
2881
+ image: PpImage;
2882
+ delayMs?: number;
2883
+ className?: string;
2884
+ maxH?: string;
2885
+ }
2886
+ interface StepListProps {
2887
+ steps?: PpStep[];
2888
+ orientation?: 'vertical' | 'horizontal';
2889
+ reveal?: RevealApi;
2890
+ /** Kiểu roadmap (nối mũi tên ngang). */
2891
+ connector?: boolean;
2892
+ }
2893
+ interface TimelineRailProps {
2894
+ items?: PpTimelineItem[];
2895
+ orientation?: 'vertical' | 'horizontal';
2896
+ reveal?: RevealApi;
2897
+ }
2898
+ interface ColumnsProps {
2899
+ columns?: PpColumn[];
2900
+ reveal?: RevealApi;
2901
+ }
2902
+ interface RevealBoxProps {
2903
+ delayMs: number;
2904
+ /** hướng: trái/phải/lên. */
2905
+ dir?: 'left' | 'right' | 'up';
2906
+ className?: string;
2907
+ children: ReactNode;
2908
+ }
2909
+ /** Bộ khối dựng sẵn (theme-hoá qua tokens). */
2910
+ interface Primitives {
2911
+ Kicker: (p: KickerProps) => ReactNode;
2912
+ Heading: (p: HeadingProps) => ReactNode;
2913
+ Subtitle: (p: SubtitleProps) => ReactNode;
2914
+ PageHeader: (p: PageHeaderProps) => ReactNode;
2915
+ BulletList: (p: BulletListProps) => ReactNode;
2916
+ Card: (p: CardProps) => ReactNode;
2917
+ StatBlock: (p: StatBlockProps) => ReactNode;
2918
+ BigNumber: (p: BigNumberProps) => ReactNode;
2919
+ QuoteBlock: (p: QuoteBlockProps) => ReactNode;
2920
+ ImageFrame: (p: ImageFrameProps) => ReactNode;
2921
+ StepList: (p: StepListProps) => ReactNode;
2922
+ TimelineRail: (p: TimelineRailProps) => ReactNode;
2923
+ Columns: (p: ColumnsProps) => ReactNode;
2924
+ Reveal: (p: RevealBoxProps) => ReactNode;
2925
+ }
2926
+
2927
+ interface PanPowerPointProps {
2928
+ /** Nội dung đã resolve (ưu tiên nếu có). */
2929
+ content?: SlideContent;
2930
+ /** HOẶC slide đa-ngôn-ngữ + lang. */
2931
+ slide?: SlideI18n;
2932
+ lang?: string;
2933
+ defaultLang?: string;
2934
+ fallbackLang?: string;
2935
+ themeKey?: string;
2936
+ motion?: Motion;
2937
+ size?: Size;
2938
+ font?: string;
2939
+ slots?: PpSlots;
2940
+ deckName?: string;
2941
+ pageNumber?: number;
2942
+ totalPages?: number;
2943
+ minDurationMs?: number;
2944
+ endPaddingMs?: number;
2945
+ onDone?: () => void;
2946
+ className?: string;
2947
+ }
2948
+ declare function PanPowerPoint(props: PanPowerPointProps): React$1.JSX.Element;
2949
+
2950
+ /**
2951
+ * brand.tsx — khối `brand` của deck JSON → slots của Shell (2 logo: đơn vị làm sản phẩm + khách hàng, chữ chân slide).
2952
+ */
2953
+
2954
+ /**
2955
+ * Slots từ `deck.brand`; trường không khai giữ mặc định của Shell. `show` (tham số `logos=` của player) ẩn logo không
2956
+ * được hiện. Không có brand và hiện cả hai ⇒ undefined.
2957
+ */
2958
+ declare function brandSlots(brand: PpBrand | undefined, show?: LogoShow): PpSlots | undefined;
2959
+
2960
+ /**
2961
+ * registry.ts — Đăng ký layout plugin.
2962
+ *
2963
+ * Trước dùng `import.meta.glob` (Vite-only) để auto-register. Đã đổi sang STATIC
2964
+ * IMPORT để bundle được bằng esbuild (design-system IIFE) lẫn Vite. Thêm layout
2965
+ * mới: tạo `layouts/<key>.layout.tsx` (export `meta` + default) rồi thêm 1 dòng
2966
+ * import vào mảng `MODULES` bên dưới.
2967
+ */
2968
+
2969
+ interface LayoutModule {
2970
+ meta: LayoutMeta;
2971
+ default: (p: LayoutProps) => ReactNode;
2972
+ }
2973
+ declare function getLayout(key: string): LayoutModule | undefined;
2974
+ /** Mọi layout đã đăng ký (cho gallery tự sinh). */
2975
+ declare function listLayouts(): LayoutModule[];
2976
+ /** Thứ tự nhóm hiển thị trong gallery. */
2977
+ declare const FAMILY_ORDER: LayoutMeta['family'][];
2978
+
2979
+ interface DeckPlayerProps {
2980
+ deck: Deck;
2981
+ /** Tên hiện ở footer (mặc định `deck.name`). */
2982
+ deckName?: string;
2983
+ /** slideId bắt đầu; không có/không khớp ⇒ slide đầu. */
2984
+ startId?: string;
2985
+ lang?: string;
2986
+ themeKey: string;
2987
+ motion?: Motion;
2988
+ size?: Size;
2989
+ /** Sàn tổng thời gian mỗi slide (ms). */
2990
+ dur?: number;
2991
+ /** Hiện thanh điều khiển (mặc định true). Headless/E2E nên đặt false. */
2992
+ showControls?: boolean;
2993
+ /** Tự chạy (mặc định true). */
2994
+ autoplay?: boolean;
2995
+ /** Logo nào hiện (tham số `logos=`) — mặc định theo deck. */
2996
+ showLogos?: LogoShow;
2997
+ }
2998
+ declare function DeckPlayer({ deck, deckName, startId, lang, themeKey, motion, size, dur, showControls, autoplay, showLogos, }: DeckPlayerProps): React$1.JSX.Element;
2999
+
3000
+ /**
3001
+ * params.ts — Đọc tham số trình chiếu từ query string.
3002
+ *
3003
+ * Thuần TypeScript, KHÔNG phụ thuộc router: cả route TanStack (`Route.useSearch()`) và
3004
+ * player tĩnh (`location.search`) đều dùng được cùng một hàm, nên hợp đồng query param chỉ
3005
+ * còn MỘT chỗ định nghĩa.
3006
+ *
3007
+ * Hợp đồng này là HỢP ĐỒNG VỚI E2E (`pages/power-point.page.ts`). Đổi tên hay đổi ngữ nghĩa
3008
+ * tham số là làm đứng mọi kịch bản có bước trình chiếu.
3009
+ */
3010
+
3011
+ interface PlayerParams {
3012
+ /** Tên deck (hoặc ref đã giải mã) — trình chiếu cả deck. */
3013
+ deck?: string;
3014
+ /** slideId bắt đầu trong deck. */
3015
+ id?: string;
3016
+ /** Không có deck: preview thẳng `meta.sample` của layout này. */
3017
+ layout?: string;
3018
+ lang?: string;
3019
+ theme?: string;
3020
+ motion?: Motion;
3021
+ size?: Size;
3022
+ /** Sàn tổng thời gian mỗi slide (ms). */
3023
+ dur?: number;
3024
+ /** Hiện thanh điều khiển — mặc định TRUE, chỉ `0`/`false`/`no` mới tắt. */
3025
+ controls: boolean;
3026
+ /** Tự sang slide kế khi hết giờ — mặc định TRUE. */
3027
+ autoplay: boolean;
3028
+ /** Logo nào hiện (video hướng dẫn của pan-test chọn): both | brand | customer | none. Không khai = như deck. */
3029
+ logos?: LogoShow;
3030
+ }
3031
+ /** Nguồn tham số: URLSearchParams hoặc object phẳng (search của TanStack Router). */
3032
+ type PlayerParamsInput = URLSearchParams | Record<string, unknown>;
3033
+ declare function parsePlayerParams(input: PlayerParamsInput): PlayerParams;
3034
+
3035
+ interface PresentationScreenProps {
3036
+ params: PlayerParams;
3037
+ /** Deck đã resolve theo `params.deck` (undefined = không tìm thấy / không có). */
3038
+ resolvedDeck?: Deck;
3039
+ /** Theme dùng khi deck và query đều không nói gì. */
3040
+ defaultThemeKey?: string;
3041
+ /** Bảng màu cho màn "không tìm thấy slide". */
3042
+ notFoundClassName?: string;
3043
+ }
3044
+ declare function PresentationScreen({ params, resolvedDeck, defaultThemeKey, notFoundClassName, }: PresentationScreenProps): React$1.JSX.Element;
3045
+
3046
+ /**
3047
+ * slide-not-found.tsx — Màn "không tìm thấy slide".
3048
+ *
3049
+ * `className` để app đổi bảng màu (b-frontend dùng màu cứng #0f1f3d, a-frontend dùng token
3050
+ * `bg-primary`) mà không phải sao chép cả component.
3051
+ */
3052
+ interface SlideNotFoundProps {
3053
+ deck?: string;
3054
+ id?: string;
3055
+ layout?: string;
3056
+ className?: string;
3057
+ }
3058
+ declare function SlideNotFound({ deck, id, layout, className }: SlideNotFoundProps): React$1.JSX.Element;
3059
+
3060
+ interface DataTableColumnHeaderProps<TData, TValue> extends React.HTMLAttributes<HTMLDivElement> {
3061
+ column: Column<TData, TValue>;
3062
+ title: string;
3063
+ }
3064
+ declare function DataTableColumnHeader<TData, TValue>({ column, title, className, headerStyle, }: DataTableColumnHeaderProps<TData, TValue> & {
3065
+ headerStyle?: 'default' | 'dropdown';
3066
+ }): React$1.JSX.Element;
3067
+
3068
+ interface DataTableComboboxFilterProps<TData, TValue> {
3069
+ column?: Column<TData, TValue>;
3070
+ title?: string;
3071
+ apiRequest?: (keyword?: string) => Promise<{
3072
+ value: string;
3073
+ label: string;
3074
+ }[]>;
3075
+ options?: {
3076
+ value: string;
3077
+ label: string;
3078
+ }[];
3079
+ placeholder?: string;
3080
+ multiple?: boolean;
3081
+ table?: Table$1<TData>;
3082
+ /**
3083
+ * Xóa các filter khác khi filter này được chọn
3084
+ */
3085
+ clearOtherFilters?: string[];
3086
+ /**
3087
+ * Có cho phép tìm kiếm trong combobox không
3088
+ */
3089
+ searchable?: boolean;
3090
+ /**
3091
+ * Có cho phép disabled combobox không
3092
+ */
3093
+ disabled?: boolean;
3094
+ }
3095
+ declare function DataTableComboboxFilter<TData, TValue>({ column, title, apiRequest, options, placeholder, multiple, table, clearOtherFilters, searchable, disabled, }: DataTableComboboxFilterProps<TData, TValue>): React__default.JSX.Element;
3096
+
3097
+ interface TreeOption {
3098
+ id: string;
3099
+ value: string;
3100
+ label: string;
3101
+ code?: string;
3102
+ parentId?: string;
3103
+ children?: TreeOption[];
3104
+ }
3105
+ interface DataTableTreeComboboxFilterProps<TData, TValue> {
3106
+ column?: Column<TData, TValue>;
3107
+ title?: string;
3108
+ options?: TreeOption[];
3109
+ placeholder?: string;
3110
+ multiple?: boolean;
3111
+ table?: Table$1<TData>;
3112
+ clearOtherFilters?: string[];
3113
+ disabled?: boolean;
3114
+ }
3115
+ declare function DataTableTreeComboboxFilter<TData, TValue>({ column, title, options, placeholder, multiple, table, clearOtherFilters, disabled, }: DataTableTreeComboboxFilterProps<TData, TValue>): React__default.JSX.Element;
3116
+
3117
+ interface DataTableFacetedFilterProps<TData, TValue> {
3118
+ column?: Column<TData, TValue>;
3119
+ title?: string;
3120
+ multiple?: boolean;
3121
+ showCount?: boolean;
3122
+ placeholder?: string;
3123
+ options: {
3124
+ label: string;
3125
+ value: string;
3126
+ icon?: React$1.ComponentType<{
3127
+ className?: string;
3128
+ }>;
3129
+ }[];
3130
+ }
3131
+ declare function DataTableFacetedFilter<TData, TValue>({ column, title, options, placeholder, showCount, multiple, }: DataTableFacetedFilterProps<TData, TValue>): React$1.JSX.Element;
3132
+
3133
+ type DateRangePreset = 'today' | '7d' | '30d' | 'month';
3134
+ interface DataTableDateRangeFilterProps<TData, TValue> {
3135
+ column?: Column<TData, TValue>;
3136
+ title?: string;
3137
+ placeholder?: string;
3138
+ /** Nút preset nhanh cạnh lịch. true = bộ mặc định (today/7d/30d/month); mảng = chọn preset. */
3139
+ presets?: boolean | DateRangePreset[];
3140
+ }
3141
+ declare function DataTableDateRangeFilter<TData, TValue>({ column, title, placeholder, presets, }: DataTableDateRangeFilterProps<TData, TValue>): React$1.JSX.Element;
3142
+
3143
+ interface DataTablePhoneFilterProps<TData, TValue> {
3144
+ column?: Column<TData, TValue>;
3145
+ title?: string;
3146
+ placeholder?: string;
3147
+ value?: TValue;
3148
+ debounceMs?: number;
3149
+ }
3150
+ declare function DataTablePhoneFilter<TData, TValue>({ column, title, placeholder, value, debounceMs, }: DataTablePhoneFilterProps<TData, TValue>): React$1.JSX.Element;
3151
+
3152
+ interface DataTableDateFilterProps<TData, TValue> {
3153
+ column?: Column<TData, TValue>;
3154
+ title?: string;
3155
+ placeholder?: string;
3156
+ }
3157
+ declare function DataTableDateFilter<TData, TValue>({ column, title, placeholder, }: DataTableDateFilterProps<TData, TValue>): React$1.JSX.Element;
3158
+
3159
+ interface TabOption {
3160
+ label: string;
3161
+ value: string;
3162
+ count?: number;
3163
+ colorCount?: 'default' | 'primary' | 'success' | 'warning' | 'error' | 'info' | 'purple' | 'pink' | 'neutral';
3164
+ badgeClassName?: string;
3165
+ className?: string;
3166
+ }
3167
+ interface DataTableTabFilterProps<TData, TValue> {
3168
+ column?: Column<TData, TValue>;
3169
+ title?: string;
3170
+ options: TabOption[];
3171
+ showCount?: boolean;
3172
+ includeAllOption?: boolean;
3173
+ allLabel?: string;
3174
+ table?: Table$1<TData>;
3175
+ clearOtherFilters?: string[];
3176
+ }
3177
+ declare function DataTableTabFilter<TData, TValue>({ column, options, showCount, includeAllOption, allLabel, table, clearOtherFilters, }: DataTableTabFilterProps<TData, TValue>): React__default.JSX.Element | null;
3178
+
3179
+ interface DataTableTextFilterProps<TData, TValue> {
3180
+ column?: Column<TData, TValue>;
3181
+ title?: string;
3182
+ placeholder?: string;
3183
+ value?: TValue;
3184
+ debounceMs?: number;
3185
+ }
3186
+ declare function DataTableTextFilter<TData, TValue>({ column, title, placeholder, value, debounceMs, }: DataTableTextFilterProps<TData, TValue>): React$1.JSX.Element;
3187
+
3188
+ declare const TABLE_SIZE: {
3189
+ SELECT: number;
3190
+ ACTIONS: number;
3191
+ DATETIME: number;
3192
+ STATUS: number;
3193
+ S120: number;
3194
+ S200: number;
3195
+ S110: number;
3196
+ };
3197
+ /** Cột combobox Giai đoạn — DataTable cần `size` để filter row không bị maxWidth:1px. */
3198
+ declare const COL_WIDTH_TYPE_CODE = 148;
3199
+ /** Gắn vào columnDef cột có filter `number-range` (DataTable cần `size` để filter không bị maxWidth:1px). */
3200
+ declare const NUMBER_RANGE_COLUMN_SIZE: {
3201
+ readonly size: number;
3202
+ readonly minSize: number;
3203
+ };
3204
+ /** Cột combobox filter ngắn (Mức độ, Hiệu lực, Stage…). */
3205
+ declare const COL_WIDTH_COMBO_FILTER = 128;
3206
+ declare const TABLE_ALIGN: {
3207
+ ACTIONS: string;
3208
+ };
3209
+
3210
+ declare const selectColumn: (t: any, { size, canSelectAll, }?: {
3211
+ size?: number;
3212
+ canSelectAll?: (table: Table$1<any>) => boolean;
3213
+ }) => {
3214
+ size: number;
3215
+ id: string;
3216
+ header: ({ table }: {
3217
+ table: Table$1<any>;
3218
+ }) => React$1.JSX.Element;
3219
+ cell: ({ row }: {
3220
+ row: Row$5<any>;
3221
+ }) => React$1.JSX.Element;
3222
+ enableSorting: boolean;
3223
+ enableHiding: boolean;
3224
+ };
3225
+ declare const renderFilter: (filters: Column<any, any>[], table: Table$1<any>) => (React$1.JSX.Element | null)[] | null;
3226
+ declare const renderColumnFilter: (column: Column<any, any>, table: Table$1<any>) => React$1.JSX.Element | null;
3227
+
3228
+ interface DataTablePaginationProps<TData> {
3229
+ table: Table$1<TData>;
3230
+ }
3231
+ declare function DataTablePagination<TData>({ table }: DataTablePaginationProps<TData>): React$1.JSX.Element;
3232
+
3233
+ interface TableState {
3234
+ keyword: string;
3235
+ filter: ColumnFiltersState;
3236
+ sorting: SortingState;
3237
+ pagination: PaginationState;
3238
+ columnVisibility?: VisibilityState;
3239
+ uiState?: UiState;
3240
+ sortFilter?: string[];
3241
+ }
3242
+ /** Dạng xem của cùng MỘT bảng: hàng bảng (`table`) hay thẻ (`cards`). */
3243
+ type DataViewMode = 'table' | 'cards';
3244
+ interface UiState {
3245
+ showTime?: boolean;
3246
+ showAdvancedFilter?: boolean;
3247
+ showColumnFilter?: boolean;
3248
+ density?: 'small' | 'middle' | 'large' | 'xlarge';
3249
+ /**
3250
+ * Dạng xem đang chọn. Chỉ có tác dụng khi `<DataTable cards={…}>` — không khai `cards` thì
3251
+ * bảng chỉ có một dạng và khóa này bị bỏ qua. Lưu cùng `uiState` (localStorage theo `pageName`)
3252
+ * nên người dùng chọn một lần là nhớ, giống `density`.
3253
+ */
3254
+ view?: DataViewMode;
3255
+ }
3256
+ /**
3257
+ * Serialize table state to URL query parameters
3258
+ */
3259
+ declare function serializeTableState(state: TableState): URLSearchParams;
3260
+ declare const DEFAULT_PAGE_SIZE = 10;
3261
+ declare const DEFAULT_UI_STATE: UiState;
3262
+ declare const DEFAULT_SORTING: SortingState;
3263
+ declare const DEFAULT_FILTER: ColumnFiltersState;
3264
+ declare const DEFAULT_COLUMN_VISIBILITY: VisibilityState;
3265
+ declare const DEFAULT_PAGINATION: PaginationState;
3266
+ declare const DEFAULT_TABLE_STATE: TableState;
3267
+ /**
3268
+ * Deserialize URL query parameters to table state
3269
+ */
3270
+ declare function deserializeTableState(searchParams: URLSearchParams, defaultState?: TableState): TableState;
3271
+ /**
3272
+ * Generate localStorage key for table state
3273
+ */
3274
+ declare function getTableStateKey(pageName: string, keyObject?: Record<string, string | number>): string;
3275
+ /**
3276
+ * Save table state to localStorage
3277
+ */
3278
+ declare function saveTableStateToLocalStorage(pageName: string, keyObject: Record<string, string | number> | undefined, state: TableState): void;
3279
+ /**
3280
+ * Load table state from localStorage
3281
+ */
3282
+ declare function loadTableStateFromLocalStorage(pageName: string, keyObject: Record<string, string | number> | undefined): TableState | null;
3283
+ /**
3284
+ * Clear table state from localStorage
3285
+ */
3286
+ declare function clearTableStateFromLocalStorage(pageName: string, keyObject: Record<string, string | number> | undefined): void;
3287
+ declare function clearAllTableStateFromLocalStorage(): void;
3288
+
3289
+ interface DataTableToolbarProps<T> {
3290
+ loading: boolean;
3291
+ table: Table$1<T>;
3292
+ renderFilter?: (table: Table$1<T>) => React__default.ReactNode;
3293
+ searchOptions?: {
3294
+ placeholder?: string;
3295
+ helpContent?: React__default.ReactNode;
3296
+ helpTitle?: React__default.ReactNode;
3297
+ };
3298
+ hideSearch?: boolean;
3299
+ hideReset?: boolean;
3300
+ resetPosition?: 'left' | 'right';
3301
+ viewOptionsLabel?: string;
3302
+ viewOptionsShowTime?: boolean;
3303
+ /** Nội dung cùng hàng với ô tìm kiếm (sau input), ví dụ tab lọc */
3304
+ toolbarPrefix?: React__default.ReactNode;
3305
+ /** Không để button thêm sửa kết xuất dữ liệu ở đây mà để ở AdminPageLayout trong AdminPageActions */
3306
+ toolbarActions?: React__default.ReactNode;
3307
+ showTimeToggle?: boolean;
3308
+ hideRefresh?: boolean;
3309
+ /** Ẩn nút "Xem cột" (bật/tắt hiển thị cột) */
3310
+ hideViewOptions?: boolean;
3311
+ componentTab?: React__default.ReactNode[] | React__default.ReactNode;
3312
+ /** Bảng có khai `cards` ⇒ hiện nút chuyển dạng xem (bảng ↔ thẻ) giữa nhóm lọc và nút tải lại. */
3313
+ showViewToggle?: boolean;
3314
+ /** Dạng xem mặc định khi người dùng chưa từng chọn. */
3315
+ defaultView?: DataViewMode;
3316
+ /** Đang ở dạng thẻ ⇒ hiện menu Sắp xếp (thẻ không có header cột để bấm sort). */
3317
+ showSortMenu?: boolean;
3318
+ }
3319
+ declare function DataTableToolbar<T>({ loading, table, renderFilter: customRenderFilter, searchOptions, hideSearch, hideReset, resetPosition, viewOptionsLabel, viewOptionsShowTime, toolbarPrefix, toolbarActions, showTimeToggle: _showTimeToggle, hideRefresh, hideViewOptions, componentTab, showViewToggle, defaultView, showSortMenu, }: DataTableToolbarProps<T>): React__default.JSX.Element;
3320
+
3321
+ interface DataTableViewOptionsProps<TData> {
3322
+ table: Table$1<TData>;
3323
+ label?: string;
3324
+ showTime?: boolean;
3325
+ }
3326
+ declare function DataTableViewOptions<TData>({ table, label, showTime }: DataTableViewOptionsProps<TData>): React$1.JSX.Element;
3327
+
3328
+ type RecordCardDensity = 'compact' | 'default' | 'spacious';
3329
+ type RecordCardMediaRatio = '16/9' | '4/3' | '1/1';
3330
+ interface RecordCardMetaItem {
3331
+ label: React$1.ReactNode;
3332
+ value: React$1.ReactNode;
3333
+ /** Ô chiếm trọn hàng (mô tả dài, địa chỉ). */
3334
+ full?: boolean;
3335
+ }
3336
+ interface RecordCardProps {
3337
+ /**
3338
+ * Ô chọn (checkbox). `DataTable` truyền sẵn node đã nối `row.getIsSelected/toggleSelected` — bạn
3339
+ * đặt nó ở đâu là quyền của bạn: mặc định ở đầu hàng thân, hoặc bỏ vào `titleRow` tự dựng.
3340
+ */
3341
+ selectSlot?: React$1.ReactNode;
3342
+ /** Ảnh/thumbnail. Không truyền ⇒ không chừa chỗ; muốn ô "Chưa có ảnh" thì truyền `mediaEmpty`. */
3343
+ media?: React$1.ReactNode;
3344
+ /** Hiện khi `media` rỗng (vd chữ "Chưa có ảnh") — tách riêng để thẻ không có ảnh vẫn thẳng hàng. */
3345
+ mediaEmpty?: React$1.ReactNode;
3346
+ mediaRatio?: RecordCardMediaRatio;
3347
+ /** Bề rộng ảnh ở desktop (mobile luôn tràn ngang). Mặc định `12rem`. */
3348
+ mediaWidth?: string;
3349
+ title: React$1.ReactNode;
3350
+ /** Dòng phụ dưới tiêu đề (mã, đường dẫn, mô tả ngắn). */
3351
+ subtitle?: React$1.ReactNode;
3352
+ /** Badge trạng thái — tự xuống dòng khi nhiều. */
3353
+ badges?: React$1.ReactNode;
3354
+ meta?: RecordCardMetaItem[];
3355
+ /** Số cột lưới meta khi cột trái đủ rộng (cột hẹp luôn 2). Mặc định 4. */
3356
+ metaCols?: 2 | 3 | 4;
3357
+ /** Nhóm chip ở hàng chân (vd TÍNH NĂNG). */
3358
+ chips?: {
3359
+ label?: React$1.ReactNode;
3360
+ children: React$1.ReactNode;
3361
+ };
3362
+ /** Nút thao tác ở hàng chân, mép phải. */
3363
+ actions?: {
3364
+ label?: React$1.ReactNode;
3365
+ children: React$1.ReactNode;
3366
+ };
3367
+ /** Nội dung tự do chèn cuối thẻ (progress, cảnh báo…). */
3368
+ footer?: React$1.ReactNode;
3369
+ selected?: boolean;
3370
+ onClick?: React$1.MouseEventHandler<HTMLDivElement>;
3371
+ density?: RecordCardDensity;
3372
+ className?: string;
3373
+ 'data-testid'?: string;
3374
+ }
3375
+ declare function RecordCard({ selectSlot, media, mediaEmpty, mediaRatio, mediaWidth, title, subtitle, badges, meta, metaCols, chips, actions, footer, selected, onClick, density, className, 'data-testid': testId, }: RecordCardProps): React$1.JSX.Element;
3376
+
3377
+ /** Số cột theo breakpoint VIEWPORT. Từ vựng đóng (1..4) vì class Tailwind phải tĩnh. */
3378
+ interface DataTableCardsCols {
3379
+ base?: 1 | 2 | 3 | 4;
3380
+ sm?: 1 | 2 | 3 | 4;
3381
+ md?: 1 | 2 | 3 | 4;
3382
+ lg?: 1 | 2 | 3 | 4;
3383
+ xl?: 1 | 2 | 3 | 4;
3384
+ }
3385
+ /** Thứ dùng được trong `render` — mượn lại cấu hình cột thay vì khai nhãn/format lần hai. */
3386
+ interface DataTableCardContext<TData> {
3387
+ row: Row$5<TData>;
3388
+ /** Ô chọn đã nối sẵn `row.getIsSelected/toggleSelected`. Đặt ở đâu là quyền của màn. */
3389
+ checkboxNode: React$1.ReactNode;
3390
+ isSelected: boolean;
3391
+ toggleSelected: (value?: boolean) => void;
3392
+ /** Render ĐÚNG `columnDef.cell` của cột — badge trạng thái, ngày, tiền… không format lại. */
3393
+ cell: (columnId: string) => React$1.ReactNode;
3394
+ /** Nhãn cột (`meta.title` → `header` chuỗi → id). */
3395
+ label: (columnId: string) => React$1.ReactNode;
3396
+ /** Cặp {label, value} cho lưới meta, ĐÃ lọc cột đang bị ẩn (`getIsVisible`). */
3397
+ metaFields: (columnIds: string[]) => RecordCardMetaItem[];
3398
+ density: RecordCardDensity;
3399
+ index: number;
3400
+ }
3401
+ interface DataTableCardsConfig<TData> {
3402
+ /** Thẻ của một dòng. Tự do 100% — DS chỉ đưa `ctx`. */
3403
+ render: (row: Row$5<TData>, ctx: DataTableCardContext<TData>) => React$1.ReactNode;
3404
+ /** Dạng xem mặc định khi người dùng chưa từng bấm nút chuyển. Mặc định `table`. */
3405
+ default?: 'table' | 'cards';
3406
+ /** Lưới theo breakpoint. XOR với `minItemWidth`. Không khai cả hai ⇒ 1 cột. */
3407
+ cols?: DataTableCardsCols;
3408
+ /**
3409
+ * Lưới TỰ CHIA theo bề rộng còn lại: `repeat(auto-fill, minmax(<minItemWidth>, 1fr))`.
3410
+ * Đây là lối đúng khi thẻ nằm trong drawer/modal — auto-fill đo CONTAINER, không đo viewport.
3411
+ */
3412
+ minItemWidth?: string;
3413
+ /** Khoảng cách lưới (thang Tailwind 0..8). Mặc định 4. */
3414
+ gap?: number;
3415
+ /** Ẩn hàng "Chọn tất cả trang này" (mặc định hiện khi bảng bật chọn dòng). */
3416
+ hideSelectAll?: boolean;
3417
+ /** Class phụ cho khung lưới. */
3418
+ className?: string;
3419
+ }
3420
+ /** Class lưới. `minItemWidth` thắng `cols` (và cảnh báo nếu khai cả hai). */
3421
+ declare function cardsGridClass(config: Pick<DataTableCardsConfig<unknown>, 'cols' | 'minItemWidth' | 'gap'>): string;
3422
+ declare function cardsGridStyle(config: Pick<DataTableCardsConfig<unknown>, 'minItemWidth'>): React$1.CSSProperties | undefined;
3423
+ interface DataTableCardsProps<TData> {
3424
+ table: Table$1<TData>;
3425
+ config: DataTableCardsConfig<TData>;
3426
+ density: RecordCardDensity;
3427
+ isLoading: boolean;
3428
+ isFetching: boolean;
3429
+ hasError: boolean;
3430
+ emptyState?: React$1.ReactNode;
3431
+ errorState?: React$1.ReactNode;
3432
+ loadingClass?: string;
3433
+ }
3434
+ declare function DataTableCards<TData>({ table, config, density, isLoading, isFetching, hasError, emptyState, errorState, loadingClass, }: DataTableCardsProps<TData>): React$1.JSX.Element;
3435
+
3436
+ interface DataTablePropsNew<T> {
3437
+ table: Table$1<T>;
3438
+ renderFilter?: (table: Table$1<T>) => React$1.ReactNode;
3439
+ renderAdvancedFilter?: (table: Table$1<T>) => React$1.ReactNode;
3440
+ loadingClass?: string;
3441
+ searchOptions?: {
3442
+ placeholder?: string;
3443
+ helpContent?: React$1.ReactNode;
3444
+ helpTitle?: React$1.ReactNode;
3445
+ };
3446
+ hideSearch?: boolean;
3447
+ hideReset?: boolean;
3448
+ hidePagination?: boolean;
3449
+ resetPosition?: 'left' | 'right';
3450
+ viewOptionsLabel?: string;
3451
+ viewOptionsShowTime?: boolean;
3452
+ /** Cùng hàng với ô tìm kiếm (sau input) */
3453
+ toolbarPrefix?: React$1.ReactNode;
3454
+ toolbarActions?: React$1.ReactNode;
3455
+ isolatedScroll?: boolean;
3456
+ showTimeToggle?: boolean;
3457
+ hideRefresh?: boolean;
3458
+ /** Ẩn nút "Xem cột" trong toolbar */
3459
+ hideViewOptions?: boolean;
3460
+ hideToolbar?: boolean;
3461
+ getRowClassName?: (row: Any) => string;
3462
+ clickRowToSelect?: boolean;
3463
+ stickyLeftColumns?: number;
3464
+ stickyRightColumns?: number;
3465
+ /** Khi set (vd. `w-full min-w-0 table-fixed` trong modal), không áp `min-w-5xl` mặc định */
3466
+ tableClassName?: string;
3467
+ tableHeaderClassName?: string;
3468
+ /** Render thêm một hoặc nhiều hàng ngay dưới header cột */
3469
+ headerRows?: React$1.ReactNode;
3470
+ componentTab?: React$1.ReactNode[] | React$1.ReactNode;
3471
+ /** Override default column filter renderer (e.g. app-specific SprintSelect) */
3472
+ renderColumnFilter?: (column: _tanstack_react_table.Column<T, unknown>, table: Table$1<T>) => React$1.ReactNode;
3473
+ /**
3474
+ * Nội dung tuỳ biến khi bảng không có dữ liệu (thay cho icon `Inbox` +
3475
+ * `t('table.noResults.message')` mặc định). Không truyền thì giữ nguyên UI mặc định.
3476
+ */
3477
+ emptyState?: React$1.ReactNode;
3478
+ /**
3479
+ * Nội dung tuỳ biến khi tải dữ liệu bị lỗi (`table.options.meta?.error` truthy).
3480
+ * Không truyền thì hiện icon cảnh báo + `t('table.error.message')` mặc định.
3481
+ */
3482
+ errorState?: React$1.ReactNode;
3483
+ /**
3484
+ * DẠNG XEM THỨ HAI: thẻ (card). Khai `cards` ⇒ toolbar tự hiện nút chuyển ⊞/☰ (giữa nhóm nút lọc
3485
+ * và nút tải lại); lựa chọn của người dùng lưu trong `uiState.view` theo `pageName` như `density`.
3486
+ *
3487
+ * Cùng MỘT `table` instance ⇒ tìm kiếm/bộ lọc/sắp xếp/phân trang/chọn dòng dùng chung tuyệt đối:
3488
+ * đổi dạng xem không mất bộ lọc đang lọc, và không có bản sao thứ hai của lớp filter.
3489
+ */
3490
+ cards?: DataTableCardsConfig<T>;
3491
+ }
3492
+ type DataTableProps<T> = DataTablePropsNew<T>;
3493
+ declare function DataTable<T>(props: DataTableProps<T>): React$1.JSX.Element;
3494
+
3495
+ type DataTableBulkDeleteConfig<T> = {
3496
+ /** Mặc định `false` — chỉ hiện nút Xóa (n) khi bật rõ ràng */
3497
+ enabled?: boolean;
3498
+ /** Tên đơn vị hiển thị: "vai trò", "quyền", … */
3499
+ entityName: string;
3500
+ /** Nội dung bổ sung trong dialog (vd. lý do xóa) */
3501
+ renderConfirmExtras?: (rows: T[]) => React$1.ReactNode;
3502
+ /** Trả về false để chặn xóa (vd. thiếu lý do) */
3503
+ validateBeforeDelete?: (rows: T[]) => boolean;
3504
+ onDelete: (rows: T[]) => Promise<void>;
3505
+ };
3506
+ declare function useDataTableBulkDelete<T>(table: Table$1<T>, config?: DataTableBulkDeleteConfig<T> | null): {
3507
+ isEnabled: boolean;
3508
+ open: boolean;
3509
+ setOpen: React$1.Dispatch<React$1.SetStateAction<boolean>>;
3510
+ deleting: boolean;
3511
+ selectedCount: number;
3512
+ selectedRows: any[];
3513
+ entityName: string;
3514
+ renderConfirmExtras: ((rows: T[]) => React$1.ReactNode) | undefined;
3515
+ handleConfirm: () => Promise<void>;
3516
+ };
3517
+
3518
+ type DataTableBulkDeleteToolbarProps<T> = {
3519
+ table: Table$1<T>;
3520
+ config: DataTableBulkDeleteConfig<T>;
3521
+ };
3522
+ declare function DataTableBulkDeleteToolbar<T>({ table, config }: DataTableBulkDeleteToolbarProps<T>): React$1.JSX.Element | null;
3523
+
3524
+ interface RecordCardSlots {
3525
+ /** BẮT BUỘC: thẻ không có header cột nên phải có tiêu đề để người đọc bám vào. */
3526
+ title: string;
3527
+ subtitle?: string;
3528
+ media?: string;
3529
+ mediaRatio?: RecordCardMediaRatio;
3530
+ badges?: string[];
3531
+ meta?: string[];
3532
+ metaCols?: 2 | 3 | 4;
3533
+ chips?: string;
3534
+ chipsLabel?: string;
3535
+ /** `false` ⇒ không hiện hàng thao tác dù nhánh có truyền `actionsOf`. */
3536
+ actions?: boolean;
3537
+ }
3538
+ interface RecordCardGridProps<TRow> {
3539
+ rows: TRow[];
3540
+ slots: RecordCardSlots;
3541
+ cols?: DataTableCardsCols;
3542
+ minItemWidth?: string;
3543
+ gap?: number;
3544
+ density?: RecordCardDensity;
3545
+ rowKey: (row: TRow, index: number) => string;
3546
+ /** Nhãn hiển thị của một trường (nhánh nào cũng có bảng cột riêng để tra). */
3547
+ labelOf: (field: string) => React$1.ReactNode;
3548
+ /** Ô đã render theo ĐÚNG kiểu cột của nhánh đó (Tag antd / Chip mui / StatusBadge shadcn…). */
3549
+ cellOf: (field: string, row: TRow) => React$1.ReactNode;
3550
+ /** Nút thao tác trên thẻ. Không truyền ⇒ không có hàng thao tác. */
3551
+ actionsOf?: (row: TRow) => React$1.ReactNode;
3552
+ actionsLabel?: React$1.ReactNode;
3553
+ /** Ô chọn. Không truyền ⇒ thẻ không có checkbox. */
3554
+ selectOf?: (row: TRow) => React$1.ReactNode;
3555
+ isSelected?: (row: TRow) => boolean;
3556
+ onRowClick?: (row: TRow) => void;
3557
+ /** Hiện khi `rows` rỗng. */
3558
+ emptyState?: React$1.ReactNode;
3559
+ /** Chữ trong ô ảnh khi trường ảnh rỗng. */
3560
+ mediaEmptyText?: React$1.ReactNode;
3561
+ className?: string;
3562
+ }
3563
+ declare function RecordCardGrid<TRow>({ rows, slots, cols, minItemWidth, gap, density, rowKey, labelOf, cellOf, actionsOf, actionsLabel, selectOf, isSelected, onRowClick, emptyState, mediaEmptyText, className, }: RecordCardGridProps<TRow>): React$1.JSX.Element;
3564
+
3565
+ interface ImageCellProps {
3566
+ src: unknown;
3567
+ alt?: string;
3568
+ /** true = tràn khung (trong thẻ); false = thumbnail vừa một hàng bảng. */
3569
+ card?: boolean;
3570
+ className?: string;
3571
+ emptyText?: React$1.ReactNode;
3572
+ }
3573
+ declare function ImageCell({ src, alt, card, className, emptyText }: ImageCellProps): React$1.JSX.Element;
3574
+
3575
+ interface DataTableSortMenuProps<TData> {
3576
+ table: Table$1<TData>;
3577
+ }
3578
+ declare function DataTableSortMenu<TData>({ table }: DataTableSortMenuProps<TData>): React$1.JSX.Element | null;
3579
+
3580
+ interface DataTableViewToggleProps<TData> {
3581
+ table: Table$1<TData>;
3582
+ /** Dạng xem mặc định khi người dùng chưa từng chọn (từ `cards.default`). */
3583
+ defaultView?: DataViewMode;
3584
+ }
3585
+ declare function useDataViewMode<TData>(table: Table$1<TData>, defaultView?: DataViewMode): DataViewMode;
3586
+ declare function DataTableViewToggle<TData>({ table, defaultView }: DataTableViewToggleProps<TData>): React$1.JSX.Element;
3587
+
3588
+ interface EditorToolbarProps {
3589
+ editor: Editor;
3590
+ /** Nút ảnh: mở thư viện của app. Không truyền ⇒ hỏi URL bằng ô nhập trong popover. */
3591
+ onPickImage?: () => void;
3592
+ /** Ẩn từng nhóm nút khi màn không cần (vd ô đáp án ngắn). */
3593
+ hideHeadings?: boolean;
3594
+ hideLists?: boolean;
3595
+ hideBlocks?: boolean;
3596
+ hideImage?: boolean;
3597
+ hideYoutube?: boolean;
3598
+ hideLink?: boolean;
3599
+ hideHistory?: boolean;
3600
+ /** Nút phụ do màn tự thêm (chèn ô trống, công thức toán…) — đặt ở CUỐI thanh. */
3601
+ extra?: React$1.ReactNode;
3602
+ className?: string;
3603
+ }
3604
+ declare function EditorToolbar({ editor, onPickImage, hideHeadings, hideLists, hideBlocks, hideImage, hideYoutube, hideLink, hideHistory, extra, className, }: EditorToolbarProps): React$1.JSX.Element;
3605
+
3606
+ interface EditorMentionItem {
3607
+ /** Giá trị lưu vào HTML (`data-id`) — thường là id người dùng/thẻ. */
3608
+ id: string;
3609
+ /** Chữ hiện trong nội dung (`data-label`). Không có thì dùng `id`. */
3610
+ label?: string;
3611
+ /** Dòng phụ trong danh sách gợi ý (email, đơn vị…). Không vào HTML. */
3612
+ hint?: string;
3613
+ }
3614
+ interface EditorMentionConfig {
3615
+ /** Ký tự mở gợi ý. Mặc định `@`. */
3616
+ char?: string;
3617
+ /**
3618
+ * Nguồn gợi ý. Trả mảng (đồng bộ) hoặc Promise (gọi API). Nhận `query` là chữ sau ký tự mở.
3619
+ * Lỗi/`reject` ⇒ danh sách rỗng (không làm sập vùng soạn thảo).
3620
+ */
3621
+ items: (query: string) => EditorMentionItem[] | Promise<EditorMentionItem[]>;
3622
+ /** Số mục tối đa hiện ra. Mặc định 8. */
3623
+ limit?: number;
3624
+ /** Chữ khi không có kết quả. */
3625
+ emptyText?: string;
3626
+ }
3627
+ /** Cấu hình `suggestion` cho extension Mention — dùng ở `buildEditorExtensions`. */
3628
+ declare function createMentionSuggestion(config: EditorMentionConfig): Partial<SuggestionOptions>;
3629
+
3630
+ interface RichTextEditorProps extends Pick<EditorToolbarProps, 'hideHeadings' | 'hideLists' | 'hideBlocks' | 'hideImage' | 'hideYoutube' | 'hideLink' | 'hideHistory' | 'onPickImage'> {
3631
+ /** HTML hiện tại. Đổi từ ngoài (nạp bản ghi / reset form) thì nội dung được ghi lại. */
3632
+ value?: string;
3633
+ onChange?: (html: string) => void;
3634
+ /** Cần document dạng JSON của ProseMirror (lưu JSONB, diff…) thì dùng thêm cái này. */
3635
+ onChangeJson?: (json: JSONContent) => void;
3636
+ placeholder?: string;
3637
+ /** Chiều cao tối thiểu vùng soạn (px). Mặc định 200; `compact` ⇒ 96. */
3638
+ minHeight?: number;
3639
+ /** Gọn: dùng cho ô ngắn (đáp án, mô tả) — bớt nhóm nút, thấp hơn. */
3640
+ compact?: boolean;
3641
+ readOnly?: boolean;
3642
+ /** Gợi ý @nhắc-tên. Không truyền ⇒ tắt hẳn extension. */
3643
+ mention?: EditorMentionConfig;
3644
+ /**
3645
+ * Tải ảnh khi người dùng KÉO-THẢ hoặc DÁN ảnh. Trả URL đã lưu. Không khai ⇒ chặn (xem ghi chú đầu file).
3646
+ */
3647
+ onUploadImage?: (file: File) => Promise<string>;
3648
+ /** Lỗi người dùng cần biết (chặn dán ảnh, upload thất bại) — app tự hiện toast. */
3649
+ onError?: (message: string) => void;
3650
+ /** Nút phụ ở cuối thanh công cụ (chèn ô trống, công thức…). */
3651
+ toolbarExtra?: React$1.ReactNode;
3652
+ /** Nhận instance TipTap để màn chạy lệnh riêng (chèn marker, đọc selection…). */
3653
+ onReady?: (editor: Editor) => void;
3654
+ hideToolbar?: boolean;
3655
+ className?: string;
3656
+ editorClassName?: string;
3657
+ 'data-testid'?: string;
3658
+ }
3659
+ declare function RichTextEditor({ value, onChange, onChangeJson, placeholder, minHeight, compact, readOnly, mention, onUploadImage, onError, onPickImage, toolbarExtra, onReady, hideToolbar, hideHeadings, hideLists, hideBlocks, hideImage, hideYoutube, hideLink, hideHistory, className, editorClassName, 'data-testid': testId, }: RichTextEditorProps): React$1.JSX.Element;
3660
+
3661
+ interface EditorExtensionOptions {
3662
+ placeholder?: string;
3663
+ /** Ảnh: chèn + KÉO ĐỔI KÍCH THƯỚC (tiptap-extension-resize-image). Mặc định bật. */
3664
+ image?: boolean;
3665
+ /** Nhúng video YouTube. Mặc định bật. */
3666
+ youtube?: boolean;
3667
+ /** Gợi ý @nhắc-tên. Không truyền ⇒ tắt hẳn extension (không chỉ ẩn nút). */
3668
+ mention?: EditorMentionConfig;
3669
+ /** Liên kết bấm được ngay trong vùng soạn (mặc định false — soạn thảo thì bấm vào để SỬA). */
3670
+ linkOpenOnClick?: boolean;
3671
+ }
3672
+ declare function buildEditorExtensions(options?: EditorExtensionOptions): AnyExtension[];
3673
+
3674
+ type Row$4 = Record<string, unknown>;
3675
+ interface AntdDataColumn {
3676
+ field: string;
3677
+ header: string;
3678
+ /** 'text'|'number'|'money'|'status'|'date'|'datetime'|'progress'|'user'|'masked' (nới string cho codegen). */
3679
+ type?: string;
3680
+ sortable?: boolean;
3681
+ status?: Record<string, {
3682
+ label: string;
3683
+ tone?: string;
3684
+ }>;
3685
+ /** 'select' → dropdown lọc (từ status/giá trị duy nhất); khác → không lọc cột (dùng search). */
3686
+ filter?: string;
3687
+ /** H1: vị trí bộ lọc — 'advanced' → hiện trong PANEL "Lọc nâng cao" phía trên bảng thay vì
3688
+ * dropdown cột. 'column'|'default' (mặc định) → dropdown cột như cũ. */
3689
+ position?: string;
3690
+ /**
3691
+ * Ô TÙY Ý — thay hẳn cách vẽ theo `type`.
3692
+ *
3693
+ * Cần cho BẢNG NHÚNG trong cây `ui:`: ô của nó là JSX do emitter dựng (nội suy `{item.x}`, ô
3694
+ * ghép `cells`, badge theo giá trị…), không rút gọn về một `type` được. Không có cửa này thì
3695
+ * bảng nhúng buộc phải dùng bảng shadcn — đo trên kho: 5 cột ô-ghép sẽ mất nội dung.
3696
+ */
3697
+ render?: (value: unknown, row: Record<string, unknown>, index: number) => React.ReactNode;
3698
+ /** filter 'tab' → dải Segmented ở đầu bảng (parity shadcn tab filter). options do BA khai. */
3699
+ tab?: {
3700
+ options: {
3701
+ label: string;
3702
+ value: string;
3703
+ count?: number;
3704
+ }[];
3705
+ showCount?: boolean;
3706
+ includeAllOption?: boolean;
3707
+ allLabel?: string;
3708
+ };
3709
+ }
3710
+ interface AntdDataRowAction {
3711
+ kind: string;
3712
+ label?: string;
3713
+ }
3714
+ interface AntdToolbarAction {
3715
+ kind: string;
3716
+ label: string;
3717
+ icon?: string;
3718
+ }
3719
+ /** H4: sub-field trong field array/object (subset ArraySubField panui). */
3720
+ interface AntdFormSubField {
3721
+ name: string;
3722
+ label: string;
3723
+ type?: string;
3724
+ required?: boolean;
3725
+ placeholder?: string;
3726
+ options?: Array<string | {
3727
+ label: string;
3728
+ value: string;
3729
+ }>;
3730
+ }
3731
+ /** D2: field cho dialog thêm/sửa (subset FormField panui). */
3732
+ interface AntdFormField {
3733
+ name: string;
3734
+ label: string;
3735
+ type?: string;
3736
+ required?: boolean;
3737
+ placeholder?: string;
3738
+ options?: Array<string | {
3739
+ label: string;
3740
+ value: string;
3741
+ }>;
3742
+ /** H4: sub-field cho type array (Form.List) / object (Form.Item lồng). */
3743
+ fields?: AntdFormSubField[];
3744
+ /** H4: nhãn nút thêm dòng cho type array (mặc định "Thêm dòng"). */
3745
+ addLabel?: string;
3746
+ }
3747
+ /**
3748
+ * Dạng xem THẺ của chính bảng antd (2026-08-12) — parity với nhánh shadcn (`DataTable.cards`).
3749
+ *
3750
+ * Slot khai bằng TÊN TRƯỜNG để descriptor serialize được: codegen antd emit một hằng JSON rồi
3751
+ * truyền vào đây, không emit closure. Khung thẻ dùng CHUNG `RecordCardGrid` với hai nhánh kia; chỉ
3752
+ * cách render một ô là của antd (Tag/Progress/Avatar…), nên cùng một spec ra cùng một hình.
3753
+ */
3754
+ interface AntdCardsConfig extends RecordCardSlots {
3755
+ default?: 'table' | 'cards';
3756
+ cols?: DataTableCardsCols;
3757
+ minItemWidth?: string;
3758
+ gap?: number;
3759
+ }
3760
+ interface AntdDataTableProps {
3761
+ /** D6: map y sì DataTable — truyền object từ useAntdTable (columns/data/pageSize/rowKey). */
3762
+ table?: {
3763
+ columns: AntdDataColumn[];
3764
+ data: Row$4[];
3765
+ pageSize?: number;
3766
+ rowKey?: (row: Row$4) => string;
3767
+ /** H3: khóa persist localStorage (search/sort/cột-ẩn/pageSize). */
3768
+ pageName?: string;
3769
+ /** H3: sort ban đầu khi mount (nếu chưa có state persist). */
3770
+ defaultSort?: {
3771
+ field: string;
3772
+ desc?: boolean;
3773
+ };
3774
+ };
3775
+ /** Khai `cards` ⇒ toolbar hiện nút chuyển ⊞/☰ (giữa nút lọc nâng cao và nút Làm mới). */
3776
+ cards?: AntdCardsConfig;
3777
+ /** hoặc truyền trực tiếp (tương thích P1–P5). */
3778
+ columns?: AntdDataColumn[];
3779
+ data?: Row$4[];
3780
+ pageSize?: number;
3781
+ rowKey?: string;
3782
+ title?: string;
3783
+ searchPlaceholder?: string;
3784
+ /** D6: map y sì DataTable.searchOptions. */
3785
+ searchOptions?: {
3786
+ placeholder?: string;
3787
+ helpTitle?: React.ReactNode;
3788
+ helpContent?: React.ReactNode;
3789
+ };
3790
+ toolbarActions?: AntdToolbarAction[];
3791
+ onToolbarAction?: (a: AntdToolbarAction) => void;
3792
+ rowActions?: AntdDataRowAction[];
3793
+ /**
3794
+ * Cả Ô "Thao tác" do NGƯỜI GỌI vẽ — thay hẳn bộ nút suy từ `kind`.
3795
+ *
3796
+ * Cần cho bảng nhúng: đo trên kho, 11/14 nút dòng ở đó là nút TÙY Ý (`do:`) và 5 nút có `when`
3797
+ * theo từng dòng; `kind` không diễn đạt được. Truyền cái này thì `rowActions` chỉ còn dùng để
3798
+ * BIẾT là có cột thao tác (và độ rộng của nó).
3799
+ */
3800
+ rowActionsNode?: (row: Record<string, unknown>, index: number) => React.ReactNode;
3801
+ onRowAction?: (action: AntdDataRowAction, row: Row$4) => void;
3802
+ /** D2: field dialog thêm/sửa. Có → rowAction "edit" mở Modal Form. */
3803
+ formFields?: AntdFormField[];
3804
+ formTitle?: string;
3805
+ onFormSubmit?: (mode: 'add' | 'edit', values: Record<string, unknown>, row?: Row$4) => void;
3806
+ /**
3807
+ * Mở Modal THÊM từ bên ngoài. Nút "Thêm" thuộc hàng tiêu đề trang (AdminPageActions), không
3808
+ * thuộc thanh công cụ cạnh ô tìm kiếm — vùng đó dành cho thao tác hàng loạt trên dòng đang
3809
+ * chọn. Trang giữ boolean này; molecule trả `false` khi Modal đóng.
3810
+ */
3811
+ addOpen?: boolean;
3812
+ onAddOpenChange?: (open: boolean) => void;
3813
+ /** P4: hàng thẻ thống kê trên toolbar. */
3814
+ stats?: Array<{
3815
+ label: string;
3816
+ value: string | number;
3817
+ }>;
3818
+ /** P3: thao tác hàng loạt trên dòng đã chọn (hiện thanh bulk khi chọn ≥1). */
3819
+ bulkActions?: Array<{
3820
+ label: string;
3821
+ tone?: string;
3822
+ icon?: string;
3823
+ }>;
3824
+ onBulkAction?: (action: {
3825
+ label: string;
3826
+ tone?: string;
3827
+ }, rows: Row$4[]) => void;
3828
+ /** click hàng = toggle chọn (cần bulkActions). */
3829
+ clickRowToSelect?: boolean;
3830
+ /** số cột ghim trái/phải. */
3831
+ stickyLeftColumns?: number;
3832
+ stickyRightColumns?: number;
3833
+ hideSearch?: boolean;
3834
+ hidePagination?: boolean;
3835
+ hideToolbar?: boolean;
3836
+ /** khóa persist localStorage[panui-table-<pageName>] cho search/sort/cột-ẩn/pageSize. */
3837
+ pageName?: string;
3838
+ /** sort ban đầu khi mount (bị state persist ghi đè nếu đã lưu). */
3839
+ defaultSort?: {
3840
+ field: string;
3841
+ desc?: boolean;
3842
+ };
3843
+ /** dải Tabs (antd) hiển thị phía trên toolbar. ReactNode hoặc mảng ReactNode. */
3844
+ componentTab?: React.ReactNode[] | React.ReactNode;
3845
+ /** render tùy biến nội dung panel "Lọc nâng cao"; mặc định molecule tự dựng control theo cột
3846
+ * có position: 'advanced'. */
3847
+ renderAdvancedFilter?: () => React.ReactNode;
3848
+ }
3849
+ declare function AntdDataTable({ table, columns: columnsProp, data: dataProp, pageSize: pageSizeProp, rowKey: rowKeyProp, title, searchPlaceholder: searchPlaceholderProp, searchOptions, toolbarActions, onToolbarAction, rowActions, rowActionsNode, onRowAction, formFields, formTitle, onFormSubmit, addOpen, onAddOpenChange, stats, bulkActions, onBulkAction, clickRowToSelect, stickyLeftColumns, stickyRightColumns, hideSearch, hidePagination, hideToolbar, pageName: pageNameProp, defaultSort: defaultSortProp, componentTab, renderAdvancedFilter, cards, }: AntdDataTableProps): React$1.JSX.Element;
3850
+
3851
+ type Row$3 = Record<string, unknown>;
3852
+ interface UseAntdTableOptions<T extends Row$3 = Row$3> {
3853
+ columns: AntdDataColumn[];
3854
+ data: T[];
3855
+ pageSize?: number;
3856
+ /** khóa hàng (mặc định 'id' nếu có). */
3857
+ getRowId?: (row: T) => string;
3858
+ /** H3: khóa persist localStorage (search/sort/cột-ẩn/pageSize) theo màn. */
3859
+ pageName?: string;
3860
+ /** H3: sort ban đầu khi mount (nếu chưa có state persist). */
3861
+ defaultSort?: {
3862
+ field: string;
3863
+ desc?: boolean;
3864
+ };
3865
+ }
3866
+ /** Object `table` cho AntdDataTable (đóng gói cấu hình dữ liệu). rowKey dùng Row để khớp
3867
+ * kiểu prop AntdDataTable (tránh contravariance khi data typed cụ thể). */
3868
+ interface AntdTable {
3869
+ columns: AntdDataColumn[];
3870
+ data: Row$3[];
3871
+ pageSize?: number;
3872
+ rowKey?: (row: Row$3) => string;
3873
+ /** H3: chuyển tiếp xuống AntdDataTable (persist theo pageName + defaultSort). */
3874
+ pageName?: string;
3875
+ defaultSort?: {
3876
+ field: string;
3877
+ desc?: boolean;
3878
+ };
3879
+ }
3880
+ declare function useAntdTable<T extends Row$3 = Row$3>({ columns, data, pageSize, getRowId, pageName, defaultSort, }: UseAntdTableOptions<T>): AntdTable;
3881
+
3882
+ interface AntdStackListProps {
3883
+ /** Mỗi phần tử là nội dung MỘT mục — người gọi tự dựng, nên ô tuỳ ý thoải mái. */
3884
+ items: React$1.ReactNode[];
3885
+ /** Khung viền ngoài + bo góc (mirror `List bordered`). */
3886
+ bordered?: boolean;
3887
+ /** `small` = khoảng đệm gọn (mirror `List size="small"`). */
3888
+ size?: 'small' | 'default';
3889
+ className?: string;
3890
+ style?: React$1.CSSProperties;
3891
+ }
3892
+ declare function AntdStackList({ items, bordered, size, className, style }: AntdStackListProps): React$1.JSX.Element;
3893
+ /** Một mục kiểu `List.Item.Meta`: avatar bên trái, tiêu đề + mô tả bên phải. */
3894
+ declare function AntdStackListMeta({ avatar, title, description, }: {
3895
+ avatar?: React$1.ReactNode;
3896
+ title: React$1.ReactNode;
3897
+ description?: React$1.ReactNode;
3898
+ }): React$1.JSX.Element;
3899
+
3900
+ type Row$2 = Record<string, unknown>;
3901
+ interface MuiDataColumn {
3902
+ field: string;
3903
+ header: string;
3904
+ /** 'text'|'number'|'money'|'status'|'date'|'datetime'|'progress'|'user'|'masked' (nới string cho codegen). */
3905
+ type?: string;
3906
+ sortable?: boolean;
3907
+ status?: Record<string, {
3908
+ label: string;
3909
+ tone?: string;
3910
+ }>;
3911
+ /** 'text'|'select'|'combobox'|'number-range'|'date-range'|'date'|'phone'|'faceted'|'tree' → filter cột. */
3912
+ filter?: string;
3913
+ /** H1: 'advanced' → panel "Lọc nâng cao" phía trên bảng thay vì dropdown cột. */
3914
+ position?: string;
3915
+ /**
3916
+ * Ô TÙY Ý — thay hẳn cách vẽ theo `type`. Mirror `AntdDataColumn.render`.
3917
+ *
3918
+ * Cần cho BẢNG NHÚNG trong cây `ui:`: ô của nó là JSX do emitter dựng (nội suy `{item.x}`, ô
3919
+ * ghép `cells`, badge theo giá trị…), không rút gọn về một `type` được.
3920
+ */
3921
+ render?: (value: unknown, row: Record<string, unknown>, index: number) => React__default.ReactNode;
3922
+ /** filter 'tab' → dải Tabs ở đầu bảng (parity shadcn/antd tab filter). options do BA khai. */
3923
+ tab?: {
3924
+ options: {
3925
+ label: string;
3926
+ value: string;
3927
+ count?: number;
3928
+ }[];
3929
+ showCount?: boolean;
3930
+ includeAllOption?: boolean;
3931
+ allLabel?: string;
3932
+ };
3933
+ }
3934
+ interface MuiDataRowAction {
3935
+ kind: string;
3936
+ label?: string;
3937
+ }
3938
+ interface MuiToolbarAction {
3939
+ kind: string;
3940
+ label: string;
3941
+ icon?: string;
3942
+ }
3943
+ /** H4: sub-field trong field array/object. */
3944
+ interface MuiFormSubField$1 {
3945
+ name: string;
3946
+ label: string;
3947
+ type?: string;
3948
+ required?: boolean;
3949
+ placeholder?: string;
3950
+ options?: Array<string | {
3951
+ label: string;
3952
+ value: string;
3953
+ }>;
3954
+ }
3955
+ /** D2: field cho dialog thêm/sửa. */
3956
+ interface MuiFormField {
3957
+ name: string;
3958
+ label: string;
3959
+ type?: string;
3960
+ required?: boolean;
3961
+ placeholder?: string;
3962
+ options?: Array<string | {
3963
+ label: string;
3964
+ value: string;
3965
+ }>;
3966
+ fields?: MuiFormSubField$1[];
3967
+ addLabel?: string;
3968
+ }
3969
+ /**
3970
+ * Dạng xem THẺ của chính bảng MUI (2026-08-12) — parity với nhánh shadcn/antd.
3971
+ *
3972
+ * Slot khai bằng TÊN TRƯỜNG để descriptor serialize được (codegen mui emit hằng JSON). Khung thẻ dùng
3973
+ * CHUNG `RecordCardGrid` với hai nhánh kia; ô thì render bằng `renderCell` của MUI (Chip/LinearProgress…).
3974
+ */
3975
+ interface MuiCardsConfig extends RecordCardSlots {
3976
+ default?: 'table' | 'cards';
3977
+ cols?: DataTableCardsCols;
3978
+ minItemWidth?: string;
3979
+ gap?: number;
3980
+ }
3981
+ interface MuiDataTableProps {
3982
+ /** D6: map y sì DataTable — object từ useMuiTable (columns/data/pageSize/rowKey/pageName/defaultSort). */
3983
+ table?: {
3984
+ columns: MuiDataColumn[];
3985
+ data: Row$2[];
3986
+ pageSize?: number;
3987
+ rowKey?: (row: Row$2) => string;
3988
+ pageName?: string;
3989
+ defaultSort?: {
3990
+ field: string;
3991
+ desc?: boolean;
3992
+ };
3993
+ };
3994
+ /** Khai `cards` ⇒ toolbar hiện nút chuyển ⊞/☰ (giữa nút lọc nâng cao và nút Làm mới). */
3995
+ cards?: MuiCardsConfig;
3996
+ /** hoặc truyền trực tiếp. */
3997
+ columns?: MuiDataColumn[];
3998
+ data?: Row$2[];
3999
+ pageSize?: number;
4000
+ rowKey?: string;
4001
+ title?: string;
4002
+ searchPlaceholder?: string;
4003
+ searchOptions?: {
4004
+ placeholder?: string;
4005
+ helpTitle?: React__default.ReactNode;
4006
+ helpContent?: React__default.ReactNode;
4007
+ };
4008
+ toolbarActions?: MuiToolbarAction[];
4009
+ onToolbarAction?: (a: MuiToolbarAction) => void;
4010
+ rowActions?: MuiDataRowAction[];
4011
+ onRowAction?: (action: MuiDataRowAction, row: Row$2) => void;
4012
+ /** D2: field dialog thêm/sửa. Có → rowAction "edit" mở Dialog Form. */
4013
+ formFields?: MuiFormField[];
4014
+ formTitle?: string;
4015
+ onFormSubmit?: (mode: 'add' | 'edit', values: Record<string, unknown>, row?: Row$2) => void;
4016
+ /**
4017
+ * Mở Dialog THÊM từ bên ngoài. Nút "Thêm" thuộc hàng tiêu đề trang (AdminPageActions), không
4018
+ * thuộc thanh công cụ cạnh ô tìm kiếm — vùng đó dành cho thao tác hàng loạt trên dòng đang
4019
+ * chọn. Trang giữ boolean này; molecule trả `false` khi Dialog đóng.
4020
+ */
4021
+ addOpen?: boolean;
4022
+ onAddOpenChange?: (open: boolean) => void;
4023
+ /** P4: hàng thẻ thống kê trên toolbar. */
4024
+ stats?: Array<{
4025
+ label: string;
4026
+ value: string | number;
4027
+ }>;
4028
+ /** P3: thao tác hàng loạt trên dòng đã chọn. */
4029
+ bulkActions?: Array<{
4030
+ label: string;
4031
+ tone?: string;
4032
+ icon?: string;
4033
+ }>;
4034
+ onBulkAction?: (action: {
4035
+ label: string;
4036
+ tone?: string;
4037
+ }, rows: Row$2[]) => void;
4038
+ clickRowToSelect?: boolean;
4039
+ /**
4040
+ * Cả Ô "Thao tác" do NGƯỜI GỌI vẽ — thay hẳn bộ nút suy từ `kind`. Mirror
4041
+ * `AntdDataTableProps.rowActionsNode`; xem lý do ở đó.
4042
+ */
4043
+ rowActionsNode?: (row: Record<string, unknown>, index: number) => React__default.ReactNode;
4044
+ stickyLeftColumns?: number;
4045
+ stickyRightColumns?: number;
4046
+ hideSearch?: boolean;
4047
+ hidePagination?: boolean;
4048
+ hideToolbar?: boolean;
4049
+ pageName?: string;
4050
+ defaultSort?: {
4051
+ field: string;
4052
+ desc?: boolean;
4053
+ };
4054
+ /** dải Tabs (MUI) hiển thị phía trên toolbar. ReactNode hoặc mảng ReactNode. */
4055
+ componentTab?: React__default.ReactNode[] | React__default.ReactNode;
4056
+ renderAdvancedFilter?: () => React__default.ReactNode;
4057
+ }
4058
+ declare function MuiDataTable({ table, columns: columnsProp, data: dataProp, pageSize: pageSizeProp, rowKey: rowKeyProp, title, searchPlaceholder: searchPlaceholderProp, searchOptions, toolbarActions, onToolbarAction, rowActions, rowActionsNode, onRowAction, formFields, formTitle, onFormSubmit, addOpen, onAddOpenChange, stats, bulkActions, onBulkAction, clickRowToSelect, stickyLeftColumns, stickyRightColumns, hideSearch, hidePagination, hideToolbar, pageName: pageNameProp, defaultSort: defaultSortProp, componentTab, renderAdvancedFilter, cards, }: MuiDataTableProps): React__default.JSX.Element;
4059
+
4060
+ type Row$1 = Record<string, unknown>;
4061
+ interface UseMuiTableOptions<T extends Row$1 = Row$1> {
4062
+ columns: MuiDataColumn[];
4063
+ data: T[];
4064
+ pageSize?: number;
4065
+ /** khóa hàng (mặc định 'id' nếu có). */
4066
+ getRowId?: (row: T) => string;
4067
+ /** H3: khóa persist localStorage (search/sort/cột-ẩn/pageSize) theo màn. */
4068
+ pageName?: string;
4069
+ /** H3: sort ban đầu khi mount (nếu chưa có state persist). */
4070
+ defaultSort?: {
4071
+ field: string;
4072
+ desc?: boolean;
4073
+ };
4074
+ }
4075
+ /** Object `table` cho MuiDataTable (đóng gói cấu hình dữ liệu). rowKey dùng Row để khớp
4076
+ * kiểu prop MuiDataTable (tránh contravariance khi data typed cụ thể). */
4077
+ interface MuiTable {
4078
+ columns: MuiDataColumn[];
4079
+ data: Row$1[];
4080
+ pageSize?: number;
4081
+ rowKey?: (row: Row$1) => string;
4082
+ /** H3: chuyển tiếp xuống MuiDataTable (persist theo pageName + defaultSort). */
4083
+ pageName?: string;
4084
+ defaultSort?: {
4085
+ field: string;
4086
+ desc?: boolean;
4087
+ };
4088
+ }
4089
+ declare function useMuiTable<T extends Row$1 = Row$1>({ columns, data, pageSize, getRowId, pageName, defaultSort, }: UseMuiTableOptions<T>): MuiTable;
4090
+
4091
+ /**
4092
+ * Một lựa chọn của select/radio/option-cards.
4093
+ *
4094
+ * `description` và `icon` có trong spec panui (option-cards: mô tả + biểu tượng từng thẻ) và
4095
+ * codegen chở chúng xuống. Trước
4096
+ * 20/09/2026 kiểu này chỉ nhận { label, value } ⇒ MỌI app sinh ra có option-cards đều không
4097
+ * typecheck (16 lỗi chỉ riêng e-ticket::mui). Không ai thấy vì chưa cổng nào biên dịch mã sinh ra.
4098
+ *
4099
+ * NÓI RÕ: MuiForm CHƯA vẽ `option-cards` — `renderControl` không có case cho nó nên nó rơi xuống
4100
+ * `default:` tức một TextField. Nhận `description` ở đây là để dữ liệu ĐI QUA được, không phải
4101
+ * lời hứa đã vẽ. Ngày thêm case option-cards thì nó nằm sẵn đó.
4102
+ */
4103
+ type Opt = string | {
4104
+ label: string;
4105
+ value: string;
4106
+ description?: string;
4107
+ icon?: string;
4108
+ };
4109
+ interface MuiFormSubField {
4110
+ name: string;
4111
+ label: string;
4112
+ type?: string;
4113
+ required?: boolean;
4114
+ placeholder?: string;
4115
+ options?: Opt[];
4116
+ /** select: ô tìm (mặc định true). */
4117
+ searchable?: boolean;
4118
+ }
4119
+ interface MuiFormFieldSpec {
4120
+ name: string;
4121
+ label: string;
4122
+ /** text|textarea|number|select|radio|password|date|datetime|time|switch|checkbox|array|object */
4123
+ type?: string;
4124
+ required?: boolean;
4125
+ placeholder?: string;
4126
+ description?: string;
4127
+ /** mảng lựa chọn (select/radio) HOẶC cascading `{ dependsOn, map }` (G3). */
4128
+ options?: Opt[] | {
4129
+ dependsOn: string;
4130
+ map: Record<string, Opt[]>;
4131
+ };
4132
+ /** select (2026-08-12): ô gõ tìm — mặc định true ở runtime nếu không khai. */
4133
+ searchable?: boolean;
4134
+ /** select: chọn nhiều → value string[]. */
4135
+ multiple?: boolean;
4136
+ min?: number;
4137
+ max?: number;
4138
+ minLength?: number;
4139
+ maxLength?: number;
4140
+ pattern?: string;
4141
+ email?: boolean;
4142
+ compare?: {
4143
+ op: string;
4144
+ field: string;
4145
+ message?: string;
4146
+ };
4147
+ showWhen?: Record<string, string | number | boolean>;
4148
+ requiredWhen?: Record<string, string | number | boolean>;
4149
+ asyncCheck?: {
4150
+ taken: string[];
4151
+ message?: string;
4152
+ delay?: number;
4153
+ };
4154
+ fields?: MuiFormSubField[];
4155
+ addLabel?: string;
4156
+ /** 2026-08-12: cấu hình ô soạn thảo khi `type: 'richtext'` (cờ của panui, serialize được). */
4157
+ richtext?: {
4158
+ compact?: boolean;
4159
+ minHeight?: number;
4160
+ image?: boolean;
4161
+ youtube?: boolean;
4162
+ link?: boolean;
4163
+ headings?: boolean;
4164
+ lists?: boolean;
4165
+ blocks?: boolean;
4166
+ mentions?: string[];
4167
+ mentionChar?: string;
4168
+ };
4169
+ }
4170
+ interface MuiFormSection {
4171
+ title?: string;
4172
+ tab?: string;
4173
+ /** Số cột của FIELD trong card (mặc định 1 = xếp dọc như trước). */
4174
+ columns?: number;
4175
+ /** XOR với `fields`: card lồng / vùng gom (luật container hợp nhất của panui, 2026-08-12). */
4176
+ fields?: MuiFormFieldSpec[];
4177
+ sections?: MuiFormSection[];
4178
+ /** Container layout bên trong card (group của panui). */
4179
+ group?: MuiFormGroup;
4180
+ }
4181
+ /**
4182
+ * Lưới bố cục (mirror `group` của panui): `cols` = số cột đều; `tracks` = template không đều
4183
+ * (vd `minmax(0,1fr) 20rem` cho cột chính + sidebar), chỉ áp từ `tracksFrom` trở lên — dưới đó 1 cột.
4184
+ */
4185
+ interface MuiFormGroup {
4186
+ cols?: number;
4187
+ tracks?: string;
4188
+ tracksFrom?: 'sm' | 'md' | 'lg';
4189
+ gap?: number;
4190
+ fields?: MuiFormFieldSpec[];
4191
+ /** Con của group: field, group lồng, hoặc section (card). */
4192
+ blocks?: MuiFormBlock[];
4193
+ }
4194
+ type MuiFormBlock = {
4195
+ field: MuiFormFieldSpec;
4196
+ } | {
4197
+ group: MuiFormGroup;
4198
+ } | {
4199
+ section: MuiFormSection;
4200
+ };
4201
+ interface MuiFormSpec {
4202
+ fields?: MuiFormFieldSpec[];
4203
+ sections?: MuiFormSection[];
4204
+ /** Cây bố cục đầy đủ (panui `form.fields` có `group` lồng). Ưu tiên hơn `fields`/`sections`. */
4205
+ blocks?: MuiFormBlock[];
4206
+ tabs?: boolean;
4207
+ /** Bề rộng thân form (giá trị CSS, vd '72rem' | 'none'). Không khai ⇒ 720px như trước. */
4208
+ maxWidth?: number | string;
4209
+ submitLabel?: string;
4210
+ cancelLabel?: string;
4211
+ }
4212
+ interface MuiFormProps {
4213
+ spec: MuiFormSpec;
4214
+ onSubmit?: (values: Record<string, unknown>) => void;
4215
+ onCancel?: () => void;
4216
+ /**
4217
+ * `false` ⇒ ẨN HẲN nút Lưu (không phải disable). Dùng cho phân quyền: người không có quyền ghi
4218
+ * thì không nhìn thấy nút, đúng như nhánh shadcn vốn làm (`can(P.X) ? <SaveButton/> : null`).
4219
+ * Trước 20/09/2026 MuiForm không có lối nào để giấu nút, nên codegen mui KHÔNG lọc được
4220
+ * `form.submit` — 16/45 nút có quyền của e-ticket hở ra chỉ vì thiếu prop này.
4221
+ * Mặc định `true`: form không khai quyền giữ nguyên hành vi cũ.
4222
+ */
4223
+ canSubmit?: boolean;
4224
+ }
4225
+ declare function MuiForm({ spec, onSubmit, onCancel, canSubmit }: MuiFormProps): React$1.JSX.Element;
4226
+
4227
+ type Row = Record<string, unknown>;
4228
+ interface MuiCardColumn {
4229
+ field: string;
4230
+ header: string;
4231
+ /** 'text'|'number'|'money'|'status'|'date'|'datetime' (nới string cho codegen). */
4232
+ type?: string;
4233
+ status?: Record<string, {
4234
+ label: string;
4235
+ tone?: string;
4236
+ }>;
4237
+ }
4238
+ interface MuiCardsField {
4239
+ field: string;
4240
+ label: string;
4241
+ }
4242
+ interface MuiCardsItem {
4243
+ /** field → tiêu đề thẻ. */
4244
+ title?: string;
4245
+ /** field → phụ đề (muted). */
4246
+ subtitle?: string;
4247
+ /** field → badge (Chip nếu cột status, còn lại text). */
4248
+ badge?: string;
4249
+ /** field hiện trong thân thẻ. */
4250
+ fields?: MuiCardsField[];
4251
+ }
4252
+ interface MuiCardsSection {
4253
+ title: string;
4254
+ fields: MuiCardsField[];
4255
+ }
4256
+ interface MuiCardsSpec {
4257
+ columns: MuiCardColumn[];
4258
+ item: MuiCardsItem;
4259
+ /** section chi tiết trong Drawer (đã resolve; mặc định = mọi cột). */
4260
+ sections: MuiCardsSection[];
4261
+ /** placeholder ô tìm kiếm — có → hiện ô lọc client. */
4262
+ search?: string;
4263
+ }
4264
+ interface MuiCardsProps {
4265
+ spec: MuiCardsSpec;
4266
+ rows: Row[];
4267
+ }
4268
+ declare function MuiCards({ spec, rows }: MuiCardsProps): React__default.JSX.Element;
4269
+
4270
+ declare const useDebounce: (value: string, delay: number) => string;
4271
+
4272
+ interface ExportExcelOptions {
4273
+ fileName: string;
4274
+ sheetName?: string;
4275
+ headers?: string[];
4276
+ dataKey?: string[];
4277
+ }
4278
+ declare function useExportExcel<T extends Record<string, any>>(): {
4279
+ exportToExcel: (data: T[], options: ExportExcelOptions) => void;
4280
+ };
4281
+
4282
+ type UseFetchProps<T> = {
4283
+ fn: () => Promise<T>;
4284
+ };
4285
+ declare function useFetch<T>({ fn }: UseFetchProps<T>): {
4286
+ data: T | null;
4287
+ isLoading: boolean;
4288
+ error: Error | null;
4289
+ refetch: () => Promise<void>;
4290
+ isFetching: boolean;
4291
+ };
4292
+
4293
+ declare function useIsMobile(): boolean;
4294
+
4295
+ type ResponsiveTabRefs = {
4296
+ containerRef: React$1.RefObject<HTMLDivElement | null>;
4297
+ ghostRef: React$1.RefObject<HTMLDivElement | null>;
4298
+ shouldUseSelect: boolean;
4299
+ };
4300
+ /**
4301
+ * Phát hiện khi hàng tab bị xuống dòng (>= 2 dòng) để caller có thể chuyển
4302
+ * sang dạng Select.
4303
+ *
4304
+ * Cách dùng:
4305
+ * const { containerRef, ghostRef, shouldUseSelect } = useResponsiveTab()
4306
+ * - `containerRef`: wrapper bao quanh UI hiển thị (luôn luôn render).
4307
+ * - `ghostRef`: một div ẨN (visibility:hidden, absolute) bên trong wrapper,
4308
+ * chứa BẢN SAO các tab với CÙNG layout `flex-wrap` và CÙNG width như
4309
+ * hàng tab thật. Hook sẽ so sánh `offsetTop` của child đầu và child cuối:
4310
+ * nếu khác nhau ⇒ tab đã xuống dòng ⇒ chuyển sang Select.
4311
+ *
4312
+ * Phương pháp này đo trực tiếp việc wrap thật sự, không phụ thuộc vào
4313
+ * sai số padding/box-sizing giữa scrollWidth và clientWidth.
4314
+ */
4315
+ declare function useResponsiveTab(): ResponsiveTabRefs;
4316
+
4317
+ type TableFilter<T, R> = Partial<Record<keyof T | keyof R, {
4318
+ value: string;
4319
+ label: string;
4320
+ }[] | undefined>>;
4321
+ interface UseTableStateOptions {
4322
+ pageName: string;
4323
+ keyObject?: Record<string, any>;
4324
+ }
4325
+ interface UseEnhancedTableOptions<T> {
4326
+ columns: ColumnDef<T, unknown>[];
4327
+ pageName: string;
4328
+ keyObject?: Record<string, any>;
4329
+ queryFn: (state: TableState) => Promise<{
4330
+ items: T[];
4331
+ totalPages: number;
4332
+ total: number;
4333
+ }>;
4334
+ enabled?: boolean;
4335
+ queryKey?: string[];
4336
+ useQueryFn?: boolean;
4337
+ onStateChange?: (state: TableState) => void;
4338
+ onFilterChange?: (filter: Partial<{
4339
+ [key in keyof T]: Any;
4340
+ }>) => void;
4341
+ manualPagination?: boolean;
4342
+ initialState?: Partial<TableState>;
4343
+ getRowId?: (row: T, index: number) => string;
4344
+ enableRowSelection?: boolean | ((row: {
4345
+ original: T;
4346
+ }) => boolean);
4347
+ sortFilter?: string[];
4348
+ manualSorting?: boolean;
4349
+ }
4350
+ /**
4351
+ * Khóa dòng mặc định cho TanStack Table.
4352
+ *
4353
+ * TanStack mặc định dùng chỉ số trong mảng `data` (`"0"`, `"1"`, …). Với phân trang server
4354
+ * (`manualPagination`), mỗi trang là một mảng mới bắt đầu từ 0 — chọn 2 dòng trang 1 rồi sang
4355
+ * trang 2 thì 2 dòng đầu trang 2 cũng bị chọn vì cùng khóa `"0"` / `"1"`.
4356
+ *
4357
+ * Ưu tiên `id` của bản ghi khi có. Không có thì gắn `pageIndex` vào khóa để các trang không đụng nhau.
4358
+ */
4359
+ declare function defaultGetRowId<T>(row: T, index: number, pageIndex?: number): string;
4360
+ interface EnhancedTableResult<T> {
4361
+ table: Table$1<T>;
4362
+ isLoading: boolean;
4363
+ isFetching: boolean;
4364
+ error: unknown;
4365
+ data: {
4366
+ items: T[];
4367
+ totalPages: number;
4368
+ total: number;
4369
+ } | undefined;
4370
+ initialized: boolean;
4371
+ }
4372
+ declare const generateQueryParams: (state: TableState, { baseParams, columns, baseFilter, }?: {
4373
+ columns?: ColumnDef<Any>[];
4374
+ baseParams?: Record<string, string | number | undefined>;
4375
+ baseFilter?: Record<string, string | number | undefined>;
4376
+ }) => URLSearchParams;
4377
+ declare function useEnhancedTable<T>({ columns, pageName, keyObject, queryFn, enabled, useQueryFn, queryKey, manualPagination, initialState, onStateChange, onFilterChange, getRowId, enableRowSelection, sortFilter, manualSorting, }: UseEnhancedTableOptions<T>): EnhancedTableResult<T>;
4378
+ declare const generateFilterParams: (filter: ColumnFiltersState, columns: ColumnDef<Any>[]) => any;
4379
+ interface UseTableOptions<T> {
4380
+ data: T[];
4381
+ columns: ColumnDef<T, unknown>[];
4382
+ pageCount?: number;
4383
+ rowCount?: number;
4384
+ initialState?: Partial<{
4385
+ pagination: PaginationState;
4386
+ sorting: SortingState;
4387
+ columnFilters: ColumnFiltersState;
4388
+ columnVisibility: VisibilityState;
4389
+ }>;
4390
+ }
4391
+
4392
+ /**
4393
+ * Hook wrapper cho react-i18next, trả về hàm dịch nhận key và options tùy chọn.
4394
+ *
4395
+ * Đây là BOUNDARY duy nhất giữa DS và lib i18n cụ thể — mọi component trong DS gọi
4396
+ * `useTranslations()` (không import react-i18next trực tiếp). Nếu đổi lib (ví dụ next-intl, cũng
4397
+ * có hook cùng tên `useTranslations(namespace)` trả `t(key, values)`), chỉ cần viết lại nội dung
4398
+ * hàm này (và `../lib/next-i18next.ts`, `../mi/i18n-provider.tsx` nếu cần đổi cả Provider) — giữ
4399
+ * nguyên chữ ký `t(key, options) => string`, không phải sửa từng component gọi hook.
4400
+ *
4401
+ * @param namespace - Namespace i18n (mặc định: 'common')
4402
+ */
4403
+ declare function useTranslations(namespace?: string | string[]): (key: string, options?: string | Record<string, string | number | Date>) => string;
4404
+
4405
+ declare function slugify(title: unknown): string;
4406
+ declare function stringToFilterString(title: string): string;
4407
+ declare function numberToVietnameseText(value: number | string, unit?: string): string;
4408
+ /**
4409
+ * Chuyển tên tiếng Việt thành mã code (A-Z, 0-9, _).
4410
+ * Bỏ dấu đúng cách để không mất chữ (ví dụ: "Cơ quan tiến hành tố dụng" → "CO_QUAN_TIEN_HANH_TO_DUNG").
4411
+ */
4412
+ declare function vietnameseNameToCode(name: string, maxLength?: number): string;
4413
+ declare function filterSelectOptions(input: string, option: {
4414
+ label: unknown;
4415
+ }): boolean;
4416
+ declare const repairOptions: (options: {
4417
+ label: string;
4418
+ value: string;
4419
+ }[], request: boolean, keyword: string) => {
4420
+ label: string;
4421
+ value: string;
4422
+ }[];
4423
+ declare const lowerCaseFirstLetter: (str: string) => string;
4424
+
4425
+ declare function cn(...inputs: ClassValue[]): string;
4426
+
4427
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AddButton, AddButtonIcon, AdminLayoutContent, AdminNavProvider, AdminPageActions, AdminPageContent, AdminPageLayout, AdminPageTitle, Alert, AlertAction, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AntdDataTable, AntdStackList, AntdStackListMeta, AppLogo, AppSidebar, AspectRatio, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, BackToPageButton, Badge, BorderBeam, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, ButtonSaveDraft, ButtonTooltipWrapper, COL_WIDTH_COMBO_FILTER, COL_WIDTH_TYPE_CODE, Calendar, CalendarDayButton, CancelButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, CodeText, Collapse, Collapsible, CollapsibleContent, CollapsibleTrigger, ColorPalette, ColorPicker, Combobox, Combobox2, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ConfirmActionDialog, ConfirmBulkDeleteDialog, ConfirmDeleteDialog, ConfirmDialog, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyButtonIcon, CopyIconButton, DEFAULT_COLOR_PRESETS, DEFAULT_COLUMN_VISIBILITY, DEFAULT_FILTER, DEFAULT_PAGE_SIZE, DEFAULT_PAGINATION, DEFAULT_SORTING, DEFAULT_TABLE_STATE, DEFAULT_UI_STATE, DataTable, DataTableBulkDeleteToolbar, DataTableCards, DataTableColumnHeader, DataTableComboboxFilter, DataTableDateFilter, DataTableDateRangeFilter, DataTableFacetedFilter, DataTablePagination, DataTablePhoneFilter, DataTableSortMenu, DataTableTabFilter, DataTableTextFilter, DataTableToolbar, DataTableTreeComboboxFilter, DataTableViewOptions, DataTableViewToggle, DatePicker, DatePickerInput, DeckPlayer, DeleteButton, DeleteButtonIcon, DescriptionList, Descriptions, DescriptionsItem, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DirectionProvider, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EditButtonIcon, EditorToolbar, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, ExpandSheet, ExportButton, FAMILY_ORDER, Field, FieldCard, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldMappingEditor, FieldSeparator, FieldSet, FieldTitle, FileLink, FileList, FileUpload, FormBase, FormCheckbox, FormCombobox, FormCombobox2, FormDatePicker, FormField, FormFieldMapping, FormFileUpload, FormInput, FormOptionCards, FormPassword, FormRadioGroup, FormSelect, FormSwitch, FormTextarea, FormTreeCombobox, HistoryButtonIcon, HoverCard, HoverCardContent, HoverCardTrigger, I18nProvider, ICON_WHITELIST, ICON_WHITELIST_NAMES, IconPicker, IconTooltipButton, ImageCell, InfoCard, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, InputPassword, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, KTCard, Kbd, KbdGroup, Label, LabeledProgress, LandingShell, LanguageSwitcher, LanguageSwitcherI18next, LanguageSwitcherNextIntl, LanguageToggleI18next, LayoutHeaderBreadcrumb, LayoutProvider, LayoutToggle, Loading, LoginShell, MaskedField, Masonry, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, ModeToggle, ModeToggleDropdown, ModeToggleV2, MuiCards, MuiDataTable, MuiForm, NUMBER_RANGE_COLUMN_SIZE, NativeSelect, NativeSelectOptGroup, NativeSelectOption, NavGroup, NavUser, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NoticeBanner, OptionCardGroup, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PanPowerPoint, PermissionButton, Popconfirm, Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, PowerButtonIcon, PresentationScreen, Progress, QueryProvider, RadioGroup, RadioGroupItem, RecordCard, RecordCardGrid, RefreshButton, RenderCode, RenderDate, RenderDateTime, RenderTime, RenderUser, Required, ResetButton, ResetButtonIcon, ResizableHandle, ResizablePanel, ResizablePanelGroup, RichTextEditor, SaveButton, SaveDraftButton, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, SetDefaultButtonIcon, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, SlideNotFound, Slider, Spinner, Splitter, SplitterPanel, StatCard, StatusBadge, Steps, StopButtonIcon, Switch, TABLE_ALIGN, TABLE_SIZE, TENANT_THEME_STORAGE_KEY, THEMES, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Team, TenantThemeProvider, Textarea, ThemeProvider, Timeline, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipButton, TooltipContent, TooltipProvider, TooltipTrigger, TopNavigation, TourAlertDialog, TourProvider, Transfer, Tree, TreeCheckbox, TreeCombobox, TreeDragLine, TreeItem, TreeItemLabel, Typography, UpdateButton, ViewButtonIcon, ViewSourceButtonIcon, applyTenantThemeVars, badgeVariants, brandSlots, buildEditorExtensions, buttonGroupVariants, buttonVariants, cardsGridClass, cardsGridStyle, clearAllTableStateFromLocalStorage, clearTableStateFromLocalStorage, cn, createAntdToastAdapter, createI18nInstance, createMentionSuggestion, createMuiToastAdapter, createStaticI18nInstance, defaultGetRowId, defaultNS, deserializeTableState, fTheme, fallbackLng, filterSelectOptions, formatBytes, generateFilterParams, generateQueryParams, getLayout, getLayoutMode, getLocalStorageTourStatus, getTableStateKey, initI18n, isMenuItemActive, listLayouts, loadTableStateFromLocalStorage, lowerCaseFirstLetter, mockFetchTenantTheme, navigationMenuTriggerStyle, numberToVietnameseText, parsePlayerParams, removeLocalStorageTourStatus, renderColumnFilter, renderFilter, repairOptions, resolveTheme, saveTableStateToLocalStorage, selectColumn, serializeTableState, setLocalStorageTourCanceled, setLocalStorageTourCompleted, setToastAdapter, slugify, stringToFilterString, supportedLngs, tabsListVariants, toast, toastAddError, toastError, toastUpdateError, toggleVariants, useAdminNav, useAntdTable, useCarousel, useComboboxAnchor, useDataTableBulkDelete, useDataViewMode, useDebounce, useDirection, useEnhancedTable, useExportExcel, useFetch, useIsMobile, useLayout, useMuiTable, useResponsiveTab, useSidebar, useTenantTheme, useTour, useTranslations, vietnameseNameToCode };
4428
+ export type { AdminBrand, AdminIamRole, AdminMenuItem, AdminNavAdapter, AdminNavLinkProps, AdminOrgUnit, AdminShellCallbacks, AdminSubMenuItem, AdminUser, AntdDataColumn, AntdDataRowAction, AntdDataTableProps, AntdStackListProps, Any, AnyError, AnyKeyValue, AnyRecord, BaseButtonProps, BorderBeamProps, CarouselApi, ChartConfig, CollapseItem, CollapsePanelProps, CollapseProps, CollapseSize, CollapseTrigger, ColorPickerProps, Combobox2Props, ConfirmActionDialogProps, ConfirmActionVariant, CopyIconButtonProps, DataTableBulkDeleteConfig, DataTableCardContext, DataTableCardsCols, DataTableCardsConfig, DataViewMode, DatePickerInputProps$1 as DatePickerInputProps, Deck, DeckPlayerProps, DescriptionListProps, DescriptionsItemType, DescriptionsProps, EditorExtensionOptions, EditorMentionConfig, EditorMentionItem, EditorToolbarProps, EnhancedTableResult, FieldCardProps, FieldMapping, FieldMappingEditorProps, FileLinkItem, FileLinkProps, FileListProps, FileUploadProps, FormControlProps, FormFieldProps, FormFieldRenderArgs, FormLayoutProps, IconPickerProps, IconTooltipButtonProps, ImageCellProps, InfoCardProps, LabeledProgressProps, LandingFeature, LandingShellProps, LandingStat, LayoutMeta, LayoutModule, LayoutProps, LoginShellProps, LoginTrustItem, LogoShow, MaskedFieldProps, MasonryProps, Motion, MuiCardColumn, MuiCardsField, MuiCardsItem, MuiCardsProps, MuiCardsSection, MuiCardsSpec, MuiDataColumn, MuiDataRowAction, MuiDataTableProps, MuiFormBlock, MuiFormFieldSpec, MuiFormGroup, MuiFormProps, MuiFormSection, MuiFormSpec, MuiFormSubField, MuiTable, NavNode, NoticeBannerProps, NoticeTone, OptionCardGroupProps, OptionCardItem, PanPowerPointProps, PlayerParams, PlayerParamsInput, PopconfirmProps, PpBrand, PpSlots, PresentationScreenProps, Primitives, RecordCardDensity, RecordCardGridProps, RecordCardMediaRatio, RecordCardMetaItem, RecordCardProps, RecordCardSlots, RenderCodeProps, RenderCodeSize, ResponsiveTabRefs, RichTextEditorProps, Size, SlideContent, SlideI18n, SlideNotFoundProps, SplitterPanelProps, SplitterProps, StatCardProps, StatTone, StatusBadgeProps, StatusTone, Step, StepsProps, TableFilter, TableState, TenantThemeConfig, TenantThemeProviderProps, ThemeTokens, TimelineItem, TimelineProps, TimelineSort, TimelineStat, TitleLevel, ToastAdapter, TourStep, TransferDirection, TransferItem, TransferListBodyProps, TransferLocale, TransferProps, TreeCheckboxHandle, TreeCheckboxItem, TreeCheckboxProps, TreeOption$1 as TreeOption, TypographyProps, TypographyType, TypographyVariant, UiState, UseEnhancedTableOptions, UseMuiTableOptions, UseTableOptions, UseTableStateOptions };