twico-ui 1.11.0 → 1.11.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/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  All notable changes to Twico UI are documented here (newest first). This file is generated automatically on each release by [semantic-release](https://semantic-release.gitbook.io/) from [Conventional Commits](https://www.conventionalcommits.org/) — do not edit it by hand. The same notes appear on each [GitHub Release](https://github.com/EncryptionL/twico-ui/releases).
4
4
 
5
+ ## [1.11.1](https://github.com/EncryptionL/twico-ui/compare/v1.11.0...v1.11.1) (2026-07-09)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **datatable:** pointer cursor on the Columns-panel visibility toggle ([9d30343](https://github.com/EncryptionL/twico-ui/commit/9d303434f51c4a4131cf393e56f8534d53f0a7bb))
11
+ * **tooltip:** grow horizontally + point the arrow at the trigger ([19aa76a](https://github.com/EncryptionL/twico-ui/commit/19aa76a6ffe597d81aff00a4144182661db0971b))
12
+
5
13
  # [1.11.0](https://github.com/EncryptionL/twico-ui/compare/v1.10.0...v1.11.0) (2026-07-07)
6
14
 
7
15
 
package/dist/index.cjs CHANGED
@@ -7838,7 +7838,12 @@ var TOOLTIP_CSS = `
7838
7838
  padding: 6px 10px; border-radius: var(--radius-md);
7839
7839
  background: var(--color-text); color: var(--color-surface);
7840
7840
  font-family: var(--font-sans); font-size: var(--text-xs); font-weight: var(--font-medium);
7841
- line-height: 1.3; white-space: normal; max-width: var(--_tw-maxw, 260px); box-shadow: var(--shadow-md);
7841
+ line-height: 1.3; white-space: normal;
7842
+ /* Grow horizontally to max-width, then wrap. max-content sizes to the content (capped by
7843
+ max-width) and \u2014 unlike shrink-to-fit width:auto \u2014 is NOT constrained by the space between
7844
+ the fixed left edge and the viewport edge, so a tooltip near the right edge no longer
7845
+ collapses to ~1 word per line and stretch vertically. */
7846
+ width: max-content; max-width: var(--_tw-maxw, 320px); box-shadow: var(--shadow-md);
7842
7847
  opacity: 0; transform: scale(0.9); transition: opacity var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-spring);
7843
7848
  }
7844
7849
  .twc-tooltip[data-show="true"] { pointer-events: auto; }
@@ -7849,10 +7854,13 @@ var TOOLTIP_CSS = `
7849
7854
  .twc-tooltip[data-place="right"] { transform-origin: left center; translate: 0 -50%; }
7850
7855
  .twc-tooltip[data-show="true"][data-place="top"], .twc-tooltip[data-show="true"][data-place="bottom"] { transform: scale(1); }
7851
7856
  .twc-tooltip__arrow { position: absolute; width: 7px; height: 7px; background: var(--color-text); transform: rotate(45deg); }
7852
- .twc-tooltip[data-place="top"] .twc-tooltip__arrow { bottom: -3px; left: 50%; margin-left: -3.5px; }
7853
- .twc-tooltip[data-place="bottom"] .twc-tooltip__arrow { top: -3px; left: 50%; margin-left: -3.5px; }
7854
- .twc-tooltip[data-place="left"] .twc-tooltip__arrow { right: -3px; top: 50%; margin-top: -3.5px; }
7855
- .twc-tooltip[data-place="right"] .twc-tooltip__arrow { left: -3px; top: 50%; margin-top: -3.5px; }
7857
+ /* Arrow tracks the trigger via --_tw-arrow-x/y (px from the tooltip edge) instead of being
7858
+ locked to the centre, so it still points at the trigger when the bubble is clamped near a
7859
+ viewport edge. Falls back to 50% before measurement / SSR. */
7860
+ .twc-tooltip[data-place="top"] .twc-tooltip__arrow { bottom: -3px; left: var(--_tw-arrow-x, 50%); margin-left: -3.5px; }
7861
+ .twc-tooltip[data-place="bottom"] .twc-tooltip__arrow { top: -3px; left: var(--_tw-arrow-x, 50%); margin-left: -3.5px; }
7862
+ .twc-tooltip[data-place="left"] .twc-tooltip__arrow { right: -3px; top: var(--_tw-arrow-y, 50%); margin-top: -3.5px; }
7863
+ .twc-tooltip[data-place="right"] .twc-tooltip__arrow { left: -3px; top: var(--_tw-arrow-y, 50%); margin-top: -3.5px; }
7856
7864
  @media (prefers-reduced-motion: reduce) { .twc-tooltip { transition: opacity var(--duration-fast) linear; transform: none; } }
7857
7865
  `;
7858
7866
  function Tooltip({
@@ -7906,10 +7914,22 @@ function Tooltip({
7906
7914
  else if (placement === "left" && spaceLeft < tw && spaceRight > spaceLeft) side = "right";
7907
7915
  else if (placement === "right" && spaceRight < tw && spaceLeft > spaceRight) side = "left";
7908
7916
  const base = { left: "auto", right: "auto", top: "auto", bottom: "auto", place: side };
7909
- if (side === "bottom") setCoords({ ...base, left: clampX(cx), top: Math.round(r2.bottom + gap) });
7910
- else if (side === "left") setCoords({ ...base, top: clampY(cy), right: Math.round(vw - r2.left + gap) });
7911
- else if (side === "right") setCoords({ ...base, top: clampY(cy), left: Math.round(r2.right + gap) });
7912
- else setCoords({ ...base, left: clampX(cx), bottom: Math.round(vh - r2.top + gap) });
7917
+ const AP = 12;
7918
+ const arrowX = (center) => tw ? Math.round(Math.min(Math.max(cx - (center - tw / 2), AP), tw - AP)) : void 0;
7919
+ const arrowY = (center) => th ? Math.round(Math.min(Math.max(cy - (center - th / 2), AP), th - AP)) : void 0;
7920
+ if (side === "bottom") {
7921
+ const c = clampX(cx);
7922
+ setCoords({ ...base, left: c, top: Math.round(r2.bottom + gap), arrowX: arrowX(c) });
7923
+ } else if (side === "left") {
7924
+ const c = clampY(cy);
7925
+ setCoords({ ...base, top: c, right: Math.round(vw - r2.left + gap), arrowY: arrowY(c) });
7926
+ } else if (side === "right") {
7927
+ const c = clampY(cy);
7928
+ setCoords({ ...base, top: c, left: Math.round(r2.right + gap), arrowY: arrowY(c) });
7929
+ } else {
7930
+ const c = clampX(cx);
7931
+ setCoords({ ...base, left: c, bottom: Math.round(vh - r2.top + gap), arrowX: arrowX(c) });
7932
+ }
7913
7933
  }, [placement]);
7914
7934
  React51__namespace.default.useEffect(() => {
7915
7935
  place();
@@ -7966,7 +7986,15 @@ function Tooltip({
7966
7986
  "aria-hidden": show ? void 0 : "true",
7967
7987
  onMouseEnter: cancelClose,
7968
7988
  onMouseLeave: close,
7969
- style: { position: "fixed", left: coords.left, right: coords.right, top: coords.top, bottom: coords.bottom },
7989
+ style: {
7990
+ position: "fixed",
7991
+ left: coords.left,
7992
+ right: coords.right,
7993
+ top: coords.top,
7994
+ bottom: coords.bottom,
7995
+ "--_tw-arrow-x": coords.arrowX != null ? `${coords.arrowX}px` : void 0,
7996
+ "--_tw-arrow-y": coords.arrowY != null ? `${coords.arrowY}px` : void 0
7997
+ },
7970
7998
  children: [
7971
7999
  label,
7972
8000
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "twc-tooltip__arrow", "aria-hidden": "true" })
@@ -8346,7 +8374,8 @@ th.twc-dt__rownum .twc-dt__th-inner { padding-inline: 8px; gap: 2px; justify-con
8346
8374
  .twc-dt__col-pin:hover { background: var(--color-surface); color: var(--color-text); }
8347
8375
  .twc-dt__col-pin[data-on="true"] { color: var(--color-primary); background: var(--color-primary-subtle); }
8348
8376
  .twc-dt__col-pin svg { width: 14px; height: 14px; }
8349
- .twc-dt__sw { width: 32px; height: 18px; border-radius: var(--radius-full); background: var(--color-border-strong); position: relative; flex: none; transition: background-color var(--duration-base); }
8377
+ .twc-dt__sw { width: 32px; height: 18px; border-radius: var(--radius-full); background: var(--color-border-strong); position: relative; flex: none; cursor: pointer; transition: background-color var(--duration-base); }
8378
+ .twc-dt__sw[aria-disabled="true"] { cursor: default; }
8350
8379
  .twc-dt__sw[data-on="true"] { background: var(--color-primary); }
8351
8380
  .twc-dt__sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: var(--radius-full); background: var(--color-primary-fg); box-shadow: var(--shadow-sm); transition: transform var(--duration-base) var(--ease-spring); }
8352
8381
  .twc-dt__sw:focus-visible { outline: none; box-shadow: var(--ring); }