so-web-components 0.1.0
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/LICENSE +21 -0
- package/README.md +217 -0
- package/dist/components/so-breadcrumb.d.ts +12 -0
- package/dist/components/so-breadcrumb.js +157 -0
- package/dist/components/so-header.d.ts +16 -0
- package/dist/components/so-header.js +437 -0
- package/dist/demo/index.html +50 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +12 -0
- package/dist/styles/fonts.css +67 -0
- package/dist/styles/reset.css +7 -0
- package/dist/styles/tokens.css +54 -0
- package/package.json +45 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
:root{
|
|
2
|
+
/* Colors (requested) */
|
|
3
|
+
--so-bg: #fff;
|
|
4
|
+
--so-fg: rgb(47, 72, 88);
|
|
5
|
+
--so-border-color: rgb(223, 223, 223);
|
|
6
|
+
|
|
7
|
+
-webkit-font-smoothing: antialiased;
|
|
8
|
+
-moz-osx-font-smoothing: grayscale; /* mac Firefox */
|
|
9
|
+
|
|
10
|
+
/* Typography (requested) */
|
|
11
|
+
--so-font-family: Frutiger, sans-serif;
|
|
12
|
+
--so-font-size: 16px;
|
|
13
|
+
--so-line-height: 1.5;
|
|
14
|
+
|
|
15
|
+
/* Spacing scale */
|
|
16
|
+
--so-space-1: 0.25rem;
|
|
17
|
+
--so-space-2: 0.5rem;
|
|
18
|
+
--so-space-3: 0.75rem;
|
|
19
|
+
--so-space-4: 1rem;
|
|
20
|
+
--so-space-5: 1.25rem;
|
|
21
|
+
--so-space-6: 1.5rem;
|
|
22
|
+
--so-space-7: 1.75rem;
|
|
23
|
+
--so-space-8: 2rem;
|
|
24
|
+
--so-space-10: 2.5rem;
|
|
25
|
+
--so-space-12: 3rem;
|
|
26
|
+
|
|
27
|
+
/* Container system inspired by so.ch pattern */
|
|
28
|
+
--so-container-padding: var(--so-space-6);
|
|
29
|
+
--so-container-size-small: 57rem; /* ~912px */
|
|
30
|
+
--so-container-size-medium: 86.25rem; /* ~1380px */
|
|
31
|
+
--so-container-size-full: 120rem; /* ~1920px */
|
|
32
|
+
|
|
33
|
+
/* Header */
|
|
34
|
+
--so-header-height: 4.25rem;
|
|
35
|
+
--so-header-border: rgba(0,0,0,0.08);
|
|
36
|
+
--so-header-radius: 9999px; /* round icon buttons */
|
|
37
|
+
|
|
38
|
+
/* Breakpoints */
|
|
39
|
+
--so-bp-md: 768px;
|
|
40
|
+
--so-bp-lg: 992px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/* Gutters get larger on desktop */
|
|
44
|
+
@media (min-width: 992px){
|
|
45
|
+
:root{ --so-container-padding: var(--so-space-6); }
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* Reusable container utility (optional) */
|
|
49
|
+
.so-container{
|
|
50
|
+
width: 100%;
|
|
51
|
+
max-width: var(--so-container-size, var(--so-container-size-medium));
|
|
52
|
+
margin-inline: auto;
|
|
53
|
+
padding-inline: var(--so-container-padding);
|
|
54
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "so-web-components",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"description": "Vanilla TypeScript Web Components inspired by so.ch layout (tokens + header component).",
|
|
7
|
+
"author": "edigonzales <stefan.ziegler.de@gmail.com>",
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"main": "./dist/index.js",
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"default": "./dist/index.js"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist",
|
|
19
|
+
"README.md",
|
|
20
|
+
"LICENSE"
|
|
21
|
+
],
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "tsc -p tsconfig.json && npm run build:assets",
|
|
24
|
+
"pretest": "npm run build && tsc -p tsconfig.tests.json",
|
|
25
|
+
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
|
|
26
|
+
"dev": "node scripts/dev-server.mjs",
|
|
27
|
+
"dev:watch": "node scripts/dev-watch.mjs",
|
|
28
|
+
"dev:hot": "node scripts/dev-hot.mjs",
|
|
29
|
+
"lint": "node scripts/simple-lint.mjs",
|
|
30
|
+
"build:assets": "node scripts/copy-assets.mjs",
|
|
31
|
+
"prepublishOnly": "npm run build"
|
|
32
|
+
},
|
|
33
|
+
"publishConfig": {
|
|
34
|
+
"access": "public"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@types/jest": "^29.5.14",
|
|
38
|
+
"@types/jsdom": "^21.1.7",
|
|
39
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
40
|
+
"jest": "^29.7.0",
|
|
41
|
+
"jsdom": "^24.1.3",
|
|
42
|
+
"typescript": "^5.6.3",
|
|
43
|
+
"glob": "^10.4.5"
|
|
44
|
+
}
|
|
45
|
+
}
|