@objectifthunes/whiteboard 0.5.4 → 0.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.
package/dist/index.d.ts CHANGED
@@ -675,7 +675,7 @@ export declare function Tooltip({ label, placement, className, children, ...prop
675
675
  declare interface TooltipProps extends HTMLAttributes<HTMLSpanElement> {
676
676
  /** Bubble content. Keep it to a few words. */
677
677
  label: ReactNode;
678
- placement?: 'top' | 'bottom';
678
+ placement?: 'top' | 'bottom' | 'left' | 'right';
679
679
  children: ReactNode;
680
680
  }
681
681
 
package/dist/index.js CHANGED
@@ -1293,7 +1293,13 @@ function gn({ label: e, placement: t = "top", className: n, children: a, ...s })
1293
1293
  return /* @__PURE__ */ d(
1294
1294
  "span",
1295
1295
  {
1296
- className: i("tooltip", t === "bottom" && "tooltip--bottom", n),
1296
+ className: i(
1297
+ "tooltip",
1298
+ t === "bottom" && "tooltip--bottom",
1299
+ t === "left" && "tooltip--left",
1300
+ t === "right" && "tooltip--right",
1301
+ n
1302
+ ),
1297
1303
  ...s,
1298
1304
  children: [
1299
1305
  a,
@@ -1567,6 +1567,22 @@ button.chip:hover {
1567
1567
  top: calc(100% + 0.4rem);
1568
1568
  }
1569
1569
 
1570
+ .tooltip--right .tooltip__bubble,
1571
+ .tooltip--left .tooltip__bubble {
1572
+ bottom: auto;
1573
+ top: 50%;
1574
+ transform: translateY(-50%);
1575
+ }
1576
+
1577
+ .tooltip--right .tooltip__bubble {
1578
+ left: calc(100% + 0.4rem);
1579
+ }
1580
+
1581
+ .tooltip--left .tooltip__bubble {
1582
+ left: auto;
1583
+ right: calc(100% + 0.4rem);
1584
+ }
1585
+
1570
1586
  .tooltip:hover .tooltip__bubble,
1571
1587
  .tooltip:focus-within .tooltip__bubble {
1572
1588
  opacity: 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@objectifthunes/whiteboard",
3
- "version": "0.5.4",
3
+ "version": "0.6.0",
4
4
  "description": "Pan/zoom whiteboard canvas with draggable panels, minimap, snap-to-grid, and zoom controls",
5
5
  "license": "MIT",
6
6
  "type": "module",