denwa-web-shared 1.0.17 → 1.0.19

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.
@@ -6645,13 +6645,16 @@ const BasePicture = ({
6645
6645
  image2x,
6646
6646
  image1xWebp,
6647
6647
  image2xWebp,
6648
+ image1xAvif,
6649
+ image2xAvif,
6648
6650
  mobileImage1x,
6649
6651
  mobileImage2x,
6650
6652
  mobileImage1xWebp,
6651
6653
  mobileImage2xWebp,
6654
+ mobileImage1xAvif,
6655
+ mobileImage2xAvif,
6652
6656
  type,
6653
6657
  alt,
6654
- bgColorClass,
6655
6658
  mobileMaxWidth = 450,
6656
6659
  loading = "lazy",
6657
6660
  ...pictureProps
@@ -6673,6 +6676,14 @@ const BasePicture = ({
6673
6676
  type: "image/webp"
6674
6677
  }
6675
6678
  ),
6679
+ mobileImage1xAvif && /* @__PURE__ */ jsxRuntime.jsx(
6680
+ "source",
6681
+ {
6682
+ srcSet: `${mobileImage1xAvif} 1x${mobileImage2xAvif ? `, ${mobileImage2xAvif} 2x` : ""}`,
6683
+ media: `(max-width: ${mobileMaxWidth}px)`,
6684
+ type: "image/avif"
6685
+ }
6686
+ ),
6676
6687
  image1xWebp && /* @__PURE__ */ jsxRuntime.jsx(
6677
6688
  "source",
6678
6689
  {
@@ -6680,13 +6691,20 @@ const BasePicture = ({
6680
6691
  type: "image/webp"
6681
6692
  }
6682
6693
  ),
6694
+ image1xAvif && /* @__PURE__ */ jsxRuntime.jsx(
6695
+ "source",
6696
+ {
6697
+ srcSet: `${image1xAvif} 1x${image2xAvif ? `, ${image2xAvif} 2x` : ""}`,
6698
+ type: "image/avif"
6699
+ }
6700
+ ),
6683
6701
  /* @__PURE__ */ jsxRuntime.jsx("source", { srcSet: `${image1x} 1x${image2x ? `, ${image2x} 2x` : ""}`, type }),
6684
6702
  /* @__PURE__ */ jsxRuntime.jsx(
6685
6703
  "img",
6686
6704
  {
6687
6705
  ...imgProps,
6688
- className: cn(bgColorClass, imgProps == null ? void 0 : imgProps.className),
6689
- src: image1xWebp ? image1xWebp : image1x,
6706
+ className: imgProps == null ? void 0 : imgProps.className,
6707
+ src: image1x,
6690
6708
  alt,
6691
6709
  loading
6692
6710
  }
@@ -6643,13 +6643,16 @@ const BasePicture = ({
6643
6643
  image2x,
6644
6644
  image1xWebp,
6645
6645
  image2xWebp,
6646
+ image1xAvif,
6647
+ image2xAvif,
6646
6648
  mobileImage1x,
6647
6649
  mobileImage2x,
6648
6650
  mobileImage1xWebp,
6649
6651
  mobileImage2xWebp,
6652
+ mobileImage1xAvif,
6653
+ mobileImage2xAvif,
6650
6654
  type,
6651
6655
  alt,
6652
- bgColorClass,
6653
6656
  mobileMaxWidth = 450,
6654
6657
  loading = "lazy",
6655
6658
  ...pictureProps
@@ -6671,6 +6674,14 @@ const BasePicture = ({
6671
6674
  type: "image/webp"
6672
6675
  }
6673
6676
  ),
6677
+ mobileImage1xAvif && /* @__PURE__ */ jsx(
6678
+ "source",
6679
+ {
6680
+ srcSet: `${mobileImage1xAvif} 1x${mobileImage2xAvif ? `, ${mobileImage2xAvif} 2x` : ""}`,
6681
+ media: `(max-width: ${mobileMaxWidth}px)`,
6682
+ type: "image/avif"
6683
+ }
6684
+ ),
6674
6685
  image1xWebp && /* @__PURE__ */ jsx(
6675
6686
  "source",
6676
6687
  {
@@ -6678,13 +6689,20 @@ const BasePicture = ({
6678
6689
  type: "image/webp"
6679
6690
  }
6680
6691
  ),
6692
+ image1xAvif && /* @__PURE__ */ jsx(
6693
+ "source",
6694
+ {
6695
+ srcSet: `${image1xAvif} 1x${image2xAvif ? `, ${image2xAvif} 2x` : ""}`,
6696
+ type: "image/avif"
6697
+ }
6698
+ ),
6681
6699
  /* @__PURE__ */ jsx("source", { srcSet: `${image1x} 1x${image2x ? `, ${image2x} 2x` : ""}`, type }),
6682
6700
  /* @__PURE__ */ jsx(
6683
6701
  "img",
6684
6702
  {
6685
6703
  ...imgProps,
6686
- className: cn(bgColorClass, imgProps == null ? void 0 : imgProps.className),
6687
- src: image1xWebp ? image1xWebp : image1x,
6704
+ className: imgProps == null ? void 0 : imgProps.className,
6705
+ src: image1x,
6688
6706
  alt,
6689
6707
  loading
6690
6708
  }
@@ -1,20 +1,22 @@
1
1
  import { DetailedHTMLProps, FC, HTMLAttributes, ImgHTMLAttributes } from 'react';
2
2
  import { ImageType } from '../types';
3
- interface BasePictureProps extends DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement> {
3
+ export interface BasePictureProps extends DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement> {
4
4
  imgProps?: DetailedHTMLProps<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>;
5
5
  image1x: string;
6
6
  image2x?: string;
7
7
  image1xWebp?: string;
8
8
  image2xWebp?: string;
9
+ image1xAvif?: string;
10
+ image2xAvif?: string;
9
11
  mobileImage1x?: string;
10
12
  mobileImage2x?: string;
11
13
  mobileImage1xWebp?: string;
12
14
  mobileImage2xWebp?: string;
15
+ mobileImage1xAvif?: string;
16
+ mobileImage2xAvif?: string;
13
17
  type: ImageType;
14
18
  alt: string;
15
- bgColorClass: string;
16
19
  mobileMaxWidth?: number;
17
20
  loading?: 'eager' | 'lazy';
18
21
  }
19
22
  export declare const BasePicture: FC<BasePictureProps>;
20
- export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "denwa-web-shared",
3
3
  "private": false,
4
- "version": "1.0.17",
4
+ "version": "1.0.19",
5
5
  "type": "module",
6
6
  "author": "Denwa",
7
7
  "main": "dist/denwa-web-shared.cjs.js",