@objectifthunes/whiteboard 0.5.3 → 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 +1 -1
- package/dist/index.js +7 -1
- package/dist/whiteboard.css +28 -4
- 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;
|
|
@@ -1602,18 +1618,25 @@ button.chip:hover {
|
|
|
1602
1618
|
min-height: 1rem;
|
|
1603
1619
|
}
|
|
1604
1620
|
|
|
1605
|
-
/*
|
|
1621
|
+
/* every control inside a toolbar shares ONE height — buttons, inputs,
|
|
1622
|
+
icon buttons all sit on the same rhythm */
|
|
1623
|
+
.toolbar {
|
|
1624
|
+
--wb-chrome-control: 2.2rem;
|
|
1625
|
+
}
|
|
1626
|
+
|
|
1606
1627
|
.toolbar .wb-btn {
|
|
1607
|
-
|
|
1628
|
+
height: var(--wb-chrome-control);
|
|
1629
|
+
padding: 0 0.72rem;
|
|
1608
1630
|
font-size: var(--wb-fs-md);
|
|
1609
1631
|
}
|
|
1610
1632
|
|
|
1611
|
-
/* inputs and chips inside a toolbar match the button rhythm */
|
|
1612
1633
|
.toolbar input:not([type]),
|
|
1613
1634
|
.toolbar input[type='text'],
|
|
1614
1635
|
.toolbar input[type='number'],
|
|
1615
1636
|
.toolbar input[type='search'] {
|
|
1616
|
-
|
|
1637
|
+
height: var(--wb-chrome-control);
|
|
1638
|
+
box-sizing: border-box;
|
|
1639
|
+
padding: 0 0.5rem;
|
|
1617
1640
|
font-size: var(--wb-fs-md);
|
|
1618
1641
|
line-height: 1.2;
|
|
1619
1642
|
}
|
|
@@ -1665,6 +1688,7 @@ button.chip:hover {
|
|
|
1665
1688
|
min-width: 2.2rem;
|
|
1666
1689
|
padding: 0;
|
|
1667
1690
|
justify-content: center;
|
|
1691
|
+
flex: none;
|
|
1668
1692
|
}
|
|
1669
1693
|
|
|
1670
1694
|
.toolbar .wb-btn--icon-only {
|