inviton-powerduck 0.0.194 → 0.0.195
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.
|
@@ -62,6 +62,10 @@
|
|
|
62
62
|
display: block;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
+
.mohf-input.mohf-placeholder .mohf-input-first-line-text {
|
|
66
|
+
color: #b7b7b7;
|
|
67
|
+
}
|
|
68
|
+
|
|
65
69
|
@media (max-width: 991.98px) {
|
|
66
70
|
.mohf-mobile-root {
|
|
67
71
|
display: block;
|
|
@@ -128,4 +132,4 @@
|
|
|
128
132
|
padding-left: 12px;
|
|
129
133
|
padding-right: 12px;
|
|
130
134
|
}
|
|
131
|
-
}
|
|
135
|
+
}
|
|
@@ -9,11 +9,13 @@ import Modal, { ModalSize } from '../modal/modal';
|
|
|
9
9
|
import ModalBody from '../modal/modal-body';
|
|
10
10
|
import ModalFooter from '../modal/modal-footer';
|
|
11
11
|
import './css/mobile-optimized-hero-filter.css';
|
|
12
|
+
import { isNullOrEmpty } from '@powerduck/common/utils/is-null-or-empty';
|
|
12
13
|
|
|
13
14
|
interface MobileOptimizedHeroFilterArgs {
|
|
14
15
|
caption: string;
|
|
15
16
|
isLoading?: boolean;
|
|
16
17
|
cssClass?: string;
|
|
18
|
+
placeholder?: string
|
|
17
19
|
clearFilterText?: string;
|
|
18
20
|
submitText?: string;
|
|
19
21
|
clickedClear?: () => void;
|
|
@@ -32,6 +34,7 @@ class MobileOptimizedHeroFilterComponent extends TsxComponent<MobileOptimizedHer
|
|
|
32
34
|
@Prop() caption: string;
|
|
33
35
|
@Prop() isLoading: boolean;
|
|
34
36
|
@Prop() cssClass?: string;
|
|
37
|
+
@Prop() placeholder?: string
|
|
35
38
|
@Prop() clearFilterText?: string;
|
|
36
39
|
@Prop() clickedClear?: () => void;
|
|
37
40
|
@Prop() clickedSubmit?: () => void;
|
|
@@ -55,11 +58,19 @@ class MobileOptimizedHeroFilterComponent extends TsxComponent<MobileOptimizedHer
|
|
|
55
58
|
}
|
|
56
59
|
|
|
57
60
|
render(h) {
|
|
61
|
+
let firstLine = this.mobileFirstLineText;
|
|
62
|
+
let isPlaceholder = false;
|
|
63
|
+
|
|
64
|
+
if (isNullOrEmpty(firstLine)) {
|
|
65
|
+
firstLine = this.placeholder ?? `${PowerduckState.getResourceValue('search')}...`;
|
|
66
|
+
isPlaceholder = true;
|
|
67
|
+
}
|
|
68
|
+
|
|
58
69
|
return (
|
|
59
70
|
<div class={`mohf-root${this.cssClass ? ` ${this.cssClass}` : ''}`}>
|
|
60
71
|
<div class="mohf-mobile-root">
|
|
61
72
|
<div class="mohf-upper-spacer"></div>
|
|
62
|
-
<div class=
|
|
73
|
+
<div class={`mohf-input${isPlaceholder ? ' mohf-placeholder' : ''}`}>
|
|
63
74
|
<div class="mohf-input-outer" onClick={() => { this.showFilterModal(); }}>
|
|
64
75
|
<div class="mohf-input-inner">
|
|
65
76
|
<FlexContainer cssClass="mohf-input-flexwrap" fullWidthOnMobile={false}>
|
|
@@ -69,10 +80,10 @@ class MobileOptimizedHeroFilterComponent extends TsxComponent<MobileOptimizedHer
|
|
|
69
80
|
|
|
70
81
|
<FlexFormItem cssClass="mohf-input-main-wrap" flexFill={true}>
|
|
71
82
|
<div class="mohf-input-main-inner">
|
|
72
|
-
<div class="mohf-input-first-line-text">{
|
|
83
|
+
<div class="mohf-input-first-line-text">{firstLine}</div>
|
|
73
84
|
|
|
74
85
|
{this.mobileSecondLineText?.length > 0
|
|
75
|
-
|
|
86
|
+
&& <div class="mohf-input-second-line-text">{this.mobileSecondLineText}</div>}
|
|
76
87
|
|
|
77
88
|
</div>
|
|
78
89
|
</FlexFormItem>
|
|
@@ -97,16 +108,16 @@ class MobileOptimizedHeroFilterComponent extends TsxComponent<MobileOptimizedHer
|
|
|
97
108
|
</ModalBody>
|
|
98
109
|
<ModalFooter>
|
|
99
110
|
{this.mobileShowClearFilters
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
111
|
+
&& (
|
|
112
|
+
<Button
|
|
113
|
+
layout={ButtonLayout.Secondary}
|
|
114
|
+
text={this.clearFilterText}
|
|
115
|
+
fullWidth={true}
|
|
116
|
+
clicked={() => {
|
|
117
|
+
this.clickedClear();
|
|
118
|
+
}}
|
|
119
|
+
/>
|
|
120
|
+
)}
|
|
110
121
|
<Button
|
|
111
122
|
layout={ButtonLayout.Primary}
|
|
112
123
|
text={PowerduckState.getResourceValue('search')}
|