@smworks-cz/ui-kit 1.5.1 → 1.6.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 +417 -10
- package/dist/index.d.ts +417 -10
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
|
|
4
|
-
type ButtonVariant = 'primary' | 'secondary' | 'outline' | 'danger';
|
|
4
|
+
type ButtonVariant = 'primary' | 'secondary' | 'outline' | 'danger' | 'danger-outline';
|
|
5
5
|
type ButtonSize = 'sm' | 'md' | 'lg';
|
|
6
6
|
type ButtonIconPosition = 'left' | 'right';
|
|
7
7
|
/** Sdílené props pro režim `<button>` i `<a>`. */
|
|
@@ -12,6 +12,7 @@ interface ButtonBaseProps {
|
|
|
12
12
|
* - `secondary` — průhledné, bez okraje
|
|
13
13
|
* - `outline` — průhledné s bílým okrajem
|
|
14
14
|
* - `danger` — červené vyplnění (#EF3838)
|
|
15
|
+
* - `danger-outline` — průhledné s červeným okrajem a červeným textem
|
|
15
16
|
* @default 'primary'
|
|
16
17
|
*/
|
|
17
18
|
variant?: ButtonVariant;
|
|
@@ -311,6 +312,11 @@ interface NumberInputProps {
|
|
|
311
312
|
* @default 'default'
|
|
312
313
|
*/
|
|
313
314
|
variant?: NumberInputVariant;
|
|
315
|
+
/**
|
|
316
|
+
* Roztáhne pole na celou šířku kontejneru.
|
|
317
|
+
* @default false
|
|
318
|
+
*/
|
|
319
|
+
fullWidth?: boolean;
|
|
314
320
|
/** Text zobrazený před hodnotou (např. měna). */
|
|
315
321
|
prefix?: string;
|
|
316
322
|
/** Text zobrazený za hodnotou (např. jednotka). */
|
|
@@ -398,6 +404,8 @@ interface SelectProps {
|
|
|
398
404
|
* Stylizován velkými písmeny dle SM-UI design systému.
|
|
399
405
|
*/
|
|
400
406
|
label?: string;
|
|
407
|
+
/** Označí select jako povinný (hvězdička u popisku, stejně jako `Input`). */
|
|
408
|
+
required?: boolean;
|
|
401
409
|
/** Zástupný text zobrazený při prázdném výběru. */
|
|
402
410
|
placeholder?: string;
|
|
403
411
|
/** Maximální výška (px) rozbalovacího seznamu před scrollováním. @default 240 */
|
|
@@ -410,6 +418,8 @@ interface SelectProps {
|
|
|
410
418
|
interface SelectGroupProps {
|
|
411
419
|
/** Text popisku nad selectem, velkými písmeny dle SM-UI design systému. */
|
|
412
420
|
label: string;
|
|
421
|
+
/** Označí skupinu jako povinnou (hvězdička u popisku). */
|
|
422
|
+
required?: boolean;
|
|
413
423
|
/** `htmlFor` propojující `<label>` se selectem. Automaticky generováno, pokud chybí. */
|
|
414
424
|
htmlFor?: string;
|
|
415
425
|
/** Select element(y) vykreslené uvnitř skupiny. */
|
|
@@ -588,6 +598,18 @@ interface DatePickerProps {
|
|
|
588
598
|
* @default false
|
|
589
599
|
*/
|
|
590
600
|
showTime?: boolean;
|
|
601
|
+
/**
|
|
602
|
+
* Řízené otevření kalendářového popoveru. Pokud je zadáno, komponenta je
|
|
603
|
+
* "controlled" — stav otevření řídí rodič a reaguje na `onOpenChange`.
|
|
604
|
+
*/
|
|
605
|
+
open?: boolean;
|
|
606
|
+
/**
|
|
607
|
+
* Výchozí stav otevření pro neřízené (uncontrolled) použití.
|
|
608
|
+
* @default false
|
|
609
|
+
*/
|
|
610
|
+
defaultOpen?: boolean;
|
|
611
|
+
/** Voláno při požadavku na otevření / zavření popoveru (`true` = otevřít). */
|
|
612
|
+
onOpenChange?: (open: boolean) => void;
|
|
591
613
|
/**
|
|
592
614
|
* Aktuální hodnota.
|
|
593
615
|
* - `single` režim: `Date | null`
|
|
@@ -2015,8 +2037,14 @@ interface AvatarProps {
|
|
|
2015
2037
|
/**
|
|
2016
2038
|
* Iniciály zobrazené uvnitř avataru (např. `"DC"`, `"JN"`).
|
|
2017
2039
|
* Automaticky převedeny na velká písmena.
|
|
2040
|
+
* Použijí se i jako fallback, když `src` chybí nebo se obrázek nenačte.
|
|
2018
2041
|
*/
|
|
2019
2042
|
initials: string;
|
|
2043
|
+
/**
|
|
2044
|
+
* URL obrázku. Pokud je zadán a načte se, vykreslí se místo iniciál.
|
|
2045
|
+
* Při chybě načtení (`onError`) avatar automaticky spadne zpět na iniciály.
|
|
2046
|
+
*/
|
|
2047
|
+
src?: string;
|
|
2020
2048
|
/**
|
|
2021
2049
|
* Velikost avataru.
|
|
2022
2050
|
* - `'2xs'` — 16 px
|
|
@@ -2045,17 +2073,21 @@ interface AvatarProps {
|
|
|
2045
2073
|
className?: string;
|
|
2046
2074
|
}
|
|
2047
2075
|
/**
|
|
2048
|
-
* Kruhový / čtvercový avatar
|
|
2049
|
-
* na oranžovém gradientním pozadí.
|
|
2076
|
+
* Kruhový / čtvercový avatar. Zobrazuje obrázek (`src`), nebo iniciály uživatele
|
|
2077
|
+
* na oranžovém gradientním pozadí. Při selhání načtení obrázku automaticky
|
|
2078
|
+
* spadne zpět na iniciály.
|
|
2079
|
+
*
|
|
2080
|
+
* Předává `ref` na kořenový element, takže ho lze přímo použít jako trigger
|
|
2081
|
+
* pro `Tooltip` / `Popover` bez obalování do `<span>`.
|
|
2050
2082
|
*
|
|
2051
2083
|
* @example
|
|
2052
2084
|
* ```tsx
|
|
2053
2085
|
* <Avatar initials="DC" />
|
|
2054
|
-
* <Avatar initials="JN" size="lg" />
|
|
2086
|
+
* <Avatar initials="JN" size="lg" src="/uploads/jana.jpg" />
|
|
2055
2087
|
* <Avatar initials="AB" size={56} borderRadius="50%" />
|
|
2056
2088
|
* ```
|
|
2057
2089
|
*/
|
|
2058
|
-
declare const Avatar: React.
|
|
2090
|
+
declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLDivElement>>;
|
|
2059
2091
|
|
|
2060
2092
|
interface AvatarStackProps {
|
|
2061
2093
|
/** Avatar elementy. Každý dostane forced consistent size a circular shape. */
|
|
@@ -2108,12 +2140,25 @@ interface TagProps {
|
|
|
2108
2140
|
/** Dodatečná CSS třída pro kořenový element. */
|
|
2109
2141
|
className?: string;
|
|
2110
2142
|
}
|
|
2143
|
+
type BadgeVariant = 'default' | 'success' | 'info' | 'warning' | 'danger';
|
|
2111
2144
|
interface BadgeProps {
|
|
2112
2145
|
/**
|
|
2113
2146
|
* Text zobrazený uvnitř badge.
|
|
2114
2147
|
* Automaticky převeden na velká písmena dle SM-UI design systému.
|
|
2115
2148
|
*/
|
|
2116
2149
|
label: string;
|
|
2150
|
+
/**
|
|
2151
|
+
* Sémantická barevná varianta.
|
|
2152
|
+
* - `'default'` — oranžová (brand), výchozí
|
|
2153
|
+
* - `'success'` — zelená (#00A205)
|
|
2154
|
+
* - `'info'` — modrá
|
|
2155
|
+
* - `'warning'` — žlutá / amber
|
|
2156
|
+
* - `'danger'` — červená (#EF3838)
|
|
2157
|
+
* @default 'default'
|
|
2158
|
+
*/
|
|
2159
|
+
variant?: BadgeVariant;
|
|
2160
|
+
/** Vlastní barva pozadí — přepíše `variant`. */
|
|
2161
|
+
color?: string;
|
|
2117
2162
|
/** Další inline styly pro kořenový element. */
|
|
2118
2163
|
style?: React.CSSProperties;
|
|
2119
2164
|
/** Dodatečná CSS třída pro kořenový element. */
|
|
@@ -2162,13 +2207,17 @@ interface TagItemProps {
|
|
|
2162
2207
|
*/
|
|
2163
2208
|
declare const Tag: React.FC<TagProps>;
|
|
2164
2209
|
/**
|
|
2165
|
-
* Malý stavový badge vykreslený jako
|
|
2210
|
+
* Malý stavový badge vykreslený jako barevná pilulka.
|
|
2166
2211
|
* Text je automaticky převeden na velká písmena.
|
|
2167
2212
|
*
|
|
2213
|
+
* Bez `variant` je oranžový (brand). Sémantické varianty nesou stavovou barvu.
|
|
2214
|
+
*
|
|
2168
2215
|
* @example
|
|
2169
2216
|
* ```tsx
|
|
2170
2217
|
* <Badge label="Novinka" />
|
|
2171
|
-
* <Badge label="
|
|
2218
|
+
* <Badge label="Schváleno" variant="success" />
|
|
2219
|
+
* <Badge label="Zamítnuto" variant="danger" />
|
|
2220
|
+
* <Badge label="Vlastní" color="#9C27B0" />
|
|
2172
2221
|
* ```
|
|
2173
2222
|
*/
|
|
2174
2223
|
declare const Badge: React.FC<BadgeProps>;
|
|
@@ -2426,6 +2475,295 @@ interface StatusBadgeProps {
|
|
|
2426
2475
|
*/
|
|
2427
2476
|
declare const StatusBadge: React.FC<StatusBadgeProps>;
|
|
2428
2477
|
|
|
2478
|
+
/** Default series palette — brand orange first, then a distinct categorical set. */
|
|
2479
|
+
declare const CHART_PALETTE: readonly ["#FC4F00", "#2D7FF9", "#00A205", "#F5A623", "#9C27B0", "#00B8D9", "#EF3838", "#7C4DFF"];
|
|
2480
|
+
interface ChartSeries {
|
|
2481
|
+
/** Series name shown in legend / tooltip. */
|
|
2482
|
+
name: string;
|
|
2483
|
+
/** Values aligned 1:1 with `categories`. */
|
|
2484
|
+
data: number[];
|
|
2485
|
+
/** Series color. Defaults to the palette by position. */
|
|
2486
|
+
color?: string;
|
|
2487
|
+
}
|
|
2488
|
+
interface PieDatum {
|
|
2489
|
+
/** Slice label. */
|
|
2490
|
+
label: string;
|
|
2491
|
+
/** Slice value (must be >= 0). */
|
|
2492
|
+
value: number;
|
|
2493
|
+
/** Slice color. Defaults to the palette by position. */
|
|
2494
|
+
color?: string;
|
|
2495
|
+
}
|
|
2496
|
+
type LegendPosition = 'top' | 'bottom' | 'none';
|
|
2497
|
+
|
|
2498
|
+
interface LineChartProps {
|
|
2499
|
+
/** One or more data series, each aligned to `categories`. */
|
|
2500
|
+
series: ChartSeries[];
|
|
2501
|
+
/** X-axis category labels. */
|
|
2502
|
+
categories: string[];
|
|
2503
|
+
/** Chart height in px. @default 260 */
|
|
2504
|
+
height?: number;
|
|
2505
|
+
/** Explicit width in px. When omitted the chart fills its container (responsive). */
|
|
2506
|
+
width?: number;
|
|
2507
|
+
/** Fill the area under each line. @default false (AreaChart sets true) */
|
|
2508
|
+
area?: boolean;
|
|
2509
|
+
/** Line interpolation. @default 'smooth' */
|
|
2510
|
+
curve?: 'smooth' | 'linear';
|
|
2511
|
+
/** Show horizontal grid lines. @default true */
|
|
2512
|
+
showGrid?: boolean;
|
|
2513
|
+
/** Show the x-axis labels. @default true */
|
|
2514
|
+
showXAxis?: boolean;
|
|
2515
|
+
/** Show the y-axis labels. @default true */
|
|
2516
|
+
showYAxis?: boolean;
|
|
2517
|
+
/** Show point markers. @default true */
|
|
2518
|
+
showDots?: boolean;
|
|
2519
|
+
/** Show hover tooltip. @default true */
|
|
2520
|
+
showTooltip?: boolean;
|
|
2521
|
+
/** Legend position. @default 'top' for >1 series, jinak 'none' */
|
|
2522
|
+
legend?: LegendPosition;
|
|
2523
|
+
/** Fixed y domain `[min, max]`. Defaults to a "nice" auto range including 0. */
|
|
2524
|
+
yDomain?: [number, number];
|
|
2525
|
+
/** Approximate number of y-axis ticks. @default 5 */
|
|
2526
|
+
yTickCount?: number;
|
|
2527
|
+
/** Line thickness in px. @default 2 */
|
|
2528
|
+
strokeWidth?: number;
|
|
2529
|
+
/** Area fill opacity. @default 0.15 */
|
|
2530
|
+
fillOpacity?: number;
|
|
2531
|
+
/** Animate the draw-in on mount. @default true */
|
|
2532
|
+
animate?: boolean;
|
|
2533
|
+
/** Format y values / tooltip numbers. @default toLocaleString */
|
|
2534
|
+
valueFormat?: (value: number) => string;
|
|
2535
|
+
/** Plot margins (px). */
|
|
2536
|
+
margin?: {
|
|
2537
|
+
top?: number;
|
|
2538
|
+
right?: number;
|
|
2539
|
+
bottom?: number;
|
|
2540
|
+
left?: number;
|
|
2541
|
+
};
|
|
2542
|
+
/** Called when a point is clicked. */
|
|
2543
|
+
onPointClick?: (info: {
|
|
2544
|
+
category: string;
|
|
2545
|
+
categoryIndex: number;
|
|
2546
|
+
series: string;
|
|
2547
|
+
value: number;
|
|
2548
|
+
}) => void;
|
|
2549
|
+
/** Accessible label for the chart. */
|
|
2550
|
+
ariaLabel?: string;
|
|
2551
|
+
/** Další inline styly pro obal. */
|
|
2552
|
+
style?: React.CSSProperties;
|
|
2553
|
+
/** Dodatečná CSS třída pro obal. */
|
|
2554
|
+
className?: string;
|
|
2555
|
+
}
|
|
2556
|
+
/**
|
|
2557
|
+
* Čárový graf (SVG, bez závislostí) dle SM-UI design systému.
|
|
2558
|
+
*
|
|
2559
|
+
* Více sérií, hladká / linear křivka, mřížka, osy, hover tooltip s crosshairem,
|
|
2560
|
+
* legenda, draw-in animace a tmavý / světlý režim.
|
|
2561
|
+
*
|
|
2562
|
+
* @example
|
|
2563
|
+
* ```tsx
|
|
2564
|
+
* <LineChart
|
|
2565
|
+
* categories={['Po', 'Út', 'St', 'Čt', 'Pá']}
|
|
2566
|
+
* series={[{ name: 'Návštěvy', data: [120, 200, 150, 80, 170] }]}
|
|
2567
|
+
* />
|
|
2568
|
+
* ```
|
|
2569
|
+
*/
|
|
2570
|
+
declare const LineChart: React.FC<LineChartProps>;
|
|
2571
|
+
/**
|
|
2572
|
+
* Plošný graf — `LineChart` s výplní pod čarou.
|
|
2573
|
+
*
|
|
2574
|
+
* @example
|
|
2575
|
+
* ```tsx
|
|
2576
|
+
* <AreaChart categories={mesice} series={[{ name: 'Tržby', data: trzby }]} />
|
|
2577
|
+
* ```
|
|
2578
|
+
*/
|
|
2579
|
+
declare const AreaChart: React.FC<LineChartProps>;
|
|
2580
|
+
|
|
2581
|
+
interface BarChartProps {
|
|
2582
|
+
/** One or more data series, each aligned to `categories`. */
|
|
2583
|
+
series: ChartSeries[];
|
|
2584
|
+
/** Category labels. */
|
|
2585
|
+
categories: string[];
|
|
2586
|
+
/** Chart height in px. @default 260 */
|
|
2587
|
+
height?: number;
|
|
2588
|
+
/** Explicit width in px. When omitted the chart fills its container (responsive). */
|
|
2589
|
+
width?: number;
|
|
2590
|
+
/** Bar direction. @default 'vertical' */
|
|
2591
|
+
orientation?: 'vertical' | 'horizontal';
|
|
2592
|
+
/** Stack series instead of grouping them side by side. @default false */
|
|
2593
|
+
stacked?: boolean;
|
|
2594
|
+
/** Show grid lines on the value axis. @default true */
|
|
2595
|
+
showGrid?: boolean;
|
|
2596
|
+
/** Show category-axis labels. @default true */
|
|
2597
|
+
showCategoryAxis?: boolean;
|
|
2598
|
+
/** Show value-axis labels. @default true */
|
|
2599
|
+
showValueAxis?: boolean;
|
|
2600
|
+
/** Show hover tooltip. @default true */
|
|
2601
|
+
showTooltip?: boolean;
|
|
2602
|
+
/** Print the value on top of each bar. @default false */
|
|
2603
|
+
showValues?: boolean;
|
|
2604
|
+
/** Legend position. @default 'top' for >1 series, jinak 'none' */
|
|
2605
|
+
legend?: LegendPosition;
|
|
2606
|
+
/** Fixed value domain `[min, max]`. Defaults to a "nice" auto range including 0. */
|
|
2607
|
+
valueDomain?: [number, number];
|
|
2608
|
+
/** Approximate number of value-axis ticks. @default 5 */
|
|
2609
|
+
valueTickCount?: number;
|
|
2610
|
+
/** Corner radius of bars. @default 4 */
|
|
2611
|
+
barRadius?: number;
|
|
2612
|
+
/** Max thickness of a single bar (group) in px. */
|
|
2613
|
+
maxBarSize?: number;
|
|
2614
|
+
/** Animate the grow-in on mount. @default true */
|
|
2615
|
+
animate?: boolean;
|
|
2616
|
+
/** Format value-axis / tooltip numbers. @default toLocaleString */
|
|
2617
|
+
valueFormat?: (value: number) => string;
|
|
2618
|
+
/** Plot margins (px). */
|
|
2619
|
+
margin?: {
|
|
2620
|
+
top?: number;
|
|
2621
|
+
right?: number;
|
|
2622
|
+
bottom?: number;
|
|
2623
|
+
left?: number;
|
|
2624
|
+
};
|
|
2625
|
+
/** Called when a bar is clicked. */
|
|
2626
|
+
onBarClick?: (info: {
|
|
2627
|
+
category: string;
|
|
2628
|
+
categoryIndex: number;
|
|
2629
|
+
series: string;
|
|
2630
|
+
value: number;
|
|
2631
|
+
}) => void;
|
|
2632
|
+
/** Accessible label for the chart. */
|
|
2633
|
+
ariaLabel?: string;
|
|
2634
|
+
/** Další inline styly pro obal. */
|
|
2635
|
+
style?: React.CSSProperties;
|
|
2636
|
+
/** Dodatečná CSS třída pro obal. */
|
|
2637
|
+
className?: string;
|
|
2638
|
+
}
|
|
2639
|
+
/**
|
|
2640
|
+
* Sloupcový graf (SVG, bez závislostí) dle SM-UI design systému.
|
|
2641
|
+
*
|
|
2642
|
+
* Vertikální i horizontální orientace, seskupené (grouped) i skládané (stacked)
|
|
2643
|
+
* série, mřížka, osy, hover tooltip, legenda, grow-in animace a tmavý / světlý režim.
|
|
2644
|
+
*
|
|
2645
|
+
* @example
|
|
2646
|
+
* ```tsx
|
|
2647
|
+
* <BarChart
|
|
2648
|
+
* categories={['Q1', 'Q2', 'Q3', 'Q4']}
|
|
2649
|
+
* series={[{ name: 'Tržby', data: [120, 200, 150, 280] }]}
|
|
2650
|
+
* />
|
|
2651
|
+
*
|
|
2652
|
+
* <BarChart
|
|
2653
|
+
* stacked
|
|
2654
|
+
* categories={['Po', 'Út', 'St']}
|
|
2655
|
+
* series={[{ name: 'Web', data: [10, 20, 15] }, { name: 'App', data: [5, 8, 12] }]}
|
|
2656
|
+
* />
|
|
2657
|
+
* ```
|
|
2658
|
+
*/
|
|
2659
|
+
declare const BarChart: React.FC<BarChartProps>;
|
|
2660
|
+
|
|
2661
|
+
interface PieChartProps {
|
|
2662
|
+
/** Slices to render (values must be >= 0). */
|
|
2663
|
+
data: PieDatum[];
|
|
2664
|
+
/** Diameter of the pie in px. @default 220 */
|
|
2665
|
+
size?: number;
|
|
2666
|
+
/** Inner radius as a fraction of the outer radius (0 = pie, >0 = donut). @default 0 */
|
|
2667
|
+
innerRatio?: number;
|
|
2668
|
+
/** Legend position. @default 'right' */
|
|
2669
|
+
legend?: 'right' | 'bottom' | 'none';
|
|
2670
|
+
/** Render the percentage on each slice. @default false */
|
|
2671
|
+
showLabels?: boolean;
|
|
2672
|
+
/** Show hover tooltip. @default true */
|
|
2673
|
+
showTooltip?: boolean;
|
|
2674
|
+
/** Gap between slices in degrees. @default 0 */
|
|
2675
|
+
padAngle?: number;
|
|
2676
|
+
/** Custom content rendered in the donut center (only meaningful when innerRatio > 0). */
|
|
2677
|
+
centerLabel?: React.ReactNode;
|
|
2678
|
+
/** Animate the draw-in on mount. @default true */
|
|
2679
|
+
animate?: boolean;
|
|
2680
|
+
/** Format tooltip / label numbers. @default toLocaleString */
|
|
2681
|
+
valueFormat?: (value: number) => string;
|
|
2682
|
+
/** Called when a slice is clicked. */
|
|
2683
|
+
onSliceClick?: (info: {
|
|
2684
|
+
label: string;
|
|
2685
|
+
value: number;
|
|
2686
|
+
index: number;
|
|
2687
|
+
percent: number;
|
|
2688
|
+
}) => void;
|
|
2689
|
+
/** Accessible label for the chart. */
|
|
2690
|
+
ariaLabel?: string;
|
|
2691
|
+
/** Další inline styly pro obal. */
|
|
2692
|
+
style?: React.CSSProperties;
|
|
2693
|
+
/** Dodatečná CSS třída pro obal. */
|
|
2694
|
+
className?: string;
|
|
2695
|
+
}
|
|
2696
|
+
/**
|
|
2697
|
+
* Koláčový graf (SVG, bez závislostí) dle SM-UI design systému.
|
|
2698
|
+
*
|
|
2699
|
+
* Hover zvýraznění s vysunutím výseče, volitelné popisky s procenty, legenda,
|
|
2700
|
+
* draw-in animace a tmavý / světlý režim.
|
|
2701
|
+
*
|
|
2702
|
+
* @example
|
|
2703
|
+
* ```tsx
|
|
2704
|
+
* <PieChart data={[
|
|
2705
|
+
* { label: 'Chrome', value: 64 },
|
|
2706
|
+
* { label: 'Safari', value: 19 },
|
|
2707
|
+
* { label: 'Firefox', value: 9 },
|
|
2708
|
+
* ]} />
|
|
2709
|
+
* ```
|
|
2710
|
+
*/
|
|
2711
|
+
declare const PieChart: React.FC<PieChartProps>;
|
|
2712
|
+
/**
|
|
2713
|
+
* Prstencový graf — `PieChart` s dírou uprostřed (a volitelným `centerLabel`).
|
|
2714
|
+
*
|
|
2715
|
+
* @example
|
|
2716
|
+
* ```tsx
|
|
2717
|
+
* <DonutChart
|
|
2718
|
+
* data={browsers}
|
|
2719
|
+
* centerLabel={<strong style={{ fontSize: 22 }}>92%</strong>}
|
|
2720
|
+
* />
|
|
2721
|
+
* ```
|
|
2722
|
+
*/
|
|
2723
|
+
declare const DonutChart: React.FC<PieChartProps>;
|
|
2724
|
+
|
|
2725
|
+
interface SparklineProps {
|
|
2726
|
+
/** Data points. */
|
|
2727
|
+
data: number[];
|
|
2728
|
+
/** Width in px. @default 100 */
|
|
2729
|
+
width?: number;
|
|
2730
|
+
/** Height in px. @default 32 */
|
|
2731
|
+
height?: number;
|
|
2732
|
+
/** Visual type. @default 'line' */
|
|
2733
|
+
type?: 'line' | 'area' | 'bar';
|
|
2734
|
+
/** Line / bar / fill color. @default brand orange */
|
|
2735
|
+
color?: string;
|
|
2736
|
+
/** Line interpolation (line/area). @default 'smooth' */
|
|
2737
|
+
curve?: 'smooth' | 'linear';
|
|
2738
|
+
/** Line thickness. @default 1.5 */
|
|
2739
|
+
strokeWidth?: number;
|
|
2740
|
+
/** Area fill opacity. @default 0.18 */
|
|
2741
|
+
fillOpacity?: number;
|
|
2742
|
+
/** Highlight the last point with a dot. @default false */
|
|
2743
|
+
showLastDot?: boolean;
|
|
2744
|
+
/** Animate the draw-in on mount. @default true */
|
|
2745
|
+
animate?: boolean;
|
|
2746
|
+
/** Accessible label. */
|
|
2747
|
+
ariaLabel?: string;
|
|
2748
|
+
/** Další inline styly. */
|
|
2749
|
+
style?: React.CSSProperties;
|
|
2750
|
+
/** Dodatečná CSS třída. */
|
|
2751
|
+
className?: string;
|
|
2752
|
+
}
|
|
2753
|
+
/**
|
|
2754
|
+
* Mini graf bez os a popisků — pro vložení do `Stat` karet, tabulek a řádků.
|
|
2755
|
+
*
|
|
2756
|
+
* Měřítko se přizpůsobuje datům (ne nutně od nuly).
|
|
2757
|
+
*
|
|
2758
|
+
* @example
|
|
2759
|
+
* ```tsx
|
|
2760
|
+
* <Sparkline data={[3, 7, 4, 9, 6, 11, 8]} />
|
|
2761
|
+
* <Sparkline type="area" color="#00A205" data={trend} showLastDot />
|
|
2762
|
+
* <Sparkline type="bar" data={[4, 8, 6, 10, 7]} />
|
|
2763
|
+
* ```
|
|
2764
|
+
*/
|
|
2765
|
+
declare const Sparkline: React.FC<SparklineProps>;
|
|
2766
|
+
|
|
2429
2767
|
interface ModalProps {
|
|
2430
2768
|
/** Řídí zobrazení modálního okna. */
|
|
2431
2769
|
open: boolean;
|
|
@@ -2439,13 +2777,24 @@ interface ModalProps {
|
|
|
2439
2777
|
children: React.ReactNode;
|
|
2440
2778
|
/** Obsah patičky modálu (tlačítka apod.). */
|
|
2441
2779
|
footer?: React.ReactNode;
|
|
2442
|
-
/** Velikostní preset modálu. @default 'md' */
|
|
2443
|
-
size?: 'sm' | 'md' | 'lg' | 'fullscreen';
|
|
2780
|
+
/** Velikostní preset modálu. `xl` je velký, ale ne fullscreen (1080px / 90vh). @default 'md' */
|
|
2781
|
+
size?: 'sm' | 'md' | 'lg' | 'xl' | 'fullscreen';
|
|
2444
2782
|
/**
|
|
2445
2783
|
* Explicitní šířka modálu. Přepíše `size`.
|
|
2446
2784
|
* Přijímá číslo (px) nebo CSS string (např. '90vw').
|
|
2447
2785
|
*/
|
|
2448
2786
|
width?: number | string;
|
|
2787
|
+
/**
|
|
2788
|
+
* Maximální výška karty. Přepíše výšku danou `size`.
|
|
2789
|
+
* Obsah nad tuto výšku scrolluje v těle modálu. Číslo = px, nebo CSS string ('90vh').
|
|
2790
|
+
*/
|
|
2791
|
+
maxHeight?: number | string;
|
|
2792
|
+
/**
|
|
2793
|
+
* z-index kořenového overlay kontejneru.
|
|
2794
|
+
* Výchozí hodnota čerpá z CSS proměnné `--sm-ui-z-overlay` (fallback 99998),
|
|
2795
|
+
* takže lze vrstvení řídit globálně. Tento prop ji přepíše pro jednu instanci.
|
|
2796
|
+
*/
|
|
2797
|
+
zIndex?: number;
|
|
2449
2798
|
/** Zavře modál kliknutím na překryvnou vrstvu. @default true */
|
|
2450
2799
|
closeOnOverlay?: boolean;
|
|
2451
2800
|
/** Zavře modál stisknutím klávesy Escape. @default true */
|
|
@@ -2504,6 +2853,22 @@ interface DrawerProps {
|
|
|
2504
2853
|
className?: string;
|
|
2505
2854
|
/** Další inline styly pro panel šuplíku. */
|
|
2506
2855
|
style?: React.CSSProperties;
|
|
2856
|
+
/** Vlastní inline styly pro tělo (scrollovací oblast). */
|
|
2857
|
+
bodyStyle?: React.CSSProperties;
|
|
2858
|
+
/** Dodatečná CSS třída pro tělo (scrollovací oblast). */
|
|
2859
|
+
bodyClassName?: string;
|
|
2860
|
+
/**
|
|
2861
|
+
* Vypne výchozí vnitřní padding těla (`20px 24px`).
|
|
2862
|
+
* Vhodné pro panely s vlastním layoutem (např. navigace edge-to-edge).
|
|
2863
|
+
* @default false
|
|
2864
|
+
*/
|
|
2865
|
+
disableBodyPadding?: boolean;
|
|
2866
|
+
/**
|
|
2867
|
+
* z-index kořenového overlay kontejneru.
|
|
2868
|
+
* Výchozí hodnota čerpá z CSS proměnné `--sm-ui-z-overlay` (fallback 99998),
|
|
2869
|
+
* takže lze vrstvení řídit globálně. Tento prop ji přepíše pro jednu instanci.
|
|
2870
|
+
*/
|
|
2871
|
+
zIndex?: number;
|
|
2507
2872
|
}
|
|
2508
2873
|
/**
|
|
2509
2874
|
* Vysuvný panel (Drawer) dle SM-UI design systému.
|
|
@@ -3543,6 +3908,48 @@ interface ConfirmDialogProps {
|
|
|
3543
3908
|
* ```
|
|
3544
3909
|
*/
|
|
3545
3910
|
declare const ConfirmDialog: React.FC<ConfirmDialogProps>;
|
|
3911
|
+
/** Nastavení předaná do imperativního `confirm()`. */
|
|
3912
|
+
interface ConfirmOptions {
|
|
3913
|
+
/** Titulek dialogu. */
|
|
3914
|
+
title: string;
|
|
3915
|
+
/** Volitelný popis akce. */
|
|
3916
|
+
description?: string;
|
|
3917
|
+
/** Text potvrzovacího tlačítka. @default 'Potvrdit' */
|
|
3918
|
+
confirmLabel?: string;
|
|
3919
|
+
/** Text zrušovacího tlačítka. @default 'Zrušit' */
|
|
3920
|
+
cancelLabel?: string;
|
|
3921
|
+
/** Varianta dialogu – 'danger' zvýrazní potvrzovací tlačítko červeně. @default 'default' */
|
|
3922
|
+
variant?: 'default' | 'danger';
|
|
3923
|
+
}
|
|
3924
|
+
/**
|
|
3925
|
+
* Poskytuje imperativní `confirm()` přes hook `useConfirm()`.
|
|
3926
|
+
* Vykresluje jeden sdílený `ConfirmDialog`. Umístěte **jednou** blízko kořene
|
|
3927
|
+
* aplikace (typicky vedle `ToasterProvider`).
|
|
3928
|
+
*
|
|
3929
|
+
* @example
|
|
3930
|
+
* ```tsx
|
|
3931
|
+
* <ConfirmProvider>
|
|
3932
|
+
* <App />
|
|
3933
|
+
* </ConfirmProvider>
|
|
3934
|
+
* ```
|
|
3935
|
+
*/
|
|
3936
|
+
declare const ConfirmProvider: React.FC<{
|
|
3937
|
+
children: React.ReactNode;
|
|
3938
|
+
}>;
|
|
3939
|
+
/**
|
|
3940
|
+
* Vrací funkci `confirm(options): Promise<boolean>` pro imperativní potvrzení.
|
|
3941
|
+
* Musí být volán uvnitř stromu `<ConfirmProvider>`.
|
|
3942
|
+
*
|
|
3943
|
+
* @throws Při volání mimo `<ConfirmProvider>`.
|
|
3944
|
+
*
|
|
3945
|
+
* @example
|
|
3946
|
+
* ```tsx
|
|
3947
|
+
* const confirm = useConfirm();
|
|
3948
|
+
* const ok = await confirm({ title: 'Smazat položku?', variant: 'danger' });
|
|
3949
|
+
* if (ok) await deleteItem();
|
|
3950
|
+
* ```
|
|
3951
|
+
*/
|
|
3952
|
+
declare const useConfirm: () => ((options: ConfirmOptions) => Promise<boolean>);
|
|
3546
3953
|
|
|
3547
3954
|
interface CopyButtonProps {
|
|
3548
3955
|
/** Text ke zkopírování do schránky. */
|
|
@@ -3916,4 +4323,4 @@ type Theme = 'light' | 'dark';
|
|
|
3916
4323
|
*/
|
|
3917
4324
|
declare const useTheme: () => Theme;
|
|
3918
4325
|
|
|
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 };
|
|
4326
|
+
export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, Alert, type AlertProps, type AlertVariant, AppSidebar, type AppSidebarProps, AreaChart, Avatar, type AvatarProps, type AvatarSize, AvatarStack, type AvatarStackProps, Badge, type BadgeProps, type BadgeVariant, Banner, type BannerPosition, type BannerProps, type BannerVariant, BarChart, type BarChartProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, type ButtonAsAnchorProps, type ButtonAsButtonProps, type ButtonIconPosition, type ButtonProps, type ButtonSize, type ButtonVariant, CHART_PALETTE, Calendar, type CalendarEvent, type CalendarProps, Card, type CardProps, type ChartSeries, 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, type ConfirmOptions, ConfirmProvider, 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, DonutChart, 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, type LegendPosition, LineChart, type LineChartProps, 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, PieChart, type PieChartProps, type PieDatum, 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, Sparkline, type SparklineProps, 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, useConfirm, useTheme, useToast };
|