@daeryun/dr_components 0.7.59 → 0.7.61

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,12 +1,13 @@
1
+ import { StaticImageData } from 'next/image';
1
2
  interface LawfirmCardProps {
2
3
  title: React.ReactNode;
3
4
  label: string;
4
5
  description: React.ReactNode;
5
6
  compareLabel: string;
6
7
  compareDescription: React.ReactNode;
7
- image: string;
8
- imageTa: string;
9
- imageMo: string;
8
+ image: StaticImageData;
9
+ imageTa: StaticImageData;
10
+ imageMo: StaticImageData;
10
11
  imageWidth: number;
11
12
  imageHeight: number;
12
13
  isFullWidth?: boolean;
@@ -1,4 +1,4 @@
1
- import Image from 'next/image';
1
+ import Image, { StaticImageData } from 'next/image';
2
2
 
3
3
  interface LawfirmCardProps {
4
4
  title: React.ReactNode;
@@ -6,9 +6,9 @@ interface LawfirmCardProps {
6
6
  description: React.ReactNode;
7
7
  compareLabel: string;
8
8
  compareDescription: React.ReactNode;
9
- image: string;
10
- imageTa: string;
11
- imageMo: string;
9
+ image: StaticImageData;
10
+ imageTa: StaticImageData;
11
+ imageMo: StaticImageData;
12
12
  imageWidth: number;
13
13
  imageHeight: number;
14
14
  isFullWidth?: boolean;
@@ -1,6 +1,7 @@
1
+ import { StaticImageData } from 'next/image';
1
2
  import React from 'react';
2
3
  export interface CardSection5Props {
3
- img: string;
4
+ img: StaticImageData;
4
5
  title: string[];
5
6
  desc: string[];
6
7
  className?: string;
@@ -1,9 +1,9 @@
1
- import Image from 'next/image';
1
+ import Image, { StaticImageData } from 'next/image';
2
2
  import React from 'react';
3
3
  import CheckBox from '../../../asset/images/lawfirm/checkbox.svg';
4
4
 
5
5
  export interface CardSection5Props {
6
- img: string;
6
+ img: StaticImageData;
7
7
  title: string[];
8
8
  desc: string[];
9
9
  className?: string;
@@ -1,6 +1,7 @@
1
+ import { StaticImageData } from 'next/image';
1
2
  import React from 'react';
2
3
  interface CardSection7Props {
3
- imageSrc: string;
4
+ imageSrc: StaticImageData;
4
5
  gradient: string;
5
6
  bgColor: string;
6
7
  title: string[];
@@ -2,7 +2,7 @@ import Image from 'next/image';
2
2
  import React from 'react';
3
3
  const CardSection7 = ({ imageSrc, gradient, title, bgColor, paragraphs, className = '', style = {} }) => (<li style={style} className={`max- relative h-full w-full overflow-hidden rounded-[20px] max-xl:h-fit ${className} ${bgColor}`}>
4
4
  <div className="absolute bottom-0 right-0 h-[340px] w-full max-xl:h-full max-xl:w-[390px] max-sm:h-[250px] max-sm:w-full">
5
- <Image src={imageSrc} fill className="object-cover max-sm:!top-[20px] max-3sm:top-0" alt=""/>
5
+ <Image src={imageSrc} fill className="max-3sm:top-0 object-cover max-sm:!top-[20px]" alt=""/>
6
6
  </div>
7
7
  <div className={`absolute h-full w-full ${gradient}`}/>
8
8
  <div className="flex h-full w-full flex-col gap-y-10 p-10 text-white max-xl:gap-y-5 max-sm:px-5 max-sm:pb-[140px]">
@@ -1,14 +1,14 @@
1
- import Image from 'next/image'
2
- import React from 'react'
1
+ import Image, { StaticImageData } from 'next/image';
2
+ import React from 'react';
3
3
 
4
4
  interface CardSection7Props {
5
- imageSrc: string
6
- gradient: string
7
- bgColor: string
8
- title: string[]
9
- paragraphs: React.ReactNode
10
- className?: string
11
- style?: React.CSSProperties
5
+ imageSrc: StaticImageData;
6
+ gradient: string;
7
+ bgColor: string;
8
+ title: string[];
9
+ paragraphs: React.ReactNode;
10
+ className?: string;
11
+ style?: React.CSSProperties;
12
12
  }
13
13
 
14
14
  const CardSection7 = ({
@@ -25,7 +25,7 @@ const CardSection7 = ({
25
25
  className={`max- relative h-full w-full overflow-hidden rounded-[20px] max-xl:h-fit ${className} ${bgColor}`}
26
26
  >
27
27
  <div className="absolute bottom-0 right-0 h-[340px] w-full max-xl:h-full max-xl:w-[390px] max-sm:h-[250px] max-sm:w-full">
28
- <Image src={imageSrc} fill className="object-cover max-sm:!top-[20px] max-3sm:top-0" alt="" />
28
+ <Image src={imageSrc} fill className="max-3sm:top-0 object-cover max-sm:!top-[20px]" alt="" />
29
29
  </div>
30
30
  <div className={`absolute h-full w-full ${gradient}`} />
31
31
  <div className="flex h-full w-full flex-col gap-y-10 p-10 text-white max-xl:gap-y-5 max-sm:px-5 max-sm:pb-[140px]">
@@ -41,6 +41,6 @@ const CardSection7 = ({
41
41
  </div>
42
42
  </div>
43
43
  </li>
44
- )
44
+ );
45
45
 
46
- export default CardSection7
46
+ export default CardSection7;
@@ -16,10 +16,10 @@ import Section_1_7 from '../../../asset/images/lawfirm/section_1_7.webp';
16
16
  import Section_1_8 from '../../../asset/images/lawfirm/section_1_8.webp';
17
17
 
18
18
  const Section1 = ({ CommonPadding }: { CommonPadding: string }) => {
19
- const target1Ref = useRef<HTMLDivElement>(null);
20
- const target2Ref = useRef<HTMLDivElement>(null);
21
- const target3Ref = useRef<HTMLDivElement>(null);
22
- const target4Ref = useRef<HTMLDivElement>(null);
19
+ const target1Ref = useRef<HTMLDivElement>(null!);
20
+ const target2Ref = useRef<HTMLDivElement>(null!);
21
+ const target3Ref = useRef<HTMLDivElement>(null!);
22
+ const target4Ref = useRef<HTMLDivElement>(null!);
23
23
  const { flag: flag1, flagFastClass: div1Class } = useElementObserve(target1Ref, 0.2);
24
24
  const { flag: flag2, flagFastClass: div2Class } = useElementObserve(target2Ref, 1);
25
25
  const { flag: flag3, flagFastClass: div3Class } = useElementObserve(target3Ref, 1);
@@ -10,8 +10,8 @@ const Section2 = ({ CommonPadding }: { CommonPadding: string }) => {
10
10
  const [activeIndex, setActiveIndex] = useState(-1);
11
11
  const [showNewPhrase, setShowNewPhrase] = useState(false);
12
12
  const [showGradient, setShowGradient] = useState(false);
13
- const targetRef = useRef<HTMLDivElement>(null);
14
- const target2Ref = useRef<HTMLDivElement>(null);
13
+ const targetRef = useRef<HTMLDivElement>(null!);
14
+ const target2Ref = useRef<HTMLDivElement>(null!);
15
15
  const { flag, flagFastClass: divClass } = useElementObserve(targetRef, 0.3);
16
16
  const { flag: flag2 } = useElementObserve(target2Ref, 0.4);
17
17
 
@@ -27,8 +27,8 @@ import Section_3_5_t from '../../../asset/images/lawfirm/section_3_5_t.webp';
27
27
 
28
28
  const Section3 = ({ CommonPadding }: { CommonPadding: string }) => {
29
29
  const { width } = useBrowser();
30
- const target1Ref = useRef<HTMLDivElement>(null);
31
- const target2Ref = useRef<HTMLDivElement>(null);
30
+ const target1Ref = useRef<HTMLDivElement>(null!);
31
+ const target2Ref = useRef<HTMLDivElement>(null!);
32
32
  const { flagFastClass: divClass } = useElementObserve(target1Ref, 0.3);
33
33
  const { flag: flag2 } = useElementObserve(target2Ref, 0.1);
34
34
  const swiper = useRef<Swiper | null>(null);
@@ -5,7 +5,7 @@ import Section_4 from '../../../asset/images/lawfirm/section_4.webp';
5
5
  import Section_4_m from '../../../asset/images/lawfirm/section_4_m.webp';
6
6
 
7
7
  const Section4 = ({ CommonPadding }: { CommonPadding: string }) => {
8
- const targetRef = useRef<HTMLDivElement>(null);
8
+ const targetRef = useRef<HTMLDivElement>(null!);
9
9
  const { flag } = useElementObserve(targetRef, 0.3);
10
10
  const [triggered, setTriggered] = useState(false);
11
11
 
@@ -17,8 +17,8 @@ import Section_5_5 from '../../../asset/images/lawfirm/section_5_5.webp';
17
17
  import Section_5_6 from '../../../asset/images/lawfirm/section_5_6.webp';
18
18
 
19
19
  const Section5 = ({ CommonPadding }: { CommonPadding: string }) => {
20
- const target1Ref = useRef<HTMLDivElement>(null);
21
- const target2Ref = useRef<HTMLDivElement>(null);
20
+ const target1Ref = useRef<HTMLDivElement>(null!);
21
+ const target2Ref = useRef<HTMLDivElement>(null!);
22
22
  const { flagFastClass: divClass } = useElementObserve(target1Ref, 0.3);
23
23
  const { flag: flag2 } = useElementObserve(target2Ref, 0.1);
24
24
  const { width } = useBrowser();
@@ -9,8 +9,8 @@ import Section_7_3 from '../../../asset/images/lawfirm/section_7_3.webp';
9
9
 
10
10
  const Section7 = ({ CommonPadding }: { CommonPadding: string }) => {
11
11
  const [active, setActive] = useState<'system' | 'distribution'>('system');
12
- const target1Ref = useRef<HTMLDivElement>(null);
13
- const target2Ref = useRef<HTMLOListElement>(null);
12
+ const target1Ref = useRef<HTMLDivElement>(null!);
13
+ const target2Ref = useRef<HTMLOListElement>(null!);
14
14
  const { flagFastClass: divClass } = useElementObserve(target1Ref, 0.3);
15
15
  const { flag: flag2 } = useElementObserve(target2Ref, 0.1);
16
16
 
@@ -8,8 +8,8 @@ import useBrowser from '../../hook/useBrowser';
8
8
 
9
9
  const Section8 = ({ CommonPadding }: { CommonPadding: string }) => {
10
10
  const { width } = useBrowser(true);
11
- const target1Ref = useRef<HTMLDivElement>(null);
12
- const target2Ref = useRef<HTMLDivElement>(null);
11
+ const target1Ref = useRef<HTMLDivElement>(null!);
12
+ const target2Ref = useRef<HTMLDivElement>(null!);
13
13
  const { flag: flag, flagFastClass: divClass } = useElementObserve(target1Ref, 0.3);
14
14
  const [activeIndex, setActiveIndex] = useState<number>(0);
15
15