@onsvisual/svelte-components 1.1.30 → 1.1.31
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.
|
@@ -68,6 +68,11 @@
|
|
|
68
68
|
* @type {boolean}
|
|
69
69
|
*/
|
|
70
70
|
export let numeric = false;
|
|
71
|
+
/**
|
|
72
|
+
* Set to `true` to make the input read-only
|
|
73
|
+
* @type {boolean}
|
|
74
|
+
*/
|
|
75
|
+
export let readonly = false;
|
|
71
76
|
/**
|
|
72
77
|
* Set to `true` to give the input a disabled state
|
|
73
78
|
* @type {boolean}
|
|
@@ -121,6 +126,7 @@
|
|
|
121
126
|
aria-labelledby="{id} {id}-unit"
|
|
122
127
|
aria-describedby={description ? `${id}-description-hint` : null}
|
|
123
128
|
{disabled}
|
|
129
|
+
{readonly}
|
|
124
130
|
on:change={(e) => dispatch("change", { value, e })}
|
|
125
131
|
on:input={(e) => dispatch("input", { value, e })}
|
|
126
132
|
on:blur={(e) => dispatch("blur", { value, e })}
|
|
@@ -149,6 +155,7 @@
|
|
|
149
155
|
class:ons-input--error={error}
|
|
150
156
|
aria-describedby={description ? `${id}-description-hint` : null}
|
|
151
157
|
{disabled}
|
|
158
|
+
{readonly}
|
|
152
159
|
on:change={(e) => dispatch("change", { value, e })}
|
|
153
160
|
on:input={(e) => dispatch("input", { value, e })}
|
|
154
161
|
on:blur={(e) => dispatch("blur", { value, e })}
|
|
@@ -18,6 +18,7 @@ export default class Input extends SvelteComponentTyped<{
|
|
|
18
18
|
prefix?: string | null | undefined;
|
|
19
19
|
suffix?: string | null | undefined;
|
|
20
20
|
unitLabel?: string | undefined;
|
|
21
|
+
readonly?: boolean | undefined;
|
|
21
22
|
}, {
|
|
22
23
|
change: CustomEvent<any>;
|
|
23
24
|
input: CustomEvent<any>;
|
|
@@ -48,6 +49,7 @@ declare const __propDef: {
|
|
|
48
49
|
prefix?: string | null | undefined;
|
|
49
50
|
suffix?: string | null | undefined;
|
|
50
51
|
unitLabel?: string | undefined;
|
|
52
|
+
readonly?: boolean | undefined;
|
|
51
53
|
};
|
|
52
54
|
events: {
|
|
53
55
|
change: CustomEvent<any>;
|
|
@@ -48,6 +48,16 @@
|
|
|
48
48
|
* @type {number}
|
|
49
49
|
*/
|
|
50
50
|
export let width = 30;
|
|
51
|
+
/**
|
|
52
|
+
* Set to `true` to make the input read-only
|
|
53
|
+
* @type {boolean}
|
|
54
|
+
*/
|
|
55
|
+
export let readonly = false;
|
|
56
|
+
/**
|
|
57
|
+
* Set to `true` to give the input a disabled state
|
|
58
|
+
* @type {boolean}
|
|
59
|
+
*/
|
|
60
|
+
export let disabled = false;
|
|
51
61
|
/**
|
|
52
62
|
* Optional: Set an additional CSS class for the component
|
|
53
63
|
* @type {string|null}
|
|
@@ -82,6 +92,8 @@
|
|
|
82
92
|
maxlength={charLimit}
|
|
83
93
|
data-char-limit-ref="{id}-lim"
|
|
84
94
|
aria-describedby="textarea-char-limit-lim"
|
|
95
|
+
{disabled}
|
|
96
|
+
{readonly}
|
|
85
97
|
></textarea>
|
|
86
98
|
{#if Number.isInteger(remaining)}
|
|
87
99
|
<span
|
|
@@ -7,10 +7,12 @@ export default class Textarea extends SvelteComponentTyped<{
|
|
|
7
7
|
width?: number | undefined;
|
|
8
8
|
label?: string | null | undefined;
|
|
9
9
|
name?: string | null | undefined;
|
|
10
|
+
disabled?: boolean | undefined;
|
|
10
11
|
hideLabel?: boolean | undefined;
|
|
11
12
|
description?: string | null | undefined;
|
|
12
13
|
value?: string | null | undefined;
|
|
13
14
|
charLimit?: number | null | undefined;
|
|
15
|
+
readonly?: boolean | undefined;
|
|
14
16
|
rows?: number | undefined;
|
|
15
17
|
}, {
|
|
16
18
|
[evt: string]: CustomEvent<any>;
|
|
@@ -27,10 +29,12 @@ declare const __propDef: {
|
|
|
27
29
|
width?: number | undefined;
|
|
28
30
|
label?: string | null | undefined;
|
|
29
31
|
name?: string | null | undefined;
|
|
32
|
+
disabled?: boolean | undefined;
|
|
30
33
|
hideLabel?: boolean | undefined;
|
|
31
34
|
description?: string | null | undefined;
|
|
32
35
|
value?: string | null | undefined;
|
|
33
36
|
charLimit?: number | null | undefined;
|
|
37
|
+
readonly?: boolean | undefined;
|
|
34
38
|
rows?: number | undefined;
|
|
35
39
|
};
|
|
36
40
|
events: {
|