@smworks-cz/ui-kit 1.3.1 → 1.5.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 +584 -94
- package/dist/index.d.ts +584 -94
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
3
|
|
|
3
4
|
type ButtonVariant = 'primary' | 'secondary' | 'outline' | 'danger';
|
|
4
5
|
type ButtonSize = 'sm' | 'md' | 'lg';
|
|
@@ -35,6 +36,13 @@ interface ButtonBaseProps {
|
|
|
35
36
|
* Ukazatel myši je blokován; `onClick` se nevyvolá.
|
|
36
37
|
*/
|
|
37
38
|
loading?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Pozice spinneru při loading.
|
|
41
|
+
* - `'replace'` — spinner nahradí ikonu (výchozí)
|
|
42
|
+
* - `'after-text'` — spinner se zobrazí za textem vedle ikony
|
|
43
|
+
* @default 'replace'
|
|
44
|
+
*/
|
|
45
|
+
loadingPosition?: 'replace' | 'after-text';
|
|
38
46
|
/**
|
|
39
47
|
* Roztáhne tlačítko na celou šířku kontejneru.
|
|
40
48
|
*/
|
|
@@ -66,6 +74,81 @@ interface ButtonAsAnchorProps extends ButtonBaseProps, Omit<React.AnchorHTMLAttr
|
|
|
66
74
|
type ButtonProps = ButtonAsButtonProps | ButtonAsAnchorProps;
|
|
67
75
|
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
|
|
68
76
|
|
|
77
|
+
interface IconButtonProps {
|
|
78
|
+
/** Ikona. */
|
|
79
|
+
icon: React.ReactNode;
|
|
80
|
+
/** Callback při kliknutí. */
|
|
81
|
+
onClick?: (e: React.MouseEvent) => void;
|
|
82
|
+
/** Povinný aria-label pro přístupnost. */
|
|
83
|
+
label: string;
|
|
84
|
+
/** Varianta. @default 'default' */
|
|
85
|
+
variant?: 'default' | 'ghost' | 'outline' | 'danger';
|
|
86
|
+
/** Velikost. @default 'md' */
|
|
87
|
+
size?: 'xs' | 'sm' | 'md' | 'lg';
|
|
88
|
+
/** Zakáže tlačítko. @default false */
|
|
89
|
+
disabled?: boolean;
|
|
90
|
+
/** Zobrazí spinner. @default false */
|
|
91
|
+
loading?: boolean;
|
|
92
|
+
/** Automaticky obalí tooltipem. */
|
|
93
|
+
tooltip?: string;
|
|
94
|
+
/** Další inline styly. */
|
|
95
|
+
style?: React.CSSProperties;
|
|
96
|
+
/** Dodatečná CSS třída. */
|
|
97
|
+
className?: string;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Čtvercové tlačítko pro ikonu.
|
|
101
|
+
*
|
|
102
|
+
* Optimalizované pro akce bez textu — klikací plocha je čtvercová,
|
|
103
|
+
* varianta a velikost se řídí samostatně.
|
|
104
|
+
*
|
|
105
|
+
* @example
|
|
106
|
+
* ```tsx
|
|
107
|
+
* <IconButton icon={<TrashIcon />} label="Smazat" variant="danger" onClick={handleDelete} />
|
|
108
|
+
* <IconButton icon={<PencilIcon />} label="Upravit" tooltip="Upravit záznam" />
|
|
109
|
+
* ```
|
|
110
|
+
*/
|
|
111
|
+
declare const IconButton: React.FC<IconButtonProps>;
|
|
112
|
+
|
|
113
|
+
interface FormFieldProps {
|
|
114
|
+
/** Popisek pole. */
|
|
115
|
+
label?: string | React.ReactNode;
|
|
116
|
+
/** Povinné pole — zobrazí hvězdičku. @default false */
|
|
117
|
+
required?: boolean;
|
|
118
|
+
/** Nápovědný text pod polem. */
|
|
119
|
+
helperText?: string | React.ReactNode;
|
|
120
|
+
/** Chybová zpráva — zobrazí se červeně pod polem. */
|
|
121
|
+
error?: string | React.ReactNode;
|
|
122
|
+
/** Formulářový prvek (input, select, atd.). */
|
|
123
|
+
children: React.ReactNode;
|
|
124
|
+
/** Vodorovný layout (label vlevo, field vpravo). @default false */
|
|
125
|
+
inline?: boolean;
|
|
126
|
+
/** Šířka labelu v inline režimu. @default '120px' */
|
|
127
|
+
labelWidth?: number | string;
|
|
128
|
+
/** Další inline styly. */
|
|
129
|
+
style?: React.CSSProperties;
|
|
130
|
+
/** Dodatečná CSS třída. */
|
|
131
|
+
className?: string;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Konzistentní obal pro formulářový prvek.
|
|
135
|
+
*
|
|
136
|
+
* Sjednocuje label, required indikátor, helper text a error message
|
|
137
|
+
* do jednoho komponenty. Podporuje vertikální i inline layout.
|
|
138
|
+
*
|
|
139
|
+
* @example
|
|
140
|
+
* ```tsx
|
|
141
|
+
* <FormField label="Email" required error={errors.email} helperText="Pracovní email">
|
|
142
|
+
* <Input value={email} onChange={setEmail} />
|
|
143
|
+
* </FormField>
|
|
144
|
+
*
|
|
145
|
+
* <FormField label="Jméno" inline labelWidth={140}>
|
|
146
|
+
* <Input value={name} onChange={setName} />
|
|
147
|
+
* </FormField>
|
|
148
|
+
* ```
|
|
149
|
+
*/
|
|
150
|
+
declare const FormField: React.FC<FormFieldProps>;
|
|
151
|
+
|
|
69
152
|
type InputSize = 'sm' | 'md' | 'lg';
|
|
70
153
|
interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
71
154
|
/**
|
|
@@ -290,6 +373,26 @@ interface SelectProps {
|
|
|
290
373
|
loading?: boolean;
|
|
291
374
|
/** Označí select jako nevalidní — přijímá `true` nebo textovou chybovou zprávu. */
|
|
292
375
|
error?: boolean | string;
|
|
376
|
+
/**
|
|
377
|
+
* Async vyhledávání — když zadáno, filtrace nejede client-side.
|
|
378
|
+
* Voláno s textem hledání, vrací Promise s novými options.
|
|
379
|
+
*/
|
|
380
|
+
onSearch?: (query: string) => Promise<SelectOption[]>;
|
|
381
|
+
/** Povolí uživateli vytvořit novou hodnotu. @default false */
|
|
382
|
+
creatable?: boolean;
|
|
383
|
+
/** Callback při vytvoření nové hodnoty. */
|
|
384
|
+
onCreateOption?: (label: string) => void;
|
|
385
|
+
/**
|
|
386
|
+
* Způsob zobrazení vybraných hodnot v multiple režimu.
|
|
387
|
+
* - `'inline'` — tagy (výchozí)
|
|
388
|
+
* - `'count'` — "N vybraných"
|
|
389
|
+
* @default 'inline'
|
|
390
|
+
*/
|
|
391
|
+
chipDisplay?: 'inline' | 'count';
|
|
392
|
+
/** Vlastní renderování položky v seznamu. */
|
|
393
|
+
renderOption?: (option: SelectOption, selected: boolean) => React.ReactNode;
|
|
394
|
+
/** Vlastní renderování vybrané hodnoty v triggeru. */
|
|
395
|
+
renderValue?: (option: SelectOption) => React.ReactNode;
|
|
293
396
|
/**
|
|
294
397
|
* Popisek zobrazený nad selectem.
|
|
295
398
|
* Stylizován velkými písmeny dle SM-UI design systému.
|
|
@@ -533,6 +636,15 @@ interface DatePickerProps {
|
|
|
533
636
|
minDate?: Date;
|
|
534
637
|
/** Maximální datum, které lze vybrat. */
|
|
535
638
|
maxDate?: Date;
|
|
639
|
+
/** Předvolby zobrazené v levém sloupci popoveru. */
|
|
640
|
+
presets?: Array<{
|
|
641
|
+
label: string;
|
|
642
|
+
value: Date | [Date, Date];
|
|
643
|
+
}>;
|
|
644
|
+
/** Hlavička sekce předvoleb. @default 'Rychlý výběr' */
|
|
645
|
+
presetsLabel?: string;
|
|
646
|
+
/** Disable specific dates. Vrací true = den je grayed-out. */
|
|
647
|
+
disabledDates?: (date: Date) => boolean;
|
|
536
648
|
/**
|
|
537
649
|
* První den v týdnu (ISO: 1=pondělí).
|
|
538
650
|
* @default 1
|
|
@@ -1184,6 +1296,107 @@ interface OTPInputProps {
|
|
|
1184
1296
|
*/
|
|
1185
1297
|
declare const OTPInput: React.FC<OTPInputProps>;
|
|
1186
1298
|
|
|
1299
|
+
interface Country {
|
|
1300
|
+
/** ISO 3166-1 alpha-2 kód. */
|
|
1301
|
+
code: string;
|
|
1302
|
+
/** Název země. */
|
|
1303
|
+
name: string;
|
|
1304
|
+
/** Předvolba. */
|
|
1305
|
+
dialCode: string;
|
|
1306
|
+
/** Vlaječka emoji. */
|
|
1307
|
+
flag: string;
|
|
1308
|
+
}
|
|
1309
|
+
type PhoneInputSize = 'sm' | 'md' | 'lg';
|
|
1310
|
+
interface PhoneInputProps {
|
|
1311
|
+
/** Plná mezinárodní hodnota, např. "+420123456789". */
|
|
1312
|
+
value?: string;
|
|
1313
|
+
/** Callback s plnou mezinárodní hodnotou. */
|
|
1314
|
+
onChange?: (value: string) => void;
|
|
1315
|
+
/** Výchozí kód země. @default 'CZ' */
|
|
1316
|
+
defaultCountry?: string;
|
|
1317
|
+
/** Vlastní seznam zemí. */
|
|
1318
|
+
countries?: Country[];
|
|
1319
|
+
/** Popisek. */
|
|
1320
|
+
label?: string;
|
|
1321
|
+
/** Chybový stav nebo zpráva. */
|
|
1322
|
+
error?: boolean | string;
|
|
1323
|
+
/** Nápovědný text. */
|
|
1324
|
+
helperText?: string;
|
|
1325
|
+
/** Zakáže komponentu. @default false */
|
|
1326
|
+
disabled?: boolean;
|
|
1327
|
+
/** Velikost. @default 'md' */
|
|
1328
|
+
size?: PhoneInputSize;
|
|
1329
|
+
/** Placeholder pro číslo. */
|
|
1330
|
+
placeholder?: string;
|
|
1331
|
+
/** Další inline styly. */
|
|
1332
|
+
style?: React.CSSProperties;
|
|
1333
|
+
/** Dodatečná CSS třída. */
|
|
1334
|
+
className?: string;
|
|
1335
|
+
}
|
|
1336
|
+
/**
|
|
1337
|
+
* Telefonní vstup s výběrem předvolby země.
|
|
1338
|
+
*
|
|
1339
|
+
* Obsahuje rozbalovací seznam zemí s vlajkami a předvolbami.
|
|
1340
|
+
* Hodnota je plné mezinárodní číslo (např. "+420123456789").
|
|
1341
|
+
*
|
|
1342
|
+
* @example
|
|
1343
|
+
* ```tsx
|
|
1344
|
+
* <PhoneInput
|
|
1345
|
+
* value={phone}
|
|
1346
|
+
* onChange={setPhone}
|
|
1347
|
+
* defaultCountry="CZ"
|
|
1348
|
+
* label="Telefon"
|
|
1349
|
+
* />
|
|
1350
|
+
* ```
|
|
1351
|
+
*/
|
|
1352
|
+
declare const PhoneInput: React.FC<PhoneInputProps>;
|
|
1353
|
+
|
|
1354
|
+
type CropShape = 'rect' | 'circle';
|
|
1355
|
+
interface CropArea {
|
|
1356
|
+
x: number;
|
|
1357
|
+
y: number;
|
|
1358
|
+
width: number;
|
|
1359
|
+
height: number;
|
|
1360
|
+
}
|
|
1361
|
+
interface ImageCropperProps {
|
|
1362
|
+
/** Zdroj obrázku — URL string nebo File objekt. */
|
|
1363
|
+
src: string | File;
|
|
1364
|
+
/** Callback s oříznutým výsledkem jako Blob. */
|
|
1365
|
+
onCrop: (result: Blob) => void;
|
|
1366
|
+
/** Callback při zrušení. */
|
|
1367
|
+
onCancel?: () => void;
|
|
1368
|
+
/** Poměr stran (šířka/výška). Undefined = volný. */
|
|
1369
|
+
aspectRatio?: number;
|
|
1370
|
+
/** Minimální šířka ořezu v px. @default 50 */
|
|
1371
|
+
minWidth?: number;
|
|
1372
|
+
/** Minimální výška ořezu v px. @default 50 */
|
|
1373
|
+
minHeight?: number;
|
|
1374
|
+
/** Tvar ořezu. @default 'rect' */
|
|
1375
|
+
shape?: CropShape;
|
|
1376
|
+
/** Další inline styly. */
|
|
1377
|
+
style?: React.CSSProperties;
|
|
1378
|
+
/** Dodatečná CSS třída. */
|
|
1379
|
+
className?: string;
|
|
1380
|
+
}
|
|
1381
|
+
/**
|
|
1382
|
+
* Ořezávání obrázku na canvasu.
|
|
1383
|
+
*
|
|
1384
|
+
* Umožňuje přetahování a změnu velikosti ořezové oblasti.
|
|
1385
|
+
* Podporuje obdélníkový a kruhový tvar, poměr stran a minimální rozměry.
|
|
1386
|
+
*
|
|
1387
|
+
* @example
|
|
1388
|
+
* ```tsx
|
|
1389
|
+
* <ImageCropper
|
|
1390
|
+
* src={file}
|
|
1391
|
+
* aspectRatio={1}
|
|
1392
|
+
* shape="circle"
|
|
1393
|
+
* onCrop={(blob) => uploadAvatar(blob)}
|
|
1394
|
+
* onCancel={() => setShowCropper(false)}
|
|
1395
|
+
* />
|
|
1396
|
+
* ```
|
|
1397
|
+
*/
|
|
1398
|
+
declare const ImageCropper: React.FC<ImageCropperProps>;
|
|
1399
|
+
|
|
1187
1400
|
interface TableColumn {
|
|
1188
1401
|
/** Klíč odpovídající hodnotě v datovém objektu. */
|
|
1189
1402
|
key: string;
|
|
@@ -1215,6 +1428,10 @@ interface TableProps {
|
|
|
1215
1428
|
striped?: boolean;
|
|
1216
1429
|
/** Zvýraznění řádku při najetí myší. @default true */
|
|
1217
1430
|
hoverable?: boolean;
|
|
1431
|
+
/** Callback při kliknutí na řádek. */
|
|
1432
|
+
onRowClick?: (row: any, index: number) => void;
|
|
1433
|
+
/** Render akčních tlačítek v posledním sloupci. */
|
|
1434
|
+
rowActions?: (row: any) => React.ReactNode;
|
|
1218
1435
|
/** Dodatečná CSS třída. */
|
|
1219
1436
|
className?: string;
|
|
1220
1437
|
/** Další inline styly. */
|
|
@@ -1580,11 +1797,37 @@ interface TooltipProps {
|
|
|
1580
1797
|
* @default 'top'
|
|
1581
1798
|
*/
|
|
1582
1799
|
position?: 'top' | 'bottom' | 'left' | 'right';
|
|
1800
|
+
/**
|
|
1801
|
+
* Režim pozicování.
|
|
1802
|
+
* - `'anchor'` — klasický, tooltip u středu triggeru (výchozí)
|
|
1803
|
+
* - `'cursor'` — tooltip sleduje kurzor myši
|
|
1804
|
+
* @default 'anchor'
|
|
1805
|
+
*/
|
|
1806
|
+
mode?: 'anchor' | 'cursor';
|
|
1807
|
+
/**
|
|
1808
|
+
* Automaticky otočí pozici když tooltip vyjede za viewport.
|
|
1809
|
+
* @default true
|
|
1810
|
+
*/
|
|
1811
|
+
autoFlip?: boolean;
|
|
1812
|
+
/**
|
|
1813
|
+
* Posun od triggeru (anchor) nebo kurzoru (cursor) v px: [x, y].
|
|
1814
|
+
* @default [0, 0]
|
|
1815
|
+
*/
|
|
1816
|
+
offset?: [number, number];
|
|
1583
1817
|
/**
|
|
1584
1818
|
* Prodleva před zobrazením (ms).
|
|
1585
|
-
* @default
|
|
1819
|
+
* @default 0
|
|
1586
1820
|
*/
|
|
1587
1821
|
delay?: number;
|
|
1822
|
+
/**
|
|
1823
|
+
* Prodleva před zobrazením (ms). Přepíše `delay` pro otevření.
|
|
1824
|
+
*/
|
|
1825
|
+
openDelay?: number;
|
|
1826
|
+
/**
|
|
1827
|
+
* Prodleva před skrytím (ms). Umožňuje hover-out grace period.
|
|
1828
|
+
* @default 0
|
|
1829
|
+
*/
|
|
1830
|
+
closeDelay?: number;
|
|
1588
1831
|
/** Dodatečná CSS třída pro tooltip. */
|
|
1589
1832
|
className?: string;
|
|
1590
1833
|
/** Další inline styly pro tooltip. */
|
|
@@ -1594,13 +1837,19 @@ interface TooltipProps {
|
|
|
1594
1837
|
* Tooltip dle SM-UI design systému.
|
|
1595
1838
|
*
|
|
1596
1839
|
* Zobrazí se po najetí myší na trigger element s volitelnou prodlevou.
|
|
1597
|
-
* Vykresluje se přes React portál
|
|
1840
|
+
* Vykresluje se přes React portál. Podporuje sledování kurzoru (`mode="cursor"`)
|
|
1841
|
+
* pro široké elementy a automatické otočení pozice při přetečení viewportu.
|
|
1598
1842
|
*
|
|
1599
1843
|
* @example
|
|
1600
1844
|
* ```tsx
|
|
1601
1845
|
* <Tooltip content="Uložit změny">
|
|
1602
1846
|
* <button>Uložit</button>
|
|
1603
1847
|
* </Tooltip>
|
|
1848
|
+
*
|
|
1849
|
+
* // Cursor-following pro široké elementy (Gantt bary):
|
|
1850
|
+
* <Tooltip content={<TaskDetail />} mode="cursor" position="bottom">
|
|
1851
|
+
* <div className="gantt-bar" />
|
|
1852
|
+
* </Tooltip>
|
|
1604
1853
|
* ```
|
|
1605
1854
|
*/
|
|
1606
1855
|
declare const Tooltip: React.FC<TooltipProps>;
|
|
@@ -1678,15 +1927,23 @@ interface SkeletonProps {
|
|
|
1678
1927
|
*/
|
|
1679
1928
|
declare const Skeleton: React.FC<SkeletonProps>;
|
|
1680
1929
|
|
|
1930
|
+
type EmptyStatePreset = 'no-data' | 'no-results' | 'no-permission' | 'error' | 'coming-soon';
|
|
1681
1931
|
interface EmptyStateProps {
|
|
1682
1932
|
/** Ikona zobrazená nad titulkem. */
|
|
1683
1933
|
icon?: React.ReactNode;
|
|
1684
1934
|
/** Hlavní titulek prázdného stavu. */
|
|
1685
|
-
title
|
|
1935
|
+
title?: string;
|
|
1686
1936
|
/** Doplňkový popis. */
|
|
1687
1937
|
description?: string;
|
|
1688
|
-
/** Akční
|
|
1938
|
+
/** Akční prvky — typicky tlačítka. */
|
|
1689
1939
|
action?: React.ReactNode;
|
|
1940
|
+
/**
|
|
1941
|
+
* Přednastavený prázdný stav s ikonou, titulkem a popisem.
|
|
1942
|
+
* Vlastní `icon`, `title`, `description` přepíší preset hodnoty.
|
|
1943
|
+
*/
|
|
1944
|
+
preset?: EmptyStatePreset;
|
|
1945
|
+
/** Velikost. @default 'md' */
|
|
1946
|
+
size?: 'sm' | 'md' | 'lg';
|
|
1690
1947
|
/** Dodatečná CSS třída. */
|
|
1691
1948
|
className?: string;
|
|
1692
1949
|
/** Další inline styly. */
|
|
@@ -1696,15 +1953,20 @@ interface EmptyStateProps {
|
|
|
1696
1953
|
* Prázdný stav dle SM-UI design systému.
|
|
1697
1954
|
*
|
|
1698
1955
|
* Centrovaný layout s volitelnou ikonou, titulkem,
|
|
1699
|
-
* popisem a
|
|
1956
|
+
* popisem a akčními tlačítky. Podporuje presety pro běžné scénáře.
|
|
1700
1957
|
*
|
|
1701
1958
|
* @example
|
|
1702
1959
|
* ```tsx
|
|
1703
1960
|
* <EmptyState
|
|
1961
|
+
* preset="no-results"
|
|
1962
|
+
* action={<Button>Vytvořit záznam</Button>}
|
|
1963
|
+
* />
|
|
1964
|
+
*
|
|
1965
|
+
* <EmptyState
|
|
1704
1966
|
* icon={<InboxIcon />}
|
|
1705
1967
|
* title="Žádné výsledky"
|
|
1706
|
-
* description="Zkuste upravit filtr
|
|
1707
|
-
* action={<Button>
|
|
1968
|
+
* description="Zkuste upravit filtr."
|
|
1969
|
+
* action={<Button>Reset</Button>}
|
|
1708
1970
|
* />
|
|
1709
1971
|
* ```
|
|
1710
1972
|
*/
|
|
@@ -1714,18 +1976,21 @@ interface StatProps {
|
|
|
1714
1976
|
/** Popisek statistiky. */
|
|
1715
1977
|
label: string;
|
|
1716
1978
|
/** Hodnota statistiky. */
|
|
1717
|
-
value
|
|
1979
|
+
value?: string | number | React.ReactNode;
|
|
1718
1980
|
/** Procentuální změna (zobrazí se se znaménkem). */
|
|
1719
1981
|
change?: number;
|
|
1720
1982
|
/** Doplňkový text k procentuální změně. */
|
|
1721
1983
|
changeLabel?: string;
|
|
1722
1984
|
/** Ikona zobrazená vedle hodnoty. */
|
|
1723
1985
|
icon?: React.ReactNode;
|
|
1724
|
-
/**
|
|
1725
|
-
* Směr trendu — ovlivňuje barvu a ikonu šipky.
|
|
1726
|
-
* @default 'neutral'
|
|
1727
|
-
*/
|
|
1986
|
+
/** Směr trendu. @default 'neutral' */
|
|
1728
1987
|
trend?: 'up' | 'down' | 'neutral';
|
|
1988
|
+
/** Skeleton stav. @default false */
|
|
1989
|
+
loading?: boolean;
|
|
1990
|
+
/** Klikatelná karta s hover efektem. */
|
|
1991
|
+
onClick?: () => void;
|
|
1992
|
+
/** Sekundární text pod hodnotou. */
|
|
1993
|
+
helper?: string | React.ReactNode;
|
|
1729
1994
|
/** Dodatečná CSS třída. */
|
|
1730
1995
|
className?: string;
|
|
1731
1996
|
/** Další inline styly. */
|
|
@@ -1735,17 +2000,17 @@ interface StatProps {
|
|
|
1735
2000
|
* Statistický ukazatel dle SM-UI design systému.
|
|
1736
2001
|
*
|
|
1737
2002
|
* Kompaktní kartička s popiskem, hodnotou, procentuální změnou
|
|
1738
|
-
* a volitelnou ikonou.
|
|
2003
|
+
* a volitelnou ikonou. Podporuje loading skeleton a klikatelnost.
|
|
1739
2004
|
*
|
|
1740
2005
|
* @example
|
|
1741
2006
|
* ```tsx
|
|
1742
2007
|
* <Stat label="Objednávky" value={1284} change={12.5} trend="up" />
|
|
1743
|
-
* <Stat label="
|
|
2008
|
+
* <Stat label="Aktivní" value={loading ? undefined : 127} loading={loading} onClick={() => navigate('/tasks')} helper="z toho 12 po termínu" />
|
|
1744
2009
|
* ```
|
|
1745
2010
|
*/
|
|
1746
2011
|
declare const Stat: React.FC<StatProps>;
|
|
1747
2012
|
|
|
1748
|
-
type AvatarSize = 'sm' | 'md' | 'lg' | number;
|
|
2013
|
+
type AvatarSize = '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | number;
|
|
1749
2014
|
interface AvatarProps {
|
|
1750
2015
|
/**
|
|
1751
2016
|
* Iniciály zobrazené uvnitř avataru (např. `"DC"`, `"JN"`).
|
|
@@ -1754,9 +2019,12 @@ interface AvatarProps {
|
|
|
1754
2019
|
initials: string;
|
|
1755
2020
|
/**
|
|
1756
2021
|
* Velikost avataru.
|
|
1757
|
-
* - `'
|
|
1758
|
-
* - `'
|
|
1759
|
-
* - `'
|
|
2022
|
+
* - `'2xs'` — 16 px
|
|
2023
|
+
* - `'xs'` — 20 px
|
|
2024
|
+
* - `'sm'` — 32 px
|
|
2025
|
+
* - `'md'` — 40 px *(výchozí)*
|
|
2026
|
+
* - `'lg'` — 64 px
|
|
2027
|
+
* - `'xl'` — 96 px
|
|
1760
2028
|
* - `number` — přesná hodnota v pixelech
|
|
1761
2029
|
* @default 'md'
|
|
1762
2030
|
*/
|
|
@@ -1789,6 +2057,42 @@ interface AvatarProps {
|
|
|
1789
2057
|
*/
|
|
1790
2058
|
declare const Avatar: React.FC<AvatarProps>;
|
|
1791
2059
|
|
|
2060
|
+
interface AvatarStackProps {
|
|
2061
|
+
/** Avatar elementy. Každý dostane forced consistent size a circular shape. */
|
|
2062
|
+
children: React.ReactNode;
|
|
2063
|
+
/** Max viditelných avatarů. Ostatní se sbalí do „+N" badge. @default 3 */
|
|
2064
|
+
max?: number;
|
|
2065
|
+
/** Forced size pro všechny avatary uvnitř. @default 'sm' */
|
|
2066
|
+
size?: AvatarSize;
|
|
2067
|
+
/** Mezera mezi avatary (negative margin). @default 'normal' */
|
|
2068
|
+
spacing?: 'tight' | 'normal' | 'loose';
|
|
2069
|
+
/** Z-stacking směr — který avatar je nahoře. @default 'ltr' */
|
|
2070
|
+
direction?: 'ltr' | 'rtl';
|
|
2071
|
+
/** Tooltip nad „+N" badge. String nebo funkce (hiddenCount) => string. */
|
|
2072
|
+
overflowTooltip?: string | ((hiddenCount: number) => string);
|
|
2073
|
+
/** Další inline styly. */
|
|
2074
|
+
style?: React.CSSProperties;
|
|
2075
|
+
/** Dodatečná CSS třída. */
|
|
2076
|
+
className?: string;
|
|
2077
|
+
}
|
|
2078
|
+
/**
|
|
2079
|
+
* Overlap pattern pro více avatarů.
|
|
2080
|
+
*
|
|
2081
|
+
* Zobrazí max N avatarů s překrytím + „+N" badge pro zbytek.
|
|
2082
|
+
* Children avatary se forced-resize na zadaný size a kruhový tvar.
|
|
2083
|
+
*
|
|
2084
|
+
* @example
|
|
2085
|
+
* ```tsx
|
|
2086
|
+
* <AvatarStack max={3} size="sm">
|
|
2087
|
+
* <Avatar initials="JD" />
|
|
2088
|
+
* <Avatar initials="AB" />
|
|
2089
|
+
* <Avatar initials="MK" />
|
|
2090
|
+
* <Avatar initials="PV" />
|
|
2091
|
+
* </AvatarStack>
|
|
2092
|
+
* ```
|
|
2093
|
+
*/
|
|
2094
|
+
declare const AvatarStack: React.FC<AvatarStackProps>;
|
|
2095
|
+
|
|
1792
2096
|
interface TagProps {
|
|
1793
2097
|
/**
|
|
1794
2098
|
* Textový popisek zobrazený uvnitř tagu.
|
|
@@ -2127,20 +2431,35 @@ interface ModalProps {
|
|
|
2127
2431
|
open: boolean;
|
|
2128
2432
|
/** Voláno při zavření modálu. */
|
|
2129
2433
|
onClose: () => void;
|
|
2130
|
-
/** Titulek zobrazený v záhlaví modálu. */
|
|
2131
|
-
title?: string;
|
|
2434
|
+
/** Titulek zobrazený v záhlaví modálu. String nebo ReactNode pro vlastní hlavičku. */
|
|
2435
|
+
title?: string | React.ReactNode;
|
|
2436
|
+
/** Alternativní slot pro celou hlavičku (nahrazuje title + close button). */
|
|
2437
|
+
titleSlot?: React.ReactNode;
|
|
2132
2438
|
/** Obsah těla modálu. */
|
|
2133
2439
|
children: React.ReactNode;
|
|
2134
2440
|
/** Obsah patičky modálu (tlačítka apod.). */
|
|
2135
2441
|
footer?: React.ReactNode;
|
|
2136
2442
|
/** Velikostní preset modálu. @default 'md' */
|
|
2137
2443
|
size?: 'sm' | 'md' | 'lg' | 'fullscreen';
|
|
2444
|
+
/**
|
|
2445
|
+
* Explicitní šířka modálu. Přepíše `size`.
|
|
2446
|
+
* Přijímá číslo (px) nebo CSS string (např. '90vw').
|
|
2447
|
+
*/
|
|
2448
|
+
width?: number | string;
|
|
2138
2449
|
/** Zavře modál kliknutím na překryvnou vrstvu. @default true */
|
|
2139
2450
|
closeOnOverlay?: boolean;
|
|
2140
2451
|
/** Zavře modál stisknutím klávesy Escape. @default true */
|
|
2141
2452
|
closeOnEscape?: boolean;
|
|
2453
|
+
/**
|
|
2454
|
+
* Umožní zavření modálu (overlay click + ESC + close button).
|
|
2455
|
+
* Když false, modál lze zavřít jen programově.
|
|
2456
|
+
* @default true
|
|
2457
|
+
*/
|
|
2458
|
+
dismissable?: boolean;
|
|
2142
2459
|
/** Zobrazí zavírací tlačítko (×) v záhlaví. @default true */
|
|
2143
2460
|
showClose?: boolean;
|
|
2461
|
+
/** Zobrazí oddělovací čáru pod hlavičkou. @default true */
|
|
2462
|
+
showHeaderDivider?: boolean;
|
|
2144
2463
|
/** Dodatečná CSS třída pro kartu modálu. */
|
|
2145
2464
|
className?: string;
|
|
2146
2465
|
/** Další inline styly pro kartu modálu. */
|
|
@@ -2361,9 +2680,62 @@ interface StepperProps {
|
|
|
2361
2680
|
*/
|
|
2362
2681
|
declare const Stepper: React.FC<StepperProps>;
|
|
2363
2682
|
|
|
2364
|
-
interface
|
|
2365
|
-
/**
|
|
2683
|
+
interface FormWizardStep {
|
|
2684
|
+
/** Popisek kroku zobrazený ve Stepperu. */
|
|
2366
2685
|
label: string;
|
|
2686
|
+
/** Volitelný popis kroku. */
|
|
2687
|
+
description?: string;
|
|
2688
|
+
/** Obsah kroku (formulář, komponenta). */
|
|
2689
|
+
content: React.ReactNode;
|
|
2690
|
+
/** Validace před pokračováním. Vrací boolean nebo Promise<boolean>. */
|
|
2691
|
+
validate?: () => boolean | Promise<boolean>;
|
|
2692
|
+
}
|
|
2693
|
+
interface FormWizardProps {
|
|
2694
|
+
/** Definice kroků. */
|
|
2695
|
+
steps: FormWizardStep[];
|
|
2696
|
+
/** Index aktivního kroku (0-indexed). */
|
|
2697
|
+
activeStep: number;
|
|
2698
|
+
/** Callback při změně kroku. Při posledním kroku volá s `steps.length`. */
|
|
2699
|
+
onStepChange: (step: number) => void;
|
|
2700
|
+
/** Orientace stepperu. @default 'horizontal' */
|
|
2701
|
+
orientation?: 'horizontal' | 'vertical';
|
|
2702
|
+
/** Zobrazit navigační tlačítka (Předchozí/Další). @default true */
|
|
2703
|
+
showNavigation?: boolean;
|
|
2704
|
+
/** Text tlačítka na posledním kroku. @default 'Dokončit' */
|
|
2705
|
+
finishLabel?: string;
|
|
2706
|
+
/** Text tlačítka Další. @default 'Další' */
|
|
2707
|
+
nextLabel?: string;
|
|
2708
|
+
/** Text tlačítka Předchozí. @default 'Předchozí' */
|
|
2709
|
+
prevLabel?: string;
|
|
2710
|
+
/** Další inline styly. */
|
|
2711
|
+
style?: React.CSSProperties;
|
|
2712
|
+
/** Dodatečná CSS třída. */
|
|
2713
|
+
className?: string;
|
|
2714
|
+
}
|
|
2715
|
+
/**
|
|
2716
|
+
* Vícekrokový formulářový průvodce.
|
|
2717
|
+
*
|
|
2718
|
+
* Kombinuje Stepper s obsahem kroků a navigačními tlačítky.
|
|
2719
|
+
* Podporuje synchronní i asynchronní validaci před pokračováním.
|
|
2720
|
+
*
|
|
2721
|
+
* @example
|
|
2722
|
+
* ```tsx
|
|
2723
|
+
* <FormWizard
|
|
2724
|
+
* steps={[
|
|
2725
|
+
* { label: 'Kontakt', content: <ContactForm />, validate: () => isValid },
|
|
2726
|
+
* { label: 'Adresa', content: <AddressForm /> },
|
|
2727
|
+
* { label: 'Souhrn', content: <Summary /> },
|
|
2728
|
+
* ]}
|
|
2729
|
+
* activeStep={step}
|
|
2730
|
+
* onStepChange={setStep}
|
|
2731
|
+
* />
|
|
2732
|
+
* ```
|
|
2733
|
+
*/
|
|
2734
|
+
declare const FormWizard: React.FC<FormWizardProps>;
|
|
2735
|
+
|
|
2736
|
+
interface DropdownMenuItem {
|
|
2737
|
+
/** Zobrazovaný popisek položky. Může být text nebo ReactNode pro vlastní obsah. */
|
|
2738
|
+
label: React.ReactNode;
|
|
2367
2739
|
/** Volitelná ikona vykreslená před textem. */
|
|
2368
2740
|
icon?: React.ReactNode;
|
|
2369
2741
|
/** Voláno při kliknutí na položku. */
|
|
@@ -2374,6 +2746,14 @@ interface DropdownMenuItem {
|
|
|
2374
2746
|
danger?: boolean;
|
|
2375
2747
|
/** Při `true` se místo položky vykreslí oddělovací čára. @default false */
|
|
2376
2748
|
divider?: boolean;
|
|
2749
|
+
/** Text kategorie — zobrazí se jako malý nadpis sekce (uppercase label). */
|
|
2750
|
+
category?: string;
|
|
2751
|
+
/** Klávesová zkratka zobrazená vpravo (např. '⌘S', '⌘⌫'). */
|
|
2752
|
+
shortcut?: string;
|
|
2753
|
+
/** Při `true` se dropdown po kliknutí nezavře. Pro toggle položky. @default false */
|
|
2754
|
+
keepOpenOnClick?: boolean;
|
|
2755
|
+
/** Kaskádové submenu. Když nastaveno, klik/hover otevře submenu místo zavření. */
|
|
2756
|
+
subItems?: DropdownMenuItem[];
|
|
2377
2757
|
}
|
|
2378
2758
|
interface DropdownMenuProps {
|
|
2379
2759
|
/** Spouštěcí element (tlačítko apod.). */
|
|
@@ -2382,6 +2762,8 @@ interface DropdownMenuProps {
|
|
|
2382
2762
|
items: DropdownMenuItem[];
|
|
2383
2763
|
/** Pozice rozbalovací nabídky vůči triggeru. @default 'bottom-left' */
|
|
2384
2764
|
position?: 'bottom-left' | 'bottom-right';
|
|
2765
|
+
/** Otevřít nabídku pravým kliknutím místo levým. @default false */
|
|
2766
|
+
triggerOnRightClick?: boolean;
|
|
2385
2767
|
/** Dodatečná CSS třída pro obalový element. */
|
|
2386
2768
|
className?: string;
|
|
2387
2769
|
/** Další inline styly pro obalový element. */
|
|
@@ -2481,6 +2863,8 @@ interface SpotlightProps {
|
|
|
2481
2863
|
onChange: (value: string) => void;
|
|
2482
2864
|
/** Již filtrované výsledky k zobrazení, seskupené dle `category`. */
|
|
2483
2865
|
results: SpotlightItem[];
|
|
2866
|
+
/** Zobrazí stav načítání místo výsledků. @default false */
|
|
2867
|
+
loading?: boolean;
|
|
2484
2868
|
/** Placeholder text pro vyhledávací vstup. @default 'Hledat...' */
|
|
2485
2869
|
placeholder?: string;
|
|
2486
2870
|
/** Dodatečná CSS třída pro kartu spotlightu. */
|
|
@@ -2906,6 +3290,49 @@ interface AlertProps {
|
|
|
2906
3290
|
*/
|
|
2907
3291
|
declare const Alert: React.FC<AlertProps>;
|
|
2908
3292
|
|
|
3293
|
+
type BannerVariant = 'info' | 'success' | 'warning' | 'error';
|
|
3294
|
+
type BannerPosition = 'top' | 'bottom';
|
|
3295
|
+
interface BannerProps {
|
|
3296
|
+
/** Vizuální varianta. @default 'info' */
|
|
3297
|
+
variant?: BannerVariant;
|
|
3298
|
+
/** Tučný titulek. */
|
|
3299
|
+
title?: string;
|
|
3300
|
+
/** Obsah banneru. */
|
|
3301
|
+
children?: React.ReactNode;
|
|
3302
|
+
/** Zobrazí zavírací tlačítko. @default false */
|
|
3303
|
+
closable?: boolean;
|
|
3304
|
+
/** Callback při zavření. */
|
|
3305
|
+
onClose?: () => void;
|
|
3306
|
+
/** Vlastní ikona. Pokud není zadána, použije se výchozí dle varianty. */
|
|
3307
|
+
icon?: React.ReactNode;
|
|
3308
|
+
/** Akční tlačítka na pravé straně. */
|
|
3309
|
+
actions?: React.ReactNode;
|
|
3310
|
+
/** Persistentní dismiss přes localStorage key. */
|
|
3311
|
+
dismissKey?: string;
|
|
3312
|
+
/** Pozice akcentního proužku. @default 'top' */
|
|
3313
|
+
position?: BannerPosition;
|
|
3314
|
+
/** Přilepí banner na pozici. @default false */
|
|
3315
|
+
sticky?: boolean;
|
|
3316
|
+
/** Další inline styly. */
|
|
3317
|
+
style?: React.CSSProperties;
|
|
3318
|
+
/** Dodatečná CSS třída. */
|
|
3319
|
+
className?: string;
|
|
3320
|
+
}
|
|
3321
|
+
/**
|
|
3322
|
+
* Oznámovací banner na celou šířku.
|
|
3323
|
+
*
|
|
3324
|
+
* Plnohodnotný banner pro oznámení, varování nebo chybové hlášky.
|
|
3325
|
+
* Lze přilepit na horní nebo dolní okraj pomocí `sticky`.
|
|
3326
|
+
*
|
|
3327
|
+
* @example
|
|
3328
|
+
* ```tsx
|
|
3329
|
+
* <Banner variant="warning" title="Údržba" sticky>
|
|
3330
|
+
* Systém bude nedostupný 12. dubna od 22:00.
|
|
3331
|
+
* </Banner>
|
|
3332
|
+
* ```
|
|
3333
|
+
*/
|
|
3334
|
+
declare const Banner: React.FC<BannerProps>;
|
|
3335
|
+
|
|
2909
3336
|
type NotificationVariant = 'info' | 'success' | 'warning' | 'error';
|
|
2910
3337
|
interface NotificationProps {
|
|
2911
3338
|
/** Vizuální varianta notifikace. @default 'info' */
|
|
@@ -2950,107 +3377,84 @@ interface NotificationProps {
|
|
|
2950
3377
|
*/
|
|
2951
3378
|
declare const Notification: React.FC<NotificationProps>;
|
|
2952
3379
|
|
|
2953
|
-
type ProgressBarSize = '
|
|
3380
|
+
type ProgressBarSize = 'xs' | 'sm' | 'md';
|
|
3381
|
+
type ProgressVariant = 'default' | 'success' | 'warning' | 'danger';
|
|
3382
|
+
interface ProgressThreshold {
|
|
3383
|
+
/** Hodnota (0-max) od které se aktivuje varianta. */
|
|
3384
|
+
value: number;
|
|
3385
|
+
/** Varianta použitá od této hodnoty. */
|
|
3386
|
+
variant: ProgressVariant;
|
|
3387
|
+
}
|
|
2954
3388
|
interface ProgressBarProps {
|
|
2955
|
-
/**
|
|
2956
|
-
* Aktuální hodnota průběhu v rozsahu 0–100.
|
|
2957
|
-
*/
|
|
3389
|
+
/** Aktuální hodnota. */
|
|
2958
3390
|
value: number;
|
|
2959
|
-
/**
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
3391
|
+
/** Maximální hodnota. @default 100 */
|
|
3392
|
+
max?: number;
|
|
3393
|
+
/** Label: true = "X%", string = custom. @default false */
|
|
3394
|
+
label?: string | boolean;
|
|
3395
|
+
/** Barevný preset. @default 'default' */
|
|
3396
|
+
variant?: ProgressVariant;
|
|
3397
|
+
/** Auto-switch variant podle thresholds. */
|
|
3398
|
+
thresholds?: ProgressThreshold[];
|
|
3399
|
+
/** Velikost (výška). @default 'sm' */
|
|
2966
3400
|
size?: ProgressBarSize;
|
|
2967
|
-
/**
|
|
2968
|
-
* Barva vyplněné části lišty.
|
|
2969
|
-
* @default '#E8612D'
|
|
2970
|
-
*/
|
|
2971
|
-
color?: string;
|
|
2972
|
-
/**
|
|
2973
|
-
* Zobrazí procentuální hodnotu vedle lišty.
|
|
2974
|
-
* @default false
|
|
2975
|
-
*/
|
|
2976
|
-
showValue?: boolean;
|
|
2977
|
-
/**
|
|
2978
|
-
* Volitelný popisek zobrazený nad lištou.
|
|
2979
|
-
*/
|
|
2980
|
-
label?: string;
|
|
2981
|
-
/**
|
|
2982
|
-
* Zobrazí pruhovaný vzor na vyplněné části.
|
|
2983
|
-
* @default false
|
|
2984
|
-
*/
|
|
3401
|
+
/** Pruhovaný vzor. @default false */
|
|
2985
3402
|
striped?: boolean;
|
|
2986
|
-
/**
|
|
2987
|
-
* Animuje pruhovaný vzor (vyžaduje `striped`).
|
|
2988
|
-
* @default false
|
|
2989
|
-
*/
|
|
3403
|
+
/** Animované pruhy. @default false */
|
|
2990
3404
|
animated?: boolean;
|
|
2991
|
-
/**
|
|
3405
|
+
/** Neznámý progress — animovaný shimmer. @default false */
|
|
3406
|
+
indeterminate?: boolean;
|
|
3407
|
+
/** Dodatečná CSS třída. */
|
|
2992
3408
|
className?: string;
|
|
2993
|
-
/** Další inline styly
|
|
3409
|
+
/** Další inline styly. */
|
|
2994
3410
|
style?: React.CSSProperties;
|
|
2995
3411
|
}
|
|
2996
3412
|
interface ProgressCircleProps {
|
|
2997
|
-
/**
|
|
2998
|
-
* Aktuální hodnota průběhu v rozsahu 0–100.
|
|
2999
|
-
*/
|
|
3413
|
+
/** Aktuální hodnota. */
|
|
3000
3414
|
value: number;
|
|
3001
|
-
/**
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3415
|
+
/** Maximální hodnota. @default 100 */
|
|
3416
|
+
max?: number;
|
|
3417
|
+
/** Barevný preset. @default 'default' */
|
|
3418
|
+
variant?: ProgressVariant;
|
|
3419
|
+
/** Auto-switch variant podle thresholds. */
|
|
3420
|
+
thresholds?: ProgressThreshold[];
|
|
3421
|
+
/** Diameter v px. @default 48 */
|
|
3005
3422
|
size?: number;
|
|
3006
|
-
/**
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
*/
|
|
3010
|
-
strokeWidth?: number;
|
|
3011
|
-
/**
|
|
3012
|
-
* Barva vyplněné části kruhu.
|
|
3013
|
-
* @default '#E8612D'
|
|
3014
|
-
*/
|
|
3015
|
-
color?: string;
|
|
3016
|
-
/**
|
|
3017
|
-
* Zobrazí procentuální hodnotu uprostřed kruhu.
|
|
3018
|
-
* @default false
|
|
3019
|
-
*/
|
|
3423
|
+
/** Tloušťka stroke. @default 4 */
|
|
3424
|
+
thickness?: number;
|
|
3425
|
+
/** Zobrazí "X%" uprostřed. @default false */
|
|
3020
3426
|
showValue?: boolean;
|
|
3021
|
-
/**
|
|
3022
|
-
|
|
3023
|
-
|
|
3427
|
+
/** Custom render obsahu uprostřed (override showValue). */
|
|
3428
|
+
valueLabel?: (value: number, max: number) => React.ReactNode;
|
|
3429
|
+
/** Volitelný popisek pod kruhem. */
|
|
3024
3430
|
label?: string;
|
|
3025
|
-
/** Dodatečná CSS třída
|
|
3431
|
+
/** Dodatečná CSS třída. */
|
|
3026
3432
|
className?: string;
|
|
3027
|
-
/** Další inline styly
|
|
3433
|
+
/** Další inline styly. */
|
|
3028
3434
|
style?: React.CSSProperties;
|
|
3029
3435
|
}
|
|
3030
3436
|
/**
|
|
3031
|
-
* Horizontální
|
|
3437
|
+
* Horizontální progress indikátor.
|
|
3032
3438
|
*
|
|
3033
|
-
* Podporuje
|
|
3034
|
-
* zobrazení procentuální hodnoty a popisek.
|
|
3439
|
+
* Podporuje varianty, thresholds, pruhy, indeterminate stav a a11y.
|
|
3035
3440
|
*
|
|
3036
3441
|
* @example
|
|
3037
3442
|
* ```tsx
|
|
3038
|
-
* <ProgressBar value={45}
|
|
3039
|
-
* <ProgressBar value={
|
|
3443
|
+
* <ProgressBar value={45} label />
|
|
3444
|
+
* <ProgressBar value={80} variant="success" size="md" striped animated />
|
|
3445
|
+
* <ProgressBar indeterminate />
|
|
3040
3446
|
* ```
|
|
3041
3447
|
*/
|
|
3042
3448
|
declare const ProgressBar: React.FC<ProgressBarProps>;
|
|
3043
3449
|
/**
|
|
3044
|
-
* Kruhový indikátor
|
|
3450
|
+
* Kruhový progress indikátor (SVG).
|
|
3045
3451
|
*
|
|
3046
|
-
*
|
|
3047
|
-
* `stroke-dasharray` / `stroke-dashoffset`. Volitelně zobrazí
|
|
3048
|
-
* procentuální hodnotu uprostřed a popisek pod kruhem.
|
|
3452
|
+
* Podporuje varianty, thresholds, custom obsah uprostřed a a11y.
|
|
3049
3453
|
*
|
|
3050
3454
|
* @example
|
|
3051
3455
|
* ```tsx
|
|
3052
3456
|
* <ProgressCircle value={75} showValue />
|
|
3053
|
-
* <ProgressCircle value={
|
|
3457
|
+
* <ProgressCircle value={45} max={60} variant="warning" valueLabel={(v, m) => `${v}/${m}`} />
|
|
3054
3458
|
* ```
|
|
3055
3459
|
*/
|
|
3056
3460
|
declare const ProgressCircle: React.FC<ProgressCircleProps>;
|
|
@@ -3418,6 +3822,92 @@ interface DragListProps {
|
|
|
3418
3822
|
*/
|
|
3419
3823
|
declare const DragList: React.FC<DragListProps>;
|
|
3420
3824
|
|
|
3825
|
+
interface SortableListProps<T> {
|
|
3826
|
+
/** Datové položky. */
|
|
3827
|
+
items: T[];
|
|
3828
|
+
/** Stable key pro React reconciliation + drag tracking. */
|
|
3829
|
+
keyExtractor: (item: T) => string | number;
|
|
3830
|
+
/** Render každé položky. dragHandle je DOM node co lze umístit kdekoli. */
|
|
3831
|
+
renderItem: (item: T, dragHandle: React.ReactNode) => React.ReactNode;
|
|
3832
|
+
/** Po dokončení dragu, nové pořadí celého arraye. */
|
|
3833
|
+
onReorder: (newOrder: T[]) => void;
|
|
3834
|
+
/** Osa řazení. @default 'vertical' */
|
|
3835
|
+
direction?: 'vertical' | 'horizontal';
|
|
3836
|
+
/** whole = drag celé položky; explicit = jen z handle node. @default 'whole' */
|
|
3837
|
+
handle?: 'whole' | 'explicit';
|
|
3838
|
+
/** Vypne drag. @default false */
|
|
3839
|
+
disabled?: boolean;
|
|
3840
|
+
/** Mezera mezi položkami. */
|
|
3841
|
+
gap?: number | string;
|
|
3842
|
+
/** Další inline styly. */
|
|
3843
|
+
style?: React.CSSProperties;
|
|
3844
|
+
/** Dodatečná CSS třída. */
|
|
3845
|
+
className?: string;
|
|
3846
|
+
}
|
|
3847
|
+
/**
|
|
3848
|
+
* Drag-to-reorder generic list.
|
|
3849
|
+
*
|
|
3850
|
+
* Podporuje myš i touch, klávesové ovládání (Tab → Space pick → arrows move → Space drop),
|
|
3851
|
+
* insertion line indikátor a explicit/whole handle mode.
|
|
3852
|
+
*
|
|
3853
|
+
* @example
|
|
3854
|
+
* ```tsx
|
|
3855
|
+
* <SortableList
|
|
3856
|
+
* items={priorities}
|
|
3857
|
+
* keyExtractor={(p) => p.id}
|
|
3858
|
+
* onReorder={savePriorities}
|
|
3859
|
+
* renderItem={(item, dragHandle) => (
|
|
3860
|
+
* <div style={{ display: 'flex', gap: 8 }}>
|
|
3861
|
+
* {dragHandle}
|
|
3862
|
+
* <span>{item.label}</span>
|
|
3863
|
+
* </div>
|
|
3864
|
+
* )}
|
|
3865
|
+
* handle="explicit"
|
|
3866
|
+
* />
|
|
3867
|
+
* ```
|
|
3868
|
+
*/
|
|
3869
|
+
declare function SortableList<T>({ items, keyExtractor, renderItem, onReorder, direction, handle, disabled, gap, style, className, }: SortableListProps<T>): react_jsx_runtime.JSX.Element;
|
|
3870
|
+
|
|
3871
|
+
interface SplitterProps {
|
|
3872
|
+
/** Směr rozdělení. horizontal = vertikální separátor. @default 'horizontal' */
|
|
3873
|
+
orientation?: 'horizontal' | 'vertical';
|
|
3874
|
+
/** Dva nebo více panelů. */
|
|
3875
|
+
children: React.ReactNode[];
|
|
3876
|
+
/** Iniciální velikosti v procentech. @default rovnoměrně */
|
|
3877
|
+
defaultSizes?: number[];
|
|
3878
|
+
/** Min velikost per panel v px. */
|
|
3879
|
+
minSizes?: number[];
|
|
3880
|
+
/** Max velikost per panel v px. */
|
|
3881
|
+
maxSizes?: number[];
|
|
3882
|
+
/** Callback s aktuálními velikostmi (px) během dragu. */
|
|
3883
|
+
onResize?: (sizes: number[]) => void;
|
|
3884
|
+
/** localStorage key — uloží + obnoví velikosti. */
|
|
3885
|
+
persistKey?: string;
|
|
3886
|
+
/** Šířka separátoru v px. @default 4 */
|
|
3887
|
+
dividerSize?: number;
|
|
3888
|
+
/** Vypne resize. @default false */
|
|
3889
|
+
disabled?: boolean;
|
|
3890
|
+
/** Další inline styly. */
|
|
3891
|
+
style?: React.CSSProperties;
|
|
3892
|
+
/** Dodatečná CSS třída. */
|
|
3893
|
+
className?: string;
|
|
3894
|
+
}
|
|
3895
|
+
/**
|
|
3896
|
+
* Draggable separator mezi panely.
|
|
3897
|
+
*
|
|
3898
|
+
* Podporuje horizontální i vertikální dělení, min/max constraints,
|
|
3899
|
+
* persist do localStorage a touch ovládání.
|
|
3900
|
+
*
|
|
3901
|
+
* @example
|
|
3902
|
+
* ```tsx
|
|
3903
|
+
* <Splitter defaultSizes={[30, 70]} minSizes={[200, 400]} persistKey="main-split">
|
|
3904
|
+
* <div>Sidebar</div>
|
|
3905
|
+
* <div>Content</div>
|
|
3906
|
+
* </Splitter>
|
|
3907
|
+
* ```
|
|
3908
|
+
*/
|
|
3909
|
+
declare const Splitter: React.FC<SplitterProps>;
|
|
3910
|
+
|
|
3421
3911
|
type Theme = 'light' | 'dark';
|
|
3422
3912
|
/**
|
|
3423
3913
|
* Zjistí aktuální téma aplikace.
|
|
@@ -3426,4 +3916,4 @@ type Theme = 'light' | 'dark';
|
|
|
3426
3916
|
*/
|
|
3427
3917
|
declare const useTheme: () => Theme;
|
|
3428
3918
|
|
|
3429
|
-
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, 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, 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 };
|
|
3919
|
+
export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, Alert, type AlertProps, type AlertVariant, AppSidebar, type AppSidebarProps, Avatar, type AvatarProps, type AvatarSize, AvatarStack, type AvatarStackProps, 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 EmptyStatePreset, type EmptyStateProps, FileUpload, type FileUploadProps, FormField, type FormFieldProps, FormWizard, type FormWizardProps, type FormWizardStep, IconButton, type IconButtonProps, 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, type ProgressThreshold, type ProgressVariant, 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, SortableList, type SortableListProps, Spinner, type SpinnerProps, type SpinnerSize, Splitter, type SplitterProps, 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 };
|