@smworks-cz/ui-kit 1.3.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1184,6 +1184,107 @@ interface OTPInputProps {
1184
1184
  */
1185
1185
  declare const OTPInput: React.FC<OTPInputProps>;
1186
1186
 
1187
+ interface Country {
1188
+ /** ISO 3166-1 alpha-2 kód. */
1189
+ code: string;
1190
+ /** Název země. */
1191
+ name: string;
1192
+ /** Předvolba. */
1193
+ dialCode: string;
1194
+ /** Vlaječka emoji. */
1195
+ flag: string;
1196
+ }
1197
+ type PhoneInputSize = 'sm' | 'md' | 'lg';
1198
+ interface PhoneInputProps {
1199
+ /** Plná mezinárodní hodnota, např. "+420123456789". */
1200
+ value?: string;
1201
+ /** Callback s plnou mezinárodní hodnotou. */
1202
+ onChange?: (value: string) => void;
1203
+ /** Výchozí kód země. @default 'CZ' */
1204
+ defaultCountry?: string;
1205
+ /** Vlastní seznam zemí. */
1206
+ countries?: Country[];
1207
+ /** Popisek. */
1208
+ label?: string;
1209
+ /** Chybový stav nebo zpráva. */
1210
+ error?: boolean | string;
1211
+ /** Nápovědný text. */
1212
+ helperText?: string;
1213
+ /** Zakáže komponentu. @default false */
1214
+ disabled?: boolean;
1215
+ /** Velikost. @default 'md' */
1216
+ size?: PhoneInputSize;
1217
+ /** Placeholder pro číslo. */
1218
+ placeholder?: string;
1219
+ /** Další inline styly. */
1220
+ style?: React.CSSProperties;
1221
+ /** Dodatečná CSS třída. */
1222
+ className?: string;
1223
+ }
1224
+ /**
1225
+ * Telefonní vstup s výběrem předvolby země.
1226
+ *
1227
+ * Obsahuje rozbalovací seznam zemí s vlajkami a předvolbami.
1228
+ * Hodnota je plné mezinárodní číslo (např. "+420123456789").
1229
+ *
1230
+ * @example
1231
+ * ```tsx
1232
+ * <PhoneInput
1233
+ * value={phone}
1234
+ * onChange={setPhone}
1235
+ * defaultCountry="CZ"
1236
+ * label="Telefon"
1237
+ * />
1238
+ * ```
1239
+ */
1240
+ declare const PhoneInput: React.FC<PhoneInputProps>;
1241
+
1242
+ type CropShape = 'rect' | 'circle';
1243
+ interface CropArea {
1244
+ x: number;
1245
+ y: number;
1246
+ width: number;
1247
+ height: number;
1248
+ }
1249
+ interface ImageCropperProps {
1250
+ /** Zdroj obrázku — URL string nebo File objekt. */
1251
+ src: string | File;
1252
+ /** Callback s oříznutým výsledkem jako Blob. */
1253
+ onCrop: (result: Blob) => void;
1254
+ /** Callback při zrušení. */
1255
+ onCancel?: () => void;
1256
+ /** Poměr stran (šířka/výška). Undefined = volný. */
1257
+ aspectRatio?: number;
1258
+ /** Minimální šířka ořezu v px. @default 50 */
1259
+ minWidth?: number;
1260
+ /** Minimální výška ořezu v px. @default 50 */
1261
+ minHeight?: number;
1262
+ /** Tvar ořezu. @default 'rect' */
1263
+ shape?: CropShape;
1264
+ /** Další inline styly. */
1265
+ style?: React.CSSProperties;
1266
+ /** Dodatečná CSS třída. */
1267
+ className?: string;
1268
+ }
1269
+ /**
1270
+ * Ořezávání obrázku na canvasu.
1271
+ *
1272
+ * Umožňuje přetahování a změnu velikosti ořezové oblasti.
1273
+ * Podporuje obdélníkový a kruhový tvar, poměr stran a minimální rozměry.
1274
+ *
1275
+ * @example
1276
+ * ```tsx
1277
+ * <ImageCropper
1278
+ * src={file}
1279
+ * aspectRatio={1}
1280
+ * shape="circle"
1281
+ * onCrop={(blob) => uploadAvatar(blob)}
1282
+ * onCancel={() => setShowCropper(false)}
1283
+ * />
1284
+ * ```
1285
+ */
1286
+ declare const ImageCropper: React.FC<ImageCropperProps>;
1287
+
1187
1288
  interface TableColumn {
1188
1289
  /** Klíč odpovídající hodnotě v datovém objektu. */
1189
1290
  key: string;
@@ -1310,6 +1411,89 @@ interface DataGridProps {
1310
1411
  */
1311
1412
  declare const DataGrid: React.FC<DataGridProps>;
1312
1413
 
1414
+ interface MobileDataCardColumn {
1415
+ /** Klíč dat v řádkovém objektu. */
1416
+ key: string;
1417
+ /** Zobrazovaný popisek. */
1418
+ header: string;
1419
+ /** Vlastní renderování hodnoty — stejný podpis jako Table/DataGrid. */
1420
+ render?: (value: any, row: any, index: number) => React.ReactNode;
1421
+ /** Skrýt tento sloupec z karty. */
1422
+ hidden?: boolean;
1423
+ /** Zobrazit toto pole jako titulek karty. */
1424
+ primary?: boolean;
1425
+ /** Povolit řazení podle tohoto sloupce. */
1426
+ sortable?: boolean;
1427
+ }
1428
+ interface MobileDataCardProps {
1429
+ /** Definice sloupců — stejný tvar jako Table/DataGrid. */
1430
+ columns: MobileDataCardColumn[];
1431
+ /** Pole dat. */
1432
+ data: any[];
1433
+ /** Klíč v řádkovém objektu pro titulek karty. Alternativa k `primary` na sloupci. */
1434
+ primaryKey?: string;
1435
+ /** Klíč identifikátoru řádku. @default 'id' */
1436
+ rowKey?: string;
1437
+ /** Povolit výběr karet. @default false */
1438
+ selectable?: boolean;
1439
+ /** Řízené vybrané ID. */
1440
+ selectedIds?: string[];
1441
+ /** Callback při změně výběru. */
1442
+ onSelectionChange?: (ids: string[]) => void;
1443
+ /** Callback při kliknutí na kartu. */
1444
+ onCardClick?: (row: any) => void;
1445
+ /** Callback při řazení. */
1446
+ onSort?: (key: string, direction: 'asc' | 'desc') => void;
1447
+ /** Aktuální klíč řazení. */
1448
+ sortKey?: string;
1449
+ /** Aktuální směr řazení. */
1450
+ sortDirection?: 'asc' | 'desc';
1451
+ /** Zobrazit skeleton karty. @default false */
1452
+ loading?: boolean;
1453
+ /** Počet skeleton karet. @default 3 */
1454
+ skeletonCount?: number;
1455
+ /** Text prázdného stavu. @default 'Žádná data' */
1456
+ emptyText?: string;
1457
+ /** Vlastní obsah prázdného stavu. */
1458
+ emptyContent?: React.ReactNode;
1459
+ /** Mezera mezi kartami v px. @default 12 */
1460
+ gap?: number;
1461
+ /** Vykreslení akčních tlačítek v patičce karty. */
1462
+ cardActions?: (row: any, index: number) => React.ReactNode;
1463
+ /** Další inline styly. */
1464
+ style?: React.CSSProperties;
1465
+ /** Dodatečná CSS třída. */
1466
+ className?: string;
1467
+ }
1468
+ /**
1469
+ * Mobilní zobrazení dat ve formě karet.
1470
+ *
1471
+ * Každý datový řádek se zobrazí jako karta s páry popisek-hodnota.
1472
+ * Kombinuje funkce Table (řazení, custom render) a DataGrid
1473
+ * (výběr, kliknutí na řádek, skeleton).
1474
+ *
1475
+ * @example
1476
+ * ```tsx
1477
+ * <MobileDataCard
1478
+ * columns={[
1479
+ * { key: 'name', header: 'Jméno', primary: true },
1480
+ * { key: 'email', header: 'Email' },
1481
+ * { key: 'role', header: 'Role' },
1482
+ * ]}
1483
+ * data={users}
1484
+ * selectable
1485
+ * onCardClick={(row) => openDetail(row)}
1486
+ * cardActions={(row) => (
1487
+ * <>
1488
+ * <Button size="sm" variant="outline" onClick={() => edit(row)}>Upravit</Button>
1489
+ * <Button size="sm" variant="destructive" onClick={() => del(row)}>Smazat</Button>
1490
+ * </>
1491
+ * )}
1492
+ * />
1493
+ * ```
1494
+ */
1495
+ declare const MobileDataCard: React.FC<MobileDataCardProps>;
1496
+
1313
1497
  interface CardProps {
1314
1498
  /** Titulek karty. */
1315
1499
  title?: string;
@@ -2278,9 +2462,62 @@ interface StepperProps {
2278
2462
  */
2279
2463
  declare const Stepper: React.FC<StepperProps>;
2280
2464
 
2281
- interface DropdownMenuItem {
2282
- /** Zobrazovaný popisek položky. */
2465
+ interface FormWizardStep {
2466
+ /** Popisek kroku zobrazený ve Stepperu. */
2283
2467
  label: string;
2468
+ /** Volitelný popis kroku. */
2469
+ description?: string;
2470
+ /** Obsah kroku (formulář, komponenta). */
2471
+ content: React.ReactNode;
2472
+ /** Validace před pokračováním. Vrací boolean nebo Promise<boolean>. */
2473
+ validate?: () => boolean | Promise<boolean>;
2474
+ }
2475
+ interface FormWizardProps {
2476
+ /** Definice kroků. */
2477
+ steps: FormWizardStep[];
2478
+ /** Index aktivního kroku (0-indexed). */
2479
+ activeStep: number;
2480
+ /** Callback při změně kroku. Při posledním kroku volá s `steps.length`. */
2481
+ onStepChange: (step: number) => void;
2482
+ /** Orientace stepperu. @default 'horizontal' */
2483
+ orientation?: 'horizontal' | 'vertical';
2484
+ /** Zobrazit navigační tlačítka (Předchozí/Další). @default true */
2485
+ showNavigation?: boolean;
2486
+ /** Text tlačítka na posledním kroku. @default 'Dokončit' */
2487
+ finishLabel?: string;
2488
+ /** Text tlačítka Další. @default 'Další' */
2489
+ nextLabel?: string;
2490
+ /** Text tlačítka Předchozí. @default 'Předchozí' */
2491
+ prevLabel?: string;
2492
+ /** Další inline styly. */
2493
+ style?: React.CSSProperties;
2494
+ /** Dodatečná CSS třída. */
2495
+ className?: string;
2496
+ }
2497
+ /**
2498
+ * Vícekrokový formulářový průvodce.
2499
+ *
2500
+ * Kombinuje Stepper s obsahem kroků a navigačními tlačítky.
2501
+ * Podporuje synchronní i asynchronní validaci před pokračováním.
2502
+ *
2503
+ * @example
2504
+ * ```tsx
2505
+ * <FormWizard
2506
+ * steps={[
2507
+ * { label: 'Kontakt', content: <ContactForm />, validate: () => isValid },
2508
+ * { label: 'Adresa', content: <AddressForm /> },
2509
+ * { label: 'Souhrn', content: <Summary /> },
2510
+ * ]}
2511
+ * activeStep={step}
2512
+ * onStepChange={setStep}
2513
+ * />
2514
+ * ```
2515
+ */
2516
+ declare const FormWizard: React.FC<FormWizardProps>;
2517
+
2518
+ interface DropdownMenuItem {
2519
+ /** Zobrazovaný popisek položky. Může být text nebo ReactNode pro vlastní obsah. */
2520
+ label: React.ReactNode;
2284
2521
  /** Volitelná ikona vykreslená před textem. */
2285
2522
  icon?: React.ReactNode;
2286
2523
  /** Voláno při kliknutí na položku. */
@@ -2291,6 +2528,8 @@ interface DropdownMenuItem {
2291
2528
  danger?: boolean;
2292
2529
  /** Při `true` se místo položky vykreslí oddělovací čára. @default false */
2293
2530
  divider?: boolean;
2531
+ /** Text kategorie — zobrazí se jako malý nadpis sekce (uppercase label). */
2532
+ category?: string;
2294
2533
  }
2295
2534
  interface DropdownMenuProps {
2296
2535
  /** Spouštěcí element (tlačítko apod.). */
@@ -2398,6 +2637,8 @@ interface SpotlightProps {
2398
2637
  onChange: (value: string) => void;
2399
2638
  /** Již filtrované výsledky k zobrazení, seskupené dle `category`. */
2400
2639
  results: SpotlightItem[];
2640
+ /** Zobrazí stav načítání místo výsledků. @default false */
2641
+ loading?: boolean;
2401
2642
  /** Placeholder text pro vyhledávací vstup. @default 'Hledat...' */
2402
2643
  placeholder?: string;
2403
2644
  /** Dodatečná CSS třída pro kartu spotlightu. */
@@ -2823,6 +3064,45 @@ interface AlertProps {
2823
3064
  */
2824
3065
  declare const Alert: React.FC<AlertProps>;
2825
3066
 
3067
+ type BannerVariant = 'info' | 'success' | 'warning' | 'error';
3068
+ type BannerPosition = 'top' | 'bottom';
3069
+ interface BannerProps {
3070
+ /** Vizuální varianta. @default 'info' */
3071
+ variant?: BannerVariant;
3072
+ /** Tučný titulek. */
3073
+ title?: string;
3074
+ /** Obsah banneru. */
3075
+ children?: React.ReactNode;
3076
+ /** Zobrazí zavírací tlačítko. @default false */
3077
+ closable?: boolean;
3078
+ /** Callback při zavření. */
3079
+ onClose?: () => void;
3080
+ /** Vlastní ikona. Pokud není zadána, použije se výchozí dle varianty. */
3081
+ icon?: React.ReactNode;
3082
+ /** Pozice akcentního proužku. @default 'top' */
3083
+ position?: BannerPosition;
3084
+ /** Přilepí banner na pozici. @default false */
3085
+ sticky?: boolean;
3086
+ /** Další inline styly. */
3087
+ style?: React.CSSProperties;
3088
+ /** Dodatečná CSS třída. */
3089
+ className?: string;
3090
+ }
3091
+ /**
3092
+ * Oznámovací banner na celou šířku.
3093
+ *
3094
+ * Plnohodnotný banner pro oznámení, varování nebo chybové hlášky.
3095
+ * Lze přilepit na horní nebo dolní okraj pomocí `sticky`.
3096
+ *
3097
+ * @example
3098
+ * ```tsx
3099
+ * <Banner variant="warning" title="Údržba" sticky>
3100
+ * Systém bude nedostupný 12. dubna od 22:00.
3101
+ * </Banner>
3102
+ * ```
3103
+ */
3104
+ declare const Banner: React.FC<BannerProps>;
3105
+
2826
3106
  type NotificationVariant = 'info' | 'success' | 'warning' | 'error';
2827
3107
  interface NotificationProps {
2828
3108
  /** Vizuální varianta notifikace. @default 'info' */
@@ -3343,4 +3623,4 @@ type Theme = 'light' | 'dark';
3343
3623
  */
3344
3624
  declare const useTheme: () => Theme;
3345
3625
 
3346
- export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, Alert, type AlertProps, type AlertVariant, AppSidebar, type AppSidebarProps, Avatar, type AvatarProps, type AvatarSize, Badge, type BadgeProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, type ButtonAsAnchorProps, type ButtonAsButtonProps, type ButtonIconPosition, type ButtonProps, type ButtonSize, type ButtonVariant, Calendar, type CalendarEvent, type CalendarProps, Card, type CardProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, type CheckboxSize, ColorPicker, type ColorPickerProps, Combobox, type ComboboxOption, type ComboboxProps, type ComboboxSize, type CommandGroup, type CommandItem, CommandMenu, type CommandMenuProps, ConfirmDialog, type ConfirmDialogProps, Container, type ContainerMaxWidth, type ContainerProps, CopyButton, type CopyButtonProps, DataGrid, type DataGridColumn, type DataGridProps, DataList, type DataListItem, type DataListProps, DatePicker, DatePickerGroup, type DatePickerGroupProps, type DatePickerProps, type DatePickerSize, Divider, type DividerOrientation, type DividerProps, type DragHandleProps, DragList, type DragListItem, type DragListProps, Drawer, type DrawerProps, DropdownMenu, type DropdownMenuItem, type DropdownMenuProps, EmptyState, type EmptyStateProps, FileUpload, type FileUploadProps, Input, InputGroup, type InputGroupProps, type InputProps, type InputSize, Link, type LinkProps, type LinkVariant, Modal, type ModalProps, Navbar, type NavbarProps, Notification, type NotificationProps, type NotificationVariant, NumberInput, type NumberInputProps, type NumberInputSize, type NumberInputVariant, OTPInput, type OTPInputProps, Pagination, type PaginationProps, Popover, type PopoverProps, ProgressBar, type ProgressBarProps, type ProgressBarSize, ProgressCircle, type ProgressCircleProps, Radio, RadioGroup, type RadioGroupOption, type RadioGroupProps, type RadioProps, type RadioSize, Rating, type RatingProps, type RatingSize, SegmentedControl, type SegmentedControlItem, type SegmentedControlProps, type SegmentedControlSize, Select, SelectGroup, type SelectGroupProps, type SelectOption, type SelectProps, Sheet, type SheetProps, SidebarItem, type SidebarItemProps, Skeleton, type SkeletonProps, Slider, type SliderProps, type SliderSize, Spinner, type SpinnerProps, type SpinnerSize, Spotlight, type SpotlightItem, type SpotlightProps, Stack, type StackAlign, type StackDirection, type StackJustify, type StackProps, Stat, type StatProps, StatusBadge, type StatusBadgeProps, type StatusBadgeStatus, type StepItem, Stepper, type StepperProps, Switch, type SwitchProps, type SwitchSize, Tab, TabPanel, type TabPanelProps, type TabProps, Table, type TableColumn, type TableProps, Tabs, type TabsProps, Tag, TagItem, type TagItemProps, type TagProps, Textarea, type TextareaProps, type TextareaResize, type TextareaSize, type Theme, Timeline, type TimelineItem, type TimelineProps, Toast, type ToastContextValue, type ToastOptions, type ToastPosition, type ToastProps, type ToastVariant, ToasterProvider, type ToasterProviderProps, Tooltip, type TooltipProps, Tree, type TreeNode, type TreeProps, type UploadedFile, useTheme, useToast };
3626
+ export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, Alert, type AlertProps, type AlertVariant, AppSidebar, type AppSidebarProps, Avatar, type AvatarProps, type AvatarSize, Badge, type BadgeProps, Banner, type BannerPosition, type BannerProps, type BannerVariant, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, type ButtonAsAnchorProps, type ButtonAsButtonProps, type ButtonIconPosition, type ButtonProps, type ButtonSize, type ButtonVariant, Calendar, type CalendarEvent, type CalendarProps, Card, type CardProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, type CheckboxSize, ColorPicker, type ColorPickerProps, Combobox, type ComboboxOption, type ComboboxProps, type ComboboxSize, type CommandGroup, type CommandItem, CommandMenu, type CommandMenuProps, ConfirmDialog, type ConfirmDialogProps, Container, type ContainerMaxWidth, type ContainerProps, CopyButton, type CopyButtonProps, type Country, type CropArea, type CropShape, DataGrid, type DataGridColumn, type DataGridProps, DataList, type DataListItem, type DataListProps, DatePicker, DatePickerGroup, type DatePickerGroupProps, type DatePickerProps, type DatePickerSize, Divider, type DividerOrientation, type DividerProps, type DragHandleProps, DragList, type DragListItem, type DragListProps, Drawer, type DrawerProps, DropdownMenu, type DropdownMenuItem, type DropdownMenuProps, EmptyState, type EmptyStateProps, FileUpload, type FileUploadProps, FormWizard, type FormWizardProps, type FormWizardStep, ImageCropper, type ImageCropperProps, Input, InputGroup, type InputGroupProps, type InputProps, type InputSize, Link, type LinkProps, type LinkVariant, MobileDataCard, type MobileDataCardColumn, type MobileDataCardProps, Modal, type ModalProps, Navbar, type NavbarProps, Notification, type NotificationProps, type NotificationVariant, NumberInput, type NumberInputProps, type NumberInputSize, type NumberInputVariant, OTPInput, type OTPInputProps, Pagination, type PaginationProps, PhoneInput, type PhoneInputProps, type PhoneInputSize, Popover, type PopoverProps, ProgressBar, type ProgressBarProps, type ProgressBarSize, ProgressCircle, type ProgressCircleProps, Radio, RadioGroup, type RadioGroupOption, type RadioGroupProps, type RadioProps, type RadioSize, Rating, type RatingProps, type RatingSize, SegmentedControl, type SegmentedControlItem, type SegmentedControlProps, type SegmentedControlSize, Select, SelectGroup, type SelectGroupProps, type SelectOption, type SelectProps, Sheet, type SheetProps, SidebarItem, type SidebarItemProps, Skeleton, type SkeletonProps, Slider, type SliderProps, type SliderSize, Spinner, type SpinnerProps, type SpinnerSize, Spotlight, type SpotlightItem, type SpotlightProps, Stack, type StackAlign, type StackDirection, type StackJustify, type StackProps, Stat, type StatProps, StatusBadge, type StatusBadgeProps, type StatusBadgeStatus, type StepItem, Stepper, type StepperProps, Switch, type SwitchProps, type SwitchSize, Tab, TabPanel, type TabPanelProps, type TabProps, Table, type TableColumn, type TableProps, Tabs, type TabsProps, Tag, TagItem, type TagItemProps, type TagProps, Textarea, type TextareaProps, type TextareaResize, type TextareaSize, type Theme, Timeline, type TimelineItem, type TimelineProps, Toast, type ToastContextValue, type ToastOptions, type ToastPosition, type ToastProps, type ToastVariant, ToasterProvider, type ToasterProviderProps, Tooltip, type TooltipProps, Tree, type TreeNode, type TreeProps, type UploadedFile, useTheme, useToast };
package/dist/index.d.ts CHANGED
@@ -1184,6 +1184,107 @@ interface OTPInputProps {
1184
1184
  */
1185
1185
  declare const OTPInput: React.FC<OTPInputProps>;
1186
1186
 
1187
+ interface Country {
1188
+ /** ISO 3166-1 alpha-2 kód. */
1189
+ code: string;
1190
+ /** Název země. */
1191
+ name: string;
1192
+ /** Předvolba. */
1193
+ dialCode: string;
1194
+ /** Vlaječka emoji. */
1195
+ flag: string;
1196
+ }
1197
+ type PhoneInputSize = 'sm' | 'md' | 'lg';
1198
+ interface PhoneInputProps {
1199
+ /** Plná mezinárodní hodnota, např. "+420123456789". */
1200
+ value?: string;
1201
+ /** Callback s plnou mezinárodní hodnotou. */
1202
+ onChange?: (value: string) => void;
1203
+ /** Výchozí kód země. @default 'CZ' */
1204
+ defaultCountry?: string;
1205
+ /** Vlastní seznam zemí. */
1206
+ countries?: Country[];
1207
+ /** Popisek. */
1208
+ label?: string;
1209
+ /** Chybový stav nebo zpráva. */
1210
+ error?: boolean | string;
1211
+ /** Nápovědný text. */
1212
+ helperText?: string;
1213
+ /** Zakáže komponentu. @default false */
1214
+ disabled?: boolean;
1215
+ /** Velikost. @default 'md' */
1216
+ size?: PhoneInputSize;
1217
+ /** Placeholder pro číslo. */
1218
+ placeholder?: string;
1219
+ /** Další inline styly. */
1220
+ style?: React.CSSProperties;
1221
+ /** Dodatečná CSS třída. */
1222
+ className?: string;
1223
+ }
1224
+ /**
1225
+ * Telefonní vstup s výběrem předvolby země.
1226
+ *
1227
+ * Obsahuje rozbalovací seznam zemí s vlajkami a předvolbami.
1228
+ * Hodnota je plné mezinárodní číslo (např. "+420123456789").
1229
+ *
1230
+ * @example
1231
+ * ```tsx
1232
+ * <PhoneInput
1233
+ * value={phone}
1234
+ * onChange={setPhone}
1235
+ * defaultCountry="CZ"
1236
+ * label="Telefon"
1237
+ * />
1238
+ * ```
1239
+ */
1240
+ declare const PhoneInput: React.FC<PhoneInputProps>;
1241
+
1242
+ type CropShape = 'rect' | 'circle';
1243
+ interface CropArea {
1244
+ x: number;
1245
+ y: number;
1246
+ width: number;
1247
+ height: number;
1248
+ }
1249
+ interface ImageCropperProps {
1250
+ /** Zdroj obrázku — URL string nebo File objekt. */
1251
+ src: string | File;
1252
+ /** Callback s oříznutým výsledkem jako Blob. */
1253
+ onCrop: (result: Blob) => void;
1254
+ /** Callback při zrušení. */
1255
+ onCancel?: () => void;
1256
+ /** Poměr stran (šířka/výška). Undefined = volný. */
1257
+ aspectRatio?: number;
1258
+ /** Minimální šířka ořezu v px. @default 50 */
1259
+ minWidth?: number;
1260
+ /** Minimální výška ořezu v px. @default 50 */
1261
+ minHeight?: number;
1262
+ /** Tvar ořezu. @default 'rect' */
1263
+ shape?: CropShape;
1264
+ /** Další inline styly. */
1265
+ style?: React.CSSProperties;
1266
+ /** Dodatečná CSS třída. */
1267
+ className?: string;
1268
+ }
1269
+ /**
1270
+ * Ořezávání obrázku na canvasu.
1271
+ *
1272
+ * Umožňuje přetahování a změnu velikosti ořezové oblasti.
1273
+ * Podporuje obdélníkový a kruhový tvar, poměr stran a minimální rozměry.
1274
+ *
1275
+ * @example
1276
+ * ```tsx
1277
+ * <ImageCropper
1278
+ * src={file}
1279
+ * aspectRatio={1}
1280
+ * shape="circle"
1281
+ * onCrop={(blob) => uploadAvatar(blob)}
1282
+ * onCancel={() => setShowCropper(false)}
1283
+ * />
1284
+ * ```
1285
+ */
1286
+ declare const ImageCropper: React.FC<ImageCropperProps>;
1287
+
1187
1288
  interface TableColumn {
1188
1289
  /** Klíč odpovídající hodnotě v datovém objektu. */
1189
1290
  key: string;
@@ -1310,6 +1411,89 @@ interface DataGridProps {
1310
1411
  */
1311
1412
  declare const DataGrid: React.FC<DataGridProps>;
1312
1413
 
1414
+ interface MobileDataCardColumn {
1415
+ /** Klíč dat v řádkovém objektu. */
1416
+ key: string;
1417
+ /** Zobrazovaný popisek. */
1418
+ header: string;
1419
+ /** Vlastní renderování hodnoty — stejný podpis jako Table/DataGrid. */
1420
+ render?: (value: any, row: any, index: number) => React.ReactNode;
1421
+ /** Skrýt tento sloupec z karty. */
1422
+ hidden?: boolean;
1423
+ /** Zobrazit toto pole jako titulek karty. */
1424
+ primary?: boolean;
1425
+ /** Povolit řazení podle tohoto sloupce. */
1426
+ sortable?: boolean;
1427
+ }
1428
+ interface MobileDataCardProps {
1429
+ /** Definice sloupců — stejný tvar jako Table/DataGrid. */
1430
+ columns: MobileDataCardColumn[];
1431
+ /** Pole dat. */
1432
+ data: any[];
1433
+ /** Klíč v řádkovém objektu pro titulek karty. Alternativa k `primary` na sloupci. */
1434
+ primaryKey?: string;
1435
+ /** Klíč identifikátoru řádku. @default 'id' */
1436
+ rowKey?: string;
1437
+ /** Povolit výběr karet. @default false */
1438
+ selectable?: boolean;
1439
+ /** Řízené vybrané ID. */
1440
+ selectedIds?: string[];
1441
+ /** Callback při změně výběru. */
1442
+ onSelectionChange?: (ids: string[]) => void;
1443
+ /** Callback při kliknutí na kartu. */
1444
+ onCardClick?: (row: any) => void;
1445
+ /** Callback při řazení. */
1446
+ onSort?: (key: string, direction: 'asc' | 'desc') => void;
1447
+ /** Aktuální klíč řazení. */
1448
+ sortKey?: string;
1449
+ /** Aktuální směr řazení. */
1450
+ sortDirection?: 'asc' | 'desc';
1451
+ /** Zobrazit skeleton karty. @default false */
1452
+ loading?: boolean;
1453
+ /** Počet skeleton karet. @default 3 */
1454
+ skeletonCount?: number;
1455
+ /** Text prázdného stavu. @default 'Žádná data' */
1456
+ emptyText?: string;
1457
+ /** Vlastní obsah prázdného stavu. */
1458
+ emptyContent?: React.ReactNode;
1459
+ /** Mezera mezi kartami v px. @default 12 */
1460
+ gap?: number;
1461
+ /** Vykreslení akčních tlačítek v patičce karty. */
1462
+ cardActions?: (row: any, index: number) => React.ReactNode;
1463
+ /** Další inline styly. */
1464
+ style?: React.CSSProperties;
1465
+ /** Dodatečná CSS třída. */
1466
+ className?: string;
1467
+ }
1468
+ /**
1469
+ * Mobilní zobrazení dat ve formě karet.
1470
+ *
1471
+ * Každý datový řádek se zobrazí jako karta s páry popisek-hodnota.
1472
+ * Kombinuje funkce Table (řazení, custom render) a DataGrid
1473
+ * (výběr, kliknutí na řádek, skeleton).
1474
+ *
1475
+ * @example
1476
+ * ```tsx
1477
+ * <MobileDataCard
1478
+ * columns={[
1479
+ * { key: 'name', header: 'Jméno', primary: true },
1480
+ * { key: 'email', header: 'Email' },
1481
+ * { key: 'role', header: 'Role' },
1482
+ * ]}
1483
+ * data={users}
1484
+ * selectable
1485
+ * onCardClick={(row) => openDetail(row)}
1486
+ * cardActions={(row) => (
1487
+ * <>
1488
+ * <Button size="sm" variant="outline" onClick={() => edit(row)}>Upravit</Button>
1489
+ * <Button size="sm" variant="destructive" onClick={() => del(row)}>Smazat</Button>
1490
+ * </>
1491
+ * )}
1492
+ * />
1493
+ * ```
1494
+ */
1495
+ declare const MobileDataCard: React.FC<MobileDataCardProps>;
1496
+
1313
1497
  interface CardProps {
1314
1498
  /** Titulek karty. */
1315
1499
  title?: string;
@@ -2278,9 +2462,62 @@ interface StepperProps {
2278
2462
  */
2279
2463
  declare const Stepper: React.FC<StepperProps>;
2280
2464
 
2281
- interface DropdownMenuItem {
2282
- /** Zobrazovaný popisek položky. */
2465
+ interface FormWizardStep {
2466
+ /** Popisek kroku zobrazený ve Stepperu. */
2283
2467
  label: string;
2468
+ /** Volitelný popis kroku. */
2469
+ description?: string;
2470
+ /** Obsah kroku (formulář, komponenta). */
2471
+ content: React.ReactNode;
2472
+ /** Validace před pokračováním. Vrací boolean nebo Promise<boolean>. */
2473
+ validate?: () => boolean | Promise<boolean>;
2474
+ }
2475
+ interface FormWizardProps {
2476
+ /** Definice kroků. */
2477
+ steps: FormWizardStep[];
2478
+ /** Index aktivního kroku (0-indexed). */
2479
+ activeStep: number;
2480
+ /** Callback při změně kroku. Při posledním kroku volá s `steps.length`. */
2481
+ onStepChange: (step: number) => void;
2482
+ /** Orientace stepperu. @default 'horizontal' */
2483
+ orientation?: 'horizontal' | 'vertical';
2484
+ /** Zobrazit navigační tlačítka (Předchozí/Další). @default true */
2485
+ showNavigation?: boolean;
2486
+ /** Text tlačítka na posledním kroku. @default 'Dokončit' */
2487
+ finishLabel?: string;
2488
+ /** Text tlačítka Další. @default 'Další' */
2489
+ nextLabel?: string;
2490
+ /** Text tlačítka Předchozí. @default 'Předchozí' */
2491
+ prevLabel?: string;
2492
+ /** Další inline styly. */
2493
+ style?: React.CSSProperties;
2494
+ /** Dodatečná CSS třída. */
2495
+ className?: string;
2496
+ }
2497
+ /**
2498
+ * Vícekrokový formulářový průvodce.
2499
+ *
2500
+ * Kombinuje Stepper s obsahem kroků a navigačními tlačítky.
2501
+ * Podporuje synchronní i asynchronní validaci před pokračováním.
2502
+ *
2503
+ * @example
2504
+ * ```tsx
2505
+ * <FormWizard
2506
+ * steps={[
2507
+ * { label: 'Kontakt', content: <ContactForm />, validate: () => isValid },
2508
+ * { label: 'Adresa', content: <AddressForm /> },
2509
+ * { label: 'Souhrn', content: <Summary /> },
2510
+ * ]}
2511
+ * activeStep={step}
2512
+ * onStepChange={setStep}
2513
+ * />
2514
+ * ```
2515
+ */
2516
+ declare const FormWizard: React.FC<FormWizardProps>;
2517
+
2518
+ interface DropdownMenuItem {
2519
+ /** Zobrazovaný popisek položky. Může být text nebo ReactNode pro vlastní obsah. */
2520
+ label: React.ReactNode;
2284
2521
  /** Volitelná ikona vykreslená před textem. */
2285
2522
  icon?: React.ReactNode;
2286
2523
  /** Voláno při kliknutí na položku. */
@@ -2291,6 +2528,8 @@ interface DropdownMenuItem {
2291
2528
  danger?: boolean;
2292
2529
  /** Při `true` se místo položky vykreslí oddělovací čára. @default false */
2293
2530
  divider?: boolean;
2531
+ /** Text kategorie — zobrazí se jako malý nadpis sekce (uppercase label). */
2532
+ category?: string;
2294
2533
  }
2295
2534
  interface DropdownMenuProps {
2296
2535
  /** Spouštěcí element (tlačítko apod.). */
@@ -2398,6 +2637,8 @@ interface SpotlightProps {
2398
2637
  onChange: (value: string) => void;
2399
2638
  /** Již filtrované výsledky k zobrazení, seskupené dle `category`. */
2400
2639
  results: SpotlightItem[];
2640
+ /** Zobrazí stav načítání místo výsledků. @default false */
2641
+ loading?: boolean;
2401
2642
  /** Placeholder text pro vyhledávací vstup. @default 'Hledat...' */
2402
2643
  placeholder?: string;
2403
2644
  /** Dodatečná CSS třída pro kartu spotlightu. */
@@ -2823,6 +3064,45 @@ interface AlertProps {
2823
3064
  */
2824
3065
  declare const Alert: React.FC<AlertProps>;
2825
3066
 
3067
+ type BannerVariant = 'info' | 'success' | 'warning' | 'error';
3068
+ type BannerPosition = 'top' | 'bottom';
3069
+ interface BannerProps {
3070
+ /** Vizuální varianta. @default 'info' */
3071
+ variant?: BannerVariant;
3072
+ /** Tučný titulek. */
3073
+ title?: string;
3074
+ /** Obsah banneru. */
3075
+ children?: React.ReactNode;
3076
+ /** Zobrazí zavírací tlačítko. @default false */
3077
+ closable?: boolean;
3078
+ /** Callback při zavření. */
3079
+ onClose?: () => void;
3080
+ /** Vlastní ikona. Pokud není zadána, použije se výchozí dle varianty. */
3081
+ icon?: React.ReactNode;
3082
+ /** Pozice akcentního proužku. @default 'top' */
3083
+ position?: BannerPosition;
3084
+ /** Přilepí banner na pozici. @default false */
3085
+ sticky?: boolean;
3086
+ /** Další inline styly. */
3087
+ style?: React.CSSProperties;
3088
+ /** Dodatečná CSS třída. */
3089
+ className?: string;
3090
+ }
3091
+ /**
3092
+ * Oznámovací banner na celou šířku.
3093
+ *
3094
+ * Plnohodnotný banner pro oznámení, varování nebo chybové hlášky.
3095
+ * Lze přilepit na horní nebo dolní okraj pomocí `sticky`.
3096
+ *
3097
+ * @example
3098
+ * ```tsx
3099
+ * <Banner variant="warning" title="Údržba" sticky>
3100
+ * Systém bude nedostupný 12. dubna od 22:00.
3101
+ * </Banner>
3102
+ * ```
3103
+ */
3104
+ declare const Banner: React.FC<BannerProps>;
3105
+
2826
3106
  type NotificationVariant = 'info' | 'success' | 'warning' | 'error';
2827
3107
  interface NotificationProps {
2828
3108
  /** Vizuální varianta notifikace. @default 'info' */
@@ -3343,4 +3623,4 @@ type Theme = 'light' | 'dark';
3343
3623
  */
3344
3624
  declare const useTheme: () => Theme;
3345
3625
 
3346
- export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, Alert, type AlertProps, type AlertVariant, AppSidebar, type AppSidebarProps, Avatar, type AvatarProps, type AvatarSize, Badge, type BadgeProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, type ButtonAsAnchorProps, type ButtonAsButtonProps, type ButtonIconPosition, type ButtonProps, type ButtonSize, type ButtonVariant, Calendar, type CalendarEvent, type CalendarProps, Card, type CardProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, type CheckboxSize, ColorPicker, type ColorPickerProps, Combobox, type ComboboxOption, type ComboboxProps, type ComboboxSize, type CommandGroup, type CommandItem, CommandMenu, type CommandMenuProps, ConfirmDialog, type ConfirmDialogProps, Container, type ContainerMaxWidth, type ContainerProps, CopyButton, type CopyButtonProps, DataGrid, type DataGridColumn, type DataGridProps, DataList, type DataListItem, type DataListProps, DatePicker, DatePickerGroup, type DatePickerGroupProps, type DatePickerProps, type DatePickerSize, Divider, type DividerOrientation, type DividerProps, type DragHandleProps, DragList, type DragListItem, type DragListProps, Drawer, type DrawerProps, DropdownMenu, type DropdownMenuItem, type DropdownMenuProps, EmptyState, type EmptyStateProps, FileUpload, type FileUploadProps, Input, InputGroup, type InputGroupProps, type InputProps, type InputSize, Link, type LinkProps, type LinkVariant, Modal, type ModalProps, Navbar, type NavbarProps, Notification, type NotificationProps, type NotificationVariant, NumberInput, type NumberInputProps, type NumberInputSize, type NumberInputVariant, OTPInput, type OTPInputProps, Pagination, type PaginationProps, Popover, type PopoverProps, ProgressBar, type ProgressBarProps, type ProgressBarSize, ProgressCircle, type ProgressCircleProps, Radio, RadioGroup, type RadioGroupOption, type RadioGroupProps, type RadioProps, type RadioSize, Rating, type RatingProps, type RatingSize, SegmentedControl, type SegmentedControlItem, type SegmentedControlProps, type SegmentedControlSize, Select, SelectGroup, type SelectGroupProps, type SelectOption, type SelectProps, Sheet, type SheetProps, SidebarItem, type SidebarItemProps, Skeleton, type SkeletonProps, Slider, type SliderProps, type SliderSize, Spinner, type SpinnerProps, type SpinnerSize, Spotlight, type SpotlightItem, type SpotlightProps, Stack, type StackAlign, type StackDirection, type StackJustify, type StackProps, Stat, type StatProps, StatusBadge, type StatusBadgeProps, type StatusBadgeStatus, type StepItem, Stepper, type StepperProps, Switch, type SwitchProps, type SwitchSize, Tab, TabPanel, type TabPanelProps, type TabProps, Table, type TableColumn, type TableProps, Tabs, type TabsProps, Tag, TagItem, type TagItemProps, type TagProps, Textarea, type TextareaProps, type TextareaResize, type TextareaSize, type Theme, Timeline, type TimelineItem, type TimelineProps, Toast, type ToastContextValue, type ToastOptions, type ToastPosition, type ToastProps, type ToastVariant, ToasterProvider, type ToasterProviderProps, Tooltip, type TooltipProps, Tree, type TreeNode, type TreeProps, type UploadedFile, useTheme, useToast };
3626
+ export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, Alert, type AlertProps, type AlertVariant, AppSidebar, type AppSidebarProps, Avatar, type AvatarProps, type AvatarSize, Badge, type BadgeProps, Banner, type BannerPosition, type BannerProps, type BannerVariant, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, type ButtonAsAnchorProps, type ButtonAsButtonProps, type ButtonIconPosition, type ButtonProps, type ButtonSize, type ButtonVariant, Calendar, type CalendarEvent, type CalendarProps, Card, type CardProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, type CheckboxSize, ColorPicker, type ColorPickerProps, Combobox, type ComboboxOption, type ComboboxProps, type ComboboxSize, type CommandGroup, type CommandItem, CommandMenu, type CommandMenuProps, ConfirmDialog, type ConfirmDialogProps, Container, type ContainerMaxWidth, type ContainerProps, CopyButton, type CopyButtonProps, type Country, type CropArea, type CropShape, DataGrid, type DataGridColumn, type DataGridProps, DataList, type DataListItem, type DataListProps, DatePicker, DatePickerGroup, type DatePickerGroupProps, type DatePickerProps, type DatePickerSize, Divider, type DividerOrientation, type DividerProps, type DragHandleProps, DragList, type DragListItem, type DragListProps, Drawer, type DrawerProps, DropdownMenu, type DropdownMenuItem, type DropdownMenuProps, EmptyState, type EmptyStateProps, FileUpload, type FileUploadProps, FormWizard, type FormWizardProps, type FormWizardStep, ImageCropper, type ImageCropperProps, Input, InputGroup, type InputGroupProps, type InputProps, type InputSize, Link, type LinkProps, type LinkVariant, MobileDataCard, type MobileDataCardColumn, type MobileDataCardProps, Modal, type ModalProps, Navbar, type NavbarProps, Notification, type NotificationProps, type NotificationVariant, NumberInput, type NumberInputProps, type NumberInputSize, type NumberInputVariant, OTPInput, type OTPInputProps, Pagination, type PaginationProps, PhoneInput, type PhoneInputProps, type PhoneInputSize, Popover, type PopoverProps, ProgressBar, type ProgressBarProps, type ProgressBarSize, ProgressCircle, type ProgressCircleProps, Radio, RadioGroup, type RadioGroupOption, type RadioGroupProps, type RadioProps, type RadioSize, Rating, type RatingProps, type RatingSize, SegmentedControl, type SegmentedControlItem, type SegmentedControlProps, type SegmentedControlSize, Select, SelectGroup, type SelectGroupProps, type SelectOption, type SelectProps, Sheet, type SheetProps, SidebarItem, type SidebarItemProps, Skeleton, type SkeletonProps, Slider, type SliderProps, type SliderSize, Spinner, type SpinnerProps, type SpinnerSize, Spotlight, type SpotlightItem, type SpotlightProps, Stack, type StackAlign, type StackDirection, type StackJustify, type StackProps, Stat, type StatProps, StatusBadge, type StatusBadgeProps, type StatusBadgeStatus, type StepItem, Stepper, type StepperProps, Switch, type SwitchProps, type SwitchSize, Tab, TabPanel, type TabPanelProps, type TabProps, Table, type TableColumn, type TableProps, Tabs, type TabsProps, Tag, TagItem, type TagItemProps, type TagProps, Textarea, type TextareaProps, type TextareaResize, type TextareaSize, type Theme, Timeline, type TimelineItem, type TimelineProps, Toast, type ToastContextValue, type ToastOptions, type ToastPosition, type ToastProps, type ToastVariant, ToasterProvider, type ToasterProviderProps, Tooltip, type TooltipProps, Tree, type TreeNode, type TreeProps, type UploadedFile, useTheme, useToast };