@eox/itemfilter 1.5.0 → 1.6.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eox/itemfilter",
3
- "version": "1.5.0",
3
+ "version": "1.6.1",
4
4
  "type": "module",
5
5
  "devDependencies": {
6
6
  "@types/geojson": "^7946.0.14",
@@ -34,10 +34,11 @@
34
34
  "watch": "vite build --watch"
35
35
  },
36
36
  "dependencies": {
37
- "@eox/elements-utils": "^0.0.1",
37
+ "@eox/elements-utils": "^0.1.1",
38
38
  "@floating-ui/dom": "^1.6.8",
39
39
  "@turf/boolean-intersects": "^7.0.0",
40
40
  "@turf/boolean-within": "^7.0.0",
41
+ "dayjs": "^1.11.9",
41
42
  "fuse.js": "^7.0.0",
42
43
  "lit": "^3.2.0",
43
44
  "lodash.debounce": "^4.0.8",
@@ -30,6 +30,7 @@ export class EOxItemFilterResults extends LitElement {
30
30
  filters: { state: true, type: Object },
31
31
  resultAggregation: { attribute: false, type: Array },
32
32
  selectedResult: { state: true, type: Object },
33
+ resultType: { attribute: "result-type", type: String },
33
34
  };
34
35
  }
35
36
 
@@ -55,6 +56,11 @@ export class EOxItemFilterResults extends LitElement {
55
56
  * @type Object
56
57
  */
57
58
  this.selectedResult = null;
59
+
60
+ /**
61
+ * @type String("list"|"card")
62
+ */
63
+ this.resultType = "list";
58
64
  }
59
65
 
60
66
  /**
@@ -114,9 +120,7 @@ export class EOxItemFilterResults extends LitElement {
114
120
  render() {
115
121
  return html`
116
122
  <section id="section-results">
117
- <div>
118
- <h6 class="main-heading">Results</h6>
119
- </div>
123
+ <div slot="resultstitle"></div>
120
124
  <div id="container-results" class="scroll">
121
125
  ${when(
122
126
  this.results.length < 1,
@@ -65,6 +65,11 @@ export const ELEMENT_CONFIG = Object.freeze({
65
65
  */
66
66
  subTitleProperty: undefined,
67
67
 
68
+ /**
69
+ * The property of the result items used for an image
70
+ */
71
+ imageProperty: undefined,
72
+
68
73
  /**
69
74
  * Allow opening multiple filter accordions in parallel
70
75
  * @default true
@@ -96,6 +101,7 @@ export const ELEMENT_PROPERTIES = [
96
101
  "showResults",
97
102
  "titleProperty",
98
103
  "subTitleProperty",
104
+ "imageProperty",
99
105
  "idProperty",
100
106
  "expandMultipleFilters",
101
107
  "expandResults",
package/src/main.js CHANGED
@@ -56,6 +56,7 @@ export class EOxItemFilter extends LitElement {
56
56
  idProperty: { attribute: "id-property", type: String },
57
57
  titleProperty: { attribute: "title-property", type: String },
58
58
  subTitleProperty: { attribute: "sub-title-property", type: String },
59
+ imageProperty: { attribute: "image-property", type: String },
59
60
  expandMultipleFilters: {
60
61
  attribute: "enable-multiple-filter",
61
62
  type: Boolean,
@@ -66,6 +67,7 @@ export class EOxItemFilter extends LitElement {
66
67
  type: Boolean,
67
68
  },
68
69
  externalFilter: { attribute: false, type: Function },
70
+ resultType: { attribute: "result-type", type: String },
69
71
  unstyled: { type: Boolean },
70
72
  };
71
73
  }
@@ -198,6 +200,13 @@ export class EOxItemFilter extends LitElement {
198
200
  */
199
201
  this.subTitleProperty = undefined;
200
202
 
203
+ /**
204
+ * The property of the result items used for an image
205
+ *
206
+ * @type String
207
+ */
208
+ this.imageProperty = undefined;
209
+
201
210
  /**
202
211
  * Unique id property of items
203
212
  *
@@ -225,6 +234,13 @@ export class EOxItemFilter extends LitElement {
225
234
  */
226
235
  this.expandMultipleResults = true;
227
236
 
237
+ /**
238
+ * Rendering type for results (can be `list`or `cards`)
239
+ *
240
+ * @type String
241
+ */
242
+ this.resultType = "list";
243
+
228
244
  /**
229
245
  * Render the element without additional styles
230
246
  */
