hamzus-ui 0.0.44 → 0.0.45

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.44",
3
+ "version": "0.0.45",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "svelte": "index.js",
@@ -23,8 +23,6 @@
23
23
  return;
24
24
  }
25
25
 
26
- console.log("ripple");
27
-
28
26
  const ripple = document.createElement('span');
29
27
 
30
28
  const rect = button.getBoundingClientRect();
@@ -66,7 +66,6 @@
66
66
  if (position === 'before') {
67
67
  actualValue[tableId].columns[i].filterBefore = '';
68
68
  // si son filtre befoire n est pas set obn surtpimme le filtrer general
69
- console.log(actualValue[tableId].columns[i].filterAfter);
70
69
 
71
70
  if (!actualValue[tableId].columns[i].filterAfter) {
72
71
  actualValue[tableId].columns[i].filter = '';
@@ -115,7 +114,6 @@
115
114
  tableData.update((actualValue) => {
116
115
  actualValue[tableId].offset = actualValue[tableId].limit * parseInt(targetPage) - actualValue[tableId].limit;
117
116
 
118
- console.log(actualValue[tableId].offset);
119
117
 
120
118
  return actualValue;
121
119
  });
@@ -128,8 +126,6 @@
128
126
  const actualPage = Math.floor(table.offset / table.limit) + 1;
129
127
  // verifier si il est possible de passer a droite
130
128
  const totalPage = Math.ceil(table.totalOfRows / table.limit);
131
- console.log(actualPage);
132
- console.log(totalPage);
133
129
 
134
130
  // si la page actual est plus petit que le total de page alors on peut passer
135
131
  if (actualPage >= totalPage) {
@@ -138,7 +134,6 @@
138
134
 
139
135
  tableData.update((actualValue) => {
140
136
  actualValue[tableId].offset = actualValue[tableId].offset + actualValue[tableId].limit;
141
- console.log(actualValue[tableId].offset);
142
137
 
143
138
  return actualValue;
144
139
  });
@@ -28,7 +28,6 @@
28
28
  document.dispatchEvent(new Event('saveTableData'));
29
29
  }
30
30
  function handleFilter(columnName, newValue, position) {
31
- console.log(newValue);
32
31
 
33
32
  let foundedColumn = false;
34
33
  tableData.update((actualValue) => {
@@ -72,7 +72,6 @@
72
72
  document.dispatchEvent(new Event('saveTableData'));
73
73
  }
74
74
  function handleFilter(columnName, newValue, position) {
75
- console.log(newValue);
76
75
 
77
76
  let foundedColumn = false;
78
77
  tableData.update((actualValue) => {
@@ -1 +1,47 @@
1
- <slot/>
1
+ <script>
2
+ import TinyScrollArea from "@hamzus-ui/TinyScrollArea/TinyScrollArea.svelte";
3
+ import { activeTrigger } from ".";
4
+
5
+ let left = 0;
6
+ let width = 0;
7
+
8
+ $: if ($activeTrigger) {
9
+
10
+ // return
11
+ left = $activeTrigger.offsetLeft;
12
+ width = $activeTrigger.offsetWidth;
13
+ }
14
+ </script>
15
+
16
+ <TinyScrollArea style="display: flex;" proximity={0}>
17
+ <div class="tabs" style="--left:{left}px;--width:{width}px;">
18
+ <slot />
19
+ <span class="active-line"></span>
20
+ </div>
21
+ </TinyScrollArea>
22
+
23
+
24
+ <style>
25
+ .tabs {
26
+ min-width: 100%;
27
+ display: flex;
28
+ align-items: center;
29
+ justify-content: baseline;
30
+ column-gap: var(--pad-m);
31
+ padding-bottom: var(--pad-m);
32
+ position: relative;
33
+ }
34
+
35
+ .active-line {
36
+ position: absolute;
37
+ bottom: 0px;
38
+ left: var(--left);
39
+ width: var(--width);
40
+ height: 1px;
41
+ background-color: var(--accent);
42
+ z-index: 1;
43
+ transition-property: left, width;
44
+ transition-duration: 0.2s;
45
+ transition-timing-function: cubic-bezier(0.17, 0.84, 0.44, 1);
46
+ }
47
+ </style>
@@ -6,66 +6,15 @@
6
6
  import { activeTrigger, activeTab } from '.';
7
7
  import { onMount } from 'svelte';
8
8
 
9
- export let links = [];
10
9
  export let value = '';
11
10
 
12
- let activeButton = null;
13
-
14
- let left = 0;
15
- let width = 0;
16
-
17
- $: if ($activeTrigger) {
18
- console.log($activeTrigger);
19
-
20
- // return
21
- left = $activeTrigger.offsetLeft;
22
- width = $activeTrigger.offsetWidth;
23
- }
24
11
 
25
12
  onMount(() => {
26
13
  activeTab.set(value);
27
14
  });
28
15
 
29
- function handleClick(link) {
30
- if (link.onClick != undefined) {
31
- link.onClick(link);
32
- }
33
- }
34
16
  </script>
35
17
 
36
- <TinyScrollArea style="display: flex;" proximity={0}>
37
- <div class="tabs" style="--left:{left}px;--width:{width}px;">
38
- <slot name="list"/>
39
- <span class="active-line"></span>
40
- </div>
41
- </TinyScrollArea>
18
+ <slot name="list"/>
42
19
  <slot/>
43
20
 
44
- <style>
45
- .tabs {
46
- min-width: 100%;
47
- display: flex;
48
- align-items: center;
49
- justify-content: baseline;
50
- column-gap: var(--pad-m);
51
- padding-bottom: var(--pad-m);
52
- position: relative;
53
- }
54
- .active {
55
- all: unset;
56
- min-width: max-content;
57
- }
58
-
59
- .active-line {
60
- position: absolute;
61
- bottom: 0px;
62
- left: var(--left);
63
- width: var(--width);
64
- height: 1px;
65
- background-color: var(--accent);
66
- z-index: 1;
67
- transition-property: left, width;
68
- transition-duration: 0.2s;
69
- transition-timing-function: cubic-bezier(0.17, 0.84, 0.44, 1);
70
- }
71
- </style>