@everymatrix/casino-slider 0.0.157 → 0.0.161
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/casino-slider.js +4386 -271
- package/dist/casino-slider.js.map +1 -1
- package/package.json +2 -2
- package/src/CasinoSlider.svelte +25 -6
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@everymatrix/casino-slider",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.161",
|
4
4
|
"main": "dist/casino-slider.js",
|
5
5
|
"svelte": "src/index.ts",
|
6
6
|
"scripts": {
|
@@ -36,5 +36,5 @@
|
|
36
36
|
"publishConfig": {
|
37
37
|
"access": "public"
|
38
38
|
},
|
39
|
-
"gitHead": "
|
39
|
+
"gitHead": "d734e5f1b488eaca6400399db42f53fefb48bdb0"
|
40
40
|
}
|
package/src/CasinoSlider.svelte
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
<script lang="typescript">
|
4
4
|
import { onMount } from 'svelte';
|
5
|
+
import { getDevice } from 'rvhelper';
|
5
6
|
|
6
7
|
export let sliderdata:Array<any> = [];
|
7
8
|
export let onclickeventname:string = 'defaultEvent';
|
@@ -10,6 +11,10 @@
|
|
10
11
|
export let clientstyling:string = '';
|
11
12
|
export let clientstylingurl:string = '';
|
12
13
|
export let identity:string = '';
|
14
|
+
export let containermaxwidth:string = '';
|
15
|
+
|
16
|
+
let userAgent:String = window.navigator.userAgent;
|
17
|
+
let isMobile = (getDevice(userAgent) === 'PC') ? false : true;
|
13
18
|
|
14
19
|
let carousel:any;
|
15
20
|
let active:number;
|
@@ -79,8 +84,8 @@
|
|
79
84
|
$: clientstylingurl && setClientStylingURL();
|
80
85
|
</script>
|
81
86
|
|
82
|
-
<div bind:this={customStylingContainer}>
|
83
|
-
<div class="CarouselContainer { (location === 'headerMain') ? 'CarouselContainerHeaderMain' : '' }">
|
87
|
+
<div class="CarouselWrapper { (location === 'headerMain') ? 'CarouselWrapperHeaderMain' : '' }" bind:this={customStylingContainer}>
|
88
|
+
<div class="CarouselContainer {isMobile ? 'CarouselContainerMobile' : ''} { (location === 'headerMain') ? 'CarouselContainerHeaderMain' : '' }" style="{ (location === 'headerMain') ? 'max-width: auto' : `max-width: ${containermaxwidth}px` }">
|
84
89
|
<div class="CarouselLeftArrow" on:click="{() => scrollLeft()}">
|
85
90
|
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
86
91
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7"></path>
|
@@ -125,16 +130,27 @@
|
|
125
130
|
font-family: 'Helvetica Neue', 'Helvetica', sans-serif;
|
126
131
|
}
|
127
132
|
|
133
|
+
.CarouselWrapper {
|
134
|
+
background: #D0046C; /* fallback for old browsers */
|
135
|
+
background: -webkit-linear-gradient(to left, #FD2839, #D0046C); /* Chrome 10-25, Safari 5.1-6 */
|
136
|
+
background: linear-gradient(to left, #FD2839, #D0046C); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
|
137
|
+
&.CarouselWrapperHeaderMain {
|
138
|
+
background: transparent;
|
139
|
+
}
|
140
|
+
}
|
141
|
+
|
128
142
|
.CarouselContainer {
|
129
143
|
display: flex;
|
130
144
|
flex-direction: row;
|
131
145
|
flex-wrap: nowrap;
|
132
|
-
justify-content:
|
146
|
+
justify-content: center;
|
133
147
|
width: 100%;
|
134
|
-
background: #D0046C; /* fallback for old browsers */
|
135
|
-
background: -webkit-linear-gradient(to left, #FD2839, #D0046C); /* Chrome 10-25, Safari 5.1-6 */
|
136
|
-
background: linear-gradient(to left, #FD2839, #D0046C); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
|
137
148
|
color: #ffffff;
|
149
|
+
margin: 0 auto;
|
150
|
+
padding: 0 10px;
|
151
|
+
&.CarouselContainerMobile {
|
152
|
+
padding: 0;
|
153
|
+
}
|
138
154
|
|
139
155
|
.CarouselItems {
|
140
156
|
display: flex;
|
@@ -159,6 +175,7 @@
|
|
159
175
|
text-align: center;
|
160
176
|
line-height: ttp(1.6);
|
161
177
|
transition: all 150ms ease-in-out;
|
178
|
+
white-space: nowrap;
|
162
179
|
|
163
180
|
&:hover,
|
164
181
|
&.active {
|
@@ -206,6 +223,8 @@
|
|
206
223
|
|
207
224
|
.CarouselContainerHeaderMain {
|
208
225
|
background: transparent;
|
226
|
+
margin: 0;
|
227
|
+
padding: 0;
|
209
228
|
.CarouselLeftArrow, .CarouselRightArrow {
|
210
229
|
background: transparent;
|
211
230
|
width: unset;
|