hds-web 1.1.5 → 1.1.8
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 +13 -13
- package/dist/index.js +13 -13
- package/package.json +1 -1
- package/src/HDS/assets/icons/check-circle.svg +1 -1
- package/src/HDS/components/BadgesCaption/badges.js +8 -8
- package/src/HDS/components/Buttons/button.js +7 -3
- package/src/HDS/components/Cards/Dropdown/index.js +1 -0
- package/src/HDS/components/Cards/Dropdown/v3Dropdown.js +63 -0
- package/src/HDS/components/Cards/Menu/flyoutA.js +88 -0
- package/src/HDS/components/Cards/Menu/flyoutB.js +30 -28
- package/src/HDS/components/Cards/Menu/flyoutC.js +31 -0
- package/src/HDS/components/Cards/Menu/index.js +3 -2
- package/src/HDS/components/Cards/Misc/iconCard.js +81 -9
- package/src/HDS/components/Cards/Misc/talkCard.js +14 -12
- package/src/HDS/components/Headers/v3Header.js +91 -79
- package/src/HDS/components/Hero/h2.js +33 -17
- package/src/HDS/components/Snippet/CodeSnippet.js +1 -0
- package/src/HDS/components/Tables/index.js +2 -1
- package/src/HDS/components/Tables/tableA.js +6 -13
- package/src/HDS/components/Tables/tableC.js +71 -0
- package/src/index.css +1 -1
- package/src/styles/tailwind.css +96 -77
- package/tailwind.config.js +0 -3
@@ -1,9 +1,10 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import { Fragment } from 'react'
|
3
|
-
import { Popover, Transition } from '@headlessui/react'
|
4
|
-
import { Icon } from '../common-components/Icon'
|
5
|
-
import { Typography } from '../../foundation/Typography'
|
6
|
-
import { HDSButton } from '../Buttons'
|
2
|
+
import { Fragment } from 'react';
|
3
|
+
import { Popover, Transition } from '@headlessui/react';
|
4
|
+
import { Icon } from '../common-components/Icon';
|
5
|
+
import { Typography } from '../../foundation/Typography';
|
6
|
+
import { HDSButton } from '../Buttons';
|
7
|
+
import { V3Dropdown } from '../Cards/Dropdown'
|
7
8
|
|
8
9
|
const solutions = [
|
9
10
|
{
|
@@ -43,39 +44,69 @@ export default function V3Header(props) {
|
|
43
44
|
leaveFrom="opacity-100 translate-y-0"
|
44
45
|
leaveTo="opacity-0 translate-y-1"
|
45
46
|
>
|
46
|
-
<Popover.Panel className="
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
47
|
+
<Popover.Panel className="fixed left-0 ml z-10 mt-3 transform ">
|
48
|
+
<div className='ml-[9.55rem]'>
|
49
|
+
<Icon variant='triangle' height='h-6 w-6 fill-neutral-100' strokeClass='stroke-neutral-100'/>
|
50
|
+
</div>
|
51
|
+
<div className=" p-2 bg-neutral-100 rounded-lg">
|
52
|
+
|
53
|
+
<V3Dropdown
|
54
|
+
primaryCard={{
|
55
|
+
iconVariant: 'home03',
|
56
|
+
mainDescription: 'description1',
|
57
|
+
primaryBtnLabel: 'label 1',
|
58
|
+
strokeClass: 'stroke-neutral-800'
|
59
|
+
}}
|
60
|
+
secondaryCardArr={[
|
61
|
+
{
|
62
|
+
childArray: [
|
63
|
+
{
|
64
|
+
description: '',
|
65
|
+
href: '#',
|
66
|
+
icon: 'cube01',
|
67
|
+
name: 'Analytics'
|
68
|
+
},
|
69
|
+
{
|
70
|
+
description: '',
|
71
|
+
href: '#',
|
72
|
+
icon: 'cube01',
|
73
|
+
name: 'Engagement'
|
74
|
+
},
|
75
|
+
{
|
76
|
+
description: '',
|
77
|
+
href: '#',
|
78
|
+
icon: 'cube01',
|
79
|
+
name: 'Security'
|
80
|
+
}
|
81
|
+
],
|
82
|
+
label: 'Label1'
|
83
|
+
},
|
84
|
+
{
|
85
|
+
childArray: [
|
86
|
+
{
|
87
|
+
description: '',
|
88
|
+
href: '#',
|
89
|
+
icon: 'cube01',
|
90
|
+
name: 'Analytics'
|
91
|
+
},
|
92
|
+
{
|
93
|
+
description: '',
|
94
|
+
href: '#',
|
95
|
+
icon: 'cube01',
|
96
|
+
name: 'Engagement'
|
97
|
+
},
|
98
|
+
{
|
99
|
+
description: '',
|
100
|
+
href: '#',
|
101
|
+
icon: 'cube01',
|
102
|
+
name: 'Security'
|
103
|
+
}
|
104
|
+
],
|
105
|
+
label: 'Label1'
|
106
|
+
}
|
107
|
+
]}
|
108
|
+
/>
|
109
|
+
|
79
110
|
</div>
|
80
111
|
</Popover.Panel>
|
81
112
|
</Transition>
|
@@ -97,7 +128,7 @@ export default function V3Header(props) {
|
|
97
128
|
<Typography textStyle='body3c-medium' className=''>{`${item['title']}`}</Typography>
|
98
129
|
{/* <Icon height='h-5' variant={'home03'} strokeColor={'#1EA7FD'} /> */}
|
99
130
|
</Popover.Button>
|
100
|
-
<div className='
|
131
|
+
<div className=''>
|
101
132
|
{dropdown(item['titleDropdown'])}
|
102
133
|
</div>
|
103
134
|
|
@@ -175,17 +206,17 @@ export default function V3Header(props) {
|
|
175
206
|
leaveFrom="opacity-100 scale-100"
|
176
207
|
leaveTo="opacity-0 scale-95"
|
177
208
|
>
|
178
|
-
<Popover.Panel focus className="absolute bg-
|
179
|
-
<div className=" rounded-lg bg-white shadow-lg">
|
180
|
-
<div className="
|
209
|
+
<Popover.Panel focus className="absolute h-[calc(100%-112px)] bg-base-0 z-[1] inset-x-0 top-0 origin-top-right transform transition md:hidden">
|
210
|
+
<div className=" rounded-lg bg-white h-[calc(100%-112px)] shadow-lg">
|
211
|
+
<div className="">
|
181
212
|
<div className="flex items-center justify-end">
|
182
|
-
<div className="
|
213
|
+
<div className="">
|
183
214
|
<Popover.Button className="inline-flex items-center justify-center rounded-md bg-white p-2 text-gray-400 hover:bg-gray-100 hover:text-gray-500 w-full">
|
184
215
|
<Icon height={'h-5 w-5'} variant={'xclose'} strokeColor={'#3970FD'} />
|
185
216
|
</Popover.Button>
|
186
217
|
</div>
|
187
218
|
</div>
|
188
|
-
<div className="mt-6 ">
|
219
|
+
<div className="mt-6 abcdefhgk flex flex-col gap-6">
|
189
220
|
<div className='flex flex-col items-center'>
|
190
221
|
<img
|
191
222
|
className="inline-block w-full px-4 "
|
@@ -194,62 +225,43 @@ export default function V3Header(props) {
|
|
194
225
|
/>
|
195
226
|
</div>
|
196
227
|
|
197
|
-
<nav className="grid
|
228
|
+
<nav className="grid divide-y divide-neutral-200 border border-neutral-200 rounded-3xl ">
|
198
229
|
{props.HEADER_LIST.map((item) => (
|
199
230
|
<a
|
200
231
|
key={item['title']}
|
201
|
-
|
202
|
-
className="
|
232
|
+
|
233
|
+
className="flex justify-between items-center p-4"
|
203
234
|
>
|
204
235
|
|
205
|
-
<div className="flex
|
236
|
+
<div className="flex items-center justify-center gap-2 ">
|
206
237
|
|
207
238
|
<Icon height='h-5 w-5' variant={'home03'} strokeColor={'#3970FD'} />
|
208
239
|
|
240
|
+
|
241
|
+
<Typography textStyle='body3c-medium' className='text-neutral-900'>
|
242
|
+
{`${item['title']}`}
|
243
|
+
</Typography>
|
209
244
|
</div>
|
210
|
-
|
211
|
-
|
212
|
-
</Typography>
|
245
|
+
|
246
|
+
<Icon height='h-5 w-5 stroke-[1.5px]' variant={'chevronright'} strokeClass='stroke-neutral-500' />
|
213
247
|
</a>
|
214
248
|
))}
|
215
249
|
</nav>
|
216
250
|
</div>
|
217
251
|
</div>
|
218
|
-
<div className="py-6 px-5">
|
219
|
-
|
220
|
-
<a href="#" className="text-base font-medium text-gray-900 hover:text-gray-700">
|
221
|
-
Pricing
|
222
|
-
</a>
|
223
|
-
|
224
|
-
<a href="#" className="text-base font-medium text-gray-900 hover:text-gray-700">
|
225
|
-
Docs
|
226
|
-
</a>
|
227
|
-
|
228
|
-
<a href="#" className="text-base font-medium text-gray-900 hover:text-gray-700">
|
229
|
-
Enterprise
|
230
|
-
</a>
|
231
|
-
{resources.map((item) => (
|
232
|
-
<a
|
233
|
-
key={item.name}
|
234
|
-
href={item.href}
|
235
|
-
className="text-base font-medium text-gray-900 hover:text-gray-700"
|
236
|
-
>
|
237
|
-
{item.name}
|
238
|
-
</a>
|
239
|
-
))}
|
240
|
-
</div> */}
|
241
|
-
<div className="mt-6">
|
252
|
+
<div className="py-6 px-5 ">
|
253
|
+
<div className="mt-6 ">
|
242
254
|
<div className='flex flex-row justify-around'>
|
243
|
-
<div className='w-full'>
|
255
|
+
<div className='w-full '>
|
244
256
|
<HDSButton
|
245
257
|
label="Log In"
|
246
|
-
type='
|
258
|
+
type='tonal'
|
247
259
|
leftIconVariant='none'
|
248
260
|
rightIconVariant='none'
|
249
261
|
state='default'
|
250
262
|
size='sm'
|
251
263
|
rightAnimatedArrow='true'
|
252
|
-
rightAnimatedArrowColor='#
|
264
|
+
rightAnimatedArrowColor='#3970FD'
|
253
265
|
animatedHoverStroke='group-hover:stroke-neutral-0'
|
254
266
|
|
255
267
|
/>
|
@@ -351,6 +363,6 @@ V3Header.defaultProps = {
|
|
351
363
|
},
|
352
364
|
]
|
353
365
|
},
|
354
|
-
|
366
|
+
|
355
367
|
]
|
356
368
|
}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import React from "react";
|
1
2
|
import { useState, useEffect } from "react";
|
2
3
|
import { Typography } from "../../foundation/Typography";
|
3
4
|
import { HDSButton } from "../Buttons";
|
@@ -80,11 +81,11 @@ export default function HeroSecondary({ heroData, logo, scrollArrow, fontSize })
|
|
80
81
|
>
|
81
82
|
{
|
82
83
|
logo ? (
|
83
|
-
<div className={"pb-4 db:text-left text-center tb-l:text-left" + ((heroData.video_url) ? " tb:text-center" : " tb:text-left")}>
|
84
|
+
<div className={"pb-4 db:text-left tb:text-center tb-l:text-left" + ((heroData.video_url) ? " tb:text-center" : " tb:text-left")}>
|
84
85
|
<img className="w-[290px] inline-block" src={logo} alt="Brand" />
|
85
86
|
</div>
|
86
87
|
) : (
|
87
|
-
<Typography textStyle=
|
88
|
+
<Typography textStyle='h2' as="h2" className={"pb-2 tb:text-center break-words db:text-left tb-l:text-left " + ((heroData.title_color) ? heroData.title_color : "") + ((heroData.video_url) ? " tb:text-center" : " tb:text-left")}>{heroData.title}</Typography>
|
88
89
|
)
|
89
90
|
}
|
90
91
|
</div>
|
@@ -93,20 +94,35 @@ export default function HeroSecondary({ heroData, logo, scrollArrow, fontSize })
|
|
93
94
|
|
94
95
|
const heroButton = () => (
|
95
96
|
heroData.buttons && (
|
96
|
-
<div className={" gap-
|
97
|
-
|
98
|
-
|
97
|
+
<div className={" gap-6 flex items-center tb:justify-center tb-l:justify-start db:justify-start pt-6" + ((heroData.video_url) ? " tb:justify-center" : " tb:justify-start")}>
|
98
|
+
|
99
|
+
|
100
|
+
{heroData.buttons[0] &&
|
99
101
|
<HDSButton
|
102
|
+
type="secondary"
|
103
|
+
btnTextColorClass={HDSColor('text-neutral-0')}
|
100
104
|
leftIconVariant='none'
|
101
105
|
rightIconVariant='none'
|
102
|
-
label={
|
106
|
+
label={heroData.buttons[0].cta_text}
|
103
107
|
state='default'
|
104
108
|
size='lg'
|
105
109
|
rightAnimatedArrow='true'
|
106
110
|
rightAnimatedArrowColor='#ffffff'
|
107
111
|
/>
|
108
|
-
|
109
|
-
|
112
|
+
}
|
113
|
+
{heroData.buttons[1] && <HDSButton
|
114
|
+
type="primaryLink"
|
115
|
+
btnTextColorClass={HDSColor('text-neutral-0')}
|
116
|
+
leftIconVariant='none'
|
117
|
+
rightIconVariant='none'
|
118
|
+
label={heroData.buttons[1].cta_text}
|
119
|
+
state='default'
|
120
|
+
size='lg'
|
121
|
+
rightAnimatedArrow='true'
|
122
|
+
rightAnimatedArrowColor='#ffffff'
|
123
|
+
/>}
|
124
|
+
|
125
|
+
|
110
126
|
</div>
|
111
127
|
)
|
112
128
|
)
|
@@ -137,20 +153,20 @@ export default function HeroSecondary({ heroData, logo, scrollArrow, fontSize })
|
|
137
153
|
|
138
154
|
const imageCard = (heroData) => (
|
139
155
|
heroData.imageUrl && (
|
140
|
-
<div className="">
|
141
|
-
<img src={heroData.imageUrl} alt={heroData.imageAlt} className='w-
|
156
|
+
<div className="w-1/2 tb-l:w-full tb:flex tb:flex-col tb:justify-center">
|
157
|
+
<img src={heroData.imageUrl} alt={heroData.imageAlt} className='w-full ' />
|
142
158
|
</div>
|
143
159
|
)
|
144
160
|
)
|
145
161
|
|
146
162
|
const videoGradientBg = HDSColor(heroData.video_gradient_bg);
|
147
163
|
return (
|
148
|
-
<div className="
|
149
|
-
<div className="
|
150
|
-
<div className={"max-w-7xl mx-auto rounded-3xl overflow-hidden " + ((heroData.bg_color) ? heroData.bg_color : "")} >
|
164
|
+
<div className="">
|
165
|
+
<div className="">
|
166
|
+
<div className={"max-w-7xl mx-auto px-20 py-20 rounded-3xl overflow-hidden " + ((heroData.bg_color) ? heroData.bg_color : "")} >
|
151
167
|
<div className="w-full">
|
152
|
-
<div className={"
|
153
|
-
<div className=
|
168
|
+
<div className={"tb-l:flex tb-l:items-center tb-l:flex-row db:w-full flex flex-col-reverse tb:gap-x-16 db:gap-x-10 min-[1880px]:gap-x-72" + ((heroData.video_url) ? " " : " tb:flex")}>
|
169
|
+
<div className='w-full tb:flex items-start tb:flex-col mt-4 tb:mt-0'
|
154
170
|
>
|
155
171
|
{
|
156
172
|
heroData.tag_line && (
|
@@ -166,13 +182,13 @@ export default function HeroSecondary({ heroData, logo, scrollArrow, fontSize })
|
|
166
182
|
{title(heroData)}
|
167
183
|
{
|
168
184
|
heroData.sub_title && (
|
169
|
-
<Typography textStyle="sub1" className={"text-center db:text-left
|
185
|
+
<Typography textStyle="sub1" className={"tb-l:text-center db:text-left flex" + ((heroData.sub_title_color) ? heroData.sub_title_color : "") + ((heroData.video_url) ? " tb:text-center" : " tb:text-left")}>{heroData.sub_title}</Typography>
|
170
186
|
)
|
171
187
|
}
|
172
188
|
|
173
189
|
{
|
174
190
|
heroData.description && (
|
175
|
-
<Typography textStyle="
|
191
|
+
<Typography textStyle="sub1" className="tb-l:text-center db:text-left text-neutral-0 [&>*]:mb-8 last:[&>*]:mb-0">{heroData.description}</Typography>
|
176
192
|
)
|
177
193
|
}
|
178
194
|
{heroButton(heroData)}
|
@@ -15,14 +15,7 @@ export default function TableA(props) {
|
|
15
15
|
<h1 className="text-base font-semibold leading-6 text-gray-900">{head}</h1>
|
16
16
|
<p className="mt-2 text-sm text-gray-700">{description}</p>
|
17
17
|
</div>
|
18
|
-
|
19
|
-
<button
|
20
|
-
type="button"
|
21
|
-
className="block rounded-md bg-indigo-600 py-2 px-3 text-center text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
|
22
|
-
>
|
23
|
-
Add user
|
24
|
-
</button>
|
25
|
-
</div> */}
|
18
|
+
|
26
19
|
</div>
|
27
20
|
|
28
21
|
<div>
|
@@ -42,14 +35,14 @@ export default function TableA(props) {
|
|
42
35
|
</tr>
|
43
36
|
</thead>
|
44
37
|
<tbody className="divide-y divide-gray-200 bg-white">
|
45
|
-
{tableValue.map((
|
46
|
-
<tr key={
|
47
|
-
{Object.keys(
|
38
|
+
{tableValue.map((value,index) => (
|
39
|
+
<tr key={index}>
|
40
|
+
{Object.keys(value).map((key, index2) => (
|
48
41
|
<td
|
49
|
-
key={
|
42
|
+
key={index2+index}
|
50
43
|
className=" py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-3"
|
51
44
|
>
|
52
|
-
{``}{
|
45
|
+
{``}{value[key]}
|
53
46
|
|
54
47
|
</td>
|
55
48
|
))}
|
@@ -0,0 +1,71 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { v4 as uuidv4 } from 'uuid';
|
3
|
+
import { Typography } from '../../foundation/Typography';
|
4
|
+
export default function TableA(props) {
|
5
|
+
const {
|
6
|
+
head,
|
7
|
+
description,
|
8
|
+
tableValue,
|
9
|
+
children
|
10
|
+
|
11
|
+
} = props;
|
12
|
+
console.log(tableValue.length);
|
13
|
+
const tableLength = tableValue.length;
|
14
|
+
|
15
|
+
return (
|
16
|
+
<div className=" ">
|
17
|
+
<div className="sm:flex sm:items-center ">
|
18
|
+
<div className="sm:flex-auto">
|
19
|
+
<h1 className="text-base font-semibold leading-6 text-gray-900">{head}</h1>
|
20
|
+
<p className="mt-2 text-sm text-gray-700">{description}</p>
|
21
|
+
</div>
|
22
|
+
|
23
|
+
</div>
|
24
|
+
|
25
|
+
<div>
|
26
|
+
<div className="border bg-neutral-50 border-neutral-100 rounded-2xl">
|
27
|
+
<table className="min-w-full divide-y divide-neutral-100 ">
|
28
|
+
<div>
|
29
|
+
|
30
|
+
|
31
|
+
<thead>
|
32
|
+
<tr className='divide-x divide-neutral-100'>
|
33
|
+
{Object.keys(tableValue[0]).map((key) => (
|
34
|
+
<th
|
35
|
+
key={key}
|
36
|
+
scope="col"
|
37
|
+
className="text-left sm:table-cell"
|
38
|
+
>
|
39
|
+
<Typography className='p-6' textStyle='body3c-bold'>{key}</Typography>
|
40
|
+
|
41
|
+
</th>
|
42
|
+
))}
|
43
|
+
</tr>
|
44
|
+
</thead>
|
45
|
+
|
46
|
+
<tbody className="divide-y rounded-b-3xl divide-neutral-100 bg-white">
|
47
|
+
{tableValue.map((value,index) => (
|
48
|
+
<tr key={index} className='divide-x divide-neutral-100'>
|
49
|
+
{Object.keys(value).map((key, index2) => (
|
50
|
+
<td
|
51
|
+
key={index2+index}
|
52
|
+
className={
|
53
|
+
'p-6 bg-neutral-0 ' + ((index == `${tableValue.length-1}`) ? 'rounded-3xl' : '')
|
54
|
+
}
|
55
|
+
>
|
56
|
+
|
57
|
+
<Typography textStyle='body3c-bold' className='bg-transparent text-neutral-800'>{key}</Typography>
|
58
|
+
<Typography textStyle='body3' className='text-neutral-800 mt-2'>Endless hours spent writing boilerplate code, resolvers, or mapping logic.</Typography>
|
59
|
+
|
60
|
+
</td>
|
61
|
+
))}
|
62
|
+
</tr>
|
63
|
+
))}
|
64
|
+
</tbody>
|
65
|
+
</div>
|
66
|
+
</table>
|
67
|
+
</div>
|
68
|
+
</div>
|
69
|
+
</div>
|
70
|
+
)
|
71
|
+
}
|