reke-ui 0.1.1 → 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.
Files changed (86) hide show
  1. package/README.md +23 -0
  2. package/cli/install-skills.mjs +169 -0
  3. package/custom-elements.json +472 -128
  4. package/dist/__type-checks__/no-lit-in-public-types.d.ts +2 -0
  5. package/dist/__type-checks__/no-lit-in-public-types.d.ts.map +1 -0
  6. package/dist/_virtual/_@oxc-project_runtime@0.137.0/helpers/esm/decorate.js +9 -0
  7. package/dist/components/reke-alert/reke-alert.d.ts.map +1 -1
  8. package/dist/components/reke-alert/reke-alert.js +45 -0
  9. package/dist/components/reke-alert/reke-alert.styles.d.ts.map +1 -1
  10. package/dist/components/reke-alert/reke-alert.styles.js +103 -0
  11. package/dist/components/reke-badge/reke-badge.d.ts +4 -2
  12. package/dist/components/reke-badge/reke-badge.d.ts.map +1 -1
  13. package/dist/components/reke-badge/reke-badge.js +30 -0
  14. package/dist/components/reke-badge/reke-badge.styles.d.ts.map +1 -1
  15. package/dist/components/reke-badge/reke-badge.styles.js +92 -0
  16. package/dist/components/reke-button/reke-button.d.ts.map +1 -1
  17. package/dist/components/reke-button/reke-button.js +53 -0
  18. package/dist/components/reke-button/reke-button.styles.d.ts.map +1 -1
  19. package/dist/components/reke-button/reke-button.styles.js +226 -0
  20. package/dist/components/reke-card/reke-card.d.ts +7 -0
  21. package/dist/components/reke-card/reke-card.d.ts.map +1 -1
  22. package/dist/components/reke-card/reke-card.js +50 -0
  23. package/dist/components/reke-card/reke-card.styles.d.ts.map +1 -1
  24. package/dist/components/reke-card/reke-card.styles.js +147 -0
  25. package/dist/components/reke-checkbox/reke-checkbox.js +57 -0
  26. package/dist/components/reke-checkbox/reke-checkbox.styles.d.ts.map +1 -1
  27. package/dist/components/reke-checkbox/reke-checkbox.styles.js +79 -0
  28. package/dist/components/reke-chip/reke-chip.d.ts.map +1 -1
  29. package/dist/components/reke-chip/reke-chip.js +62 -0
  30. package/dist/components/reke-chip/reke-chip.styles.d.ts.map +1 -1
  31. package/dist/components/reke-chip/reke-chip.styles.js +128 -0
  32. package/dist/components/reke-date-range/reke-date-range.d.ts.map +1 -1
  33. package/dist/components/reke-date-range/reke-date-range.js +326 -0
  34. package/dist/components/reke-date-range/reke-date-range.styles.d.ts.map +1 -1
  35. package/dist/components/reke-date-range/reke-date-range.styles.js +335 -0
  36. package/dist/components/reke-dialog/reke-dialog.d.ts.map +1 -1
  37. package/dist/components/reke-dialog/reke-dialog.js +77 -0
  38. package/dist/components/reke-dialog/reke-dialog.styles.d.ts.map +1 -1
  39. package/dist/components/reke-dialog/reke-dialog.styles.js +132 -0
  40. package/dist/components/reke-file-upload/reke-file-upload.d.ts.map +1 -1
  41. package/dist/components/reke-file-upload/reke-file-upload.js +84 -0
  42. package/dist/components/reke-file-upload/reke-file-upload.styles.js +104 -0
  43. package/dist/components/reke-input/reke-input.js +54 -0
  44. package/dist/components/reke-input/reke-input.styles.d.ts.map +1 -1
  45. package/dist/components/reke-input/reke-input.styles.js +78 -0
  46. package/dist/components/reke-select/reke-select.d.ts.map +1 -1
  47. package/dist/components/reke-select/reke-select.js +89 -0
  48. package/dist/components/reke-select/reke-select.styles.d.ts.map +1 -1
  49. package/dist/components/reke-select/reke-select.styles.js +120 -0
  50. package/dist/components/reke-table/reke-table.d.ts +144 -13
  51. package/dist/components/reke-table/reke-table.d.ts.map +1 -1
  52. package/dist/components/reke-table/reke-table.js +291 -0
  53. package/dist/components/reke-table/reke-table.styles.d.ts.map +1 -1
  54. package/dist/components/reke-table/reke-table.styles.js +265 -0
  55. package/dist/components/reke-textarea/reke-textarea.js +54 -0
  56. package/dist/components/reke-textarea/reke-textarea.styles.js +73 -0
  57. package/dist/components/reke-toast/reke-toast.d.ts.map +1 -1
  58. package/dist/components/reke-toast/reke-toast.js +74 -0
  59. package/dist/components/reke-toast/reke-toast.styles.d.ts.map +1 -1
  60. package/dist/components/reke-toast/reke-toast.styles.js +183 -0
  61. package/dist/components/reke-toggle/reke-toggle.js +50 -0
  62. package/dist/components/reke-toggle/reke-toggle.styles.js +68 -0
  63. package/dist/components/reke-tooltip/reke-tooltip.js +51 -0
  64. package/dist/components/reke-tooltip/reke-tooltip.styles.js +64 -0
  65. package/dist/index.d.ts +23 -23
  66. package/dist/index.d.ts.map +1 -1
  67. package/dist/index.js +18 -0
  68. package/dist/node_modules/lit/directives/ref.js +1 -0
  69. package/dist/node_modules/lit-html/async-directive.js +55 -0
  70. package/dist/node_modules/lit-html/directive-helpers.js +5 -0
  71. package/dist/node_modules/lit-html/directive.js +28 -0
  72. package/dist/node_modules/lit-html/directives/ref.js +30 -0
  73. package/dist/node_modules/lit-html/lit-html.js +234 -0
  74. package/dist/react-bridge/table.d.ts +58 -0
  75. package/dist/react-bridge/table.d.ts.map +1 -0
  76. package/dist/react-bridge/table.js +115 -0
  77. package/dist/react.d.ts +12 -26
  78. package/dist/react.d.ts.map +1 -1
  79. package/dist/react.js +111 -132
  80. package/dist/shared/base-element.js +14 -0
  81. package/dist/shared/tailwind-styles.js +6 -0
  82. package/dist/shared/tailwind.js +4 -0
  83. package/dist/tokens/reke-tokens.css +70 -0
  84. package/package.json +43 -23
  85. package/dist/reke-chip-DexKxhxn.js +0 -3358
  86. package/dist/reke-ui.js +0 -20
