hds-web 1.13.5 → 1.13.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/dist/index.css +2 -2
- package/dist/index.es.css +2 -2
- package/dist/index.es.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/HDS/components/Tables/tableD.js +46 -90
- package/src/index.css +6 -0
- package/src/styles/tailwind.css +14 -16
package/package.json
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import React from 'react';
|
1
|
+
import React, {useState, useRef, useEffect} from 'react';
|
2
2
|
import { Typography } from '../../foundation/Typography'
|
3
3
|
import { Icon } from '../common-components/Icon'
|
4
4
|
import { HDSColor } from '../../foundation/ColorPalette';
|
@@ -14,7 +14,27 @@ export default function PricingTableB(props) {
|
|
14
14
|
TABLE_VALUE,
|
15
15
|
TABLE_HEADER,
|
16
16
|
} = props;
|
17
|
+
|
18
|
+
const [isSticky, setIsSticky] = useState(false);
|
19
|
+
const stickyRef = useRef();
|
20
|
+
useEffect(() => {
|
21
|
+
const handleScroll = () => {
|
22
|
+
const tableHeader = stickyRef.current;
|
23
|
+
const tableHeaderRect = tableHeader.getBoundingClientRect();
|
24
|
+
const isSticky = tableHeaderRect.top <= 400; // Adjust this value if needed
|
25
|
+
console.log(isSticky, 'sadasd')
|
26
|
+
setIsSticky(true);
|
27
|
+
};
|
28
|
+
|
29
|
+
window.addEventListener('scroll', handleScroll);
|
30
|
+
return () => {
|
31
|
+
window.removeEventListener('scroll', handleScroll);
|
32
|
+
};
|
33
|
+
}, []);
|
34
|
+
|
17
35
|
console.log(TABLE_VALUE)
|
36
|
+
|
37
|
+
|
18
38
|
const tableValuesm = (section, keyIndex) => {
|
19
39
|
|
20
40
|
let columnSize = '';
|
@@ -42,7 +62,7 @@ export default function PricingTableB(props) {
|
|
42
62
|
className="pl-[30px] border-80 "
|
43
63
|
>
|
44
64
|
<div className=' '>
|
45
|
-
<Typography className='py-4 text-neutral-700' textStyle='
|
65
|
+
<Typography className='py-4 text-neutral-700' textStyle='body1'>{value[keyIndex]}</Typography>
|
46
66
|
</div>
|
47
67
|
</td>)}
|
48
68
|
{keyIndex !== null
|
@@ -168,82 +188,13 @@ export default function PricingTableB(props) {
|
|
168
188
|
{TABLE_HEADER && TABLE_HEADER[0] && TABLE_HEADER[0]['title'] && (
|
169
189
|
<Typography
|
170
190
|
textStyle='h3'
|
171
|
-
className={`pb-10 pl-8
|
191
|
+
className={`pb-10 pl-8 pt-[72px] ${HDSColor(title_color)}`}
|
172
192
|
>
|
173
193
|
{TABLE_HEADER[0]['title']}
|
174
194
|
</Typography>
|
175
195
|
)}
|
176
196
|
<table className="rounded-3xl w-full table-fixed ">
|
177
|
-
|
178
|
-
<tr className=' text-left first:pr-20 '>
|
179
|
-
{Object.keys(TABLE_HEADER).map((key, index) => (
|
180
|
-
<th
|
181
|
-
key={index}
|
182
|
-
scope="col"
|
183
|
-
className="px-8 pb-[54px] sm:table-cell text-left"
|
184
|
-
>
|
185
|
-
<div className='flex text-left'>
|
186
|
-
<div className='flex flex-col text-center'>
|
187
|
-
<div className={'flex gap-2'}>
|
188
|
-
{TABLE_HEADER[key]['icon'] &&
|
189
|
-
(
|
190
|
-
<Icon
|
191
|
-
height='h-6 w-6 stroke-[1.5px]'
|
192
|
-
variant={TABLE_HEADER[key]['icon']}
|
193
|
-
strokeClass={HDSColor(TABLE_HEADER[key]['iconStrokeClass'])} />
|
194
|
-
)
|
195
|
-
}
|
196
|
-
{
|
197
|
-
TABLE_HEADER[key]['title'] && key == 0 && (
|
198
|
-
<Typography
|
199
|
-
textStyle='h3'
|
200
|
-
className={` w-1/2 text-left ${HDSColor(TABLE_HEADER[key]['title_text_color'])}`}>
|
201
|
-
{TABLE_HEADER[key]['title']}
|
202
|
-
</Typography>)
|
203
|
-
}
|
204
|
-
{
|
205
|
-
TABLE_HEADER[key]['title'] && key != 0 && (
|
206
|
-
<Typography
|
207
|
-
textStyle='h5'
|
208
|
-
className={` text-left ${HDSColor(TABLE_HEADER[key]['title_text_color'])}`}>
|
209
|
-
<ReactMarkdown>{TABLE_HEADER[key]['title']}</ReactMarkdown>
|
210
|
-
</Typography>)
|
211
|
-
}
|
212
|
-
</div>
|
213
|
-
<div className=''>
|
214
|
-
{TABLE_HEADER[key]['descr'] && (
|
215
|
-
<Typography
|
216
|
-
textStyle='body1'
|
217
|
-
className={` text-left ${HDSColor(TABLE_HEADER[key]['descr_text_color'])}`}>
|
218
|
-
{TABLE_HEADER[key]['descr']}
|
219
|
-
</Typography>)}
|
220
|
-
|
221
|
-
{TABLE_HEADER[key]['button_title'] &&
|
222
|
-
(
|
223
|
-
<a href={TABLE_HEADER[key]['button_link']}>
|
224
|
-
<HDSButton
|
225
|
-
label={TABLE_HEADER[key]['button_title']}
|
226
|
-
type='secondary'
|
227
|
-
leftIconVariant='none'
|
228
|
-
rightIconVariant='none'
|
229
|
-
state='default'
|
230
|
-
size='sm'
|
231
|
-
rightAnimatedArrow={true}
|
232
|
-
rightAnimatedArrowColor='#3970FD'
|
233
|
-
className='mt-4'
|
234
|
-
/>
|
235
|
-
</a>
|
236
|
-
|
237
|
-
)
|
238
|
-
|
239
|
-
}
|
240
|
-
</div>
|
241
|
-
</div>
|
242
|
-
</div>
|
243
|
-
</th>
|
244
|
-
))}
|
245
|
-
</tr>
|
246
|
-
</thead> */}
|
197
|
+
|
247
198
|
{TABLE_VALUE.map((section, index) => (
|
248
199
|
<tbody key={index} className="border-90 bg-neutral-0">
|
249
200
|
{Object.keys(section).map((keyIndex) => (
|
@@ -253,30 +204,35 @@ export default function PricingTableB(props) {
|
|
253
204
|
<React.Fragment key={keyIndex2 + keyIndex + index}>
|
254
205
|
{keyIndex2 !== null && (
|
255
206
|
<th
|
256
|
-
|
207
|
+
ref={stickyRef}
|
208
|
+
className={`first:rounded-l-full last:rounded-r-full px-8 z-[100] sticky ${isSticky ? ' bg-neutral-100' : ''
|
209
|
+
}`}
|
257
210
|
>
|
258
211
|
<Typography
|
259
212
|
textStyle='h5'
|
260
|
-
className='text-neutral-900 py-3.5 text-left'
|
213
|
+
className='text-neutral-900 py-3.5 text-left whitespace-nowrap'
|
261
214
|
>
|
262
215
|
{keyIndex2}
|
263
216
|
|
217
|
+
|
264
218
|
</Typography>
|
265
|
-
|
266
|
-
<
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
219
|
+
{section[keyIndex][0][keyIndex2]['btn'] && section[keyIndex][0][keyIndex2]['btn_cta'] && <div className={`flex -mt-5`}>
|
220
|
+
<a href={section[keyIndex][0][keyIndex2]['btn_cta']}>
|
221
|
+
<HDSButton
|
222
|
+
label={section[keyIndex][0][keyIndex2]['btn']}
|
223
|
+
type='secondaryLink'
|
224
|
+
leftIconVariant='none'
|
225
|
+
rightIconVariant='none'
|
226
|
+
state='default'
|
227
|
+
size='sm'
|
228
|
+
rightAnimatedArrow={true}
|
229
|
+
rightAnimatedArrowColor='#3970FD'
|
230
|
+
animatedHoverStroke='#3970FD'
|
231
|
+
btnTextColorClass='text-blue-500'
|
232
|
+
btnTextHoverClass=''
|
233
|
+
className=' '
|
234
|
+
/>
|
235
|
+
</a>
|
280
236
|
</div>}
|
281
237
|
|
282
238
|
</th>
|
package/src/index.css
CHANGED
package/src/styles/tailwind.css
CHANGED
@@ -1030,6 +1030,10 @@ select{
|
|
1030
1030
|
z-index: 50;
|
1031
1031
|
}
|
1032
1032
|
|
1033
|
+
.z-\[100\]{
|
1034
|
+
z-index: 100;
|
1035
|
+
}
|
1036
|
+
|
1033
1037
|
.z-\[1\]{
|
1034
1038
|
z-index: 1;
|
1035
1039
|
}
|
@@ -1393,14 +1397,6 @@ select{
|
|
1393
1397
|
margin-top: 70px;
|
1394
1398
|
}
|
1395
1399
|
|
1396
|
-
.-mt-1{
|
1397
|
-
margin-top: -0.25rem;
|
1398
|
-
}
|
1399
|
-
|
1400
|
-
.-mt-2{
|
1401
|
-
margin-top: -0.5rem;
|
1402
|
-
}
|
1403
|
-
|
1404
1400
|
.line-clamp-3{
|
1405
1401
|
overflow: hidden;
|
1406
1402
|
display: -webkit-box;
|
@@ -6221,10 +6217,6 @@ select{
|
|
6221
6217
|
padding-bottom: 2rem;
|
6222
6218
|
}
|
6223
6219
|
|
6224
|
-
.pb-\[54px\]{
|
6225
|
-
padding-bottom: 54px;
|
6226
|
-
}
|
6227
|
-
|
6228
6220
|
.pb-\[56\.2\%\]{
|
6229
6221
|
padding-bottom: 56.2%;
|
6230
6222
|
}
|
@@ -6357,6 +6349,10 @@ select{
|
|
6357
6349
|
padding-top: 2rem;
|
6358
6350
|
}
|
6359
6351
|
|
6352
|
+
.pt-\[72px\]{
|
6353
|
+
padding-top: 72px;
|
6354
|
+
}
|
6355
|
+
|
6360
6356
|
.pt-\[81px\]{
|
6361
6357
|
padding-top: 81px;
|
6362
6358
|
}
|
@@ -7443,6 +7439,12 @@ select{
|
|
7443
7439
|
|
7444
7440
|
/*test*/
|
7445
7441
|
|
7442
|
+
.sticky {
|
7443
|
+
position: -webkit-sticky;
|
7444
|
+
position: sticky;
|
7445
|
+
top: 72px;
|
7446
|
+
}
|
7447
|
+
|
7446
7448
|
.carouselShadow{
|
7447
7449
|
-webkit-filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25)) drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25));
|
7448
7450
|
filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25)) drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25));
|
@@ -8677,10 +8679,6 @@ select{
|
|
8677
8679
|
border-bottom-left-radius: 9999px;
|
8678
8680
|
}
|
8679
8681
|
|
8680
|
-
.first\:pr-20:first-child{
|
8681
|
-
padding-right: 5rem;
|
8682
|
-
}
|
8683
|
-
|
8684
8682
|
.last\:mb-0:last-child{
|
8685
8683
|
margin-bottom: 0px;
|
8686
8684
|
}
|