@makolabs/ripple 3.5.2 → 3.6.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.
@@ -316,10 +316,18 @@
316
316
  return scopeData.length > 0 && scopeData.every((r) => isRowSelected(r));
317
317
  }
318
318
 
319
+ // Row click toggles expansion only when nothing else claims the click —
320
+ // an explicit `onrowclick` (e.g. navigation) or selection takes priority,
321
+ // leaving the chevron as the sole expand control in those modes.
322
+ const rowClickExpands = $derived(expandable && !!expandedContent && !onrowclick && !selectable);
323
+
319
324
  function handleRowClick(row: DataRow, index: number) {
320
325
  if (selectable && canSelectRow(row)) {
321
326
  toggleRowSelection(row);
322
327
  }
328
+ if (rowClickExpands) {
329
+ toggleRowExpanded(row, index);
330
+ }
323
331
  onrowclick?.(row, index);
324
332
  }
325
333
 
@@ -500,7 +508,8 @@
500
508
  <tr
501
509
  class={cn(trClasses, rowClass(row, rowIndex), {
502
510
  'bg-primary-100': selectable && isRowSelected(row),
503
- 'cursor-pointer': onrowclick || (selectable && canSelectRow(row))
511
+ 'cursor-pointer':
512
+ onrowclick || rowClickExpands || (selectable && canSelectRow(row))
504
513
  })}
505
514
  onclick={() => handleRowClick(row, rowIndex)}
506
515
  aria-selected={selectable && isRowSelected(row)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@makolabs/ripple",
3
- "version": "3.5.2",
3
+ "version": "3.6.0",
4
4
  "description": "Simple Svelte 5 powered component library ✨",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "repository": {
@@ -138,7 +138,8 @@
138
138
  "ws": ">=8.20.1",
139
139
  "uuid": ">=11.1.1",
140
140
  "devalue": ">=5.8.1",
141
- "fast-xml-builder": ">=1.1.7"
141
+ "fast-xml-builder": ">=1.1.7",
142
+ "esbuild": ">=0.28.1"
142
143
  },
143
144
  "dependencies": {
144
145
  "@aws-sdk/client-s3": "^3.1029.0",