@daeryun/dr_components 1.1.65 → 1.1.66

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.
@@ -0,0 +1,77 @@
1
+ 'use client';
2
+ import React, { useEffect, useState } from 'react';
3
+ import 'rc-pagination/assets/index.css';
4
+ import { usePathname, useRouter, useSearchParams } from 'next/navigation';
5
+ import { removeScrollPos, removeScrollPosCheck } from '../../hook/useScrollRestoration';
6
+ import PageWrapper from '../../Layout/PageWrapper';
7
+ import SearchBar from '../../SearchBar/SearchBar';
8
+ import PaginationForGroup from '../../PaginationForGroup/PaginationForGroup';
9
+ import { ISuccessListTypes } from './SuccessListTypes';
10
+ import ListCard from './ListCard';
11
+
12
+ const Index = (props: { list: ISuccessListTypes[]; totalCount: number; currentPage: number; tel: string }) => {
13
+ const { list, totalCount, currentPage } = props;
14
+ const router = useRouter();
15
+ const searchParams = useSearchParams();
16
+ const pathname = usePathname();
17
+ const [search, setSearch] = useState<string>('');
18
+ const [searchInput, setSearchInput] = useState<string>('');
19
+
20
+ const handleInputChange = (e: React.FormEvent<HTMLInputElement>) => {
21
+ setSearchInput(e.currentTarget.value);
22
+ };
23
+
24
+ useEffect(() => {
25
+ const s = searchParams.get('search') ?? '';
26
+ setSearch(s);
27
+ setSearchInput(s);
28
+ }, [searchParams]);
29
+
30
+ const handleClick = async () => {
31
+ const query = new URLSearchParams();
32
+ query.set('page', '1');
33
+ if (searchInput) query.set('search', searchInput);
34
+
35
+ removeScrollPosCheck(`${pathname}?${query.toString()}`);
36
+ router.push(`${pathname}?${query.toString()}`);
37
+
38
+ setSearch(searchInput);
39
+ };
40
+
41
+ return (
42
+ <>
43
+ <PageWrapper>
44
+ <SearchBar
45
+ onChange={handleInputChange}
46
+ onClick={handleClick}
47
+ search={searchInput}
48
+ placeholder={'검색어를 입력해주세요.'}
49
+ isKeyPress={true}
50
+ marginTop={[70, 50, 50]}
51
+ label={'업무사례 검색창'}
52
+ />
53
+
54
+ {list && list.length > 0 ? (
55
+ <div
56
+ className={
57
+ 'mt-[95px] grid w-full grid-cols-3 gap-[34px] font-[Pretendard] ' +
58
+ 'max-xl:mt-20 max-xl:grid-cols-2 max-xl:gap-8 ' +
59
+ 'max-md:grid-cols-1 max-xs:mt-[60px]'
60
+ }
61
+ >
62
+ {list.map((l, index) => (
63
+ <ListCard key={index} item={l} isBest={currentPage === 1 && index < 3} />
64
+ ))}
65
+ </div>
66
+ ) : (
67
+ <div className={'flex w-full items-center justify-center py-32 max-xs:py-24'}>
68
+ <p className={'w-fit'}>검색 결과가 없습니다.</p>
69
+ </div>
70
+ )}
71
+
72
+ <PaginationForGroup total={totalCount} currentPage={Number(currentPage)} size={12} />
73
+ </PageWrapper>
74
+ </>
75
+ );
76
+ };
77
+ export default Index;
@@ -0,0 +1,17 @@
1
+ export interface ISuccessListTypes {
2
+ id: number;
3
+ title: string;
4
+ sub: string;
5
+ result: string;
6
+ created_at: string;
7
+ deleted_at: string;
8
+ contents: string;
9
+ is_template: boolean;
10
+ contents_id: number;
11
+ contents_type: string;
12
+ pathname: string;
13
+ center_code: string;
14
+ crime_code: string;
15
+ center_name: string;
16
+ crime_name: string;
17
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,17 @@
1
+ export interface ISuccessListTypes {
2
+ id: number;
3
+ title: string;
4
+ sub: string;
5
+ result: string;
6
+ created_at: string;
7
+ deleted_at: string;
8
+ contents: string;
9
+ is_template: boolean;
10
+ contents_id: number;
11
+ contents_type: string;
12
+ pathname: string;
13
+ center_code: string;
14
+ crime_code: string;
15
+ center_name: string;
16
+ crime_name: string;
17
+ }
@@ -107,7 +107,7 @@
107
107
  }
