fluent-svelte-extra 2.2.1 → 2.2.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.
@@ -23,7 +23,7 @@ const highlight = tweened({
23
23
  left: 0
24
24
  }, {
25
25
  easing: expoOut,
26
- duration: 333
26
+ duration: getCSSDuration("--fds-control-slow-duration")
27
27
  });
28
28
  setKey(`${segmentId}-setValue`, target => {
29
29
  value = target;
@@ -42,10 +42,12 @@ $: {
42
42
  if (setSelected) {
43
43
  setSelected(value === buttonValue);
44
44
  if (value === buttonValue) {
45
- const { width, left } = button.getBoundingClientRect();
45
+ const htmlButton = button;
46
+ const width = htmlButton.offsetWidth;
47
+ const left = htmlButton.offsetLeft - 1;
46
48
  highlight.set({
47
49
  width,
48
- left: left - containerElement.getBoundingClientRect().left - 1
50
+ left
49
51
  });
50
52
  isSelectedDisabled = button.classList.contains("disabled");
51
53
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluent-svelte-extra",
3
- "version": "2.2.1",
3
+ "version": "2.2.2",
4
4
  "description": "A faithful implementation of Microsoft's Fluent Design System in Svelte.",
5
5
  "homepage": "https://github.com/OpenAnime/fluent-svelte-extra",
6
6
  "license": "MIT",