hds-web 0.1.1 → 0.1.3
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 +1 -1
- package/dist/index.es.css +1 -1
- package/dist/index.es.js +3 -3
- package/dist/index.js +3 -3
- package/package.json +3 -3
- package/rollup.config.js +2 -1
- package/src/HDS/assets/icons/hasura.svg +4 -0
- package/src/HDS/components/Avatars/hasConAv.js +5 -5
- package/src/HDS/components/Buttons/button.js +7 -5
- package/src/HDS/components/Carousels/carouselCard.js +57 -16
- package/src/HDS/components/common-components/Icon/IconMap.js +2 -1
- package/src/HDS/foundation/ColorPalette/color.js +19 -0
- package/src/HDS/foundation/ColorPalette/index.js +1 -23
- package/src/index.css +17 -15
- package/src/styles/tailwind.css +393 -81
- package/tailwind.config.js +7 -6
- package/src/HDS/foundation/ColorPalette/my-presets.js +0 -134
- package/src/index.ts +0 -1
- package/tsconfig.json +0 -11
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "hds-web",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.3",
|
4
4
|
"private": false,
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"module": "dist/index.es.js",
|
@@ -59,6 +59,7 @@
|
|
59
59
|
"@babel/preset-react": "^7.12.10",
|
60
60
|
"@rollup/plugin-commonjs": "^24.1.0",
|
61
61
|
"@rollup/plugin-image": "^3.0.2",
|
62
|
+
"@rollup/plugin-json": "^6.0.0",
|
62
63
|
"@rollup/plugin-node-resolve": "^13.3.0",
|
63
64
|
"@rollup/plugin-typescript": "^11.1.0",
|
64
65
|
"@storybook/addon-actions": "^6.5.16",
|
@@ -90,8 +91,7 @@
|
|
90
91
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
91
92
|
"rollup-plugin-postcss": "^4.0.2",
|
92
93
|
"rollup-plugin-terser": "^7.0.2",
|
93
|
-
"tailwindcss": "^3.2.4"
|
94
|
-
"typescript": "^5.0.4"
|
94
|
+
"tailwindcss": "^3.2.4"
|
95
95
|
},
|
96
96
|
"peerDependencies": {
|
97
97
|
"react": "^17.0.1",
|
package/rollup.config.js
CHANGED
@@ -7,7 +7,7 @@ import image from '@rollup/plugin-image';
|
|
7
7
|
import svgr from '@svgr/rollup'
|
8
8
|
import url from '@rollup/plugin-url'
|
9
9
|
import commonjs from '@rollup/plugin-commonjs';
|
10
|
-
|
10
|
+
import json from '@rollup/plugin-json';
|
11
11
|
export default [
|
12
12
|
{
|
13
13
|
input: './src/index.js',
|
@@ -24,6 +24,7 @@ export default [
|
|
24
24
|
},
|
25
25
|
],
|
26
26
|
plugins: [
|
27
|
+
json(),
|
27
28
|
postcss({
|
28
29
|
extensions: ['.css'],
|
29
30
|
extract: true,
|
@@ -0,0 +1,4 @@
|
|
1
|
+
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
+
<path d="M6.90242 4.54755L7.31044 5.17685C8.69886 4.27665 10.3575 3.75351 12.1427 3.75351C13.9278 3.75351 15.5864 4.27665 16.9749 5.17685L16.9753 5.17712C17.7616 5.68623 18.8113 5.5224 19.3973 4.78435L19.4205 4.75511L19.4407 4.72371L20.4859 3.09894C20.7832 3.70359 21.0075 4.58795 21.1085 5.56141C21.2297 6.72912 21.1571 7.86576 20.9257 8.57919L20.9256 8.57948C20.6977 9.28328 20.6295 10.0391 20.7649 10.7837L20.7656 10.7873C20.8793 11.3956 20.98 12.0679 20.98 12.5018C20.98 17.3253 17.0299 21.2502 12.1404 21.2502C7.25292 21.2502 3.30071 17.3274 3.30071 12.5018C3.30071 12.0679 3.40144 11.3956 3.51518 10.7873L3.51536 10.7863C3.65353 10.0418 3.58819 9.28511 3.35967 8.57948L3.35949 8.57893C3.12825 7.86674 3.05558 6.73078 3.17677 5.56302C3.2778 4.58962 3.50216 3.70474 3.79965 3.09928L4.84456 4.72371L4.86593 4.75693L4.89067 4.78773C5.47582 5.516 6.52292 5.68922 7.31143 5.17621L6.90242 4.54755ZM6.90242 4.54755C6.43885 4.84916 5.82074 4.74787 5.47533 4.31797L3.37457 2.33707C2.38099 3.80178 2.09419 7.11061 2.64616 8.81055C2.83931 9.40701 2.89158 10.0372 2.77796 10.6494C2.66434 11.2572 2.55071 11.9909 2.55071 12.5018C2.55071 17.7484 6.84561 22.0002 12.1404 22.0002C17.4374 22.0002 21.73 17.7462 21.73 12.5018C21.73 11.9909 21.6164 11.2572 21.5028 10.6494C21.3914 10.0372 21.446 9.40701 21.6391 8.81055C22.1911 7.10851 21.9043 3.79969 20.9108 2.33684C20.8129 2.19276 20.641 2.12476 20.4674 2.13837C20.2979 2.15166 20.1444 2.24341 20.0525 2.38638L18.81 4.31797C18.4668 4.75012 17.8487 4.84916 17.3829 4.54755C15.8763 3.57071 14.0765 3.00351 12.1427 3.00351C10.2088 3.00351 8.40904 3.57071 6.90242 4.54755Z" stroke-width="1.5"/>
|
3
|
+
<path d="M12.4 12.5L10 15M10.8 10L14 15" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
4
|
+
</svg>
|
@@ -6,18 +6,18 @@ import { Icon } from '../common-components/Icon';
|
|
6
6
|
export default function HasConAvatar({ name, designation, size, imageUrl }) {
|
7
7
|
const hasImageUrl = imageUrl && imageUrl.length > 0;
|
8
8
|
return (
|
9
|
-
<div className=
|
9
|
+
<div className={`${size} sm:w-52 group flex-shrink-0 rounded-2xl flex items-center justify-between bg-neutral-0 desk:inline-flex desk:flex-col shadow hover:shadow-xl desk:min-w-[18rem]`}>
|
10
10
|
|
11
|
-
<div className="
|
11
|
+
<div className="mx-5 desk:flex-col desk:flex desk:items-center desk:p-8 desk:ml-0 bg-neutral-0">
|
12
12
|
<Typography textStyle='body1c-bold' className='text-blue-400'>{name}</Typography>
|
13
13
|
<Typography textStyle='body3c-medium' className='text-blue-800'>{designation}</Typography>
|
14
14
|
</div>
|
15
|
-
<div className='relative'>
|
15
|
+
<div className='relative '>
|
16
16
|
<img
|
17
|
-
className={`inline-block
|
17
|
+
className={`inline-block w-[9rem] desk:min-w-[18rem] desk:rounded-2xl border-neutral-0 rounded-r-2xl `}
|
18
18
|
src={imageUrl}
|
19
19
|
/>
|
20
|
-
<div className="absolute rounded-2xl inset-0 group-hover:bg-gradient-to-t group-hover:from-amber-200 group-hover:to-transparent group-hover:opacity-30" ></div>
|
20
|
+
<div className="absolute rounded-b-2xl inset-0 group-hover:bg-gradient-to-t group-hover:from-amber-200 group-hover:to-transparent group-hover:opacity-30" ></div>
|
21
21
|
</div>
|
22
22
|
|
23
23
|
|
@@ -19,11 +19,13 @@ const Buttonclasses = {
|
|
19
19
|
},
|
20
20
|
'disabled': 'bg-neutral-200 text-neutral-400',
|
21
21
|
},
|
22
|
-
'
|
22
|
+
'secondary': {
|
23
23
|
'default': {
|
24
|
-
'base': 'desk:w-fit tab:w-fit w-full
|
25
|
-
|
26
|
-
'
|
24
|
+
'base': 'desk:w-fit tab:w-fit w-full justify-center border-2 border-blue-500 bg-neutral-0 text-blue-500',
|
25
|
+
|
26
|
+
'hover': 'hover:text-neutral-800 hover:bg-blue-200 hover:border-2 hover:border-blue-500 hover:shadow hover:text-blue-500',
|
27
|
+
|
28
|
+
'focus': 'focus:bg-blue-200 focus:text-neutral-800 focus:border-2 border-blue-500 focus:shadow-[0px_0px_0px_4px_#DFE8FF] focus:outline-none focus:text-blue-500',
|
27
29
|
},
|
28
30
|
'disabled': 'bg-neutral-200 text-neutral-400',
|
29
31
|
},
|
@@ -53,7 +55,7 @@ const Buttonclasses = {
|
|
53
55
|
},
|
54
56
|
'iconOnly': {
|
55
57
|
'default': {
|
56
|
-
'base': '
|
58
|
+
'base': 'w-fit justify-center justify-center bg-blue-200 rounded-full p-1.5',
|
57
59
|
|
58
60
|
'hover': 'hover:bg-blue-600 hover:shadow',
|
59
61
|
|
@@ -56,6 +56,17 @@ export default function Carouseltest(props) {
|
|
56
56
|
scrollToCard(currentCard - 1);
|
57
57
|
}
|
58
58
|
};
|
59
|
+
const slider = () => {
|
60
|
+
return(
|
61
|
+
<div className=' '>
|
62
|
+
<div
|
63
|
+
className='bg-blue-100 w-96 rounded-md content-center h-1'>
|
64
|
+
<div className="bg-blue-600 rounded-md h-1 w-6">
|
65
|
+
</div>
|
66
|
+
</div>
|
67
|
+
</div>
|
68
|
+
)
|
69
|
+
};
|
59
70
|
|
60
71
|
const arrowStyle = ' text-2xl z-10 bg-black h-10 w-10 rounded-full bg-neutral-0 flex items-center justify-center';
|
61
72
|
|
@@ -80,28 +91,58 @@ export default function Carouseltest(props) {
|
|
80
91
|
</button>
|
81
92
|
);
|
82
93
|
return (
|
83
|
-
<div>
|
84
|
-
|
85
|
-
|
86
|
-
{
|
94
|
+
<div className="">
|
95
|
+
<div className="block sm:hidden">
|
96
|
+
{props.cards.map((item, i) => (
|
97
|
+
<div className="my-5" key={i} ref={refs[i]}>
|
98
|
+
<div className="rounded-3xl ">
|
99
|
+
{React.createElement(props.component, item)}
|
100
|
+
</div>
|
101
|
+
|
102
|
+
</div>
|
103
|
+
))}
|
104
|
+
</div>
|
105
|
+
|
106
|
+
<div className="invisible flex flex-col-reverse sm:visible">
|
107
|
+
<div className="flex items-center justify-around mt-20 ">
|
108
|
+
{slider()}
|
109
|
+
<div className="flex">
|
110
|
+
{sliderControl(true)}
|
111
|
+
{sliderControl()}
|
112
|
+
</div>
|
87
113
|
</div>
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
114
|
+
<div className="justify-center select-none items-center"
|
115
|
+
onTouchStart={handleTouchStart}
|
116
|
+
onTouchMove={handleTouchMove}
|
117
|
+
onTouchEnd={handleTouchEnd}
|
118
|
+
onMouseDown={e => setTouchStart(e.clientX)}
|
119
|
+
onMouseUp={e => {
|
120
|
+
if (touchStart - e.clientX > 50) {
|
121
|
+
nextCard();
|
122
|
+
}
|
123
|
+
|
124
|
+
if (touchStart - e.clientX < -50) {
|
125
|
+
previousCard();
|
126
|
+
}
|
127
|
+
}}
|
128
|
+
>
|
129
|
+
<div className="">
|
130
|
+
<div className={`snap-x ${props.carouselWidth} inline-flex select-none overflow-x-hidden scrollbar-hide`}>
|
131
|
+
|
132
|
+
{props.cards.map((item, i) => (
|
133
|
+
<div className="snap-center mx-5 shrink-0" key={i} ref={refs[i]}>
|
134
|
+
<div className="w-full select-none rounded-3xl object-contain">
|
135
|
+
{React.createElement(props.component, item)}
|
136
|
+
</div>
|
137
|
+
|
97
138
|
</div>
|
139
|
+
))}
|
98
140
|
|
99
|
-
|
100
|
-
))}
|
101
|
-
|
141
|
+
</div>
|
102
142
|
</div>
|
103
143
|
</div>
|
104
144
|
</div>
|
145
|
+
|
105
146
|
</div>
|
106
147
|
);
|
107
148
|
};
|
@@ -1172,9 +1172,10 @@ import {ReactComponent as PlaceholderIcon } from "../../../assets/icons/placehol
|
|
1172
1172
|
import {ReactComponent as Home03Icon } from "../../../assets/icons/home-03.svg"
|
1173
1173
|
import {ReactComponent as HasuraBlueLogoIcon } from "../../../assets/V3/HasuraBlueLogo.svg"
|
1174
1174
|
import {ReactComponent as Minus01Icon } from "../../../assets/icons/minus-01.svg"
|
1175
|
-
|
1175
|
+
import {ReactComponent as HasuraIcon } from "../../../assets/icons/hasura.svg"
|
1176
1176
|
|
1177
1177
|
const iconReferenceMap = {
|
1178
|
+
hasura: HasuraIcon,
|
1178
1179
|
minus01: Minus01Icon,
|
1179
1180
|
clockrewind: ClockrewindIcon,
|
1180
1181
|
passport: PassportIcon,
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import resolveConfig from 'tailwindcss/resolveConfig';
|
2
|
+
import tailwindConfig from '../../../../tailwind.config';
|
3
|
+
const fullConfig = resolveConfig(tailwindConfig);
|
4
|
+
var HDSColors = {};
|
5
|
+
let textCode = "";
|
6
|
+
let colorCode = "";
|
7
|
+
for (const x in fullConfig.theme.colors) {
|
8
|
+
for (const y in fullConfig.theme.colors[x]) {
|
9
|
+
colorCode = "bg-" + x + "-" + y;
|
10
|
+
textCode = "text-" + x + "-" + y;
|
11
|
+
HDSColors[colorCode] = colorCode;
|
12
|
+
HDSColors[textCode] = textCode;
|
13
|
+
}
|
14
|
+
}
|
15
|
+
export default function HDSColor(color = 'bg-blue-600') {
|
16
|
+
return HDSColors[color];
|
17
|
+
}
|
18
|
+
|
19
|
+
|
@@ -1,23 +1 @@
|
|
1
|
-
|
2
|
-
import React from 'react';
|
3
|
-
const ColorBox = ({ applyclass }) => {
|
4
|
-
return (
|
5
|
-
<div className=' flex place-content-evenly flex-wrap border-rose-500' >
|
6
|
-
{Object.entries(applyclass).map(([key, value]) => (
|
7
|
-
<div>
|
8
|
-
<div className='w-24'>
|
9
|
-
<div key={key} className={`bg-${key}`}>
|
10
|
-
<div className={`bg-${key} h-24 my-5 text-sm-bold flex place-content-around items-center flex-wrap rounded`}> </div>
|
11
|
-
</div>
|
12
|
-
<div className='flex place-content-around items-center text-sm-bold '> {value} <br /> {key}</div>
|
13
|
-
</div>
|
14
|
-
</div>
|
15
|
-
|
16
|
-
))}
|
17
|
-
|
18
|
-
</div>
|
19
|
-
);
|
20
|
-
};
|
21
|
-
export default ColorBox;
|
22
|
-
|
23
|
-
|
1
|
+
export {default as HDSColor} from './color';
|
package/src/index.css
CHANGED
@@ -2,11 +2,13 @@
|
|
2
2
|
@tailwind components;
|
3
3
|
@tailwind utilities;
|
4
4
|
/* Typography classes */
|
5
|
+
|
5
6
|
.scrollbar-hide::-webkit-scrollbar {
|
6
7
|
width: 0;
|
7
8
|
height: 0;
|
8
9
|
}
|
9
|
-
|
10
|
+
|
11
|
+
|
10
12
|
.display-2xl-bold {
|
11
13
|
@apply text-7xl font-bold;
|
12
14
|
letter-spacing: -0.015em;
|
@@ -178,38 +180,38 @@
|
|
178
180
|
}
|
179
181
|
|
180
182
|
.code-lg {
|
181
|
-
@apply text-lg font-normal
|
182
|
-
|
183
|
+
@apply text-lg font-normal;
|
184
|
+
|
183
185
|
}
|
184
186
|
|
185
187
|
.code-md {
|
186
|
-
@apply text-base font-normal
|
188
|
+
@apply text-base font-normal;
|
187
189
|
}
|
188
190
|
|
189
191
|
.code-sm {
|
190
|
-
@apply text-sm font-normal
|
192
|
+
@apply text-sm font-normal;
|
191
193
|
}
|
192
194
|
|
193
195
|
|
194
|
-
.button-sm{
|
195
|
-
@apply text-
|
196
|
+
.button-sm {
|
197
|
+
@apply text-hds-d-body3c-medium py-1.5 px-4 rounded-full;
|
196
198
|
|
197
199
|
}
|
198
200
|
|
199
|
-
.button-md{
|
200
|
-
@apply text-
|
201
|
+
.button-md {
|
202
|
+
@apply text-hds-d-body3c-medium rounded-full py-2.5 px-5;
|
201
203
|
}
|
202
204
|
|
203
|
-
.button-lg{
|
204
|
-
@apply text-
|
205
|
+
.button-lg {
|
206
|
+
@apply text-hds-d-body1c-medium rounded-full py-3 px-6;
|
205
207
|
|
206
208
|
}
|
207
209
|
|
208
|
-
.button-xl{
|
210
|
+
.button-xl {
|
209
211
|
@apply text-md-medium rounded-full py-3 px-7;
|
210
212
|
}
|
211
213
|
|
212
|
-
.button-2xl{
|
214
|
+
.button-2xl {
|
213
215
|
@apply text-lg-medium rounded-full py-4 px-8;
|
214
216
|
|
215
217
|
}
|
@@ -217,8 +219,8 @@
|
|
217
219
|
.language-javascript {
|
218
220
|
background-color: transparent !important;
|
219
221
|
padding: 0 !important;
|
220
|
-
|
222
|
+
}
|
221
223
|
|
222
|
-
|
224
|
+
.token.operator {
|
223
225
|
background: none !important;
|
224
226
|
}
|