hds-web 1.3.6 → 1.3.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hds-web",
3
- "version": "1.3.6",
3
+ "version": "1.3.7",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",
@@ -7,13 +7,13 @@ export default function HasConAvatar({ name, designation, size, imageUrl }) {
7
7
  return (
8
8
  <div className={`tb:max-w-[289px] group rounded-3xl flex items-center justify-between bg-neutral-0 tb:inline-flex tb:flex-col shadow tb:min-w-[18rem]`}>
9
9
 
10
- <div className="px-5 py-[30px] tb:p-0 text-left tb:flex-col min-h-[96px] tb:flex tb:items-center tb:px-8 tb:pb-8 tb:mt-8 tb:ml-0 tb:text-center">
11
- <Typography textStyle='h5' className='text-blue-400'>{name}</Typography>
12
- <Typography textStyle='h7' className='text-blue-800 uppercase'>{designation}</Typography>
10
+ <div className="px-5 py-[30px] tb:p-0 text-left tb:flex-col min-h-[116px] tb:flex tb:items-center tb:px-8 tb:pb-8 tb:mt-8 tb:ml-0 tb:text-center">
11
+ <div className=' text-hds-m-body1c-bold tb:text-hds-t-h5 db:text-hds-d-h5 text-blue-400'>{name}</div>
12
+ <div className=' text-hds-m-body3c-medium tb:text-hds-t-h7 db:text-hds-d-h7 text-blue-800 uppercase'>{designation}</div>
13
13
  </div>
14
14
  <div className='relative self-center'>
15
15
  <img
16
- className={`inline-block min-w-[100px] w-[9rem] tb:min-w-[18rem] tb:rounded border-neutral-0 tb-l:rounded-r-2xl `}
16
+ className={`inline-block min-w-[144px] w-[9rem] tb:min-w-[18rem] tb:rounded border-neutral-0 tb-l:rounded-r-2xl `}
17
17
  src={imageUrl}
18
18
  />
19
19
  {/* <div className="absolute tb-l:rounded-b-3xl inset-0 group-hover:bg-gradient-to-t group-hover:from-amber-200 group-hover:to-transparent group-hover:opacity-30" ></div> */}
@@ -36,8 +36,8 @@ export default function ProfileAvatar({ name, designation, size, imageUrl, avata
36
36
  )}
37
37
  </div>
38
38
  <div className="ml-3">
39
- <Typography textStyle='body2-semi-bold' className={` text-blue-800`}>{name}</Typography>
40
- <Typography textStyle='body3' className={` text-neutral-500`}>{designation}</Typography>
39
+ <Typography textStyle='body2c-bold' className={` text-neutral-800`}>{name}</Typography>
40
+ <Typography textStyle='body3c' className={` text-neutral-500`}>{designation}</Typography>
41
41
  </div>
42
42
  </div>
43
43
  </div>
@@ -43,8 +43,11 @@ export default function CarouselCard(props) {
43
43
  const totalCards = props.cards.length;
44
44
 
45
45
  const nextCard = () => {
46
- const scrollByAmount = window.innerWidth > 900 ? 3 : 1;
47
-
46
+
47
+ let scrollByAmount = '';
48
+ if(window.innerWidth>1140){scrollByAmount = 3}
49
+ else if(window.innerWidth<1140 && window.innerWidth>800) {scrollByAmount = 2}
50
+ else scrollByAmount = 1;
48
51
  if (currentCard >= totalCards - scrollByAmount) {
49
52
  scrollToCard(0);
50
53
  } else {
@@ -52,13 +55,22 @@ export default function CarouselCard(props) {
52
55
  }
53
56
  };
54
57
 
55
- const previousCard = () => {
58
+ const previousCard = () => {
59
+ let scrollByAmount = "";
60
+ if (window.innerWidth > 1140) {
61
+ scrollByAmount = 3;
62
+ } else if (window.innerWidth > 800) {
63
+ scrollByAmount = 2;
64
+ } else {
65
+ scrollByAmount = 1;
66
+ }
67
+
56
68
  if (currentCard === 0) {
57
- scrollToCard(totalCards - 1);
69
+ scrollToCard(totalCards - scrollByAmount);
58
70
  } else {
59
- scrollToCard(currentCard - 1);
71
+ scrollToCard(currentCard - scrollByAmount);
60
72
  }
61
- };
73
+ };
62
74
 
63
75
  const arrowStyle = ' text-2xl z-10 bg-black h-10 ml-6 w-10 rounded-full bg-purple-200 hover:bg-neutral-0 flex items-center justify-center';
64
76
 
@@ -122,7 +134,7 @@ export default function CarouselCard(props) {
122
134
  <div className={`snap-x w-full inline-flex select-none overflow-x-hidden scrollbar-hide`}>
123
135
 
124
136
  {props.cards.map((item, i) => (
125
- <div className="snap-center mx-5 shrink-0" key={i} ref={refs[i]}>
137
+ <div className="max-[1140px]:snap-center tb:snap-always mx-5 max-[1140px]:shrink-0" key={i} ref={refs[i]}>
126
138
  <div className="w-full select-none rounded-3xl object-contain">
127
139
  {React.createElement(props.component, item)}
128
140
  </div>
@@ -1408,6 +1408,10 @@ select {
1408
1408
  min-height: 96px;
1409
1409
  }
1410
1410
 
1411
+ .min-h-\[116px\] {
1412
+ min-height: 116px;
1413
+ }
1414
+
1411
1415
  .w-1\/2 {
1412
1416
  width: 50%;
1413
1417
  }
@@ -1564,6 +1568,10 @@ select {
1564
1568
  min-width: 100%;
1565
1569
  }
1566
1570
 
1571
+ .min-w-\[144px\] {
1572
+ min-width: 144px;
1573
+ }
1574
+
1567
1575
  .max-w-2xl {
1568
1576
  max-width: 42rem;
1569
1577
  }
@@ -8025,6 +8033,16 @@ select {
8025
8033
  stroke: #FFFFFF;
8026
8034
  }
8027
8035
 
8036
+ @media (max-width: 1140px) {
8037
+ .max-\[1140px\]\:shrink-0 {
8038
+ flex-shrink: 0;
8039
+ }
8040
+
8041
+ .max-\[1140px\]\:snap-center {
8042
+ scroll-snap-align: center;
8043
+ }
8044
+ }
8045
+
8028
8046
  @media (min-width: 360px) {
8029
8047
  .mb-s\:flex-row {
8030
8048
  flex-direction: row;
@@ -8142,6 +8160,10 @@ select {
8142
8160
  max-width: 530px;
8143
8161
  }
8144
8162
 
8163
+ .tb\:snap-always {
8164
+ scroll-snap-stop: always;
8165
+ }
8166
+
8145
8167
  .tb\:grid-cols-2 {
8146
8168
  grid-template-columns: repeat(2, minmax(0, 1fr));
8147
8169
  }