@parto-system-design/ui 1.1.5 → 1.1.8
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/AGENTS.md +233 -0
- package/LICENSE +21 -0
- package/README.md +96 -43
- package/dist/chunk-2ACKKPWA.cjs +112 -0
- package/dist/chunk-2ACKKPWA.cjs.map +1 -0
- package/dist/chunk-2UD3LGVX.cjs +316 -0
- package/dist/chunk-2UD3LGVX.cjs.map +1 -0
- package/dist/chunk-3QYYPPFJ.js +269 -0
- package/dist/chunk-3QYYPPFJ.js.map +1 -0
- package/dist/chunk-4SVQNEVH.js +173 -0
- package/dist/chunk-4SVQNEVH.js.map +1 -0
- package/dist/chunk-4WONHORR.cjs +152 -0
- package/dist/chunk-4WONHORR.cjs.map +1 -0
- package/dist/chunk-5HCXH6GS.js +409 -0
- package/dist/chunk-5HCXH6GS.js.map +1 -0
- package/dist/chunk-5JJSRGJD.js +31 -0
- package/dist/chunk-5JJSRGJD.js.map +1 -0
- package/dist/chunk-5K6E4ZSW.cjs +77 -0
- package/dist/chunk-5K6E4ZSW.cjs.map +1 -0
- package/dist/chunk-5NY26ULO.js +89 -0
- package/dist/chunk-5NY26ULO.js.map +1 -0
- package/dist/chunk-7RVPG3LE.cjs +231 -0
- package/dist/chunk-7RVPG3LE.cjs.map +1 -0
- package/dist/chunk-AYEK3WOM.js +207 -0
- package/dist/chunk-AYEK3WOM.js.map +1 -0
- package/dist/chunk-BRMBLIQG.js +53 -0
- package/dist/chunk-BRMBLIQG.js.map +1 -0
- package/dist/chunk-CAJKSTXX.cjs +54 -0
- package/dist/chunk-CAJKSTXX.cjs.map +1 -0
- package/dist/chunk-CKFWMHQU.js +401 -0
- package/dist/chunk-CKFWMHQU.js.map +1 -0
- package/dist/chunk-CV3N3HVK.js +672 -0
- package/dist/chunk-CV3N3HVK.js.map +1 -0
- package/dist/chunk-D2EBLE2B.cjs +220 -0
- package/dist/chunk-D2EBLE2B.cjs.map +1 -0
- package/dist/chunk-GCZ6YATL.js +940 -0
- package/dist/chunk-GCZ6YATL.js.map +1 -0
- package/dist/chunk-GKRAZGDI.cjs +84 -0
- package/dist/chunk-GKRAZGDI.cjs.map +1 -0
- package/dist/chunk-GPYJ66CG.js +45 -0
- package/dist/chunk-GPYJ66CG.js.map +1 -0
- package/dist/chunk-HF6XU5NI.js +84 -0
- package/dist/chunk-HF6XU5NI.js.map +1 -0
- package/dist/chunk-HJPDZOMJ.cjs +87 -0
- package/dist/chunk-HJPDZOMJ.cjs.map +1 -0
- package/dist/chunk-HS3XI3CC.cjs +69 -0
- package/dist/chunk-HS3XI3CC.cjs.map +1 -0
- package/dist/chunk-HUCC3QH5.cjs +53 -0
- package/dist/chunk-HUCC3QH5.cjs.map +1 -0
- package/dist/chunk-HYZ6BQPS.cjs +425 -0
- package/dist/chunk-HYZ6BQPS.cjs.map +1 -0
- package/dist/chunk-ISCSZMYW.cjs +106 -0
- package/dist/chunk-ISCSZMYW.cjs.map +1 -0
- package/dist/chunk-IXFEFIDO.js +82 -0
- package/dist/chunk-IXFEFIDO.js.map +1 -0
- package/dist/chunk-JCJLN437.js +108 -0
- package/dist/chunk-JCJLN437.js.map +1 -0
- package/dist/chunk-JMKNNH63.cjs +982 -0
- package/dist/chunk-JMKNNH63.cjs.map +1 -0
- package/dist/chunk-JUBHQAA2.js +53 -0
- package/dist/chunk-JUBHQAA2.js.map +1 -0
- package/dist/chunk-K6G63EED.cjs +41 -0
- package/dist/chunk-K6G63EED.cjs.map +1 -0
- package/dist/chunk-KCWRCSI7.js +62 -0
- package/dist/chunk-KCWRCSI7.js.map +1 -0
- package/dist/chunk-KYM7NIJO.cjs +433 -0
- package/dist/chunk-KYM7NIJO.cjs.map +1 -0
- package/dist/chunk-L2L5CKC2.js +291 -0
- package/dist/chunk-L2L5CKC2.js.map +1 -0
- package/dist/chunk-M5CHZ5BA.js +124 -0
- package/dist/chunk-M5CHZ5BA.js.map +1 -0
- package/dist/chunk-MEK4RSGC.js +65 -0
- package/dist/chunk-MEK4RSGC.js.map +1 -0
- package/dist/chunk-MEKWH3GS.js +89 -0
- package/dist/chunk-MEKWH3GS.js.map +1 -0
- package/dist/chunk-MFTX2DDQ.js +27 -0
- package/dist/chunk-MFTX2DDQ.js.map +1 -0
- package/dist/chunk-MMC6M35Q.cjs +272 -0
- package/dist/chunk-MMC6M35Q.cjs.map +1 -0
- package/dist/chunk-NMH43BDC.js +130 -0
- package/dist/chunk-NMH43BDC.js.map +1 -0
- package/dist/chunk-NORDUD2T.cjs +135 -0
- package/dist/chunk-NORDUD2T.cjs.map +1 -0
- package/dist/chunk-NV4JOKWL.cjs +197 -0
- package/dist/chunk-NV4JOKWL.cjs.map +1 -0
- package/dist/chunk-O2JG7WY5.cjs +121 -0
- package/dist/chunk-O2JG7WY5.cjs.map +1 -0
- package/dist/chunk-ONO2FTV4.cjs +68 -0
- package/dist/chunk-ONO2FTV4.cjs.map +1 -0
- package/dist/chunk-OQB6HIUL.cjs +108 -0
- package/dist/chunk-OQB6HIUL.cjs.map +1 -0
- package/dist/chunk-OS6CMYAS.cjs +79 -0
- package/dist/chunk-OS6CMYAS.cjs.map +1 -0
- package/dist/chunk-PYURPUTV.js +402 -0
- package/dist/chunk-PYURPUTV.js.map +1 -0
- package/dist/chunk-RJ3HYZ7S.js +44 -0
- package/dist/chunk-RJ3HYZ7S.js.map +1 -0
- package/dist/chunk-RZNRIOLT.js +128 -0
- package/dist/chunk-RZNRIOLT.js.map +1 -0
- package/dist/chunk-S3T2L6NA.js +38 -0
- package/dist/chunk-S3T2L6NA.js.map +1 -0
- package/dist/chunk-S5IPJQZ3.cjs +161 -0
- package/dist/chunk-S5IPJQZ3.cjs.map +1 -0
- package/dist/chunk-SB5DSYR5.js +211 -0
- package/dist/chunk-SB5DSYR5.js.map +1 -0
- package/dist/chunk-SFXV2DUH.js +106 -0
- package/dist/chunk-SFXV2DUH.js.map +1 -0
- package/dist/chunk-SXEPGD4Z.cjs +152 -0
- package/dist/chunk-SXEPGD4Z.cjs.map +1 -0
- package/dist/chunk-SXWSOU3Y.js +89 -0
- package/dist/chunk-SXWSOU3Y.js.map +1 -0
- package/dist/chunk-SZMVOHT7.cjs +107 -0
- package/dist/chunk-SZMVOHT7.cjs.map +1 -0
- package/dist/chunk-TWJXOV4C.js +145 -0
- package/dist/chunk-TWJXOV4C.js.map +1 -0
- package/dist/chunk-U3ADRIVO.cjs +434 -0
- package/dist/chunk-U3ADRIVO.cjs.map +1 -0
- package/dist/chunk-U5FLLCGC.cjs +151 -0
- package/dist/chunk-U5FLLCGC.cjs.map +1 -0
- package/dist/chunk-UOZN45G4.cjs +130 -0
- package/dist/chunk-UOZN45G4.cjs.map +1 -0
- package/dist/chunk-VHLDOG74.cjs +167 -0
- package/dist/chunk-VHLDOG74.cjs.map +1 -0
- package/dist/chunk-YC5KLN6I.js +139 -0
- package/dist/chunk-YC5KLN6I.js.map +1 -0
- package/dist/chunk-YENXXYUV.cjs +111 -0
- package/dist/chunk-YENXXYUV.cjs.map +1 -0
- package/dist/chunk-YFQWC2PW.js +113 -0
- package/dist/chunk-YFQWC2PW.js.map +1 -0
- package/dist/chunk-Z2TY4A75.cjs +700 -0
- package/dist/chunk-Z2TY4A75.cjs.map +1 -0
- package/dist/chunk-Z56O7UEU.cjs +136 -0
- package/dist/chunk-Z56O7UEU.cjs.map +1 -0
- package/dist/chunk-ZBZDR4ZC.js +106 -0
- package/dist/chunk-ZBZDR4ZC.js.map +1 -0
- package/dist/components/charts/PartoAreaChart.cjs +15 -0
- package/dist/components/charts/PartoAreaChart.cjs.map +1 -0
- package/dist/components/charts/PartoAreaChart.d.cts +53 -0
- package/dist/components/charts/PartoAreaChart.d.ts +53 -0
- package/dist/components/charts/PartoAreaChart.js +6 -0
- package/dist/components/charts/PartoAreaChart.js.map +1 -0
- package/dist/components/charts/PartoBarChart.cjs +15 -0
- package/dist/components/charts/PartoBarChart.cjs.map +1 -0
- package/dist/components/charts/PartoBarChart.d.cts +61 -0
- package/dist/components/charts/PartoBarChart.d.ts +61 -0
- package/dist/components/charts/PartoBarChart.js +6 -0
- package/dist/components/charts/PartoBarChart.js.map +1 -0
- package/dist/components/charts/PartoLineChart.cjs +15 -0
- package/dist/components/charts/PartoLineChart.cjs.map +1 -0
- package/dist/components/charts/PartoLineChart.d.cts +57 -0
- package/dist/components/charts/PartoLineChart.d.ts +57 -0
- package/dist/components/charts/PartoLineChart.js +6 -0
- package/dist/components/charts/PartoLineChart.js.map +1 -0
- package/dist/components/charts/PartoPieChart.cjs +15 -0
- package/dist/components/charts/PartoPieChart.cjs.map +1 -0
- package/dist/components/charts/PartoPieChart.d.cts +52 -0
- package/dist/components/charts/PartoPieChart.d.ts +52 -0
- package/dist/components/charts/PartoPieChart.js +6 -0
- package/dist/components/charts/PartoPieChart.js.map +1 -0
- package/dist/components/ui/alert-rule-card.cjs +15 -0
- package/dist/components/ui/alert-rule-card.cjs.map +1 -0
- package/dist/components/ui/alert-rule-card.d.cts +38 -0
- package/dist/components/ui/alert-rule-card.d.ts +38 -0
- package/dist/components/ui/alert-rule-card.js +6 -0
- package/dist/components/ui/alert-rule-card.js.map +1 -0
- package/dist/components/ui/avatar.cjs +21 -0
- package/dist/components/ui/avatar.cjs.map +1 -0
- package/dist/components/ui/avatar.d.cts +18 -0
- package/dist/components/ui/avatar.d.ts +18 -0
- package/dist/components/ui/avatar.js +4 -0
- package/dist/components/ui/avatar.js.map +1 -0
- package/dist/components/ui/badge.cjs +17 -0
- package/dist/components/ui/badge.cjs.map +1 -0
- package/dist/components/ui/badge.d.cts +16 -0
- package/dist/components/ui/badge.d.ts +16 -0
- package/dist/components/ui/badge.js +4 -0
- package/dist/components/ui/badge.js.map +1 -0
- package/dist/components/ui/button.cjs +18 -0
- package/dist/components/ui/button.cjs.map +1 -0
- package/dist/components/ui/button.d.cts +37 -0
- package/dist/components/ui/button.d.ts +37 -0
- package/dist/components/ui/button.js +5 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/calendar.cjs +15 -0
- package/dist/components/ui/calendar.cjs.map +1 -0
- package/dist/components/ui/calendar.d.cts +17 -0
- package/dist/components/ui/calendar.d.ts +17 -0
- package/dist/components/ui/calendar.js +6 -0
- package/dist/components/ui/calendar.js.map +1 -0
- package/dist/components/ui/card.cjs +37 -0
- package/dist/components/ui/card.cjs.map +1 -0
- package/dist/components/ui/card.d.cts +18 -0
- package/dist/components/ui/card.d.ts +18 -0
- package/dist/components/ui/card.js +4 -0
- package/dist/components/ui/card.js.map +1 -0
- package/dist/components/ui/concept-card.cjs +18 -0
- package/dist/components/ui/concept-card.cjs.map +1 -0
- package/dist/components/ui/concept-card.d.cts +5 -0
- package/dist/components/ui/concept-card.d.ts +5 -0
- package/dist/components/ui/concept-card.js +9 -0
- package/dist/components/ui/concept-card.js.map +1 -0
- package/dist/components/ui/data-table.cjs +18 -0
- package/dist/components/ui/data-table.cjs.map +1 -0
- package/dist/components/ui/data-table.d.cts +181 -0
- package/dist/components/ui/data-table.d.ts +181 -0
- package/dist/components/ui/data-table.js +9 -0
- package/dist/components/ui/data-table.js.map +1 -0
- package/dist/components/ui/dialog.cjs +49 -0
- package/dist/components/ui/dialog.cjs.map +1 -0
- package/dist/components/ui/dialog.d.cts +22 -0
- package/dist/components/ui/dialog.d.ts +22 -0
- package/dist/components/ui/dialog.js +4 -0
- package/dist/components/ui/dialog.js.map +1 -0
- package/dist/components/ui/filter-provider.cjs +20 -0
- package/dist/components/ui/filter-provider.cjs.map +1 -0
- package/dist/components/ui/filter-provider.d.cts +49 -0
- package/dist/components/ui/filter-provider.d.ts +49 -0
- package/dist/components/ui/filter-provider.js +3 -0
- package/dist/components/ui/filter-provider.js.map +1 -0
- package/dist/components/ui/input.cjs +22 -0
- package/dist/components/ui/input.cjs.map +1 -0
- package/dist/components/ui/input.d.cts +16 -0
- package/dist/components/ui/input.d.ts +16 -0
- package/dist/components/ui/input.js +5 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/iran-province-heat.cjs +13 -0
- package/dist/components/ui/iran-province-heat.cjs.map +1 -0
- package/dist/components/ui/iran-province-heat.d.cts +64 -0
- package/dist/components/ui/iran-province-heat.d.ts +64 -0
- package/dist/components/ui/iran-province-heat.js +4 -0
- package/dist/components/ui/iran-province-heat.js.map +1 -0
- package/dist/components/ui/page-card.cjs +16 -0
- package/dist/components/ui/page-card.cjs.map +1 -0
- package/dist/components/ui/page-card.d.cts +6 -0
- package/dist/components/ui/page-card.d.ts +6 -0
- package/dist/components/ui/page-card.js +7 -0
- package/dist/components/ui/page-card.js.map +1 -0
- package/dist/components/ui/popover.cjs +25 -0
- package/dist/components/ui/popover.cjs.map +1 -0
- package/dist/components/ui/popover.d.cts +9 -0
- package/dist/components/ui/popover.d.ts +9 -0
- package/dist/components/ui/popover.js +4 -0
- package/dist/components/ui/popover.js.map +1 -0
- package/dist/components/ui/saved-query-card.cjs +15 -0
- package/dist/components/ui/saved-query-card.cjs.map +1 -0
- package/dist/components/ui/saved-query-card.d.cts +41 -0
- package/dist/components/ui/saved-query-card.d.ts +41 -0
- package/dist/components/ui/saved-query-card.js +6 -0
- package/dist/components/ui/saved-query-card.js.map +1 -0
- package/dist/components/ui/separator.cjs +13 -0
- package/dist/components/ui/separator.cjs.map +1 -0
- package/dist/components/ui/separator.d.cts +9 -0
- package/dist/components/ui/separator.d.ts +9 -0
- package/dist/components/ui/separator.js +4 -0
- package/dist/components/ui/separator.js.map +1 -0
- package/dist/components/ui/sheet.cjs +45 -0
- package/dist/components/ui/sheet.cjs.map +1 -0
- package/dist/components/ui/sheet.d.cts +44 -0
- package/dist/components/ui/sheet.d.ts +44 -0
- package/dist/components/ui/sheet.js +4 -0
- package/dist/components/ui/sheet.js.map +1 -0
- package/dist/components/ui/sparkline.cjs +13 -0
- package/dist/components/ui/sparkline.cjs.map +1 -0
- package/dist/components/ui/sparkline.d.cts +36 -0
- package/dist/components/ui/sparkline.d.ts +36 -0
- package/dist/components/ui/sparkline.js +4 -0
- package/dist/components/ui/sparkline.js.map +1 -0
- package/dist/components/ui/tooltip.cjs +25 -0
- package/dist/components/ui/tooltip.cjs.map +1 -0
- package/dist/components/ui/tooltip.d.cts +17 -0
- package/dist/components/ui/tooltip.d.ts +17 -0
- package/dist/components/ui/tooltip.js +4 -0
- package/dist/components/ui/tooltip.js.map +1 -0
- package/dist/concept-card-CcOBb2Nz.d.ts +83 -0
- package/dist/concept-card-RwPbqJ06.d.cts +83 -0
- package/dist/hooks/use-hotkey-registry.cjs +21 -0
- package/dist/hooks/use-hotkey-registry.cjs.map +1 -0
- package/dist/hooks/use-hotkey-registry.d.cts +65 -0
- package/dist/hooks/use-hotkey-registry.d.ts +65 -0
- package/dist/hooks/use-hotkey-registry.js +4 -0
- package/dist/hooks/use-hotkey-registry.js.map +1 -0
- package/dist/hooks/use-hotkeys.cjs +16 -0
- package/dist/hooks/use-hotkeys.cjs.map +1 -0
- package/dist/hooks/use-hotkeys.d.cts +66 -0
- package/dist/hooks/use-hotkeys.d.ts +66 -0
- package/dist/hooks/use-hotkeys.js +3 -0
- package/dist/hooks/use-hotkeys.js.map +1 -0
- package/dist/i18n-ArS3mqj0.d.ts +344 -0
- package/dist/i18n-CAd9wGOr.d.cts +344 -0
- package/dist/index.cjs +12195 -13224
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +490 -34
- package/dist/index.d.cts +1635 -1263
- package/dist/index.d.ts +1635 -1263
- package/dist/index.js +10693 -12364
- package/dist/index.js.map +1 -1
- package/dist/page-card-CmShVqG-.d.cts +100 -0
- package/dist/page-card-HBn-cy4J.d.ts +100 -0
- package/dist/utils-DlXWmDZ-.d.cts +35 -0
- package/dist/utils-DlXWmDZ-.d.ts +35 -0
- package/package.json +160 -4
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { S as SupportedLocale } from '../../utils-DlXWmDZ-.js';
|
|
3
|
+
import 'clsx';
|
|
4
|
+
|
|
5
|
+
type SortDirection = 'asc' | 'desc';
|
|
6
|
+
/** A single sort rule. In multi-sort mode, rules are ordered by priority. */
|
|
7
|
+
interface SortRule {
|
|
8
|
+
column: string;
|
|
9
|
+
direction: SortDirection;
|
|
10
|
+
}
|
|
11
|
+
interface DataTableColumn<TData> {
|
|
12
|
+
/** Unique key identifying the column — used for sort callbacks */
|
|
13
|
+
id: string;
|
|
14
|
+
/** Column header label */
|
|
15
|
+
header: React.ReactNode;
|
|
16
|
+
/** Render function for cell content */
|
|
17
|
+
cell: (row: TData, rowIndex: number) => React.ReactNode;
|
|
18
|
+
/** Whether this column is sortable */
|
|
19
|
+
sortable?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Render function for the footer cell (e.g. column total, average). When
|
|
22
|
+
* defined for any column and `footer` is true on the table, a sticky
|
|
23
|
+
* `<tfoot>` row is rendered.
|
|
24
|
+
*/
|
|
25
|
+
footer?: () => React.ReactNode;
|
|
26
|
+
/** Additional className for both <th> and <td> */
|
|
27
|
+
className?: string;
|
|
28
|
+
/** Column alignment */
|
|
29
|
+
align?: 'start' | 'center' | 'end';
|
|
30
|
+
/**
|
|
31
|
+
* Pin the column to the start (logical, RTL-aware) or end of the visible
|
|
32
|
+
* area. Pinned columns stay visible while horizontal scrolling. The
|
|
33
|
+
* selection / expansion gutter columns are pinned automatically.
|
|
34
|
+
*/
|
|
35
|
+
pinned?: 'start' | 'end';
|
|
36
|
+
/** Optional fixed pixel width (used for pinning offset calculation) */
|
|
37
|
+
width?: number;
|
|
38
|
+
/** Allow the user to drag the start/end edge of this column to resize it. */
|
|
39
|
+
resizable?: boolean;
|
|
40
|
+
/** Min width when resizing (px). Default 60. */
|
|
41
|
+
minWidth?: number;
|
|
42
|
+
/** Max width when resizing (px). Default 800. */
|
|
43
|
+
maxWidth?: number;
|
|
44
|
+
/** When false, this column is hidden via the columnVisibility map */
|
|
45
|
+
defaultVisible?: boolean;
|
|
46
|
+
}
|
|
47
|
+
interface DataTableColumnVisibility {
|
|
48
|
+
/** Map of column id → visible. Missing keys default to true. */
|
|
49
|
+
visible: Record<string, boolean>;
|
|
50
|
+
/** Called when a column toggle changes. */
|
|
51
|
+
onVisibilityChange: (next: Record<string, boolean>) => void;
|
|
52
|
+
}
|
|
53
|
+
interface DataTableExpansion<TData> {
|
|
54
|
+
/** Set of expanded row keys. */
|
|
55
|
+
expandedRows: Set<number>;
|
|
56
|
+
/** Called when expansion toggles. */
|
|
57
|
+
onExpandedRowsChange: (next: Set<number>) => void;
|
|
58
|
+
/** Render function for the expanded content (full-width row below). */
|
|
59
|
+
renderExpandedRow: (row: TData, rowIndex: number) => React.ReactNode;
|
|
60
|
+
}
|
|
61
|
+
interface DataTablePagination {
|
|
62
|
+
currentPage: number;
|
|
63
|
+
totalPages: number;
|
|
64
|
+
onPageChange: (page: number) => void;
|
|
65
|
+
}
|
|
66
|
+
interface DataTableSort {
|
|
67
|
+
column: string | null;
|
|
68
|
+
direction: SortDirection | null;
|
|
69
|
+
onSort: (column: string, direction: SortDirection) => void;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Multi-column sort configuration. When supplied, takes precedence over the
|
|
73
|
+
* single-column `sort` prop. Headers display a priority badge (۱، ۲، ۳…) and
|
|
74
|
+
* Shift-click on a header toggles its rule without disturbing the others.
|
|
75
|
+
* A bare click resets the active rules to a single column.
|
|
76
|
+
*/
|
|
77
|
+
interface DataTableMultiSort {
|
|
78
|
+
/** Active rules in priority order — first is the primary sort. */
|
|
79
|
+
rules: SortRule[];
|
|
80
|
+
onSortChange: (next: SortRule[]) => void;
|
|
81
|
+
/** Maximum rules allowed at once. @default 3 */
|
|
82
|
+
maxRules?: number;
|
|
83
|
+
}
|
|
84
|
+
interface DataTableSelection<TData> {
|
|
85
|
+
selectedRows: Set<number>;
|
|
86
|
+
onSelectionChange: (selectedRows: Set<number>) => void;
|
|
87
|
+
/** Function to get a unique key for each row (defaults to index) */
|
|
88
|
+
getRowKey?: (row: TData, index: number) => number;
|
|
89
|
+
}
|
|
90
|
+
interface DataTableProps<TData> {
|
|
91
|
+
/** Column definitions */
|
|
92
|
+
columns: DataTableColumn<TData>[];
|
|
93
|
+
/** Data rows */
|
|
94
|
+
data: TData[];
|
|
95
|
+
/** Table size variant */
|
|
96
|
+
size?: 'sm' | 'md' | 'lg';
|
|
97
|
+
/** Show loading skeleton */
|
|
98
|
+
isLoading?: boolean;
|
|
99
|
+
/** Number of skeleton rows to show when loading */
|
|
100
|
+
loadingRows?: number;
|
|
101
|
+
/** Content to show when data is empty (not loading) */
|
|
102
|
+
emptyState?: React.ReactNode;
|
|
103
|
+
/** Pagination configuration */
|
|
104
|
+
pagination?: DataTablePagination;
|
|
105
|
+
/** Sort configuration (single-column). Ignored when `multiSort` is set. */
|
|
106
|
+
sort?: DataTableSort;
|
|
107
|
+
/** Multi-column sort configuration (Shift-click to add rules). */
|
|
108
|
+
multiSort?: DataTableMultiSort;
|
|
109
|
+
/**
|
|
110
|
+
* When a column has a `footer` render fn, render a sticky `<tfoot>` row.
|
|
111
|
+
* Useful for column totals/averages.
|
|
112
|
+
*/
|
|
113
|
+
footer?: boolean;
|
|
114
|
+
/** Stick the `<tfoot>` to the bottom of the scroll container. @default true when footer enabled */
|
|
115
|
+
stickyFooter?: boolean;
|
|
116
|
+
/**
|
|
117
|
+
* Fired with `(columnId, newWidth)` when the user finishes resizing a
|
|
118
|
+
* column. Persist this on the consumer side and feed it back via
|
|
119
|
+
* `column.width` for state to survive remounts.
|
|
120
|
+
*/
|
|
121
|
+
onColumnResize?: (columnId: string, width: number) => void;
|
|
122
|
+
/** Row selection configuration */
|
|
123
|
+
selection?: DataTableSelection<TData>;
|
|
124
|
+
/** Column visibility configuration (for show/hide column toggle) */
|
|
125
|
+
columnVisibility?: DataTableColumnVisibility;
|
|
126
|
+
/** Expansion configuration (for inline detail row) */
|
|
127
|
+
expansion?: DataTableExpansion<TData>;
|
|
128
|
+
/**
|
|
129
|
+
* Infinite-scroll mode. The sentinel rendered after the last row triggers
|
|
130
|
+
* `onLoadMore` when it enters the viewport. Pair with paged data
|
|
131
|
+
* fetching: append the new rows to `data` on the consumer side. Not
|
|
132
|
+
* compatible with `virtualize` (use one or the other).
|
|
133
|
+
*/
|
|
134
|
+
infiniteScroll?: {
|
|
135
|
+
onLoadMore: () => void;
|
|
136
|
+
/** When false, the sentinel is removed and no further loads fire. */
|
|
137
|
+
hasMore: boolean;
|
|
138
|
+
/** Show a loading indicator in the sentinel row. */
|
|
139
|
+
isLoadingMore?: boolean;
|
|
140
|
+
/** IntersectionObserver rootMargin. @default '200px' */
|
|
141
|
+
rootMargin?: string;
|
|
142
|
+
/** Custom node to render in the sentinel while loading. */
|
|
143
|
+
loadingMoreContent?: React.ReactNode;
|
|
144
|
+
/** Custom node to render when there are no more rows to load. */
|
|
145
|
+
endContent?: React.ReactNode;
|
|
146
|
+
};
|
|
147
|
+
/**
|
|
148
|
+
* Opt-in row virtualization for very long lists (1000+ rows). When set,
|
|
149
|
+
* the table is wrapped in a scroll container of `viewportHeight` and only
|
|
150
|
+
* rows in the visible window + `overscan` are rendered. Rows must have a
|
|
151
|
+
* predictable `rowHeight`; expanded rows + dynamic content are NOT
|
|
152
|
+
* supported in virtualized mode.
|
|
153
|
+
*/
|
|
154
|
+
virtualize?: {
|
|
155
|
+
/** Pixel height of each row (must be uniform). */
|
|
156
|
+
rowHeight: number;
|
|
157
|
+
/** Container scroll-area height in px. @default 480 */
|
|
158
|
+
viewportHeight?: number;
|
|
159
|
+
/** Extra rows rendered above and below the viewport. @default 6 */
|
|
160
|
+
overscan?: number;
|
|
161
|
+
};
|
|
162
|
+
/** Zebra-striped rows */
|
|
163
|
+
striped?: boolean;
|
|
164
|
+
/** Bordered cells */
|
|
165
|
+
bordered?: boolean;
|
|
166
|
+
/** Sticky header */
|
|
167
|
+
stickyHeader?: boolean;
|
|
168
|
+
/** Additional className for the root wrapper */
|
|
169
|
+
className?: string;
|
|
170
|
+
/** Caption text below the table */
|
|
171
|
+
caption?: string;
|
|
172
|
+
/** Total result count shown above table (e.g. "۲۴ نتیجه") */
|
|
173
|
+
resultCount?: React.ReactNode;
|
|
174
|
+
/** Locale for UI strings @default 'fa' */
|
|
175
|
+
locale?: SupportedLocale;
|
|
176
|
+
}
|
|
177
|
+
declare const DataTable: <TData>(props: DataTableProps<TData> & {
|
|
178
|
+
ref?: React.ForwardedRef<HTMLDivElement>;
|
|
179
|
+
}) => React.ReactElement;
|
|
180
|
+
|
|
181
|
+
export { DataTable, type DataTableColumn, type DataTableColumnVisibility, type DataTableExpansion, type DataTableMultiSort, type DataTablePagination, type DataTableProps, type DataTableSelection, type DataTableSort, type SortDirection, type SortRule };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { DataTable } from '../../chunk-GCZ6YATL.js';
|
|
2
|
+
import '../../chunk-3QYYPPFJ.js';
|
|
3
|
+
import '../../chunk-S3T2L6NA.js';
|
|
4
|
+
import '../../chunk-5JJSRGJD.js';
|
|
5
|
+
import '../../chunk-SB5DSYR5.js';
|
|
6
|
+
import '../../chunk-CV3N3HVK.js';
|
|
7
|
+
import '../../chunk-4SVQNEVH.js';
|
|
8
|
+
//# sourceMappingURL=data-table.js.map
|
|
9
|
+
//# sourceMappingURL=data-table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"data-table.js"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkO2JG7WY5_cjs = require('../../chunk-O2JG7WY5.cjs');
|
|
4
|
+
require('../../chunk-NV4JOKWL.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "Dialog", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunkO2JG7WY5_cjs.Dialog; }
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "DialogClose", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return chunkO2JG7WY5_cjs.DialogClose; }
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(exports, "DialogContent", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return chunkO2JG7WY5_cjs.DialogContent; }
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports, "DialogDescription", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () { return chunkO2JG7WY5_cjs.DialogDescription; }
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "DialogFooter", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () { return chunkO2JG7WY5_cjs.DialogFooter; }
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports, "DialogHeader", {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
get: function () { return chunkO2JG7WY5_cjs.DialogHeader; }
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(exports, "DialogOverlay", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () { return chunkO2JG7WY5_cjs.DialogOverlay; }
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "DialogPortal", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () { return chunkO2JG7WY5_cjs.DialogPortal; }
|
|
39
|
+
});
|
|
40
|
+
Object.defineProperty(exports, "DialogTitle", {
|
|
41
|
+
enumerable: true,
|
|
42
|
+
get: function () { return chunkO2JG7WY5_cjs.DialogTitle; }
|
|
43
|
+
});
|
|
44
|
+
Object.defineProperty(exports, "DialogTrigger", {
|
|
45
|
+
enumerable: true,
|
|
46
|
+
get: function () { return chunkO2JG7WY5_cjs.DialogTrigger; }
|
|
47
|
+
});
|
|
48
|
+
//# sourceMappingURL=dialog.cjs.map
|
|
49
|
+
//# sourceMappingURL=dialog.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"dialog.cjs"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
4
|
+
|
|
5
|
+
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
6
|
+
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
8
|
+
declare const DialogClose: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
declare const DialogHeader: {
|
|
12
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|
|
15
|
+
declare const DialogFooter: {
|
|
16
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
17
|
+
displayName: string;
|
|
18
|
+
};
|
|
19
|
+
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
20
|
+
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
21
|
+
|
|
22
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
4
|
+
|
|
5
|
+
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
6
|
+
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
8
|
+
declare const DialogClose: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
declare const DialogHeader: {
|
|
12
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|
|
15
|
+
declare const DialogFooter: {
|
|
16
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
17
|
+
displayName: string;
|
|
18
|
+
};
|
|
19
|
+
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
20
|
+
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
21
|
+
|
|
22
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from '../../chunk-5NY26ULO.js';
|
|
2
|
+
import '../../chunk-4SVQNEVH.js';
|
|
3
|
+
//# sourceMappingURL=dialog.js.map
|
|
4
|
+
//# sourceMappingURL=dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"dialog.js"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk5K6E4ZSW_cjs = require('../../chunk-5K6E4ZSW.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "FilterProvider", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return chunk5K6E4ZSW_cjs.FilterProvider; }
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(exports, "useFilterState", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return chunk5K6E4ZSW_cjs.useFilterState; }
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(exports, "useFilterStateOptional", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return chunk5K6E4ZSW_cjs.useFilterStateOptional; }
|
|
18
|
+
});
|
|
19
|
+
//# sourceMappingURL=filter-provider.cjs.map
|
|
20
|
+
//# sourceMappingURL=filter-provider.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"filter-provider.cjs"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Generic, type-erased filter state. Consumers cast at the `useFilterState`
|
|
6
|
+
* call-site for a typed view. We deliberately do not parameterize the
|
|
7
|
+
* Context itself — a single provider serves the whole tree, and the type
|
|
8
|
+
* lives at the read-site (call as `useFilterState<MyFilters>()`).
|
|
9
|
+
*/
|
|
10
|
+
type FilterStateShape = Record<string, unknown>;
|
|
11
|
+
interface FilterContextValue<T extends FilterStateShape = FilterStateShape> {
|
|
12
|
+
/** Current filter state. */
|
|
13
|
+
state: T;
|
|
14
|
+
/** Replace the entire filter state (full reset to a new shape). */
|
|
15
|
+
set: (next: T) => void;
|
|
16
|
+
/** Shallow-merge a partial update. Use this for most edits. */
|
|
17
|
+
patch: (partial: Partial<T>) => void;
|
|
18
|
+
/** Reset state to the initial value passed to the Provider. */
|
|
19
|
+
reset: () => void;
|
|
20
|
+
}
|
|
21
|
+
interface FilterProviderProps<T extends FilterStateShape> {
|
|
22
|
+
/** Initial filter state on first mount. */
|
|
23
|
+
initialState: T;
|
|
24
|
+
/**
|
|
25
|
+
* Controlled state. When supplied, `state` becomes a pure projection of
|
|
26
|
+
* this prop and updates flow back through `onStateChange`. Use this when
|
|
27
|
+
* the consumer manages state externally (e.g. via Redux / Zustand /
|
|
28
|
+
* useState in a parent).
|
|
29
|
+
*/
|
|
30
|
+
state?: T;
|
|
31
|
+
/** Called on every state change in both controlled and uncontrolled modes. */
|
|
32
|
+
onStateChange?: (next: T) => void;
|
|
33
|
+
children: React.ReactNode;
|
|
34
|
+
}
|
|
35
|
+
declare function FilterProvider<T extends FilterStateShape>({ initialState, state: controlledState, onStateChange, children, }: FilterProviderProps<T>): react_jsx_runtime.JSX.Element;
|
|
36
|
+
/**
|
|
37
|
+
* Read + update the filter state from any descendant of `<FilterProvider>`.
|
|
38
|
+
* Cast `T` at the call site to get a typed view of the state shape.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* interface MyFilters { q: string; severity: 'low' | 'high' | null }
|
|
42
|
+
* const { state, patch } = useFilterState<MyFilters>()
|
|
43
|
+
* patch({ q: 'tehran' })
|
|
44
|
+
*/
|
|
45
|
+
declare function useFilterState<T extends FilterStateShape = FilterStateShape>(): FilterContextValue<T>;
|
|
46
|
+
/** Internal — used by `useFilterParams` / `useFilterPresets` to opt-in to the context, returning null when absent. */
|
|
47
|
+
declare function useFilterStateOptional<T extends FilterStateShape = FilterStateShape>(): FilterContextValue<T> | null;
|
|
48
|
+
|
|
49
|
+
export { type FilterContextValue, FilterProvider, type FilterProviderProps, type FilterStateShape, useFilterState, useFilterStateOptional };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Generic, type-erased filter state. Consumers cast at the `useFilterState`
|
|
6
|
+
* call-site for a typed view. We deliberately do not parameterize the
|
|
7
|
+
* Context itself — a single provider serves the whole tree, and the type
|
|
8
|
+
* lives at the read-site (call as `useFilterState<MyFilters>()`).
|
|
9
|
+
*/
|
|
10
|
+
type FilterStateShape = Record<string, unknown>;
|
|
11
|
+
interface FilterContextValue<T extends FilterStateShape = FilterStateShape> {
|
|
12
|
+
/** Current filter state. */
|
|
13
|
+
state: T;
|
|
14
|
+
/** Replace the entire filter state (full reset to a new shape). */
|
|
15
|
+
set: (next: T) => void;
|
|
16
|
+
/** Shallow-merge a partial update. Use this for most edits. */
|
|
17
|
+
patch: (partial: Partial<T>) => void;
|
|
18
|
+
/** Reset state to the initial value passed to the Provider. */
|
|
19
|
+
reset: () => void;
|
|
20
|
+
}
|
|
21
|
+
interface FilterProviderProps<T extends FilterStateShape> {
|
|
22
|
+
/** Initial filter state on first mount. */
|
|
23
|
+
initialState: T;
|
|
24
|
+
/**
|
|
25
|
+
* Controlled state. When supplied, `state` becomes a pure projection of
|
|
26
|
+
* this prop and updates flow back through `onStateChange`. Use this when
|
|
27
|
+
* the consumer manages state externally (e.g. via Redux / Zustand /
|
|
28
|
+
* useState in a parent).
|
|
29
|
+
*/
|
|
30
|
+
state?: T;
|
|
31
|
+
/** Called on every state change in both controlled and uncontrolled modes. */
|
|
32
|
+
onStateChange?: (next: T) => void;
|
|
33
|
+
children: React.ReactNode;
|
|
34
|
+
}
|
|
35
|
+
declare function FilterProvider<T extends FilterStateShape>({ initialState, state: controlledState, onStateChange, children, }: FilterProviderProps<T>): react_jsx_runtime.JSX.Element;
|
|
36
|
+
/**
|
|
37
|
+
* Read + update the filter state from any descendant of `<FilterProvider>`.
|
|
38
|
+
* Cast `T` at the call site to get a typed view of the state shape.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* interface MyFilters { q: string; severity: 'low' | 'high' | null }
|
|
42
|
+
* const { state, patch } = useFilterState<MyFilters>()
|
|
43
|
+
* patch({ q: 'tehran' })
|
|
44
|
+
*/
|
|
45
|
+
declare function useFilterState<T extends FilterStateShape = FilterStateShape>(): FilterContextValue<T>;
|
|
46
|
+
/** Internal — used by `useFilterParams` / `useFilterPresets` to opt-in to the context, returning null when absent. */
|
|
47
|
+
declare function useFilterStateOptional<T extends FilterStateShape = FilterStateShape>(): FilterContextValue<T> | null;
|
|
48
|
+
|
|
49
|
+
export { type FilterContextValue, FilterProvider, type FilterProviderProps, type FilterStateShape, useFilterState, useFilterStateOptional };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"filter-provider.js"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkHS3XI3CC_cjs = require('../../chunk-HS3XI3CC.cjs');
|
|
4
|
+
require('../../chunk-K6G63EED.cjs');
|
|
5
|
+
require('../../chunk-NV4JOKWL.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "Input", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return chunkHS3XI3CC_cjs.Input; }
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "InputVariants", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return chunkHS3XI3CC_cjs.InputVariants; }
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "inputVariants", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return chunkHS3XI3CC_cjs.inputVariants; }
|
|
20
|
+
});
|
|
21
|
+
//# sourceMappingURL=input.cjs.map
|
|
22
|
+
//# sourceMappingURL=input.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"input.cjs"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
|
|
5
|
+
declare const inputVariants: (props?: ({
|
|
6
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
7
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
8
|
+
/** @deprecated Use inputVariants instead */
|
|
9
|
+
declare const InputVariants: (props?: ({
|
|
10
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
11
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
12
|
+
interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>, VariantProps<typeof inputVariants> {
|
|
13
|
+
}
|
|
14
|
+
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
15
|
+
|
|
16
|
+
export { Input, type InputProps, InputVariants, inputVariants };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
|
|
5
|
+
declare const inputVariants: (props?: ({
|
|
6
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
7
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
8
|
+
/** @deprecated Use inputVariants instead */
|
|
9
|
+
declare const InputVariants: (props?: ({
|
|
10
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
11
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
12
|
+
interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>, VariantProps<typeof inputVariants> {
|
|
13
|
+
}
|
|
14
|
+
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
15
|
+
|
|
16
|
+
export { Input, type InputProps, InputVariants, inputVariants };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"input.js"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk2UD3LGVX_cjs = require('../../chunk-2UD3LGVX.cjs');
|
|
4
|
+
require('../../chunk-NV4JOKWL.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "IranProvinceHeat", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunk2UD3LGVX_cjs.IranProvinceHeat; }
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=iran-province-heat.cjs.map
|
|
13
|
+
//# sourceMappingURL=iran-province-heat.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"iran-province-heat.cjs"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { S as SupportedLocale } from '../../utils-DlXWmDZ-.cjs';
|
|
3
|
+
import 'clsx';
|
|
4
|
+
|
|
5
|
+
interface IranProvinceCell {
|
|
6
|
+
/** Province slug or ISO 3166-2:IR code (e.g. 'tehran' or 'IR-07'). */
|
|
7
|
+
code: string;
|
|
8
|
+
/** Numeric value to compare across provinces (count, score, percentage…). */
|
|
9
|
+
value: number;
|
|
10
|
+
}
|
|
11
|
+
type IranProvinceHeatScale = 'brand' | 'sentiment-positive' | 'sentiment-negative' | 'destructive' | 'warning' | 'severity-urgent' | 'severity-high' | 'flow-pro-gov' | 'flow-internal-critic';
|
|
12
|
+
interface IranProvinceHeatProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
13
|
+
/**
|
|
14
|
+
* Either an array of `{code, value}` cells, or a record map. Provinces not
|
|
15
|
+
* in the dataset render with value 0 unless `hideMissing` is true. Cells
|
|
16
|
+
* with unknown codes are skipped (and warned via `onUnknownCode` if set).
|
|
17
|
+
*/
|
|
18
|
+
data: IranProvinceCell[] | Record<string, number>;
|
|
19
|
+
/**
|
|
20
|
+
* Color token to use for the heat bars. Bars within the dataset are tinted
|
|
21
|
+
* with progressively higher alpha based on `value / max`.
|
|
22
|
+
* @default 'brand'
|
|
23
|
+
*/
|
|
24
|
+
scale?: IranProvinceHeatScale;
|
|
25
|
+
/** Sort order for the rows. @default 'value-desc' */
|
|
26
|
+
sort?: 'value-desc' | 'value-asc' | 'name';
|
|
27
|
+
/**
|
|
28
|
+
* Show only top-N rows (after sorting). When set, a "+N more" row collapses
|
|
29
|
+
* the rest. Use 0 to show all 31 — that's the default.
|
|
30
|
+
*/
|
|
31
|
+
topN?: number;
|
|
32
|
+
/** Display rank (۱، ۲، ۳، …) at the start of each row. @default false */
|
|
33
|
+
showRank?: boolean;
|
|
34
|
+
/** Inline numeric value on each row. @default true */
|
|
35
|
+
showValue?: boolean;
|
|
36
|
+
/** Hide rows with value 0 (or missing from dataset). @default false */
|
|
37
|
+
hideMissing?: boolean;
|
|
38
|
+
/** Compact rows (28px) vs comfortable (36px). @default 'comfortable' */
|
|
39
|
+
density?: 'compact' | 'comfortable';
|
|
40
|
+
/**
|
|
41
|
+
* Suffix on the inline value (e.g. ' نظر', ' %').
|
|
42
|
+
* Useful when consumers don't want to write a custom valueFormatter.
|
|
43
|
+
*/
|
|
44
|
+
valueSuffix?: string;
|
|
45
|
+
/** Custom value formatter; overrides the locale-aware default. */
|
|
46
|
+
valueFormatter?: (value: number) => string;
|
|
47
|
+
/** Click handler — receives slug + ISO + value. Optional. */
|
|
48
|
+
onProvinceClick?: (province: {
|
|
49
|
+
slug: string;
|
|
50
|
+
iso: string;
|
|
51
|
+
value: number;
|
|
52
|
+
}) => void;
|
|
53
|
+
/** Called once per unknown code in `data`, useful for telemetry. */
|
|
54
|
+
onUnknownCode?: (code: string) => void;
|
|
55
|
+
/** Locale for labels + digit formatting. @default 'fa' */
|
|
56
|
+
locale?: SupportedLocale;
|
|
57
|
+
/** Loading skeleton while data fetches. */
|
|
58
|
+
isLoading?: boolean;
|
|
59
|
+
/** Empty-state node when `data` is empty (or all-zero with hideMissing). */
|
|
60
|
+
emptyState?: React.ReactNode;
|
|
61
|
+
}
|
|
62
|
+
declare const IranProvinceHeat: React.ForwardRefExoticComponent<IranProvinceHeatProps & React.RefAttributes<HTMLDivElement>>;
|
|
63
|
+
|
|
64
|
+
export { type IranProvinceCell, IranProvinceHeat, type IranProvinceHeatProps, type IranProvinceHeatScale };
|