mountain-ui 1.0.172 → 1.0.174

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,7 +1,7 @@
1
1
  {
2
2
  "name": "mountain-ui",
3
3
  "private": false,
4
- "version": "1.0.172",
4
+ "version": "1.0.174",
5
5
  "description": "A comprehensive UI component library for ERP systems with field types, entities, and registry management built with Svelte",
6
6
  "type": "module",
7
7
  "module": "index.js",
@@ -6,13 +6,11 @@
6
6
 
7
7
  let { label, unique = false, secret = false, compact = false, required, placeholder="un nombre entier", value="", defaultValue = "", ...props } = $props();
8
8
 
9
- onMount(()=>{
10
- // si la valeur est pas set on verifie si il y a uen defaultValue
9
+ // si la valeur est pas set on verifie si il y a uen defaultValue
11
10
  if (!value && defaultValue) {
12
11
  value = defaultValue
13
12
  onChange(value);
14
13
  }
15
- })
16
14
  </script>
17
15
 
18
16
  <Line {compact}>
@@ -13,13 +13,11 @@
13
13
  ...props
14
14
  } = $props();
15
15
 
16
- onMount(() => {
17
- // si la valeur est pas set on verifie si il y a uen defaultValue
16
+ // si la valeur est pas set on verifie si il y a uen defaultValue
18
17
  if (!value && defaultValue) {
19
18
  value = defaultValue
20
19
  onChange(value);
21
20
  }
22
- });
23
21
 
24
22
  function handleCheckMinMax() {
25
23
  let inputValue = value;
@@ -11,28 +11,26 @@
11
11
  compact = false,
12
12
  required,
13
13
  defaultValue = '',
14
- value = "",
15
- placeholder = "votre texte",
16
- onChange=(val)=>{},
14
+ value = '',
15
+ placeholder = 'votre texte',
16
+ onChange = (val) => {},
17
17
  ...props
18
18
  } = $props();
19
19
 
20
- onMount(() => {
21
- // si la valeur est pas set on verifie si il y a uen defaultValue
22
- if (!value && defaultValue) {
23
- value = defaultValue;
24
- handleChange();
25
- }
26
- });
20
+ // si la valeur est pas set on verifie si il y a uen defaultValue
21
+ if (!value && defaultValue) {
22
+ value = defaultValue;
23
+ handleChange();
24
+ }
27
25
 
28
- function handleChange() {
29
- onChange(value)
30
- }
26
+ function handleChange() {
27
+ onChange(value);
28
+ }
31
29
  </script>
32
30
 
33
31
  <Line {compact}>
34
32
  {#if label}
35
- <Label {unique} {secret} {label} {required}></Label>
36
- {/if}
33
+ <Label {unique} {secret} {label} {required}></Label>
34
+ {/if}
37
35
  <TextArea onChange={handleChange} {...props} {placeholder} bind:value {required}></TextArea>
38
36
  </Line>
@@ -2,25 +2,17 @@
2
2
  import { Input } from 'hamzus-ui';
3
3
  import { onMount } from 'svelte';
4
4
 
5
- let {
6
- defaultValue = '',
7
- symbol = '',
8
- value = '',
9
- onChange = (val) => {},
10
- ...props
11
- } = $props();
5
+ let { defaultValue = '', symbol = '', value = '', onChange = (val) => {}, ...props } = $props();
12
6
 
13
- onMount(() => {
14
- // si la valeur est pas set on verifie si il y a uen defaultValue
15
- if (!value && defaultValue) {
16
- value = defaultValue;
17
- handleChange();
18
- }
19
- });
7
+ // si la valeur est pas set on verifie si il y a uen defaultValue
8
+ if (!value && defaultValue) {
9
+ value = defaultValue;
10
+ handleChange();
11
+ }
20
12
 
21
- function handleChange() {
22
- onChange(value)
23
- }
13
+ function handleChange() {
14
+ onChange(value);
15
+ }
24
16
  </script>
25
17
 
26
18
  <Input {...props} onChange={handleChange} bind:value>
@@ -30,6 +30,8 @@
30
30
  let detailsIsOpen = $state(false);
31
31
 
32
32
  $effect(() => {
33
+ console.log($targetProject);
34
+
33
35
  if (targetProjectPercent === null) {
34
36
  animatedProgress = 0;
35
37
  return;
@@ -61,6 +63,7 @@
61
63
  <h5>Projet actuel</h5>
62
64
  <h4 style="color:var(--font-1);">{$targetProject?.name ?? 'aucun projet selectionné'}</h4>
63
65
  </div>
66
+
64
67
  <div class="right">
65
68
  <IconButton
66
69
  onClick={() => {
@@ -98,12 +101,21 @@
98
101
  </div>
99
102
  </div>
100
103
  </div>
104
+ {#if !$targetProject?.trial_is_finish && $targetProject?.subscription_usage?.subscription?.status === 'draft'}
105
+ <div class="trial">
106
+ <h5>Période d'éssai</h5>
107
+ </div>
108
+ {:else if $targetProject?.trial_is_finish && $targetProject?.subscription_usage?.subscription?.status === 'draft'}
109
+ <div class="trial-ended">
110
+ <h5>Période d'éssai terminé</h5>
111
+ </div>
112
+ {/if}
101
113
  <div class="progress">
102
114
  {#if changeProjectIsOpen}
103
115
  <div class="all-project">
104
116
  {#each $allProject as project}
105
117
  <ProjectButton
106
- variant={project.id === $targetProject?.id ? "secondary" : "ghost"}
118
+ variant={project.id === $targetProject?.id ? 'secondary' : 'ghost'}
107
119
  style="width:100%;justify-content:space-between;align-items:center;"
108
120
  href={getProjectHref(project)}
109
121
  id={project.id}
@@ -186,11 +198,30 @@
186
198
  border-top: 1px solid var(--bg-2);
187
199
  }
188
200
 
201
+ .trial {
202
+ padding: 2px var(--pad-m);
203
+ margin: 2px 0;
204
+ border-radius: var(--radius-m);
205
+ background-color: var(--orange-b);
206
+ }
207
+ .trial > h5 {
208
+ color: var(--orange);
209
+ }
210
+ .trial-ended {
211
+ padding: 2px var(--pad-m);
212
+ margin: 2px 0;
213
+ border-radius: var(--radius-m);
214
+ background-color: var(--red-b);
215
+ }
216
+ .trial-ended > h5 {
217
+ color: var(--red);
218
+ }
219
+
189
220
  .progress {
190
221
  padding: 2px;
191
222
  background: var(--bg-2);
192
223
  border-radius: var(--radius-l);
193
- transition: background .2s ease-out;
224
+ transition: background 0.2s ease-out;
194
225
  }
195
226
  :global(body > .content-container) .progress {
196
227
  background: conic-gradient(var(--accent) 0% var(--progress), var(--bg-2) var(--progress) 100%);
@@ -265,7 +296,7 @@
265
296
  opacity: 0;
266
297
  user-select: none;
267
298
  pointer-events: none;
268
- transition: width .2s ease-out;
299
+ transition: width 0.2s ease-out;
269
300
  }
270
301
 
271
302
  :global(body > .content-container) .fill-line {
@@ -77,7 +77,7 @@
77
77
  type="submit"><h5>se connecter</h5></Button
78
78
  >
79
79
  <h5 slot="down-form">
80
- Pas encore de compte ? <Link className="h5" href="/create-acount" label="créée un compte" />
80
+ Pas encore de compte ? <Link className="h5" href="/create-account" label="créée un compte" />
81
81
  </h5>
82
82
  </Form>
83
83
  </div>