@objectifthunes/whiteboard 0.5.4 → 0.6.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.
- package/dist/index.d.ts +1 -1
- package/dist/index.js +7 -1
- package/dist/whiteboard.css +59 -0
- package/package.json +1 -1
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(
|
|
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,
|
package/dist/whiteboard.css
CHANGED
|
@@ -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;
|
|
@@ -1678,3 +1694,46 @@ button.chip:hover {
|
|
|
1678
1694
|
.toolbar .wb-btn--icon-only {
|
|
1679
1695
|
font-size: var(--wb-fs-md);
|
|
1680
1696
|
}
|
|
1697
|
+
|
|
1698
|
+
/* ── unified chrome rhythm ─────────────────────────────────────────────
|
|
1699
|
+
Toolbar and VerticalToolbar share identical metrics: one control
|
|
1700
|
+
size, one padding, one gap — horizontal and vertical. Appended last
|
|
1701
|
+
so it wins over the historical per-bar values. */
|
|
1702
|
+
.toolbar,
|
|
1703
|
+
.vertical-toolbar {
|
|
1704
|
+
--wb-chrome-control: 2rem;
|
|
1705
|
+
--wb-chrome-pad: 0.34rem;
|
|
1706
|
+
--wb-chrome-gap: 0.34rem;
|
|
1707
|
+
padding: var(--wb-chrome-pad);
|
|
1708
|
+
gap: var(--wb-chrome-gap);
|
|
1709
|
+
}
|
|
1710
|
+
|
|
1711
|
+
.toolbar__items,
|
|
1712
|
+
.toolbar__end,
|
|
1713
|
+
.vertical-toolbar__links {
|
|
1714
|
+
gap: var(--wb-chrome-gap);
|
|
1715
|
+
}
|
|
1716
|
+
|
|
1717
|
+
.toolbar__end {
|
|
1718
|
+
margin-left: var(--wb-chrome-gap);
|
|
1719
|
+
}
|
|
1720
|
+
|
|
1721
|
+
.toolbar .wb-btn {
|
|
1722
|
+
height: var(--wb-chrome-control);
|
|
1723
|
+
padding: 0 0.6rem;
|
|
1724
|
+
}
|
|
1725
|
+
|
|
1726
|
+
.toolbar .wb-btn--icon-only,
|
|
1727
|
+
.vertical-toolbar .wb-btn--icon-only {
|
|
1728
|
+
width: var(--wb-chrome-control);
|
|
1729
|
+
height: var(--wb-chrome-control);
|
|
1730
|
+
min-width: var(--wb-chrome-control);
|
|
1731
|
+
padding: 0;
|
|
1732
|
+
}
|
|
1733
|
+
|
|
1734
|
+
.toolbar input:not([type]),
|
|
1735
|
+
.toolbar input[type='text'],
|
|
1736
|
+
.toolbar input[type='number'],
|
|
1737
|
+
.toolbar input[type='search'] {
|
|
1738
|
+
height: var(--wb-chrome-control);
|
|
1739
|
+
}
|