@@ -128,121 +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
- "attributes": [
201
- {
202
- "name": "variant",
203
- "type": {
204
- "text": "BadgeVariant"
205
- },
206
- "default": "'default'",
207
- "fieldName": "variant"
208
- },
209
- {
210
- "name": "size",
211
- "type": {
212
- "text": "BadgeSize"
213
- },
214
- "default": "'md'",
215
- "fieldName": "size"
216
- }
217
- ],
218
- "superclass": {
219
- "name": "RekeElement",
220
- "module": "/src/shared/base-element.js"
221
- },
222
- "tagName": "reke-badge",
223
- "customElement": true,
224
- "summary": "A badge component for displaying labels, statuses, and counts."
225
- }
226
- ],
227
- "exports": [
228
- {
229
- "kind": "js",
230
- "name": "RekeBadge",
231
- "declaration": {
232
- "name": "RekeBadge",
233
- "module": "src/components/reke-badge/reke-badge.ts"
234
- }
235
- },
236
- {
237
- "kind": "custom-element-definition",
238
- "name": "reke-badge",
239
- "declaration": {
240
- "name": "RekeBadge",
241
- "module": "src/components/reke-badge/reke-badge.ts"
242
- }
243
- }
244
- ]
245
- },
246
131
  {
247
132
  "kind": "javascript-module",
248
133
  "path": "src/components/reke-button/reke-button.ts",
@@ -436,6 +321,139 @@
436
321
  }
437
322
  ]
