@eox/itemfilter 1.9.2 → 1.10.1

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.
Files changed (38) hide show
  1. package/dist/eox-itemfilter.js +3815 -3733
  2. package/dist/eox-itemfilter.umd.cjs +494 -446
  3. package/dist/material-symbols-outlined.woff2 +0 -0
  4. package/dist/material-symbols-rounded.woff2 +0 -0
  5. package/dist/material-symbols-sharp.woff2 +0 -0
  6. package/dist/material-symbols-subset.woff2 +0 -0
  7. package/package.json +3 -2
  8. package/src/components/chips.js +11 -6
  9. package/src/components/expand-container.js +21 -9
  10. package/src/components/filters/range.js +12 -10
  11. package/src/components/filters/selector.js +22 -12
  12. package/src/components/filters/spatial.js +31 -29
  13. package/src/components/filters/text.js +5 -2
  14. package/src/components/itemfilter-container.js +27 -6
  15. package/src/components/results.js +20 -22
  16. package/src/helpers/chip-items.js +1 -1
  17. package/src/main.js +91 -64
  18. package/src/methods/itemfilter/create-reset.js +15 -3
  19. package/src/methods/results/create.js +110 -56
  20. package/src/style.eox.js +123 -208
  21. package/src/style.js +2 -1
  22. package/types/components/chips.d.ts +6 -0
  23. package/types/components/chips.d.ts.map +1 -1
  24. package/types/components/expand-container.d.ts.map +1 -1
  25. package/types/components/filters/range.d.ts.map +1 -1
  26. package/types/components/filters/selector.d.ts +6 -0
  27. package/types/components/filters/selector.d.ts.map +1 -1
  28. package/types/components/filters/spatial.d.ts.map +1 -1
  29. package/types/components/filters/text.d.ts.map +1 -1
  30. package/types/components/itemfilter-container.d.ts.map +1 -1
  31. package/types/components/results.d.ts.map +1 -1
  32. package/types/main.d.ts.map +1 -1
  33. package/types/methods/itemfilter/create-reset.d.ts.map +1 -1
  34. package/types/methods/results/create.d.ts.map +1 -1
  35. package/types/style.d.ts +1 -1
  36. package/types/style.d.ts.map +1 -1
  37. package/types/style.eox.d.ts +1 -1
  38. package/types/style.eox.d.ts.map +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eox/itemfilter",
3
- "version": "1.9.2",
3
+ "version": "1.10.1",
4
4
  "type": "module",
5
5
  "devDependencies": {
6
6
  "@types/geojson": "^7946.0.14",
@@ -35,7 +35,8 @@
35
35
  "watch": "vite build --watch"
36
36
  },
