reke-ui 0.1.2 → 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/README.md +21 -0
- package/cli/install-skills.mjs +169 -0
- package/custom-elements.json +405 -161
- package/dist/__type-checks__/no-lit-in-public-types.d.ts +2 -0
- package/dist/__type-checks__/no-lit-in-public-types.d.ts.map +1 -0
- package/dist/_virtual/_@oxc-project_runtime@0.137.0/helpers/esm/decorate.js +9 -0
- package/dist/components/reke-alert/reke-alert.d.ts.map +1 -1
- package/dist/components/reke-alert/reke-alert.js +32 -40
- package/dist/components/reke-alert/reke-alert.styles.js +7 -10
- package/dist/components/reke-badge/reke-badge.js +26 -40
- package/dist/components/reke-badge/reke-badge.styles.js +7 -10
- package/dist/components/reke-button/reke-button.d.ts.map +1 -1
- package/dist/components/reke-button/reke-button.js +41 -52
- package/dist/components/reke-button/reke-button.styles.js +7 -10
- package/dist/components/reke-card/reke-card.d.ts.map +1 -1
- package/dist/components/reke-card/reke-card.js +38 -58
- package/dist/components/reke-card/reke-card.styles.js +7 -10
- package/dist/components/reke-checkbox/reke-checkbox.js +40 -47
- package/dist/components/reke-checkbox/reke-checkbox.styles.d.ts.map +1 -1
- package/dist/components/reke-checkbox/reke-checkbox.styles.js +7 -9
- package/dist/components/reke-chip/reke-chip.d.ts.map +1 -1
- package/dist/components/reke-chip/reke-chip.js +42 -50
- package/dist/components/reke-chip/reke-chip.styles.d.ts.map +1 -1
- package/dist/components/reke-chip/reke-chip.styles.js +16 -13
- package/dist/components/reke-date-range/reke-date-range.d.ts.map +1 -1
- package/dist/components/reke-date-range/reke-date-range.js +240 -260
- package/dist/components/reke-date-range/reke-date-range.styles.d.ts.map +1 -1
- package/dist/components/reke-date-range/reke-date-range.styles.js +29 -16
- package/dist/components/reke-dialog/reke-dialog.d.ts.map +1 -1
- package/dist/components/reke-dialog/reke-dialog.js +52 -65
- package/dist/components/reke-dialog/reke-dialog.styles.d.ts.map +1 -1
- package/dist/components/reke-dialog/reke-dialog.styles.js +8 -10
- package/dist/components/reke-file-upload/reke-file-upload.d.ts.map +1 -1
- package/dist/components/reke-file-upload/reke-file-upload.js +62 -86
- package/dist/components/reke-file-upload/reke-file-upload.styles.js +7 -10
- package/dist/components/reke-input/reke-input.js +42 -61
- package/dist/components/reke-input/reke-input.styles.d.ts.map +1 -1
- package/dist/components/reke-input/reke-input.styles.js +8 -10
- package/dist/components/reke-select/reke-select.d.ts.map +1 -1
- package/dist/components/reke-select/reke-select.js +66 -89
- package/dist/components/reke-select/reke-select.styles.d.ts.map +1 -1
- package/dist/components/reke-select/reke-select.styles.js +9 -11
- package/dist/components/reke-table/reke-table.d.ts +134 -23
- package/dist/components/reke-table/reke-table.d.ts.map +1 -1
- package/dist/components/reke-table/reke-table.js +243 -143
- package/dist/components/reke-table/reke-table.styles.d.ts.map +1 -1
- package/dist/components/reke-table/reke-table.styles.js +67 -9
- package/dist/components/reke-textarea/reke-textarea.js +42 -61
- package/dist/components/reke-textarea/reke-textarea.styles.js +6 -9
- package/dist/components/reke-toast/reke-toast.d.ts.map +1 -1
- package/dist/components/reke-toast/reke-toast.js +50 -68
- package/dist/components/reke-toast/reke-toast.styles.d.ts.map +1 -1
- package/dist/components/reke-toast/reke-toast.styles.js +13 -12
- package/dist/components/reke-toggle/reke-toggle.js +36 -43
- package/dist/components/reke-toggle/reke-toggle.styles.js +7 -10
- package/dist/components/reke-tooltip/reke-tooltip.js +31 -47
- package/dist/components/reke-tooltip/reke-tooltip.styles.js +6 -9
- package/dist/index.d.ts +23 -23
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -33
- package/dist/node_modules/lit/directives/ref.js +1 -0
- package/dist/node_modules/lit-html/async-directive.js +55 -0
- package/dist/node_modules/lit-html/directive-helpers.js +5 -0
- package/dist/node_modules/lit-html/directive.js +28 -0
- package/dist/node_modules/lit-html/directives/ref.js +30 -0
- package/dist/node_modules/lit-html/lit-html.js +234 -0
- package/dist/react-bridge/table.d.ts +58 -0
- package/dist/react-bridge/table.d.ts.map +1 -0
- package/dist/react-bridge/table.js +115 -0
- package/dist/react.d.ts +12 -26
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +110 -146
- package/dist/shared/base-element.js +13 -15
- package/dist/shared/tailwind-styles.js +6 -6
- package/dist/shared/tailwind.js +4 -0
- package/dist/tokens/reke-tokens.css +47 -0
- package/package.json +40 -20
- package/dist/shared/tailwind.css.js +0 -4
package/custom-elements.json
CHANGED
|
@@ -128,139 +128,6 @@
|
|
|
128
128
|
}
|
|
129
129
|
]
|
|
130
130
|
},
|
|
131
|
-
{
|
|
132
|
-
"kind": "javascript-module",
|
|
133
|
-
"path": "src/components/reke-badge/reke-badge.ts",
|
|
134
|
-
"declarations": [
|
|
135
|
-
{
|
|
136
|
-
"kind": "class",
|
|
137
|
-
"description": "",
|
|
138
|
-
"name": "RekeBadge",
|
|
139
|
-
"cssProperties": [
|
|
140
|
-
{
|
|
141
|
-
"description": "Default variant background color.",
|
|
142
|
-
"name": "--reke-color-surface",
|
|
143
|
-
"default": "#1A1A1A"
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
"description": "Default variant text color.",
|
|
147
|
-
"name": "--reke-color-text",
|
|
148
|
-
"default": "#E5E5E5"
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
"description": "Default variant border color.",
|
|
152
|
-
"name": "--reke-color-border",
|
|
153
|
-
"default": "#252525"
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
"description": "Primary/success variant accent color.",
|
|
157
|
-
"name": "--reke-color-primary",
|
|
158
|
-
"default": "#22C55E"
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
"description": "Danger variant accent color.",
|
|
162
|
-
"name": "--reke-color-danger",
|
|
163
|
-
"default": "#EF4444"
|
|
164
|
-
}
|
|
165
|
-
],
|
|
166
|
-
"cssParts": [
|
|
167
|
-
{
|
|
168
|
-
"description": "The inner badge element.",
|
|
169
|
-
"name": "badge"
|
|
170
|
-
}
|
|
171
|
-
],
|
|
172
|
-
"slots": [
|
|
173
|
-
{
|
|
174
|
-
"description": "Default slot for badge text.",
|
|
175
|
-
"name": ""
|
|
176
|
-
}
|
|
177
|
-
],
|
|
178
|
-
"members": [
|
|
179
|
-
{
|
|
180
|
-
"kind": "field",
|
|
181
|
-
"name": "variant",
|
|
182
|
-
"type": {
|
|
183
|
-
"text": "BadgeVariant"
|
|
184
|
-
},
|
|
185
|
-
"default": "'default'",
|
|
186
|
-
"attribute": "variant",
|
|
187
|
-
"reflects": true
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
"kind": "field",
|
|
191
|
-
"name": "size",
|
|
192
|
-
"type": {
|
|
193
|
-
"text": "BadgeSize"
|
|
194
|
-
},
|
|
195
|
-
"default": "'md'",
|
|
196
|
-
"attribute": "size",
|
|
197
|
-
"reflects": true
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
"kind": "field",
|
|
201
|
-
"name": "shape",
|
|
202
|
-
"type": {
|
|
203
|
-
"text": "BadgeShape"
|
|
204
|
-
},
|
|
205
|
-
"default": "'pill'",
|
|
206
|
-
"attribute": "shape",
|
|
207
|
-
"reflects": true
|
|
208
|
-
}
|
|
209
|
-
],
|
|
210
|
-
"attributes": [
|
|
211
|
-
{
|
|
212
|
-
"name": "variant",
|
|
213
|
-
"type": {
|
|
214
|
-
"text": "BadgeVariant"
|
|
215
|
-
},
|
|
216
|
-
"default": "'default'",
|
|
217
|
-
"fieldName": "variant"
|
|
218
|
-
},
|
|
219
|
-
{
|
|
220
|
-
"name": "size",
|
|
221
|
-
"type": {
|
|
222
|
-
"text": "BadgeSize"
|
|
223
|
-
},
|
|
224
|
-
"default": "'md'",
|
|
225
|
-
"fieldName": "size"
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
"name": "shape",
|
|
229
|
-
"type": {
|
|
230
|
-
"text": "BadgeShape"
|
|
231
|
-
},
|
|
232
|
-
"default": "'pill'",
|
|
233
|
-
"fieldName": "shape"
|
|
234
|
-
}
|
|
235
|
-
],
|
|
236
|
-
"superclass": {
|
|
237
|
-
"name": "RekeElement",
|
|
238
|
-
"module": "/src/shared/base-element.js"
|
|
239
|
-
},
|
|
240
|
-
"tagName": "reke-badge",
|
|
241
|
-
"customElement": true,
|
|
242
|
-
"summary": "A badge component for displaying labels, statuses, and counts."
|
|
243
|
-
}
|
|
244
|
-
],
|
|
245
|
-
"exports": [
|
|
246
|
-
{
|
|
247
|
-
"kind": "js",
|
|
248
|
-
"name": "RekeBadge",
|
|
249
|
-
"declaration": {
|
|
250
|
-
"name": "RekeBadge",
|
|
251
|
-
"module": "src/components/reke-badge/reke-badge.ts"
|
|
252
|
-
}
|
|
253
|
-
},
|
|
254
|
-
{
|
|
255
|
-
"kind": "custom-element-definition",
|
|
256
|
-
"name": "reke-badge",
|
|
257
|
-
"declaration": {
|
|
258
|
-
"name": "RekeBadge",
|
|
259
|
-
"module": "src/components/reke-badge/reke-badge.ts"
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
]
|
|
263
|
-
},
|
|
264
131
|
{
|
|
265
132
|
"kind": "javascript-module",
|
|
266
133
|
"path": "src/components/reke-button/reke-button.ts",
|
|
@@ -454,6 +321,139 @@
|
|
|
454
321
|
}
|
|
455
322
|
]
|
|
456
323
|
},
|
|
324
|
+
{
|
|
325
|
+
"kind": "javascript-module",
|
|
326
|
+
"path": "src/components/reke-badge/reke-badge.ts",
|
|
327
|
+
"declarations": [
|
|
328
|
+
{
|
|
329
|
+
"kind": "class",
|
|
330
|
+
"description": "",
|
|
331
|
+
"name": "RekeBadge",
|
|
332
|
+
"cssProperties": [
|
|
333
|
+
{
|
|
334
|
+
"description": "Default variant background color.",
|
|
335
|
+
"name": "--reke-color-surface",
|
|
336
|
+
"default": "#1A1A1A"
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"description": "Default variant text color.",
|
|
340
|
+
"name": "--reke-color-text",
|
|
341
|
+
"default": "#E5E5E5"
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"description": "Default variant border color.",
|
|
345
|
+
"name": "--reke-color-border",
|
|
346
|
+
"default": "#252525"
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
"description": "Primary/success variant accent color.",
|
|
350
|
+
"name": "--reke-color-primary",
|
|
351
|
+
"default": "#22C55E"
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
"description": "Danger variant accent color.",
|
|
355
|
+
"name": "--reke-color-danger",
|
|
356
|
+
"default": "#EF4444"
|
|
357
|
+
}
|
|
358
|
+
],
|
|
359
|
+
"cssParts": [
|
|
360
|
+
{
|
|
361
|
+
"description": "The inner badge element.",
|
|
362
|
+
"name": "badge"
|
|
363
|
+
}
|
|
364
|
+
],
|
|
365
|
+
"slots": [
|
|
366
|
+
{
|
|
367
|
+
"description": "Default slot for badge text.",
|
|
368
|
+
"name": ""
|
|
369
|
+
}
|
|
370
|
+
],
|
|
371
|
+
"members": [
|
|
372
|
+
{
|
|
373
|
+
"kind": "field",
|
|
374
|
+
"name": "variant",
|
|
375
|
+
"type": {
|
|
376
|
+
"text": "BadgeVariant"
|
|
377
|
+
},
|
|
378
|
+
"default": "'default'",
|
|
379
|
+
"attribute": "variant",
|
|
380
|
+
"reflects": true
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
"kind": "field",
|
|
384
|
+
"name": "size",
|
|
385
|
+
"type": {
|
|
386
|
+
"text": "BadgeSize"
|
|
387
|
+
},
|
|
388
|
+
"default": "'md'",
|
|
389
|
+
"attribute": "size",
|
|
390
|
+
"reflects": true
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
"kind": "field",
|
|
394
|
+
"name": "shape",
|
|
395
|
+
"type": {
|
|
396
|
+
"text": "BadgeShape"
|
|
397
|
+
},
|
|
398
|
+
"default": "'pill'",
|
|
399
|
+
"attribute": "shape",
|
|
400
|
+
"reflects": true
|
|
401
|
+
}
|
|
402
|
+
],
|
|
403
|
+
"attributes": [
|
|
404
|
+
{
|
|
405
|
+
"name": "variant",
|
|
406
|
+
"type": {
|
|
407
|
+
"text": "BadgeVariant"
|
|
408
|
+
},
|
|
409
|
+
"default": "'default'",
|
|
410
|
+
"fieldName": "variant"
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
"name": "size",
|
|
414
|
+
"type": {
|
|
415
|
+
"text": "BadgeSize"
|
|
416
|
+
},
|
|
417
|
+
"default": "'md'",
|
|
418
|
+
"fieldName": "size"
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
"name": "shape",
|
|
422
|
+
"type": {
|
|
423
|
+
"text": "BadgeShape"
|
|
424
|
+
},
|
|
425
|
+
"default": "'pill'",
|
|
426
|
+
"fieldName": "shape"
|
|
427
|
+
}
|
|
428
|
+
],
|
|
429
|
+
"superclass": {
|
|
430
|
+
"name": "RekeElement",
|
|
431
|
+
"module": "/src/shared/base-element.js"
|
|
432
|
+
},
|
|
433
|
+
"tagName": "reke-badge",
|
|
434
|
+
"customElement": true,
|
|
435
|
+
"summary": "A badge component for displaying labels, statuses, and counts."
|
|
436
|
+
}
|
|
437
|
+
],
|
|
438
|
+
"exports": [
|
|
439
|
+
{
|
|
440
|
+
"kind": "js",
|
|
441
|
+
"name": "RekeBadge",
|
|
442
|
+
"declaration": {
|
|
443
|
+
"name": "RekeBadge",
|
|
444
|
+
"module": "src/components/reke-badge/reke-badge.ts"
|
|
445
|
+
}
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
"kind": "custom-element-definition",
|
|
449
|
+
"name": "reke-badge",
|
|
450
|
+
"declaration": {
|
|
451
|
+
"name": "RekeBadge",
|
|
452
|
+
"module": "src/components/reke-badge/reke-badge.ts"
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
]
|
|
456
|
+
},
|
|
457
457
|
{
|
|
458
458
|
"kind": "javascript-module",
|
|
459
459
|
"path": "src/components/reke-card/reke-card.ts",
|
|
@@ -2458,9 +2458,19 @@
|
|
|
2458
2458
|
"default": "#E5E5E5"
|
|
2459
2459
|
},
|
|
2460
2460
|
{
|
|
2461
|
-
"description": "Header text color.
|
|
2461
|
+
"description": "Header text color.",
|
|
2462
2462
|
"name": "--reke-color-text-muted",
|
|
2463
2463
|
"default": "#525252"
|
|
2464
|
+
},
|
|
2465
|
+
{
|
|
2466
|
+
"description": "Chevron focus outline color.",
|
|
2467
|
+
"name": "--reke-color-primary",
|
|
2468
|
+
"default": "#22C55E"
|
|
2469
|
+
},
|
|
2470
|
+
{
|
|
2471
|
+
"description": "Chevron button corner radius. Props: - `expandedRowElement`: Framework-agnostic expand render. Receives `(host, row, key)`. Mount any framework. Return cleanup or void. - `getRowKey`: Optional `(row, index) => RowKey`. Defaults to `String(index)`. Use a stable domain id for identity-keyed expand state across sorts. - `expandable`: Opt-in boolean (default `false`). When `true`, `reke-table` prepends a leading toggle column with an accessible chevron `<button>` per row: `aria-expanded` reflects the row's expand state, `aria-controls` points at the expand `<td>`, and `Enter`/`Space` activate the toggle. Consumers can also build their own toggles by leaving `expandable=false` (default) and calling `toggleExpand(key)` directly. - `expandOnRowClick` (attribute `expand-on-row-click`): Opt-in boolean (default `false`). When `true`, clicking anywhere on a row calls `toggleExpand(key)` internally. `reke-row-click` is STILL emitted on every row click. The chevron button calls `stopPropagation()` so chevron clicks do NOT double-toggle. Consumers MUST use EITHER this prop OR their own `reke-row-click` → `toggleExpand` handler, not both. For keyboard / screen-reader users, pair with `expandable`.",
|
|
2472
|
+
"name": "--reke-radius",
|
|
2473
|
+
"default": "4px"
|
|
2464
2474
|
}
|
|
2465
2475
|
],
|
|
2466
2476
|
"cssParts": [
|
|
@@ -2503,6 +2513,14 @@
|
|
|
2503
2513
|
{
|
|
2504
2514
|
"description": "The td spanning all columns in the expanded row.",
|
|
2505
2515
|
"name": "expand-content"
|
|
2516
|
+
},
|
|
2517
|
+
{
|
|
2518
|
+
"description": "The leading `<td>` that contains the chevron button (only when `expandable`).",
|
|
2519
|
+
"name": "expand-toggle-cell"
|
|
2520
|
+
},
|
|
2521
|
+
{
|
|
2522
|
+
"description": "The chevron `<button>` itself (only when `expandable`).",
|
|
2523
|
+
"name": "expand-toggle-button"
|
|
2506
2524
|
}
|
|
2507
2525
|
],
|
|
2508
2526
|
"slots": [
|
|
@@ -2586,6 +2604,28 @@
|
|
|
2586
2604
|
"attribute": "borderless",
|
|
2587
2605
|
"reflects": true
|
|
2588
2606
|
},
|
|
2607
|
+
{
|
|
2608
|
+
"kind": "field",
|
|
2609
|
+
"name": "expandable",
|
|
2610
|
+
"type": {
|
|
2611
|
+
"text": "boolean"
|
|
2612
|
+
},
|
|
2613
|
+
"default": "false",
|
|
2614
|
+
"description": "Opt-in: when `true`, the table prepends a leading toggle column whose\n`<button>` calls `toggleExpand(key)`, exposes `aria-expanded` reflecting\nthe expand state, `aria-controls` pointing at the expand `<td>` id\n(`reke-table-expand-<key>`), and accepts `Enter` / `Space` activation.\n\nDefaults to `false` so consumers that already wire their own toggles\n(chips, links, custom buttons) are unaffected.",
|
|
2615
|
+
"attribute": "expandable",
|
|
2616
|
+
"reflects": true
|
|
2617
|
+
},
|
|
2618
|
+
{
|
|
2619
|
+
"kind": "field",
|
|
2620
|
+
"name": "expandOnRowClick",
|
|
2621
|
+
"type": {
|
|
2622
|
+
"text": "boolean"
|
|
2623
|
+
},
|
|
2624
|
+
"default": "false",
|
|
2625
|
+
"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).",
|
|
2626
|
+
"attribute": "expand-on-row-click",
|
|
2627
|
+
"reflects": true
|
|
2628
|
+
},
|
|
2589
2629
|
{
|
|
2590
2630
|
"kind": "field",
|
|
2591
2631
|
"name": "sortKey",
|
|
@@ -2608,36 +2648,81 @@
|
|
|
2608
2648
|
},
|
|
2609
2649
|
{
|
|
2610
2650
|
"kind": "field",
|
|
2611
|
-
"name": "
|
|
2651
|
+
"name": "expandedRowElement",
|
|
2612
2652
|
"type": {
|
|
2613
|
-
"text": "
|
|
2653
|
+
"text": "ExpandedRowElement | null"
|
|
2614
2654
|
},
|
|
2615
2655
|
"default": "null",
|
|
2616
|
-
"description": "
|
|
2656
|
+
"description": "Framework-agnostic expand callback. Sole expand API."
|
|
2617
2657
|
},
|
|
2618
2658
|
{
|
|
2619
2659
|
"kind": "field",
|
|
2620
|
-
"name": "
|
|
2660
|
+
"name": "getRowKey",
|
|
2621
2661
|
"type": {
|
|
2622
|
-
"text": "
|
|
2662
|
+
"text": "GetRowKey | undefined"
|
|
2623
2663
|
},
|
|
2624
|
-
"
|
|
2625
|
-
"description": "Framework-agnostic alternative to expandedRowRender.\nReceives an HTMLElement host — mount any framework's content into it.\nReturn a cleanup function (called on collapse) or void."
|
|
2664
|
+
"description": "Resolve a stable identifier for each row.\nDefaults to `String(index)` — identity-equivalent only when rows are stable.\nProvide a domain id (e.g. `row => row.id`) to keep expand state across sorts."
|
|
2626
2665
|
},
|
|
2627
2666
|
{
|
|
2628
2667
|
"kind": "field",
|
|
2629
2668
|
"name": "expandedRows",
|
|
2630
2669
|
"type": {
|
|
2631
|
-
"text": "Set<
|
|
2670
|
+
"text": "Set<RowKey>"
|
|
2632
2671
|
},
|
|
2633
2672
|
"default": "new Set()",
|
|
2634
|
-
"description": "Set of row
|
|
2673
|
+
"description": "Set of row keys currently expanded."
|
|
2674
|
+
},
|
|
2675
|
+
{
|
|
2676
|
+
"kind": "field",
|
|
2677
|
+
"name": "_hostCache",
|
|
2678
|
+
"privacy": "private",
|
|
2679
|
+
"default": "new Map<RowKey, HTMLElement>()",
|
|
2680
|
+
"description": "Host element cached per row key. Survives unrelated re-renders."
|
|
2681
|
+
},
|
|
2682
|
+
{
|
|
2683
|
+
"kind": "field",
|
|
2684
|
+
"name": "_cleanupMap",
|
|
2685
|
+
"privacy": "private",
|
|
2686
|
+
"default": "new Map<RowKey, Cleanup>()",
|
|
2687
|
+
"description": "Cleanup cached per row key. Invoked exactly once on collapse / row removal / disconnect."
|
|
2688
|
+
},
|
|
2689
|
+
{
|
|
2690
|
+
"kind": "field",
|
|
2691
|
+
"name": "_warnedDupKeys",
|
|
2692
|
+
"privacy": "private",
|
|
2693
|
+
"default": "new Set<RowKey>()",
|
|
2694
|
+
"description": "Keys we have already warned about as duplicates (one-shot per component lifetime)."
|
|
2695
|
+
},
|
|
2696
|
+
{
|
|
2697
|
+
"kind": "field",
|
|
2698
|
+
"name": "_warnedNumericTarget",
|
|
2699
|
+
"type": {
|
|
2700
|
+
"text": "boolean"
|
|
2701
|
+
},
|
|
2702
|
+
"privacy": "private",
|
|
2703
|
+
"default": "false",
|
|
2704
|
+
"description": "One-shot guard for the numeric-target-with-getRowKey ambiguity warning."
|
|
2705
|
+
},
|
|
2706
|
+
{
|
|
2707
|
+
"kind": "field",
|
|
2708
|
+
"name": "_mountedKeys",
|
|
2709
|
+
"privacy": "private",
|
|
2710
|
+
"default": "new Set<RowKey>()",
|
|
2711
|
+
"description": "Track which keys are currently mounted in the DOM, to honor the contract that mount happens after `updated()` reconciles."
|
|
2712
|
+
},
|
|
2713
|
+
{
|
|
2714
|
+
"kind": "field",
|
|
2715
|
+
"name": "_keyToRow",
|
|
2716
|
+
"privacy": "private",
|
|
2717
|
+
"default": "new Map<RowKey, TableRow>()",
|
|
2718
|
+
"description": "Latest resolved row map: key → row. Filled during render so callbacks can look up rows."
|
|
2635
2719
|
},
|
|
2636
2720
|
{
|
|
2637
2721
|
"kind": "field",
|
|
2638
|
-
"name": "
|
|
2722
|
+
"name": "_refCallbacks",
|
|
2639
2723
|
"privacy": "private",
|
|
2640
|
-
"default": "new Map<
|
|
2724
|
+
"default": "new Map<RowKey, (el: Element | undefined) => void>()",
|
|
2725
|
+
"description": "Stable ref callback per row key. One closure per key, reused across renders."
|
|
2641
2726
|
},
|
|
2642
2727
|
{
|
|
2643
2728
|
"kind": "field",
|
|
@@ -2657,6 +2742,30 @@
|
|
|
2657
2742
|
"privacy": "private",
|
|
2658
2743
|
"default": "false"
|
|
2659
2744
|
},
|
|
2745
|
+
{
|
|
2746
|
+
"kind": "method",
|
|
2747
|
+
"name": "_resolveKey",
|
|
2748
|
+
"privacy": "private",
|
|
2749
|
+
"return": {
|
|
2750
|
+
"type": {
|
|
2751
|
+
"text": "RowKey"
|
|
2752
|
+
}
|
|
2753
|
+
},
|
|
2754
|
+
"parameters": [
|
|
2755
|
+
{
|
|
2756
|
+
"name": "row",
|
|
2757
|
+
"type": {
|
|
2758
|
+
"text": "TableRow"
|
|
2759
|
+
}
|
|
2760
|
+
},
|
|
2761
|
+
{
|
|
2762
|
+
"name": "index",
|
|
2763
|
+
"type": {
|
|
2764
|
+
"text": "number"
|
|
2765
|
+
}
|
|
2766
|
+
}
|
|
2767
|
+
]
|
|
2768
|
+
},
|
|
2660
2769
|
{
|
|
2661
2770
|
"kind": "method",
|
|
2662
2771
|
"name": "handleHeaderClick",
|
|
@@ -2689,18 +2798,73 @@
|
|
|
2689
2798
|
}
|
|
2690
2799
|
]
|
|
2691
2800
|
},
|
|
2801
|
+
{
|
|
2802
|
+
"kind": "method",
|
|
2803
|
+
"name": "_handleChevronClick",
|
|
2804
|
+
"privacy": "private",
|
|
2805
|
+
"return": {
|
|
2806
|
+
"type": {
|
|
2807
|
+
"text": "void"
|
|
2808
|
+
}
|
|
2809
|
+
},
|
|
2810
|
+
"parameters": [
|
|
2811
|
+
{
|
|
2812
|
+
"name": "event",
|
|
2813
|
+
"type": {
|
|
2814
|
+
"text": "Event"
|
|
2815
|
+
}
|
|
2816
|
+
},
|
|
2817
|
+
{
|
|
2818
|
+
"name": "key",
|
|
2819
|
+
"type": {
|
|
2820
|
+
"text": "RowKey"
|
|
2821
|
+
}
|
|
2822
|
+
}
|
|
2823
|
+
],
|
|
2824
|
+
"description": "Chevron button click handler. Stops propagation so it does NOT also fire\nthe row-level `reke-row-click` event, then toggles the row by key."
|
|
2825
|
+
},
|
|
2826
|
+
{
|
|
2827
|
+
"kind": "method",
|
|
2828
|
+
"name": "_handleChevronKeydown",
|
|
2829
|
+
"privacy": "private",
|
|
2830
|
+
"return": {
|
|
2831
|
+
"type": {
|
|
2832
|
+
"text": "void"
|
|
2833
|
+
}
|
|
2834
|
+
},
|
|
2835
|
+
"parameters": [
|
|
2836
|
+
{
|
|
2837
|
+
"name": "event",
|
|
2838
|
+
"type": {
|
|
2839
|
+
"text": "KeyboardEvent"
|
|
2840
|
+
}
|
|
2841
|
+
},
|
|
2842
|
+
{
|
|
2843
|
+
"name": "key",
|
|
2844
|
+
"type": {
|
|
2845
|
+
"text": "RowKey"
|
|
2846
|
+
}
|
|
2847
|
+
}
|
|
2848
|
+
],
|
|
2849
|
+
"description": "Chevron keyboard activation. The element is a native `<button>`, so Enter\nalready fires `click` natively. We still handle it here to keep the\nkeyboard contract explicit and testable across environments where the\n`KeyboardEvent` is dispatched programmatically (Vitest browser mode tests\ndispatch raw `keydown`s without the synthesized `click`).\n\nFor Space we MUST call `preventDefault()` so the page does not scroll."
|
|
2850
|
+
},
|
|
2692
2851
|
{
|
|
2693
2852
|
"kind": "method",
|
|
2694
2853
|
"name": "toggleExpand",
|
|
2854
|
+
"return": {
|
|
2855
|
+
"type": {
|
|
2856
|
+
"text": "void"
|
|
2857
|
+
}
|
|
2858
|
+
},
|
|
2695
2859
|
"parameters": [
|
|
2696
2860
|
{
|
|
2697
|
-
"name": "
|
|
2861
|
+
"name": "target",
|
|
2698
2862
|
"type": {
|
|
2699
|
-
"text": "number"
|
|
2863
|
+
"text": "number | RowKey"
|
|
2700
2864
|
}
|
|
2701
2865
|
}
|
|
2702
2866
|
],
|
|
2703
|
-
"description": "Toggle expand state for a row
|
|
2867
|
+
"description": "Toggle expand state for a row.\nAccepts either a numeric `index` into `rows` or a `RowKey` (the value returned by `getRowKey`).\nWhen `getRowKey` is unset, indices and keys collapse onto `String(index)`."
|
|
2704
2868
|
},
|
|
2705
2869
|
{
|
|
2706
2870
|
"kind": "method",
|
|
@@ -2712,13 +2876,13 @@
|
|
|
2712
2876
|
},
|
|
2713
2877
|
"parameters": [
|
|
2714
2878
|
{
|
|
2715
|
-
"name": "
|
|
2879
|
+
"name": "key",
|
|
2716
2880
|
"type": {
|
|
2717
|
-
"text": "
|
|
2881
|
+
"text": "RowKey"
|
|
2718
2882
|
}
|
|
2719
2883
|
}
|
|
2720
2884
|
],
|
|
2721
|
-
"description": "Check whether a row
|
|
2885
|
+
"description": "Check whether a row with the given key is currently expanded."
|
|
2722
2886
|
},
|
|
2723
2887
|
{
|
|
2724
2888
|
"kind": "method",
|
|
@@ -2748,26 +2912,44 @@
|
|
|
2748
2912
|
},
|
|
2749
2913
|
{
|
|
2750
2914
|
"kind": "method",
|
|
2751
|
-
"name": "
|
|
2915
|
+
"name": "_getOrCreateHost",
|
|
2752
2916
|
"privacy": "private",
|
|
2917
|
+
"return": {
|
|
2918
|
+
"type": {
|
|
2919
|
+
"text": "HTMLElement"
|
|
2920
|
+
}
|
|
2921
|
+
},
|
|
2753
2922
|
"parameters": [
|
|
2754
2923
|
{
|
|
2755
|
-
"name": "
|
|
2924
|
+
"name": "key",
|
|
2756
2925
|
"type": {
|
|
2757
|
-
"text": "
|
|
2926
|
+
"text": "RowKey"
|
|
2758
2927
|
}
|
|
2759
|
-
}
|
|
2928
|
+
}
|
|
2929
|
+
]
|
|
2930
|
+
},
|
|
2931
|
+
{
|
|
2932
|
+
"kind": "method",
|
|
2933
|
+
"name": "_expandTdRef",
|
|
2934
|
+
"privacy": "private",
|
|
2935
|
+
"return": {
|
|
2936
|
+
"type": {
|
|
2937
|
+
"text": "(el: Element | undefined) => void"
|
|
2938
|
+
}
|
|
2939
|
+
},
|
|
2940
|
+
"parameters": [
|
|
2760
2941
|
{
|
|
2761
|
-
"name": "
|
|
2942
|
+
"name": "key",
|
|
2762
2943
|
"type": {
|
|
2763
|
-
"text": "
|
|
2944
|
+
"text": "RowKey"
|
|
2764
2945
|
}
|
|
2765
2946
|
}
|
|
2766
|
-
]
|
|
2947
|
+
],
|
|
2948
|
+
"description": "Return a STABLE ref callback for a given row key. Lit's `ref()` directive accepts a\ncallback `(el: Element | undefined) => void` directly, so no cast is needed. The callback\nis memoized per key to avoid churning Lit's ref directive on every render."
|
|
2767
2949
|
},
|
|
2768
2950
|
{
|
|
2769
2951
|
"kind": "method",
|
|
2770
|
-
"name": "
|
|
2952
|
+
"name": "_renderRow",
|
|
2771
2953
|
"privacy": "private",
|
|
2772
2954
|
"parameters": [
|
|
2773
2955
|
{
|
|
@@ -2781,8 +2963,52 @@
|
|
|
2781
2963
|
"type": {
|
|
2782
2964
|
"text": "number"
|
|
2783
2965
|
}
|
|
2966
|
+
},
|
|
2967
|
+
{
|
|
2968
|
+
"name": "key",
|
|
2969
|
+
"type": {
|
|
2970
|
+
"text": "RowKey"
|
|
2971
|
+
}
|
|
2784
2972
|
}
|
|
2785
2973
|
]
|
|
2974
|
+
},
|
|
2975
|
+
{
|
|
2976
|
+
"kind": "field",
|
|
2977
|
+
"name": "_warnedLegacyApi",
|
|
2978
|
+
"type": {
|
|
2979
|
+
"text": "boolean"
|
|
2980
|
+
},
|
|
2981
|
+
"privacy": "private",
|
|
2982
|
+
"default": "false"
|
|
2983
|
+
},
|
|
2984
|
+
{
|
|
2985
|
+
"kind": "method",
|
|
2986
|
+
"name": "_safeCleanup",
|
|
2987
|
+
"privacy": "private",
|
|
2988
|
+
"return": {
|
|
2989
|
+
"type": {
|
|
2990
|
+
"text": "void"
|
|
2991
|
+
}
|
|
2992
|
+
},
|
|
2993
|
+
"parameters": [
|
|
2994
|
+
{
|
|
2995
|
+
"name": "key",
|
|
2996
|
+
"type": {
|
|
2997
|
+
"text": "RowKey"
|
|
2998
|
+
}
|
|
2999
|
+
}
|
|
3000
|
+
],
|
|
3001
|
+
"description": "Invoke the cached cleanup for a key, swallowing consumer errors so our own state\nmutation (`expandedRows`, host/cleanup/ref maps) and `emit` stay consistent even if\nthe consumer's cleanup throws. Deletes the cleanup entry after running."
|
|
3002
|
+
},
|
|
3003
|
+
{
|
|
3004
|
+
"kind": "method",
|
|
3005
|
+
"name": "_runAllCleanupsAndClear",
|
|
3006
|
+
"privacy": "private",
|
|
3007
|
+
"return": {
|
|
3008
|
+
"type": {
|
|
3009
|
+
"text": "void"
|
|
3010
|
+
}
|
|
3011
|
+
}
|
|
2786
3012
|
}
|
|
2787
3013
|
],
|
|
2788
3014
|
"events": [
|
|
@@ -2795,7 +3021,7 @@
|
|
|
2795
3021
|
"name": "reke-sort"
|
|
2796
3022
|
},
|
|
2797
3023
|
{
|
|
2798
|
-
"description": "Fired when a row is expanded or collapsed. Detail: `{ row: TableRow, index: number, expanded: boolean }`.",
|
|
3024
|
+
"description": "Fired when a row is expanded or collapsed. Detail: `{ row: TableRow, index: number, key: RowKey, expanded: boolean }`.",
|
|
2799
3025
|
"name": "reke-row-expand"
|
|
2800
3026
|
}
|
|
2801
3027
|
],
|
|
@@ -2840,6 +3066,24 @@
|
|
|
2840
3066
|
"default": "false",
|
|
2841
3067
|
"fieldName": "borderless"
|
|
2842
3068
|
},
|
|
3069
|
+
{
|
|
3070
|
+
"name": "expandable",
|
|
3071
|
+
"type": {
|
|
3072
|
+
"text": "boolean"
|
|
3073
|
+
},
|
|
3074
|
+
"default": "false",
|
|
3075
|
+
"description": "Opt-in: when `true`, the table prepends a leading toggle column whose\n`<button>` calls `toggleExpand(key)`, exposes `aria-expanded` reflecting\nthe expand state, `aria-controls` pointing at the expand `<td>` id\n(`reke-table-expand-<key>`), and accepts `Enter` / `Space` activation.\n\nDefaults to `false` so consumers that already wire their own toggles\n(chips, links, custom buttons) are unaffected.",
|
|
3076
|
+
"fieldName": "expandable"
|
|
3077
|
+
},
|
|
3078
|
+
{
|
|
3079
|
+
"name": "expand-on-row-click",
|
|
3080
|
+
"type": {
|
|
3081
|
+
"text": "boolean"
|
|
3082
|
+
},
|
|
3083
|
+
"default": "false",
|
|
3084
|
+
"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).",
|
|
3085
|
+
"fieldName": "expandOnRowClick"
|
|
3086
|
+
},
|
|
2843
3087
|
{
|
|
2844
3088
|
"name": "sort-key",
|
|
2845
3089
|
"type": {
|
|
@@ -2863,7 +3107,7 @@
|
|
|
2863
3107
|
},
|
|
2864
3108
|
"tagName": "reke-table",
|
|
2865
3109
|
"customElement": true,
|
|
2866
|
-
"summary": "A data table with custom cell rendering, expandable rows, and toolbar/footer slots."
|
|
3110
|
+
"summary": "A data table with custom cell rendering, framework-agnostic expandable rows, and toolbar/footer slots."
|
|
2867
3111
|
}
|
|
2868
3112
|
],
|
|
2869
3113
|
"exports": [
|