@eox/itemfilter 1.6.1 → 1.7.0
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/dist/eox-itemfilter.js +3037 -3015
- package/dist/eox-itemfilter.umd.cjs +122 -105
- package/package.json +3 -3
- package/src/components/filters/range.js +4 -4
- package/src/methods/filters/range.js +6 -2
- package/src/methods/itemfilter/filter-apply.js +6 -2
- package/src/methods/results/create.js +31 -18
- package/src/style.eox.js +5 -1
- package/types/methods/filters/range.d.ts.map +1 -1
- package/types/methods/itemfilter/filter-apply.d.ts.map +1 -1
- package/types/methods/results/create.d.ts.map +1 -1
- package/types/style.eox.d.ts +1 -1
- package/types/style.eox.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eox/itemfilter",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"devDependencies": {
|
|
6
6
|
"@types/geojson": "^7946.0.14",
|
|
7
7
|
"@types/lodash.debounce": "^4.0.7",
|
|
8
|
-
"vite": "^
|
|
8
|
+
"vite": "^6.0.3"
|
|
9
9
|
},
|
|
10
10
|
"engines": {
|
|
11
11
|
"npm": ">=8.0.0",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"watch": "vite build --watch"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@eox/elements-utils": "^0.1.
|
|
37
|
+
"@eox/elements-utils": "^0.1.3",
|
|
38
38
|
"@floating-ui/dom": "^1.6.8",
|
|
39
39
|
"@turf/boolean-intersects": "^7.0.0",
|
|
40
40
|
"@turf/boolean-within": "^7.0.0",
|
|
@@ -46,8 +46,8 @@ export class EOxItemFilterRange extends LitElement {
|
|
|
46
46
|
/**
|
|
47
47
|
* @type Function
|
|
48
48
|
*/
|
|
49
|
-
this.debouncedInputHandler = _debounce(this.inputHandler,
|
|
50
|
-
leading:
|
|
49
|
+
this.debouncedInputHandler = _debounce(this.inputHandler, 500, {
|
|
50
|
+
leading: false,
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
|
|
@@ -100,8 +100,8 @@ export class EOxItemFilterRange extends LitElement {
|
|
|
100
100
|
<tc-range-slider
|
|
101
101
|
min="${this.filterObject.min}"
|
|
102
102
|
max="${this.filterObject.max}"
|
|
103
|
-
value1="${this.filterObject.min || this.filterObject.
|
|
104
|
-
value2="${this.filterObject.max || this.filterObject.
|
|
103
|
+
value1="${this.filterObject.state.min || this.filterObject.min}"
|
|
104
|
+
value2="${this.filterObject.state.max || this.filterObject.max}"
|
|
105
105
|
step="${this.filterObject.step || 1}"
|
|
106
106
|
@change=${this.debouncedInputHandler}
|
|
107
107
|
></tc-range-slider>
|
|
@@ -2,6 +2,8 @@ import { resetFilter } from "../../helpers/index.js";
|
|
|
2
2
|
import dayjs from "dayjs";
|
|
3
3
|
import { html } from "lit";
|
|
4
4
|
|
|
5
|
+
const DATE_TIME_FORMAT = "ddd, D MMM YYYY HH:mm:ss";
|
|
6
|
+
|
|
5
7
|
/**
|
|
6
8
|
* Resets the range filter to its default state and requests an update.
|
|
7
9
|
*
|
|
@@ -47,7 +49,7 @@ export function rangeInputHandlerMethod(evt, EOxItemFilterRange) {
|
|
|
47
49
|
if (EOxItemFilterRange.filterObject.dirty) {
|
|
48
50
|
EOxItemFilterRange.filterObject.stringifiedState =
|
|
49
51
|
EOxItemFilterRange.filterObject.format === "date"
|
|
50
|
-
? `${dayjs(min)} - ${dayjs(max)}`
|
|
52
|
+
? `${dayjs.unix(min).format(DATE_TIME_FORMAT)} - ${dayjs.unix(max).format(DATE_TIME_FORMAT)}`
|
|
51
53
|
: `${min} - ${max}`;
|
|
52
54
|
}
|
|
53
55
|
|
|
@@ -73,6 +75,8 @@ export function rangeInputHandlerMethod(evt, EOxItemFilterRange) {
|
|
|
73
75
|
export function rangeLabelMethod(val, pos, EOxItemFilterRange) {
|
|
74
76
|
const isDate = Boolean(EOxItemFilterRange.filterObject.format === "date");
|
|
75
77
|
const filteredVal = EOxItemFilterRange.filterObject.state[val];
|
|
76
|
-
const label = isDate
|
|
78
|
+
const label = isDate
|
|
79
|
+
? dayjs.unix(filteredVal).format(DATE_TIME_FORMAT)
|
|
80
|
+
: filteredVal;
|
|
77
81
|
return html`<div class="range-${pos}">${label}</div>`;
|
|
78
82
|
}
|
|
@@ -59,7 +59,9 @@ function filterApplyMethod(config, items, EOxItemFilter) {
|
|
|
59
59
|
});
|
|
60
60
|
} else {
|
|
61
61
|
if (filterProperty.type === "spatial") {
|
|
62
|
-
filterKeys.geometry = undefined;
|
|
62
|
+
filterKeys.geometry = filterProperty?.state?.geometry || undefined;
|
|
63
|
+
if (filterKeys.geometry)
|
|
64
|
+
filterProperty.stringifiedState = filterKeys.geometry.type;
|
|
63
65
|
filterKeys.mode = filterProperty.mode || "intersects";
|
|
64
66
|
} else {
|
|
65
67
|
if (filterProperty.key?.includes(".")) {
|
|
@@ -78,7 +80,9 @@ function filterApplyMethod(config, items, EOxItemFilter) {
|
|
|
78
80
|
EOxItemFilter.filters[filterKey] = Object.assign(
|
|
79
81
|
{
|
|
80
82
|
type: filterProperty.type || "multiselect",
|
|
81
|
-
dirty: filterProperty.state
|
|
83
|
+
dirty: filterProperty.state
|
|
84
|
+
? Object.values(filterProperty.state).some((value) => value)
|
|
85
|
+
: undefined,
|
|
82
86
|
key: filterKey,
|
|
83
87
|
},
|
|
84
88
|
filterProperty.type === "range"
|
|
@@ -69,24 +69,24 @@ export function createItemListMethod(
|
|
|
69
69
|
items,
|
|
70
70
|
(item) => item.id,
|
|
71
71
|
(item) => html`
|
|
72
|
-
<li
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
>
|
|
72
|
+
<li
|
|
73
|
+
class=${className(item)}
|
|
74
|
+
@click=${() => {
|
|
75
|
+
if (EOxItemFilterResults.selectedResult === item) {
|
|
76
|
+
EOxItemFilterResults.selectedResult = null;
|
|
77
|
+
} else {
|
|
78
|
+
EOxItemFilterResults.selectedResult = item;
|
|
79
|
+
}
|
|
80
|
+
EOxItemFilterResults.dispatchEvent(
|
|
81
|
+
new CustomEvent("result", {
|
|
82
|
+
detail: EOxItemFilterResults.selectedResult,
|
|
83
|
+
}),
|
|
84
|
+
);
|
|
85
|
+
}}
|
|
86
|
+
>
|
|
87
|
+
<span id="${item.id}">
|
|
88
88
|
${when(
|
|
89
|
-
config.subTitleProperty,
|
|
89
|
+
config.subTitleProperty || config.imageProperty,
|
|
90
90
|
() => html`
|
|
91
91
|
${getValue(config.imageProperty, item)
|
|
92
92
|
? html`
|
|
@@ -95,7 +95,20 @@ export function createItemListMethod(
|
|
|
95
95
|
src="${getValue(config.imageProperty, item)}"
|
|
96
96
|
/>
|
|
97
97
|
`
|
|
98
|
-
:
|
|
98
|
+
: html`
|
|
99
|
+
<svg
|
|
100
|
+
class="image"
|
|
101
|
+
width="800"
|
|
102
|
+
height="600"
|
|
103
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
104
|
+
>
|
|
105
|
+
<rect
|
|
106
|
+
width="800"
|
|
107
|
+
height="600"
|
|
108
|
+
fill="var(--primary-color)"
|
|
109
|
+
/>
|
|
110
|
+
</svg>
|
|
111
|
+
`}
|
|
99
112
|
<div class="title-container">
|
|
100
113
|
<span class="title"
|
|
101
114
|
>${unsafeHTML(item[config.titleProperty])}</span
|
package/src/style.eox.js
CHANGED
|
@@ -21,11 +21,12 @@ export const styleEOX = `
|
|
|
21
21
|
#000000 20%,
|
|
22
22
|
transparent
|
|
23
23
|
);
|
|
24
|
-
--background-color:
|
|
24
|
+
--background-color: var(--eox-background-color, transparent);
|
|
25
25
|
--padding: 0.5rem;
|
|
26
26
|
--text-transform: capitalize;
|
|
27
27
|
--form-flex-direction: column;
|
|
28
28
|
--filter-display: block;
|
|
29
|
+
background-color: var(--background-color);
|
|
29
30
|
}
|
|
30
31
|
* {
|
|
31
32
|
font-family: Roboto, sans-serif;
|
|
@@ -517,4 +518,7 @@ eox-itemfilter-results li.highlighted {
|
|
|
517
518
|
font-size: x-small;
|
|
518
519
|
top: -8px;
|
|
519
520
|
}
|
|
521
|
+
input {
|
|
522
|
+
background-color: var(--background-color);
|
|
523
|
+
}
|
|
520
524
|
`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"range.d.ts","sourceRoot":"","sources":["../../../src/methods/filters/range.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"range.d.ts","sourceRoot":"","sources":["../../../src/methods/filters/range.js"],"names":[],"mappings":"AAMA;;;;GAIG;AACH,qDAFW,OAAO,mCAAmC,EAAE,kBAAkB,QAexE;AAED;;;;;GAKG;AACH,6CAHW,KAAK,iCAmCf;AAED;;;;;;;GAOG;AACH,sCALW,MAAM,GAAC,MAAM,OACb,MAAM,8CAWhB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter-apply.d.ts","sourceRoot":"","sources":["../../../src/methods/itemfilter/filter-apply.js"],"names":[],"mappings":";AAKA;;;;;;;GAOG;AACH,uDAJW,UAAa,uBAEX,MAAM,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"filter-apply.d.ts","sourceRoot":"","sources":["../../../src/methods/itemfilter/filter-apply.js"],"names":[],"mappings":";AAKA;;;;;;;GAOG;AACH,uDAJW,UAAa,uBAEX,MAAM,MAAM,CAAC,CAkIzB"}
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,6CAwFhB"}
|
package/types/style.eox.d.ts
CHANGED
|
@@ -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 --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";
|
|
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: var(--eox-background-color, transparent);\n --padding: 0.5rem;\n --text-transform: capitalize;\n --form-flex-direction: column;\n --filter-display: block;\n background-color: var(--background-color);\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}\ninput {\n background-color: var(--background-color);\n}\n";
|
|
2
2
|
//# sourceMappingURL=style.eox.d.ts.map
|
package/types/style.eox.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.eox.d.ts","sourceRoot":"","sources":["../src/style.eox.js"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"style.eox.d.ts","sourceRoot":"","sources":["../src/style.eox.js"],"names":[],"mappings":"AAAA,gnVA2gBE"}
|