@iroco/ui 1.6.9 → 1.6.11
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/dist/Alert.svelte +2 -2
- package/dist/Alert.svelte.d.ts +2 -2
- package/dist/TextInput.svelte +10 -13
- package/dist/TextInput.svelte.d.ts +1 -0
- package/package.json +1 -1
package/dist/Alert.svelte
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import IconClose from './IconClose.svelte';
|
|
3
|
-
import type
|
|
3
|
+
import { type MouseEventHandler, type SvelteHTMLElements } from 'svelte/elements';
|
|
4
4
|
|
|
5
|
-
interface Props {
|
|
5
|
+
interface Props extends SvelteHTMLElements.div {
|
|
6
6
|
type?: 'success' | 'danger' | 'flash';
|
|
7
7
|
showClose?: boolean;
|
|
8
8
|
/** @deprecated use onclose instead */
|
package/dist/Alert.svelte.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type
|
|
2
|
-
interface Props {
|
|
1
|
+
import { type MouseEventHandler } from 'svelte/elements';
|
|
2
|
+
interface Props extends SvelteHTMLElements.div {
|
|
3
3
|
type?: 'success' | 'danger' | 'flash';
|
|
4
4
|
showClose?: boolean;
|
|
5
5
|
/** @deprecated use onclose instead */
|
package/dist/TextInput.svelte
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import type { HTMLInputAttributes } from 'svelte/elements';
|
|
2
|
+
import type { HTMLAttributes, HTMLInputAttributes } from 'svelte/elements';
|
|
3
3
|
|
|
4
4
|
export type ValidationErrorMessage = { key: string; isHtml?: boolean };
|
|
5
|
-
|
|
5
|
+
//https://svelte.dev/docs/svelte/typescript#Typing-wrapper-components
|
|
6
6
|
interface Props extends HTMLInputAttributes {
|
|
7
7
|
// id?: string | null;
|
|
8
8
|
// type?: 'email' | 'password' | 'search' | 'tel' | 'text' | 'url' | null | undefined;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
// value?: string | null;
|
|
16
16
|
// onfocus?: ((e: FocusEvent) => void) | null;
|
|
17
17
|
// onblur?: ((e: Event) => void) | null;
|
|
18
|
-
|
|
18
|
+
readonly?: boolean;
|
|
19
19
|
border?: boolean;
|
|
20
20
|
// autocomplete?: FullAutoFill | null | undefined;
|
|
21
21
|
// oninput?: FormEventHandler<HTMLInputElement> | null | undefined;
|
|
@@ -24,20 +24,20 @@
|
|
|
24
24
|
let {
|
|
25
25
|
id = null,
|
|
26
26
|
type = 'text',
|
|
27
|
-
name = null,
|
|
28
|
-
placeholder = null,
|
|
27
|
+
// name = null,
|
|
28
|
+
// placeholder = null,
|
|
29
29
|
label = null,
|
|
30
30
|
error = null,
|
|
31
31
|
errors = [],
|
|
32
32
|
htmlError = false,
|
|
33
33
|
value = $bindable(null),
|
|
34
|
-
onFocus = null,
|
|
35
|
-
onBlur = null,
|
|
34
|
+
// onFocus = null,
|
|
35
|
+
// onBlur = null,
|
|
36
36
|
readonly = false,
|
|
37
37
|
border = false,
|
|
38
|
-
autocomplete = 'on',
|
|
39
|
-
oninput,
|
|
40
38
|
...rest
|
|
39
|
+
// autocomplete = 'on',
|
|
40
|
+
// oninput,
|
|
41
41
|
}: Props = $props();
|
|
42
42
|
|
|
43
43
|
function hasErrors() {
|
|
@@ -50,15 +50,12 @@
|
|
|
50
50
|
<label class="iroco-ui-label" for={id}>{label}</label>
|
|
51
51
|
{/if}
|
|
52
52
|
<input
|
|
53
|
-
{id}
|
|
54
|
-
{placeholder}
|
|
55
|
-
{readonly}
|
|
56
53
|
{type}
|
|
57
54
|
bind:value
|
|
58
55
|
class:border
|
|
59
56
|
class:error={hasErrors()}
|
|
60
57
|
class:readonlyInput={readonly === true}
|
|
61
|
-
{
|
|
58
|
+
{readonly}
|
|
62
59
|
{...rest}
|
|
63
60
|
/>
|
|
64
61
|
{#if error != null}
|
|
@@ -8,6 +8,7 @@ interface Props extends HTMLInputAttributes {
|
|
|
8
8
|
error?: string | null;
|
|
9
9
|
errors?: Array<ValidationErrorMessage> | null;
|
|
10
10
|
htmlError?: boolean;
|
|
11
|
+
readonly?: boolean;
|
|
11
12
|
border?: boolean;
|
|
12
13
|
}
|
|
13
14
|
declare const TextInput: import("svelte").Component<Props, {}, "value">;
|