@deriv-web-design/ui 0.1.19 → 0.1.20
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/components.manifest.json +20 -0
- package/dist/index.d.mts +22 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2696,6 +2696,7 @@ var ChevronRight2 = () => /* @__PURE__ */ jsx28(
|
|
|
2696
2696
|
)
|
|
2697
2697
|
}
|
|
2698
2698
|
);
|
|
2699
|
+
var DEFAULT_MEDIA_SIZES = "(min-width: 992px) 50vw, 100vw";
|
|
2699
2700
|
function mediaSrc(item) {
|
|
2700
2701
|
return typeof item.mediaUrl === "string" && item.mediaUrl !== "" ? item.mediaUrl : null;
|
|
2701
2702
|
}
|
|
@@ -2719,6 +2720,10 @@ var MediaRenderer = ({ item, active, rootMargin, threshold }) => {
|
|
|
2719
2720
|
"img",
|
|
2720
2721
|
{
|
|
2721
2722
|
src: item.posterUrl,
|
|
2723
|
+
...item.posterSrcSet ? {
|
|
2724
|
+
srcSet: item.posterSrcSet,
|
|
2725
|
+
sizes: item.posterSizes ?? DEFAULT_MEDIA_SIZES
|
|
2726
|
+
} : {},
|
|
2722
2727
|
alt: "",
|
|
2723
2728
|
"aria-hidden": "true",
|
|
2724
2729
|
loading: "lazy",
|
|
@@ -2732,6 +2737,7 @@ var MediaRenderer = ({ item, active, rootMargin, threshold }) => {
|
|
|
2732
2737
|
"img",
|
|
2733
2738
|
{
|
|
2734
2739
|
src,
|
|
2740
|
+
...item.mediaSrcSet ? { srcSet: item.mediaSrcSet, sizes: item.mediaSizes ?? DEFAULT_MEDIA_SIZES } : {},
|
|
2735
2741
|
alt: item.title,
|
|
2736
2742
|
loading: "lazy",
|
|
2737
2743
|
decoding: "async"
|