@human-kit/ui 1.1.0 → 1.1.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.
@@ -40,6 +40,15 @@
40
40
  // its width outwards; the physical shift direction depends on the layout
41
41
  // direction, resolved once the element mounts.
42
42
  const handleRtl = $derived(element ? isRightToLeft() : false);
43
+ // A column pinned to the inline end is held by that edge: it is the table's, or the next
44
+ // pinned column's, which paints over it — half the handle was covered and the drag found
45
+ // nothing there. Its free edge is the inline start, so the handle moves there and the drag
46
+ // reads mirrored: pulling it towards the start widens the column.
47
+ const atInlineStart = $derived(column.pin === 'right');
48
+ // Centred on the edge it sits on: half inside the column, half over its neighbour.
49
+ const handleTransform = $derived(
50
+ atInlineStart !== handleRtl ? 'translateX(-50%)' : 'translateX(50%)'
51
+ );
43
52
 
44
53
  let isFocused = $state(false);
45
54
  let isFocusVisible = $state(false);
@@ -336,7 +345,7 @@
336
345
 
337
346
  const pointerDelta = latestClientX - previousClientX;
338
347
  previousClientX = latestClientX;
339
- const widthDelta = isRTL ? -pointerDelta : pointerDelta;
348
+ const widthDelta = isRTL !== atInlineStart ? -pointerDelta : pointerDelta;
340
349
  dragWidth = clampWidth(dragWidth + widthDelta);
341
350
  const nextWidth = dragWidth;
342
351
  updateWidth(nextWidth);
@@ -531,7 +540,7 @@
531
540
  event.stopPropagation();
532
541
 
533
542
  const delta = event.shiftKey ? shiftStep : step;
534
- const direction = isRightToLeft() ? -1 : 1;
543
+ const direction = isRightToLeft() !== atInlineStart ? -1 : 1;
535
544
  const baseWidth = getResolvedWidth();
536
545
 
537
546
  switch (event.key) {
@@ -595,12 +604,13 @@
595
604
  data-resizing={isResizing ? 'true' : undefined}
596
605
  data-resizable={isResizable ? 'true' : undefined}
597
606
  data-table-column-resizer="true"
598
- data-resizable-direction="right"
607
+ data-resizable-direction={atInlineStart ? 'left' : 'right'}
599
608
  style:position="absolute"
600
609
  style:z-index="2"
601
610
  style:top="0"
602
- style:inset-inline-end="0"
603
- style:transform={handleRtl ? 'translateX(-50%)' : 'translateX(50%)'}
611
+ style:inset-inline-start={atInlineStart ? '0' : undefined}
612
+ style:inset-inline-end={atInlineStart ? undefined : '0'}
613
+ style:transform={handleTransform}
604
614
  style:width="0.75rem"
605
615
  style:height="100%"
606
616
  style:display="flex"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@human-kit/ui",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Accessible, typed UI components for Svelte 5 — shipped as native ESM with per-component subpath exports so bundlers only include what you import.",
5
5
  "license": "MIT",
6
6
  "author": "Agustin Delgado <agustindariodelgado@gmail.com>",