svseeds 0.3.5 → 0.3.7
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/_svseeds/TagsInput.svelte +6 -3
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
|
@@ -38,6 +38,8 @@
|
|
|
38
38
|
const cls = fnClass(preset, style);
|
|
39
39
|
const confirmKeys = new Set([CONFIRM_KEY, ...confirm]);
|
|
40
40
|
if (min) validations.push((values) => values.length < min.value ? min.message : "");
|
|
41
|
+
const left = type === "left" || deps?.svsTextField?.left ? sideLeft : undefined;
|
|
42
|
+
const right = type === "right" || deps?.svsTextField?.right ? sideRight : undefined;
|
|
41
43
|
let value = $state("");
|
|
42
44
|
|
|
43
45
|
// *** Initialize Deps *** //
|
|
@@ -46,7 +48,7 @@
|
|
|
46
48
|
style: deps?.svsBadge?.style ?? `${preset} svs-badge`,
|
|
47
49
|
};
|
|
48
50
|
const textValidations = deps?.svsTextField?.validations ?? [];
|
|
49
|
-
if (max) textValidations.push((
|
|
51
|
+
if (max) textValidations.push((_) => values.length >= max.value ? max.message : "");
|
|
50
52
|
const svsTextField = {
|
|
51
53
|
...omit(deps?.svsTextField, "validations", "style", "attributes"),
|
|
52
54
|
validations: textValidations,
|
|
@@ -89,6 +91,7 @@
|
|
|
89
91
|
values.splice(index, 1);
|
|
90
92
|
};
|
|
91
93
|
}
|
|
94
|
+
$effect(() => untrack(() => validate()))
|
|
92
95
|
</script>
|
|
93
96
|
|
|
94
97
|
<!---------------------------------------->
|
|
@@ -100,7 +103,7 @@
|
|
|
100
103
|
</div>
|
|
101
104
|
{/if}
|
|
102
105
|
|
|
103
|
-
{#snippet
|
|
106
|
+
{#snippet sideLeft(status: string)}
|
|
104
107
|
{#if type === "left"}
|
|
105
108
|
{@render tags()}
|
|
106
109
|
{:else}
|
|
@@ -109,7 +112,7 @@
|
|
|
109
112
|
{/if}
|
|
110
113
|
{/if}
|
|
111
114
|
{/snippet}
|
|
112
|
-
{#snippet
|
|
115
|
+
{#snippet sideRight(status: string)}
|
|
113
116
|
{#if type === "right"}
|
|
114
117
|
{@render tags()}
|
|
115
118
|
{:else}
|
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { type SVSStyle, CONST, STATE, AREA, elemId, fnClass, isNeutral, omit, debounce, throttle, UniqueId } from "./_svseeds/core
|
|
1
|
+
export { type SVSStyle, CONST, STATE, AREA, elemId, fnClass, isNeutral, omit, debounce, throttle, UniqueId } from "./_svseeds/core";
|
|
2
2
|
export { default as Badge, type BadgeProps, type BadgeReqdProps, type BadgeBindProps } from "./_svseeds/_Badge.svelte";
|
|
3
3
|
export { default as Button, type ButtonProps, type ButtonReqdProps, type ButtonBindProps } from "./_svseeds/_Button.svelte";
|
|
4
4
|
export { default as CheckField, type CheckFieldProps, type CheckFieldReqdProps, type CheckFieldBindProps } from "./_svseeds/_CheckField.svelte";
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { CONST, STATE, AREA, elemId, fnClass, isNeutral, omit, debounce, throttle, UniqueId } from "./_svseeds/core
|
|
1
|
+
export { CONST, STATE, AREA, elemId, fnClass, isNeutral, omit, debounce, throttle, UniqueId } from "./_svseeds/core";
|
|
2
2
|
export { default as Badge } from "./_svseeds/_Badge.svelte";
|
|
3
3
|
export { default as Button } from "./_svseeds/_Button.svelte";
|
|
4
4
|
export { default as CheckField } from "./_svseeds/_CheckField.svelte";
|