@srgssr/share-button 0.1.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.
@@ -0,0 +1,223 @@
1
+ @import '@srgssr/svg-button/dist/svg-button.min.css';
2
+
3
+ .vjs-share-modal.vjs-modal-dialog {
4
+ position: absolute;
5
+ z-index: 50;
6
+ pointer-events: none;
7
+ inset: .666em 1.333em auto auto;
8
+ }
9
+
10
+ .vjs-share-modal.vjs-modal-dialog:not(.vjs-hidden) {
11
+ position: absolute;
12
+ display: flex;
13
+ align-items: center;
14
+ height: 100%;
15
+ padding: .6em 0;
16
+ background: rgb(22 22 22 / 95%);
17
+ border-radius: .4em;
18
+ inset: 0;
19
+ }
20
+
21
+ .vjs-share-toggle.vjs-control.vjs-button {
22
+ position: absolute;
23
+ top: .666em;
24
+ right: 1.333em;
25
+ color: #fff;
26
+ visibility: visible;
27
+ cursor: pointer;
28
+ opacity: 1;
29
+ transition: visibility .1s, opacity .1s;
30
+ }
31
+
32
+ .video-js.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-share-toggle.vjs-control.vjs-button {
33
+ opacity: 0;
34
+ transition: visibility 1s, opacity 1s;
35
+ pointer-events: none;
36
+ }
37
+
38
+ .vjs-share-modal .vjs-modal-dialog-content {
39
+ position: relative;
40
+ top: auto;
41
+ left: auto;
42
+ width: 100%;
43
+ max-width: 28em;
44
+ height: auto;
45
+ max-height: 100%;
46
+ margin: auto;
47
+ padding: 1.4em 1.2em 3.7em;
48
+ overflow: hidden;
49
+ border-radius: .4em;
50
+ pointer-events: auto;
51
+ }
52
+
53
+ .vjs-share-modal .vjs-close-button {
54
+ position: absolute;
55
+ top: .45em;
56
+ right: max(
57
+ 1.333em,
58
+ calc((100% - 28em) / 2 + 1.333em)
59
+ );
60
+ z-index: 2;
61
+ display: none;
62
+ width: 2.6em;
63
+ height: 2.4em;
64
+ padding: 0;
65
+ color: #fff;
66
+ font-size: 1.1em;
67
+ line-height: 2.4em;
68
+ text-decoration: none;
69
+ cursor: pointer;
70
+ pointer-events: auto;
71
+ }
72
+
73
+ .vjs-share-modal.vjs-modal-dialog:not(.vjs-hidden) .vjs-close-button {
74
+ display: block;
75
+ }
76
+
77
+ .vjs-share-modal .vjs-close-button .vjs-svg-icon {
78
+ width: 1.35em;
79
+ height: 1.35em;
80
+ }
81
+
82
+ .vjs-share-title {
83
+ font-weight: 500;
84
+ font-size: 1.1em;
85
+ line-height: 22px;
86
+ }
87
+
88
+ .vjs-share-modal .vjs-title-bar.vjs-share-title {
89
+ padding-bottom: 0;
90
+ padding-left: 0;
91
+ background: none;
92
+ }
93
+
94
+ .vjs-share-url-options {
95
+ display: flex;
96
+ gap: .5rem;
97
+ margin: 1.1em 0;
98
+ }
99
+
100
+ .vjs-share-url-option-label {
101
+ display: flex;
102
+ align-items: center;
103
+ width: auto;
104
+ margin-right: 1em;
105
+ font-size: .8em;
106
+ line-height: 1.2em;
107
+ outline: none;
108
+ cursor: pointer;
109
+ }
110
+
111
+ .vjs-share-url-option-input:focus-visible,
112
+ .vjs-share-button:focus-visible {
113
+ outline: 2px solid #fff;
114
+ outline-offset: 2px;
115
+ }
116
+
117
+ .vjs-share-url-option-input {
118
+ width: 1.2em;
119
+ height: 1.2em;
120
+ margin: 0 .3em .1em 0;
121
+ background-color: rgb(51 51 51);
122
+ border: .1em solid #fff;
123
+ border-radius: 50%;
124
+ cursor: pointer;
125
+ appearance: none;
126
+ }
127
+
128
+ .vjs-share-url-option-input:checked {
129
+ background-image: radial-gradient(circle, #fff 0 42%, transparent 44%);
130
+ }
131
+
132
+ .vjs-share-button-collection {
133
+ display: flex;
134
+ flex-wrap: wrap;
135
+ gap: .9em 0;
136
+ align-items: flex-start;
137
+ justify-content: center;
138
+ }
139
+
140
+ .vjs-share-button-collection .vjs-share-button {
141
+ display: flex;
142
+ flex: 0 0 25%;
143
+ flex-direction: column;
144
+ align-items: center;
145
+ margin: 1.2em 0 0;
146
+ color: #fff;
147
+ text-decoration: none;
148
+ outline: none;
149
+ cursor: pointer;
150
+ }
151
+
152
+ .vjs-share-button .vjs-icon-placeholder {
153
+ display: flex;
154
+ flex: none;
155
+ align-items: center;
156
+ justify-content: center;
157
+ width: 1.6em;
158
+ height: 1.6em;
159
+ font-size: 2em;
160
+ background-color: #333;
161
+ border-radius: 50%;
162
+ }
163
+
164
+ .vjs-share-button .vjs-icon-placeholder svg {
165
+ display: block;
166
+ width: .8em;
167
+ height: .8em;
168
+ }
169
+
170
+ .vjs-share-button-title {
171
+ display: none;
172
+ order: 1;
173
+ text-align: center;
174
+ }
175
+
176
+ .vjs-layout-medium .vjs-share-modal.vjs-modal-dialog:not(.vjs-hidden),
177
+ .vjs-layout-large .vjs-share-modal.vjs-modal-dialog:not(.vjs-hidden),
178
+ .vjs-layout-x-large .vjs-share-modal.vjs-modal-dialog:not(.vjs-hidden) {
179
+ width: fit-content;
180
+ max-width: calc(100% - 3.2em);
181
+ height: auto;
182
+ padding: 0;
183
+ inset: 1em 1.5em auto auto;
184
+ }
185
+
186
+ .vjs-layout-medium .vjs-share-modal .vjs-modal-dialog-content,
187
+ .vjs-layout-large .vjs-share-modal .vjs-modal-dialog-content,
188
+ .vjs-layout-x-large .vjs-share-modal .vjs-modal-dialog-content {
189
+ bottom: 0;
190
+ left: 0;
191
+ width: fit-content;
192
+ max-width: 100%;
193
+ padding: 1.4em 1.2em 2em;
194
+ overflow: hidden;
195
+ pointer-events: auto;
196
+ }
197
+
198
+ .vjs-layout-medium .vjs-share-title,
199
+ .vjs-layout-large .vjs-share-title,
200
+ .vjs-layout-x-large .vjs-share-title {
201
+ margin-top: 0;
202
+ }
203
+
204
+ .vjs-layout-medium .vjs-share-url-options,
205
+ .vjs-layout-large .vjs-share-url-options,
206
+ .vjs-layout-x-large .vjs-share-url-options {
207
+ margin-top: 1.3rem;
208
+ margin-bottom: 1.9em;
209
+ }
210
+
211
+ .vjs-layout-medium .vjs-share-modal .vjs-close-button,
212
+ .vjs-layout-large .vjs-share-modal .vjs-close-button,
213
+ .vjs-layout-x-large .vjs-share-modal .vjs-close-button {
214
+ inset: .45em .55em auto auto;
215
+ }
216
+
217
+ .vjs-layout-large .vjs-share-button-title,
218
+ .vjs-layout-x-large .vjs-share-button-title {
219
+ display: block;
220
+ margin-top: .8em;
221
+ font-size: 1.1em;
222
+ line-height: 1.4em;
223
+ }