@x-plat/design-system 0.5.4 → 0.5.5
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/components/Table/index.cjs +8 -2
- package/dist/components/Table/index.css +14 -0
- package/dist/components/Table/index.d.cts +2 -0
- package/dist/components/Table/index.d.ts +2 -0
- package/dist/components/Table/index.js +8 -2
- package/dist/components/Video/index.cjs +580 -37
- package/dist/components/Video/index.css +202 -20
- package/dist/components/Video/index.d.cts +11 -0
- package/dist/components/Video/index.d.ts +11 -0
- package/dist/components/Video/index.js +580 -37
- package/dist/components/index.cjs +440 -38
- package/dist/components/index.css +216 -20
- package/dist/components/index.js +440 -38
- package/dist/index.cjs +324 -38
- package/dist/index.css +216 -20
- package/dist/index.js +324 -38
- package/package.json +1 -1
|
@@ -14,11 +14,9 @@
|
|
|
14
14
|
max-height: 100%;
|
|
15
15
|
object-fit: contain;
|
|
16
16
|
vertical-align: middle;
|
|
17
|
-
}
|
|
18
|
-
.lib-xplat-video.custom-overlay > video {
|
|
19
17
|
cursor: pointer;
|
|
20
18
|
}
|
|
21
|
-
.lib-xplat-video
|
|
19
|
+
.lib-xplat-video > .center-play {
|
|
22
20
|
position: absolute;
|
|
23
21
|
top: 0;
|
|
24
22
|
left: 0;
|
|
@@ -32,9 +30,10 @@
|
|
|
32
30
|
cursor: pointer;
|
|
33
31
|
padding: 0;
|
|
34
32
|
color: var(--semantic-icon-inverse);
|
|
35
|
-
transition: opacity 0.2s ease
|
|
33
|
+
transition: opacity 0.2s ease;
|
|
34
|
+
pointer-events: none;
|
|
36
35
|
}
|
|
37
|
-
.lib-xplat-video
|
|
36
|
+
.lib-xplat-video > .center-play::before {
|
|
38
37
|
content: "";
|
|
39
38
|
position: absolute;
|
|
40
39
|
inset: 0;
|
|
@@ -42,31 +41,214 @@
|
|
|
42
41
|
opacity: 0;
|
|
43
42
|
transition: opacity 0.2s ease;
|
|
44
43
|
}
|
|
45
|
-
.lib-xplat-video.
|
|
46
|
-
.lib-xplat-video.custom-overlay > .play-overlay:focus-visible::before {
|
|
47
|
-
opacity: 1;
|
|
48
|
-
}
|
|
49
|
-
.lib-xplat-video.custom-overlay > .play-overlay:focus-visible {
|
|
50
|
-
outline: 2px solid var(--semantic-interaction-focus-ring);
|
|
51
|
-
outline-offset: 2px;
|
|
52
|
-
}
|
|
53
|
-
.lib-xplat-video.custom-overlay > .play-overlay > .play-icon {
|
|
44
|
+
.lib-xplat-video > .center-play > .center-play-icon {
|
|
54
45
|
position: relative;
|
|
55
46
|
z-index: 1;
|
|
56
47
|
display: flex;
|
|
57
|
-
align-items: center;
|
|
58
|
-
justify-content: center;
|
|
59
48
|
font-size: 64px;
|
|
60
49
|
filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
|
|
61
50
|
}
|
|
62
|
-
.lib-xplat-video
|
|
51
|
+
.lib-xplat-video > .center-play.is-playing {
|
|
63
52
|
opacity: 0;
|
|
64
|
-
pointer-events: none;
|
|
65
53
|
}
|
|
66
|
-
.lib-xplat-video
|
|
54
|
+
.lib-xplat-video > .center-play.is-loading .center-play-icon {
|
|
67
55
|
opacity: 0.6;
|
|
68
56
|
}
|
|
69
|
-
.lib-xplat-video
|
|
57
|
+
.lib-xplat-video > .controls {
|
|
58
|
+
position: absolute;
|
|
59
|
+
left: 0;
|
|
60
|
+
right: 0;
|
|
61
|
+
bottom: 0;
|
|
62
|
+
padding: var(--spacing-space-2) var(--spacing-space-3);
|
|
63
|
+
display: flex;
|
|
64
|
+
flex-direction: column;
|
|
65
|
+
gap: var(--spacing-space-1);
|
|
66
|
+
background:
|
|
67
|
+
linear-gradient(
|
|
68
|
+
to top,
|
|
69
|
+
rgba(0, 0, 0, 0.7),
|
|
70
|
+
rgba(0, 0, 0, 0));
|
|
71
|
+
color: var(--semantic-icon-inverse);
|
|
72
|
+
opacity: 0;
|
|
73
|
+
transition: opacity 0.2s ease;
|
|
74
|
+
pointer-events: none;
|
|
75
|
+
}
|
|
76
|
+
.lib-xplat-video:hover > .controls,
|
|
77
|
+
.lib-xplat-video:focus-within > .controls {
|
|
70
78
|
opacity: 1;
|
|
71
79
|
pointer-events: auto;
|
|
72
80
|
}
|
|
81
|
+
.lib-xplat-video .controls-row {
|
|
82
|
+
display: flex;
|
|
83
|
+
align-items: center;
|
|
84
|
+
gap: var(--spacing-space-2);
|
|
85
|
+
}
|
|
86
|
+
.lib-xplat-video .control-btn {
|
|
87
|
+
display: inline-flex;
|
|
88
|
+
align-items: center;
|
|
89
|
+
justify-content: center;
|
|
90
|
+
width: 32px;
|
|
91
|
+
height: 32px;
|
|
92
|
+
padding: 0;
|
|
93
|
+
border: none;
|
|
94
|
+
background: transparent;
|
|
95
|
+
color: inherit;
|
|
96
|
+
cursor: pointer;
|
|
97
|
+
border-radius: var(--spacing-radius-sm);
|
|
98
|
+
transition: background-color 0.15s ease;
|
|
99
|
+
}
|
|
100
|
+
.lib-xplat-video .control-btn:hover {
|
|
101
|
+
background-color: rgba(255, 255, 255, 0.15);
|
|
102
|
+
}
|
|
103
|
+
.lib-xplat-video .control-btn:focus-visible {
|
|
104
|
+
outline: 2px solid var(--semantic-interaction-focus-ring);
|
|
105
|
+
outline-offset: 2px;
|
|
106
|
+
}
|
|
107
|
+
.lib-xplat-video .controls-spacer {
|
|
108
|
+
margin-left: auto;
|
|
109
|
+
}
|
|
110
|
+
.lib-xplat-video .control-btn.is-active {
|
|
111
|
+
background-color: rgba(255, 255, 255, 0.25);
|
|
112
|
+
}
|
|
113
|
+
.lib-xplat-video .rate-group {
|
|
114
|
+
position: relative;
|
|
115
|
+
}
|
|
116
|
+
.lib-xplat-video .rate-group .rate-btn {
|
|
117
|
+
width: auto;
|
|
118
|
+
padding: 0 var(--spacing-space-2);
|
|
119
|
+
font-size: 12px;
|
|
120
|
+
font-weight: 600;
|
|
121
|
+
font-variant-numeric: tabular-nums;
|
|
122
|
+
}
|
|
123
|
+
.lib-xplat-video .rate-group .rate-menu {
|
|
124
|
+
position: absolute;
|
|
125
|
+
bottom: calc(100% + var(--spacing-space-1));
|
|
126
|
+
right: 0;
|
|
127
|
+
margin: 0;
|
|
128
|
+
padding: var(--spacing-space-1);
|
|
129
|
+
list-style: none;
|
|
130
|
+
background-color: rgba(0, 0, 0, 0.85);
|
|
131
|
+
border-radius: var(--spacing-radius-sm);
|
|
132
|
+
min-width: 64px;
|
|
133
|
+
}
|
|
134
|
+
.lib-xplat-video .rate-group .rate-menu .rate-item {
|
|
135
|
+
width: 100%;
|
|
136
|
+
padding: var(--spacing-space-1) var(--spacing-space-2);
|
|
137
|
+
border: none;
|
|
138
|
+
background: transparent;
|
|
139
|
+
color: inherit;
|
|
140
|
+
text-align: left;
|
|
141
|
+
cursor: pointer;
|
|
142
|
+
border-radius: var(--spacing-radius-xs);
|
|
143
|
+
font-size: 12px;
|
|
144
|
+
font-variant-numeric: tabular-nums;
|
|
145
|
+
}
|
|
146
|
+
.lib-xplat-video .rate-group .rate-menu .rate-item:hover {
|
|
147
|
+
background-color: rgba(255, 255, 255, 0.15);
|
|
148
|
+
}
|
|
149
|
+
.lib-xplat-video .rate-group .rate-menu .rate-item.is-active {
|
|
150
|
+
color: var(--semantic-surface-brand-default);
|
|
151
|
+
font-weight: 600;
|
|
152
|
+
}
|
|
153
|
+
.lib-xplat-video .time {
|
|
154
|
+
font-size: 12px;
|
|
155
|
+
font-variant-numeric: tabular-nums;
|
|
156
|
+
white-space: nowrap;
|
|
157
|
+
}
|
|
158
|
+
.lib-xplat-video .volume-group {
|
|
159
|
+
display: flex;
|
|
160
|
+
align-items: center;
|
|
161
|
+
}
|
|
162
|
+
.lib-xplat-video .volume-group .volume-slider {
|
|
163
|
+
width: 0;
|
|
164
|
+
opacity: 0;
|
|
165
|
+
transition: width 0.2s ease, opacity 0.2s ease;
|
|
166
|
+
}
|
|
167
|
+
.lib-xplat-video .volume-group:hover .volume-slider,
|
|
168
|
+
.lib-xplat-video .volume-group:focus-within .volume-slider {
|
|
169
|
+
width: 80px;
|
|
170
|
+
opacity: 1;
|
|
171
|
+
margin-left: var(--spacing-space-1);
|
|
172
|
+
}
|
|
173
|
+
.lib-xplat-video .seekbar,
|
|
174
|
+
.lib-xplat-video .volume-slider {
|
|
175
|
+
-webkit-appearance: none;
|
|
176
|
+
appearance: none;
|
|
177
|
+
background: transparent;
|
|
178
|
+
cursor: pointer;
|
|
179
|
+
}
|
|
180
|
+
.lib-xplat-video .seekbar:focus,
|
|
181
|
+
.lib-xplat-video .volume-slider:focus {
|
|
182
|
+
outline: none;
|
|
183
|
+
}
|
|
184
|
+
.lib-xplat-video .seekbar::-webkit-slider-thumb,
|
|
185
|
+
.lib-xplat-video .volume-slider::-webkit-slider-thumb {
|
|
186
|
+
-webkit-appearance: none;
|
|
187
|
+
appearance: none;
|
|
188
|
+
width: 12px;
|
|
189
|
+
height: 12px;
|
|
190
|
+
border-radius: 50%;
|
|
191
|
+
background: #fff;
|
|
192
|
+
border: none;
|
|
193
|
+
cursor: pointer;
|
|
194
|
+
}
|
|
195
|
+
.lib-xplat-video .seekbar::-moz-range-thumb,
|
|
196
|
+
.lib-xplat-video .volume-slider::-moz-range-thumb {
|
|
197
|
+
width: 12px;
|
|
198
|
+
height: 12px;
|
|
199
|
+
border-radius: 50%;
|
|
200
|
+
background: #fff;
|
|
201
|
+
border: none;
|
|
202
|
+
cursor: pointer;
|
|
203
|
+
}
|
|
204
|
+
.lib-xplat-video .seekbar {
|
|
205
|
+
width: 100%;
|
|
206
|
+
height: 4px;
|
|
207
|
+
}
|
|
208
|
+
.lib-xplat-video .seekbar::-webkit-slider-runnable-track {
|
|
209
|
+
height: 4px;
|
|
210
|
+
border-radius: 2px;
|
|
211
|
+
background:
|
|
212
|
+
linear-gradient(
|
|
213
|
+
to right,
|
|
214
|
+
var(--semantic-surface-brand-default) 0%,
|
|
215
|
+
var(--semantic-surface-brand-default) var(--progress, 0%),
|
|
216
|
+
rgba(255, 255, 255, 0.4) var(--progress, 0%),
|
|
217
|
+
rgba(255, 255, 255, 0.4) var(--buffered, 0%),
|
|
218
|
+
rgba(255, 255, 255, 0.2) var(--buffered, 0%),
|
|
219
|
+
rgba(255, 255, 255, 0.2) 100%);
|
|
220
|
+
}
|
|
221
|
+
.lib-xplat-video .seekbar::-moz-range-track {
|
|
222
|
+
height: 4px;
|
|
223
|
+
border-radius: 2px;
|
|
224
|
+
background: rgba(255, 255, 255, 0.2);
|
|
225
|
+
}
|
|
226
|
+
.lib-xplat-video .seekbar::-moz-range-progress {
|
|
227
|
+
height: 4px;
|
|
228
|
+
border-radius: 2px;
|
|
229
|
+
background: var(--semantic-surface-brand-default);
|
|
230
|
+
}
|
|
231
|
+
.lib-xplat-video .volume-slider {
|
|
232
|
+
height: 4px;
|
|
233
|
+
}
|
|
234
|
+
.lib-xplat-video .volume-slider::-webkit-slider-runnable-track {
|
|
235
|
+
height: 4px;
|
|
236
|
+
border-radius: 2px;
|
|
237
|
+
background:
|
|
238
|
+
linear-gradient(
|
|
239
|
+
to right,
|
|
240
|
+
#fff 0%,
|
|
241
|
+
#fff var(--volume, 0%),
|
|
242
|
+
rgba(255, 255, 255, 0.3) var(--volume, 0%),
|
|
243
|
+
rgba(255, 255, 255, 0.3) 100%);
|
|
244
|
+
}
|
|
245
|
+
.lib-xplat-video .volume-slider::-moz-range-track {
|
|
246
|
+
height: 4px;
|
|
247
|
+
border-radius: 2px;
|
|
248
|
+
background: rgba(255, 255, 255, 0.3);
|
|
249
|
+
}
|
|
250
|
+
.lib-xplat-video .volume-slider::-moz-range-progress {
|
|
251
|
+
height: 4px;
|
|
252
|
+
border-radius: 2px;
|
|
253
|
+
background: #fff;
|
|
254
|
+
}
|
|
@@ -3,6 +3,17 @@ import React from 'react';
|
|
|
3
3
|
interface VideoProps extends Omit<React.VideoHTMLAttributes<HTMLVideoElement>, "children" | "className" | "controls"> {
|
|
4
4
|
src: string;
|
|
5
5
|
poster?: string;
|
|
6
|
+
autoPlay?: boolean;
|
|
7
|
+
loop?: boolean;
|
|
8
|
+
muted?: boolean;
|
|
9
|
+
playsInline?: boolean;
|
|
10
|
+
showControls?: boolean;
|
|
11
|
+
showCenterPlay?: boolean;
|
|
12
|
+
playbackRates?: number[];
|
|
13
|
+
showCaptions?: boolean;
|
|
14
|
+
showPip?: boolean;
|
|
15
|
+
showDownload?: boolean;
|
|
16
|
+
downloadFileName?: string;
|
|
6
17
|
}
|
|
7
18
|
declare const Video: React.ForwardRefExoticComponent<VideoProps & React.RefAttributes<HTMLVideoElement>>;
|
|
8
19
|
|
|
@@ -3,6 +3,17 @@ import React from 'react';
|
|
|
3
3
|
interface VideoProps extends Omit<React.VideoHTMLAttributes<HTMLVideoElement>, "children" | "className" | "controls"> {
|
|
4
4
|
src: string;
|
|
5
5
|
poster?: string;
|
|
6
|
+
autoPlay?: boolean;
|
|
7
|
+
loop?: boolean;
|
|
8
|
+
muted?: boolean;
|
|
9
|
+
playsInline?: boolean;
|
|
10
|
+
showControls?: boolean;
|
|
11
|
+
showCenterPlay?: boolean;
|
|
12
|
+
playbackRates?: number[];
|
|
13
|
+
showCaptions?: boolean;
|
|
14
|
+
showPip?: boolean;
|
|
15
|
+
showDownload?: boolean;
|
|
16
|
+
downloadFileName?: string;
|
|
6
17
|
}
|
|
7
18
|
declare const Video: React.ForwardRefExoticComponent<VideoProps & React.RefAttributes<HTMLVideoElement>>;
|
|
8
19
|
|