@marianmeres/stuic 1.5.0 → 1.7.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.
@@ -7,8 +7,8 @@ import { twMerge } from "tailwind-merge";
7
7
  const clog = createClog("HoverExpandableWidth");
8
8
  const dispatch = createEventDispatcher();
9
9
  export let shadowOpacity = 0.5;
10
- export let transitionDuration = 150;
11
- export let targetWidth = 300;
10
+ export let duration = 150;
11
+ export let targetWidth = 256;
12
12
  let _class = "";
13
13
  export { _class as class };
14
14
  $:
@@ -49,7 +49,7 @@ const _expand = () => {
49
49
  _isExpanding = false;
50
50
  _maybeTodo();
51
51
  },
52
- transitionDuration + 1e3 / 60 * 3
52
+ duration + 1e3 / 60 * 3
53
53
  // 3 x raf
54
54
  );
55
55
  requestAnimationFrame(() => {
@@ -82,7 +82,7 @@ const _shrink = () => {
82
82
  _isShrinking = false;
83
83
  el.style.transitionProperty = "none";
84
84
  _maybeTodo();
85
- }, transitionDuration);
85
+ }, duration);
86
86
  };
87
87
  $:
88
88
  dispatch("change", _isExpanded);
@@ -96,7 +96,7 @@ $:
96
96
  on:click
97
97
  aria-expanded={_isExpanded}
98
98
  class={twMerge(`${_class}`)}
99
- style="width: 100%; height: 100%; transition-duration: {transitionDuration}ms;"
99
+ style="width: 100%; height: 100%; transition-duration: {duration}ms;"
100
100
  >
101
101
  <slot isExpanded={_isExpanded} inTransition={_isExpanding || _isShrinking} />
102
102
  </div>
@@ -2,7 +2,7 @@ import { SvelteComponent } from "svelte";
2
2
  declare const __propDef: {
3
3
  props: {
4
4
  shadowOpacity?: number | undefined;
5
- transitionDuration?: number | undefined;
5
+ duration?: number | undefined;
6
6
  targetWidth?: number | undefined;
7
7
  class?: string | undefined;
8
8
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marianmeres/stuic",
3
- "version": "1.5.0",
3
+ "version": "1.7.0",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run package",