@web-atoms/web-controls 2.4.61 → 2.4.62

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,222 @@
1
+ [data-video-player=video-player] {
2
+ display: grid;
3
+ grid-template-rows: auto 1fr auto auto auto;
4
+ grid-template-columns: auto 1fr auto;
5
+ overflow: hidden;
6
+
7
+ & > [data-element=banner] {
8
+
9
+ grid-row-start: 3;
10
+ grid-row-end: span 3;
11
+ grid-column-start: 1;
12
+ grid-column-end: span 3;
13
+
14
+ align-self: end;
15
+ justify-self: center;
16
+ height: 15%;
17
+
18
+ gap: 5px;
19
+
20
+ overflow: hidden;
21
+
22
+ grid-template-columns: auto 1fr;
23
+ grid-template-rows: auto auto;
24
+
25
+ background-color: black;
26
+ color: white;
27
+
28
+ border-radius: 10px;
29
+
30
+ padding: 10px;
31
+
32
+ align-items: center;
33
+ justify-items: stretch;
34
+ z-index: 2;
35
+
36
+ display: none;
37
+
38
+ &[data-has-logo=true] {
39
+ display: grid;
40
+ }
41
+
42
+ & > * {
43
+ min-height: 0;
44
+ min-width: 0;
45
+ }
46
+
47
+ & > [data-element=logo] {
48
+ grid-row: 1 / span 2;
49
+ grid-column: 1;
50
+ z-index: 2;
51
+ height: 100%;
52
+ }
53
+
54
+ & > [data-element=logo-title] {
55
+ grid-row-start: 1;
56
+ grid-column-start: 2;
57
+ z-index: 2;
58
+ font-weight: bold;
59
+ overflow: hidden;
60
+ white-space: nowrap;
61
+ text-overflow: ellipsis;
62
+ }
63
+
64
+ & > [data-element=logo-description] {
65
+ grid-row-start: 2;
66
+ grid-column-start: 2;
67
+ z-index: 2;
68
+ font-size: smaller;
69
+ overflow: hidden;
70
+ white-space: nowrap;
71
+ text-overflow: ellipsis;
72
+ }
73
+ }
74
+
75
+ & > [data-element=video], & > [data-element=poster] {
76
+ grid-row-start: 1;
77
+ grid-row-end: span 5;
78
+ grid-column-start: 1;
79
+ grid-column-end: span 3;
80
+ align-self: stretch;
81
+ justify-self: stretch;
82
+ }
83
+
84
+ & > [data-element=play-element] {
85
+ z-index: 10;
86
+ grid-row-start: 1;
87
+ grid-row-end: span 5;
88
+ grid-column-start: 1;
89
+ grid-column-end: span 3;
90
+ align-self: center;
91
+ justify-self: center;
92
+ flex-direction: row;
93
+ align-items: center;
94
+ justify-content: center;
95
+ gap: 4px;
96
+ display: flex;
97
+
98
+ & > button.play {
99
+ display: inline-flex;
100
+ align-items: center;
101
+ justify-content: center;
102
+ color: #ffffff;
103
+ background-color: #0000ff;
104
+ border-radius: 9999px;
105
+ font-size: 25px;
106
+ padding: 10px;
107
+ width: 50px;
108
+ height: 50px;
109
+ text-align: center;
110
+ vertical-align: middle;
111
+ & > i {
112
+ margin-left: 4px;
113
+ }
114
+ }
115
+ }
116
+
117
+ & > [data-element=progress] {
118
+ z-index: 11;
119
+ grid-row-start: 4;
120
+ grid-column-start: 1;
121
+ grid-column-end: span 3;
122
+ align-self: flex-end;
123
+ height: 15px;
124
+ padding-top: 5px;
125
+ padding-bottom: 5px;
126
+ justify-self: stretch;
127
+ background-color: rgba(0,0,0,0.3);
128
+ width: 100%;
129
+ cursor: pointer;
130
+ }
131
+
132
+ & > [data-element=toolbar] {
133
+ z-index: 10;
134
+ grid-row-start: 5;
135
+ grid-column-start: 1;
136
+ grid-column-end: span 3;
137
+ background-color: rgba(0,0,0,0.3);
138
+ color: #ffffff;
139
+ flex-direction: row;
140
+ align-items: center;
141
+ justify-content: flex-start;
142
+ gap: 4px;
143
+ display: flex;
144
+
145
+ & > * {
146
+ min-width: 20px;
147
+ margin-left: 5px;
148
+ padding: 5px;
149
+ }
150
+
151
+ & > [data-style=button] {
152
+ width: 30px;
153
+ height: 30px;
154
+ padding: 5px;
155
+ }
156
+
157
+ & > [data-font-size=small] {
158
+ font-size: x-small;
159
+ }
160
+
161
+ & > [data-element=volume-range] {
162
+ height: 2px;
163
+ color: #008000;
164
+ box-shadow: none;
165
+ border: none;
166
+ }
167
+
168
+ & > [data-element=volume-range]:focus {
169
+ box-shadow: none;
170
+ border: none;
171
+ }
172
+
173
+ & > [data-element=full-screen] {
174
+ margin-left: auto;
175
+ }
176
+
177
+ }
178
+
179
+ &[data-controls=true] {
180
+ & > [data-element=toolbar] {
181
+ display: flex;
182
+ }
183
+
184
+ & > [data-element=progress] {
185
+ display: flex;
186
+ }
187
+ }
188
+
189
+ &[data-state=playing] {
190
+ &[data-controls=false] {
191
+ & > [data-element=play-element], & > [data-element=progress], & > [data-element=toolbar] {
192
+ display: none;
193
+ }
194
+ }
195
+ }
196
+
197
+ &[data-state=waiting] {
198
+ &[data-controls=false] {
199
+ & > [data-element=toolbar], & > [data-element=progress] {
200
+ display: none;
201
+ }
202
+ }
203
+
204
+ & > [data-element=toolbar] {
205
+ & > [data-element=play] {
206
+ display: none;
207
+ }
208
+ }
209
+
210
+ & > [data-element=play-element] {
211
+ display: none;
212
+ }
213
+ }
214
+
215
+ &[data-state=paused] {
216
+ & > [data-element=toolbar] {
217
+ & > [data-element-pause] {
218
+ display: none;
219
+ }
220
+ }
221
+ }
222
+ }
@@ -4,236 +4,11 @@ import { BindableProperty } from "@web-atoms/core/dist/core/BindableProperty";
4
4
  import XNode from "@web-atoms/core/dist/core/XNode";
