@smwb/ui-styles 1.0.0 → 1.0.2
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.smwb-carousel {
|
|
2
|
-
max-width: 412px;
|
|
2
|
+
max-width: var(--smwb-carousel-max-width, 412px);
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
.smwb-carousel__inner {
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
overflow: hidden;
|
|
12
12
|
|
|
13
13
|
cursor: pointer;
|
|
14
|
-
margin-left: -4px;
|
|
15
|
-
margin-right: -4px;
|
|
14
|
+
margin-left: calc(-1 * var(--smwb-carousel-gap, 4px));
|
|
15
|
+
margin-right: calc(-1 * var(--smwb-carousel-gap, 4px));
|
|
16
16
|
// Capture horizontal swipes for navigation while still allowing
|
|
17
17
|
// the page to scroll vertically over the carousel on touch.
|
|
18
18
|
touch-action: pan-y;
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
|
|
28
28
|
.smwb-carousel__slide {
|
|
29
29
|
flex-shrink: 0;
|
|
30
|
-
padding-left: 4px;
|
|
31
|
-
padding-right: 4px;
|
|
30
|
+
padding-left: var(--smwb-carousel-gap, 4px);
|
|
31
|
+
padding-right: var(--smwb-carousel-gap, 4px);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
.smwb-carousel__slide-inner {
|
|
@@ -36,12 +36,17 @@
|
|
|
36
36
|
overflow: hidden;
|
|
37
37
|
will-change: width;
|
|
38
38
|
|
|
39
|
+
&_clickable {
|
|
40
|
+
cursor: zoom-in;
|
|
41
|
+
}
|
|
42
|
+
|
|
39
43
|
img {
|
|
40
|
-
height: 205px;
|
|
41
|
-
aspect-ratio: 0.9;
|
|
44
|
+
height: var(--smwb-carousel-cell-height, 205px);
|
|
45
|
+
aspect-ratio: var(--smwb-carousel-aspect-ratio, 0.9);
|
|
42
46
|
object-fit: cover;
|
|
43
47
|
width: 100%;
|
|
44
48
|
user-select: none;
|
|
49
|
+
-webkit-user-drag: none;
|
|
45
50
|
}
|
|
46
51
|
}
|
|
47
52
|
|
|
@@ -73,3 +78,59 @@
|
|
|
73
78
|
align-items: center;
|
|
74
79
|
justify-content: center;
|
|
75
80
|
}
|
|
81
|
+
|
|
82
|
+
// ---- Fullscreen lightbox ------------------------------------------------
|
|
83
|
+
|
|
84
|
+
.smwb-carousel__fullscreen-content {
|
|
85
|
+
position: relative;
|
|
86
|
+
width: 100%;
|
|
87
|
+
height: 100%;
|
|
88
|
+
display: flex;
|
|
89
|
+
align-items: center;
|
|
90
|
+
justify-content: center;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.smwb-carousel__fullscreen-stage {
|
|
94
|
+
display: flex;
|
|
95
|
+
align-items: center;
|
|
96
|
+
justify-content: center;
|
|
97
|
+
max-width: 100%;
|
|
98
|
+
max-height: 100%;
|
|
99
|
+
|
|
100
|
+
img {
|
|
101
|
+
max-width: 96vw;
|
|
102
|
+
max-height: 92vh;
|
|
103
|
+
width: auto;
|
|
104
|
+
height: auto;
|
|
105
|
+
object-fit: contain;
|
|
106
|
+
user-select: none;
|
|
107
|
+
-webkit-user-drag: none;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.smwb-carousel__fullscreen-arrow,
|
|
112
|
+
.smwb-carousel__fullscreen-close {
|
|
113
|
+
position: absolute;
|
|
114
|
+
z-index: 1;
|
|
115
|
+
cursor: pointer;
|
|
116
|
+
color: #fff;
|
|
117
|
+
filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.smwb-carousel__fullscreen-arrow {
|
|
121
|
+
top: 50%;
|
|
122
|
+
transform: translateY(-50%);
|
|
123
|
+
|
|
124
|
+
&_prev {
|
|
125
|
+
left: 16px;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
&_next {
|
|
129
|
+
right: 16px;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.smwb-carousel__fullscreen-close {
|
|
134
|
+
top: 16px;
|
|
135
|
+
right: 16px;
|
|
136
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smwb/ui-styles",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Framework-agnostic LESS design tokens and component styles (smwb-*) shared by the @smwb UI libraries. Prebuilt aggregate CSS lives in @smwb/ui-css.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"sideEffects": [
|
|
@@ -17,5 +17,11 @@
|
|
|
17
17
|
"./headless-base.less": "./less/headless-base.less",
|
|
18
18
|
"./less/*": "./less/*",
|
|
19
19
|
"./package.json": "./package.json"
|
|
20
|
+
},
|
|
21
|
+
"homepage": "https://sourcecraft.dev/elfenmail/ui",
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "git+https://git.sourcecraft.dev/elfenmail/ui.git",
|
|
25
|
+
"directory": "packages/styles"
|
|
20
26
|
}
|
|
21
27
|
}
|