hds-web 0.1.2 → 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/Carousels/carouselCard.js +52 -38
- 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/styles/tailwind.css +16 -0
- package/src/HDS/foundation/ColorPalette/my-presets.js +0 -134
- package/src/index.ts +0 -1
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>
|
@@ -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
|
|
@@ -82,52 +93,55 @@ export default function Carouseltest(props) {
|
|
82
93
|
return (
|
83
94
|
<div className="">
|
84
95
|
<div className="block sm:hidden">
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
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>
|
90
101
|
|
91
|
-
|
92
|
-
|
102
|
+
</div>
|
103
|
+
))}
|
93
104
|
</div>
|
94
105
|
|
95
|
-
<div className="invisible sm:visible">
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
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>
|
113
|
+
</div>
|
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>
|
123
137
|
|
124
|
-
|
125
|
-
|
138
|
+
</div>
|
139
|
+
))}
|
126
140
|
|
141
|
+
</div>
|
127
142
|
</div>
|
128
143
|
</div>
|
129
144
|
</div>
|
130
|
-
</div>
|
131
145
|
|
132
146
|
</div>
|
133
147
|
);
|
@@ -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/styles/tailwind.css
CHANGED
@@ -1204,6 +1204,10 @@ select {
|
|
1204
1204
|
margin-top: 2rem;
|
1205
1205
|
}
|
1206
1206
|
|
1207
|
+
.mt-20 {
|
1208
|
+
margin-top: 5rem;
|
1209
|
+
}
|
1210
|
+
|
1207
1211
|
.block {
|
1208
1212
|
display: block;
|
1209
1213
|
}
|
@@ -1308,6 +1312,10 @@ select {
|
|
1308
1312
|
height: 100%;
|
1309
1313
|
}
|
1310
1314
|
|
1315
|
+
.h-1 {
|
1316
|
+
height: 0.25rem;
|
1317
|
+
}
|
1318
|
+
|
1311
1319
|
.w-1\/2 {
|
1312
1320
|
width: 50%;
|
1313
1321
|
}
|
@@ -1562,6 +1570,10 @@ select {
|
|
1562
1570
|
flex-direction: column;
|
1563
1571
|
}
|
1564
1572
|
|
1573
|
+
.flex-col-reverse {
|
1574
|
+
flex-direction: column-reverse;
|
1575
|
+
}
|
1576
|
+
|
1565
1577
|
.flex-wrap {
|
1566
1578
|
flex-wrap: wrap;
|
1567
1579
|
}
|
@@ -1578,6 +1590,10 @@ select {
|
|
1578
1590
|
place-content: space-evenly;
|
1579
1591
|
}
|
1580
1592
|
|
1593
|
+
.content-center {
|
1594
|
+
align-content: center;
|
1595
|
+
}
|
1596
|
+
|
1581
1597
|
.items-start {
|
1582
1598
|
align-items: flex-start;
|
1583
1599
|
}
|
@@ -1,134 +0,0 @@
|
|
1
|
-
module.exports = {
|
2
|
-
theme: {
|
3
|
-
colors: {
|
4
|
-
'primary': {
|
5
|
-
'neutral-100': '#F3F4F6',
|
6
|
-
'blue-600': '#1E56E3',
|
7
|
-
'neutral-800': '#1F2A37',
|
8
|
-
},
|
9
|
-
'neutral': {
|
10
|
-
0: '#FFFFFF',
|
11
|
-
50: '#F9FAFB',
|
12
|
-
100: '#F3F4F6',
|
13
|
-
150: '#ECEDF0',
|
14
|
-
200: '#E5E7EB',
|
15
|
-
},
|
16
|
-
'neutral': {
|
17
|
-
300: '#D2D6DB',
|
18
|
-
400: '#9DA4AE',
|
19
|
-
500: '#6C737F',
|
20
|
-
600: '#4D5761',
|
21
|
-
700: '#384250',
|
22
|
-
},
|
23
|
-
'neutral': {
|
24
|
-
800: '#1F2A37',
|
25
|
-
850: '#18222F',
|
26
|
-
900: '#111927',
|
27
|
-
950: '#0D1420',
|
28
|
-
1000: '#000615',
|
29
|
-
},
|
30
|
-
|
31
|
-
'blue': {
|
32
|
-
100: '#F0F4FF',
|
33
|
-
200: '#DFE8FF',
|
34
|
-
300: '#C6D6FF',
|
35
|
-
400: '#80A3FF',
|
36
|
-
500: '#3970FD',
|
37
|
-
600: '#1E56E3',
|
38
|
-
700: '#0D41C6',
|
39
|
-
800: '#00288E',
|
40
|
-
},
|
41
|
-
|
42
|
-
'purple': {
|
43
|
-
100: '#F7F2FF',
|
44
|
-
200: '#EDE1FF',
|
45
|
-
300: '#DBC6FF',
|
46
|
-
400: '#B487FF',
|
47
|
-
500: '#8C49FA',
|
48
|
-
600: '#712BE3',
|
49
|
-
700: '#5E13D7',
|
50
|
-
800: '#3F01A6',
|
51
|
-
},
|
52
|
-
|
53
|
-
'cyan': {
|
54
|
-
100: '#E3FAFF',
|
55
|
-
200: '#C2F4FF',
|
56
|
-
300: '#93ECFF',
|
57
|
-
400: '#3ECAE8',
|
58
|
-
500: '#0E96B2',
|
59
|
-
600: '#04758D',
|
60
|
-
700: '#005A6C',
|
61
|
-
800: '#003945',
|
62
|
-
},
|
63
|
-
|
64
|
-
'green': {
|
65
|
-
100: '#DAFFF4',
|
66
|
-
200: '#B8FBE7',
|
67
|
-
300: '#91F5D7',
|
68
|
-
400: '#39DAAA',
|
69
|
-
500: '#0EA578',
|
70
|
-
600: '#027D59',
|
71
|
-
700: '#006043',
|
72
|
-
800: '#003C2B',
|
73
|
-
},
|
74
|
-
'pink': {
|
75
|
-
100: '#FFEDF4',
|
76
|
-
200: '#FFD9E7',
|
77
|
-
300: '#FFBCD6',
|
78
|
-
400: '#F677AA',
|
79
|
-
500: '#E13A7C',
|
80
|
-
600: '#C21E5F',
|
81
|
-
700: '#A50A48',
|
82
|
-
800: '#71002C',
|
83
|
-
},
|
84
|
-
'amber': {
|
85
|
-
100: '#FFF3D4',
|
86
|
-
200: '#FFE4B0',
|
87
|
-
300: '#FFCE70',
|
88
|
-
400: '#FFA81B',
|
89
|
-
500: '#E07900',
|
90
|
-
600: '#B85800',
|
91
|
-
700: '#993700',
|
92
|
-
800: '#782400',
|
93
|
-
},
|
94
|
-
'yellow': {
|
95
|
-
100: '#FFF9C7',
|
96
|
-
200: '#FFEF93',
|
97
|
-
300: '#FFDF5A',
|
98
|
-
400: '#FBCB3A',
|
99
|
-
500: '#EBB230',
|
100
|
-
600: '#CA8924',
|
101
|
-
700: '#A1611A',
|
102
|
-
800: '#854D18',
|
103
|
-
},
|
104
|
-
'orange': {
|
105
|
-
100: '#FFEDD7',
|
106
|
-
200: '#FED7AD',
|
107
|
-
300: '#FDB97A',
|
108
|
-
400: '#FB9147',
|
109
|
-
500: '#F87229',
|
110
|
-
600: '#E9571F',
|
111
|
-
700: '#C14018',
|
112
|
-
800: '#993418',
|
113
|
-
},
|
114
|
-
'red': {
|
115
|
-
100: '#FEE2E2',
|
116
|
-
200: '#FECACB',
|
117
|
-
300: '#FBA5A6',
|
118
|
-
400: '#F77173',
|
119
|
-
500: '#EE4447',
|
120
|
-
600: '#DB252B',
|
121
|
-
700: '#B81B20',
|
122
|
-
800: '#981A1E',
|
123
|
-
},
|
124
|
-
},
|
125
|
-
|
126
|
-
extend: {
|
127
|
-
}
|
128
|
-
}
|
129
|
-
}
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
package/src/index.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export * from './HDS';
|