108
108
 
109
109
  /*
110
- ! tailwindcss v3.4.18 | MIT License | https://tailwindcss.com
110
+ ! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com
111
111
  */
112
112
 
113
113
  /*
@@ -1186,6 +1186,10 @@ html {
1186
1186
  top: -177px;
1187
1187
  }
1188
1188
 
1189
+ .top-\[-18px\] {
1190
+ top: -18px;
1191
+ }
1192
+
1189
1193
  .top-\[-50\%\] {
1190
1194
  top: -50%;
1191
1195
  }
@@ -1665,6 +1669,10 @@ html {
1665
1669
  margin-bottom: 30px;
1666
1670
  }
1667
1671
 
1672
+ .mb-\[34px\] {
1673
+ margin-bottom: 34px;
1674
+ }
1675
+
1668
1676
  .mb-\[3em\] {
1669
1677
  margin-bottom: 3em;
1670
1678
  }
@@ -2205,6 +2213,10 @@ html {
2205
2213
  margin-top: 8px;
2206
2214
  }
2207
2215
 
2216
+ .mt-\[95px\] {
2217
+ margin-top: 95px;
2218
+ }
2219
+
2208
2220
  .mt-\[9em\] {
2209
2221
  margin-top: 9em;
2210
2222
  }
@@ -2717,6 +2729,10 @@ html {
2717
2729
  height: 43px;
2718
2730
  }
2719
2731
 
2732
+ .h-\[440px\] {
2733
+ height: 440px;
2734
+ }
2735
+
2720
2736
  .h-\[450px\] {
2721
2737
  height: 450px;
2722
2738
  }
@@ -2917,6 +2933,10 @@ html {
2917
2933
  height: 8px;
2918
2934
  }
2919
2935
 
2936
+ .h-\[90px\] {
2937
+ height: 90px;
2938
+ }
2939
+
2920
2940
  .h-\[94px\] {
2921
2941
  height: 94px;
2922
2942
  }
@@ -3095,6 +3115,10 @@ html {
3095
3115
  min-height: 48px;
3096
3116
  }
3097
3117
 
3118
+ .min-h-\[60px\] {
3119
+ min-height: 60px;
3120
+ }
3121
+
3098
3122
  .min-h-\[62px\] {
3099
3123
  min-height: 62px;
3100
3124
  }
@@ -3115,6 +3139,10 @@ html {
3115
3139
  min-height: 98px;
3116
3140
  }
3117
3141
 
3142
+ .min-h-\[99px\] {
3143
+ min-height: 99px;
3144
+ }
3145
+
3118
3146
  .\!w-\[116px\] {
3119
3147
  width: 116px !important;
3120
3148
  }
@@ -3845,6 +3873,10 @@ html {
3845
3873
  width: 100vw;
3846
3874
  }
3847
3875
 
3876
+ .min-w-\[100px\] {
3877
+ min-width: 100px;
3878
+ }
3879
+
3848
3880
  .min-w-\[177px\] {
3849
3881
  min-width: 177px;
3850
3882
  }
@@ -4662,6 +4694,10 @@ html {
4662
4694
  gap: 32px;
4663
4695
  }
4664
4696
 
4697
+ .gap-\[34px\] {
4698
+ gap: 34px;
4699
+ }
4700
+
4665
4701
  .gap-\[36px\] {
4666
4702
  gap: 36px;
4667
4703
  }
@@ -5392,6 +5428,10 @@ html {
5392
5428
  border-color: rgb(168 168 168 / var(--tw-border-opacity, 1));
5393
5429
  }
5394
5430
 
5431
+ .border-\[\#A91C364D\] {
5432
+ border-color: #A91C364D;
5433
+ }
5434
+
5395
5435
  .border-\[\#AA1D36\] {
5396
5436
  --tw-border-opacity: 1;
5397
5437
  border-color: rgb(170 29 54 / var(--tw-border-opacity, 1));
@@ -5422,6 +5462,11 @@ html {
5422
5462
  border-color: rgb(185 185 185 / var(--tw-border-opacity, 1));
5423
5463
  }
5424
5464
 
5465
+ .border-\[\#CECECE\] {
5466
+ --tw-border-opacity: 1;
5467
+ border-color: rgb(206 206 206 / var(--tw-border-opacity, 1));
5468
+ }
5469
+
5425
5470
  .border-\[\#D0D0D0\] {
5426
5471
  --tw-border-opacity: 1;
5427
5472
  border-color: rgb(208 208 208 / var(--tw-border-opacity, 1));
@@ -5909,6 +5954,11 @@ html {
5909
5954
  background-color: rgb(144 144 144 / var(--tw-bg-opacity, 1));
5910
5955
  }
5911
5956
 
5957
+ .bg-\[\#9E142D\] {
5958
+ --tw-bg-opacity: 1;
5959
+ background-color: rgb(158 20 45 / var(--tw-bg-opacity, 1));
5960
+ }
5961
+
5912
5962
  .bg-\[\#AA1D36\] {
5913
5963
  --tw-bg-opacity: 1;
5914
5964
  background-color: rgb(170 29 54 / var(--tw-bg-opacity, 1));
@@ -6922,6 +6972,11 @@ html {
6922
6972
  padding-bottom: 0.75rem;
6923
6973
  }
6924
6974
 
6975
+ .py-32 {
6976
+ padding-top: 8rem;
6977
+ padding-bottom: 8rem;
6978
+ }
6979
+
6925
6980
  .py-4 {
6926
6981
  padding-top: 1rem;
6927
6982
  padding-bottom: 1rem;
@@ -7042,6 +7097,11 @@ html {
7042
7097
  padding-bottom: 24px;
7043
7098
  }
7044
7099
 
7100
+ .py-\[25px\] {
7101
+ padding-top: 25px;
7102
+ padding-bottom: 25px;
7103
+ }
7104
+
7045
7105
  .py-\[26px\] {
7046
7106
  padding-top: 26px;
7047
7107
  padding-bottom: 26px;
@@ -7484,6 +7544,10 @@ html {
7484
7544
  padding-top: 0.75rem;
7485
7545
  }
7486
7546
 
7547
+ .pt-8 {
7548
+ padding-top: 2rem;
7549
+ }
7550
+
7487
7551
  .pt-\[0\.5px\] {
7488
7552
  padding-top: 0.5px;
7489
7553
  }
@@ -7656,6 +7720,10 @@ html {
7656
7720
  font-family: NotoSansKR;
7657
7721
  }
7658
7722
 
7723
+ .font-\[Pretendard\] {
7724
+ font-family: Pretendard;
7725
+ }
7726
+
7659
7727
  .font-\[SUIT\] {
7660
7728
  font-family: SUIT;
7661
7729
  }
@@ -7989,6 +8057,10 @@ html {
7989
8057
  line-height: 1.35;
7990
8058
  }
7991
8059
 
8060
+ .leading-\[1\.36\] {
8061
+ line-height: 1.36;
8062
+ }
8063
+
7992
8064
  .leading-\[1\.37\] {
7993
8065
  line-height: 1.37;
7994
8066
  }
@@ -8013,6 +8085,10 @@ html {
8013
8085
  line-height: 1.5;
8014
8086
  }
8015
8087
 
8088
+ .leading-\[1\.625\] {
8089
+ line-height: 1.625;
8090
+ }
8091
+
8016
8092
  .leading-\[1\.6\] {
8017
8093
  line-height: 1.6;
8018
8094
  }
@@ -8401,6 +8477,11 @@ html {
8401
8477
  color: rgb(20 63 121 / var(--tw-text-opacity, 1));
8402
8478
  }
8403
8479
 
8480
+ .text-\[\#171944\] {
8481
+ --tw-text-opacity: 1;
8482
+ color: rgb(23 25 68 / var(--tw-text-opacity, 1));
8483
+ }
8484
+
8404
8485
  .text-\[\#192555\] {
8405
8486
  --tw-text-opacity: 1;
8406
8487
  color: rgb(25 37 85 / var(--tw-text-opacity, 1));
@@ -8878,6 +8959,10 @@ html {
8878
8959
  text-underline-offset: 2px;
8879
8960
  }
8880
8961
 
8962
+ .underline-offset-\[3px\] {
8963
+ text-underline-offset: 3px;
8964
+ }
8965
+
8881
8966
  .underline-offset-\[6px\] {
8882
8967
  text-underline-offset: 6px;
8883
8968
  }
@@ -9040,16 +9125,20 @@ html {
9040
9125
 
9041
9126
  .backdrop-blur-\[4px\] {
9042
9127
  --tw-backdrop-blur: blur(4px);
9128
+ -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
9043
9129
  backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
9044
9130
  }
9045
9131
 
9046
9132
  .backdrop-blur-sm {
9047
9133
  --tw-backdrop-blur: blur(4px);
9134
+ -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
9048
9135
  backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
9049
9136
  }
9050
9137
 
9051
9138
  .transition {
9139
+ transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;
9052
9140
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
9141
+ transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;
9053
9142
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
9054
9143
  transition-duration: 150ms;
9055
9144
  }
@@ -11623,6 +11712,10 @@ body {
11623
11712
  right: 30px;
11624
11713
  }
11625
11714
 
11715
+ .max-xl\:right-\[32px\] {
11716
+ right: 32px;
11717
+ }
11718
+
11626
11719
  .max-xl\:top-5 {
11627
11720
  top: 1.25rem;
11628
11721
  }
@@ -11639,6 +11732,10 @@ body {
11639
11732
  top: -127px;
11640
11733
  }
11641
11734
 
11735
+ .max-xl\:top-\[-16px\] {
11736
+ top: -16px;
11737
+ }
11738
+
11642
11739
  .max-xl\:top-\[-95px\] {
11643
11740
  top: -95px;
11644
11741
  }
@@ -11754,6 +11851,10 @@ body {
11754
11851
  margin-top: 0.5rem;
11755
11852
  }
11756
11853
 
11854
+ .max-xl\:mt-20 {
11855
+ margin-top: 5rem;
11856
+ }
11857
+
11757
11858
  .max-xl\:mt-4 {
11758
11859
  margin-top: 1rem;
11759
11860
  }
@@ -12041,6 +12142,10 @@ body {
12041
12142
  height: 730px;
12042
12143
  }
12043
12144
 
12145
+ .max-xl\:h-\[80px\] {
12146
+ height: 80px;
12147
+ }
12148
+
12044
12149
  .max-xl\:h-\[90px\] {
12045
12150
  height: 90px;
12046
12151
  }
@@ -12428,6 +12533,10 @@ body {
12428
12533
  gap: 1.25rem;
12429
12534
  }
12430
12535
 
12536
+ .max-xl\:gap-8 {
12537
+ gap: 2rem;
12538
+ }
12539
+
12431
12540
  .max-xl\:gap-\[0\] {
12432
12541
  gap: 0;
12433
12542
  }
@@ -17857,10 +17966,18 @@ body {
17857
17966
  right: -10px;
17858
17967
  }
17859
17968
 
17969
+ .max-xs\:right-\[30px\] {
17970
+ right: 30px;
17971
+ }
17972
+
17860
17973
  .max-xs\:top-0 {
17861
17974
  top: 0px;
17862
17975
  }
17863
17976
 
17977
+ .max-xs\:top-\[-14px\] {
17978
+ top: -14px;
17979
+ }
17980
+
17864
17981
  .max-xs\:top-\[-18px\] {
17865
17982
  top: -18px;
17866
17983
  }
@@ -18088,6 +18205,10 @@ body {
18088
18205
  height: 360px;
18089
18206
  }
18090
18207
 
18208
+ .max-xs\:h-\[400px\] {
18209
+ height: 400px;
18210
+ }
18211
+
18091
18212
  .max-xs\:h-\[40px\] {
18092
18213
  height: 40px;
18093
18214
  }
@@ -18152,10 +18273,22 @@ body {
18152
18273
  height: 100%;
18153
18274
  }
18154
18275
 
18276
+ .max-xs\:min-h-\[54px\] {
18277
+ min-height: 54px;
18278
+ }
18279
+
18280
+ .max-xs\:min-h-\[90px\] {
18281
+ min-height: 90px;
18282
+ }
18283
+
18155
18284
  .max-xs\:w-4 {
18156
18285
  width: 1rem;
18157
18286
  }
18158
18287
 
18288
+ .max-xs\:w-6 {
18289
+ width: 1.5rem;
18290
+ }
18291
+
18159
18292
  .max-xs\:w-9 {
18160
18293
  width: 2.25rem;
18161
18294
  }
@@ -18236,6 +18369,10 @@ body {
18236
18369
  width: 70%;
18237
18370
  }
18238
18371
 
18372
+ .max-xs\:w-\[70px\] {
18373
+ width: 70px;
18374
+ }
18375
+
18239
18376
  .max-xs\:w-\[89px\] {
18240
18377
  width: 89px;
18241
18378
  }
@@ -18244,6 +18381,10 @@ body {
18244
18381
  width: 100%;
18245
18382
  }
18246
18383
 
18384
+ .max-xs\:min-w-20 {
18385
+ min-width: 5rem;
18386
+ }
18387
+
18247
18388
  .max-xs\:min-w-\[160px\] {
18248
18389
  min-width: 160px;
18249
18390
  }
@@ -18382,6 +18523,11 @@ body {
18382
18523
  padding-right: 1.25rem;
18383
18524
  }
18384
18525
 
18526
+ .max-xs\:px-6 {
18527
+ padding-left: 1.5rem;
18528
+ padding-right: 1.5rem;
18529
+ }
18530
+
18385
18531
  .max-xs\:px-8 {
18386
18532
  padding-left: 2rem;
18387
18533
  padding-right: 2rem;
@@ -18392,6 +18538,11 @@ body {
18392
18538
  padding-right: 15px;
18393
18539
  }
18394
18540
 
18541
+ .max-xs\:px-\[18px\] {
18542
+ padding-left: 18px;
18543
+ padding-right: 18px;
18544
+ }
18545
+
18395
18546
  .max-xs\:px-\[20px\] {
18396
18547
  padding-left: 20px;
18397
18548
  padding-right: 20px;
@@ -18407,6 +18558,11 @@ body {
18407
18558
  padding-bottom: 4rem;
18408
18559
  }
18409
18560
 
18561
+ .max-xs\:py-24 {
18562
+ padding-top: 6rem;
18563
+ padding-bottom: 6rem;
18564
+ }
18565
+
18410
18566
  .max-xs\:py-\[15px\] {
18411
18567
  padding-top: 15px;
18412
18568
  padding-bottom: 15px;
@@ -18417,6 +18573,11 @@ body {
18417
18573
  padding-bottom: 20px;
18418
18574
  }
18419
18575
 
18576
+ .max-xs\:py-\[22px\] {
18577
+ padding-top: 22px;
18578
+ padding-bottom: 22px;
18579
+ }
18580
+
18420
18581
  .max-xs\:py-\[2px\] {
18421
18582
  padding-top: 2px;
18422
18583
  padding-bottom: 2px;
@@ -18436,6 +18597,10 @@ body {
18436
18597
  padding-bottom: 0.25rem;
18437
18598
  }
18438
18599
 
18600
+ .max-xs\:pb-6 {
18601
+ padding-bottom: 1.5rem;
18602
+ }
18603
+
18439
18604
  .max-xs\:pb-\[30px\] {
18440
18605
  padding-bottom: 30px;
18441
18606
  }
@@ -18468,6 +18633,10 @@ body {
18468
18633
  padding-top: 1.25rem;
18469
18634
  }
18470
18635
 
18636
+ .max-xs\:pt-7 {
18637
+ padding-top: 1.75rem;
18638
+ }
18639
+
18471
18640
  .max-xs\:pt-\[1px\] {
18472
18641
  padding-top: 1px;
18473
18642
  }