@onsvisual/svelte-components 1.1.57 → 1.1.58
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.
|
@@ -23,6 +23,11 @@
|
|
|
23
23
|
* @type {boolean}
|
|
24
24
|
*/
|
|
25
25
|
export let hideLabel = false;
|
|
26
|
+
/**
|
|
27
|
+
* An optional description to help users know what to enter
|
|
28
|
+
* @type {string|null}
|
|
29
|
+
*/
|
|
30
|
+
export let description = null;
|
|
26
31
|
/**
|
|
27
32
|
* An optional placeholder text
|
|
28
33
|
* @type {string}
|
|
@@ -51,9 +56,11 @@
|
|
|
51
56
|
</script>
|
|
52
57
|
|
|
53
58
|
<div class="ons-field {cls}">
|
|
54
|
-
{#if label}
|
|
55
|
-
|
|
56
|
-
|
|
59
|
+
{#if label}<label class="ons-label" for={id} class:ons-u-vh={hideLabel}>{label}</label>{/if}
|
|
60
|
+
{#if description}<span
|
|
61
|
+
id="description-hint"
|
|
62
|
+
class="ons-label__description ons-input--with-description">{description}</span
|
|
63
|
+
>{/if}
|
|
57
64
|
<select
|
|
58
65
|
{id}
|
|
59
66
|
{name}
|
|
@@ -8,6 +8,7 @@ export default class Dropdown extends SvelteComponentTyped<{
|
|
|
8
8
|
label?: string | null | undefined;
|
|
9
9
|
name?: string | null | undefined;
|
|
10
10
|
hideLabel?: boolean | undefined;
|
|
11
|
+
description?: string | null | undefined;
|
|
11
12
|
value?: object | null | undefined;
|
|
12
13
|
placeholder?: string | undefined;
|
|
13
14
|
options?: object[] | undefined;
|
|
@@ -31,6 +32,7 @@ declare const __propDef: {
|
|
|
31
32
|
label?: string | null | undefined;
|
|
32
33
|
name?: string | null | undefined;
|
|
33
34
|
hideLabel?: boolean | undefined;
|
|
35
|
+
description?: string | null | undefined;
|
|
34
36
|
value?: object | null | undefined;
|
|
35
37
|
placeholder?: string | undefined;
|
|
36
38
|
options?: object[] | undefined;
|
|
@@ -54,6 +54,11 @@
|
|
|
54
54
|
* @type {boolean}
|
|
55
55
|
*/
|
|
56
56
|
export let hideLabel = false;
|
|
57
|
+
/**
|
|
58
|
+
* An optional description to help users know what to enter
|
|
59
|
+
* @type {string|null}
|
|
60
|
+
*/
|
|
61
|
+
export let description = null;
|
|
57
62
|
/**
|
|
58
63
|
* An optional placeholder text
|
|
59
64
|
* @type {string}
|
|
@@ -217,6 +222,10 @@
|
|
|
217
222
|
{:else}
|
|
218
223
|
<div class="ons-field {cls}">
|
|
219
224
|
{#if label}<label for={id} class="ons-label" class:ons-u-vh={hideLabel}>{label}</label>{/if}
|
|
225
|
+
{#if description}<span
|
|
226
|
+
id="description-hint"
|
|
227
|
+
class="ons-label__description ons-input--with-description">{description}</span
|
|
228
|
+
>{/if}
|
|
220
229
|
<div class="ons-autocomplete-wrapper">
|
|
221
230
|
{#if mounted}
|
|
222
231
|
<div
|
|
@@ -7,6 +7,7 @@ export default class Select extends SvelteComponentTyped<{
|
|
|
7
7
|
label?: string | null | undefined;
|
|
8
8
|
name?: string | undefined;
|
|
9
9
|
hideLabel?: boolean | undefined;
|
|
10
|
+
description?: string | null | undefined;
|
|
10
11
|
value?: object | undefined;
|
|
11
12
|
placeholder?: string | undefined;
|
|
12
13
|
options?: array;
|
|
@@ -38,6 +39,7 @@ declare const __propDef: {
|
|
|
38
39
|
label?: string | null | undefined;
|
|
39
40
|
name?: string | undefined;
|
|
40
41
|
hideLabel?: boolean | undefined;
|
|
42
|
+
description?: string | null | undefined;
|
|
41
43
|
value?: object | undefined;
|
|
42
44
|
placeholder?: string | undefined;
|
|
43
45
|
options?: array;
|