@streamscloud/kit 0.11.1 → 0.11.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,4 +1,5 @@
|
|
|
1
|
-
<script lang="ts">import {
|
|
1
|
+
<script lang="ts">import { Duration } from '../duration';
|
|
2
|
+
import { Icon } from '../icon';
|
|
2
3
|
import { Image } from '../image';
|
|
3
4
|
import { PlaybackManager } from '../media-playback';
|
|
4
5
|
import { Carousel } from '../player/carousel';
|
|
@@ -78,7 +79,9 @@ const onCarouselIndexChanged = (index) => {
|
|
|
78
79
|
{/if}
|
|
79
80
|
|
|
80
81
|
{#if duration}
|
|
81
|
-
<span class="grid-card-media__duration">
|
|
82
|
+
<span class="grid-card-media__duration-anchor">
|
|
83
|
+
<Duration seconds={duration} variant="badge" />
|
|
84
|
+
</span>
|
|
82
85
|
{/if}
|
|
83
86
|
</ProportionalContainer>
|
|
84
87
|
</div>
|
|
@@ -141,17 +144,10 @@ playable (preserves card height). Optional `duration` overlay renders bottom-rig
|
|
|
141
144
|
height: 100%;
|
|
142
145
|
background-color: light-dark(#ffffff, #000000);
|
|
143
146
|
}
|
|
144
|
-
.grid-card-media__duration {
|
|
147
|
+
.grid-card-media__duration-anchor {
|
|
145
148
|
position: absolute;
|
|
146
149
|
bottom: 0.5rem;
|
|
147
150
|
right: 0.5rem;
|
|
148
|
-
background: light-dark(rgba(255, 255, 255, 0.9), rgba(0, 0, 0, 0.7));
|
|
149
|
-
color: var(--sc-kit--color--text--secondary);
|
|
150
|
-
padding: 0.125rem 0.375rem;
|
|
151
|
-
border-radius: 0.125rem;
|
|
152
|
-
font-size: 0.75rem;
|
|
153
|
-
font-weight: var(--sc-kit--font-weight--medium);
|
|
154
|
-
line-height: var(--sc-kit--leading--normal);
|
|
155
151
|
z-index: 1;
|
|
156
152
|
}
|
|
157
153
|
|
|
@@ -13,8 +13,8 @@ type Props = {
|
|
|
13
13
|
objectFit?: ObjectFit;
|
|
14
14
|
/** @default true */
|
|
15
15
|
showSeekBar?: boolean;
|
|
16
|
-
/**
|
|
17
|
-
duration?:
|
|
16
|
+
/** Duration in seconds; rendered as a badge overlay at the bottom-right of the media. `≤ 0` / `undefined` renders nothing. */
|
|
17
|
+
duration?: number;
|
|
18
18
|
};
|
|
19
19
|
/**
|
|
20
20
|
* Media slot for `GridCard`. Renders an empty placeholder, a single `Image` / `VideoPlayer`, or
|