@onsvisual/svelte-components 0.1.55 → 0.1.57
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.
|
@@ -9,7 +9,7 @@ export default class Button extends SvelteComponentTyped<{
|
|
|
9
9
|
icon?: string;
|
|
10
10
|
iconPosition?: "before" | "after";
|
|
11
11
|
disabled?: boolean;
|
|
12
|
-
|
|
12
|
+
hideLabel?: boolean;
|
|
13
13
|
}, {
|
|
14
14
|
click: CustomEvent<any>;
|
|
15
15
|
} & {
|
|
@@ -32,7 +32,7 @@ declare const __propDef: {
|
|
|
32
32
|
icon?: string;
|
|
33
33
|
iconPosition?: "before" | "after";
|
|
34
34
|
disabled?: boolean;
|
|
35
|
-
|
|
35
|
+
hideLabel?: boolean;
|
|
36
36
|
};
|
|
37
37
|
events: {
|
|
38
38
|
click: CustomEvent<any>;
|
|
@@ -19,6 +19,7 @@ export default class Select extends SvelteComponentTyped<{
|
|
|
19
19
|
labelKey?: string;
|
|
20
20
|
groupKey?: string;
|
|
21
21
|
clusterByGroup?: boolean;
|
|
22
|
+
hideIcon?: boolean;
|
|
22
23
|
colors?: any[];
|
|
23
24
|
itemFilter?: Function;
|
|
24
25
|
loadOptions?: Function;
|
|
@@ -56,6 +57,7 @@ declare const __propDef: {
|
|
|
56
57
|
labelKey?: string;
|
|
57
58
|
groupKey?: string | null;
|
|
58
59
|
clusterByGroup?: boolean;
|
|
60
|
+
hideIcon?: boolean;
|
|
59
61
|
colors?: any[];
|
|
60
62
|
itemFilter?: Function;
|
|
61
63
|
loadOptions?: Function;
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
* Visually hide the button text (for icon-only buttons)
|
|
44
44
|
* @type {boolean}
|
|
45
45
|
*/
|
|
46
|
-
export let
|
|
46
|
+
export let hideLabel = false;
|
|
47
47
|
</script>
|
|
48
48
|
|
|
49
49
|
{#if href}
|
|
@@ -62,15 +62,15 @@
|
|
|
62
62
|
{#if iconPosition === "before"}
|
|
63
63
|
<slot name="icon">
|
|
64
64
|
{#if icon}
|
|
65
|
-
<Icon type="{icon}" marginRight="{!
|
|
65
|
+
<Icon type="{icon}" marginRight="{!hideLabel}" />
|
|
66
66
|
{/if}
|
|
67
67
|
</slot>
|
|
68
68
|
{/if}
|
|
69
|
-
<span class="ons-btn__text" class:ons-u-vh="{
|
|
69
|
+
<span class="ons-btn__text" class:ons-u-vh="{hideLabel}"><slot /></span>
|
|
70
70
|
{#if iconPosition === "after"}
|
|
71
71
|
<slot name="icon">
|
|
72
72
|
{#if icon}
|
|
73
|
-
<Icon type="{icon}" marginLeft="{!
|
|
73
|
+
<Icon type="{icon}" marginLeft="{!hideLabel}" />
|
|
74
74
|
{/if}
|
|
75
75
|
</slot>
|
|
76
76
|
{/if}
|
|
@@ -91,15 +91,15 @@
|
|
|
91
91
|
{#if iconPosition === "before"}
|
|
92
92
|
<slot name="icon">
|
|
93
93
|
{#if icon}
|
|
94
|
-
<Icon type="{icon}" marginRight="{!
|
|
94
|
+
<Icon type="{icon}" marginRight="{!hideLabel}" />
|
|
95
95
|
{/if}
|
|
96
96
|
</slot>
|
|
97
97
|
{/if}
|
|
98
|
-
<span class="ons-btn__text" class:ons-u-vh="{
|
|
98
|
+
<span class="ons-btn__text" class:ons-u-vh="{hideLabel}"><slot /></span>
|
|
99
99
|
{#if iconPosition === "after"}
|
|
100
100
|
<slot name="icon">
|
|
101
101
|
{#if icon}
|
|
102
|
-
<Icon type="{icon}" marginLeft="{!
|
|
102
|
+
<Icon type="{icon}" marginLeft="{!hideLabel}" />
|
|
103
103
|
{/if}
|
|
104
104
|
</slot>
|
|
105
105
|
{/if}
|
|
@@ -88,6 +88,11 @@
|
|
|
88
88
|
* @type {number}
|
|
89
89
|
*/
|
|
90
90
|
export let width = 30;
|
|
91
|
+
/**
|
|
92
|
+
* Hide the icon in the search box
|
|
93
|
+
* @type {boolean}
|
|
94
|
+
*/
|
|
95
|
+
export let hideIcon = false;
|
|
91
96
|
/**
|
|
92
97
|
* An array of colours for multi-select
|
|
93
98
|
* @type {array}
|
|
@@ -159,7 +164,7 @@
|
|
|
159
164
|
itemId="{idKey}"
|
|
160
165
|
label="{labelKey}"
|
|
161
166
|
groupBy="{groupKey && clusterByGroup ? (item) => item[groupKey] : null}"
|
|
162
|
-
showChevron="{
|
|
167
|
+
showChevron="{!hideIcon}"
|
|
163
168
|
multiple="{multiple}"
|
|
164
169
|
clearable="{clearable}"
|
|
165
170
|
on:change="{handleChange}"
|