@nextrap/ntl-hero 2.0.0 → 2.0.2

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/CHANGELOG.md ADDED
@@ -0,0 +1,20 @@
1
+ ## 2.0.2 (2026-09-10)
2
+
3
+ ### 🩹 Fixes
4
+
5
+ - declare external libraries as peers and retain test dependencies ([67c6ffa](https://github.com/nextrap/nextrap-monorepo/commit/67c6ffa))
6
+
7
+ ### ❤️ Thank You
8
+
9
+ - Matthias Leuffen
10
+
11
+ ## 2.0.1 (2026-09-07)
12
+
13
+ ### 🩹 Fixes
14
+
15
+ - **ntl:** migrate ntl-hero to nt-core ([5a8739c](https://github.com/nextrap/nextrap-monorepo/commit/5a8739c))
16
+ - **layout:** keep layout packages separate ([c82b05a](https://github.com/nextrap/nextrap-monorepo/commit/c82b05a))
17
+
18
+ ### ❤️ Thank You
19
+
20
+ - Matthias Leuffen
package/index.scss ADDED
@@ -0,0 +1,2 @@
1
+ @use 'src/styles/index' as *;
2
+ @forward 'src/styles/mixins';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextrap/ntl-hero",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "main": "./index.js",
5
5
  "repository": {
6
6
  "directory": "nextrap-layout/ntl-hero",
@@ -8,14 +8,16 @@
8
8
  "url": "https://github.com/nextrap/nextrap-monorepo"
9
9
  },
10
10
  "dependencies": {
11
- "@nextrap/style-reset": "^2.0.0",
12
- "@trunkjs/browser-utils": "^1.0.28",
13
- "lit": "^3.3.1"
11
+ "@nextrap/style-reset": "^2.0.0"
14
12
  },
15
13
  "devDependencies": {
16
14
  "@nextrap/style-base": "^2.0.0",
17
15
  "@nextrap/style-utils": "^2.0.0"
18
16
  },
17
+ "peerDependencies": {
18
+ "@trunkjs/browser-utils": "^1.0.28",
19
+ "lit": "^3.3.1"
20
+ },
19
21
  "type": "module",
20
22
  "types": "./index.d.ts",
21
23
  "web-types": "./web-types.json"
@@ -0,0 +1,75 @@
1
+ /* Shadow DOM Styles for hero */
2
+
3
+ :host {
4
+ --bg-color: var(--nt-body-teritary, #e4e6ef);
5
+ --container-width: var(--nt-container-width, 100%);
6
+ --height-offset: 0px;
7
+ --min-height: 600px;
8
+ --max-height: 1800px;
9
+ --breakpoint: xl;
10
+ }
11
+
12
+ #root {
13
+ width: 100%;
14
+ isolation: isolate;
15
+ min-height: var(--min-height);
16
+ display: grid;
17
+
18
+ position: relative;
19
+
20
+ height: calc(100vh - var(--height-offset, 0px));
21
+ max-height: var(--max-height);
22
+
23
+ //min-height: var(--min-height);
24
+ grid-template-rows: 1fr;
25
+ grid-template-columns: 1fr;
26
+ }
27
+
28
+ #wrapper {
29
+ padding-top: var(--top-offset);
30
+ width: var(--container-width);
31
+ margin: 0 auto;
32
+ grid-row: 1;
33
+ grid-column: 1;
34
+ z-index: 1;
35
+ display: flex;
36
+ flex-direction: column;
37
+ align-items: center;
38
+
39
+ #title,
40
+ #top-title {
41
+ text-align: center;
42
+ }
43
+
44
+ & > #title,
45
+ #content {
46
+ flex-grow: 1;
47
+ justify-content: center;
48
+ }
49
+
50
+ & > * {
51
+ display: flex;
52
+ flex-direction: column;
53
+ align-items: center;
54
+ }
55
+
56
+ & > :has(.slot-empty) {
57
+ display: none !important;
58
+ }
59
+ }
60
+
61
+ #background {
62
+ position: absolute; // Important: This allows the background to fill the entire hero area without affecting the layout of the content.
63
+ left: 0;
64
+ right: 0;
65
+ bottom: 0;
66
+ top: 0;
67
+ background-color: var(--bg-color);
68
+ z-index: 0;
69
+ height: 100%;
70
+ inset: 0;
71
+ }
72
+
73
+ .background::slotted(*) {
74
+ pointer-events: auto;
75
+ }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * This file contains LightDOM Styles
3
+ */
4
+
5
+ ntl-hero {
6
+ p[slot='bg'] {
7
+ width: 100%;
8
+ height: 100%;
9
+
10
+ display: block;
11
+
12
+ > img {
13
+ width: 100%;
14
+ height: 100%;
15
+
16
+ object-position: center;
17
+ object-fit: cover;
18
+ }
19
+ }
20
+ }
File without changes