@@ -454,8 +470,13 @@ export class EOxItemFilter extends LitElement {
454
470
  .filters=${this.filters}
455
471
  .resultAggregation=${this.#resultAggregation}
456
472
  .selectedResult=${this.selectedResult}
473
+ .resultType=${this.resultType}
457
474
  @result=${this.updateResult}
458
- ></eox-itemfilter-results>
475
+ >
476
+ <slot name="resultstitle"
477
+ ><h6 class="main-heading">Results</h6></slot
478
+ >
479
+ </eox-itemfilter-results>
459
480
  `,
460
481
  )}
461
482
  </form>
@@ -2,6 +2,7 @@ import { html, nothing } from "lit";
2
2
  import { repeat } from "lit/directives/repeat.js";
3
3
  import { when } from "lit/directives/when.js";
4
4
  import { unsafeHTML } from "lit/directives/unsafe-html.js";
5
+ import { getValue } from "../../helpers";
5
6
 
6
7
  /**
7
8
  * Creates the item details view for the aggregation property in the EOxItemFilterResults component.
@@ -63,7 +64,7 @@ export function createItemListMethod(
63
64
  : nothing;
64
65
 
65
66
  return html`
66
- <ul>
67
+ <ul class=${EOxItemFilterResults.resultType}>
67
68
  ${repeat(
68
69
  items,
69
70
  (item) => item.id,
@@ -87,6 +88,14 @@ export function createItemListMethod(
87
88
  ${when(
88
89
  config.subTitleProperty,
89
90
  () => html`
91
+ ${getValue(config.imageProperty, item)
92
+ ? html`
93
+ <img
94
+ class="image"
95
+ src="${getValue(config.imageProperty, item)}"
96
+ />
97
+ `
98
+ : nothing}
90
99
  <div class="title-container">
91
100
  <span class="title"
92
101
  >${unsafeHTML(item[config.titleProperty])}</span
package/src/style.eox.js CHANGED
@@ -24,10 +24,22 @@ export const styleEOX = `
24
24
  --background-color: #fff;
25
25
  --padding: 0.5rem;
26
26
  --text-transform: capitalize;
27
+ --form-flex-direction: column;
28
+ --filter-display: block;
27
29
  }
28
30
  * {
29
31
  font-family: Roboto, sans-serif;
30
32
  }
33
+ form#itemfilter {
34
+ flex-direction: var(--form-flex-direction);
35
+ }
36
+ eox-itemfilter-container {
37
+ min-width: 200px;
38
+ display: var(--filter-display);
39
+ }
40
+ eox-itemfilter-results {
41
+ flex-grow: 1;
42
+ }
31
43
  ul {
32
44
  padding-left: 0;
33
45
  margin-top: 0;
@@ -38,6 +50,11 @@ li {
38
50
  li span {
39
51
  text-overflow: ellipsis;
40
52
  white-space: nowrap;
53
+ display: flex;
54
+ align-items: center;
55
+ }
56
+ .cards li span {
57
+ display: block;
41
58
  }
42
59
  li label {
43
60
  display: flex;
@@ -62,11 +79,35 @@ details > summary::-webkit-details-marker {
62
79
  align-items: center;
63
80
  text-transform: var(--text-transform);
64
81
  }
82
+ .cards .title {
83
+ font-size: 16px;
84
+ font-weight: 600;
85
+ text-wrap: auto;
86
+ line-height: 19px;
87
+ }
65
88
  .subtitle {
66
89
  font-size: 11px;
67
90
  opacity: .7;
68
91
  margin-top: 6px;
69
92
  }
93
+ .cards .subtitle {
94
+ font-size: 14px;
95
+ color: #757575;
96
+ text-wrap: auto;
97
+ line-height: 19px;
98
+ }
99
+ .image {
100
+ width: 24px;
101
+ height: 24px;
102
+ object-fit: cover;
103
+ overflow: hidden;
104
+ margin-right: 8px;
105
+ }
106
+ .cards .image {
107
+ width: 100%;
108
+ height: 190px;
109
+ margin-bottom: 8px;
110
+ }
70
111
  .title-container {
71
112
  display: flex;
72
113
  flex-direction: column;
@@ -89,8 +130,7 @@ details.details-results summary::before {
89
130
  width: 24px;
90
131
  }
91
132
  details.details-filter summary::after {
92
- position: absolute;
93
- right: 8px;
133
+ margin-left: auto;
94
134
  transform: rotate(90deg);
95
135
  }
96
136
  details[open] summary::before {
@@ -148,6 +188,29 @@ ul:not(#filters) > li {
148
188
  ul#results li {
149
189
  padding: 5px var(--padding);
150
190
  }
191
+ ul#results ul.cards {
192
+ display: flex;
193
+ flex-wrap: wrap;
194
+ width: 100%;
195
+ gap: 40px;
196
+ margin: 20px 0;
197
+ cursor: initial;
198
+ }
199
+ ul#results ul.cards li {
200
+ flex-basis: calc(33.3% - 77px);
201
+ min-width: 0;
202
+ align-self: flex-start;
203
+ }
204
+ @media screen and (max-width: 768px) {
205
+ ul#results ul.cards li {
206
+ flex-basis: calc(50% - 70px);
207
+ }
208
+ }
209
+ @media screen and (max-width: 480px) {
210
+ ul#results ul.cards li {
211
+ flex-basis: 100%;
212
+ }
213
+ }
151
214
  section {
152
215
  position: relative;
153
216
  background-color: var(--background-color);
@@ -33,6 +33,10 @@ export class EOxItemFilterResults extends LitElement {
33
33
  state: boolean;
34
34
  type: ObjectConstructor;
35
35
  };
36
+ resultType: {
37
+ attribute: string;
38
+ type: StringConstructor;
39
+ };
36
40
  };
37
41
  /**
38
42
  * @type Object
@@ -50,6 +54,10 @@ export class EOxItemFilterResults extends LitElement {
50
54
  * @type Object
51
55
  */
52
56
  selectedResult: any;
57
+ /**
58
+ * @type String("list"|"card")
59
+ */
60
+ resultType: string;
53
61
  /**
54
62
  * Aggregates results based on the specified property.
55
63
  *
@@ -1 +1 @@
1
- {"version":3,"file":"results.d.ts","sourceRoot":"","sources":["../../src/components/results.js"],"names":[],"mappings":"AAUA;;;;;;;;;;;;GAYG;AACH;IAEE;;;;;;;;;;;;;;;;;;;;;MAQC;IAKC;;OAEG;IACH,YAAkB;IAElB;;OAEG;IACH,aAAiB;IAEjB;;OAEG;IACH,yBAA2B;IAE3B;;OAEG;IACH,oBAA0B;IAyB5B;;;;;;OAMG;IACH,yCAHW,MAAM,SAKhB;IAED;;;;OAIG;IACH,oBAFa,IAAI,CAIhB;IAED;;;;OAIG;IACH,uBAFW,KAAK,QAIf;IAED;;OAEG;IACH,+CAuCC;;CACF;2BAzJyC,KAAK"}
1
+ {"version":3,"file":"results.d.ts","sourceRoot":"","sources":["../../src/components/results.js"],"names":[],"mappings":"AAUA;;;;;;;;;;;;GAYG;AACH;IAEE;;;;;;;;;;;;;;;;;;;;;;;;;MASC;IAKC;;OAEG;IACH,YAAkB;IAElB;;OAEG;IACH,aAAiB;IAEjB;;OAEG;IACH,yBAA2B;IAE3B;;OAEG;IACH,oBAA0B;IAE1B;;OAEG;IACH,mBAAwB;IAyB1B;;;;;;OAMG;IACH,yCAHW,MAAM,SAKhB;IAED;;;;OAIG;IACH,oBAFa,IAAI,CAIhB;IAED;;;;OAIG;IACH,uBAFW,KAAK,QAIf;IAED;;OAEG;IACH,+CAqCC;;CACF;2BA7JyC,KAAK"}
@@ -53,6 +53,10 @@ export const ELEMENT_CONFIG: Readonly<{
53
53
  * The property of the result items used for a subtitle
54
54
  */
55
55
  subTitleProperty: any;
56
+ /**
57
+ * The property of the result items used for an image
58
+ */
59
+ imageProperty: any;
56
60
  /**
57
61
  * Allow opening multiple filter accordions in parallel
58
62
  * @default true
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/enums/config.js"],"names":[],"mappings":"AAAA;IACE;;OAEG;;IAGH;;;OAGG;;IAGH;;OAEG;;IAGH;;;;;OAKG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;;OAGG;;IAGH;;;OAGG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;;OAGG;;IAGH;;;OAGG;;IAGH;;;OAGG;;GAEF;AAEH,0CAiBE"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/enums/config.js"],"names":[],"mappings":"AAAA;IACE;;OAEG;;IAGH;;;OAGG;;IAGH;;OAEG;;IAGH;;;;;OAKG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;;OAGG;;IAGH;;;OAGG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;;OAGG;;IAGH;;;OAGG;;IAGH;;;OAGG;;GAEF;AAEH,0CAkBE"}
package/types/main.d.ts CHANGED
@@ -70,6 +70,10 @@ export class EOxItemFilter extends LitElement {
70
70
  attribute: string;
71
71
  type: StringConstructor;
72
72
  };
73
+ imageProperty: {
74
+ attribute: string;
75
+ type: StringConstructor;
76
+ };
73
77
  expandMultipleFilters: {
74
78
  attribute: string;
75
79
  type: BooleanConstructor;
@@ -86,6 +90,10 @@ export class EOxItemFilter extends LitElement {
86
90
  attribute: boolean;
87
91
  type: FunctionConstructor;
88
92
  };
93
+ resultType: {
94
+ attribute: string;
95
+ type: StringConstructor;
96
+ };
89
97
  unstyled: {
90
98
  type: BooleanConstructor;
91
99
  };
@@ -190,6 +198,12 @@ export class EOxItemFilter extends LitElement {
190
198
  * @type String
191
199
  */
192
200
  subTitleProperty: string;
201
+ /**
202
+ * The property of the result items used for an image
203
+ *
204
+ * @type String
205
+ */
206
+ imageProperty: string;
193
207
  /**
194
208
  * Unique id property of items
195
209
  *
@@ -214,6 +228,12 @@ export class EOxItemFilter extends LitElement {
214
228
  * @type Boolean
215
229
  */
216
230
  expandMultipleResults: boolean;
231
+ /**
232
+ * Rendering type for results (can be `list`or `cards`)
233
+ *
234
+ * @type String
235
+ */
236
+ resultType: string;
217
237
  /**
218
238
  * Render the element without additional styles
219
239
  */
@@ -1 +1 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.js"],"names":[],"mappings":"AA+BA;;;;;;;GAOG;AACH;IAEE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA6BC;IAoBC;;OAEG;IACH,OAFS,UAAa,CAEL;IAEjB;;;OAGG;IACH,aAAiB;IAEjB;;;OAGG;IACH,SAFS,UAAa,CAEL;IAEjB;;;OAGG;IACH,oBAA0B;IAE1B;;;OAGG;IACH,eAEE;IAEF;;;;OAIG;IACH,yBAAiC;IAEjC;;;;;OAKG;IACH,0BAA6B;IAE7B;;;;OAIG;IACH,4BAA+B;IAE/B;;;;;OAKG;IACH,yBAA0B;IAE1B;;;OAGG;IACH,kBAFS,MAAM;QAAC,GAAG,CAAC,SAAS;QAAC,IAAI,CAAC,EAAE,aAAa,CAAC;QAAC,KAAK,SAAS;QAAC,IAAI,SAAS;QAAC,WAAW,CAAC,SAAS;QAAC,MAAM,CAAC,SAAS;QAAC,KAAK,CAAC,MAAQ;KAAC,CAAC,CAE9G;IAE1B;;;;OAIG;IACH,gBAAoB;IAEpB;;;;;OAKG;IACH,oBAAuB;IAEvB;;;;OAIG;IACH,2BAA6B;IAE7B;;;;OAIG;IACH,qBAAuB;IAEvB;;;;OAIG;IACH,sBAA4B;IAE5B;;;;OAIG;IACH,yBAAiC;IAEjC;;;;OAIG;IACH,mBAAsB;IAEtB;;;;OAIG;IACH,+BAAiC;IAEjC;;;;OAIG;IACH,uBAAyB;IACzB;;;;OAIG;IACH,+BAAiC;IAEjC;;OAEG;IACH,kBAAqB;IAGvB;;OAEG;IACH,cAOC;IAED;;;OAGG;IACH,+BAkBC;IAED;;;;;OAKG;IACH,mBAHW,MAAM,MAAM,CAAC,GACX,MAAM,MAAM,CAAC,CAIzB;IA0BD;;OAEG;IACH,qBAEC;IAED;;;;;OAKG;IACH,sDAcC;IAED;;;;;OAKG;IACH,gDAOC;IAED;;;;OAIG;IACH,kBAFW;QAAC,MAAM,MAAQ;KAAC,QAe1B;IAED;;OAEG;IACH,+CA4FC;;CACF;2BA/cyC,KAAK"}
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.js"],"names":[],"mappings":"AA+BA;;;;;;;GAOG;AACH;IAEE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA+BC;IAoBC;;OAEG;IACH,OAFS,UAAa,CAEL;IAEjB;;;OAGG;IACH,aAAiB;IAEjB;;;OAGG;IACH,SAFS,UAAa,CAEL;IAEjB;;;OAGG;IACH,oBAA0B;IAE1B;;;OAGG;IACH,eAEE;IAEF;;;;OAIG;IACH,yBAAiC;IAEjC;;;;;OAKG;IACH,0BAA6B;IAE7B;;;;OAIG;IACH,4BAA+B;IAE/B;;;;;OAKG;IACH,yBAA0B;IAE1B;;;OAGG;IACH,kBAFS,MAAM;QAAC,GAAG,CAAC,SAAS;QAAC,IAAI,CAAC,EAAE,aAAa,CAAC;QAAC,KAAK,SAAS;QAAC,IAAI,SAAS;QAAC,WAAW,CAAC,SAAS;QAAC,MAAM,CAAC,SAAS;QAAC,KAAK,CAAC,MAAQ;KAAC,CAAC,CAE9G;IAE1B;;;;OAIG;IACH,gBAAoB;IAEpB;;;;;OAKG;IACH,oBAAuB;IAEvB;;;;OAIG;IACH,2BAA6B;IAE7B;;;;OAIG;IACH,qBAAuB;IAEvB;;;;OAIG;IACH,sBAA4B;IAE5B;;;;OAIG;IACH,yBAAiC;IAEjC;;;;OAIG;IACH,sBAA8B;IAE9B;;;;OAIG;IACH,mBAAsB;IAEtB;;;;OAIG;IACH,+BAAiC;IAEjC;;;;OAIG;IACH,uBAAyB;IACzB;;;;OAIG;IACH,+BAAiC;IAEjC;;;;OAIG;IACH,mBAAwB;IAExB;;OAEG;IACH,kBAAqB;IAGvB;;OAEG;IACH,cAOC;IAED;;;OAGG;IACH,+BAkBC;IAED;;;;;OAKG;IACH,mBAHW,MAAM,MAAM,CAAC,GACX,MAAM,MAAM,CAAC,CAIzB;IA0BD;;OAEG;IACH,qBAEC;IAED;;;;;OAKG;IACH,sDAcC;IAED;;;;;OAKG;IACH,gDAOC;IAED;;;;OAIG;IACH,kBAFW;QAAC,MAAM,MAAQ;KAAC,QAe1B;IAED;;OAEG;IACH,+CAiGC;;CACF;2BApeyC,KAAK"}
@@ -1 +1 @@
1
- {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/methods/results/create.js"],"names":[],"mappings":"AAKA;;;;;;GAMG;AACH,6DAJW,MAAM,6CA8BhB;AAED;;;;;;GAMG;AACH,0DAJW,MAAM,6CAmEhB"}
1
+ {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/methods/results/create.js"],"names":[],"mappings":"AAMA;;;;;;GAMG;AACH,6DAJW,MAAM,6CA8BhB;AAED;;;;;;GAMG;AACH,0DAJW,MAAM,6CA2EhB"}
@@ -1,2 +1,2 @@
1
- export const styleEOX: "\n:host, :root {\n --item-color: color-mix(\n in srgb,\n var(--primary-color) 10%,\n transparent\n );\n --item-hover-color: color-mix(\n in srgb,\n var(--secondary-color) 30%,\n transparent\n );\n --item-select-color: var(--primary-color);\n --inline-bg-color: color-mix(\n in srgb,\n var(--secondary-color) 10%,\n transparent\n );\n --border-color: color-mix(\n in srgb,\n #000000 20%,\n transparent\n );\n --background-color: #fff;\n --padding: 0.5rem;\n --text-transform: capitalize;\n}\n* {\n font-family: Roboto, sans-serif;\n}\nul {\n padding-left: 0;\n margin-top: 0;\n}\nli {\n list-style: none;\n}\nli span {\n text-overflow: ellipsis;\n white-space: nowrap;\n}\nli label {\n display: flex;\n align-items: center;\n}\ndetails summary > * {\n display: inline;\n}\ndetails summary {\n display: flex;\n align-items: center;\n border-bottom: 1px solid #0002;\n padding: .5rem var(--padding);\n}\n\ndetails > summary::-webkit-details-marker {\n display: none;\n}\n\n.title {\n font-size: 13px;\n align-items: center;\n text-transform: var(--text-transform);\n}\n.subtitle {\n font-size: 11px;\n opacity: .7;\n margin-top: 6px;\n}\n.title-container {\n display: flex;\n flex-direction: column;\n}\nh6.main-heading {\n font-size: 1rem;\n margin-block-start: 1.33em;\n margin-block-end: 1.33em;\n margin-top: var(--padding);\n padding: 0 var(--padding);\n}\ndetails summary .title {\n display: flex;\n font-weight: 500;\n}\ndetails.details-filter summary::after,\ndetails.details-results summary::before {\n content: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%230009' viewBox='0 0 24 24'%3E%3Ctitle%3Echevron-right%3C/title%3E%3Cpath d='M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z' /%3E%3C/svg%3E\");\n height: 24px;\n width: 24px;\n}\ndetails.details-filter summary::after {\n position: absolute;\n right: 8px;\n transform: rotate(90deg);\n}\ndetails[open] summary::before {\n transform: rotate(90deg);\n}\ndetails[open] summary::after {\n transform: rotate(270deg);\n}\neox-itemfilter-expandcontainer {\n max-height: 200px;\n}\neox-itemfilter-expandcontainer > [data-type=filter] {\n display: block;\n height: calc(100% - 32px);\n overflow-y: auto;\n overflow-x: hidden;\n padding: 0 var(--padding);\n}\n[data-type=filter] .title,\ndetails summary {\n text-transform: var(--text-transform);\n}\nli,\nlabel,\ndetails,\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n cursor: pointer;\n}\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n margin: 0;\n}\ninput[type=\"text\"] {\n box-sizing: border-box;\n width: 100%;\n margin-top: 0.5rem;\n margin-bottom: 0.5rem;\n padding: 5px 7px;\n border-radius: 4px;\n border: 1px solid var(--border-color);\n}\nsection:not(section:last-of-type) {\n margin-bottom: 1rem;\n}\n#section-results {\n overflow: hidden;\n flex: 1;\n display: flex;\n flex-direction: column;\n}\nul:not(#filters) > li {\n padding: 5px 0;\n}\nul#results li {\n padding: 5px var(--padding);\n}\nsection {\n position: relative;\n background-color: var(--background-color);\n}\nbutton#filter-reset {\n position: absolute;\n top: 0;\n right: var(--padding);\n padding: 2px 10px;\n}\n.count {\n display: flex;\n justify-content: center;\n align-items: center;\n background: var(--secondary-color);\n padding: 0 12px;\n height: 20px;\n border-radius: 10px;\n color: var(--primary-color);\n font-weight: 500;\n margin-left: 9px;\n}\neox-itemfilter-range,\ntc-range-slider {\n align-items: center;\n display: block;\n}\ntc-range-slider {\n width: calc(100% - 16px);\n margin-left: 8px;\n margin-right: 8px;\n --width: 100%;\n}\n.range-before,\n.range-after {\n font-size: small;\n}\n.range-before,\n.range-after {\n margin: 1rem 0px;\n}\n\nbutton.reset-icon:before {\n content: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Eclose%3C/title%3E%3Cpath 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' /%3E%3C/svg%3E\");\n}\neox-itemfilter-expandcontainer button.reset-icon {\n margin-left: 4px;\n margin-top: -5px;\n height: 14px;\n width: 14px;\n}\neox-itemfilter-expandcontainer button.reset-icon:before {\n height: 14px;\n width: 14px;\n}\n.inline-content {\n border: 1.5px solid var(--secondary-color);\n border-radius: 4px;\n max-height: 300px;\n overflow-y: auto;\n background: var(--inline-bg-color);\n margin-top: 4px;\n padding: 8px;\n}\n.inline-container {\n position: relative;\n align-items: center;\n}\n.inline-container-wrapper {\n width: 100%;\n position: relative;\n}\n.inline-container {\n position: relative;\n border: 1px solid var(--border-color);\n border-radius: 4px;\n height: 24px;\n padding: 8px;\n flex: 1;\n justify-content: space-between;\n cursor: text;\n transition: all 0.2s ease-in-out;\n display: flex;\n}\n.inline-container:hover {\n border: 1px solid var(--primary-color);\n}\n[popover] {\n position: fixed;\n top: 0;\n left: 0;\n margin: 0;\n padding: 0;\n background-color: var(--background-color);\n border: none;\n}\n.input-container {\n display: flex;\n flex: 1;\n align-items: center;\n}\n.input-container input,\n.input-container input:focus {\n height: 100%;\n border: none;\n outline: none;\n border: 0;\n min-width: 25%;\n}\n.button-container {\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n right: 1px;\n top: 5px;\n height: calc(100% - 10px);\n width: 34px;\n background: white;\n}\nbutton.icon {\n color: #004170;\n height: 24px;\n font-size: large;\n width: unset;\n}\n.inline-container::-webkit-scrollbar {\n height: 2px;\n}\n.inline-container::-webkit-scrollbar-thumb {\n background: lightgrey;\n border-radius: 2px;\n}\n.hidden {\n height: 0;\n padding: 0;\n border: none;\n}\n.hidden:hover {\n border: none;\n}\n.chip-title {\n pointer-events: none;\n text-transform: var(--text-transform);\n}\n.chip {\n display: flex;\n align-items: center;\n background: var(--item-color);\n border-radius: 30px;\n margin-right: 4px;\n padding: 5px 10px;\n font-size: small;\n cursor: default;\n white-space: nowrap;\n}\n.chip.highlighted {\n background: var(--primary-color);\n color: white;\n}\n.chip-close {\n cursor: pointer;\n font-weight: 600;\n position: absolute;\n right: -25px;\n background: white;\n top: 0;\n height: 100%;\n display: flex;\n align-items: center;\n height: 24px;\n width: 24px;\n}\n.chip-close:before {\n position: absolute;\n text-indent: 0;\n line-height: initial;\n height: 24px;\n width: 24px;\n content: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Eclose%3C/title%3E%3Cpath 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' /%3E%3C/svg%3E\");\n}\n.chip-container {\n position: relative;\n max-width: 75%;\n}\n.autocomplete-container,\n.text-container {\n position: relative;\n align-items: center;\n width: 100%;\n box-sizing: border-box;\n justify-content: space-between;\n cursor: text;\n margin-top: 0.5rem;\n margin-bottom: 0.5rem;\n background: white;\n}\n.autocomplete-container-wrapper,\n.text-container-wrapper {\n position: relative;\n display: flex;\n align-items: center;\n flex: 1;\n overflow-x: auto;\n -ms-overflow-style: none;\n scrollbar-width: none;\n}\n.autocomplete-container-wrapper::-webkit-scrollbar {\n display: none;\n}\n.chip-wrapper {\n -ms-overflow-style: none;\n scrollbar-width: none;\n}\n.chip-wrapper::-webkit-scrollbar {\n display: none;\n width: 0;\n background: transparent;\n}\n.autocomplete-input,\n.text-input {\n flex: 1;\n border: 1px solid var(--border-color);\n outline: none;\n box-sizing: border-box;\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n min-width: 150px;\n}\ninput[type=\"text\"].text-input,\ninput[type=\"text\"].autocomplete-input {\n padding: 9px 6px !important;\n border-radius: 4px;\n}\n.text-input:hover,\n.autocomplete-input:hover {\n border: 1px solid var(--primary-color);\n}\n.text-input:invalid {\n border: 1px solid red;\n}\n.selected-items {\n display: flex;\n flex-wrap: nowrap;\n gap: 4px;\n}\n.select li:hover,\n.multiselect li:hover,\neox-itemfilter-results li:hover {\n background: var(--item-hover-color);\n}\neox-itemfilter-results li.highlighted {\n color: var(--background-color);\n background: var(--item-select-color);\n}\n.selected-item span {\n margin-right: 8px;\n}\n.selected-item button {\n background: none;\n border: none;\n color: #fff;\n cursor: pointer;\n font-size: 16px;\n line-height: 1;\n}\n.multiselect-container,\n.select-container {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n.multiselect-container label,\n.select-container label {\n display: flex;\n align-items: center;\n cursor: pointer;\n}\n.multiselect-container input,\n.select-container input {\n margin-right: 8px;\n}\n.select-overflow {\n max-height: 185px;\n overflow-y: auto;\n}\n.chip-title strong {\n font-weight: 500;\n}\n.chip-wrapper {\n max-width: 100%;\n overflow-x: scroll;\n}\n.chip-container {\n display: flex;\n flex: 0;\n}\n.input-container.dirty-filter-input {\n margin-left: 25px;\n}\n.error-validation {\n position: relative;\n color: red;\n font-size: x-small;\n top: -8px;\n}\n";
1
+ export const styleEOX: "\n:host, :root {\n --item-color: color-mix(\n in srgb,\n var(--primary-color) 10%,\n transparent\n );\n --item-hover-color: color-mix(\n in srgb,\n var(--secondary-color) 30%,\n transparent\n );\n --item-select-color: var(--primary-color);\n --inline-bg-color: color-mix(\n in srgb,\n var(--secondary-color) 10%,\n transparent\n );\n --border-color: color-mix(\n in srgb,\n #000000 20%,\n transparent\n );\n --background-color: #fff;\n --padding: 0.5rem;\n --text-transform: capitalize;\n --form-flex-direction: column;\n --filter-display: block;\n}\n* {\n font-family: Roboto, sans-serif;\n}\nform#itemfilter {\n flex-direction: var(--form-flex-direction);\n}\neox-itemfilter-container {\n min-width: 200px;\n display: var(--filter-display);\n}\neox-itemfilter-results {\n flex-grow: 1;\n}\nul {\n padding-left: 0;\n margin-top: 0;\n}\nli {\n list-style: none;\n}\nli span {\n text-overflow: ellipsis;\n white-space: nowrap;\n display: flex;\n align-items: center;\n}\n.cards li span {\n display: block;\n}\nli label {\n display: flex;\n align-items: center;\n}\ndetails summary > * {\n display: inline;\n}\ndetails summary {\n display: flex;\n align-items: center;\n border-bottom: 1px solid #0002;\n padding: .5rem var(--padding);\n}\n\ndetails > summary::-webkit-details-marker {\n display: none;\n}\n\n.title {\n font-size: 13px;\n align-items: center;\n text-transform: var(--text-transform);\n}\n.cards .title {\n font-size: 16px;\n font-weight: 600;\n text-wrap: auto;\n line-height: 19px;\n}\n.subtitle {\n font-size: 11px;\n opacity: .7;\n margin-top: 6px;\n}\n.cards .subtitle {\n font-size: 14px;\n color: #757575;\n text-wrap: auto;\n line-height: 19px;\n}\n.image {\n width: 24px;\n height: 24px;\n object-fit: cover;\n overflow: hidden;\n margin-right: 8px;\n}\n.cards .image {\n width: 100%;\n height: 190px;\n margin-bottom: 8px;\n}\n.title-container {\n display: flex;\n flex-direction: column;\n}\nh6.main-heading {\n font-size: 1rem;\n margin-block-start: 1.33em;\n margin-block-end: 1.33em;\n margin-top: var(--padding);\n padding: 0 var(--padding);\n}\ndetails summary .title {\n display: flex;\n font-weight: 500;\n}\ndetails.details-filter summary::after,\ndetails.details-results summary::before {\n content: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%230009' viewBox='0 0 24 24'%3E%3Ctitle%3Echevron-right%3C/title%3E%3Cpath d='M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z' /%3E%3C/svg%3E\");\n height: 24px;\n width: 24px;\n}\ndetails.details-filter summary::after {\n margin-left: auto;\n transform: rotate(90deg);\n}\ndetails[open] summary::before {\n transform: rotate(90deg);\n}\ndetails[open] summary::after {\n transform: rotate(270deg);\n}\neox-itemfilter-expandcontainer {\n max-height: 200px;\n}\neox-itemfilter-expandcontainer > [data-type=filter] {\n display: block;\n height: calc(100% - 32px);\n overflow-y: auto;\n overflow-x: hidden;\n padding: 0 var(--padding);\n}\n[data-type=filter] .title,\ndetails summary {\n text-transform: var(--text-transform);\n}\nli,\nlabel,\ndetails,\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n cursor: pointer;\n}\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n margin: 0;\n}\ninput[type=\"text\"] {\n box-sizing: border-box;\n width: 100%;\n margin-top: 0.5rem;\n margin-bottom: 0.5rem;\n padding: 5px 7px;\n border-radius: 4px;\n border: 1px solid var(--border-color);\n}\nsection:not(section:last-of-type) {\n margin-bottom: 1rem;\n}\n#section-results {\n overflow: hidden;\n flex: 1;\n display: flex;\n flex-direction: column;\n}\nul:not(#filters) > li {\n padding: 5px 0;\n}\nul#results li {\n padding: 5px var(--padding);\n}\nul#results ul.cards {\n display: flex;\n flex-wrap: wrap;\n width: 100%;\n gap: 40px;\n margin: 20px 0;\n cursor: initial;\n}\nul#results ul.cards li {\n flex-basis: calc(33.3% - 77px);\n min-width: 0;\n align-self: flex-start;\n}\n@media screen and (max-width: 768px) {\n ul#results ul.cards li {\n flex-basis: calc(50% - 70px);\n }\n}\n@media screen and (max-width: 480px) {\n ul#results ul.cards li {\n flex-basis: 100%;\n }\n}\nsection {\n position: relative;\n background-color: var(--background-color);\n}\nbutton#filter-reset {\n position: absolute;\n top: 0;\n right: var(--padding);\n padding: 2px 10px;\n}\n.count {\n display: flex;\n justify-content: center;\n align-items: center;\n background: var(--secondary-color);\n padding: 0 12px;\n height: 20px;\n border-radius: 10px;\n color: var(--primary-color);\n font-weight: 500;\n margin-left: 9px;\n}\neox-itemfilter-range,\ntc-range-slider {\n align-items: center;\n display: block;\n}\ntc-range-slider {\n width: calc(100% - 16px);\n margin-left: 8px;\n margin-right: 8px;\n --width: 100%;\n}\n.range-before,\n.range-after {\n font-size: small;\n}\n.range-before,\n.range-after {\n margin: 1rem 0px;\n}\n\nbutton.reset-icon:before {\n content: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Eclose%3C/title%3E%3Cpath 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' /%3E%3C/svg%3E\");\n}\neox-itemfilter-expandcontainer button.reset-icon {\n margin-left: 4px;\n margin-top: -5px;\n height: 14px;\n width: 14px;\n}\neox-itemfilter-expandcontainer button.reset-icon:before {\n height: 14px;\n width: 14px;\n}\n.inline-content {\n border: 1.5px solid var(--secondary-color);\n border-radius: 4px;\n max-height: 300px;\n overflow-y: auto;\n background: var(--inline-bg-color);\n margin-top: 4px;\n padding: 8px;\n}\n.inline-container {\n position: relative;\n align-items: center;\n}\n.inline-container-wrapper {\n width: 100%;\n position: relative;\n}\n.inline-container {\n position: relative;\n border: 1px solid var(--border-color);\n border-radius: 4px;\n height: 24px;\n padding: 8px;\n flex: 1;\n justify-content: space-between;\n cursor: text;\n transition: all 0.2s ease-in-out;\n display: flex;\n}\n.inline-container:hover {\n border: 1px solid var(--primary-color);\n}\n[popover] {\n position: fixed;\n top: 0;\n left: 0;\n margin: 0;\n padding: 0;\n background-color: var(--background-color);\n border: none;\n}\n.input-container {\n display: flex;\n flex: 1;\n align-items: center;\n}\n.input-container input,\n.input-container input:focus {\n height: 100%;\n border: none;\n outline: none;\n border: 0;\n min-width: 25%;\n}\n.button-container {\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n right: 1px;\n top: 5px;\n height: calc(100% - 10px);\n width: 34px;\n background: white;\n}\nbutton.icon {\n color: #004170;\n height: 24px;\n font-size: large;\n width: unset;\n}\n.inline-container::-webkit-scrollbar {\n height: 2px;\n}\n.inline-container::-webkit-scrollbar-thumb {\n background: lightgrey;\n border-radius: 2px;\n}\n.hidden {\n height: 0;\n padding: 0;\n border: none;\n}\n.hidden:hover {\n border: none;\n}\n.chip-title {\n pointer-events: none;\n text-transform: var(--text-transform);\n}\n.chip {\n display: flex;\n align-items: center;\n background: var(--item-color);\n border-radius: 30px;\n margin-right: 4px;\n padding: 5px 10px;\n font-size: small;\n cursor: default;\n white-space: nowrap;\n}\n.chip.highlighted {\n background: var(--primary-color);\n color: white;\n}\n.chip-close {\n cursor: pointer;\n font-weight: 600;\n position: absolute;\n right: -25px;\n background: white;\n top: 0;\n height: 100%;\n display: flex;\n align-items: center;\n height: 24px;\n width: 24px;\n}\n.chip-close:before {\n position: absolute;\n text-indent: 0;\n line-height: initial;\n height: 24px;\n width: 24px;\n content: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Eclose%3C/title%3E%3Cpath 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' /%3E%3C/svg%3E\");\n}\n.chip-container {\n position: relative;\n max-width: 75%;\n}\n.autocomplete-container,\n.text-container {\n position: relative;\n align-items: center;\n width: 100%;\n box-sizing: border-box;\n justify-content: space-between;\n cursor: text;\n margin-top: 0.5rem;\n margin-bottom: 0.5rem;\n background: white;\n}\n.autocomplete-container-wrapper,\n.text-container-wrapper {\n position: relative;\n display: flex;\n align-items: center;\n flex: 1;\n overflow-x: auto;\n -ms-overflow-style: none;\n scrollbar-width: none;\n}\n.autocomplete-container-wrapper::-webkit-scrollbar {\n display: none;\n}\n.chip-wrapper {\n -ms-overflow-style: none;\n scrollbar-width: none;\n}\n.chip-wrapper::-webkit-scrollbar {\n display: none;\n width: 0;\n background: transparent;\n}\n.autocomplete-input,\n.text-input {\n flex: 1;\n border: 1px solid var(--border-color);\n outline: none;\n box-sizing: border-box;\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n min-width: 150px;\n}\ninput[type=\"text\"].text-input,\ninput[type=\"text\"].autocomplete-input {\n padding: 9px 6px !important;\n border-radius: 4px;\n}\n.text-input:hover,\n.autocomplete-input:hover {\n border: 1px solid var(--primary-color);\n}\n.text-input:invalid {\n border: 1px solid red;\n}\n.selected-items {\n display: flex;\n flex-wrap: nowrap;\n gap: 4px;\n}\n.select li:hover,\n.multiselect li:hover,\neox-itemfilter-results li:hover {\n background: var(--item-hover-color);\n}\neox-itemfilter-results li.highlighted {\n color: var(--background-color);\n background: var(--item-select-color);\n}\n.selected-item span {\n margin-right: 8px;\n}\n.selected-item button {\n background: none;\n border: none;\n color: #fff;\n cursor: pointer;\n font-size: 16px;\n line-height: 1;\n}\n.multiselect-container,\n.select-container {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n.multiselect-container label,\n.select-container label {\n display: flex;\n align-items: center;\n cursor: pointer;\n}\n.multiselect-container input,\n.select-container input {\n margin-right: 8px;\n}\n.select-overflow {\n max-height: 185px;\n overflow-y: auto;\n}\n.chip-title strong {\n font-weight: 500;\n}\n.chip-wrapper {\n max-width: 100%;\n overflow-x: scroll;\n}\n.chip-container {\n display: flex;\n flex: 0;\n}\n.input-container.dirty-filter-input {\n margin-left: 25px;\n}\n.error-validation {\n position: relative;\n color: red;\n font-size: x-small;\n top: -8px;\n}\n";
2
2
  //# sourceMappingURL=style.eox.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"style.eox.d.ts","sourceRoot":"","sources":["../src/style.eox.js"],"names":[],"mappings":"AAAA,40SAwcE"}
1
+ {"version":3,"file":"style.eox.d.ts","sourceRoot":"","sources":["../src/style.eox.js"],"names":[],"mappings":"AAAA,o+UAugBE"}