@1337exp/taoui 5.32.0 → 5.32.2

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
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.32.2
4
+
5
+ Nothing to migrate; a fix.
6
+
7
+ - **`TaoSegmented`: the thumb in a scaled parent.** The thumb was measured with `getBoundingClientRect()` (screen px) and drawn in layout px, so inside a parent with `transform: scale(...)` (a zoomed canvas of nodes) it came out smaller by the scale and sat off its option. A change of the zoom does not resize the track, so the `ResizeObserver` stayed quiet and the thumb kept the size of the zoom it appeared at. The boxes are now divided by the scale (the screen size of the track over its layout size), so the thumb is in layout px and right at any zoom; without a layout (SSR, jsdom) the scale is 1 and nothing changes. Found in `kupona`, a calculator on a canvas of nodes.
8
+
9
+ ## 5.32.1
10
+
11
+ Nothing to migrate; one look changes: the confirm dialog has no bar on its left edge.
12
+
13
+ - **`confirm()` has no accent bar on the left.** With a large `--tao-radius-panel` the curve of the corners cut the 3px bar into a broken line. As for `toast()`, the bar told nothing the icon and the tinted background do not: it is gone, and `.tao-confirm__accent` with it.
14
+
3
15
  ## 5.32.0
4
16
 
5
17
  Nothing to migrate, but two looks change: `TaoThemeToggle` is neutral now (it was amber; `tone="accent"` brings the old colour back), and a quiet control with `tone="neutral"` is the body colour at rest (it was white).
package/dist/index.js CHANGED
@@ -9144,10 +9144,12 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
9144
9144
  }
9145
9145
  const trackBox = track.getBoundingClientRect();
9146
9146
  const optionBox = selected.getBoundingClientRect();
9147
+ const scaleX = track.offsetWidth > 0 && trackBox.width > 0 ? trackBox.width / track.offsetWidth : 1;
9148
+ const scaleY = track.offsetHeight > 0 && trackBox.height > 0 ? trackBox.height / track.offsetHeight : 1;
9147
9149
  const next = {
9148
- width: `${optionBox.width}px`,
9149
- height: `${optionBox.height}px`,
9150
- transform: `translate(${optionBox.left - trackBox.left - track.clientLeft}px, ${optionBox.top - trackBox.top - track.clientTop}px)`,
9150
+ width: `${optionBox.width / scaleX}px`,
9151
+ height: `${optionBox.height / scaleY}px`,
9152
+ transform: `translate(${(optionBox.left - trackBox.left) / scaleX - track.clientLeft}px, ${(optionBox.top - trackBox.top) / scaleY - track.clientTop}px)`,
9151
9153
  opacity: "1"
9152
9154
  };
9153
9155
  const prev = thumbStyle.value;
@@ -9226,7 +9228,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
9226
9228
  };
9227
9229
  }
9228
9230
  });
9229
- const TaoSegmented = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-49ed8ced"]]);
9231
+ const TaoSegmented = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-c4a6edd1"]]);
9230
9232
  const _hoisted_1$q = ["for"];
9231
9233
  const _hoisted_2$o = ["id", "name", "value", "checked", "disabled", "aria-label"];
9232
9234
  const _hoisted_3$k = { class: "tao-segmented-option__face" };
@@ -14122,10 +14124,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
14122
14124
  "aria-describedby": unref(currentConfirm).message ? "tao-confirm-message" : void 0,
14123
14125
  tabindex: "-1"
14124
14126
  }, [
14125
- _cache[2] || (_cache[2] = createElementVNode("span", {
14126
- class: "tao-confirm__accent",
14127
- "aria-hidden": "true"
14128
- }, null, -1)),
14129
14127
  createElementVNode("span", _hoisted_2, [
14130
14128
  createVNode(TaoIcon, {
14131
14129
  name: unref(currentConfirm).danger ? "tao-x-circle" : "tao-info",
@@ -14168,7 +14166,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
14168
14166
  };
14169
14167
  }
14170
14168
  });
14171
- const TaoConfirmHost = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3af3ec95"]]);
14169
+ const TaoConfirmHost = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c643528d"]]);
14172
14170
  const TYPE_TIMEOUT = {
14173
14171
  success: 3e3,
14174
14172
  danger: 5e3,