@knapsack/sandbox-components 4.67.3--canary.4456.c140a9e.0 → 4.68.0--canary.4412.7726217.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 -48
- 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 -43
- package/src/react/header.tsx +2 -27
@@ -1372,12 +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
|
-
|
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;
|
1381
1384
|
}
|
1382
1385
|
|
1383
1386
|
.header-content {
|
@@ -1385,53 +1388,21 @@ body {
|
|
1385
1388
|
align-items: center;
|
1386
1389
|
justify-content: space-between;
|
1387
1390
|
width: 100%;
|
1388
|
-
height: 100%;
|
1389
|
-
z-index: 15;
|
1390
|
-
position: relative;
|
1391
|
-
}
|
1392
|
-
|
1393
|
-
.menu {
|
1394
|
-
position: absolute;
|
1395
|
-
top: 60px;
|
1396
|
-
left: 0;
|
1397
|
-
width: 100%;
|
1398
|
-
max-height: 300px;
|
1399
|
-
background-color: #7a34ed;
|
1400
|
-
background-color: var(--brand-color);
|
1401
|
-
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
1402
|
-
padding: 12px 0;
|
1403
|
-
padding: var(--spacing-medium) 0;
|
1404
|
-
z-index: 5;
|
1405
|
-
transform: translateY(-100%);
|
1406
|
-
transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
|
1407
|
-
opacity: 0;
|
1408
|
-
visibility: hidden;
|
1409
|
-
}
|
1410
|
-
|
1411
|
-
.menu.open {
|
1412
|
-
transform: translateY(0);
|
1413
|
-
opacity: 1;
|
1414
|
-
visibility: visible;
|
1415
1391
|
}
|
1416
1392
|
|
1417
|
-
.menu
|
1418
|
-
|
1419
|
-
margin:
|
1420
|
-
padding: 0;
|
1393
|
+
.menu-icon {
|
1394
|
+
margin-right: 12px;
|
1395
|
+
margin-right: var(--spacing-medium);
|
1421
1396
|
}
|
1422
1397
|
|
1423
|
-
.
|
1424
|
-
|
1425
|
-
|
1426
|
-
}
|
1427
|
-
|
1428
|
-
.menu li a {
|
1429
|
-
-webkit-text-decoration: none;
|
1430
|
-
text-decoration: none;
|
1431
|
-
color: #FFFFFF;
|
1432
|
-
display: block;
|
1398
|
+
.logo {
|
1399
|
+
background-image: url('https://knapsack.imgix.net/site/ks-sandbox/logo-arcadia-4id5a3sy3ysvg');
|
1400
|
+
background-image: var(--brand-logo);
|
1433
1401
|
width: 100%;
|
1434
|
-
|
1402
|
+
height: 28px;
|
1403
|
+
background-repeat: no-repeat;
|
1404
|
+
background-position: center;
|
1405
|
+
background-size: contain;
|
1435
1406
|
}
|
1436
1407
|
|
1437
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.
|
4
|
+
"version": "4.68.0--canary.4412.7726217.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.
|
41
|
-
"@knapsack/postcss-config-starter": "4.
|
42
|
-
"@knapsack/prettier-config": "4.
|
43
|
-
"@knapsack/sandbox-tokens": "4.
|
44
|
-
"@knapsack/typescript-config-starter": "4.
|
40
|
+
"@knapsack/eslint-config-starter": "4.68.0--canary.4412.7726217.0",
|
41
|
+
"@knapsack/postcss-config-starter": "4.68.0--canary.4412.7726217.0",
|
42
|
+
"@knapsack/prettier-config": "4.68.0--canary.4412.7726217.0",
|
43
|
+
"@knapsack/sandbox-tokens": "4.68.0--canary.4412.7726217.0",
|
44
|
+
"@knapsack/typescript-config-starter": "4.68.0--canary.4412.7726217.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": "7726217646f24f8eddf3d9eb6d5a341ccce49041"
|
63
63
|
}
|
package/src/css/header.css
CHANGED
@@ -1,10 +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;
|
3
|
+
padding-block: var(--spacing-small);
|
4
|
+
padding-inline: var(--spacing-large);
|
5
|
+
width: 100vw;
|
8
6
|
}
|
9
7
|
|
10
8
|
.header-content {
|
@@ -12,47 +10,18 @@
|
|
12
10
|
align-items: center;
|
13
11
|
justify-content: space-between;
|
14
12
|
width: 100%;
|
15
|
-
height: 100%;
|
16
|
-
z-index: 15;
|
17
|
-
position: relative;
|
18
|
-
}
|
19
|
-
|
20
|
-
.menu {
|
21
|
-
position: absolute;
|
22
|
-
top: 60px;
|
23
|
-
left: 0;
|
24
|
-
width: 100%;
|
25
|
-
max-height: 300px;
|
26
|
-
background-color: var(--brand-color);
|
27
|
-
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
28
|
-
padding: var(--spacing-medium) 0;
|
29
|
-
z-index: 5;
|
30
|
-
transform: translateY(-100%);
|
31
|
-
transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
|
32
|
-
opacity: 0;
|
33
|
-
visibility: hidden;
|
34
|
-
}
|
35
|
-
|
36
|
-
.menu.open {
|
37
|
-
transform: translateY(0);
|
38
|
-
opacity: 1;
|
39
|
-
visibility: visible;
|
40
|
-
}
|
41
|
-
|
42
|
-
.menu ul {
|
43
|
-
list-style: none;
|
44
|
-
margin: 0;
|
45
|
-
padding: 0;
|
46
13
|
}
|
47
14
|
|
48
|
-
.menu
|
49
|
-
|
15
|
+
.menu-icon {
|
16
|
+
margin-right: var(--spacing-medium);
|
50
17
|
}
|
51
18
|
|
52
|
-
.
|
53
|
-
|
54
|
-
|
55
|
-
display: block;
|
19
|
+
.logo {
|
20
|
+
background-image: var(--brand-logo);
|
21
|
+
background-image: var(--brand-logo);
|
56
22
|
width: 100%;
|
57
|
-
|
23
|
+
height: 28px;
|
24
|
+
background-repeat: no-repeat;
|
25
|
+
background-position: center;
|
26
|
+
background-size: contain;
|
58
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
|
};
|