hamzus-ui 0.0.90 → 0.0.92

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hamzus-ui",
3
- "version": "0.0.90",
3
+ "version": "0.0.92",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "svelte": "index.js",
@@ -12,6 +12,9 @@
12
12
  let button;
13
13
  // functions
14
14
  function handleClick(event) {
15
+ if (desabled || loading) {
16
+ event.preventDefault()
17
+ }
15
18
  if (!desabled && !loading) {
16
19
  if (onClick && typeof onClick === "function") {
17
20
  onClick(event)
@@ -6,6 +6,7 @@
6
6
  export let className = '';
7
7
  export let proximity = 20;
8
8
  export let isReverse = false
9
+ export let onBottom = ()=>{}
9
10
 
10
11
  let isVisible = false;
11
12
  let lastMove = 0;
@@ -183,7 +184,11 @@
183
184
  leftTrack = (scrollArea.scrollLeft / scrollWidth) * 100;
184
185
 
185
186
  topTrack = isReverse ? -calcTop : calcTop
186
-
187
+
188
+ const bottom = scrollArea.scrollHeight - scrollArea.scrollTop === scrollArea.clientHeight;
189
+ if (bottom) {
190
+ onBottom()
191
+ }
187
192
  }
188
193
  function handleDisplayScrollBar() {
189
194