37
37
  "dependencies": {
38
- "@eox/elements-utils": "^0.1.5",
38
+ "@eox/elements-utils": "^1.0.0",
39
+ "@eox/ui": "^0.3.6",
39
40
  "@floating-ui/dom": "^1.6.8",
40
41
  "@turf/boolean-intersects": "^7.0.0",
41
42
  "@turf/boolean-within": "^7.0.0",
@@ -1,6 +1,5 @@
1
1
  import { LitElement, html } from "lit";
2
2
  import { map } from "lit/directives/map.js";
3
- import { styleEOX } from "../style.eox";
4
3
  import {
5
4
  handleChipClickMethod,
6
5
  keyboardEventListenerMethod,
@@ -39,6 +38,15 @@ export class EOxItemFilterChipsV2 extends LitElement {
39
38
  this.controller = {};
40
39
  }
41
40
 
41
+ /**
42
+ * Overrides the default createRenderRoot method to render in the light DOM.
43
+ *
44
+ * @returns {this} - The current instance to render in the light DOM.
45
+ */
46
+ createRenderRoot() {
47
+ return this;
48
+ }
49
+
42
50
  /**
43
51
  * Lifecycle method called when the element is connected to the DOM.
44
52
  * Adds a keyboard event listener.
@@ -101,14 +109,11 @@ export class EOxItemFilterChipsV2 extends LitElement {
101
109
  */
102
110
  render() {
103
111
  return html`
104
- <style>
105
- ${styleEOX}
106
- </style>
107
112
  <span class="chip-container">
108
113
  ${map(
109
114
  this.items,
110
115
  (item) => html`
111
- <span class="chip" @click=${this.#handleChipClick.bind(this)}>
116
+ <span class="chip tiny-margin" @click=${this.#handleChipClick.bind(this)}>
112
117
  <span class="chip-title">${item.title}</span>
113
118
  <span
114
119
  class="chip-item-close hidden"
@@ -119,7 +124,7 @@ export class EOxItemFilterChipsV2 extends LitElement {
119
124
  this.requestUpdate();
120
125
  }}
121
126
  ></span>
122
- </span>
127
+ </span>
123
128
  </span>
124
129
  `,
125
130
  )}
@@ -65,18 +65,30 @@ export class EOxItemFilterExpandContainer extends LitElement {
65
65
  () =>
66
66
  html`<details
67
67
  @toggle="${this.#handleDetailsToggle}"
68
- class="details-filter"
68
+ class="details-filter max-width"
69
69
  ?open=${this.filterObject.expanded || nothing}
70
70
  >
71
- <summary>
72
- <span
73
- class="title"
74
- style="${!this.filterObject.title &&
75
- "text-transform: var(--text-transform)"}"
76
- >
77
- ${this.filterObject.title || this.filterObject.key || "Filter"}
71
+ <summary class="square">
72
+ <nav class="responsive tiny-space">
73
+ <i class="small">
74
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
75
+ <title>chevron-right</title>
76
+ <path
77
+ d="M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z"
78
+ />
79
+ </svg>
80
+ </i>
81
+ <span
82
+ class="title max"
83
+ style="${!this.filterObject.title &&
84
+ "text-transform: var(--text-transform)"}"
85
+ >
86
+ ${this.filterObject.title ||
87
+ this.filterObject.key ||
88
+ "Filter"}
89
+ </span>
78
90
  <slot name="reset-button"></slot>
79
- </span>
91
+ </nav>
80
92
  </summary>
81
93
  <div>
82
94
  <slot name="filter"></slot>
@@ -94,16 +94,18 @@ export class EOxItemFilterRange extends LitElement {
94
94
  return when(
95
95
  this.filterObject,
96
96
  () => html`
97
- ${this.#label("min", "before")}
98
- <tc-range-slider
99
- min="${this.filterObject.min}"
100
- max="${this.filterObject.max}"
101
- value1="${this.filterObject.state.min || this.filterObject.min}"
102
- value2="${this.filterObject.state.max || this.filterObject.max}"
103
- step="${this.filterObject.step || 1}"
104
- @change=${this.debouncedInputHandler}
105
- ></tc-range-slider>
106
- ${this.#label("max", "after")}
97
+ <div style="margin-left: var(--list-padding)">
98
+ ${this.#label("min", "before")}
99
+ <tc-range-slider
100
+ min="${this.filterObject.min}"
101
+ max="${this.filterObject.max}"
102
+ value1="${this.filterObject.state.min || this.filterObject.min}"
103
+ value2="${this.filterObject.state.max || this.filterObject.max}"
104
+ step="${this.filterObject.step || 1}"
105
+ @change=${this.debouncedInputHandler}
106
+ ></tc-range-slider>
107
+ ${this.#label("max", "after")}
108
+ </div>
107
109
  `,
108
110
  );
109
111
  }
@@ -1,9 +1,6 @@
1
1
  import { LitElement, html, nothing } from "lit";
2
- import { styleEOX } from "../../style.eox.js";
3
2
  import { when } from "lit/directives/when.js";
4
3
  import _debounce from "lodash.debounce";
5
- import checkboxStyle from "@eox/elements-utils/styles/dist/checkbox.style.js";
6
- import radioStyle from "@eox/elements-utils/styles/dist/radio.style.js";
7
4
  import {
8
5
  resetSelectorMethod,
9
6
  toggleItemSelectorMethod,
@@ -175,31 +172,44 @@ export class EOxSelector extends LitElement {
175
172
  }
176
173
  }
177
174
 
175
+ /**
176
+ * Overrides the default createRenderRoot method to render in the light DOM.
177
+ *
178
+ * @returns {this} - The current instance to render in the light DOM.
179
+ */
180
+ createRenderRoot() {
181
+ return this;
182
+ }
183
+
178
184
  /**
179
185
  * Renders the HTML template for the component.
180
186
  */
181
187
  render() {
182
188
  const type = this.type.includes("multi") ? "checkbox" : "radio";
183
189
  const selectOverflowClass =
184
- this.filteredSuggestions.length > 5 ? "select-overflow" : nothing;
190
+ this.filteredSuggestions.length > 5 ? "select-overflow scroll" : nothing;
185
191
  return html`
186
192
  <style>
187
- ${!this.unstyled && styleEOX}
188
- ${!this.unstyled && checkboxStyle}
189
- ${!this.unstyled && radioStyle}
193
+ :host,
194
+ :root {
195
+ --select-filter-max-items: 5;
196
+ }
190
197
  </style>
191
198
  ${when(
192
199
  this.suggestions.length > 10,
193
200
  () =>
194
201
  html`<div class="autocomplete-container">
195
- <div class="autocomplete-container-wrapper">
202
+ <div
203
+ class="autocomplete-container-wrapper field small no-round"
204
+ style="margin-left: var(--list-padding)"
205
+ >
196
206
  <input
197
207
  autocomplete="off"
198
208
  tabindex=${this.tabIndex}
199
209
  class="autocomplete-input"
200
210
  type="text"
201
211
  .value=${this.query}
202
- placeholder="${this.filterObject.placeholder || ""}"
212
+ placeholder="${this.filterObject.placeholder || "Find..."}"
203
213
  @input=${this.#handleInput}
204
214
  @keydown=${this.#handleKeyDown}
205
215
  @blur=${() => (this.showSuggestions = false)}
@@ -209,14 +219,14 @@ export class EOxSelector extends LitElement {
209
219
  </div>`,
210
220
  )}
211
221
  <div class="select-container ${selectOverflowClass}">
212
- <ul class="${this.type}">
222
+ <ul class="${this.type} list no-space">
213
223
  ${this.filteredSuggestions.map(
214
224
  (suggestion) => html`
215
225
  <li
216
226
  data-identifier="${suggestion.toString().toLowerCase()}"
217
227
  data-title="${suggestion}"
218
228
  >
219
- <label>
229
+ <label class="${type} small max">
220
230
  <input
221
231
  type="${type}"
222
232
  name=${suggestion}
@@ -228,7 +238,7 @@ export class EOxSelector extends LitElement {
228
238
  }}
229
239
  tabindex=${this.tabIndex + 1}
230
240
  />
231
- <span class="title">${suggestion}</span>
241
+ <span class="title small-line">${suggestion}</span>
232
242
  </label>
233
243
  </li>
234
244
  `,
@@ -87,35 +87,37 @@ class EOxItemFilterSpatial extends LitElement {
87
87
  return when(
88
88
  this.filterObject,
89
89
  () => html`
90
- <form style="display: inline">
91
- ${map(
92
- ["intersects", "within"],
93
- (mode) => html`
94
- <label>
95
- <input
96
- tabindex=${this.tabIndex}
97
- type="radio"
98
- name="mode"
99
- .checked="${(this.filterObject.state.mode || "") === mode ||
100
- nothing}"
101
- value="${mode}"
102
- @click=${() => this.#handleClick(mode)}
103
- />
104
- <small>${mode} filter geometry</small>
105
- </label>
106
- `,
107
- )}
108
- </form>
109
- <eox-itemfilter-spatial-filter
110
- exportparts="map: spatial-filter-map"
111
- .geometry="${this.filterObject.state?.geometry}"
112
- @filter="${(e) => {
113
- this.filterObject.state.geometry = e.detail.geometry;
114
- this.filterObject.dirty = true;
115
- this.filterObject.stringifiedState = "Polygon";
116
- this.dispatchEvent(new CustomEvent("filter"));
117
- }}"
118
- ></eox-itemfilter-spatial>
90
+ <div style="margin-left: var(--list-padding)">
91
+ <nav class="vertical-margin small-margin wrap">
92
+ ${map(
93
+ ["intersects", "within"],
94
+ (mode) => html`
95
+ <label class="radio small small-text">
96
+ <input
97
+ tabindex=${this.tabIndex}
98
+ type="radio"
99
+ name="mode"
100
+ .checked="${(this.filterObject.state.mode || "") === mode ||
101
+ nothing}"
102
+ value="${mode}"
103
+ @click=${() => this.#handleClick(mode)}
104
+ />
105
+ <span>${mode} filter geometry</span>
106
+ </label>
107
+ `,
108
+ )}
109
+ </nav>
110
+ <eox-itemfilter-spatial-filter
111
+ exportparts="map: spatial-filter-map"
112
+ .geometry="${this.filterObject.state?.geometry}"
113
+ @filter="${(e) => {
114
+ this.filterObject.state.geometry = e.detail.geometry;
115
+ this.filterObject.dirty = true;
116
+ this.filterObject.stringifiedState = "Polygon";
117
+ this.dispatchEvent(new CustomEvent("filter"));
118
+ }}"
119
+ ></eox-itemfilter-spatial>
120
+ </div>
119
121
  `,
120
122
  );
121
123
  }
@@ -84,7 +84,10 @@ export class EOxItemFilterText extends LitElement {
84
84
  () => html`
85
85
  <style></style>
86
86
  <div class="text-container">
87
- <div class="text-container-wrapper">
87
+ <div
88
+ class="text-container-wrapper field small"
89
+ style="margin-left: var(--list-padding)"
90
+ >
88
91
  <input
89
92
  type="text"
90
93
  placeholder=${this.filterObject.placeholder}
@@ -99,7 +102,7 @@ export class EOxItemFilterText extends LitElement {
99
102
  />
100
103
  </div>
101
104
  </div>
102
- <small class="error-validation"
105
+ <small class="error-validation" style="margin-left: var(--list-padding)"
103
106
  >${this.filterObject.validation && this.isValid === false
104
107
  ? this.filterObject.validation.message
105
108
  : ""}</small
@@ -223,7 +223,7 @@ export class EOxItemFilterContainer extends LitElement {
223
223
  class="inline-container-wrapper"
224
224
  @click="${this.#handleToggleDropdown}"
225
225
  >
226
- <div class="inline-container" part="container">
226
+ <div class="inline-container square border" part="container">
227
227
  <div class="chip-container">
228
228
  <div class="chip-wrapper">
229
229
  <eox-itemfilter-chips
@@ -238,16 +238,34 @@ export class EOxItemFilterContainer extends LitElement {
238
238
  ${when(
239
239
  isFiltersDirty(this.filters),
240
240
  () => html`
241
- <span
242
- class="chip-close"
241
+ <button
242
+ class="chip-close circle transparent small no-margin"
243
243
  @click=${() =>
244
244
  this.dispatchEvent(new CustomEvent("reset"))}
245
- ></span>
245
+ >
246
+ ${this.unstyled
247
+ ? "x"
248
+ : html`
249
+ <i class="small">
250
+ <svg
251
+ xmlns="http://www.w3.org/2000/svg"
252
+ viewBox="0 0 24 24"
253
+ >
254
+ <title>close</title>
255
+ <path
256
+ d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"
257
+ />
258
+ </svg>
259
+ </i>
260
+ `}
261
+ </button>
246
262
  `,
247
263
  )}
248
264
  </div>
249
265
  <div
250
- class="input-container ${isFiltersDirty(this.filters)
266
+ class="input-container field no-margin ${isFiltersDirty(
267
+ this.filters,
268
+ )
251
269
  ? "dirty-filter-input"
252
270
  : ""}"
253
271
  >
@@ -264,7 +282,10 @@ export class EOxItemFilterContainer extends LitElement {
264
282
  />
265
283
  </div>
266
284
  </div>
267
- <div popover="manual">
285
+ <div
286
+ popover="manual"
287
+ class="square surface-container-lowest small-elevate"
288
+ >
268
289
  <div
269
290
  class="inline-content"
270
291
  slot="content"
@@ -136,30 +136,28 @@ export class EOxItemFilterResults extends LitElement {
136
136
  () => html`<small class="no-results">No matching items</small>`,
137
137
  () => nothing,
138
138
  )}
139
- <ul id="results" part="results">
140
- ${when(
141
- this.config.aggregateResults,
142
- () =>
143
- map(
144
- this.resultAggregation.filter(
145
- (aggregationProperty) =>
146
- this.aggregateResults(this.results, aggregationProperty)
147
- .length,
148
- ),
139
+ ${when(
140
+ this.config.aggregateResults,
141
+ () =>
142
+ map(
143
+ this.resultAggregation.filter(
149
144
  (aggregationProperty) =>
150
- html`${when(
151
- this.aggregateResults(this.results, aggregationProperty)
152
- .length === 1 && this.config.autoSpreadSingle,
153
- () =>
154
- html`<div style="margin-left: -8px">
155
- ${this.#createItemList(aggregationProperty)}
156
- </div>`,
157
- () => this.#createItemDetails(aggregationProperty),
158
- )}`,
145
+ this.aggregateResults(this.results, aggregationProperty)
146
+ .length,
159
147
  ),
160
- () => this.#createItemList(),
161
- )}
162
- </ul>
148
+ (aggregationProperty) =>
149
+ html`${when(
150
+ this.aggregateResults(this.results, aggregationProperty)
151
+ .length === 1 && this.config.autoSpreadSingle,
152
+ () =>
153
+ html`<div style="margin-left: -8px">
154
+ ${this.#createItemList(aggregationProperty)}
155
+ </div>`,
156
+ () => this.#createItemDetails(aggregationProperty),
157
+ )}`,
158
+ ),
159
+ () => this.#createItemList(),
160
+ )}
163
161
  </div>
164
162
  </section>
165
163
  `;
@@ -10,7 +10,7 @@ function getChipItems(filters) {
10
10
  return Object.keys(filters)
11
11
  .map((filter) => ({
12
12
  title: html`${filters[filter].title || filters[filter].key}:
13
- <strong>${filters[filter].stringifiedState}</strong>`,
13
+ ${filters[filter].stringifiedState}`,
14
14
  key: filter,
15
15
  }))
16
16
  .filter((item) => filters[item.key].dirty);
package/src/main.js CHANGED
@@ -4,7 +4,6 @@ import { when } from "lit/directives/when.js";
4
4
  import { style } from "./style";
5
5
  import { styleEOX } from "./style.eox";
6
6
 
7
- import allStyle from "@eox/elements-utils/styles/dist/all.style";
8
7
  import "./components/expand-container";
9
8
  import "./components/itemfilter-container";
10
9
  import "./components/filters/text";
@@ -257,7 +256,7 @@ export class EOxItemFilter extends LitElement {
257
256
  * @type String
258
257
  */
259
258
  this.resultActionIcon =
260
- '<svg style="width: 24px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><title>click me!</title><path fill="#004170" d="M11.5,11L17.88,16.37L17,16.55L16.36,16.67C15.73,16.8 15.37,17.5 15.65,18.07L15.92,18.65L17.28,21.59L15.86,22.25L14.5,19.32L14.24,18.74C13.97,18.15 13.22,17.97 12.72,18.38L12.21,18.78L11.5,19.35V11M10.76,8.69A0.76,0.76 0 0,0 10,9.45V20.9C10,21.32 10.34,21.66 10.76,21.66C10.95,21.66 11.11,21.6 11.24,21.5L13.15,19.95L14.81,23.57C14.94,23.84 15.21,24 15.5,24C15.61,24 15.72,24 15.83,23.92L18.59,22.64C18.97,22.46 19.15,22 18.95,21.63L17.28,18L19.69,17.55C19.85,17.5 20,17.43 20.12,17.29C20.39,16.97 20.35,16.5 20,16.21L11.26,8.86L11.25,8.87C11.12,8.76 10.95,8.69 10.76,8.69M15,10V8H20V10H15M13.83,4.76L16.66,1.93L18.07,3.34L15.24,6.17L13.83,4.76M10,0H12V5H10V0M3.93,14.66L6.76,11.83L8.17,13.24L5.34,16.07L3.93,14.66M3.93,3.34L5.34,1.93L8.17,4.76L6.76,6.17L3.93,3.34M7,10H2V8H7V10" /></svg>';
259
+ '<svg style="width: 24px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><title>click me!</title><path fill="currentColor" d="M11.5,11L17.88,16.37L17,16.55L16.36,16.67C15.73,16.8 15.37,17.5 15.65,18.07L15.92,18.65L17.28,21.59L15.86,22.25L14.5,19.32L14.24,18.74C13.97,18.15 13.22,17.97 12.72,18.38L12.21,18.78L11.5,19.35V11M10.76,8.69A0.76,0.76 0 0,0 10,9.45V20.9C10,21.32 10.34,21.66 10.76,21.66C10.95,21.66 11.11,21.6 11.24,21.5L13.15,19.95L14.81,23.57C14.94,23.84 15.21,24 15.5,24C15.61,24 15.72,24 15.83,23.92L18.59,22.64C18.97,22.46 19.15,22 18.95,21.63L17.28,18L19.69,17.55C19.85,17.5 20,17.43 20.12,17.29C20.39,16.97 20.35,16.5 20,16.21L11.26,8.86L11.25,8.87C11.12,8.76 10.95,8.69 10.76,8.69M15,10V8H20V10H15M13.83,4.76L16.66,1.93L18.07,3.34L15.24,6.17L13.83,4.76M10,0H12V5H10V0M3.93,14.66L6.76,11.83L8.17,13.24L5.34,16.07L3.93,14.66M3.93,3.34L5.34,1.93L8.17,4.76L6.76,6.17L3.93,3.34M7,10H2V8H7V10" /></svg>';
261
260
 
262
261
  /** Overrides elements current CSS.
263
262
  *
@@ -432,7 +431,6 @@ export class EOxItemFilter extends LitElement {
432
431
  <style>
433
432
  ${style}
434
433
  ${!this.unstyled && styleEOX}
435
- ${!this.unstyled && allStyle}
436
434
  ${this.styleOverride}
437
435
  </style>
438
436
  <form
@@ -443,70 +441,97 @@ export class EOxItemFilter extends LitElement {
443
441
  ${when(
444
442
  this.filterProperties,
445
443
  () => html`
446
- <eox-itemfilter-container
447
- .filters=${this.filters}
448
- .filterProperties=${this.filterProperties}
449
- .inlineMode=${this.inlineMode || false}
450
- @reset=${() => this.resetFilters()}
451
- @filter=${() => this.search()}
452
- >
453
- <section slot="section">
454
- ${when(
455
- !this.inlineMode,
456
- () => html`
457
- <slot name="filterstitle"
458
- ><h6 class="main-heading">Filters</h6></slot
459
- >
460
- `,
461
- )}
462
- <ul id="filters">
463
- ${map(
464
- Object.values(this.filters),
465
- (filterObject, index) =>
466
- html` <li>
467
- <eox-itemfilter-expandcontainer
468
- .filterObject=${filterObject}
469
- @details-toggled=${(e) =>
470
- toggleAccordion(e, this.#config, this)}
471
- data-details="${filterObject.key}"
472
- >
473
- ${this.#createReset(
474
- filterObject,
475
- getTabIndex(index, 1),
476
- )}
477
- ${this.#createFilter(
478
- filterObject,
479
- getTabIndex(index, 2),
480
- )}
481
- </eox-itemfilter-expandcontainer>
482
- </li>`,
444
+ <div style="display: var(--filter-display);">
445
+ <eox-itemfilter-container
446
+ .filters=${this.filters}
447
+ .filterProperties=${this.filterProperties}
448
+ .inlineMode=${this.inlineMode || false}
449
+ @reset=${() => this.resetFilters()}
450
+ @filter=${() => this.search()}
451
+ >
452
+ <section
453
+ slot="section"
454
+ style="height: 100%; overflow: hidden; display: flex; flex-direction: column;"
455
+ >
456
+ ${when(
457
+ !this.inlineMode,
458
+ () => html`
459
+ <nav class="title-nav">
460
+ <div class="max">
461
+ <slot name="filterstitle"
462
+ ><p><strong>Filters</strong></p></slot
463
+ >
464
+ </div>
465
+ ${when(
466
+ !this.inlineMode &&
467
+ this.#config.filterProperties &&
468
+ !this.inlineMode &&
469
+ this.#config.filterProperties &&
470
+ isFiltersDirty(this.filters),
471
+ () => html`
472
+ <button
473
+ type="button"
474
+ id="filter-reset"
475
+ class="reset-icon border small"
476
+ data-cy="filter-reset"
477
+ @click=${() => this.resetFilters()}
478
+ >
479
+ ${this.unstyled
480
+ ? nothing
481
+ : html`
482
+ <i class="small">
483
+ <svg
484
+ xmlns="http://www.w3.org/2000/svg"
485
+ viewBox="0 0 24 24"
486
+ >
487
+ <title>close</title>
488
+ <path
489
+ d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"
490
+ />
491
+ </svg>
492
+ </i>
493
+ `}
494
+ <span class="small-text">Reset all</span>
495
+ </button>
496
+ `,
497
+ )}
498
+ </nav>
499
+ `,
483
500
  )}
484
- </ul>
485
- ${when(
486
- !this.inlineMode &&
487
- this.#config.filterProperties &&
488
- !this.inlineMode &&
489
- this.#config.filterProperties &&
490
- isFiltersDirty(this.filters),
491
- () => html`
492
- <button
493
- type="button"
494
- id="filter-reset"
495
- class="outline small icon-text reset-icon"
496
- data-cy="filter-reset"
497
- @click=${() => this.resetFilters()}
498
- >
499
- Reset all
500
- </a>
501
- `,
502
- )}
503
- </section>
504
- </eox-itemfilter-container>
501
+ <div class="scroll" style="flex: 1;">
502
+ <ul id="filters" class="list no-space">
503
+ ${map(
504
+ Object.values(this.filters),
505
+ (filterObject, index) =>
506
+ html` <li class="no-padding">
507
+ <eox-itemfilter-expandcontainer
508
+ .filterObject=${filterObject}
509
+ @details-toggled=${(e) =>
510
+ toggleAccordion(e, this.#config, this)}
511
+ data-details="${filterObject.key}"
512
+ >
513
+ ${this.#createReset(
514
+ filterObject,
515
+ getTabIndex(index, 1),
516
+ )}
517
+ ${this.#createFilter(
518
+ filterObject,
519
+ getTabIndex(index, 2),
520
+ )}
521
+ </eox-itemfilter-expandcontainer>
522
+ </li>`,
523
+ )}
524
+ </ul>
525
+ </div>
526
+ </section>
527
+ </eox-itemfilter-container>
528
+ </div>
505
529
  `,
506
530
  )}
507
531
  ${when(
508
532
  this.#config?.showResults && this.results,
509
533
  () => html`
534
+ <div class="small-space"></div>
510
535
  <eox-itemfilter-results
511
536
  .config=${this.#config}
512
537
  .results=${this.results}
@@ -519,9 +544,11 @@ export class EOxItemFilter extends LitElement {
519
544
  @result=${this.updateResult}
520
545
  @click:result-action=${this.emitResultAction}
521
546
  >
522
- <slot name="resultstitle"
523
- ><h6 class="main-heading">Results</h6></slot
524
- >
547
+ <nav class="title-nav">
548
+ <slot name="resultstitle"
549
+ ><p><strong>Results</strong></p></slot
550
+ >
551
+ </nav>
525
552
  </eox-itemfilter-results>
526
553
  `,
527
554
  )}