@onsvisual/svelte-components 1.0.8 → 1.0.10
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.
|
@@ -63,6 +63,11 @@
|
|
|
63
63
|
* @type {boolean}
|
|
64
64
|
*/
|
|
65
65
|
export let numeric = false;
|
|
66
|
+
/**
|
|
67
|
+
* Set to `true` to give the input a disabled state
|
|
68
|
+
* @type {boolean}
|
|
69
|
+
*/
|
|
70
|
+
export let disabled = false;
|
|
66
71
|
/**
|
|
67
72
|
* Set to `true` to highlight border in red
|
|
68
73
|
* @type {boolean}
|
|
@@ -108,6 +113,7 @@
|
|
|
108
113
|
class:ons-input--error={error}
|
|
109
114
|
aria-labelledby="{id} {id}-unit"
|
|
110
115
|
aria-describedby={description ? `${id}-description-hint` : null}
|
|
116
|
+
{disabled}
|
|
111
117
|
on:change={(e) => dispatch("change", e)}
|
|
112
118
|
/>
|
|
113
119
|
<abbr
|
|
@@ -131,6 +137,7 @@
|
|
|
131
137
|
: ''}"
|
|
132
138
|
class:ons-input--error={error}
|
|
133
139
|
aria-describedby={description ? `${id}-description-hint` : null}
|
|
140
|
+
{disabled}
|
|
134
141
|
on:change={(e) => dispatch("change", e)}
|
|
135
142
|
/>
|
|
136
143
|
{/if}
|
|
@@ -11,6 +11,7 @@ export default class Input extends SvelteComponentTyped<{
|
|
|
11
11
|
numeric?: boolean | undefined;
|
|
12
12
|
value?: string | undefined;
|
|
13
13
|
description?: string | undefined;
|
|
14
|
+
disabled?: boolean | undefined;
|
|
14
15
|
hideLabel?: boolean | undefined;
|
|
15
16
|
charLimit?: number | undefined;
|
|
16
17
|
prefix?: string | undefined;
|
|
@@ -37,6 +38,7 @@ declare const __propDef: {
|
|
|
37
38
|
numeric?: boolean | undefined;
|
|
38
39
|
value?: string | undefined;
|
|
39
40
|
description?: string | undefined;
|
|
41
|
+
disabled?: boolean | undefined;
|
|
40
42
|
hideLabel?: boolean | undefined;
|
|
41
43
|
charLimit?: number | undefined;
|
|
42
44
|
prefix?: string | undefined;
|
|
@@ -68,11 +68,9 @@
|
|
|
68
68
|
if (!noContents) {
|
|
69
69
|
$observer = new IntersectionObserver(
|
|
70
70
|
(entries, observer) => {
|
|
71
|
-
console.log(entries);
|
|
72
71
|
for (let i = 0; i < entries.length; i++) {
|
|
73
72
|
if (entries[i].isIntersecting) {
|
|
74
73
|
active = entries[i].target.id;
|
|
75
|
-
console.log({ active });
|
|
76
74
|
break;
|
|
77
75
|
}
|
|
78
76
|
}
|