5
5
  import { AtomControl } from "@web-atoms/core/dist/web/controls/AtomControl";
6
6
  import { ChildEnumerator } from "@web-atoms/core/dist/web/core/AtomUI";
7
- import { installInputRangeStyle } from "./input-range-style";
8
- import styled from "@web-atoms/core/dist/style/styled";
9
7
 
10
8
  // check if it is a mobile..
11
9
  const isTouchEnabled = /android|iPhone|iPad/i.test(navigator.userAgent);
12
10
 
13
- styled.css `
14
-
15
- display: grid;
16
- grid-template-rows: auto 1fr auto auto auto;
17
- grid-template-columns: auto 1fr auto;
18
- overflow: hidden;
19
-
20
- & > [data-element=banner] {
21
-
22
- grid-row-start: 3;
23
- grid-row-end: span 3;
24
- grid-column-start: 1;
25
- grid-column-end: span 3;
26
-
27
- align-self: end;
28
- justify-self: center;
29
- height: 15%;
30
-
31
- gap: 5px;
32
-
33
- overflow: hidden;
34
-
35
- grid-template-columns: auto 1fr;
36
- grid-template-rows: auto auto;
37
-
38
- background-color: black;
39
- color: white;
40
-
41
- border-radius: 10px;
42
-
43
- padding: 10px;
44
-
45
- align-items: center;
46
- justify-items: stretch;
47
- z-index: 2;
48
-
49
- display: none;
50
-
51
- &[data-has-logo=true] {
52
- display: grid;
53
- }
54
-
55
- & > * {
56
- min-height: 0;
57
- min-width: 0;
58
- }
59
-
60
- & > [data-element=logo] {
61
- grid-row: 1 / span 2;
62
- grid-column: 1;
63
- z-index: 2;
64
- height: 100%;
65
- }
66
-
67
- & > [data-element=logo-title] {
68
- grid-row-start: 1;
69
- grid-column-start: 2;
70
- z-index: 2;
71
- font-weight: bold;
72
- overflow: hidden;
73
- white-space: nowrap;
74
- text-overflow: ellipsis;
75
- }
76
-
77
- & > [data-element=logo-description] {
78
- grid-row-start: 2;
79
- grid-column-start: 2;
80
- z-index: 2;
81
- font-size: smaller;
82
- overflow: hidden;
83
- white-space: nowrap;
84
- text-overflow: ellipsis;
85
- }
86
- }
87
-
88
- & > [data-element=video], & > [data-element=poster] {
89
- grid-row-start: 1;
90
- grid-row-end: span 5;
91
- grid-column-start: 1;
92
- grid-column-end: span 3;
93
- align-self: stretch;
94
- justify-self: stretch;
95
- }
96
-
97
- & > [data-element=play-element] {
98
- z-index: 10;
99
- grid-row-start: 1;
100
- grid-row-end: span 5;
101
- grid-column-start: 1;
102
- grid-column-end: span 3;
103
- align-self: center;
104
- justify-self: center;
105
- flex-direction: row;
106
- align-items: center;
107
- justify-content: center;
108
- gap: 4px;
109
- display: flex;
110
-
111
- & > button.play {
112
- display: inline-flex;
113
- align-items: center;
114
- justify-content: center;
115
- color: #ffffff;
116
- background-color: #0000ff;
117
- border-radius: 9999px;
118
- font-size: 25px;
119
- padding: 10px;
120
- width: 50px;
121
- height: 50px;
122
- text-align: center;
123
- vertical-align: middle;
124
- & > i {
125
- margin-left: 4px;
126
- }
127
- }
128
- }
129
-
130
- & > [data-element=progress] {
131
- z-index: 11;
132
- grid-row-start: 4;
133
- grid-column-start: 1;
134
- grid-column-end: span 3;
135
- align-self: flex-end;
136
- height: 15px;
137
- padding-top: 5px;
138
- padding-bottom: 5px;
139
- justify-self: stretch;
140
- background-color: rgba(0,0,0,0.3);
141
- width: 100%;
142
- cursor: pointer;
143
- }
144
-
145
- & > [data-element=toolbar] {
146
- z-index: 10;
147
- grid-row-start: 5;
148
- grid-column-start: 1;
149
- grid-column-end: span 3;
150
- background-color: rgba(0,0,0,0.3);
151
- color: #ffffff;
152
- flex-direction: row;
153
- align-items: center;
154
- justify-content: flex-start;
155
- gap: 4px;
156
- display: flex;
157
-
158
- & > * {
159
- min-width: 20px;
160
- margin-left: 5px;
161
- padding: 5px;
162
- }
163
-
164
- & > [data-style=button] {
165
- width: 30px;
166
- height: 30px;
167
- padding: 5px;
168
- }
169
-
170
- & > [data-font-size=small] {
171
- font-size: x-small;
172
- }
173
-
174
- & > [data-element=volume-range] {
175
- height: 2px;
176
- color: #008000;
177
- box-shadow: none;
178
- border: none;
179
- }
180
-
181
- & > [data-element=volume-range]:focus {
182
- box-shadow: none;
183
- border: none;
184
- }
185
-
186
- & > [data-element=full-screen] {
187
- margin-left: auto;
188
- }
189
-
190
- }
191
-
192
- &[data-controls=true] {
193
- & > [data-element=toolbar] {
194
- display: flex;
195
- }
196
-
197
- & > [data-element=progress] {
198
- display: flex;
199
- }
200
- }
201
-
202
- &[data-state=playing] {
203
- &[data-controls=false] {
204
- & > [data-element=play-element], & > [data-element=progress], & > [data-element=toolbar] {
205
- display: none;
206
- }
207
- }
208
- }
209
-
210
- &[data-state=waiting] {
211
- &[data-controls=false] {
212
- & > [data-element=toolbar], & > [data-element=progress] {
213
- display: none;
214
- }
215
- }
216
-
217
- & > [data-element=toolbar] {
218
- & > [data-element=play] {
219
- display: none;
220
- }
221
- }
222
-
223
- & > [data-element=play-element] {
224
- display: none;
225
- }
226
- }
227
-
228
- &[data-state=paused] {
229
- & > [data-element=toolbar] {
230
- & > [data-element-pause] {
231
- display: none;
232
- }
233
- }
234
- }
235
-
236
- `.installGlobal("[data-video-player=video-player]");
11
+ import "./AtomVideoPlayer.global.less";
237
12
 
238
13
  const gatherElements = (e: HTMLElement, data = {}) => {
239
14
  const ce = ChildEnumerator.enumerate(e);