reke-ui 0.4.0 → 0.4.1
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/README.md +6 -0
- package/custom-elements.json +591 -119
- package/dist/components/reke-table/reke-table.d.ts +201 -3
- package/dist/components/reke-table/reke-table.d.ts.map +1 -1
- package/dist/components/reke-table/reke-table.js +238 -64
- package/dist/components/reke-table/reke-table.styles.d.ts.map +1 -1
- package/dist/components/reke-table/reke-table.styles.js +29 -0
- package/dist/shared/tailwind.js +1 -1
- package/package.json +2 -1
package/custom-elements.json
CHANGED
|
@@ -4,48 +4,48 @@
|
|
|
4
4
|
"modules": [
|
|
5
5
|
{
|
|
6
6
|
"kind": "javascript-module",
|
|
7
|
-
"path": "src/components/reke-
|
|
7
|
+
"path": "src/components/reke-badge/reke-badge.ts",
|
|
8
8
|
"declarations": [
|
|
9
9
|
{
|
|
10
10
|
"kind": "class",
|
|
11
11
|
"description": "",
|
|
12
|
-
"name": "
|
|
12
|
+
"name": "RekeBadge",
|
|
13
13
|
"cssProperties": [
|
|
14
14
|
{
|
|
15
|
-
"description": "
|
|
16
|
-
"name": "--reke-color-
|
|
17
|
-
"default": "#
|
|
15
|
+
"description": "Default variant background color.",
|
|
16
|
+
"name": "--reke-color-surface",
|
|
17
|
+
"default": "#1A1A1A"
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
|
-
"description": "
|
|
21
|
-
"name": "--reke-color-
|
|
22
|
-
"default": "#
|
|
20
|
+
"description": "Default variant text color.",
|
|
21
|
+
"name": "--reke-color-text",
|
|
22
|
+
"default": "#E5E5E5"
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
|
-
"description": "
|
|
26
|
-
"name": "--reke-color-
|
|
27
|
-
"default": "#
|
|
25
|
+
"description": "Default variant border color.",
|
|
26
|
+
"name": "--reke-color-border",
|
|
27
|
+
"default": "#252525"
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
|
-
"description": "
|
|
31
|
-
"name": "--reke-color-
|
|
32
|
-
"default": "#
|
|
30
|
+
"description": "Primary/success variant accent color.",
|
|
31
|
+
"name": "--reke-color-primary",
|
|
32
|
+
"default": "#22C55E"
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
|
-
"description": "
|
|
36
|
-
"name": "--reke-
|
|
37
|
-
"default": "
|
|
35
|
+
"description": "Danger variant accent color.",
|
|
36
|
+
"name": "--reke-color-danger",
|
|
37
|
+
"default": "#EF4444"
|
|
38
38
|
}
|
|
39
39
|
],
|
|
40
40
|
"cssParts": [
|
|
41
41
|
{
|
|
42
|
-
"description": "The
|
|
43
|
-
"name": "
|
|
42
|
+
"description": "The inner badge element.",
|
|
43
|
+
"name": "badge"
|
|
44
44
|
}
|
|
45
45
|
],
|
|
46
46
|
"slots": [
|
|
47
47
|
{
|
|
48
|
-
"description": "Default slot for
|
|
48
|
+
"description": "Default slot for badge text.",
|
|
49
49
|
"name": ""
|
|
50
50
|
}
|
|
51
51
|
],
|
|
@@ -54,124 +54,131 @@
|
|
|
54
54
|
"kind": "field",
|
|
55
55
|
"name": "variant",
|
|
56
56
|
"type": {
|
|
57
|
-
"text": "
|
|
57
|
+
"text": "BadgeVariant"
|
|
58
58
|
},
|
|
59
|
-
"default": "'
|
|
59
|
+
"default": "'default'",
|
|
60
60
|
"attribute": "variant",
|
|
61
61
|
"reflects": true
|
|
62
62
|
},
|
|
63
63
|
{
|
|
64
64
|
"kind": "field",
|
|
65
|
-
"name": "
|
|
65
|
+
"name": "size",
|
|
66
66
|
"type": {
|
|
67
|
-
"text": "
|
|
67
|
+
"text": "BadgeSize"
|
|
68
68
|
},
|
|
69
|
-
"default": "
|
|
70
|
-
"attribute": "
|
|
69
|
+
"default": "'md'",
|
|
70
|
+
"attribute": "size",
|
|
71
71
|
"reflects": true
|
|
72
72
|
},
|
|
73
73
|
{
|
|
74
|
-
"kind": "
|
|
75
|
-
"name": "
|
|
76
|
-
"
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
"
|
|
82
|
-
"name": "reke-close"
|
|
74
|
+
"kind": "field",
|
|
75
|
+
"name": "shape",
|
|
76
|
+
"type": {
|
|
77
|
+
"text": "BadgeShape"
|
|
78
|
+
},
|
|
79
|
+
"default": "'pill'",
|
|
80
|
+
"attribute": "shape",
|
|
81
|
+
"reflects": true
|
|
83
82
|
}
|
|
84
83
|
],
|
|
85
84
|
"attributes": [
|
|
86
85
|
{
|
|
87
86
|
"name": "variant",
|
|
88
87
|
"type": {
|
|
89
|
-
"text": "
|
|
88
|
+
"text": "BadgeVariant"
|
|
90
89
|
},
|
|
91
|
-
"default": "'
|
|
90
|
+
"default": "'default'",
|
|
92
91
|
"fieldName": "variant"
|
|
93
92
|
},
|
|
94
93
|
{
|
|
95
|
-
"name": "
|
|
94
|
+
"name": "size",
|
|
96
95
|
"type": {
|
|
97
|
-
"text": "
|
|
96
|
+
"text": "BadgeSize"
|
|
98
97
|
},
|
|
99
|
-
"default": "
|
|
100
|
-
"fieldName": "
|
|
98
|
+
"default": "'md'",
|
|
99
|
+
"fieldName": "size"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"name": "shape",
|
|
103
|
+
"type": {
|
|
104
|
+
"text": "BadgeShape"
|
|
105
|
+
},
|
|
106
|
+
"default": "'pill'",
|
|
107
|
+
"fieldName": "shape"
|
|
101
108
|
}
|
|
102
109
|
],
|
|
103
110
|
"superclass": {
|
|
104
111
|
"name": "RekeElement",
|
|
105
112
|
"module": "/src/shared/base-element.js"
|
|
106
113
|
},
|
|
107
|
-
"tagName": "reke-
|
|
114
|
+
"tagName": "reke-badge",
|
|
108
115
|
"customElement": true,
|
|
109
|
-
"summary": "
|
|
116
|
+
"summary": "A badge component for displaying labels, statuses, and counts."
|
|
110
117
|
}
|
|
111
118
|
],
|
|
112
119
|
"exports": [
|
|
113
120
|
{
|
|
114
121
|
"kind": "js",
|
|
115
|
-
"name": "
|
|
122
|
+
"name": "RekeBadge",
|
|
116
123
|
"declaration": {
|
|
117
|
-
"name": "
|
|
118
|
-
"module": "src/components/reke-
|
|
124
|
+
"name": "RekeBadge",
|
|
125
|
+
"module": "src/components/reke-badge/reke-badge.ts"
|
|
119
126
|
}
|
|
120
127
|
},
|
|
121
128
|
{
|
|
122
129
|
"kind": "custom-element-definition",
|
|
123
|
-
"name": "reke-
|
|
130
|
+
"name": "reke-badge",
|
|
124
131
|
"declaration": {
|
|
125
|
-
"name": "
|
|
126
|
-
"module": "src/components/reke-
|
|
132
|
+
"name": "RekeBadge",
|
|
133
|
+
"module": "src/components/reke-badge/reke-badge.ts"
|
|
127
134
|
}
|
|
128
135
|
}
|
|
129
136
|
]
|
|
130
137
|
},
|
|
131
138
|
{
|
|
132
139
|
"kind": "javascript-module",
|
|
133
|
-
"path": "src/components/reke-
|
|
140
|
+
"path": "src/components/reke-alert/reke-alert.ts",
|
|
134
141
|
"declarations": [
|
|
135
142
|
{
|
|
136
143
|
"kind": "class",
|
|
137
144
|
"description": "",
|
|
138
|
-
"name": "
|
|
145
|
+
"name": "RekeAlert",
|
|
139
146
|
"cssProperties": [
|
|
140
147
|
{
|
|
141
|
-
"description": "
|
|
142
|
-
"name": "--reke-color-
|
|
143
|
-
"default": "#
|
|
148
|
+
"description": "Success variant color.",
|
|
149
|
+
"name": "--reke-color-primary",
|
|
150
|
+
"default": "#22C55E"
|
|
144
151
|
},
|
|
145
152
|
{
|
|
146
|
-
"description": "
|
|
147
|
-
"name": "--reke-color-
|
|
148
|
-
"default": "#
|
|
153
|
+
"description": "Error variant color.",
|
|
154
|
+
"name": "--reke-color-danger",
|
|
155
|
+
"default": "#EF4444"
|
|
149
156
|
},
|
|
150
157
|
{
|
|
151
|
-
"description": "
|
|
152
|
-
"name": "--reke-color-
|
|
153
|
-
"default": "#
|
|
158
|
+
"description": "Warning variant color.",
|
|
159
|
+
"name": "--reke-color-warning",
|
|
160
|
+
"default": "#F59E0B"
|
|
154
161
|
},
|
|
155
162
|
{
|
|
156
|
-
"description": "
|
|
157
|
-
"name": "--reke-color-
|
|
158
|
-
"default": "#
|
|
163
|
+
"description": "Info variant color.",
|
|
164
|
+
"name": "--reke-color-secondary",
|
|
165
|
+
"default": "#3B82F6"
|
|
159
166
|
},
|
|
160
167
|
{
|
|
161
|
-
"description": "
|
|
162
|
-
"name": "--reke-
|
|
163
|
-
"default": "
|
|
168
|
+
"description": "Alert border radius.",
|
|
169
|
+
"name": "--reke-radius",
|
|
170
|
+
"default": "4px"
|
|
164
171
|
}
|
|
165
172
|
],
|
|
166
173
|
"cssParts": [
|
|
167
174
|
{
|
|
168
|
-
"description": "The
|
|
169
|
-
"name": "
|
|
175
|
+
"description": "The outer alert container.",
|
|
176
|
+
"name": "alert"
|
|
170
177
|
}
|
|
171
178
|
],
|
|
172
179
|
"slots": [
|
|
173
180
|
{
|
|
174
|
-
"description": "Default slot for
|
|
181
|
+
"description": "Default slot for alert content (icon + text, or just text).",
|
|
175
182
|
"name": ""
|
|
176
183
|
}
|
|
177
184
|
],
|
|
@@ -180,83 +187,76 @@
|
|
|
180
187
|
"kind": "field",
|
|
181
188
|
"name": "variant",
|
|
182
189
|
"type": {
|
|
183
|
-
"text": "
|
|
190
|
+
"text": "AlertVariant"
|
|
184
191
|
},
|
|
185
|
-
"default": "'
|
|
192
|
+
"default": "'info'",
|
|
186
193
|
"attribute": "variant",
|
|
187
194
|
"reflects": true
|
|
188
195
|
},
|
|
189
196
|
{
|
|
190
197
|
"kind": "field",
|
|
191
|
-
"name": "
|
|
198
|
+
"name": "dismissible",
|
|
192
199
|
"type": {
|
|
193
|
-
"text": "
|
|
200
|
+
"text": "boolean"
|
|
194
201
|
},
|
|
195
|
-
"default": "
|
|
196
|
-
"attribute": "
|
|
202
|
+
"default": "false",
|
|
203
|
+
"attribute": "dismissible",
|
|
197
204
|
"reflects": true
|
|
198
205
|
},
|
|
199
206
|
{
|
|
200
|
-
"kind": "
|
|
201
|
-
"name": "
|
|
202
|
-
"
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
"
|
|
207
|
+
"kind": "method",
|
|
208
|
+
"name": "handleClose",
|
|
209
|
+
"privacy": "private"
|
|
210
|
+
}
|
|
211
|
+
],
|
|
212
|
+
"events": [
|
|
213
|
+
{
|
|
214
|
+
"description": "Fired when the alert is dismissed (only when dismissible).",
|
|
215
|
+
"name": "reke-close"
|
|
208
216
|
}
|
|
209
217
|
],
|
|
210
218
|
"attributes": [
|
|
211
219
|
{
|
|
212
220
|
"name": "variant",
|
|
213
221
|
"type": {
|
|
214
|
-
"text": "
|
|
222
|
+
"text": "AlertVariant"
|
|
215
223
|
},
|
|
216
|
-
"default": "'
|
|
224
|
+
"default": "'info'",
|
|
217
225
|
"fieldName": "variant"
|
|
218
226
|
},
|
|
219
227
|
{
|
|
220
|
-
"name": "
|
|
221
|
-
"type": {
|
|
222
|
-
"text": "BadgeSize"
|
|
223
|
-
},
|
|
224
|
-
"default": "'md'",
|
|
225
|
-
"fieldName": "size"
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
"name": "shape",
|
|
228
|
+
"name": "dismissible",
|
|
229
229
|
"type": {
|
|
230
|
-
"text": "
|
|
230
|
+
"text": "boolean"
|
|
231
231
|
},
|
|
232
|
-
"default": "
|
|
233
|
-
"fieldName": "
|
|
232
|
+
"default": "false",
|
|
233
|
+
"fieldName": "dismissible"
|
|
234
234
|
}
|
|
235
235
|
],
|
|
236
236
|
"superclass": {
|
|
237
237
|
"name": "RekeElement",
|
|
238
238
|
"module": "/src/shared/base-element.js"
|
|
239
239
|
},
|
|
240
|
-
"tagName": "reke-
|
|
240
|
+
"tagName": "reke-alert",
|
|
241
241
|
"customElement": true,
|
|
242
|
-
"summary": "
|
|
242
|
+
"summary": "An inline alert with color variants. Content via default slot."
|
|
243
243
|
}
|
|
244
244
|
],
|
|
245
245
|
"exports": [
|
|
246
246
|
{
|
|
247
247
|
"kind": "js",
|
|
248
|
-
"name": "
|
|
248
|
+
"name": "RekeAlert",
|
|
249
249
|
"declaration": {
|
|
250
|
-
"name": "
|
|
251
|
-
"module": "src/components/reke-
|
|
250
|
+
"name": "RekeAlert",
|
|
251
|
+
"module": "src/components/reke-alert/reke-alert.ts"
|
|
252
252
|
}
|
|
253
253
|
},
|
|
254
254
|
{
|
|
255
255
|
"kind": "custom-element-definition",
|
|
256
|
-
"name": "reke-
|
|
256
|
+
"name": "reke-alert",
|
|
257
257
|
"declaration": {
|
|
258
|
-
"name": "
|
|
259
|
-
"module": "src/components/reke-
|
|
258
|
+
"name": "RekeAlert",
|
|
259
|
+
"module": "src/components/reke-alert/reke-alert.ts"
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
262
|
]
|
|
@@ -3979,6 +3979,47 @@
|
|
|
3979
3979
|
"attribute": "expand-on-row-click",
|
|
3980
3980
|
"reflects": true
|
|
3981
3981
|
},
|
|
3982
|
+
{
|
|
3983
|
+
"kind": "field",
|
|
3984
|
+
"name": "virtualized",
|
|
3985
|
+
"type": {
|
|
3986
|
+
"text": "boolean"
|
|
3987
|
+
},
|
|
3988
|
+
"default": "false",
|
|
3989
|
+
"description": "Opt-in row windowing: only the rows intersecting the viewport are rendered,\nwith spacer rows standing in for the rest.\n\nThis is NOT a transparent optimization — it changes the layout contract.\nA virtualized table needs a bounded scroll container, so `maxHeight` and\n`rowHeight` are both REQUIRED when this is `true` (dev error otherwise), and\nthe table switches to `table-layout: fixed` so column widths stop depending\non whichever rows happen to be rendered. That is also why this is a prop and\nnot an automatic row-count threshold: silently changing a consumer's layout\nbecause their dataset grew past some boundary is worse than being slow.\n\nNot yet compatible with `expandedRowElement` — see the class JSDoc.",
|
|
3990
|
+
"attribute": "virtualized",
|
|
3991
|
+
"reflects": true
|
|
3992
|
+
},
|
|
3993
|
+
{
|
|
3994
|
+
"kind": "field",
|
|
3995
|
+
"name": "rowHeight",
|
|
3996
|
+
"type": {
|
|
3997
|
+
"text": "number"
|
|
3998
|
+
},
|
|
3999
|
+
"default": "0",
|
|
4000
|
+
"description": "Height in px of a single COLLAPSED row, declared by the consumer. Required\nwhen `virtualized` is `true`.\n\nDeclared rather than measured on purpose: it makes row offsets pure\narithmetic (`index * rowHeight`) available on the very first frame, with no\nmeasure-then-render pass. The tradeoff is yours to honor — if your cell\ncontent is taller than this, rows will overlap. Keep it in sync with the\n`dense` modifier if you use it.",
|
|
4001
|
+
"attribute": "row-height"
|
|
4002
|
+
},
|
|
4003
|
+
{
|
|
4004
|
+
"kind": "field",
|
|
4005
|
+
"name": "maxHeight",
|
|
4006
|
+
"type": {
|
|
4007
|
+
"text": "string"
|
|
4008
|
+
},
|
|
4009
|
+
"default": "''",
|
|
4010
|
+
"description": "CSS length capping the scroll container height (e.g. `'600px'`, `'70vh'`).\nRequired when `virtualized` is `true` — without a bounded height there is\nno viewport to window against.",
|
|
4011
|
+
"attribute": "max-height"
|
|
4012
|
+
},
|
|
4013
|
+
{
|
|
4014
|
+
"kind": "field",
|
|
4015
|
+
"name": "overscan",
|
|
4016
|
+
"type": {
|
|
4017
|
+
"text": "number"
|
|
4018
|
+
},
|
|
4019
|
+
"default": "4",
|
|
4020
|
+
"description": "Extra rows rendered above and below the viewport, absorbing fast scrolls\nbefore blank space can appear. Higher costs more per frame.",
|
|
4021
|
+
"attribute": "overscan"
|
|
4022
|
+
},
|
|
3982
4023
|
{
|
|
3983
4024
|
"kind": "field",
|
|
3984
4025
|
"name": "sortKey",
|
|
@@ -4068,7 +4109,7 @@
|
|
|
4068
4109
|
"name": "_collapsingKeys",
|
|
4069
4110
|
"privacy": "private",
|
|
4070
4111
|
"default": "new Set<RowKey>()",
|
|
4071
|
-
"description": "Keys currently animating their collapse.
|
|
4112
|
+
"description": "Keys currently animating their collapse. The row stays rendered while the\nkey is here; teardown runs when the collapse settles (see\n`_scheduleCollapseTeardown`). A key is NEVER in both this set and\n`expandedRows` — collapse removes it from `expandedRows` immediately, which\nis what makes a re-entrant toggle read as a genuine re-expand."
|
|
4072
4113
|
},
|
|
4073
4114
|
{
|
|
4074
4115
|
"kind": "field",
|
|
@@ -4079,10 +4120,19 @@
|
|
|
4079
4120
|
},
|
|
4080
4121
|
{
|
|
4081
4122
|
"kind": "field",
|
|
4082
|
-
"name": "
|
|
4123
|
+
"name": "_collapseTokens",
|
|
4124
|
+
"privacy": "private",
|
|
4125
|
+
"default": "new Map<RowKey, number>()",
|
|
4126
|
+
"description": "Generation token per collapsing key. A pending settle only tears the key\ndown when its token is still the current one, so cancelling a collapse\n(re-expand, row removal, disconnect) is a single map delete."
|
|
4127
|
+
},
|
|
4128
|
+
{
|
|
4129
|
+
"kind": "field",
|
|
4130
|
+
"name": "_collapseSeq",
|
|
4131
|
+
"type": {
|
|
4132
|
+
"text": "number"
|
|
4133
|
+
},
|
|
4083
4134
|
"privacy": "private",
|
|
4084
|
-
"default": "
|
|
4085
|
-
"description": "transitionend handlers keyed by row key, for cleanup on collapse animation end."
|
|
4135
|
+
"default": "0"
|
|
4086
4136
|
},
|
|
4087
4137
|
{
|
|
4088
4138
|
"kind": "field",
|
|
@@ -4093,29 +4143,368 @@
|
|
|
4093
4143
|
},
|
|
4094
4144
|
{
|
|
4095
4145
|
"kind": "field",
|
|
4096
|
-
"name": "
|
|
4146
|
+
"name": "_keyToIndex",
|
|
4097
4147
|
"privacy": "private",
|
|
4098
|
-
"default": "new Map<RowKey,
|
|
4099
|
-
"description": "
|
|
4148
|
+
"default": "new Map<RowKey, number>()",
|
|
4149
|
+
"description": "Latest resolved index map: key → absolute index into `rows`."
|
|
4100
4150
|
},
|
|
4101
4151
|
{
|
|
4102
4152
|
"kind": "field",
|
|
4103
|
-
"name": "
|
|
4104
|
-
"type": {
|
|
4105
|
-
"text": "boolean"
|
|
4106
|
-
},
|
|
4153
|
+
"name": "_expandedHeights",
|
|
4107
4154
|
"privacy": "private",
|
|
4108
|
-
"default": "
|
|
4155
|
+
"default": "new Map<RowKey, number>()",
|
|
4156
|
+
"description": "Measured height in px of each rendered expand row, keyed by row key.\n\nThis is the whole reason expand and virtualization can coexist. A collapsed\nrow's height is declared (`rowHeight`); an expanded row's is not knowable in\nadvance, because the consumer mounts arbitrary content into the host. So we\nmeasure it — and that is affordable precisely because the set is tiny: no\none has ten thousand rows open at once. Offsets stay\n`index * rowHeight + sum(extra heights of expanded rows above)`.\n\nEntries survive an expanded row scrolling out of the window (the height is\nstill needed for the math) and are dropped only on teardown."
|
|
4109
4157
|
},
|
|
4110
4158
|
{
|
|
4111
4159
|
"kind": "field",
|
|
4112
|
-
"name": "
|
|
4160
|
+
"name": "_expandRowElements",
|
|
4161
|
+
"privacy": "private",
|
|
4162
|
+
"default": "new Map<RowKey, HTMLElement>()"
|
|
4163
|
+
},
|
|
4164
|
+
{
|
|
4165
|
+
"kind": "field",
|
|
4166
|
+
"name": "_expandRowKeys",
|
|
4167
|
+
"privacy": "private",
|
|
4168
|
+
"default": "new WeakMap<Element, RowKey>()"
|
|
4169
|
+
},
|
|
4170
|
+
{
|
|
4171
|
+
"kind": "field",
|
|
4172
|
+
"name": "_expandRowRefs",
|
|
4173
|
+
"privacy": "private",
|
|
4174
|
+
"default": "new Map<RowKey, (el: Element | undefined) => void>()"
|
|
4175
|
+
},
|
|
4176
|
+
{
|
|
4177
|
+
"kind": "field",
|
|
4178
|
+
"name": "_expandObserver",
|
|
4179
|
+
"type": {
|
|
4180
|
+
"text": "ResizeObserver | null"
|
|
4181
|
+
},
|
|
4182
|
+
"privacy": "private",
|
|
4183
|
+
"default": "null"
|
|
4184
|
+
},
|
|
4185
|
+
{
|
|
4186
|
+
"kind": "field",
|
|
4187
|
+
"name": "_windowStart",
|
|
4188
|
+
"type": {
|
|
4189
|
+
"text": "number"
|
|
4190
|
+
},
|
|
4191
|
+
"privacy": "private",
|
|
4192
|
+
"default": "0",
|
|
4193
|
+
"description": "Window rendered on the last pass, for scroll anchoring and focus rescue."
|
|
4194
|
+
},
|
|
4195
|
+
{
|
|
4196
|
+
"kind": "field",
|
|
4197
|
+
"name": "_windowEnd",
|
|
4198
|
+
"type": {
|
|
4199
|
+
"text": "number"
|
|
4200
|
+
},
|
|
4201
|
+
"privacy": "private",
|
|
4202
|
+
"default": "0"
|
|
4203
|
+
},
|
|
4204
|
+
{
|
|
4205
|
+
"kind": "field",
|
|
4206
|
+
"name": "_previousWindowStart",
|
|
4207
|
+
"type": {
|
|
4208
|
+
"text": "number"
|
|
4209
|
+
},
|
|
4210
|
+
"privacy": "private",
|
|
4211
|
+
"default": "0"
|
|
4212
|
+
},
|
|
4213
|
+
{
|
|
4214
|
+
"kind": "field",
|
|
4215
|
+
"name": "_previousWindowEnd",
|
|
4216
|
+
"type": {
|
|
4217
|
+
"text": "number"
|
|
4218
|
+
},
|
|
4219
|
+
"privacy": "private",
|
|
4220
|
+
"default": "0"
|
|
4221
|
+
},
|
|
4222
|
+
{
|
|
4223
|
+
"kind": "field",
|
|
4224
|
+
"name": "_focusInsideRows",
|
|
4225
|
+
"type": {
|
|
4226
|
+
"text": "boolean"
|
|
4227
|
+
},
|
|
4228
|
+
"privacy": "private",
|
|
4229
|
+
"default": "false",
|
|
4230
|
+
"description": "Which record focus was last placed on, as an `aria-rowindex`. Scrolling a\nvirtualized table does not usually destroy the focused control — Lit reuses\nthe row's DOM positionally and rebinds it to a different record — so the\nthing to detect is not \"focus disappeared\" but \"focus is now on a different\nrow than the user put it on\"."
|
|
4231
|
+
},
|
|
4232
|
+
{
|
|
4233
|
+
"kind": "field",
|
|
4234
|
+
"name": "_focusedRowIndex",
|
|
4235
|
+
"type": {
|
|
4236
|
+
"text": "number | null"
|
|
4237
|
+
},
|
|
4238
|
+
"privacy": "private",
|
|
4239
|
+
"default": "null"
|
|
4240
|
+
},
|
|
4241
|
+
{
|
|
4242
|
+
"kind": "field",
|
|
4243
|
+
"name": "_onRowsFocusIn",
|
|
4244
|
+
"privacy": "private"
|
|
4245
|
+
},
|
|
4246
|
+
{
|
|
4247
|
+
"kind": "method",
|
|
4248
|
+
"name": "_rowIndexOf",
|
|
4249
|
+
"privacy": "private",
|
|
4250
|
+
"return": {
|
|
4251
|
+
"type": {
|
|
4252
|
+
"text": "number | null"
|
|
4253
|
+
}
|
|
4254
|
+
},
|
|
4255
|
+
"parameters": [
|
|
4256
|
+
{
|
|
4257
|
+
"name": "node",
|
|
4258
|
+
"type": {
|
|
4259
|
+
"text": "Element | null"
|
|
4260
|
+
}
|
|
4261
|
+
}
|
|
4262
|
+
],
|
|
4263
|
+
"description": "The `aria-rowindex` of the row containing a node, if any."
|
|
4264
|
+
},
|
|
4265
|
+
{
|
|
4266
|
+
"kind": "method",
|
|
4267
|
+
"name": "_clearRowFocusTracking",
|
|
4268
|
+
"privacy": "private",
|
|
4269
|
+
"return": {
|
|
4270
|
+
"type": {
|
|
4271
|
+
"text": "void"
|
|
4272
|
+
}
|
|
4273
|
+
}
|
|
4274
|
+
},
|
|
4275
|
+
{
|
|
4276
|
+
"kind": "field",
|
|
4277
|
+
"name": "_refCallbacks",
|
|
4278
|
+
"privacy": "private",
|
|
4279
|
+
"default": "new Map<RowKey, (el: Element | undefined) => void>()",
|
|
4280
|
+
"description": "Stable ref callback per row key. One closure per key, reused across renders."
|
|
4281
|
+
},
|
|
4282
|
+
{
|
|
4283
|
+
"kind": "field",
|
|
4284
|
+
"name": "_hasToolbar",
|
|
4285
|
+
"type": {
|
|
4286
|
+
"text": "boolean"
|
|
4287
|
+
},
|
|
4288
|
+
"privacy": "private",
|
|
4289
|
+
"default": "false"
|
|
4290
|
+
},
|
|
4291
|
+
{
|
|
4292
|
+
"kind": "field",
|
|
4293
|
+
"name": "_hasFooter",
|
|
4113
4294
|
"type": {
|
|
4114
4295
|
"text": "boolean"
|
|
4115
4296
|
},
|
|
4116
4297
|
"privacy": "private",
|
|
4117
4298
|
"default": "false"
|
|
4118
4299
|
},
|
|
4300
|
+
{
|
|
4301
|
+
"kind": "field",
|
|
4302
|
+
"name": "_scrollTop",
|
|
4303
|
+
"type": {
|
|
4304
|
+
"text": "number"
|
|
4305
|
+
},
|
|
4306
|
+
"privacy": "private",
|
|
4307
|
+
"default": "0",
|
|
4308
|
+
"description": "Live scroll offset of the scroll container, in px. Virtualized mode only."
|
|
4309
|
+
},
|
|
4310
|
+
{
|
|
4311
|
+
"kind": "field",
|
|
4312
|
+
"name": "_viewportHeight",
|
|
4313
|
+
"type": {
|
|
4314
|
+
"text": "number"
|
|
4315
|
+
},
|
|
4316
|
+
"privacy": "private",
|
|
4317
|
+
"default": "0",
|
|
4318
|
+
"description": "Measured height of the scroll container, in px. Virtualized mode only."
|
|
4319
|
+
},
|
|
4320
|
+
{
|
|
4321
|
+
"kind": "field",
|
|
4322
|
+
"name": "_scrollContainer",
|
|
4323
|
+
"type": {
|
|
4324
|
+
"text": "HTMLElement | null"
|
|
4325
|
+
},
|
|
4326
|
+
"privacy": "private",
|
|
4327
|
+
"default": "null"
|
|
4328
|
+
},
|
|
4329
|
+
{
|
|
4330
|
+
"kind": "field",
|
|
4331
|
+
"name": "_viewportObserver",
|
|
4332
|
+
"type": {
|
|
4333
|
+
"text": "ResizeObserver | null"
|
|
4334
|
+
},
|
|
4335
|
+
"privacy": "private",
|
|
4336
|
+
"default": "null"
|
|
4337
|
+
},
|
|
4338
|
+
{
|
|
4339
|
+
"kind": "field",
|
|
4340
|
+
"name": "_scrollFrame",
|
|
4341
|
+
"type": {
|
|
4342
|
+
"text": "number | null"
|
|
4343
|
+
},
|
|
4344
|
+
"privacy": "private",
|
|
4345
|
+
"default": "null"
|
|
4346
|
+
},
|
|
4347
|
+
{
|
|
4348
|
+
"kind": "field",
|
|
4349
|
+
"name": "_onScroll",
|
|
4350
|
+
"privacy": "private",
|
|
4351
|
+
"description": "Coalesce scroll into one update per frame. A trackpad fires scroll events\nfar faster than the browser paints, and each one would otherwise queue a\nfull window recompute."
|
|
4352
|
+
},
|
|
4353
|
+
{
|
|
4354
|
+
"kind": "field",
|
|
4355
|
+
"name": "_bindScrollContainer",
|
|
4356
|
+
"privacy": "private",
|
|
4357
|
+
"description": "Bind the scroll container. Called by lit's `ref` on every render, so it must\nbe cheap and idempotent — it rebinds only when the element actually changes."
|
|
4358
|
+
},
|
|
4359
|
+
{
|
|
4360
|
+
"kind": "method",
|
|
4361
|
+
"name": "_extraHeights",
|
|
4362
|
+
"privacy": "private",
|
|
4363
|
+
"return": {
|
|
4364
|
+
"type": {
|
|
4365
|
+
"text": "{ index: number; extra: number }[]"
|
|
4366
|
+
}
|
|
4367
|
+
},
|
|
4368
|
+
"description": "Expanded rows that add height, as `{ index, extra }` sorted by index.\nSmall by construction — this is the set of rows the user has open."
|
|
4369
|
+
},
|
|
4370
|
+
{
|
|
4371
|
+
"kind": "method",
|
|
4372
|
+
"name": "_offsetOf",
|
|
4373
|
+
"privacy": "private",
|
|
4374
|
+
"return": {
|
|
4375
|
+
"type": {
|
|
4376
|
+
"text": "number"
|
|
4377
|
+
}
|
|
4378
|
+
},
|
|
4379
|
+
"parameters": [
|
|
4380
|
+
{
|
|
4381
|
+
"name": "index",
|
|
4382
|
+
"type": {
|
|
4383
|
+
"text": "number"
|
|
4384
|
+
}
|
|
4385
|
+
},
|
|
4386
|
+
{
|
|
4387
|
+
"name": "extras",
|
|
4388
|
+
"type": {
|
|
4389
|
+
"text": "readonly { index: number; extra: number }[]"
|
|
4390
|
+
}
|
|
4391
|
+
}
|
|
4392
|
+
],
|
|
4393
|
+
"description": "Distance in px from the top of the dataset to the top of row `index`."
|
|
4394
|
+
},
|
|
4395
|
+
{
|
|
4396
|
+
"kind": "method",
|
|
4397
|
+
"name": "_indexAtOffset",
|
|
4398
|
+
"privacy": "private",
|
|
4399
|
+
"return": {
|
|
4400
|
+
"type": {
|
|
4401
|
+
"text": "number"
|
|
4402
|
+
}
|
|
4403
|
+
},
|
|
4404
|
+
"parameters": [
|
|
4405
|
+
{
|
|
4406
|
+
"name": "offset",
|
|
4407
|
+
"type": {
|
|
4408
|
+
"text": "number"
|
|
4409
|
+
}
|
|
4410
|
+
},
|
|
4411
|
+
{
|
|
4412
|
+
"name": "extras",
|
|
4413
|
+
"type": {
|
|
4414
|
+
"text": "readonly { index: number; extra: number }[]"
|
|
4415
|
+
}
|
|
4416
|
+
},
|
|
4417
|
+
{
|
|
4418
|
+
"name": "total",
|
|
4419
|
+
"type": {
|
|
4420
|
+
"text": "number"
|
|
4421
|
+
}
|
|
4422
|
+
}
|
|
4423
|
+
],
|
|
4424
|
+
"description": "Inverse of `_offsetOf`: the row index sitting at a given scroll offset.\nWalks the (short) list of expanded rows to find which linear segment the\noffset falls in, then divides within that segment."
|
|
4425
|
+
},
|
|
4426
|
+
{
|
|
4427
|
+
"kind": "method",
|
|
4428
|
+
"name": "_computeWindow",
|
|
4429
|
+
"privacy": "private",
|
|
4430
|
+
"return": {
|
|
4431
|
+
"type": {
|
|
4432
|
+
"text": "{\n start: number;\n end: number;\n topSpacer: number;\n bottomSpacer: number;\n }"
|
|
4433
|
+
}
|
|
4434
|
+
},
|
|
4435
|
+
"description": "The slice of `rows` to render plus the spacer heights standing in for the\nrows outside it. `end` is exclusive.\n\nExpanded rows INSIDE the window render at their real height, so their extra\nheight is deliberately excluded from the spacers — only rows above and below\nthe window contribute."
|
|
4436
|
+
},
|
|
4437
|
+
{
|
|
4438
|
+
"kind": "method",
|
|
4439
|
+
"name": "_expandRowRef",
|
|
4440
|
+
"privacy": "private",
|
|
4441
|
+
"return": {
|
|
4442
|
+
"type": {
|
|
4443
|
+
"text": "(el: Element | undefined) => void"
|
|
4444
|
+
}
|
|
4445
|
+
},
|
|
4446
|
+
"parameters": [
|
|
4447
|
+
{
|
|
4448
|
+
"name": "key",
|
|
4449
|
+
"type": {
|
|
4450
|
+
"text": "RowKey"
|
|
4451
|
+
}
|
|
4452
|
+
}
|
|
4453
|
+
],
|
|
4454
|
+
"description": "Observe an expand row so its height feeds the window math. Measuring is what\nlets expanded rows coexist with windowing; the observer also fires\ncontinuously while the row animates open, so the offsets track the\ntransition instead of jumping at the end."
|
|
4455
|
+
},
|
|
4456
|
+
{
|
|
4457
|
+
"kind": "method",
|
|
4458
|
+
"name": "_rescueFocusAfterWindowChange",
|
|
4459
|
+
"privacy": "private",
|
|
4460
|
+
"return": {
|
|
4461
|
+
"type": {
|
|
4462
|
+
"text": "void"
|
|
4463
|
+
}
|
|
4464
|
+
},
|
|
4465
|
+
"description": "Hand focus back to the scroll container when a window change moved it off\nthe record the user chose.\n\nTwo things can happen when the window slides under a focused control. Lit\nusually reuses the row's DOM and rebinds it, so focus silently ends up on a\nDIFFERENT record with nothing announced — the user believes they are on row\n5 while they are on row 505. Less often the node is destroyed outright and\nfocus falls to the document body, after which arrow keys scroll the page\ninstead of the table. Both are resolved by parking focus on the scroll\ncontainer, which is a place the user can reason about.\n\nGuarded so a normal Tab-away or an unrelated re-render is never hijacked:\nit acts only when the window actually moved and focus is still inside this\ncomponent."
|
|
4466
|
+
},
|
|
4467
|
+
{
|
|
4468
|
+
"kind": "method",
|
|
4469
|
+
"name": "_clampScrollToContent",
|
|
4470
|
+
"privacy": "private",
|
|
4471
|
+
"return": {
|
|
4472
|
+
"type": {
|
|
4473
|
+
"text": "void"
|
|
4474
|
+
}
|
|
4475
|
+
},
|
|
4476
|
+
"description": "Keep the tracked scroll offset in agreement with the container after the\ndataset changes size.\n\nFiltering 10.000 rows down to 10 while parked near the bottom leaves the\noffset past the end of the new content. The browser silently clamps its own\n`scrollTop` when that happens but emits no scroll event, so `_scrollTop`\nwould keep describing a position that no longer exists and the window math\nwould render a slice of nothing. Clamp explicitly, then resync either way."
|
|
4477
|
+
},
|
|
4478
|
+
{
|
|
4479
|
+
"kind": "method",
|
|
4480
|
+
"name": "_ensureExpandObserver",
|
|
4481
|
+
"privacy": "private",
|
|
4482
|
+
"return": {
|
|
4483
|
+
"type": {
|
|
4484
|
+
"text": "ResizeObserver"
|
|
4485
|
+
}
|
|
4486
|
+
}
|
|
4487
|
+
},
|
|
4488
|
+
{
|
|
4489
|
+
"kind": "method",
|
|
4490
|
+
"name": "_renderSpacerRow",
|
|
4491
|
+
"privacy": "private",
|
|
4492
|
+
"parameters": [
|
|
4493
|
+
{
|
|
4494
|
+
"name": "height",
|
|
4495
|
+
"type": {
|
|
4496
|
+
"text": "number"
|
|
4497
|
+
}
|
|
4498
|
+
},
|
|
4499
|
+
{
|
|
4500
|
+
"name": "position",
|
|
4501
|
+
"type": {
|
|
4502
|
+
"text": "'top' | 'bottom'"
|
|
4503
|
+
}
|
|
4504
|
+
}
|
|
4505
|
+
],
|
|
4506
|
+
"description": "A zero-content row standing in for the rows outside the window, holding the\nscroll height they would have occupied. `<tr>` height is honored as a\nminimum, and the cell is stripped of padding and borders so it contributes\nnothing beyond `height`."
|
|
4507
|
+
},
|
|
4119
4508
|
{
|
|
4120
4509
|
"kind": "method",
|
|
4121
4510
|
"name": "_resolveKey",
|
|
@@ -4355,6 +4744,53 @@
|
|
|
4355
4744
|
"privacy": "private",
|
|
4356
4745
|
"default": "false"
|
|
4357
4746
|
},
|
|
4747
|
+
{
|
|
4748
|
+
"kind": "field",
|
|
4749
|
+
"name": "_warnedVirtualConfig",
|
|
4750
|
+
"type": {
|
|
4751
|
+
"text": "boolean"
|
|
4752
|
+
},
|
|
4753
|
+
"privacy": "private",
|
|
4754
|
+
"default": "false"
|
|
4755
|
+
},
|
|
4756
|
+
{
|
|
4757
|
+
"kind": "method",
|
|
4758
|
+
"name": "_scheduleCollapseTeardown",
|
|
4759
|
+
"privacy": "private",
|
|
4760
|
+
"return": {
|
|
4761
|
+
"type": {
|
|
4762
|
+
"text": "void"
|
|
4763
|
+
}
|
|
4764
|
+
},
|
|
4765
|
+
"parameters": [
|
|
4766
|
+
{
|
|
4767
|
+
"name": "key",
|
|
4768
|
+
"type": {
|
|
4769
|
+
"text": "RowKey"
|
|
4770
|
+
}
|
|
4771
|
+
}
|
|
4772
|
+
],
|
|
4773
|
+
"description": "Wait for a collapsing row to finish animating, then tear it down.\n\nThe wait resolves off `getAnimations()`, not `transitionend`: that event is\nnever guaranteed (reduced motion, `display: none`, a backgrounded tab, a\nzero-duration override, the row being unmounted mid-flight), and when it\nfailed to arrive the key stayed in `_collapsingKeys` forever, which in turn\ndisabled the purge in `updated()`. If there is no animation at all,\n`Promise.allSettled([])` settles on the next microtask and teardown is\nimmediate. `COLLAPSE_TEARDOWN_FALLBACK_MS` is the last resort for an\nanimation that never finishes."
|
|
4774
|
+
},
|
|
4775
|
+
{
|
|
4776
|
+
"kind": "method",
|
|
4777
|
+
"name": "_teardownKey",
|
|
4778
|
+
"privacy": "private",
|
|
4779
|
+
"return": {
|
|
4780
|
+
"type": {
|
|
4781
|
+
"text": "void"
|
|
4782
|
+
}
|
|
4783
|
+
},
|
|
4784
|
+
"parameters": [
|
|
4785
|
+
{
|
|
4786
|
+
"name": "key",
|
|
4787
|
+
"type": {
|
|
4788
|
+
"text": "RowKey"
|
|
4789
|
+
}
|
|
4790
|
+
}
|
|
4791
|
+
],
|
|
4792
|
+
"description": "Release every resource held for a row key. Idempotent and safe to call at\nany point in the lifecycle — each step is a delete, and `_safeCleanup`\ndrops its entry after running."
|
|
4793
|
+
},
|
|
4358
4794
|
{
|
|
4359
4795
|
"kind": "method",
|
|
4360
4796
|
"name": "_safeCleanup",
|
|
@@ -4458,6 +4894,42 @@
|
|
|
4458
4894
|
"description": "Opt-in: when `true`, clicking anywhere on a row (outside the chevron, if\npresent) calls `toggleExpand(key)` internally using the row's identity\nkey. The `reke-row-click` event is STILL emitted on every row click so\nconsumers can react in addition to the built-in toggle.\n\nDefault is `false` to preserve non-breaking behavior: existing consumers\nthat wire their own `reke-row-click` → `toggleExpand` handlers are\nunaffected.\n\nA11y note: row clicks are a pointer convenience only. The `<tr>` does NOT\nreceive `role=\"button\"` or `tabindex` (that would be a clickable-row\na11y anti-pattern). For keyboard / screen-reader users, pair this prop\nwith `expandable` so the accessible chevron `<button>` is available.\n\nDouble-wiring caveat: consumers MUST use EITHER `expandOnRowClick` OR\ntheir own `reke-row-click` → `toggleExpand` handler — not both — or the\nrow will toggle twice and net to no change.\n\nChevron interaction: the chevron `<button>` calls `stopPropagation()`, so\nclicking the chevron does NOT trigger the row-click toggle (no double\ntoggle).",
|
|
4459
4895
|
"fieldName": "expandOnRowClick"
|
|
4460
4896
|
},
|
|
4897
|
+
{
|
|
4898
|
+
"name": "virtualized",
|
|
4899
|
+
"type": {
|
|
4900
|
+
"text": "boolean"
|
|
4901
|
+
},
|
|
4902
|
+
"default": "false",
|
|
4903
|
+
"description": "Opt-in row windowing: only the rows intersecting the viewport are rendered,\nwith spacer rows standing in for the rest.\n\nThis is NOT a transparent optimization — it changes the layout contract.\nA virtualized table needs a bounded scroll container, so `maxHeight` and\n`rowHeight` are both REQUIRED when this is `true` (dev error otherwise), and\nthe table switches to `table-layout: fixed` so column widths stop depending\non whichever rows happen to be rendered. That is also why this is a prop and\nnot an automatic row-count threshold: silently changing a consumer's layout\nbecause their dataset grew past some boundary is worse than being slow.\n\nNot yet compatible with `expandedRowElement` — see the class JSDoc.",
|
|
4904
|
+
"fieldName": "virtualized"
|
|
4905
|
+
},
|
|
4906
|
+
{
|
|
4907
|
+
"name": "row-height",
|
|
4908
|
+
"type": {
|
|
4909
|
+
"text": "number"
|
|
4910
|
+
},
|
|
4911
|
+
"default": "0",
|
|
4912
|
+
"description": "Height in px of a single COLLAPSED row, declared by the consumer. Required\nwhen `virtualized` is `true`.\n\nDeclared rather than measured on purpose: it makes row offsets pure\narithmetic (`index * rowHeight`) available on the very first frame, with no\nmeasure-then-render pass. The tradeoff is yours to honor — if your cell\ncontent is taller than this, rows will overlap. Keep it in sync with the\n`dense` modifier if you use it.",
|
|
4913
|
+
"fieldName": "rowHeight"
|
|
4914
|
+
},
|
|
4915
|
+
{
|
|
4916
|
+
"name": "max-height",
|
|
4917
|
+
"type": {
|
|
4918
|
+
"text": "string"
|
|
4919
|
+
},
|
|
4920
|
+
"default": "''",
|
|
4921
|
+
"description": "CSS length capping the scroll container height (e.g. `'600px'`, `'70vh'`).\nRequired when `virtualized` is `true` — without a bounded height there is\nno viewport to window against.",
|
|
4922
|
+
"fieldName": "maxHeight"
|
|
4923
|
+
},
|
|
4924
|
+
{
|
|
4925
|
+
"name": "overscan",
|
|
4926
|
+
"type": {
|
|
4927
|
+
"text": "number"
|
|
4928
|
+
},
|
|
4929
|
+
"default": "4",
|
|
4930
|
+
"description": "Extra rows rendered above and below the viewport, absorbing fast scrolls\nbefore blank space can appear. Higher costs more per frame.",
|
|
4931
|
+
"fieldName": "overscan"
|
|
4932
|
+
},
|
|
4461
4933
|
{
|
|
4462
4934
|
"name": "sort-key",
|
|
4463
4935
|
"type": {
|
|
@@ -4481,7 +4953,7 @@
|
|
|
4481
4953
|
},
|
|
4482
4954
|
"tagName": "reke-table",
|
|
4483
4955
|
"customElement": true,
|
|
4484
|
-
"summary": "A data table with custom cell rendering, framework-agnostic expandable rows, and toolbar/footer slots."
|
|
4956
|
+
"summary": "A data table with custom cell rendering, framework-agnostic expandable rows, and toolbar/footer slots.\n\nVirtualization: opt-in via `virtualized`, off by default. When on, only the\nrows intersecting the viewport are rendered and spacer rows carry the scroll\nheight of the rest. Requires `rowHeight` and `maxHeight`. Expandable rows are\nsupported: their height is measured with a ResizeObserver and folded into the\nrow offsets, which is affordable because only a handful of rows are ever open\nat once. Rows are never recycled across keys — a row key keeps its host\nelement and its cleanup contract even while scrolled out of the window.\nSee README-DOC.md."
|
|
4485
4957
|
}
|
|
4486
4958
|
],
|
|
4487
4959
|
"exports": [
|