mountain-ui 1.0.122 → 1.0.124
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.
|
|
4
|
+
"version": "1.0.124",
|
|
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",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { onMount } from 'svelte';
|
|
3
3
|
import Label from '../../../components/Label.svelte';
|
|
4
4
|
import Line from '../../../components/Line.svelte';
|
|
5
|
-
import { Button, Checkbox, Input, Tag } from 'hamzus-ui';
|
|
5
|
+
import { Button, Checkbox, IconButton, Input, Tag } from 'hamzus-ui';
|
|
6
6
|
|
|
7
7
|
let {
|
|
8
8
|
value = $bindable(null),
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
if (!Array.isArray(parsed)) return;
|
|
64
64
|
|
|
65
65
|
const knownValues = choices.map((c) => c.value);
|
|
66
|
-
|
|
66
|
+
|
|
67
67
|
const unknown = parsed.filter((v) => !knownValues.includes(v));
|
|
68
68
|
const known = parsed.filter((v) => knownValues.includes(v));
|
|
69
69
|
|
|
@@ -77,6 +77,12 @@
|
|
|
77
77
|
// valeur invalide, on ignore
|
|
78
78
|
}
|
|
79
79
|
});
|
|
80
|
+
|
|
81
|
+
function handleDeleteFreeChoice(index) {
|
|
82
|
+
freeChoices = freeChoices.filter((v, i) => i !== index);
|
|
83
|
+
|
|
84
|
+
emitChange();
|
|
85
|
+
}
|
|
80
86
|
</script>
|
|
81
87
|
|
|
82
88
|
<Line {compact}>
|
|
@@ -104,7 +110,43 @@
|
|
|
104
110
|
placeholder="mon choix {index + 1}"
|
|
105
111
|
value={freeChoice}
|
|
106
112
|
onChange={(newValue) => handleChangeFreeChoice(index, newValue)}
|
|
107
|
-
|
|
113
|
+
>
|
|
114
|
+
<IconButton
|
|
115
|
+
slot="endContent"
|
|
116
|
+
variant="secondary"
|
|
117
|
+
onClick={() => {
|
|
118
|
+
handleDeleteFreeChoice(index);
|
|
119
|
+
}}
|
|
120
|
+
><svg
|
|
121
|
+
width="24"
|
|
122
|
+
height="24"
|
|
123
|
+
viewBox="0 0 24 24"
|
|
124
|
+
fill="none"
|
|
125
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
126
|
+
>
|
|
127
|
+
<path
|
|
128
|
+
d="M20.9997 6.72998C20.9797 6.72998 20.9497 6.72998 20.9197 6.72998C15.6297 6.19998 10.3497 5.99998 5.11967 6.52998L3.07967 6.72998C2.65967 6.76998 2.28967 6.46998 2.24967 6.04998C2.20967 5.62998 2.50967 5.26998 2.91967 5.22998L4.95967 5.02998C10.2797 4.48998 15.6697 4.69998 21.0697 5.22998C21.4797 5.26998 21.7797 5.63998 21.7397 6.04998C21.7097 6.43998 21.3797 6.72998 20.9997 6.72998Z"
|
|
129
|
+
fill="#292D32"
|
|
130
|
+
/>
|
|
131
|
+
<path
|
|
132
|
+
d="M8.50074 5.72C8.46074 5.72 8.42074 5.72 8.37074 5.71C7.97074 5.64 7.69074 5.25 7.76074 4.85L7.98074 3.54C8.14074 2.58 8.36074 1.25 10.6907 1.25H13.3107C15.6507 1.25 15.8707 2.63 16.0207 3.55L16.2407 4.85C16.3107 5.26 16.0307 5.65 15.6307 5.71C15.2207 5.78 14.8307 5.5 14.7707 5.1L14.5507 3.8C14.4107 2.93 14.3807 2.76 13.3207 2.76H10.7007C9.64074 2.76 9.62074 2.9 9.47074 3.79L9.24074 5.09C9.18074 5.46 8.86074 5.72 8.50074 5.72Z"
|
|
133
|
+
fill="#292D32"
|
|
134
|
+
/>
|
|
135
|
+
<path
|
|
136
|
+
d="M15.2104 22.7501H8.79039C5.30039 22.7501 5.16039 20.8201 5.05039 19.2601L4.40039 9.19007C4.37039 8.78007 4.69039 8.42008 5.10039 8.39008C5.52039 8.37008 5.87039 8.68008 5.90039 9.09008L6.55039 19.1601C6.66039 20.6801 6.70039 21.2501 8.79039 21.2501H15.2104C17.3104 21.2501 17.3504 20.6801 17.4504 19.1601L18.1004 9.09008C18.1304 8.68008 18.4904 8.37008 18.9004 8.39008C19.3104 8.42008 19.6304 8.77007 19.6004 9.19007L18.9504 19.2601C18.8404 20.8201 18.7004 22.7501 15.2104 22.7501Z"
|
|
137
|
+
fill="#292D32"
|
|
138
|
+
/>
|
|
139
|
+
<path
|
|
140
|
+
d="M13.6601 17.25H10.3301C9.92008 17.25 9.58008 16.91 9.58008 16.5C9.58008 16.09 9.92008 15.75 10.3301 15.75H13.6601C14.0701 15.75 14.4101 16.09 14.4101 16.5C14.4101 16.91 14.0701 17.25 13.6601 17.25Z"
|
|
141
|
+
fill="#292D32"
|
|
142
|
+
/>
|
|
143
|
+
<path
|
|
144
|
+
d="M14.5 13.25H9.5C9.09 13.25 8.75 12.91 8.75 12.5C8.75 12.09 9.09 11.75 9.5 11.75H14.5C14.91 11.75 15.25 12.09 15.25 12.5C15.25 12.91 14.91 13.25 14.5 13.25Z"
|
|
145
|
+
fill="#292D32"
|
|
146
|
+
/>
|
|
147
|
+
</svg>
|
|
148
|
+
</IconButton>
|
|
149
|
+
</Input>
|
|
108
150
|
{/each}
|
|
109
151
|
{/if}
|
|
110
152
|
</div>
|