hamzus-ui 0.0.72 → 0.0.74

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.72",
3
+ "version": "0.0.74",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "svelte": "index.js",
@@ -0,0 +1,18 @@
1
+ <script>
2
+ // recuperer les données par defaut de l'element ou des element selectionner
3
+ export let getDefault = (value)=>{}
4
+
5
+ // recuperer la liste en fonction de la recherche
6
+ export let getData = (search, limit, offset) => {}
7
+
8
+ // composant a charger avec les donnees
9
+ export let component = {
10
+ component:null,
11
+ props:{},
12
+ }
13
+
14
+ // valeur selectionner
15
+ export let value = null
16
+
17
+
18
+ </script>
@@ -33,17 +33,17 @@
33
33
  import { onMount } from 'svelte';
34
34
 
35
35
  // local var
36
- let isMounted = false
36
+ let isMounted = false;
37
37
 
38
- $:if(value) {
38
+ $: if (value) {
39
39
  let newValue = formatInput(value);
40
40
 
41
41
  if (newValue !== value) {
42
42
  value = newValue;
43
43
  hasChanged = value != initialValue;
44
- }else if (onChange && isMounted) {
45
- onChange(value);
46
- }
44
+ } else if (onChange && isMounted) {
45
+ onChange(value);
46
+ }
47
47
  }
48
48
 
49
49
  // fnctions
@@ -88,9 +88,9 @@
88
88
  }
89
89
 
90
90
  onMount(() => {
91
- isMounted = false
92
-
93
- isMounted = true
91
+ isMounted = false;
92
+
93
+ isMounted = true;
94
94
  });
95
95
 
96
96
  function handleDisplay() {
@@ -139,6 +139,7 @@
139
139
  disabled={isLoading ? true : disabled}
140
140
  {step}
141
141
  />
142
+ <slot name="endContent" />
142
143
  {#if type == 'password'}
143
144
  <IconButton size="24px" variant="ghost" onClick={handleDisplay}>
144
145
  {#if isVisible}
@@ -192,8 +193,6 @@
192
193
  </svg>
193
194
  {/if}
194
195
  </IconButton>
195
- {:else}
196
- <slot name="endContent" />
197
196
  {/if}
198
197
  </div>
199
198
  </label>
@@ -114,13 +114,13 @@
114
114
  <div class="slider-container {orientation === 'horizontal' ? 'horizontal' : 'vertical'}">
115
115
  <input type="hidden" {name} {value} />
116
116
  <div bind:this={slider} on:mousedown={handleClickDown} class="slider {isDraging ? 'hover' : ''}">
117
- <span class="progress" style="--progress:{percent}%;"></span>
118
- <!-- <span class="track" style="--progress:{percent}%;"></span> -->
117
+ <span class="progress" style="--progress:{percent.toFixed(2)}%;"></span>
118
+ <!-- <span class="track" style="--progress:{percent.toFixed(2)}%;"></span> -->
119
119
  <h5 class="label">{label}</h5>
120
120
  <h5
121
121
  class="label top"
122
- style="mask-image: linear-gradient(to right, black {percent}%, transparent {percent}%);
123
- -webkit-mask-image: linear-gradient(to right, black {percent}%, transparent {percent}%);"
122
+ style="mask-image: linear-gradient(to right, black {percent.toFixed(2)}%, transparent {percent.toFixed(2)}%);
123
+ -webkit-mask-image: linear-gradient(to right, black {percent.toFixed(2)}%, transparent {percent.toFixed(2)}%);"
124
124
  >
125
125
  {label}
126
126
  </h5>