@everymatrix/casino-sort 1.43.4 → 1.45.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/components/CasinoSort-BL1fNNHN.cjs +3 -0
- package/components/CasinoSort-By-xvlAA.js +4132 -0
- package/es2015/casino-sort.cjs +1 -0
- package/es2015/casino-sort.js +16 -0
- package/package.json +15 -33
- package/README.md +0 -30
- package/dist/casino-sort.js +0 -592
- package/dist/casino-sort.js.map +0 -1
- package/index.html +0 -37
- package/index.js +0 -1
- package/public/favicon.png +0 -0
- package/public/reset.css +0 -48
- package/rollup.config.js +0 -59
- package/src/CasinoSort.svelte +0 -425
- package/src/i18n.js +0 -27
- package/src/index.ts +0 -4
- package/src/translations.js +0 -121
- package/stories/CasinoSort.stories.js +0 -13
- package/tsconfig.json +0 -6
package/index.html
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset='utf-8'>
|
|
5
|
-
<meta name='viewport' content='width=device-width,initial-scale=1'>
|
|
6
|
-
|
|
7
|
-
<title>
|
|
8
|
-
casino-sort
|
|
9
|
-
</title>
|
|
10
|
-
<link rel="stylesheet" href="public/reset.css">
|
|
11
|
-
<script src='dist/casino-sort.js'></script>
|
|
12
|
-
</head>
|
|
13
|
-
|
|
14
|
-
<body>
|
|
15
|
-
<style>
|
|
16
|
-
html,body { margin: 0; padding: 0; height: 100%; font-family: "Helvetica Neue", "Helvetica", sans-serif; }
|
|
17
|
-
.header { display: flex; justify-content: center; align-items: center; padding: 10px 20px; margin-bottom: 20px; background: #42a3e2; box-shadow: 3px 4px 5px 0px rgba(0,0,0, .2); }
|
|
18
|
-
.header__logo svg { height: 50px; width: 50px; margin-right: 5px; }
|
|
19
|
-
.header__name { color: #fff; }
|
|
20
|
-
.header__name span { margin-right: 10px; font-weight: bold; }
|
|
21
|
-
.webcomponent { padding: 10px 20px; }
|
|
22
|
-
</style>
|
|
23
|
-
<header class="header">
|
|
24
|
-
<div class="header__logo">
|
|
25
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="161" height="132" viewBox="0 0 161 132"><defs><linearGradient x1="0%" y1="50%" y2="50%" id="a"><stop stop-color="#2A3B8F" offset="0%"/><stop stop-color="#29ABE2" offset="100%"/></linearGradient><linearGradient x1="100%" y1="50%" x2="0%" y2="50%" id="c"><stop stop-color="#B4D44E" offset="0%"/><stop stop-color="#E7F716" offset="100%"/></linearGradient></defs><g fill="none" fill-rule="evenodd"><path fill="#166DA5" d="M160.6 65.9l-17.4 29.3-24.4-29.7 24.4-28.9z"/><path fill="#8FDB69" d="M141.3 100.2l-26.5-31.7-15.9 26.6 24.7 36.1z"/><path fill="#166DA5" d="M141 31.4l-26.2 31.8-15.9-26.6L123.6.9z"/><path fill="url(#a)" opacity=".95" d="M61.1 31.4H141L123.4.7H78.7z M114.8 63.3H159l-15.9-26.8H98.8"/><path fill="url(#c)" opacity=".95" d="M141.3 100.3H61l17.6 30.5h45z M114.8 68.4H159l-15.9 26.8H98.8"/><path fill="#010101" d="M78.6 130.8L41 65.8 79.1.8H37.9L.4 65.8l37.5 65z"/></g></svg>
|
|
26
|
-
</div>
|
|
27
|
-
<h1 class="header__name">
|
|
28
|
-
<span>WEBCOMPONENT:</span> casino-sort
|
|
29
|
-
</h1>
|
|
30
|
-
</header>
|
|
31
|
-
|
|
32
|
-
<div class="webcomponent">
|
|
33
|
-
<casino-sort></casino-sort>
|
|
34
|
-
</div>
|
|
35
|
-
|
|
36
|
-
</body>
|
|
37
|
-
</html>
|
package/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import './dist/casino-sort.js';
|
package/public/favicon.png
DELETED
|
Binary file
|
package/public/reset.css
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/* http://meyerweb.com/eric/tools/css/reset/
|
|
2
|
-
v2.0 | 20110126
|
|
3
|
-
License: none (public domain)
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
html, body, div, span, applet, object, iframe,
|
|
7
|
-
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
|
8
|
-
a, abbr, acronym, address, big, cite, code,
|
|
9
|
-
del, dfn, em, img, ins, kbd, q, s, samp,
|
|
10
|
-
small, strike, strong, sub, sup, tt, var,
|
|
11
|
-
b, u, i, center,
|
|
12
|
-
dl, dt, dd, ol, ul, li,
|
|
13
|
-
fieldset, form, label, legend,
|
|
14
|
-
table, caption, tbody, tfoot, thead, tr, th, td,
|
|
15
|
-
article, aside, canvas, details, embed,
|
|
16
|
-
figure, figcaption, footer, header, hgroup,
|
|
17
|
-
menu, nav, output, ruby, section, summary,
|
|
18
|
-
time, mark, audio, video {
|
|
19
|
-
margin: 0;
|
|
20
|
-
padding: 0;
|
|
21
|
-
border: 0;
|
|
22
|
-
font-size: 100%;
|
|
23
|
-
font: inherit;
|
|
24
|
-
vertical-align: baseline;
|
|
25
|
-
}
|
|
26
|
-
/* HTML5 display-role reset for older browsers */
|
|
27
|
-
article, aside, details, figcaption, figure,
|
|
28
|
-
footer, header, hgroup, menu, nav, section {
|
|
29
|
-
display: block;
|
|
30
|
-
}
|
|
31
|
-
body {
|
|
32
|
-
line-height: 1;
|
|
33
|
-
}
|
|
34
|
-
ol, ul {
|
|
35
|
-
list-style: none;
|
|
36
|
-
}
|
|
37
|
-
blockquote, q {
|
|
38
|
-
quotes: none;
|
|
39
|
-
}
|
|
40
|
-
blockquote:before, blockquote:after,
|
|
41
|
-
q:before, q:after {
|
|
42
|
-
content: '';
|
|
43
|
-
content: none;
|
|
44
|
-
}
|
|
45
|
-
table {
|
|
46
|
-
border-collapse: collapse;
|
|
47
|
-
border-spacing: 0;
|
|
48
|
-
}
|
package/rollup.config.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import svelte from 'rollup-plugin-svelte';
|
|
2
|
-
import commonjs from '@rollup/plugin-commonjs';
|
|
3
|
-
import resolve from '@rollup/plugin-node-resolve';
|
|
4
|
-
import serve from 'rollup-plugin-dev-server';
|
|
5
|
-
import livereload from 'rollup-plugin-livereload';
|
|
6
|
-
import { terser } from 'rollup-plugin-terser';
|
|
7
|
-
import sveltePreprocess from 'svelte-preprocess';
|
|
8
|
-
import typescript from '@rollup/plugin-typescript';
|
|
9
|
-
const production = process.env.NODE_ENV === 'production';
|
|
10
|
-
const dev = process.env.NODE_ENV === 'development';
|
|
11
|
-
|
|
12
|
-
export default {
|
|
13
|
-
input: 'src/index.ts',
|
|
14
|
-
output: {
|
|
15
|
-
sourcemap: true,
|
|
16
|
-
format: 'umd',
|
|
17
|
-
name: 'app',
|
|
18
|
-
file: 'dist/casino-sort.js'
|
|
19
|
-
},
|
|
20
|
-
plugins: [
|
|
21
|
-
svelte({
|
|
22
|
-
preprocess: sveltePreprocess(),
|
|
23
|
-
compilerOptions: {
|
|
24
|
-
// enable run-time checks when not in production
|
|
25
|
-
customElement: true,
|
|
26
|
-
dev: !production
|
|
27
|
-
}
|
|
28
|
-
}),
|
|
29
|
-
commonjs(),
|
|
30
|
-
resolve({
|
|
31
|
-
browser: true,
|
|
32
|
-
dedupe: ['svelte']
|
|
33
|
-
}),
|
|
34
|
-
dev && serve({
|
|
35
|
-
open: true,
|
|
36
|
-
verbose: true,
|
|
37
|
-
allowCrossOrigin: true,
|
|
38
|
-
historyApiFallback: false,
|
|
39
|
-
host: 'localhost',
|
|
40
|
-
port: 5050,
|
|
41
|
-
}),
|
|
42
|
-
dev && livereload({ watch: ['', 'dist'] }),
|
|
43
|
-
typescript({
|
|
44
|
-
sourceMap: !production,
|
|
45
|
-
inlineSources: !production,
|
|
46
|
-
}),
|
|
47
|
-
// If we're building for production (npm run build
|
|
48
|
-
// instead of npm run dev), minify
|
|
49
|
-
production &&
|
|
50
|
-
terser({
|
|
51
|
-
output: {
|
|
52
|
-
comments: "all"
|
|
53
|
-
},
|
|
54
|
-
})
|
|
55
|
-
],
|
|
56
|
-
watch: {
|
|
57
|
-
clearScreen: false
|
|
58
|
-
}
|
|
59
|
-
};
|
package/src/CasinoSort.svelte
DELETED
|
@@ -1,425 +0,0 @@
|
|
|
1
|
-
<svelte:options tag={null} />
|
|
2
|
-
<script lang="ts">
|
|
3
|
-
import { onMount } from 'svelte';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { _, addNewMessages, setupI18n, setLocale } from './i18n';
|
|
7
|
-
import { TRANSLATIONS } from './translations';
|
|
8
|
-
|
|
9
|
-
export let lang:string = ''; // Language
|
|
10
|
-
export let translationurl:string = '';
|
|
11
|
-
export let clientstyling:string = '';
|
|
12
|
-
export let clientstylingurl:string = '';
|
|
13
|
-
export let categoryid:string = '';
|
|
14
|
-
|
|
15
|
-
let customStylingContainer:HTMLElement;
|
|
16
|
-
let hasErrors:boolean = false;
|
|
17
|
-
let isSorterActive:boolean = false;
|
|
18
|
-
let isLoading:boolean = true;
|
|
19
|
-
let sortedBy:string = '';
|
|
20
|
-
let vendorSortingBy:string = 'All';
|
|
21
|
-
let sorter:string = '';
|
|
22
|
-
|
|
23
|
-
setupI18n({ withLocale: 'en', translations: {}});
|
|
24
|
-
|
|
25
|
-
const setTranslationUrl = ():void => {
|
|
26
|
-
let url:string = translationurl;
|
|
27
|
-
|
|
28
|
-
fetch(url).then((res:any) => res.json())
|
|
29
|
-
.then((res) => {
|
|
30
|
-
Object.keys(res).forEach((item:any):void => {
|
|
31
|
-
addNewMessages(item, res[item]);
|
|
32
|
-
});
|
|
33
|
-
}).catch((err:any) => {
|
|
34
|
-
console.log(err);
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
Object.keys(TRANSLATIONS).forEach((item) => {
|
|
39
|
-
addNewMessages(item, TRANSLATIONS[item]);
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
const vendorMap = {
|
|
43
|
-
'All': $_('all'),
|
|
44
|
-
'name': $_('az'),
|
|
45
|
-
'isNew': $_('newest'),
|
|
46
|
-
'advancedTags(name(hot))': $_('hottest'),
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
const setClientStyling = ():void => {
|
|
50
|
-
let sheet = document.createElement('style');
|
|
51
|
-
sheet.innerHTML = clientstyling;
|
|
52
|
-
customStylingContainer.appendChild(sheet);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
const setClientStylingURL = ():void => {
|
|
56
|
-
let cssFile:HTMLElement = document.createElement('style');
|
|
57
|
-
|
|
58
|
-
fetch(new URL(clientstylingurl))
|
|
59
|
-
.then((res:any) => res.text())
|
|
60
|
-
.then((data:any) => {
|
|
61
|
-
cssFile.innerHTML = data
|
|
62
|
-
|
|
63
|
-
setTimeout(() => { customStylingContainer.appendChild(cssFile); }, 1);
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
const initialLoad = ():void => {
|
|
68
|
-
vendorSortingBy = 'All';
|
|
69
|
-
isLoading = false;
|
|
70
|
-
isSorterActive = false;
|
|
71
|
-
let parser = JSON.parse(localStorage.getItem('vendorSortingBy'))?.[categoryid];
|
|
72
|
-
if (parser) {
|
|
73
|
-
vendorSortingBy = parser;
|
|
74
|
-
} else {
|
|
75
|
-
vendorSortingBy = 'All';
|
|
76
|
-
}
|
|
77
|
-
vendorSortingBy = vendorMap[parser]
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
const sortBy = (input):void => {
|
|
81
|
-
vendorSortingBy = input;
|
|
82
|
-
let sorts = localStorage.getItem("vendorSortingBy");
|
|
83
|
-
sortedBy = input;
|
|
84
|
-
for (let key in vendorMap) {
|
|
85
|
-
if (vendorMap[key] === input) {
|
|
86
|
-
sortedBy = key;
|
|
87
|
-
break;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
if(sorts == null) {
|
|
92
|
-
localStorage.setItem("vendorSortingBy", JSON.stringify(sorter = {
|
|
93
|
-
[categoryid]:sortedBy
|
|
94
|
-
}))
|
|
95
|
-
} else {
|
|
96
|
-
sorts = JSON.parse(sorts);
|
|
97
|
-
sorts[categoryid] = sortedBy;
|
|
98
|
-
localStorage.setItem("vendorSortingBy", JSON.stringify(sorts));
|
|
99
|
-
}
|
|
100
|
-
window.postMessage({ type: "ApplySorter", sortBy: sortedBy, itemId: categoryid}, window.location.href);
|
|
101
|
-
isSorterActive = !isSorterActive;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
const toggleList = ():void => {
|
|
105
|
-
isSorterActive = !isSorterActive;
|
|
106
|
-
window.postMessage({ type: "SortingOpened"}, window.location.href);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
const messageHandler = (e:any) => {
|
|
110
|
-
if (e.data.type == 'FilterOpened') {
|
|
111
|
-
isSorterActive = false;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
onMount(() => {
|
|
116
|
-
window.addEventListener('message', messageHandler, false);
|
|
117
|
-
|
|
118
|
-
return () => {
|
|
119
|
-
window.removeEventListener('message', messageHandler);
|
|
120
|
-
}
|
|
121
|
-
})
|
|
122
|
-
|
|
123
|
-
$: categoryid && initialLoad();
|
|
124
|
-
$: clientstyling && customStylingContainer && setClientStyling();
|
|
125
|
-
$: clientstylingurl && customStylingContainer && setClientStylingURL();
|
|
126
|
-
$: translationurl && setTranslationUrl();
|
|
127
|
-
|
|
128
|
-
</script>
|
|
129
|
-
|
|
130
|
-
<div bind:this={customStylingContainer}>
|
|
131
|
-
{#if hasErrors}
|
|
132
|
-
<p class="SearchLoading">{$_('500')}</p>
|
|
133
|
-
{:else}
|
|
134
|
-
{#if !isLoading}
|
|
135
|
-
<div class="SorterContainer">
|
|
136
|
-
<div class="SorterSelector {isSorterActive ? 'SorterSelectorOpen' : ''}" on:click={() => toggleList()}>
|
|
137
|
-
<div class="SorterMainArea">
|
|
138
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 26.003 22.819">
|
|
139
|
-
<g id="sortby" transform="translate(-306 -342)">
|
|
140
|
-
<path id="Path_5267" data-name="Path 5267" d="M526.245,343.685a3.45,3.45,0,0,1,0,6.714v13.625a.8.8,0,0,1-1.592,0V350.4a3.45,3.45,0,0,1,0-6.714V342.8a.8.8,0,1,1,1.592,0Zm-2.653,3.357a1.857,1.857,0,1,0,1.857-1.857A1.859,1.859,0,0,0,523.592,347.041Z" transform="translate(-206.448 0)" fill="#fff"/>
|
|
141
|
-
<path id="Path_5268" data-name="Path 5268" d="M310.245,356.421a3.45,3.45,0,0,1,0,6.714v.888a.8.8,0,0,1-1.592,0v-.888a3.45,3.45,0,0,1,0-6.714V342.8a.8.8,0,1,1,1.592,0Zm-2.653,3.357a1.857,1.857,0,1,0,1.857-1.857A1.859,1.859,0,0,0,307.592,359.777Z" transform="translate(0 0)" fill="#fff"/>
|
|
142
|
-
<path id="Path_5269" data-name="Path 5269" d="M742.245,351.645a3.45,3.45,0,0,1,0,6.714v5.665a.8.8,0,1,1-1.592,0v-5.665a3.45,3.45,0,0,1,0-6.714V342.8a.8.8,0,1,1,1.592,0ZM739.592,355a1.857,1.857,0,1,0,1.857-1.857A1.859,1.859,0,0,0,739.592,355Z" transform="translate(-412.896 0)" fill="#fff"/>
|
|
143
|
-
</g>
|
|
144
|
-
</svg>
|
|
145
|
-
<div class="SorterTextContainer">
|
|
146
|
-
<span class="SorterName">{$_('sortby')}</span>
|
|
147
|
-
<div class="SorterValueContainer">
|
|
148
|
-
<span>{vendorSortingBy || $_('all')}</span>
|
|
149
|
-
</div>
|
|
150
|
-
</div>
|
|
151
|
-
</div>
|
|
152
|
-
<span class="TriangleInactive {isSorterActive ? 'TriangleActive' : ''}">
|
|
153
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="6.835" viewBox="0 0 14 6.835">
|
|
154
|
-
<path id="arrow" d="M281.541,447.921a.488.488,0,0,0,.295-.122l6.5-5.851a.488.488,0,1,0-.65-.726l-6.176,5.556-6.176-5.556h0a.488.488,0,1,0-.65.726l6.5,5.851a.488.488,0,0,0,.355.122Z" transform="translate(-274.511 -441.088)" fill="#d1d1d1"/>
|
|
155
|
-
</svg>
|
|
156
|
-
</span>
|
|
157
|
-
</div>
|
|
158
|
-
<div class="SorterDropdownContainer { isSorterActive ? 'SorterOpen' : ''}">
|
|
159
|
-
<ul class="SorterDropdown">
|
|
160
|
-
{#each Object.values(vendorMap) as sort}
|
|
161
|
-
<li class="SorterItem" value={sort}>
|
|
162
|
-
<label class="SorterLabel CustomRadioButton">
|
|
163
|
-
<input type="radio" name="radio" value={sort} checked={vendorSortingBy == sort ? true : (vendorSortingBy == undefined && sort == $_('all') ? true : false)} on:click={() => sortBy(sort)}>
|
|
164
|
-
<span class="SortersCheckmark"></span>
|
|
165
|
-
<span>{sort}</span>
|
|
166
|
-
</label>
|
|
167
|
-
</li>
|
|
168
|
-
{/each}
|
|
169
|
-
</ul>
|
|
170
|
-
</div>
|
|
171
|
-
</div>
|
|
172
|
-
{/if}
|
|
173
|
-
{/if}
|
|
174
|
-
</div>
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
<style lang="scss">
|
|
179
|
-
*,
|
|
180
|
-
*::before,
|
|
181
|
-
*::after {
|
|
182
|
-
margin: 0;
|
|
183
|
-
padding: 0;
|
|
184
|
-
box-sizing: border-box;
|
|
185
|
-
}
|
|
186
|
-
.SearchLoading {
|
|
187
|
-
color: var(--emfe-w-casino-typography, var(--emfe-w-color-white, #FFFFFF));
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
.SorterContainer {
|
|
191
|
-
color: var(--emfe-w-casino-typography, var(--emfe-w-color-white, #FFFFFF));
|
|
192
|
-
position: relative;
|
|
193
|
-
z-index: 16;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
.SorterSelector {
|
|
197
|
-
background-color: var(--emfe-w-color-gray-300, #58586B);
|
|
198
|
-
display: flex;
|
|
199
|
-
position: relative;
|
|
200
|
-
padding: 10px 16px;
|
|
201
|
-
border-radius: 5px;
|
|
202
|
-
justify-content: space-between;
|
|
203
|
-
align-items: center;
|
|
204
|
-
cursor: pointer;
|
|
205
|
-
&.SorterSelectorOpen {
|
|
206
|
-
border-radius: 5px 5px 0 0;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
.SorterMainArea {
|
|
211
|
-
display: flex;
|
|
212
|
-
align-items: center;
|
|
213
|
-
svg {
|
|
214
|
-
margin-right: 16px;
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
.SorterName {
|
|
219
|
-
font-size: 11px;
|
|
220
|
-
line-height: 12px;
|
|
221
|
-
color: var(--emfe-w-color-gray-100, #E6E6E6);
|
|
222
|
-
text-transform: uppercase;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
.SorterTextContainer {
|
|
226
|
-
display: flex;
|
|
227
|
-
flex-direction: column;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
.SorterValueContainer {
|
|
231
|
-
font-size: 14px;
|
|
232
|
-
line-height: 16px;
|
|
233
|
-
font-weight: 300;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
.TriangleInactive {
|
|
237
|
-
display: block;
|
|
238
|
-
color: currentColor;
|
|
239
|
-
margin: 0 0 0 15px;
|
|
240
|
-
transition: all .5s;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
.TriangleActive {
|
|
244
|
-
transform: rotate(180deg);
|
|
245
|
-
position: relative;
|
|
246
|
-
top: 2px;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
.SorterDropdownContainer {
|
|
250
|
-
padding: 0;
|
|
251
|
-
background: rgb(88,88,107);
|
|
252
|
-
background: linear-gradient(180deg, rgba(88,88,107,0.9) 0%, rgba(7,7,42,0.9) 95%);
|
|
253
|
-
display: flex;
|
|
254
|
-
flex-direction: column;
|
|
255
|
-
align-items: center;
|
|
256
|
-
transition: max-height 0.15s ease-out;
|
|
257
|
-
max-height: 0;
|
|
258
|
-
border-radius: 0 0 5px 5px;
|
|
259
|
-
position: absolute;
|
|
260
|
-
top: 35px;
|
|
261
|
-
margin-bottom: 40px;
|
|
262
|
-
overflow: hidden;
|
|
263
|
-
margin: 0;
|
|
264
|
-
&.SorterOpen {
|
|
265
|
-
width: 100%;
|
|
266
|
-
max-height: fit-content;
|
|
267
|
-
transition: max-height 0.25s ease-in;
|
|
268
|
-
padding-top: 10px;
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
.SorterDropdown {
|
|
273
|
-
width: 100%;
|
|
274
|
-
max-height: 300px;
|
|
275
|
-
display: grid;
|
|
276
|
-
gap: 10px;
|
|
277
|
-
margin: 0;
|
|
278
|
-
padding-inline-start: 0;
|
|
279
|
-
overflow: scroll;
|
|
280
|
-
list-style: none;
|
|
281
|
-
-ms-overflow-style: none; /* Internet Explorer 10+ */
|
|
282
|
-
scrollbar-width: none; /* Firefox */
|
|
283
|
-
list-style-type: none;
|
|
284
|
-
padding: 10px;
|
|
285
|
-
margin: 0;
|
|
286
|
-
box-sizing: border-box;
|
|
287
|
-
|
|
288
|
-
&::-webkit-scrollbar {
|
|
289
|
-
display: none; /* Safari and Chrome */
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
// custom checkmark
|
|
295
|
-
.SorterItem {
|
|
296
|
-
position: relative;
|
|
297
|
-
label {
|
|
298
|
-
font-size: 14px;
|
|
299
|
-
font-weight: 300;
|
|
300
|
-
cursor: pointer;
|
|
301
|
-
display: flex;
|
|
302
|
-
align-items: center;
|
|
303
|
-
justify-content: flex-start;
|
|
304
|
-
-webkit-user-select: none; /* Safari */
|
|
305
|
-
-ms-user-select: none; /* IE 10 and IE 11 */
|
|
306
|
-
user-select: none; /* Standard syntax */
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
input {
|
|
310
|
-
cursor: pointer;
|
|
311
|
-
margin-right: 10px;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
.SortersCheckmark {
|
|
315
|
-
margin: 0 15px;
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
/* unchecked checkmark */
|
|
319
|
-
|
|
320
|
-
.CustomRadioButton input[type="radio"] {
|
|
321
|
-
position: absolute;
|
|
322
|
-
left: -9999px
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
.CustomRadioButton input[type="radio"]+span {
|
|
326
|
-
position: relative;
|
|
327
|
-
cursor: pointer;
|
|
328
|
-
width: 30px;
|
|
329
|
-
height: 30px;
|
|
330
|
-
display: flex;
|
|
331
|
-
justify-content: center;
|
|
332
|
-
align-items: center;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
.CustomRadioButton input[type="radio"]+span:before {
|
|
336
|
-
content: '';
|
|
337
|
-
background: transparent;
|
|
338
|
-
border: 1px solid var(--emfe-w-color-white, #FFFFFF);
|
|
339
|
-
height: 18px;
|
|
340
|
-
width: 18px;
|
|
341
|
-
border-radius: 50%;
|
|
342
|
-
position: absolute;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
.CustomRadioButton input[type="radio"]+span:after {
|
|
346
|
-
content: '';
|
|
347
|
-
background: var(--emfe-w-casino-color-primary, var(--emfe-w-color-primary, #D0046C));
|
|
348
|
-
width: 14px;
|
|
349
|
-
height: 14px;
|
|
350
|
-
border-radius: 50%;
|
|
351
|
-
position: absolute;
|
|
352
|
-
opacity: 0;
|
|
353
|
-
transform: scale(2);
|
|
354
|
-
transition: transform 0.3s linear, opacity 0.3s linear;
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
.CustomRadioButton input[type="radio"]:checked+span:after {
|
|
358
|
-
opacity: 1;
|
|
359
|
-
transform: scale(1)
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
.SorterLabel {
|
|
364
|
-
input {
|
|
365
|
-
position: absolute;
|
|
366
|
-
opacity: 0;
|
|
367
|
-
cursor: pointer;
|
|
368
|
-
height: 0;
|
|
369
|
-
width: 0;
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
.SorterLabel input:checked + span {
|
|
374
|
-
font-weight: 600;
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
.ClearSorters {
|
|
378
|
-
margin: 20px auto;
|
|
379
|
-
border: 0;
|
|
380
|
-
color: var(--emfe-w-button-typography, var(--emfe-w-color-white, #FFFFFF));
|
|
381
|
-
background-color: var(--emfe-w-casino-color-primary, var(--emfe-w-color-primary, #D0046C));
|
|
382
|
-
border: 1px solid var(--emfe-w-casino-color-primary, var(--emfe-w-color-primary, #D0046C));
|
|
383
|
-
font-size: 18px;
|
|
384
|
-
padding: 10px 50px;
|
|
385
|
-
border-radius: 5px;
|
|
386
|
-
cursor: pointer;
|
|
387
|
-
transition: all 0.1s ease-in;
|
|
388
|
-
-webkit-user-select: none; /* Safari */
|
|
389
|
-
-ms-user-select: none; /* IE 10 and IE 11 */
|
|
390
|
-
user-select: none; /* Standard syntax */
|
|
391
|
-
&:disabled {
|
|
392
|
-
background: var(--emfe-w-color-gray-100, #E6E6E6);
|
|
393
|
-
border: 1px solid var(--emfe-w-color-gray-150, #828282);
|
|
394
|
-
pointer-events: none;
|
|
395
|
-
cursor: not-allowed;
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
@media only screen and (max-width: 768px) {
|
|
402
|
-
.SorterSelector {
|
|
403
|
-
max-width: initial;
|
|
404
|
-
padding: 7px 16px;
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
.SorterDropdownContainer {
|
|
408
|
-
width: 100%;
|
|
409
|
-
margin-bottom: 20px;
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
.SorterDropdown {
|
|
413
|
-
display: flex;
|
|
414
|
-
flex-direction: column;
|
|
415
|
-
gap: 12px;
|
|
416
|
-
margin-block-start: 0;
|
|
417
|
-
.SorterLabel {
|
|
418
|
-
line-height: 24px;
|
|
419
|
-
&> * {
|
|
420
|
-
pointer-events: none; // this fixes ios mobile devices top on selected item from the dropdown
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
</style>
|
package/src/i18n.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
dictionary,
|
|
3
|
-
locale,
|
|
4
|
-
addMessages,
|
|
5
|
-
_
|
|
6
|
-
} from 'svelte-i18n';
|
|
7
|
-
|
|
8
|
-
function setupI18n({ withLocale: _locale, translations }) {
|
|
9
|
-
locale.subscribe((data) => {
|
|
10
|
-
if (data == null) {
|
|
11
|
-
dictionary.set(translations);
|
|
12
|
-
locale.set(_locale);
|
|
13
|
-
}
|
|
14
|
-
}); // maybe we will need this to make sure that the i18n is set up only once
|
|
15
|
-
/*dictionary.set(translations);
|
|
16
|
-
locale.set(_locale);*/
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function addNewMessages(lang, dict) {
|
|
20
|
-
addMessages(lang, dict);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function setLocale(_locale) {
|
|
24
|
-
locale.set(_locale);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export { _, setupI18n, addNewMessages, setLocale };
|
package/src/index.ts
DELETED