438
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
+ },
439
457
  {
440
458
  "kind": "javascript-module",
441
459
  "path": "src/components/reke-card/reke-card.ts",
@@ -464,6 +482,14 @@
464
482
  "description": "Card border radius.",
465
483
  "name": "--reke-radius",
466
484
  "default": "4px"
485
+ },
486
+ {
487
+ "description": "Shadow applied on hover when interactive.",
488
+ "name": "--reke-shadow-lift"
489
+ },
490
+ {
491
+ "description": "Glow shadow for accent=primary on hover.",
492
+ "name": "--reke-shadow-glow-primary"
467
493
  }
468
494
  ],
469
495
  "slots": [
@@ -501,6 +527,28 @@
501
527
  "attribute": "padding",
502
528
  "reflects": true
503
529
  },
530
+ {
531
+ "kind": "field",
532
+ "name": "interactive",
533
+ "type": {
534
+ "text": "boolean"
535
+ },
536
+ "default": "false",
537
+ "description": "Enables hover lift + border glow effect.",
538
+ "attribute": "interactive",
539
+ "reflects": true
540
+ },
541
+ {
542
+ "kind": "field",
543
+ "name": "accent",
544
+ "type": {
545
+ "text": "CardAccent"
546
+ },
547
+ "default": "'none'",
548
+ "description": "Accent color shown on hover border (requires interactive=true).",
549
+ "attribute": "accent",
550
+ "reflects": true
551
+ },
504
552
  {
505
553
  "kind": "field",
506
554
  "name": "_hasHeader",
@@ -555,6 +603,24 @@
555
603
  },
556
604
  "default": "'md'",
557
605
  "fieldName": "padding"
606
+ },
607
+ {
608
+ "name": "interactive",
609
+ "type": {
610
+ "text": "boolean"
611
+ },
612
+ "default": "false",
613
+ "description": "Enables hover lift + border glow effect.",
614
+ "fieldName": "interactive"
615
+ },
616
+ {
617
+ "name": "accent",
618
+ "type": {
619
+ "text": "CardAccent"
620
+ },
621
+ "default": "'none'",
622
+ "description": "Accent color shown on hover border (requires interactive=true).",
623
+ "fieldName": "accent"
558
624
  }
559
625
  ],
560
626
  "superclass": {
@@ -2395,6 +2461,16 @@
2395
2461
  "description": "Header text color.",
2396
2462
  "name": "--reke-color-text-muted",
2397
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"
2398
2474
  }
2399
2475
  ],
2400
2476
  "cssParts": [
@@ -2437,6 +2513,14 @@
2437
2513
  {
2438
2514
  "description": "The td spanning all columns in the expanded row.",
2439
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"
2440
2524
  }
2441
2525
  ],
2442
2526
  "slots": [
@@ -2520,6 +2604,28 @@
2520
2604
  "attribute": "borderless",
2521
2605
  "reflects": true
2522
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
+ },
2523
2629
  {
2524
2630
  "kind": "field",
2525
2631
  "name": "sortKey",
@@ -2542,21 +2648,81 @@
2542
2648
  },
2543
2649
  {
2544
2650
  "kind": "field",
2545
- "name": "expandedRowRender",
2651
+ "name": "expandedRowElement",
2546
2652
  "type": {
2547
- "text": "ExpandedRowRenderer | null"
2653
+ "text": "ExpandedRowElement | null"
2548
2654
  },
2549
2655
  "default": "null",
2550
- "description": "When set, rows become expandable with a chevron toggle."
2656
+ "description": "Framework-agnostic expand callback. Sole expand API."
2657
+ },
2658
+ {
2659
+ "kind": "field",
2660
+ "name": "getRowKey",
2661
+ "type": {
2662
+ "text": "GetRowKey | undefined"
2663
+ },
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."
2551
2665
  },
