@likable-hair/svelte 0.0.59 → 0.0.62
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/forms/Checkbox.svelte
CHANGED
package/forms/Textfield.svelte
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script context="module"></script>
|
|
2
2
|
|
|
3
|
-
<script >export let label = "", placeholder = "", color = null, value = "", disabled = false, variant = 'outlined', width = "100%", height = "50px", maxWidth = undefined, minWidth = undefined, textColor = "black", borderWeight = "2px", borderRadius = "5px", borderColor = null, focusBorderColor = null, focusedBoxShadow = undefined, backgroundColor = null, padding = undefined, paddingLeft = undefined, paddingRight = undefined, paddingBottom = undefined, paddingTop = undefined, fontSize = undefined, type = 'text', inputElement = undefined;
|
|
3
|
+
<script >export let label = "", placeholder = "", color = null, value = "", disabled = false, variant = 'outlined', width = "100%", height = "50px", maxWidth = undefined, minWidth = undefined, textColor = "black", borderWeight = "2px", borderRadius = "5px", borderColor = null, focusBorderColor = null, focusedBoxShadow = undefined, backgroundColor = null, padding = undefined, paddingLeft = undefined, paddingRight = undefined, paddingBottom = undefined, paddingTop = undefined, fontSize = undefined, type = 'text', readonly = false, inputElement = undefined;
|
|
4
4
|
import { v4 as uuidv4 } from 'uuid';
|
|
5
5
|
import { onMount } from 'svelte';
|
|
6
6
|
let inputId = uuidv4(), focused = false, legendWidth = 0, labelElement = undefined;
|
|
@@ -166,6 +166,7 @@ $: if (!!labelElement) {
|
|
|
166
166
|
type="password"
|
|
167
167
|
placeholder={placeholder}
|
|
168
168
|
disabled={disabled}
|
|
169
|
+
readonly={readonly}
|
|
169
170
|
bind:value={value}
|
|
170
171
|
on:change
|
|
171
172
|
on:input
|
|
@@ -188,6 +189,7 @@ $: if (!!labelElement) {
|
|
|
188
189
|
type="text"
|
|
189
190
|
placeholder={placeholder}
|
|
190
191
|
disabled={disabled}
|
|
192
|
+
readonly={readonly}
|
|
191
193
|
bind:value={value}
|
|
192
194
|
on:change
|
|
193
195
|
on:input
|
|
@@ -222,6 +224,7 @@ $: if (!!labelElement) {
|
|
|
222
224
|
type="password"
|
|
223
225
|
placeholder={placeholder || label}
|
|
224
226
|
disabled={disabled}
|
|
227
|
+
readonly={readonly}
|
|
225
228
|
bind:value={value}
|
|
226
229
|
on:change
|
|
227
230
|
on:input
|
|
@@ -244,6 +247,7 @@ $: if (!!labelElement) {
|
|
|
244
247
|
type="text"
|
|
245
248
|
placeholder={placeholder || label}
|
|
246
249
|
disabled={disabled}
|
|
250
|
+
readonly={readonly}
|
|
247
251
|
bind:value={value}
|
|
248
252
|
on:change
|
|
249
253
|
on:input
|
package/media/Gallery.svelte
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
<script context="module"></script>
|
|
2
|
-
|
|
3
1
|
<script >export let images = [], columns = undefined, imageMaxWidth = undefined, imageMinWidth = undefined, imageMaxHeight = undefined, imageMinHeight = undefined, imageHeight = undefined, imageWidth = undefined, disableHover = false, dark = false;
|
|
4
2
|
let selectedIndex = undefined, selectedImage = undefined;
|
|
5
3
|
function handleImageClick(e) {
|
|
@@ -8,12 +6,12 @@ function handleImageClick(e) {
|
|
|
8
6
|
$: if (selectedIndex !== undefined && selectedIndex !== null) {
|
|
9
7
|
selectedImage = images[selectedIndex];
|
|
10
8
|
}
|
|
11
|
-
function
|
|
9
|
+
function switchPrevious() {
|
|
12
10
|
if (selectedIndex < (images.length - 1)) {
|
|
13
11
|
selectedIndex++;
|
|
14
12
|
}
|
|
15
13
|
}
|
|
16
|
-
function
|
|
14
|
+
function switchNext() {
|
|
17
15
|
if (selectedIndex > 0) {
|
|
18
16
|
selectedIndex--;
|
|
19
17
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script context="module"></script>
|
|
2
2
|
|
|
3
|
-
<script >import { onMount } from 'svelte';
|
|
3
|
+
<script >import { afterUpdate, onMount } from 'svelte';
|
|
4
4
|
export let tabs = [], selected = undefined, mandatory = true, width = undefined, color = "rgb(51 65 85)", bookmarkColor = undefined, horizontalGuideColor = "rgb(51 65 85)", margin = "12px";
|
|
5
5
|
let tabButtons = {};
|
|
6
6
|
onMount(() => {
|
|
@@ -10,6 +10,9 @@ onMount(() => {
|
|
|
10
10
|
setBookmarkPosition();
|
|
11
11
|
}
|
|
12
12
|
});
|
|
13
|
+
afterUpdate(() => {
|
|
14
|
+
setBookmarkPosition();
|
|
15
|
+
});
|
|
13
16
|
import { createEventDispatcher } from 'svelte';
|
|
14
17
|
const dispatch = createEventDispatcher();
|
|
15
18
|
let bookmarkWidth = 0, bookmarkLeft = 0;
|
|
@@ -28,8 +31,6 @@ function setBookmarkPosition() {
|
|
|
28
31
|
bookmarkLeft = tabButton.offsetLeft + 5;
|
|
29
32
|
}
|
|
30
33
|
}
|
|
31
|
-
$: if (!!selected)
|
|
32
|
-
setBookmarkPosition();
|
|
33
34
|
</script>
|
|
34
35
|
|
|
35
36
|
<div
|