mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
Flatten workspace (#120)
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
export * as MediaFullscreenEnterIcon from './media-fullscreen-enter-icon';
|
||||
export * as MediaFullscreenExitIcon from './media-fullscreen-exit-icon';
|
||||
export * as MediaPauseIcon from './media-pause-icon';
|
||||
export * as MediaPlayIcon from './media-play-icon';
|
||||
export * as MediaVolumeHighIcon from './media-volume-high-icon';
|
||||
export * as MediaVolumeLowIcon from './media-volume-low-icon';
|
||||
export * as MediaVolumeOffIcon from './media-volume-off-icon';
|
||||
@@ -0,0 +1,26 @@
|
||||
export function getTemplateHTML() {
|
||||
return /* html */ `
|
||||
<style>
|
||||
:host {
|
||||
display: inline-block;
|
||||
}
|
||||
svg {
|
||||
fill: currentColor;
|
||||
}
|
||||
</style>
|
||||
`;
|
||||
}
|
||||
|
||||
export class MediaChromeIcon extends HTMLElement {
|
||||
static shadowRootOptions = { mode: 'open' as ShadowRootMode };
|
||||
static getTemplateHTML: () => string = getTemplateHTML;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
if (!this.shadowRoot) {
|
||||
this.attachShadow((this.constructor as typeof MediaChromeIcon).shadowRootOptions);
|
||||
this.shadowRoot!.innerHTML = (this.constructor as typeof MediaChromeIcon).getTemplateHTML();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import { SVG_ICONS } from '@vjs-10/icons';
|
||||
|
||||
import { MediaChromeIcon } from './media-chrome-icon';
|
||||
|
||||
export function getTemplateHTML() {
|
||||
return /* html */ `
|
||||
${MediaChromeIcon.getTemplateHTML()}
|
||||
<style>
|
||||
:host {
|
||||
display: var(--media-fullscreen-enter-icon-display, inline-flex);
|
||||
}
|
||||
</style>
|
||||
${SVG_ICONS.fullscreenEnter}
|
||||
`;
|
||||
}
|
||||
|
||||
export class MediaFullscreenEnterIcon extends MediaChromeIcon {
|
||||
static getTemplateHTML: () => string = getTemplateHTML;
|
||||
}
|
||||
|
||||
customElements.define('media-fullscreen-enter-icon', MediaFullscreenEnterIcon);
|
||||
@@ -0,0 +1,21 @@
|
||||
import { SVG_ICONS } from '@vjs-10/icons';
|
||||
|
||||
import { MediaChromeIcon } from './media-chrome-icon';
|
||||
|
||||
export function getTemplateHTML() {
|
||||
return /* html */ `
|
||||
${MediaChromeIcon.getTemplateHTML()}
|
||||
<style>
|
||||
:host {
|
||||
display: var(--media-fullscreen-exit-icon-display, inline-flex);
|
||||
}
|
||||
</style>
|
||||
${SVG_ICONS.fullscreenExit}
|
||||
`;
|
||||
}
|
||||
|
||||
export class MediaFullscreenExitIcon extends MediaChromeIcon {
|
||||
static getTemplateHTML: () => string = getTemplateHTML;
|
||||
}
|
||||
|
||||
customElements.define('media-fullscreen-exit-icon', MediaFullscreenExitIcon);
|
||||
@@ -0,0 +1,16 @@
|
||||
import { SVG_ICONS } from '@vjs-10/icons';
|
||||
|
||||
import { MediaChromeIcon } from './media-chrome-icon';
|
||||
|
||||
export function getTemplateHTML() {
|
||||
return /* html */ `
|
||||
${MediaChromeIcon.getTemplateHTML()}
|
||||
${SVG_ICONS.pause}
|
||||
`;
|
||||
}
|
||||
|
||||
export class MediaPauseIcon extends MediaChromeIcon {
|
||||
static getTemplateHTML: () => string = getTemplateHTML;
|
||||
}
|
||||
|
||||
customElements.define('media-pause-icon', MediaPauseIcon);
|
||||
@@ -0,0 +1,21 @@
|
||||
import { SVG_ICONS } from '@vjs-10/icons';
|
||||
|
||||
import { MediaChromeIcon } from './media-chrome-icon';
|
||||
|
||||
export function getTemplateHTML() {
|
||||
return /* html */ `
|
||||
${MediaChromeIcon.getTemplateHTML()}
|
||||
<style>
|
||||
:host {
|
||||
display: var(--media-play-icon-display, inline-flex);
|
||||
}
|
||||
</style>
|
||||
${SVG_ICONS.play}
|
||||
`;
|
||||
}
|
||||
|
||||
export class MediaPlayIcon extends MediaChromeIcon {
|
||||
static getTemplateHTML: () => string = getTemplateHTML;
|
||||
}
|
||||
|
||||
customElements.define('media-play-icon', MediaPlayIcon);
|
||||
@@ -0,0 +1,21 @@
|
||||
import { SVG_ICONS } from '@vjs-10/icons';
|
||||
|
||||
import { MediaChromeIcon } from './media-chrome-icon';
|
||||
|
||||
export function getTemplateHTML() {
|
||||
return /* html */ `
|
||||
${MediaChromeIcon.getTemplateHTML()}
|
||||
<style>
|
||||
:host {
|
||||
display: var(--media-play-icon-display, inline-flex);
|
||||
}
|
||||
</style>
|
||||
${SVG_ICONS.volumeHigh}
|
||||
`;
|
||||
}
|
||||
|
||||
export class MediaVolumeHighIcon extends MediaChromeIcon {
|
||||
static getTemplateHTML: () => string = getTemplateHTML;
|
||||
}
|
||||
|
||||
customElements.define('media-volume-high-icon', MediaVolumeHighIcon);
|
||||
@@ -0,0 +1,21 @@
|
||||
import { SVG_ICONS } from '@vjs-10/icons';
|
||||
|
||||
import { MediaChromeIcon } from './media-chrome-icon';
|
||||
|
||||
export function getTemplateHTML() {
|
||||
return /* html */ `
|
||||
${MediaChromeIcon.getTemplateHTML()}
|
||||
<style>
|
||||
:host {
|
||||
display: var(--media-play-icon-display, inline-flex);
|
||||
}
|
||||
</style>
|
||||
${SVG_ICONS.volumeLow}
|
||||
`;
|
||||
}
|
||||
|
||||
export class MediaVolumeLowIcon extends MediaChromeIcon {
|
||||
static getTemplateHTML: () => string = getTemplateHTML;
|
||||
}
|
||||
|
||||
customElements.define('media-volume-low-icon', MediaVolumeLowIcon);
|
||||
@@ -0,0 +1,21 @@
|
||||
import { SVG_ICONS } from '@vjs-10/icons';
|
||||
|
||||
import { MediaChromeIcon } from './media-chrome-icon';
|
||||
|
||||
export function getTemplateHTML() {
|
||||
return /* html */ `
|
||||
${MediaChromeIcon.getTemplateHTML()}
|
||||
<style>
|
||||
:host {
|
||||
display: var(--media-play-icon-display, inline-flex);
|
||||
}
|
||||
</style>
|
||||
${SVG_ICONS.volumeOff}
|
||||
`;
|
||||
}
|
||||
|
||||
export class MediaVolumeOffIcon extends MediaChromeIcon {
|
||||
static getTemplateHTML: () => string = getTemplateHTML;
|
||||
}
|
||||
|
||||
customElements.define('media-volume-off-icon', MediaVolumeOffIcon);
|
||||
Reference in New Issue
Block a user