@knapsack/sandbox-components 4.67.3--canary.4456.b3982c0.0 → 4.67.3--canary.aa8dfe6.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/css/ks-sandbox-styles.css +19 -58
- package/dist/react/header.d.ts.map +1 -1
- package/dist/react/header.js +1 -6
- package/dist/react/header.js.map +1 -1
- package/package.json +7 -7
- package/src/css/header.css +12 -52
- package/src/react/header.tsx +2 -27
@@ -1372,22 +1372,15 @@ body {
|
|
1372
1372
|
.header {
|
1373
1373
|
background-color: #7a34ed;
|
1374
1374
|
background-color: var(--brand-color);
|
1375
|
-
padding: 8px
|
1376
|
-
padding:
|
1377
|
-
|
1378
|
-
|
1379
|
-
|
1380
|
-
|
1381
|
-
|
1382
|
-
|
1383
|
-
|
1384
|
-
background-image: url('https://knapsack.imgix.net/site/ks-sandbox/logo-arcadia-4id5a3sy3ysvg');
|
1385
|
-
background-image: var(--brand-logo);
|
1386
|
-
width: 100%;
|
1387
|
-
height: 28px;
|
1388
|
-
background-repeat: no-repeat;
|
1389
|
-
background-position: center;
|
1390
|
-
background-size: contain;
|
1375
|
+
padding-top: 8px;
|
1376
|
+
padding-bottom: 8px;
|
1377
|
+
padding-top: var(--spacing-small);
|
1378
|
+
padding-bottom: var(--spacing-small);
|
1379
|
+
padding-left: 16px;
|
1380
|
+
padding-right: 16px;
|
1381
|
+
padding-left: var(--spacing-large);
|
1382
|
+
padding-right: var(--spacing-large);
|
1383
|
+
width: 100vw;
|
1391
1384
|
}
|
1392
1385
|
|
1393
1386
|
.header-content {
|
@@ -1395,53 +1388,21 @@ body {
|
|
1395
1388
|
align-items: center;
|
1396
1389
|
justify-content: space-between;
|
1397
1390
|
width: 100%;
|
1398
|
-
height: 100%;
|
1399
|
-
z-index: 15;
|
1400
|
-
position: relative;
|
1401
|
-
}
|
1402
|
-
|
1403
|
-
.menu {
|
1404
|
-
position: absolute;
|
1405
|
-
top: 60px;
|
1406
|
-
left: 0;
|
1407
|
-
width: 100%;
|
1408
|
-
max-height: 300px;
|
1409
|
-
background-color: #7a34ed;
|
1410
|
-
background-color: var(--brand-color);
|
1411
|
-
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
1412
|
-
padding: 12px 0;
|
1413
|
-
padding: var(--spacing-medium) 0;
|
1414
|
-
z-index: 5;
|
1415
|
-
transform: translateY(-100%);
|
1416
|
-
transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
|
1417
|
-
opacity: 0;
|
1418
|
-
visibility: hidden;
|
1419
|
-
}
|
1420
|
-
|
1421
|
-
.menu.open {
|
1422
|
-
transform: translateY(0);
|
1423
|
-
opacity: 1;
|
1424
|
-
visibility: visible;
|
1425
|
-
}
|
1426
|
-
|
1427
|
-
.menu ul {
|
1428
|
-
list-style: none;
|
1429
|
-
margin: 0;
|
1430
|
-
padding: 0;
|
1431
1391
|
}
|
1432
1392
|
|
1433
|
-
.menu
|
1434
|
-
|
1435
|
-
|
1393
|
+
.menu-icon {
|
1394
|
+
margin-right: 12px;
|
1395
|
+
margin-right: var(--spacing-medium);
|
1436
1396
|
}
|
1437
1397
|
|
1438
|
-
.
|
1439
|
-
-
|
1440
|
-
|
1441
|
-
color: #FFFFFF;
|
1442
|
-
display: block;
|
1398
|
+
.logo {
|
1399
|
+
background-image: url('https://knapsack.imgix.net/site/ks-sandbox/logo-arcadia-4id5a3sy3ysvg');
|
1400
|
+
background-image: var(--brand-logo);
|
1443
1401
|
width: 100%;
|
1444
|
-
|
1402
|
+
height: 28px;
|
1403
|
+
background-repeat: no-repeat;
|
1404
|
+
background-position: center;
|
1405
|
+
background-size: contain;
|
1445
1406
|
}
|
1446
1407
|
|
1447
1408
|
.hero {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../src/react/header.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../src/react/header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,MAAM,WAAW,GAAG;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAuBxC,CAAC"}
|
package/dist/react/header.js
CHANGED
@@ -1,12 +1,7 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
-
import { useState } from 'react';
|
3
2
|
import clsx from 'clsx';
|
4
3
|
import { Button } from './button.js';
|
5
4
|
export const Header = ({ className }) => {
|
6
|
-
|
7
|
-
const toggleMenu = () => {
|
8
|
-
setIsMenuOpen(!isMenuOpen);
|
9
|
-
};
|
10
|
-
return (_jsxs("header", { className: clsx('header', className, { 'menu-open': isMenuOpen }), children: [_jsxs("div", { className: "header-content", children: [_jsx("svg", { onClick: toggleMenu, width: "24", height: "19", viewBox: "0 0 24 19", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: { cursor: 'pointer' }, children: _jsx("path", { d: "M24 9.5C24 9.76522 23.8946 10.0196 23.7071 10.2071C23.5196 10.3946 23.2652 10.5 23 10.5H1C0.734784 10.5 0.48043 10.3946 0.292893 10.2071C0.105357 10.0196 0 9.76522 0 9.5C0 9.23478 0.105357 8.98043 0.292893 8.79289C0.48043 8.60536 0.734784 8.5 1 8.5H23C23.2652 8.5 23.5196 8.60536 23.7071 8.79289C23.8946 8.98043 24 9.23478 24 9.5ZM1 2.5H23C23.2652 2.5 23.5196 2.39464 23.7071 2.20711C23.8946 2.01957 24 1.76522 24 1.5C24 1.23478 23.8946 0.98043 23.7071 0.792893C23.5196 0.605357 23.2652 0.5 23 0.5H1C0.734784 0.5 0.48043 0.605357 0.292893 0.792893C0.105357 0.98043 0 1.23478 0 1.5C0 1.76522 0.105357 2.01957 0.292893 2.20711C0.48043 2.39464 0.734784 2.5 1 2.5ZM23 16.5H1C0.734784 16.5 0.48043 16.6054 0.292893 16.7929C0.105357 16.9804 0 17.2348 0 17.5C0 17.7652 0.105357 18.0196 0.292893 18.2071C0.48043 18.3946 0.734784 18.5 1 18.5H23C23.2652 18.5 23.5196 18.3946 23.7071 18.2071C23.8946 18.0196 24 17.7652 24 17.5C24 17.2348 23.8946 16.9804 23.7071 16.7929C23.5196 16.6054 23.2652 16.5 23 16.5Z", fill: "white" }) }), _jsx("div", { className: "logo" }), _jsx(Button, { type: "outlined", size: "medium", label: "Login" })] }), _jsx("div", { className: clsx('menu', { open: isMenuOpen }), children: _jsxs("ul", { children: [_jsx("li", { children: _jsx("a", { href: "#home", children: "Home" }) }), _jsx("li", { children: _jsx("a", { href: "#about", children: "About" }) }), _jsx("li", { children: _jsx("a", { href: "#services", children: "Services" }) }), _jsx("li", { children: _jsx("a", { href: "#contact", children: "Contact" }) })] }) })] }));
|
5
|
+
return (_jsx("header", { className: clsx('header', className), children: _jsxs("div", { className: "header-content", children: [_jsx("svg", { width: "24", height: "19", viewBox: "0 0 24 19", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M24 9.5C24 9.76522 23.8946 10.0196 23.7071 10.2071C23.5196 10.3946 23.2652 10.5 23 10.5H1C0.734784 10.5 0.48043 10.3946 0.292893 10.2071C0.105357 10.0196 0 9.76522 0 9.5C0 9.23478 0.105357 8.98043 0.292893 8.79289C0.48043 8.60536 0.734784 8.5 1 8.5H23C23.2652 8.5 23.5196 8.60536 23.7071 8.79289C23.8946 8.98043 24 9.23478 24 9.5ZM1 2.5H23C23.2652 2.5 23.5196 2.39464 23.7071 2.20711C23.8946 2.01957 24 1.76522 24 1.5C24 1.23478 23.8946 0.98043 23.7071 0.792893C23.5196 0.605357 23.2652 0.5 23 0.5H1C0.734784 0.5 0.48043 0.605357 0.292893 0.792893C0.105357 0.98043 0 1.23478 0 1.5C0 1.76522 0.105357 2.01957 0.292893 2.20711C0.48043 2.39464 0.734784 2.5 1 2.5ZM23 16.5H1C0.734784 16.5 0.48043 16.6054 0.292893 16.7929C0.105357 16.9804 0 17.2348 0 17.5C0 17.7652 0.105357 18.0196 0.292893 18.2071C0.48043 18.3946 0.734784 18.5 1 18.5H23C23.2652 18.5 23.5196 18.3946 23.7071 18.2071C23.8946 18.0196 24 17.7652 24 17.5C24 17.2348 23.8946 16.9804 23.7071 16.7929C23.5196 16.6054 23.2652 16.5 23 16.5Z", fill: "white" }) }), _jsx("div", { className: "logo" }), _jsx(Button, { type: "outlined", size: "medium", label: "Login" })] }) }));
|
11
6
|
};
|
12
7
|
//# sourceMappingURL=header.js.map
|
package/dist/react/header.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"header.js","sourceRoot":"","sources":["../../src/react/header.tsx"],"names":[],"mappings":";
|
1
|
+
{"version":3,"file":"header.js","sourceRoot":"","sources":["../../src/react/header.tsx"],"names":[],"mappings":";AACA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAMrC,MAAM,CAAC,MAAM,MAAM,GAA0B,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE;IAC7D,OAAO,CACL,iBAAQ,SAAS,EAAE,IAAI,CAAC,QAAQ,EAAE,SAAS,CAAC,YAC1C,eAAK,SAAS,EAAC,gBAAgB,aAC7B,cACE,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,YAElC,eACE,CAAC,EAAC,s+BAAs+B,EACx+B,IAAI,EAAC,OAAO,GACZ,GACE,EAEN,cAAK,SAAS,EAAC,MAAM,GAAG,EAExB,KAAC,MAAM,IAAC,IAAI,EAAC,UAAU,EAAC,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,OAAO,GAAG,IAClD,GACC,CACV,CAAC;AACJ,CAAC,CAAC"}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@knapsack/sandbox-components",
|
3
3
|
"description": "",
|
4
|
-
"version": "4.67.3--canary.
|
4
|
+
"version": "4.67.3--canary.aa8dfe6.0",
|
5
5
|
"type": "module",
|
6
6
|
"exports": {
|
7
7
|
"./css": "./dist/css/ks-sandbox-styles.css",
|
@@ -37,11 +37,11 @@
|
|
37
37
|
"vue": "^3.4.27"
|
38
38
|
},
|
39
39
|
"devDependencies": {
|
40
|
-
"@knapsack/eslint-config-starter": "4.67.3--canary.
|
41
|
-
"@knapsack/postcss-config-starter": "4.67.3--canary.
|
42
|
-
"@knapsack/prettier-config": "4.67.3--canary.
|
43
|
-
"@knapsack/sandbox-tokens": "4.67.3--canary.
|
44
|
-
"@knapsack/typescript-config-starter": "4.67.3--canary.
|
40
|
+
"@knapsack/eslint-config-starter": "4.67.3--canary.aa8dfe6.0",
|
41
|
+
"@knapsack/postcss-config-starter": "4.67.3--canary.aa8dfe6.0",
|
42
|
+
"@knapsack/prettier-config": "4.67.3--canary.aa8dfe6.0",
|
43
|
+
"@knapsack/sandbox-tokens": "4.67.3--canary.aa8dfe6.0",
|
44
|
+
"@knapsack/typescript-config-starter": "4.67.3--canary.aa8dfe6.0",
|
45
45
|
"@types/node": "^20.12.12",
|
46
46
|
"@types/react": "^18.3.3",
|
47
47
|
"eslint": "^8.57.0",
|
@@ -59,5 +59,5 @@
|
|
59
59
|
"directory": "apps/ui/libs/sandbox-components",
|
60
60
|
"type": "git"
|
61
61
|
},
|
62
|
-
"gitHead": "
|
62
|
+
"gitHead": "aa8dfe6e9632b06e63530f66f73b236f9fd9858c"
|
63
63
|
}
|
package/src/css/header.css
CHANGED
@@ -1,19 +1,8 @@
|
|
1
1
|
.header {
|
2
2
|
background-color: var(--brand-color);
|
3
|
-
padding: var(--spacing-small)
|
4
|
-
|
5
|
-
|
6
|
-
height: 60px;
|
7
|
-
z-index: 10;
|
8
|
-
}
|
9
|
-
|
10
|
-
.logo {
|
11
|
-
background-image: var(--brand-logo);
|
12
|
-
width: 100%;
|
13
|
-
height: 28px;
|
14
|
-
background-repeat: no-repeat;
|
15
|
-
background-position: center;
|
16
|
-
background-size: contain;
|
3
|
+
padding-block: var(--spacing-small);
|
4
|
+
padding-inline: var(--spacing-large);
|
5
|
+
width: 100vw;
|
17
6
|
}
|
18
7
|
|
19
8
|
.header-content {
|
@@ -21,47 +10,18 @@
|
|
21
10
|
align-items: center;
|
22
11
|
justify-content: space-between;
|
23
12
|
width: 100%;
|
24
|
-
height: 100%;
|
25
|
-
z-index: 15;
|
26
|
-
position: relative;
|
27
13
|
}
|
28
14
|
|
29
|
-
.menu {
|
30
|
-
|
31
|
-
top: 60px;
|
32
|
-
left: 0;
|
33
|
-
width: 100%;
|
34
|
-
max-height: 300px;
|
35
|
-
background-color: var(--brand-color);
|
36
|
-
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
37
|
-
padding: var(--spacing-medium) 0;
|
38
|
-
z-index: 5;
|
39
|
-
transform: translateY(-100%);
|
40
|
-
transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
|
41
|
-
opacity: 0;
|
42
|
-
visibility: hidden;
|
15
|
+
.menu-icon {
|
16
|
+
margin-right: var(--spacing-medium);
|
43
17
|
}
|
44
18
|
|
45
|
-
.
|
46
|
-
|
47
|
-
|
48
|
-
visibility: visible;
|
49
|
-
}
|
50
|
-
|
51
|
-
.menu ul {
|
52
|
-
list-style: none;
|
53
|
-
margin: 0;
|
54
|
-
padding: 0;
|
55
|
-
}
|
56
|
-
|
57
|
-
.menu li {
|
58
|
-
padding: var(--spacing-small) var(--spacing-large);
|
59
|
-
}
|
60
|
-
|
61
|
-
.menu li a {
|
62
|
-
text-decoration: none;
|
63
|
-
color: #FFFFFF;
|
64
|
-
display: block;
|
19
|
+
.logo {
|
20
|
+
background-image: var(--brand-logo);
|
21
|
+
background-image: var(--brand-logo);
|
65
22
|
width: 100%;
|
66
|
-
|
23
|
+
height: 28px;
|
24
|
+
background-repeat: no-repeat;
|
25
|
+
background-position: center;
|
26
|
+
background-size: contain;
|
67
27
|
}
|
package/src/react/header.tsx
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import React
|
1
|
+
import React from 'react';
|
2
2
|
import clsx from 'clsx';
|
3
3
|
import { Button } from './button.js';
|
4
4
|
|
@@ -7,23 +7,15 @@ export type HeaderProps = {
|
|
7
7
|
};
|
8
8
|
|
9
9
|
export const Header: React.FC<HeaderProps> = ({ className }) => {
|
10
|
-
const [isMenuOpen, setIsMenuOpen] = useState(false);
|
11
|
-
|
12
|
-
const toggleMenu = () => {
|
13
|
-
setIsMenuOpen(!isMenuOpen);
|
14
|
-
};
|
15
|
-
|
16
10
|
return (
|
17
|
-
<header className={clsx('header', className
|
11
|
+
<header className={clsx('header', className)}>
|
18
12
|
<div className="header-content">
|
19
13
|
<svg
|
20
|
-
onClick={toggleMenu}
|
21
14
|
width="24"
|
22
15
|
height="19"
|
23
16
|
viewBox="0 0 24 19"
|
24
17
|
fill="none"
|
25
18
|
xmlns="http://www.w3.org/2000/svg"
|
26
|
-
style={{ cursor: 'pointer' }}
|
27
19
|
>
|
28
20
|
<path
|
29
21
|
d="M24 9.5C24 9.76522 23.8946 10.0196 23.7071 10.2071C23.5196 10.3946 23.2652 10.5 23 10.5H1C0.734784 10.5 0.48043 10.3946 0.292893 10.2071C0.105357 10.0196 0 9.76522 0 9.5C0 9.23478 0.105357 8.98043 0.292893 8.79289C0.48043 8.60536 0.734784 8.5 1 8.5H23C23.2652 8.5 23.5196 8.60536 23.7071 8.79289C23.8946 8.98043 24 9.23478 24 9.5ZM1 2.5H23C23.2652 2.5 23.5196 2.39464 23.7071 2.20711C23.8946 2.01957 24 1.76522 24 1.5C24 1.23478 23.8946 0.98043 23.7071 0.792893C23.5196 0.605357 23.2652 0.5 23 0.5H1C0.734784 0.5 0.48043 0.605357 0.292893 0.792893C0.105357 0.98043 0 1.23478 0 1.5C0 1.76522 0.105357 2.01957 0.292893 2.20711C0.48043 2.39464 0.734784 2.5 1 2.5ZM23 16.5H1C0.734784 16.5 0.48043 16.6054 0.292893 16.7929C0.105357 16.9804 0 17.2348 0 17.5C0 17.7652 0.105357 18.0196 0.292893 18.2071C0.48043 18.3946 0.734784 18.5 1 18.5H23C23.2652 18.5 23.5196 18.3946 23.7071 18.2071C23.8946 18.0196 24 17.7652 24 17.5C24 17.2348 23.8946 16.9804 23.7071 16.7929C23.5196 16.6054 23.2652 16.5 23 16.5Z"
|
@@ -35,23 +27,6 @@ export const Header: React.FC<HeaderProps> = ({ className }) => {
|
|
35
27
|
|
36
28
|
<Button type="outlined" size="medium" label="Login" />
|
37
29
|
</div>
|
38
|
-
|
39
|
-
<div className={clsx('menu', { open: isMenuOpen })}>
|
40
|
-
<ul>
|
41
|
-
<li>
|
42
|
-
<a href="#home">Home</a>
|
43
|
-
</li>
|
44
|
-
<li>
|
45
|
-
<a href="#about">About</a>
|
46
|
-
</li>
|
47
|
-
<li>
|
48
|
-
<a href="#services">Services</a>
|
49
|
-
</li>
|
50
|
-
<li>
|
51
|
-
<a href="#contact">Contact</a>
|
52
|
-
</li>
|
53
|
-
</ul>
|
54
|
-
</div>
|
55
30
|
</header>
|
56
31
|
);
|
57
32
|
};
|