2552
2666
  {
2553
2667
  "kind": "field",
2554
2668
  "name": "expandedRows",
2555
2669
  "type": {
2556
- "text": "Set<number>"
2670
+ "text": "Set<RowKey>"
2557
2671
  },
2558
2672
  "default": "new Set()",
2559
- "description": "Set of row indices currently expanded."
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."
2719
+ },
2720
+ {
2721
+ "kind": "field",
2722
+ "name": "_refCallbacks",
2723
+ "privacy": "private",
2724
+ "default": "new Map<RowKey, (el: Element | undefined) => void>()",
2725
+ "description": "Stable ref callback per row key. One closure per key, reused across renders."
2560
2726
  },
2561
2727
  {
2562
2728
  "kind": "field",
@@ -2576,6 +2742,30 @@
2576
2742
  "privacy": "private",
2577
2743
  "default": "false"
2578
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
+ },
2579
2769
  {
2580
2770
  "kind": "method",
2581
2771
  "name": "handleHeaderClick",
@@ -2608,18 +2798,73 @@
2608
2798
  }
2609
2799
  ]
2610
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
+ },
2611
2851
  {
2612
2852
  "kind": "method",
2613
2853
  "name": "toggleExpand",
2854
+ "return": {
2855
+ "type": {
2856
+ "text": "void"
2857
+ }
2858
+ },
2614
2859
  "parameters": [
2615
2860
  {
2616
- "name": "index",
2861
+ "name": "target",
2617
2862
  "type": {
2618
- "text": "number"
2863
+ "text": "number | RowKey"
2619
2864
  }
2620
2865
  }
2621
2866
  ],
2622
- "description": "Toggle expand state for a row at the given index."
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)`."
2623
2868
  },
2624
2869
  {
2625
2870
  "kind": "method",
@@ -2631,13 +2876,13 @@
2631
2876
  },
2632
2877
  "parameters": [
2633
2878
  {
2634
- "name": "index",
2879
+ "name": "key",
2635
2880
  "type": {
2636
- "text": "number"
2881
+ "text": "RowKey"
2637
2882
  }
2638
2883
  }
2639
2884
  ],
2640
- "description": "Check whether a row at the given index is currently expanded."
2885
+ "description": "Check whether a row with the given key is currently expanded."
2641
2886
  },
2642
2887
  {
2643
2888
  "kind": "method",
@@ -2665,6 +2910,43 @@
2665
2910
  }
2666
2911
  ]
2667
2912
  },
2913
+ {
2914
+ "kind": "method",
2915
+ "name": "_getOrCreateHost",
2916
+ "privacy": "private",
2917
+ "return": {
2918
+ "type": {
2919
+ "text": "HTMLElement"
2920
+ }
2921
+ },
2922
+ "parameters": [
2923
+ {
2924
+ "name": "key",
2925
+ "type": {
2926
+ "text": "RowKey"
2927
+ }
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": [
2941
+ {
2942
+ "name": "key",
2943
+ "type": {
2944
+ "text": "RowKey"
2945
+ }
2946
+ }
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."
2949
+ },
2668
2950
  {
2669
2951
  "kind": "method",
2670
2952
  "name": "_renderRow",
@@ -2681,8 +2963,52 @@
2681
2963
  "type": {
2682
2964
  "text": "number"
2683
2965
  }
2966
+ },
2967
+ {
2968
+ "name": "key",
2969
+ "type": {
2970
+ "text": "RowKey"
2971
+ }
2684
2972
  }
2685
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
+ }
2686
3012
  }
2687
3013
  ],
2688
3014
  "events": [
@@ -2695,7 +3021,7 @@
2695
3021
  "name": "reke-sort"
2696
3022
  },
2697
3023
  {
2698
- "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 }`.",
2699
3025
  "name": "reke-row-expand"
2700
3026
  }
2701
3027
  ],
@@ -2740,6 +3066,24 @@
2740
3066
  "default": "false",
2741
3067
  "fieldName": "borderless"
2742
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
+ },
2743
3087
  {
2744
3088
  "name": "sort-key",
2745
3089
  "type": {
@@ -2763,7 +3107,7 @@
2763
3107
  },
2764
3108
  "tagName": "reke-table",
2765
3109
  "customElement": true,
2766
- "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."
2767
3111
  }
2768
3112
  ],
2769
3113
  "exports": [