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 +1 -1
- package/src/components/hamzus-ui/Button/Button_default.svelte +0 -2
- package/src/components/hamzus-ui/Table/ActionsBar.svelte +0 -5
- package/src/components/hamzus-ui/Table/FilterDropdown.svelte +0 -1
- package/src/components/hamzus-ui/Table/Header.svelte +0 -1
- package/src/components/hamzus-ui/Tabs/List.svelte +47 -1
- package/src/components/hamzus-ui/Tabs/Root.svelte +1 -52
package/package.json
CHANGED
|
@@ -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
|
});
|
|
@@ -1 +1,47 @@
|
|
|
1
|
-
<
|
|
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
|
-
<
|
|
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>
|