@fluid-topics/ft-filter 0.3.12 → 0.3.14
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.
- package/build/ft-filter-level.css.d.ts +17 -0
- package/build/ft-filter-level.css.js +88 -0
- package/build/ft-filter-level.d.ts +2 -17
- package/build/ft-filter-level.js +6 -88
- package/build/ft-filter-option.d.ts +1 -6
- package/build/ft-filter-option.properties.d.ts +7 -0
- package/build/ft-filter-option.properties.js +2 -0
- package/build/ft-filter.css.d.ts +11 -0
- package/build/ft-filter.css.js +126 -0
- package/build/ft-filter.d.ts +2 -23
- package/build/ft-filter.js +6 -125
- package/build/ft-filter.light.js +811 -811
- package/build/ft-filter.min.js +822 -822
- package/build/ft-filter.properties.d.ts +15 -0
- package/build/ft-filter.properties.js +2 -0
- package/build/index.d.ts +3 -0
- package/build/index.js +3 -0
- package/package.json +10 -10
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const FtFilterLevelCssVariables: {
|
|
2
|
+
borderRadiusM: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
3
|
+
colorOutline: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
4
|
+
colorOnSurface: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
5
|
+
colorOnSurfaceMedium: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
6
|
+
colorOnSurfaceDisabled: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
7
|
+
colorPrimary: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
8
|
+
colorOnPrimary: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
9
|
+
fontFamily: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
10
|
+
fontSize: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
11
|
+
fontWeight: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
12
|
+
letterSpacing: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
13
|
+
lineHeight: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
14
|
+
textTransform: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
15
|
+
};
|
|
16
|
+
export declare const styles: import("lit").CSSResult;
|
|
17
|
+
//# sourceMappingURL=ft-filter-level.css.d.ts.map
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
import { designSystemVariables, FtCssVariableFactory, setVariable } from "@fluid-topics/ft-wc-utils";
|
|
3
|
+
import { FtButtonCssVariables } from "@fluid-topics/ft-button/build/ft-button.css";
|
|
4
|
+
import { FtTypographyBody2CssVariables } from "@fluid-topics/ft-typography/build/ft-typography.css";
|
|
5
|
+
export const FtFilterLevelCssVariables = {
|
|
6
|
+
borderRadiusM: FtCssVariableFactory.external(designSystemVariables.borderRadiusM, "Design system"),
|
|
7
|
+
colorOutline: FtCssVariableFactory.external(designSystemVariables.colorOutline, "Design system"),
|
|
8
|
+
colorOnSurface: FtCssVariableFactory.external(designSystemVariables.colorOnSurface, "Design system"),
|
|
9
|
+
colorOnSurfaceMedium: FtCssVariableFactory.external(designSystemVariables.colorOnSurfaceMedium, "Design system"),
|
|
10
|
+
colorOnSurfaceDisabled: FtCssVariableFactory.external(designSystemVariables.colorOnSurfaceDisabled, "Design system"),
|
|
11
|
+
colorPrimary: FtCssVariableFactory.external(designSystemVariables.colorPrimary, "Design system"),
|
|
12
|
+
colorOnPrimary: FtCssVariableFactory.external(designSystemVariables.colorOnPrimary, "Design system"),
|
|
13
|
+
fontFamily: FtCssVariableFactory.external(FtTypographyBody2CssVariables.fontFamily, "Body2 typography"),
|
|
14
|
+
fontSize: FtCssVariableFactory.external(FtTypographyBody2CssVariables.fontSize, "Body2 typography"),
|
|
15
|
+
fontWeight: FtCssVariableFactory.external(FtTypographyBody2CssVariables.fontWeight, "Body2 typography"),
|
|
16
|
+
letterSpacing: FtCssVariableFactory.external(FtTypographyBody2CssVariables.letterSpacing, "Body2 typography"),
|
|
17
|
+
lineHeight: FtCssVariableFactory.external(FtTypographyBody2CssVariables.lineHeight, "Body2 typography"),
|
|
18
|
+
textTransform: FtCssVariableFactory.external(FtTypographyBody2CssVariables.textTransform, "Body2 typography"),
|
|
19
|
+
};
|
|
20
|
+
// language=CSS
|
|
21
|
+
export const styles = css `
|
|
22
|
+
.ft-filter-level--container {
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.ft-filter-level--container > * {
|
|
28
|
+
padding: 0 10px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.ft-filter-level--go-back {
|
|
32
|
+
flex-shrink: 0;
|
|
33
|
+
text-decoration: none;
|
|
34
|
+
position: relative;
|
|
35
|
+
border-radius: ${FtFilterLevelCssVariables.borderRadiusM};
|
|
36
|
+
overflow: hidden;
|
|
37
|
+
display: flex;
|
|
38
|
+
align-items: center;
|
|
39
|
+
padding: 4px 4px;
|
|
40
|
+
gap: 4px;
|
|
41
|
+
cursor: pointer;
|
|
42
|
+
color: ${FtFilterLevelCssVariables.colorOnSurface};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.ft-filter-level--go-back:focus {
|
|
46
|
+
outline: none;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.ft-filter-level--go-back ft-icon {
|
|
50
|
+
flex-shrink: 0;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.ft-filter-level--go-back ft-typography {
|
|
54
|
+
display: block;
|
|
55
|
+
flex-grow: 1;
|
|
56
|
+
flex-shrink: 0;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.ft-filter-level--option {
|
|
60
|
+
display: flex;
|
|
61
|
+
align-items: center;
|
|
62
|
+
max-width: 100%;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.ft-filter-level--option ft-button {
|
|
66
|
+
margin-right: -10px;
|
|
67
|
+
flex-shrink: 0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
ft-button {
|
|
71
|
+
${setVariable(FtButtonCssVariables.color, FtFilterLevelCssVariables.colorOnSurface)};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
ft-radio, ft-checkbox {
|
|
75
|
+
flex-shrink: 1;
|
|
76
|
+
flex-grow: 1;
|
|
77
|
+
display: flex;
|
|
78
|
+
max-width: calc(100% + 10px);
|
|
79
|
+
margin-left: -10px;
|
|
80
|
+
word-break: break-word;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.ft-filter-level--no-values {
|
|
84
|
+
margin: 10px 0;
|
|
85
|
+
color: ${FtFilterLevelCssVariables.colorOnSurfaceMedium};
|
|
86
|
+
}
|
|
87
|
+
`;
|
|
88
|
+
//# sourceMappingURL=ft-filter-level.css.js.map
|
|
@@ -1,23 +1,8 @@
|
|
|
1
1
|
import { ElementDefinitionsMap, FtLitElement } from "@fluid-topics/ft-wc-utils";
|
|
2
|
-
import { FtFilterOptionProperties } from "./ft-filter-option";
|
|
3
|
-
export declare const FtFilterLevelCssVariables: {
|
|
4
|
-
borderRadiusM: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
5
|
-
colorOutline: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
6
|
-
colorOnSurface: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
7
|
-
colorOnSurfaceMedium: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
8
|
-
colorOnSurfaceDisabled: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
9
|
-
colorPrimary: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
10
|
-
colorOnPrimary: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
11
|
-
fontFamily: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
12
|
-
fontSize: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
13
|
-
fontWeight: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
14
|
-
letterSpacing: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
15
|
-
lineHeight: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
16
|
-
textTransform: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
17
|
-
};
|
|
2
|
+
import { FtFilterOptionProperties } from "./ft-filter-option.properties";
|
|
18
3
|
export declare class FtFilterLevel extends FtLitElement {
|
|
19
4
|
static elementDefinitions: ElementDefinitionsMap;
|
|
20
|
-
static styles: import("lit").CSSResult
|
|
5
|
+
static styles: import("lit").CSSResult;
|
|
21
6
|
id: string;
|
|
22
7
|
parent?: FtFilterOptionProperties;
|
|
23
8
|
options: Array<FtFilterOptionProperties>;
|
package/build/ft-filter-level.js
CHANGED
|
@@ -4,32 +4,18 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import {
|
|
7
|
+
import { html, nothing } from "lit";
|
|
8
8
|
import { property, query, state } from "lit/decorators.js";
|
|
9
9
|
import { repeat } from "lit/directives/repeat.js";
|
|
10
|
-
import {
|
|
10
|
+
import { FtLitElement } from "@fluid-topics/ft-wc-utils";
|
|
11
11
|
import { flatDeep } from "./utils";
|
|
12
|
-
import { FtButton
|
|
13
|
-
import { FtTypography
|
|
12
|
+
import { FtButton } from "@fluid-topics/ft-button";
|
|
13
|
+
import { FtTypography } from "@fluid-topics/ft-typography";
|
|
14
14
|
import { FtRipple } from "@fluid-topics/ft-ripple";
|
|
15
15
|
import { FtIcon } from "@fluid-topics/ft-icon";
|
|
16
16
|
import { FtCheckbox } from "@fluid-topics/ft-checkbox";
|
|
17
17
|
import { FtRadio } from "@fluid-topics/ft-radio";
|
|
18
|
-
|
|
19
|
-
borderRadiusM: FtCssVariableFactory.external(designSystemVariables.borderRadiusM, "Design system"),
|
|
20
|
-
colorOutline: FtCssVariableFactory.external(designSystemVariables.colorOutline, "Design system"),
|
|
21
|
-
colorOnSurface: FtCssVariableFactory.external(designSystemVariables.colorOnSurface, "Design system"),
|
|
22
|
-
colorOnSurfaceMedium: FtCssVariableFactory.external(designSystemVariables.colorOnSurfaceMedium, "Design system"),
|
|
23
|
-
colorOnSurfaceDisabled: FtCssVariableFactory.external(designSystemVariables.colorOnSurfaceDisabled, "Design system"),
|
|
24
|
-
colorPrimary: FtCssVariableFactory.external(designSystemVariables.colorPrimary, "Design system"),
|
|
25
|
-
colorOnPrimary: FtCssVariableFactory.external(designSystemVariables.colorOnPrimary, "Design system"),
|
|
26
|
-
fontFamily: FtCssVariableFactory.external(FtTypographyBody2CssVariables.fontFamily, "Body2 typography"),
|
|
27
|
-
fontSize: FtCssVariableFactory.external(FtTypographyBody2CssVariables.fontSize, "Body2 typography"),
|
|
28
|
-
fontWeight: FtCssVariableFactory.external(FtTypographyBody2CssVariables.fontWeight, "Body2 typography"),
|
|
29
|
-
letterSpacing: FtCssVariableFactory.external(FtTypographyBody2CssVariables.letterSpacing, "Body2 typography"),
|
|
30
|
-
lineHeight: FtCssVariableFactory.external(FtTypographyBody2CssVariables.lineHeight, "Body2 typography"),
|
|
31
|
-
textTransform: FtCssVariableFactory.external(FtTypographyBody2CssVariables.textTransform, "Body2 typography"),
|
|
32
|
-
};
|
|
18
|
+
import { styles } from "./ft-filter-level.css";
|
|
33
19
|
export class FtFilterLevel extends FtLitElement {
|
|
34
20
|
constructor() {
|
|
35
21
|
super(...arguments);
|
|
@@ -175,75 +161,7 @@ FtFilterLevel.elementDefinitions = {
|
|
|
175
161
|
"ft-radio": FtRadio,
|
|
176
162
|
};
|
|
177
163
|
// language=CSS
|
|
178
|
-
FtFilterLevel.styles =
|
|
179
|
-
css `
|
|
180
|
-
.ft-filter-level--container {
|
|
181
|
-
display: flex;
|
|
182
|
-
flex-direction: column;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
.ft-filter-level--container > * {
|
|
186
|
-
padding: 0 10px;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
.ft-filter-level--go-back {
|
|
190
|
-
flex-shrink: 0;
|
|
191
|
-
text-decoration: none;
|
|
192
|
-
position: relative;
|
|
193
|
-
border-radius: ${FtFilterLevelCssVariables.borderRadiusM};
|
|
194
|
-
overflow: hidden;
|
|
195
|
-
display: flex;
|
|
196
|
-
align-items: center;
|
|
197
|
-
padding: 4px 4px;
|
|
198
|
-
gap: 4px;
|
|
199
|
-
cursor: pointer;
|
|
200
|
-
color: ${FtFilterLevelCssVariables.colorOnSurface};
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
.ft-filter-level--go-back:focus {
|
|
204
|
-
outline: none;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
.ft-filter-level--go-back ft-icon {
|
|
208
|
-
flex-shrink: 0;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
.ft-filter-level--go-back ft-typography {
|
|
212
|
-
display: block;
|
|
213
|
-
flex-grow: 1;
|
|
214
|
-
flex-shrink: 0;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
.ft-filter-level--option {
|
|
218
|
-
display: flex;
|
|
219
|
-
align-items: center;
|
|
220
|
-
max-width: 100%;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
.ft-filter-level--option ft-button {
|
|
224
|
-
margin-right: -10px;
|
|
225
|
-
flex-shrink: 0;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
ft-button {
|
|
229
|
-
${setVariable(FtButtonCssVariables.color, FtFilterLevelCssVariables.colorOnSurface)};
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
ft-radio, ft-checkbox {
|
|
233
|
-
flex-shrink: 1;
|
|
234
|
-
flex-grow: 1;
|
|
235
|
-
display: flex;
|
|
236
|
-
max-width: calc(100% + 10px);
|
|
237
|
-
margin-left: -10px;
|
|
238
|
-
word-break: break-word;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
.ft-filter-level--no-values {
|
|
242
|
-
margin: 10px 0;
|
|
243
|
-
color: ${FtFilterLevelCssVariables.colorOnSurfaceMedium};
|
|
244
|
-
}
|
|
245
|
-
`
|
|
246
|
-
];
|
|
164
|
+
FtFilterLevel.styles = styles;
|
|
247
165
|
__decorate([
|
|
248
166
|
property({ type: String })
|
|
249
167
|
], FtFilterLevel.prototype, "id", void 0);
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import { ElementDefinitionsMap, FtLitElement } from "@fluid-topics/ft-wc-utils";
|
|
2
2
|
import { PropertyValues } from "lit";
|
|
3
|
-
|
|
4
|
-
label: string;
|
|
5
|
-
value: any;
|
|
6
|
-
selected?: boolean;
|
|
7
|
-
subOptions?: Array<FtFilterOptionProperties>;
|
|
8
|
-
}
|
|
3
|
+
import { FtFilterOptionProperties } from "./ft-filter-option.properties";
|
|
9
4
|
export declare class FtFilterOption extends FtLitElement implements FtFilterOptionProperties {
|
|
10
5
|
static elementDefinitions: ElementDefinitionsMap;
|
|
11
6
|
label: string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const FtFilterCssVariables: {
|
|
2
|
+
colorOutline: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
3
|
+
colorOnSurface: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
4
|
+
colorOnSurfaceMedium: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
5
|
+
colorPrimary: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
6
|
+
colorSurface: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
7
|
+
transitionDuration: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
8
|
+
transitionTimingFunction: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
9
|
+
};
|
|
10
|
+
export declare const styles: import("lit").CSSResult[];
|
|
11
|
+
//# sourceMappingURL=ft-filter.css.d.ts.map
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
import { designSystemVariables, FtCssVariableFactory, setVariable } from "@fluid-topics/ft-wc-utils";
|
|
3
|
+
import { FtTypographyCaption, FtTypographyCssVariables } from "@fluid-topics/ft-typography/build/ft-typography.css";
|
|
4
|
+
import { FtButtonCssVariables } from "@fluid-topics/ft-button/build/ft-button.css";
|
|
5
|
+
export const FtFilterCssVariables = {
|
|
6
|
+
colorOutline: FtCssVariableFactory.external(designSystemVariables.colorOutline, "Design system"),
|
|
7
|
+
colorOnSurface: FtCssVariableFactory.external(designSystemVariables.colorOnSurface, "Design system"),
|
|
8
|
+
colorOnSurfaceMedium: FtCssVariableFactory.external(designSystemVariables.colorOnSurfaceMedium, "Design system"),
|
|
9
|
+
colorPrimary: FtCssVariableFactory.external(designSystemVariables.colorPrimary, "Design system"),
|
|
10
|
+
colorSurface: FtCssVariableFactory.external(designSystemVariables.colorSurface, "Design system"),
|
|
11
|
+
transitionDuration: FtCssVariableFactory.external(designSystemVariables.transitionDuration, "Design system"),
|
|
12
|
+
transitionTimingFunction: FtCssVariableFactory.external(designSystemVariables.transitionTimingFunction, "Design system"),
|
|
13
|
+
};
|
|
14
|
+
export const styles = [
|
|
15
|
+
FtTypographyCaption,
|
|
16
|
+
css `
|
|
17
|
+
:host {
|
|
18
|
+
display: flex;
|
|
19
|
+
max-height: 100%;
|
|
20
|
+
max-width: 100%;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.ft-filter--container {
|
|
24
|
+
flex-grow: 1;
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
max-height: 100%;
|
|
28
|
+
max-width: 100%;
|
|
29
|
+
color: ${FtFilterCssVariables.colorOnSurface};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.ft-filter--header {
|
|
33
|
+
display: flex;
|
|
34
|
+
flex-wrap: wrap;
|
|
35
|
+
gap: 4px;
|
|
36
|
+
flex-shrink: 0;
|
|
37
|
+
padding: 0 10px;
|
|
38
|
+
margin-bottom: 8px;
|
|
39
|
+
${setVariable(FtTypographyCssVariables.fontSize, "14px")};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.ft-filter--header ft-button {
|
|
43
|
+
flex-shrink: 0;
|
|
44
|
+
margin-left: auto;
|
|
45
|
+
${setVariable(FtButtonCssVariables.iconSize, "18px")};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.ft-filter--label {
|
|
49
|
+
display: block;
|
|
50
|
+
flex-shrink: 1;
|
|
51
|
+
flex-grow: 1;
|
|
52
|
+
word-break: break-word;
|
|
53
|
+
${setVariable(FtTypographyCssVariables.lineHeight, "22px")};
|
|
54
|
+
${setVariable(FtTypographyCssVariables.fontWeight, "bold")};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.ft-filter--filter {
|
|
58
|
+
flex-shrink: 0;
|
|
59
|
+
display: flex;
|
|
60
|
+
margin: 0;
|
|
61
|
+
margin-bottom: 8px;
|
|
62
|
+
padding: 0 10px;
|
|
63
|
+
overflow: hidden;
|
|
64
|
+
height: 32px;
|
|
65
|
+
transition: height ${FtFilterCssVariables.transitionDuration} ${FtFilterCssVariables.transitionTimingFunction},
|
|
66
|
+
margin ${FtFilterCssVariables.transitionDuration} ${FtFilterCssVariables.transitionTimingFunction};
|
|
67
|
+
transition-delay: 500ms;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.ft-filter--filter[hidden] {
|
|
71
|
+
height: 0;
|
|
72
|
+
margin-bottom: 0;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
input {
|
|
76
|
+
display: block;
|
|
77
|
+
width: 100%;
|
|
78
|
+
border-radius: 4px;
|
|
79
|
+
border: 1px solid ${FtFilterCssVariables.colorOutline};
|
|
80
|
+
padding: 4px;
|
|
81
|
+
background-color: ${FtFilterCssVariables.colorSurface};
|
|
82
|
+
color: ${FtFilterCssVariables.colorOnSurface};
|
|
83
|
+
outline-color: ${FtFilterCssVariables.colorPrimary};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
input::placeholder {
|
|
87
|
+
color: ${FtFilterCssVariables.colorOnSurfaceMedium};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.ft-filter--values {
|
|
91
|
+
flex-grow: 1;
|
|
92
|
+
flex-shrink: 1;
|
|
93
|
+
max-width: 100%;
|
|
94
|
+
overflow-x: hidden;
|
|
95
|
+
overflow-y: auto;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.ft-filter--separator {
|
|
99
|
+
border-top: 1px solid ${FtFilterCssVariables.colorOutline};
|
|
100
|
+
margin: 4px 10px;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.ft-filter--levels-container {
|
|
104
|
+
position: relative;
|
|
105
|
+
overflow: hidden;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.ft-filter--levels {
|
|
109
|
+
position: relative;
|
|
110
|
+
overflow: hidden;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
ft-filter-level {
|
|
114
|
+
width: 100%;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.ft-filter--level-left {
|
|
118
|
+
height: 0;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
slot {
|
|
122
|
+
display: none;
|
|
123
|
+
}
|
|
124
|
+
`
|
|
125
|
+
];
|
|
126
|
+
//# sourceMappingURL=ft-filter.css.js.map
|
package/build/ft-filter.d.ts
CHANGED
|
@@ -1,28 +1,7 @@
|
|
|
1
1
|
import { PropertyValues } from "lit";
|
|
2
2
|
import { ElementDefinitionsMap, FtLitElement } from "@fluid-topics/ft-wc-utils";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
id: string;
|
|
6
|
-
label: string;
|
|
7
|
-
filterPlaceHolder?: string;
|
|
8
|
-
clearButtonLabel?: string;
|
|
9
|
-
moreValuesButtonLabel?: string;
|
|
10
|
-
noValuesLabel?: string;
|
|
11
|
-
options: Array<FtFilterOptionProperties>;
|
|
12
|
-
multivalued?: boolean;
|
|
13
|
-
disabled?: boolean;
|
|
14
|
-
raiseSelectedOptions?: boolean;
|
|
15
|
-
displayedValuesLimit?: number;
|
|
16
|
-
}
|
|
17
|
-
export declare const FtFilterCssVariables: {
|
|
18
|
-
colorOutline: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
19
|
-
colorOnSurface: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
20
|
-
colorOnSurfaceMedium: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
21
|
-
colorPrimary: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
22
|
-
colorSurface: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
23
|
-
transitionDuration: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
24
|
-
transitionTimingFunction: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
25
|
-
};
|
|
3
|
+
import { FtFilterProperties } from "./ft-filter.properties";
|
|
4
|
+
import { FtFilterOptionProperties } from "./ft-filter-option.properties";
|
|
26
5
|
export declare class FtFilterChangeEvent extends CustomEvent<Array<any>> {
|
|
27
6
|
constructor(selectedValues: any[]);
|
|
28
7
|
}
|
package/build/ft-filter.js
CHANGED
|
@@ -4,23 +4,15 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import {
|
|
7
|
+
import { html } from "lit";
|
|
8
8
|
import { property, query, queryAll, state } from "lit/decorators.js";
|
|
9
|
-
import { Debouncer,
|
|
10
|
-
import { FtTypography
|
|
9
|
+
import { Debouncer, FtLitElement, jsonProperty } from "@fluid-topics/ft-wc-utils";
|
|
10
|
+
import { FtTypography } from "@fluid-topics/ft-typography";
|
|
11
11
|
import { flatDeep } from "./utils";
|
|
12
12
|
import { FtFilterLevel } from "./ft-filter-level";
|
|
13
|
-
import { FtButton
|
|
13
|
+
import { FtButton } from "@fluid-topics/ft-button";
|
|
14
14
|
import { FtSnapScroll } from "@fluid-topics/ft-snap-scroll";
|
|
15
|
-
|
|
16
|
-
colorOutline: FtCssVariableFactory.external(designSystemVariables.colorOutline, "Design system"),
|
|
17
|
-
colorOnSurface: FtCssVariableFactory.external(designSystemVariables.colorOnSurface, "Design system"),
|
|
18
|
-
colorOnSurfaceMedium: FtCssVariableFactory.external(designSystemVariables.colorOnSurfaceMedium, "Design system"),
|
|
19
|
-
colorPrimary: FtCssVariableFactory.external(designSystemVariables.colorPrimary, "Design system"),
|
|
20
|
-
colorSurface: FtCssVariableFactory.external(designSystemVariables.colorSurface, "Design system"),
|
|
21
|
-
transitionDuration: FtCssVariableFactory.external(designSystemVariables.transitionDuration, "Design system"),
|
|
22
|
-
transitionTimingFunction: FtCssVariableFactory.external(designSystemVariables.transitionTimingFunction, "Design system"),
|
|
23
|
-
};
|
|
15
|
+
import { styles } from "./ft-filter.css";
|
|
24
16
|
export class FtFilterChangeEvent extends CustomEvent {
|
|
25
17
|
constructor(selectedValues) {
|
|
26
18
|
super("change", { detail: selectedValues });
|
|
@@ -252,118 +244,7 @@ FtFilter.elementDefinitions = {
|
|
|
252
244
|
"ft-typography": FtTypography,
|
|
253
245
|
};
|
|
254
246
|
// language=CSS
|
|
255
|
-
FtFilter.styles =
|
|
256
|
-
FtTypographyCaption,
|
|
257
|
-
css `
|
|
258
|
-
:host {
|
|
259
|
-
display: flex;
|
|
260
|
-
max-height: 100%;
|
|
261
|
-
max-width: 100%;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
.ft-filter--container {
|
|
265
|
-
flex-grow: 1;
|
|
266
|
-
display: flex;
|
|
267
|
-
flex-direction: column;
|
|
268
|
-
max-height: 100%;
|
|
269
|
-
max-width: 100%;
|
|
270
|
-
color: ${FtFilterCssVariables.colorOnSurface};
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
.ft-filter--header {
|
|
274
|
-
display: flex;
|
|
275
|
-
flex-wrap: wrap;
|
|
276
|
-
gap: 4px;
|
|
277
|
-
flex-shrink: 0;
|
|
278
|
-
padding: 0 10px;
|
|
279
|
-
margin-bottom: 8px;
|
|
280
|
-
${setVariable(FtTypographyCssVariables.fontSize, "14px")};
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
.ft-filter--header ft-button {
|
|
284
|
-
flex-shrink: 0;
|
|
285
|
-
margin-left: auto;
|
|
286
|
-
${setVariable(FtButtonCssVariables.iconSize, "18px")};
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
.ft-filter--label {
|
|
290
|
-
display: block;
|
|
291
|
-
flex-shrink: 1;
|
|
292
|
-
flex-grow: 1;
|
|
293
|
-
word-break: break-word;
|
|
294
|
-
${setVariable(FtTypographyCssVariables.lineHeight, "22px")};
|
|
295
|
-
${setVariable(FtTypographyCssVariables.fontWeight, "bold")};
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
.ft-filter--filter {
|
|
299
|
-
flex-shrink: 0;
|
|
300
|
-
display: flex;
|
|
301
|
-
margin: 0;
|
|
302
|
-
margin-bottom: 8px;
|
|
303
|
-
padding: 0 10px;
|
|
304
|
-
overflow: hidden;
|
|
305
|
-
height: 32px;
|
|
306
|
-
transition: height ${FtFilterCssVariables.transitionDuration} ${FtFilterCssVariables.transitionTimingFunction},
|
|
307
|
-
margin ${FtFilterCssVariables.transitionDuration} ${FtFilterCssVariables.transitionTimingFunction};
|
|
308
|
-
transition-delay: 500ms;
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
.ft-filter--filter[hidden] {
|
|
312
|
-
height: 0;
|
|
313
|
-
margin-bottom: 0;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
input {
|
|
317
|
-
display: block;
|
|
318
|
-
width: 100%;
|
|
319
|
-
border-radius: 4px;
|
|
320
|
-
border: 1px solid ${FtFilterCssVariables.colorOutline};
|
|
321
|
-
padding: 4px;
|
|
322
|
-
background-color: ${FtFilterCssVariables.colorSurface};
|
|
323
|
-
color: ${FtFilterCssVariables.colorOnSurface};
|
|
324
|
-
outline-color: ${FtFilterCssVariables.colorPrimary};
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
input::placeholder {
|
|
328
|
-
color: ${FtFilterCssVariables.colorOnSurfaceMedium};
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
.ft-filter--values {
|
|
332
|
-
flex-grow: 1;
|
|
333
|
-
flex-shrink: 1;
|
|
334
|
-
max-width: 100%;
|
|
335
|
-
overflow-x: hidden;
|
|
336
|
-
overflow-y: auto;
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
.ft-filter--separator {
|
|
340
|
-
border-top: 1px solid ${FtFilterCssVariables.colorOutline};
|
|
341
|
-
margin: 4px 10px;
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
.ft-filter--levels-container {
|
|
345
|
-
position: relative;
|
|
346
|
-
overflow: hidden;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
.ft-filter--levels {
|
|
350
|
-
position: relative;
|
|
351
|
-
overflow: hidden;
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
ft-filter-level {
|
|
355
|
-
width: 100%;
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
.ft-filter--level-left {
|
|
359
|
-
height: 0;
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
slot {
|
|
363
|
-
display: none;
|
|
364
|
-
}
|
|
365
|
-
`
|
|
366
|
-
];
|
|
247
|
+
FtFilter.styles = styles;
|
|
367
248
|
__decorate([
|
|
368
249
|
property({ type: String })
|
|
369
250
|
], FtFilter.prototype, "id", void 0);
|