@fangxinyan/lumina 0.1.5 → 0.2.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/{Accordion-GSBY5T5U.css → Accordion-3TQPKNN3.css} +8 -1
- package/dist/Accordion.cjs +2 -2
- package/dist/Accordion.d.cts +12 -0
- package/dist/Accordion.d.ts +12 -0
- package/dist/Accordion.js +1 -1
- package/dist/{Alert-LSKBYDRI.css → Alert-JJ7GB3UU.css} +11 -0
- package/dist/Alert.cjs +2 -2
- package/dist/Alert.d.cts +4 -0
- package/dist/Alert.d.ts +4 -0
- package/dist/Alert.js +1 -1
- package/dist/{Avatar-OXDSG5Q6.css → Avatar-R5A4AFKZ.css} +4 -0
- package/dist/Avatar.cjs +2 -2
- package/dist/Avatar.d.cts +2 -0
- package/dist/Avatar.d.ts +2 -0
- package/dist/Avatar.js +1 -1
- package/dist/{Button-5UI7QXGU.css → Button-SDQD25AG.css} +2 -0
- package/dist/Button.cjs +3 -3
- package/dist/Button.d.cts +2 -0
- package/dist/Button.d.ts +2 -0
- package/dist/Button.js +1 -1
- package/dist/Calendar.cjs +2 -2
- package/dist/Calendar.d.cts +8 -0
- package/dist/Calendar.d.ts +8 -0
- package/dist/Calendar.js +1 -1
- package/dist/{Card-2CHHFD4Y.css → Card-RG7ECXL2.css} +11 -0
- package/dist/Card.cjs +3 -3
- package/dist/Card.d.cts +2 -0
- package/dist/Card.d.ts +2 -0
- package/dist/Card.js +1 -1
- package/dist/{Divider-Z37INS5E.css → Divider-OEE4Q2KS.css} +31 -0
- package/dist/Divider.cjs +2 -2
- package/dist/Divider.d.cts +7 -0
- package/dist/Divider.d.ts +7 -0
- package/dist/Divider.js +1 -1
- package/dist/Drawer-IPGB4CXH.css +101 -0
- package/dist/Drawer.cjs +13 -0
- package/dist/Drawer.cjs.map +1 -0
- package/dist/Drawer.d.cts +45 -0
- package/dist/Drawer.d.ts +45 -0
- package/dist/Drawer.js +4 -0
- package/dist/Drawer.js.map +1 -0
- package/dist/{Empty-VM23UNLQ.css → Empty-NQ72W3D7.css} +22 -0
- package/dist/Empty.cjs +4 -4
- package/dist/Empty.d.cts +42 -2
- package/dist/Empty.d.ts +42 -2
- package/dist/Empty.js +1 -1
- package/dist/Input-33CAH4O6.css +134 -0
- package/dist/Input.cjs +3 -3
- package/dist/Input.d.cts +17 -1
- package/dist/Input.d.ts +17 -1
- package/dist/Input.js +1 -1
- package/dist/Modal-N4YVLEWW.css +72 -0
- package/dist/Modal.cjs +3 -7
- package/dist/Modal.d.cts +37 -8
- package/dist/Modal.d.ts +37 -8
- package/dist/Modal.js +2 -2
- package/dist/{Pagination-6FFOI4NM.css → Pagination-YIRYJUXP.css} +33 -0
- package/dist/Pagination.cjs +5 -2
- package/dist/Pagination.d.cts +14 -0
- package/dist/Pagination.d.ts +14 -0
- package/dist/Pagination.js +4 -1
- package/dist/Select.cjs +3 -3
- package/dist/Select.js +2 -2
- package/dist/{Slider-RE4HZQKF.css → Slider-X4PVA65R.css} +51 -2
- package/dist/Slider.cjs +2 -2
- package/dist/Slider.d.cts +20 -5
- package/dist/Slider.d.ts +20 -5
- package/dist/Slider.js +1 -1
- package/dist/Switch-36KJNDXM.css +92 -0
- package/dist/Switch.cjs +2 -2
- package/dist/Switch.d.cts +4 -0
- package/dist/Switch.d.ts +4 -0
- package/dist/Switch.js +1 -1
- package/dist/Table-ADVN6LXP.css +295 -0
- package/dist/Table.cjs +7 -3
- package/dist/Table.d.cts +103 -7
- package/dist/Table.d.ts +103 -7
- package/dist/Table.js +5 -1
- package/dist/{Tabs-A27TSZOP.css → Tabs-RHK6XAFF.css} +7 -0
- package/dist/Tabs.cjs +3 -3
- package/dist/Tabs.d.cts +2 -0
- package/dist/Tabs.d.ts +2 -0
- package/dist/Tabs.js +1 -1
- package/dist/{Tag-EYOY3UWG.css → Tag-FGDY3W7E.css} +2 -0
- package/dist/Tag.cjs +3 -3
- package/dist/Tag.d.cts +5 -0
- package/dist/Tag.d.ts +5 -0
- package/dist/Tag.js +1 -1
- package/dist/chunk-437LB2V4.js +111 -0
- package/dist/chunk-437LB2V4.js.map +1 -0
- package/dist/chunk-4MR4GVTD.js +73 -0
- package/dist/chunk-4MR4GVTD.js.map +1 -0
- package/dist/{chunk-OXYFB2ZI.js → chunk-4U4OY5RA.js} +11 -5
- package/dist/chunk-4U4OY5RA.js.map +1 -0
- package/dist/chunk-55NTFU7Y.js +476 -0
- package/dist/chunk-55NTFU7Y.js.map +1 -0
- package/dist/{chunk-5EYI27B6.js → chunk-77BVQNAQ.js} +5 -3
- package/dist/chunk-77BVQNAQ.js.map +1 -0
- package/dist/chunk-AEJJGUEN.cjs +127 -0
- package/dist/chunk-AEJJGUEN.cjs.map +1 -0
- package/dist/{chunk-3QWHDCHJ.js → chunk-AJZKESHB.js} +13 -4
- package/dist/chunk-AJZKESHB.js.map +1 -0
- package/dist/{chunk-NZPJ7BUB.cjs → chunk-AXMEZGEG.cjs} +13 -4
- package/dist/chunk-AXMEZGEG.cjs.map +1 -0
- package/dist/{chunk-HTP6UEVR.js → chunk-BBPNQ44M.js} +22 -6
- package/dist/chunk-BBPNQ44M.js.map +1 -0
- package/dist/chunk-CCBHZYE6.cjs +150 -0
- package/dist/chunk-CCBHZYE6.cjs.map +1 -0
- package/dist/{chunk-KGYLUZOU.cjs → chunk-EPFYIR63.cjs} +5 -5
- package/dist/{chunk-KGYLUZOU.cjs.map → chunk-EPFYIR63.cjs.map} +1 -1
- package/dist/chunk-F7HW2PYR.cjs +119 -0
- package/dist/chunk-F7HW2PYR.cjs.map +1 -0
- package/dist/chunk-GIVMKGZN.js +39 -0
- package/dist/chunk-GIVMKGZN.js.map +1 -0
- package/dist/{chunk-FMG3ZPGK.js → chunk-H6FCIJOP.js} +5 -3
- package/dist/chunk-H6FCIJOP.js.map +1 -0
- package/dist/{chunk-ALFDP5WX.cjs → chunk-IDM6JJLP.cjs} +22 -6
- package/dist/chunk-IDM6JJLP.cjs.map +1 -0
- package/dist/chunk-IFERLHCL.cjs +499 -0
- package/dist/chunk-IFERLHCL.cjs.map +1 -0
- package/dist/chunk-IWVKITPN.js +102 -0
- package/dist/chunk-IWVKITPN.js.map +1 -0
- package/dist/{chunk-I2ERCHFV.cjs → chunk-JKLQOB2F.cjs} +11 -5
- package/dist/chunk-JKLQOB2F.cjs.map +1 -0
- package/dist/{chunk-IGHLSNXT.cjs → chunk-K7PVJLW4.cjs} +51 -4
- package/dist/chunk-K7PVJLW4.cjs.map +1 -0
- package/dist/chunk-LDENBYRC.cjs +210 -0
- package/dist/chunk-LDENBYRC.cjs.map +1 -0
- package/dist/chunk-LSLYY5FN.js +125 -0
- package/dist/chunk-LSLYY5FN.js.map +1 -0
- package/dist/chunk-NSUD5B22.js +187 -0
- package/dist/chunk-NSUD5B22.js.map +1 -0
- package/dist/{chunk-AAMYURWQ.cjs → chunk-OPTTHURA.cjs} +5 -3
- package/dist/chunk-OPTTHURA.cjs.map +1 -0
- package/dist/{chunk-F3NHM4GX.js → chunk-OYGFMXAA.js} +13 -4
- package/dist/chunk-OYGFMXAA.js.map +1 -0
- package/dist/chunk-PBBHUUXU.cjs +133 -0
- package/dist/chunk-PBBHUUXU.cjs.map +1 -0
- package/dist/chunk-RDLPX7RK.cjs +95 -0
- package/dist/chunk-RDLPX7RK.cjs.map +1 -0
- package/dist/{chunk-XFRP2MBR.js → chunk-TYQ5CN2C.js} +51 -4
- package/dist/chunk-TYQ5CN2C.js.map +1 -0
- package/dist/{chunk-7CKHWCEA.cjs → chunk-TZSWDH5T.cjs} +5 -3
- package/dist/chunk-TZSWDH5T.cjs.map +1 -0
- package/dist/{chunk-VMHNKD3N.cjs → chunk-URF6RBW6.cjs} +13 -4
- package/dist/chunk-URF6RBW6.cjs.map +1 -0
- package/dist/{chunk-G3UWXSNQ.js → chunk-V34OPWKZ.js} +5 -4
- package/dist/chunk-V34OPWKZ.js.map +1 -0
- package/dist/{chunk-ITGCHU3Y.cjs → chunk-VICGQC6G.cjs} +5 -4
- package/dist/chunk-VICGQC6G.cjs.map +1 -0
- package/dist/chunk-YEOARJKR.cjs +40 -0
- package/dist/chunk-YEOARJKR.cjs.map +1 -0
- package/dist/chunk-Z5X5AMLA.cjs +41 -0
- package/dist/chunk-Z5X5AMLA.cjs.map +1 -0
- package/dist/chunk-Z7P6QGMT.js +115 -0
- package/dist/chunk-Z7P6QGMT.js.map +1 -0
- package/dist/{chunk-OYH6A7IQ.js → chunk-ZVCMXDTP.js} +3 -3
- package/dist/{chunk-OYH6A7IQ.js.map → chunk-ZVCMXDTP.js.map} +1 -1
- package/dist/chunk-ZWP4LSS3.js +38 -0
- package/dist/chunk-ZWP4LSS3.js.map +1 -0
- package/dist/index.cjs +57 -56
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -5
- package/dist/index.d.ts +6 -5
- package/dist/index.js +19 -18
- package/dist/index.js.map +1 -1
- package/dist/styles.css +566 -50
- package/package.json +1 -1
- package/dist/Input-Z526ARZP.css +0 -66
- package/dist/Modal-AYKNIWWQ.css +0 -79
- package/dist/Switch-NP7KKJOX.css +0 -44
- package/dist/Table-ZDPGWLH3.css +0 -139
- package/dist/chunk-2VA2HSL4.cjs +0 -121
- package/dist/chunk-2VA2HSL4.cjs.map +0 -1
- package/dist/chunk-2W2AJUZW.js +0 -118
- package/dist/chunk-2W2AJUZW.js.map +0 -1
- package/dist/chunk-3QWHDCHJ.js.map +0 -1
- package/dist/chunk-4AA22BOG.js +0 -63
- package/dist/chunk-4AA22BOG.js.map +0 -1
- package/dist/chunk-5EYI27B6.js.map +0 -1
- package/dist/chunk-77NP67ML.cjs +0 -70
- package/dist/chunk-77NP67ML.cjs.map +0 -1
- package/dist/chunk-7CKHWCEA.cjs.map +0 -1
- package/dist/chunk-7NM5BRUX.js +0 -91
- package/dist/chunk-7NM5BRUX.js.map +0 -1
- package/dist/chunk-7UJI437T.js +0 -49
- package/dist/chunk-7UJI437T.js.map +0 -1
- package/dist/chunk-AAMYURWQ.cjs.map +0 -1
- package/dist/chunk-ALFDP5WX.cjs.map +0 -1
- package/dist/chunk-F3NHM4GX.js.map +0 -1
- package/dist/chunk-FMG3ZPGK.js.map +0 -1
- package/dist/chunk-G3UWXSNQ.js.map +0 -1
- package/dist/chunk-HTP6UEVR.js.map +0 -1
- package/dist/chunk-I2ERCHFV.cjs.map +0 -1
- package/dist/chunk-IBZAGURN.cjs +0 -71
- package/dist/chunk-IBZAGURN.cjs.map +0 -1
- package/dist/chunk-IGHLSNXT.cjs.map +0 -1
- package/dist/chunk-ITGCHU3Y.cjs.map +0 -1
- package/dist/chunk-JNFCTYJT.cjs +0 -31
- package/dist/chunk-JNFCTYJT.cjs.map +0 -1
- package/dist/chunk-JWFVSBVX.cjs +0 -30
- package/dist/chunk-JWFVSBVX.cjs.map +0 -1
- package/dist/chunk-K67KIKX4.cjs +0 -67
- package/dist/chunk-K67KIKX4.cjs.map +0 -1
- package/dist/chunk-KF4MCHZL.cjs +0 -105
- package/dist/chunk-KF4MCHZL.cjs.map +0 -1
- package/dist/chunk-M6OTFXZA.js +0 -48
- package/dist/chunk-M6OTFXZA.js.map +0 -1
- package/dist/chunk-NWJW5KLN.js +0 -29
- package/dist/chunk-NWJW5KLN.js.map +0 -1
- package/dist/chunk-NZPJ7BUB.cjs.map +0 -1
- package/dist/chunk-OXYFB2ZI.js.map +0 -1
- package/dist/chunk-Q33V7MSK.js +0 -79
- package/dist/chunk-Q33V7MSK.js.map +0 -1
- package/dist/chunk-QT7SJITQ.cjs +0 -114
- package/dist/chunk-QT7SJITQ.cjs.map +0 -1
- package/dist/chunk-VMHNKD3N.cjs.map +0 -1
- package/dist/chunk-VXITDXLW.js +0 -28
- package/dist/chunk-VXITDXLW.js.map +0 -1
- package/dist/chunk-XFRP2MBR.js.map +0 -1
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
/* ============ Table ============ */
|
|
2
|
+
.table-card {
|
|
3
|
+
border-radius: var(--r-lg);
|
|
4
|
+
background: var(--bg);
|
|
5
|
+
box-shadow: var(--neu-out-sm);
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
}
|
|
8
|
+
.table-wrap {
|
|
9
|
+
border-radius: var(--r-lg);
|
|
10
|
+
background: var(--bg);
|
|
11
|
+
box-shadow: var(--neu-in-sm);
|
|
12
|
+
overflow: auto;
|
|
13
|
+
}
|
|
14
|
+
/* When scroll=y is on, the wrap itself becomes the scroll region. */
|
|
15
|
+
.table-wrap.scroll-y { overflow-y: auto; }
|
|
16
|
+
.table-wrap.scroll-x { overflow-x: auto; }
|
|
17
|
+
|
|
18
|
+
.table {
|
|
19
|
+
width: 100%;
|
|
20
|
+
border-collapse: separate;
|
|
21
|
+
border-spacing: 0;
|
|
22
|
+
font-size: 13px;
|
|
23
|
+
}
|
|
24
|
+
.table th {
|
|
25
|
+
text-align: left;
|
|
26
|
+
padding: 14px 18px;
|
|
27
|
+
background: var(--bg);
|
|
28
|
+
font-size: 11px;
|
|
29
|
+
font-weight: 700;
|
|
30
|
+
letter-spacing: 0.08em;
|
|
31
|
+
text-transform: uppercase;
|
|
32
|
+
color: var(--fg-subtle);
|
|
33
|
+
border-bottom: 1px solid var(--divider);
|
|
34
|
+
position: sticky; top: 0;
|
|
35
|
+
z-index: 1;
|
|
36
|
+
}
|
|
37
|
+
/* When the wrap is the scroll container (scroll.y), position:sticky on th needs
|
|
38
|
+
top:0 relative to the wrap — browsers already handle that. Adding a stronger
|
|
39
|
+
bg so content under the header doesn't bleed through. */
|
|
40
|
+
.table.sticky-head th { background: var(--bg); }
|
|
41
|
+
.table th.sortable { cursor: pointer; user-select: none; }
|
|
42
|
+
.table th.sortable:hover { color: var(--fg); }
|
|
43
|
+
.table th .th-label { vertical-align: middle; }
|
|
44
|
+
.table th .sort-ind {
|
|
45
|
+
display: inline-flex;
|
|
46
|
+
width: 16px; height: 16px;
|
|
47
|
+
border-radius: 6px;
|
|
48
|
+
background: var(--bg);
|
|
49
|
+
box-shadow: var(--neu-flat);
|
|
50
|
+
align-items: center; justify-content: center;
|
|
51
|
+
margin-left: 6px;
|
|
52
|
+
color: var(--fg-subtle);
|
|
53
|
+
vertical-align: middle;
|
|
54
|
+
}
|
|
55
|
+
.table th.sorted .sort-ind { color: var(--accent); box-shadow: var(--neu-in-sm); }
|
|
56
|
+
.table td {
|
|
57
|
+
padding: 12px 18px;
|
|
58
|
+
border-bottom: 1px solid var(--divider);
|
|
59
|
+
vertical-align: middle;
|
|
60
|
+
}
|
|
61
|
+
.table.hoverable tbody tr:hover td { background: color-mix(in oklch, var(--accent-soft) 40%, transparent); }
|
|
62
|
+
.table tbody tr.clickable { cursor: pointer; }
|
|
63
|
+
.table tbody tr.selected td { background: color-mix(in oklch, var(--accent-soft) 80%, transparent); color: var(--accent-ink); }
|
|
64
|
+
.table tbody tr:last-child td { border-bottom: none; }
|
|
65
|
+
.table.striped tbody tr:nth-child(even) td {
|
|
66
|
+
background: color-mix(in oklch, var(--bg-sunken) 40%, transparent);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* Embossed: each row sits on the surface */
|
|
70
|
+
.table.embossed { border-spacing: 0; }
|
|
71
|
+
.table.embossed tbody td {
|
|
72
|
+
background: var(--bg);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* Card-row variant: each row is its own raised pill */
|
|
76
|
+
.table.cards {
|
|
77
|
+
border-collapse: separate;
|
|
78
|
+
border-spacing: 0 10px;
|
|
79
|
+
padding: 10px;
|
|
80
|
+
background: transparent;
|
|
81
|
+
box-shadow: none;
|
|
82
|
+
}
|
|
83
|
+
.table.cards thead th {
|
|
84
|
+
background: transparent;
|
|
85
|
+
border-bottom: none;
|
|
86
|
+
padding-top: 0;
|
|
87
|
+
padding-bottom: 6px;
|
|
88
|
+
}
|
|
89
|
+
.table.cards tbody td {
|
|
90
|
+
background: var(--bg);
|
|
91
|
+
border-bottom: none;
|
|
92
|
+
padding: 14px 18px;
|
|
93
|
+
}
|
|
94
|
+
.table.cards tbody td:first-child {
|
|
95
|
+
border-radius: var(--r-md) 0 0 var(--r-md);
|
|
96
|
+
box-shadow: -4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
|
|
97
|
+
}
|
|
98
|
+
.table.cards tbody td:last-child {
|
|
99
|
+
border-radius: 0 var(--r-md) var(--r-md) 0;
|
|
100
|
+
box-shadow: 4px 4px 8px var(--shadow-dark), 4px -4px 8px var(--shadow-light);
|
|
101
|
+
}
|
|
102
|
+
.table.cards tbody td:not(:first-child):not(:last-child) {
|
|
103
|
+
box-shadow: 0 4px 8px var(--shadow-dark), 0 -4px 8px var(--shadow-light);
|
|
104
|
+
}
|
|
105
|
+
.table.cards.hoverable tbody tr:hover td { background: var(--bg); transform: translateY(-1px); }
|
|
106
|
+
|
|
107
|
+
.table .row-check { width: 44px; }
|
|
108
|
+
.table .row-check .checkbox { display: inline-flex; }
|
|
109
|
+
.table .row-expand { width: 40px; text-align: center; }
|
|
110
|
+
.table-empty { padding: 60px 20px; text-align: center; color: var(--fg-muted); }
|
|
111
|
+
|
|
112
|
+
/* Expand button */
|
|
113
|
+
.expand-btn {
|
|
114
|
+
width: 22px; height: 22px;
|
|
115
|
+
border: none;
|
|
116
|
+
border-radius: var(--r-sm);
|
|
117
|
+
background: var(--bg);
|
|
118
|
+
box-shadow: var(--neu-flat);
|
|
119
|
+
color: var(--fg-subtle);
|
|
120
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
121
|
+
cursor: pointer;
|
|
122
|
+
transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
|
|
123
|
+
}
|
|
124
|
+
.expand-btn:hover { color: var(--accent-ink); box-shadow: var(--neu-out-sm); }
|
|
125
|
+
.expand-btn.open { transform: rotate(90deg); color: var(--accent-ink); box-shadow: var(--neu-in-sm); }
|
|
126
|
+
|
|
127
|
+
/* Expanded row panel */
|
|
128
|
+
.table tbody tr.expanded-row td {
|
|
129
|
+
padding: 0 18px 14px 18px;
|
|
130
|
+
border-bottom: 1px solid var(--divider);
|
|
131
|
+
background: color-mix(in oklch, var(--bg-sunken) 25%, transparent);
|
|
132
|
+
}
|
|
133
|
+
.expanded-panel {
|
|
134
|
+
padding: 14px 16px;
|
|
135
|
+
border-radius: var(--r-md);
|
|
136
|
+
background: var(--bg);
|
|
137
|
+
box-shadow: var(--neu-in-sm);
|
|
138
|
+
color: var(--fg);
|
|
139
|
+
font-size: 13px;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/* Radio-style row selector */
|
|
143
|
+
.table .row-check .radio-dot {
|
|
144
|
+
width: 16px; height: 16px;
|
|
145
|
+
border-radius: 50%;
|
|
146
|
+
border: none;
|
|
147
|
+
padding: 0;
|
|
148
|
+
background: var(--bg);
|
|
149
|
+
box-shadow: var(--neu-in-sm);
|
|
150
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
151
|
+
cursor: pointer;
|
|
152
|
+
transition: box-shadow var(--dur-fast) var(--ease);
|
|
153
|
+
}
|
|
154
|
+
.table .row-check .radio-dot:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
155
|
+
.table .row-check .radio-dot.checked {
|
|
156
|
+
box-shadow: var(--neu-out-sm);
|
|
157
|
+
}
|
|
158
|
+
.table .row-check .radio-dot.checked::after {
|
|
159
|
+
content: "";
|
|
160
|
+
width: 8px; height: 8px;
|
|
161
|
+
border-radius: 50%;
|
|
162
|
+
background: var(--accent);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/* Filter button on header */
|
|
166
|
+
.table th.filterable .filter-ind {
|
|
167
|
+
display: inline-flex;
|
|
168
|
+
width: 18px; height: 18px;
|
|
169
|
+
border-radius: 5px;
|
|
170
|
+
background: var(--bg);
|
|
171
|
+
box-shadow: var(--neu-flat);
|
|
172
|
+
color: var(--fg-subtle);
|
|
173
|
+
align-items: center; justify-content: center;
|
|
174
|
+
margin-left: 6px;
|
|
175
|
+
cursor: pointer;
|
|
176
|
+
border: none;
|
|
177
|
+
vertical-align: middle;
|
|
178
|
+
padding: 0;
|
|
179
|
+
transition: color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
|
|
180
|
+
}
|
|
181
|
+
.table th.filterable .filter-ind:hover { color: var(--fg); }
|
|
182
|
+
.table th.filterable .filter-ind.active {
|
|
183
|
+
color: var(--accent-ink);
|
|
184
|
+
box-shadow: var(--neu-in-sm);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/* Filter popover panel (portaled to body) */
|
|
188
|
+
.table-filter-panel {
|
|
189
|
+
z-index: 1001;
|
|
190
|
+
min-width: 200px;
|
|
191
|
+
max-width: 260px;
|
|
192
|
+
background: var(--bg);
|
|
193
|
+
border-radius: var(--r-md);
|
|
194
|
+
box-shadow: var(--neu-out-lg);
|
|
195
|
+
padding: 10px;
|
|
196
|
+
animation: menuIn var(--dur) var(--ease);
|
|
197
|
+
}
|
|
198
|
+
.table-filter-options {
|
|
199
|
+
display: flex;
|
|
200
|
+
flex-direction: column;
|
|
201
|
+
max-height: 220px;
|
|
202
|
+
overflow-y: auto;
|
|
203
|
+
gap: 4px;
|
|
204
|
+
padding: 4px;
|
|
205
|
+
}
|
|
206
|
+
.table-filter-item {
|
|
207
|
+
display: flex;
|
|
208
|
+
align-items: center;
|
|
209
|
+
gap: 8px;
|
|
210
|
+
padding: 6px 8px;
|
|
211
|
+
border-radius: var(--r-sm);
|
|
212
|
+
font-size: 13px;
|
|
213
|
+
color: var(--fg);
|
|
214
|
+
cursor: pointer;
|
|
215
|
+
transition: background var(--dur-fast) var(--ease);
|
|
216
|
+
}
|
|
217
|
+
.table-filter-item:hover {
|
|
218
|
+
background: color-mix(in oklch, var(--accent-soft) 40%, transparent);
|
|
219
|
+
}
|
|
220
|
+
.table-filter-actions {
|
|
221
|
+
display: flex;
|
|
222
|
+
justify-content: flex-end;
|
|
223
|
+
gap: 6px;
|
|
224
|
+
margin-top: 6px;
|
|
225
|
+
padding-top: 8px;
|
|
226
|
+
border-top: 1px solid var(--divider);
|
|
227
|
+
}
|
|
228
|
+
.table-filter-actions .tf-btn {
|
|
229
|
+
border: none;
|
|
230
|
+
padding: 6px 12px;
|
|
231
|
+
border-radius: var(--r-sm);
|
|
232
|
+
background: var(--bg);
|
|
233
|
+
box-shadow: var(--neu-out-sm);
|
|
234
|
+
font-size: 12px;
|
|
235
|
+
font-family: inherit;
|
|
236
|
+
color: var(--fg);
|
|
237
|
+
cursor: pointer;
|
|
238
|
+
transition: box-shadow var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
|
|
239
|
+
}
|
|
240
|
+
.table-filter-actions .tf-btn:hover { box-shadow: var(--neu-in-sm); }
|
|
241
|
+
.table-filter-actions .tf-btn.primary { color: var(--accent-ink); font-weight: 600; }
|
|
242
|
+
.table-filter-actions .tf-btn.ghost { color: var(--fg-muted); box-shadow: var(--neu-flat); }
|
|
243
|
+
.table-filter-actions .tf-btn.ghost:hover { box-shadow: var(--neu-in-sm); }
|
|
244
|
+
|
|
245
|
+
/* Built-in pagination bar */
|
|
246
|
+
.table-pagination {
|
|
247
|
+
margin-top: 12px;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/* Pro: card-wrap with toolbar + table + footer */
|
|
251
|
+
.table-card {
|
|
252
|
+
border-radius: var(--r-lg);
|
|
253
|
+
background: var(--bg);
|
|
254
|
+
box-shadow: var(--neu-out-sm);
|
|
255
|
+
overflow: hidden;
|
|
256
|
+
}
|
|
257
|
+
.table-card .table-wrap { background: transparent; box-shadow: none; border-radius: 0; }
|
|
258
|
+
.table-card .table-wrap.joined { border-radius: 0; }
|
|
259
|
+
/* When TablePro hosts the built-in pagination, seat it inside the card. */
|
|
260
|
+
.table-card .table-pagination {
|
|
261
|
+
margin-top: 0;
|
|
262
|
+
padding: 6px 16px;
|
|
263
|
+
border-top: 1px solid var(--divider);
|
|
264
|
+
background: color-mix(in oklch, var(--bg-sunken) 30%, transparent);
|
|
265
|
+
}
|
|
266
|
+
.table-toolbar {
|
|
267
|
+
display: flex;
|
|
268
|
+
align-items: center;
|
|
269
|
+
gap: var(--gap-3);
|
|
270
|
+
padding: 14px 16px;
|
|
271
|
+
border-bottom: 1px solid var(--divider);
|
|
272
|
+
}
|
|
273
|
+
.table-toolbar .table-title {
|
|
274
|
+
font-size: 14px;
|
|
275
|
+
font-weight: 600;
|
|
276
|
+
margin-right: 8px;
|
|
277
|
+
}
|
|
278
|
+
.table-toolbar-main {
|
|
279
|
+
flex: 1;
|
|
280
|
+
display: flex;
|
|
281
|
+
align-items: center;
|
|
282
|
+
gap: 10px;
|
|
283
|
+
min-width: 0;
|
|
284
|
+
}
|
|
285
|
+
.table-toolbar-actions {
|
|
286
|
+
display: flex;
|
|
287
|
+
align-items: center;
|
|
288
|
+
gap: 8px;
|
|
289
|
+
flex-shrink: 0;
|
|
290
|
+
}
|
|
291
|
+
.table-footer {
|
|
292
|
+
padding: 10px 16px;
|
|
293
|
+
border-top: 1px solid var(--divider);
|
|
294
|
+
background: color-mix(in oklch, var(--bg-sunken) 30%, transparent);
|
|
295
|
+
}
|
package/dist/Table.cjs
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkIFERLHCL_cjs = require('./chunk-IFERLHCL.cjs');
|
|
4
|
+
require('./chunk-K7PVJLW4.cjs');
|
|
5
|
+
require('./chunk-EPFYIR63.cjs');
|
|
6
|
+
require('./chunk-URF6RBW6.cjs');
|
|
4
7
|
require('./chunk-C5TGQ7CV.cjs');
|
|
8
|
+
require('./chunk-RZ2E3XEU.cjs');
|
|
5
9
|
require('./chunk-YVO7XO4W.cjs');
|
|
6
10
|
|
|
7
11
|
|
|
8
12
|
|
|
9
13
|
Object.defineProperty(exports, "Table", {
|
|
10
14
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunkIFERLHCL_cjs.Table; }
|
|
12
16
|
});
|
|
13
17
|
Object.defineProperty(exports, "TablePro", {
|
|
14
18
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
19
|
+
get: function () { return chunkIFERLHCL_cjs.TablePro; }
|
|
16
20
|
});
|
|
17
21
|
//# sourceMappingURL=Table.cjs.map
|
|
18
22
|
//# sourceMappingURL=Table.cjs.map
|
package/dist/Table.d.cts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
|
|
4
|
+
type RowKey = string | number;
|
|
5
|
+
interface TableColumnFilterItem {
|
|
6
|
+
text: React.ReactNode;
|
|
7
|
+
value: string | number;
|
|
8
|
+
}
|
|
4
9
|
interface TableColumn<Row = any> {
|
|
5
10
|
key: string;
|
|
6
11
|
title: React.ReactNode;
|
|
@@ -10,12 +15,78 @@ interface TableColumn<Row = any> {
|
|
|
10
15
|
width?: number | string;
|
|
11
16
|
align?: "left" | "center" | "right";
|
|
12
17
|
sortable?: boolean;
|
|
18
|
+
/** Filter options shown in header dropdown. Requires `onFilter` (or data index match). */
|
|
19
|
+
filters?: TableColumnFilterItem[];
|
|
20
|
+
/**
|
|
21
|
+
* Predicate to decide whether a row matches a given filter value.
|
|
22
|
+
* If omitted, falls back to strict equality on `row[dataIndex]`.
|
|
23
|
+
*/
|
|
24
|
+
onFilter?: (value: string | number, row: Row) => boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Default active filter values. When `filteredValue` is controlled externally via
|
|
27
|
+
* `Table.filteredValue`, prefer managing it at the table level.
|
|
28
|
+
*/
|
|
29
|
+
defaultFilteredValue?: (string | number)[];
|
|
30
|
+
/** Controlled filter selection — when provided, makes the column's filter controlled. */
|
|
31
|
+
filteredValue?: (string | number)[];
|
|
13
32
|
}
|
|
14
33
|
type TableVariant = "default" | "striped" | "embossed" | "cards";
|
|
34
|
+
interface PaginationConfig {
|
|
35
|
+
/** Current page (1-indexed). Makes pagination controlled. */
|
|
36
|
+
current?: number;
|
|
37
|
+
/** Uncontrolled initial page. */
|
|
38
|
+
defaultCurrent?: number;
|
|
39
|
+
/** Items per page. */
|
|
40
|
+
pageSize?: number;
|
|
41
|
+
/** Default items per page (uncontrolled). */
|
|
42
|
+
defaultPageSize?: number;
|
|
43
|
+
/** Total item count. Defaults to `data.length` when omitted. */
|
|
44
|
+
total?: number;
|
|
45
|
+
/** Fired when user picks a page or changes page size. */
|
|
46
|
+
onChange?: (page: number, pageSize: number) => void;
|
|
47
|
+
/** Reserved for future: jump-to-page input. */
|
|
48
|
+
showQuickJumper?: boolean;
|
|
49
|
+
/** Reserved for future: page size dropdown. */
|
|
50
|
+
showSizeChanger?: boolean;
|
|
51
|
+
/** Reserved for future: selectable page sizes. */
|
|
52
|
+
pageSizeOptions?: number[];
|
|
53
|
+
}
|
|
54
|
+
interface RowSelectionConfig<Row = any> {
|
|
55
|
+
/** "checkbox" (default) allows multi-select; "radio" allows only one row at a time. */
|
|
56
|
+
type?: "checkbox" | "radio";
|
|
57
|
+
/** Controlled list of selected row keys. */
|
|
58
|
+
selectedRowKeys?: RowKey[];
|
|
59
|
+
/** Uncontrolled initial selection. */
|
|
60
|
+
defaultSelectedRowKeys?: RowKey[];
|
|
61
|
+
/** Fired on selection change; receives the new keys and matching rows. */
|
|
62
|
+
onChange?: (selectedRowKeys: RowKey[], selectedRows: Row[]) => void;
|
|
63
|
+
/** Per-row switch toggling checkbox disabled state. */
|
|
64
|
+
getCheckboxProps?: (row: Row) => {
|
|
65
|
+
disabled?: boolean;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
interface ExpandableConfig<Row = any> {
|
|
69
|
+
/** Controlled expanded row keys. */
|
|
70
|
+
expandedRowKeys?: RowKey[];
|
|
71
|
+
/** Uncontrolled initial expanded row keys. */
|
|
72
|
+
defaultExpandedRowKeys?: RowKey[];
|
|
73
|
+
/** Fired when a row expands / collapses. */
|
|
74
|
+
onExpand?: (expanded: boolean, row: Row) => void;
|
|
75
|
+
/** Render function for the expanded panel. When omitted, no expand UI renders. */
|
|
76
|
+
expandedRowRender?: (row: Row, index: number) => React.ReactNode;
|
|
77
|
+
/** Decide whether a given row can be expanded. */
|
|
78
|
+
rowExpandable?: (row: Row) => boolean;
|
|
79
|
+
}
|
|
80
|
+
interface TableScrollConfig {
|
|
81
|
+
/** Horizontal scroll: min-width of the inner table. */
|
|
82
|
+
x?: number | string;
|
|
83
|
+
/** Vertical scroll: max body height (with sticky header). */
|
|
84
|
+
y?: number | string;
|
|
85
|
+
}
|
|
15
86
|
interface TableProps<Row = any> {
|
|
16
87
|
columns: TableColumn<Row>[];
|
|
17
88
|
data: Row[];
|
|
18
|
-
rowKey?: keyof Row | ((row: Row) =>
|
|
89
|
+
rowKey?: keyof Row | ((row: Row) => RowKey);
|
|
19
90
|
/** Visual variant. */
|
|
20
91
|
variant?: TableVariant;
|
|
21
92
|
/** Hoverable rows. */
|
|
@@ -26,10 +97,32 @@ interface TableProps<Row = any> {
|
|
|
26
97
|
sortKey?: string;
|
|
27
98
|
sortDir?: "asc" | "desc";
|
|
28
99
|
onSort?: (key: string) => void;
|
|
29
|
-
/**
|
|
100
|
+
/**
|
|
101
|
+
* Row selection config — preferred API (antd-style).
|
|
102
|
+
* When provided, takes precedence over `selectable` / `selected` / `onSelect`.
|
|
103
|
+
*/
|
|
104
|
+
rowSelection?: RowSelectionConfig<Row>;
|
|
105
|
+
/**
|
|
106
|
+
* @deprecated Use `rowSelection` instead. Kept for backwards compatibility.
|
|
107
|
+
*/
|
|
30
108
|
selectable?: boolean;
|
|
31
|
-
|
|
32
|
-
|
|
109
|
+
/**
|
|
110
|
+
* @deprecated Use `rowSelection.selectedRowKeys` instead.
|
|
111
|
+
*/
|
|
112
|
+
selected?: RowKey[];
|
|
113
|
+
/**
|
|
114
|
+
* @deprecated Use `rowSelection.onChange` instead.
|
|
115
|
+
*/
|
|
116
|
+
onSelect?: (keys: RowKey[]) => void;
|
|
117
|
+
/** Expandable row config. */
|
|
118
|
+
expandable?: ExpandableConfig<Row>;
|
|
119
|
+
/**
|
|
120
|
+
* Pagination config — `false` disables pagination; otherwise renders a bottom
|
|
121
|
+
* pagination bar and slices the data accordingly.
|
|
122
|
+
*/
|
|
123
|
+
pagination?: false | PaginationConfig;
|
|
124
|
+
/** Horizontal / vertical scroll config. */
|
|
125
|
+
scroll?: TableScrollConfig;
|
|
33
126
|
/** Called when user clicks a row. */
|
|
34
127
|
onRowClick?: (row: Row, index: number) => void;
|
|
35
128
|
/** Empty state. */
|
|
@@ -37,13 +130,13 @@ interface TableProps<Row = any> {
|
|
|
37
130
|
className?: string;
|
|
38
131
|
}
|
|
39
132
|
/** `Table` — neumorphic data table with sorting, selection and visual variants. */
|
|
40
|
-
declare function Table<Row extends Record<string, any> = any>({ columns, data, rowKey, variant, hoverable, striped, sortKey, sortDir, onSort, selectable, selected, onSelect, onRowClick, empty, className, }: TableProps<Row>): react_jsx_runtime.JSX.Element;
|
|
133
|
+
declare function Table<Row extends Record<string, any> = any>({ columns, data, rowKey, variant, hoverable, striped, sortKey, sortDir, onSort, rowSelection, selectable, selected, onSelect, expandable, pagination, scroll, onRowClick, empty, className, }: TableProps<Row>): react_jsx_runtime.JSX.Element;
|
|
41
134
|
interface TableProProps<Row = any> extends TableProps<Row> {
|
|
42
135
|
/** Toolbar slot — search input, filter, etc. */
|
|
43
136
|
toolbar?: React.ReactNode;
|
|
44
137
|
/** Right-aligned actions slot in toolbar. */
|
|
45
138
|
actions?: React.ReactNode;
|
|
46
|
-
/** Footer slot — usually <Pagination />. */
|
|
139
|
+
/** Footer slot — usually <Pagination />. Optional now that `pagination` is built-in. */
|
|
47
140
|
footer?: React.ReactNode;
|
|
48
141
|
/** Title shown above the toolbar. */
|
|
49
142
|
title?: React.ReactNode;
|
|
@@ -51,7 +144,10 @@ interface TableProProps<Row = any> extends TableProps<Row> {
|
|
|
51
144
|
/**
|
|
52
145
|
* `TablePro` — full-featured table card with toolbar, sortable/selectable rows,
|
|
53
146
|
* variants, and a footer slot for pagination.
|
|
147
|
+
*
|
|
148
|
+
* Prefer the built-in `pagination` prop over rendering a `<Pagination />` in the
|
|
149
|
+
* `footer` slot; `footer` still works for custom footers.
|
|
54
150
|
*/
|
|
55
151
|
declare function TablePro<Row extends Record<string, any> = any>({ toolbar, actions, footer, title, className, ...tableProps }: TableProProps<Row>): react_jsx_runtime.JSX.Element;
|
|
56
152
|
|
|
57
|
-
export { Table, type TableColumn, TablePro, type TableProProps, type TableProps, type TableVariant };
|
|
153
|
+
export { type ExpandableConfig, type PaginationConfig, type RowKey, type RowSelectionConfig, Table, type TableColumn, type TableColumnFilterItem, TablePro, type TableProProps, type TableProps, type TableScrollConfig, type TableVariant };
|
package/dist/Table.d.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
|
|
4
|
+
type RowKey = string | number;
|
|
5
|
+
interface TableColumnFilterItem {
|
|
6
|
+
text: React.ReactNode;
|
|
7
|
+
value: string | number;
|
|
8
|
+
}
|
|
4
9
|
interface TableColumn<Row = any> {
|
|
5
10
|
key: string;
|
|
6
11
|
title: React.ReactNode;
|
|
@@ -10,12 +15,78 @@ interface TableColumn<Row = any> {
|
|
|
10
15
|
width?: number | string;
|
|
11
16
|
align?: "left" | "center" | "right";
|
|
12
17
|
sortable?: boolean;
|
|
18
|
+
/** Filter options shown in header dropdown. Requires `onFilter` (or data index match). */
|
|
19
|
+
filters?: TableColumnFilterItem[];
|
|
20
|
+
/**
|
|
21
|
+
* Predicate to decide whether a row matches a given filter value.
|
|
22
|
+
* If omitted, falls back to strict equality on `row[dataIndex]`.
|
|
23
|
+
*/
|
|
24
|
+
onFilter?: (value: string | number, row: Row) => boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Default active filter values. When `filteredValue` is controlled externally via
|
|
27
|
+
* `Table.filteredValue`, prefer managing it at the table level.
|
|
28
|
+
*/
|
|
29
|
+
defaultFilteredValue?: (string | number)[];
|
|
30
|
+
/** Controlled filter selection — when provided, makes the column's filter controlled. */
|
|
31
|
+
filteredValue?: (string | number)[];
|
|
13
32
|
}
|
|
14
33
|
type TableVariant = "default" | "striped" | "embossed" | "cards";
|
|
34
|
+
interface PaginationConfig {
|
|
35
|
+
/** Current page (1-indexed). Makes pagination controlled. */
|
|
36
|
+
current?: number;
|
|
37
|
+
/** Uncontrolled initial page. */
|
|
38
|
+
defaultCurrent?: number;
|
|
39
|
+
/** Items per page. */
|
|
40
|
+
pageSize?: number;
|
|
41
|
+
/** Default items per page (uncontrolled). */
|
|
42
|
+
defaultPageSize?: number;
|
|
43
|
+
/** Total item count. Defaults to `data.length` when omitted. */
|
|
44
|
+
total?: number;
|
|
45
|
+
/** Fired when user picks a page or changes page size. */
|
|
46
|
+
onChange?: (page: number, pageSize: number) => void;
|
|
47
|
+
/** Reserved for future: jump-to-page input. */
|
|
48
|
+
showQuickJumper?: boolean;
|
|
49
|
+
/** Reserved for future: page size dropdown. */
|
|
50
|
+
showSizeChanger?: boolean;
|
|
51
|
+
/** Reserved for future: selectable page sizes. */
|
|
52
|
+
pageSizeOptions?: number[];
|
|
53
|
+
}
|
|
54
|
+
interface RowSelectionConfig<Row = any> {
|
|
55
|
+
/** "checkbox" (default) allows multi-select; "radio" allows only one row at a time. */
|
|
56
|
+
type?: "checkbox" | "radio";
|
|
57
|
+
/** Controlled list of selected row keys. */
|
|
58
|
+
selectedRowKeys?: RowKey[];
|
|
59
|
+
/** Uncontrolled initial selection. */
|
|
60
|
+
defaultSelectedRowKeys?: RowKey[];
|
|
61
|
+
/** Fired on selection change; receives the new keys and matching rows. */
|
|
62
|
+
onChange?: (selectedRowKeys: RowKey[], selectedRows: Row[]) => void;
|
|
63
|
+
/** Per-row switch toggling checkbox disabled state. */
|
|
64
|
+
getCheckboxProps?: (row: Row) => {
|
|
65
|
+
disabled?: boolean;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
interface ExpandableConfig<Row = any> {
|
|
69
|
+
/** Controlled expanded row keys. */
|
|
70
|
+
expandedRowKeys?: RowKey[];
|
|
71
|
+
/** Uncontrolled initial expanded row keys. */
|
|
72
|
+
defaultExpandedRowKeys?: RowKey[];
|
|
73
|
+
/** Fired when a row expands / collapses. */
|
|
74
|
+
onExpand?: (expanded: boolean, row: Row) => void;
|
|
75
|
+
/** Render function for the expanded panel. When omitted, no expand UI renders. */
|
|
76
|
+
expandedRowRender?: (row: Row, index: number) => React.ReactNode;
|
|
77
|
+
/** Decide whether a given row can be expanded. */
|
|
78
|
+
rowExpandable?: (row: Row) => boolean;
|
|
79
|
+
}
|
|
80
|
+
interface TableScrollConfig {
|
|
81
|
+
/** Horizontal scroll: min-width of the inner table. */
|
|
82
|
+
x?: number | string;
|
|
83
|
+
/** Vertical scroll: max body height (with sticky header). */
|
|
84
|
+
y?: number | string;
|
|
85
|
+
}
|
|
15
86
|
interface TableProps<Row = any> {
|
|
16
87
|
columns: TableColumn<Row>[];
|
|
17
88
|
data: Row[];
|
|
18
|
-
rowKey?: keyof Row | ((row: Row) =>
|
|
89
|
+
rowKey?: keyof Row | ((row: Row) => RowKey);
|
|
19
90
|
/** Visual variant. */
|
|
20
91
|
variant?: TableVariant;
|
|
21
92
|
/** Hoverable rows. */
|
|
@@ -26,10 +97,32 @@ interface TableProps<Row = any> {
|
|
|
26
97
|
sortKey?: string;
|
|
27
98
|
sortDir?: "asc" | "desc";
|
|
28
99
|
onSort?: (key: string) => void;
|
|
29
|
-
/**
|
|
100
|
+
/**
|
|
101
|
+
* Row selection config — preferred API (antd-style).
|
|
102
|
+
* When provided, takes precedence over `selectable` / `selected` / `onSelect`.
|
|
103
|
+
*/
|
|
104
|
+
rowSelection?: RowSelectionConfig<Row>;
|
|
105
|
+
/**
|
|
106
|
+
* @deprecated Use `rowSelection` instead. Kept for backwards compatibility.
|
|
107
|
+
*/
|
|
30
108
|
selectable?: boolean;
|
|
31
|
-
|
|
32
|
-
|
|
109
|
+
/**
|
|
110
|
+
* @deprecated Use `rowSelection.selectedRowKeys` instead.
|
|
111
|
+
*/
|
|
112
|
+
selected?: RowKey[];
|
|
113
|
+
/**
|
|
114
|
+
* @deprecated Use `rowSelection.onChange` instead.
|
|
115
|
+
*/
|
|
116
|
+
onSelect?: (keys: RowKey[]) => void;
|
|
117
|
+
/** Expandable row config. */
|
|
118
|
+
expandable?: ExpandableConfig<Row>;
|
|
119
|
+
/**
|
|
120
|
+
* Pagination config — `false` disables pagination; otherwise renders a bottom
|
|
121
|
+
* pagination bar and slices the data accordingly.
|
|
122
|
+
*/
|
|
123
|
+
pagination?: false | PaginationConfig;
|
|
124
|
+
/** Horizontal / vertical scroll config. */
|
|
125
|
+
scroll?: TableScrollConfig;
|
|
33
126
|
/** Called when user clicks a row. */
|
|
34
127
|
onRowClick?: (row: Row, index: number) => void;
|
|
35
128
|
/** Empty state. */
|
|
@@ -37,13 +130,13 @@ interface TableProps<Row = any> {
|
|
|
37
130
|
className?: string;
|
|
38
131
|
}
|
|
39
132
|
/** `Table` — neumorphic data table with sorting, selection and visual variants. */
|
|
40
|
-
declare function Table<Row extends Record<string, any> = any>({ columns, data, rowKey, variant, hoverable, striped, sortKey, sortDir, onSort, selectable, selected, onSelect, onRowClick, empty, className, }: TableProps<Row>): react_jsx_runtime.JSX.Element;
|
|
133
|
+
declare function Table<Row extends Record<string, any> = any>({ columns, data, rowKey, variant, hoverable, striped, sortKey, sortDir, onSort, rowSelection, selectable, selected, onSelect, expandable, pagination, scroll, onRowClick, empty, className, }: TableProps<Row>): react_jsx_runtime.JSX.Element;
|
|
41
134
|
interface TableProProps<Row = any> extends TableProps<Row> {
|
|
42
135
|
/** Toolbar slot — search input, filter, etc. */
|
|
43
136
|
toolbar?: React.ReactNode;
|
|
44
137
|
/** Right-aligned actions slot in toolbar. */
|
|
45
138
|
actions?: React.ReactNode;
|
|
46
|
-
/** Footer slot — usually <Pagination />. */
|
|
139
|
+
/** Footer slot — usually <Pagination />. Optional now that `pagination` is built-in. */
|
|
47
140
|
footer?: React.ReactNode;
|
|
48
141
|
/** Title shown above the toolbar. */
|
|
49
142
|
title?: React.ReactNode;
|
|
@@ -51,7 +144,10 @@ interface TableProProps<Row = any> extends TableProps<Row> {
|
|
|
51
144
|
/**
|
|
52
145
|
* `TablePro` — full-featured table card with toolbar, sortable/selectable rows,
|
|
53
146
|
* variants, and a footer slot for pagination.
|
|
147
|
+
*
|
|
148
|
+
* Prefer the built-in `pagination` prop over rendering a `<Pagination />` in the
|
|
149
|
+
* `footer` slot; `footer` still works for custom footers.
|
|
54
150
|
*/
|
|
55
151
|
declare function TablePro<Row extends Record<string, any> = any>({ toolbar, actions, footer, title, className, ...tableProps }: TableProProps<Row>): react_jsx_runtime.JSX.Element;
|
|
56
152
|
|
|
57
|
-
export { Table, type TableColumn, TablePro, type TableProProps, type TableProps, type TableVariant };
|
|
153
|
+
export { type ExpandableConfig, type PaginationConfig, type RowKey, type RowSelectionConfig, Table, type TableColumn, type TableColumnFilterItem, TablePro, type TableProProps, type TableProps, type TableScrollConfig, type TableVariant };
|
package/dist/Table.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
export { Table, TablePro } from './chunk-
|
|
1
|
+
export { Table, TablePro } from './chunk-55NTFU7Y.js';
|
|
2
|
+
import './chunk-TYQ5CN2C.js';
|
|
3
|
+
import './chunk-ZVCMXDTP.js';
|
|
4
|
+
import './chunk-AJZKESHB.js';
|
|
2
5
|
import './chunk-M6CGYGEO.js';
|
|
6
|
+
import './chunk-V2DIQ3RH.js';
|
|
3
7
|
import './chunk-GEYMWUW6.js';
|
|
4
8
|
//# sourceMappingURL=Table.js.map
|
|
5
9
|
//# sourceMappingURL=Table.js.map
|
|
@@ -58,6 +58,13 @@
|
|
|
58
58
|
box-shadow: 0 0 8px var(--accent-glow);
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
+
/* Centered nav — works for pill / segmented (self-align) and line (flex-center) */
|
|
62
|
+
.tabs.centered .tabs-nav { align-self: center; }
|
|
63
|
+
.tabs.centered.line .tabs-nav,
|
|
64
|
+
.tabs.centered.underline .tabs-nav { align-self: stretch; justify-content: center; }
|
|
65
|
+
.tabs.centered.line .tabs-nav .tab,
|
|
66
|
+
.tabs.centered.underline .tabs-nav .tab { margin-right: 11px; margin-left: 11px; }
|
|
67
|
+
|
|
61
68
|
.tabs-content { padding: var(--gap-2) 0; }
|
|
62
69
|
|
|
63
70
|
/* Segmented (owned by Tabs.tsx — Segmented is co-exported) */
|
package/dist/Tabs.cjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkVICGQC6G_cjs = require('./chunk-VICGQC6G.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "Segmented", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkVICGQC6G_cjs.Segmented; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "Tabs", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkVICGQC6G_cjs.Tabs; }
|
|
14
14
|
});
|
|
15
15
|
//# sourceMappingURL=Tabs.cjs.map
|
|
16
16
|
//# sourceMappingURL=Tabs.cjs.map
|
package/dist/Tabs.d.cts
CHANGED
|
@@ -13,6 +13,8 @@ interface TabsProps {
|
|
|
13
13
|
defaultActiveKey?: string;
|
|
14
14
|
onChange?: (key: string) => void;
|
|
15
15
|
variant?: "line" | "pill" | "segmented";
|
|
16
|
+
/** Center-align the tab bar horizontally. */
|
|
17
|
+
centered?: boolean;
|
|
16
18
|
className?: string;
|
|
17
19
|
}
|
|
18
20
|
/** `Tabs` — switchable sections. */
|