@nextrap/ntl-card-row 2.0.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.
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: ntl-card-row-theming
3
+ description: Theme- und Component-Style-Klassen für @nextrap/ntl-card-row entwickeln, ohne das responsive Zwölfspalten-Layout zu überschreiben.
4
+ ---
5
+
6
+ # NTL Card Row Theming
7
+
8
+ Nutze diesen Skill für Theme-SCSS und visuelle Varianten. Für Markup und Card-Breiten nutze `ntl-card-row-usage`.
9
+
10
+ ## Theme-Regeln
11
+
12
+ - Binde die vollständige visuelle Baseline an genau eine `style-*` Klasse, normalerweise mit `default-style()`.
13
+ - Theme-Styles dürfen `--cols`, feste Breiten, `flex` und das Zwölfspalten-Layout nicht überschreiben.
14
+ - Nutze ausschließlich die CSS-Variable `--cols`; eine Attribut-API gehört wegen fehlender browserübergreifender Unterstützung nicht zur Komponente.
15
+ - `default-style($cols: n)` darf ausnahmsweise einen Theme-Fallback setzen. Bevorzuge `--cols` im Usage-Markup.
16
+ - Nutze für visuelle Anpassungen die Parts `container`, `header`, `main` und `footer` sowie vorhandene Mixins.
17
+ - Setze `--gutter-x` und `--gutter-y` immer als echte Längenwerte mit Einheit, z. B. `0px`, `16px` oder `24px`, niemals als einheitsloses `0`.
18
+ - Desktop-spezifische Regeln werden auf `[mode='desktop']` gescoped.
19
+
20
+ ## Vorhandene Mixins
21
+
22
+ | Mixin | Zweck |
23
+ |---|---|
24
+ | `default-style()` | Vollständige visuelle Baseline; optionaler `$cols`-Fallback |
25
+ | `with-borderless-cards()` | Card-Rahmen und Innenabstand entfernen |
26
+ | `with-footer-separators()` | Desktop-Trenner für Footer-Cards |
27
+ | `with-item-separators()` | Responsive Trenner zwischen Cards |
28
+ | `with-raised-card()` | Einzelne Card hervorheben |
29
+ | `with-modifier-classes()` | Vorbereitete Modifier-Klassen registrieren |
@@ -0,0 +1,59 @@
1
+ ---
2
+ name: ntl-card-row-usage
3
+ description: "@nextrap/ntl-card-row korrekt importieren und in HTML oder trunkjs/content-pane Markdown mit flexiblen Card-Breiten verwenden."
4
+ ---
5
+
6
+ # NTL Card Row Usage
7
+
8
+ Nutze diesen Skill für Markup, Content-Zuordnung und Card-Breiten. Für Theme-SCSS nutze `ntl-card-row-theming`.
9
+
10
+ ## Import
11
+
12
+ ```ts
13
+ import '@nextrap/ntl-card-row';
14
+ ```
15
+
16
+ ## HTML
17
+
18
+ ```html
19
+ <ntl-card-row style="--cols: 3">
20
+ <h2 slot="header">Cards</h2>
21
+ <nte-card>Card 1</nte-card>
22
+ <nte-card style="--cols: 6">Card 2</nte-card>
23
+ <nte-card>Card 3</nte-card>
24
+ </ntl-card-row>
25
+ ```
26
+
27
+ `--cols` am Row-Element gilt als Default für alle Cards. Ein Wert direkt an einer Card überschreibt diesen Default.
28
+
29
+ ## Markdown
30
+
31
+ ```markdown
32
+ ## Cards
33
+ {: layout="ntl-card-row" section-style="--cols: 4;"}
34
+
35
+ ### Optional row header
36
+ {: slot="header"}
37
+
38
+ ### Card 1
39
+
40
+ Text
41
+
42
+ ### Card 2
43
+ {: section-style="--cols: 6;"}
44
+
45
+ Breite Card
46
+ ```
47
+
48
+ Nutze immer die `trunkjs/content-pane`-Notation `{: layout="..."}`. Die Default-Style-Klasse wird automatisch ergänzt, wenn keine `style-*` Klasse gesetzt ist.
49
+
50
+ ## Verhalten
51
+
52
+ - Direkte Content-Sections werden als `nte-card`-Kinder gerendert.
53
+ - Desktop verwendet feste Breiten von `--cols: 1` bis `--cols: 12`.
54
+ - Ohne `--cols` an Row oder Card nutzt die Card die volle verfügbare Zeile.
55
+ - Eine Card-Breite wächst oder schrumpft nicht; überbreiter Inhalt wird abgeschnitten.
56
+ - Im Mobile-Modus stehen Cards immer untereinander in voller Breite.
57
+ - `--min-width` und `--max-width` sind standardmäßig `unset`.
58
+ - `--gutter-x` und `--gutter-y` benötigen immer Längeneinheiten und dürfen nie als einheitsloses `0` gesetzt werden; verwende `0px`, `16px` oder andere echte Längenwerte.
59
+ - Verwende keine `cols`-Attribut-API.
@@ -0,0 +1,111 @@
1
+ # @nextrap/ntl-card-row
2
+
3
+ Responsive card-row layout web component. Direct content sections are automatically rendered as `nte-card` children.
4
+
5
+ ## Import
6
+
7
+ ```ts
8
+ import '@nextrap/ntl-card-row';
9
+ ```
10
+
11
+ For styling:
12
+
13
+ ```scss
14
+ @use '@nextrap/ntl-card-row' as cardRow;
15
+ ```
16
+
17
+ The package publishes its root/index SCSS and `src/scss/**/*.scss` assets so themes can import these mixins.
18
+
19
+ ## Usage
20
+
21
+ ```html
22
+ <ntl-card-row style="--cols: 3">
23
+ <h2 slot="header">Cards</h2>
24
+ <nte-card>Card 1</nte-card>
25
+ <nte-card class="highlight" style="--cols: 6">Card 2</nte-card>
26
+ <nte-card>Card 3</nte-card>
27
+ </ntl-card-row>
28
+ ```
29
+
30
+ Markdown/content-pane example:
31
+
32
+ ```md
33
+ ## Cards
34
+ {: layout="ntl-card-row.with-borderless-cards" section-style="--cols: 4;"}
35
+
36
+ ### Optional row header
37
+ {: slot="header"}
38
+
39
+ ### Card 1
40
+
41
+ Text
42
+
43
+ ### Card 2
44
+ {: section-style="--cols: 6;" .highlight}
45
+
46
+ Wide highlighted card
47
+ ```
48
+
49
+ Demo/theme SCSS binds the visual baseline to `ntl-card-row.style-default`; examples do not add a `.default` class. Demo modifier classes should be defined on `ntl-card-row` in demo/theme SCSS and include mixins there:
50
+
51
+ ```scss
52
+ ntl-card-row.with-borderless-cards {
53
+ @include cardRow.with-borderless-cards();
54
+ }
55
+
56
+ ntl-card-row.with-item-separators {
57
+ @include cardRow.with-item-separators($separator-color: var(--nt-gray-400));
58
+ }
59
+ ```
60
+
61
+ ## Behavior
62
+
63
+ - Uses `BreakPointMixin`; the current mode is reflected as `mode="mobile"` or `mode="desktop"`.
64
+ - Uses `SubLayoutApplyMixin` to assign direct headings to `header`, direct `footer` to `footer`, and direct `section` children to `nte-card`.
65
+ - Desktop layout uses a 12-column model. Set `--cols: 1` through `--cols: 12` on `ntl-card-row` and optionally on individual cards.
66
+ - A card-level `--cols` value overrides the inherited row value. Without either value, cards use the full available row width.
67
+ - Fixed columns do not grow or shrink; overflowing content is clipped. Mobile mode stacks cards full-width.
68
+
69
+ Important CSS variables:
70
+
71
+ - `--breakpoint`: layout switch breakpoint, default `xl`
72
+ - `--container-width`: row container width, default `var(--nt-container-width, 100%)`
73
+ - `--cols`: desktop card width from 1 through 12; inherited by cards and defaults to full width
74
+ - `--min-width` / `--max-width`: optional card constraints; both default to `unset`
75
+ - `--gutter-x` / `--gutter-y`: card gaps; always pass real length values with units, preferably `px` such as `0px`, `16px` or `24px`, never unitless values like `0`
76
+
77
+ ## CSS parts
78
+
79
+ Use `::part(container)`, `::part(header)`, `::part(main)` and `::part(footer)` for Light DOM/theme styling.
80
+
81
+ ## Mixins
82
+
83
+ ```scss
84
+ @include cardRow.default-style(
85
+ $container-width: var(--nt-container-width, 100%),
86
+ $cols: null,
87
+ $gap: var(--nt-spacing-layout),
88
+ $inner-padding: 0,
89
+ $container-background: transparent,
90
+ $container-border: none,
91
+ $container-border-radius: 0,
92
+ $modifierClasses: true
93
+ );
94
+
95
+ @include cardRow.with-borderless-cards();
96
+ @include cardRow.with-footer-separators($separator-color: var(--nt-primary));
97
+ @include cardRow.with-item-separators($separator-color: var(--nt-gray-400));
98
+ @include cardRow.with-raised-card();
99
+ @include cardRow.with-modifier-classes();
100
+ ```
101
+
102
+ `default-style()` includes modifier classes by default. Available classes: `.highlight` for raised cards and `.footer-separators` / legacy `.style-footer` for desktop footer separators.
103
+
104
+ `$cols` is an optional theme fallback only. Prefer setting `--cols` in usage markup so the layout stays flexible; a card-level value overrides the inherited row value.
105
+
106
+ When setting `--gutter-x` or `--gutter-y`, always include a length unit. Use `0px` instead of `0`, because the component uses gutter values in `calc()` expressions.
107
+
108
+ - `with-borderless-cards()` sets `--border: none` and `--inner-padding: 0` for all direct `nte-card` children.
109
+ - `with-item-separators()` adds separator pseudo-elements between direct `nte-card` children: vertical in desktop mode at half the horizontal gap, horizontal in mobile/tablet mode at half the vertical gap.
110
+
111
+ Keep Shadow DOM styles functional only; visual row styles belong in these mixins.
package/README.md ADDED
@@ -0,0 +1,68 @@
1
+ # ntl-card-row
2
+
3
+ Responsive row layout for `nte-card` components. The default layout follows Bootstrap's 12-column model.
4
+
5
+ ## Visual Demo
6
+
7
+ ```bash
8
+ nx dev ntl-card-row
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```ts
14
+ import '@nextrap/ntl-card-row';
15
+ ```
16
+
17
+ ```scss
18
+ @use '@nextrap/ntl-card-row' as cardRow;
19
+
20
+ ntl-card-row {
21
+ @include cardRow.default-style();
22
+ }
23
+ ```
24
+
25
+ Content-Pane example:
26
+
27
+ ```markdown
28
+ ## Cards
29
+ {: layout="ntl-card-row" section-style="--cols: 4;"}
30
+
31
+ ### Card 1
32
+ {: layout="nte-card"}
33
+
34
+ ### Card 2
35
+ {: layout="nte-card" section-style="--cols: 6;"}
36
+
37
+ ### Card 3
38
+ {: layout="nte-card"}
39
+ ```
40
+
41
+ The row follows Bootstrap's 12-column model. `--cols: 4` makes every card four columns wide; an individual card can override the inherited row value with its own `--cols`. Fixed columns neither grow nor shrink, and overflowing card content is clipped. Without `--cols`, a card uses the full available row width.
42
+
43
+ `--min-width` and `--max-width` optionally constrain cards and both default to `unset`.
44
+
45
+ When setting `--gutter-x` or `--gutter-y`, always use real length values with units such as `0px`, `16px` or `24px`. Never use unitless `0`, because gutter values are used in `calc()` expressions.
46
+
47
+ ```markdown
48
+ ## Cards
49
+ {: layout="ntl-card-row" section-style="--min-width: 18rem; --max-width: 32rem"}
50
+
51
+ ### Card 1
52
+ {: layout="nte-card"}
53
+
54
+ ### Card 2
55
+ {: layout="nte-card"}
56
+
57
+ ### Card 3
58
+ {: layout="nte-card"}
59
+ ```
60
+
61
+ ## Migrations
62
+
63
+ | Old | New |
64
+ | --- | --- |
65
+ | `--default-cols: 4` | `--cols: 4` on the row |
66
+ | `class="with-min-width"` | Remove; set `--min-width` directly if needed |
67
+
68
+ See `.ai-usage-info.md` and `demo/base.md` for implementation hints and examples.
package/default.scss ADDED
@@ -0,0 +1,10 @@
1
+ @use './index' as mixin;
2
+
3
+ .style-default {
4
+ @include mixin.default-style();
5
+ }
6
+
7
+ .footer-separators,
8
+ .style-footer {
9
+ @include mixin.with-footer-separators();
10
+ }
package/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './src/components/ntl-card-row/ntl-card-row';
package/index.js ADDED
@@ -0,0 +1,66 @@
1
+ import { nextrap_element as k } from "@nextrap/nt-core";
2
+ import { unsafeCSS as _, html as q } from "lit";
3
+ import { customElement as O } from "lit/decorators.js";
4
+ import { resetStyle as P } from "@nextrap/style-reset";
5
+ import "@nextrap/nte-card";
6
+ const A = ':host{--container-width: var(--nt-container-width, 100%);--min-width: unset;--max-width: unset;--gutter-x: var(--nt-spacing-layout);--gutter-y: var(--nt-spacing-layout);--breakpoint: xl;display:block;box-sizing:border-box}#container{margin:0 auto;width:var(--container-width);box-sizing:border-box}#header:has(.slot-empty),#footer:has(.slot-empty){display:none}#main{display:flex;flex-wrap:wrap;justify-content:center;gap:var(--gutter-y, 0px) var(--gutter-x, 0px)}#main ::slotted(*){box-sizing:border-box;flex:0 1 calc(8.3333333333% * var(--cols, 12) - var(--gutter-x, 0px) * (12 - var(--cols, 12)) / 12);width:calc(8.3333333333% * var(--cols, 12) - var(--gutter-x, 0px) * (12 - var(--cols, 12)) / 12);min-width:var(--min-width);max-width:var(--max-width);overflow:hidden}:host([cols="1"]){--cols: 1}#main ::slotted([cols="1"]){--cols: 1}:host([cols="2"]){--cols: 2}#main ::slotted([cols="2"]){--cols: 2}:host([cols="3"]){--cols: 3}#main ::slotted([cols="3"]){--cols: 3}:host([cols="4"]){--cols: 4}#main ::slotted([cols="4"]){--cols: 4}:host([cols="5"]){--cols: 5}#main ::slotted([cols="5"]){--cols: 5}:host([cols="6"]){--cols: 6}#main ::slotted([cols="6"]){--cols: 6}:host([cols="7"]){--cols: 7}#main ::slotted([cols="7"]){--cols: 7}:host([cols="8"]){--cols: 8}#main ::slotted([cols="8"]){--cols: 8}:host([cols="9"]){--cols: 9}#main ::slotted([cols="9"]){--cols: 9}:host([cols="10"]){--cols: 10}#main ::slotted([cols="10"]){--cols: 10}:host([cols="11"]){--cols: 11}#main ::slotted([cols="11"]){--cols: 11}:host([cols="12"]){--cols: 12}#main ::slotted([cols="12"]){--cols: 12}:host([mode=desktop]) #main{flex-direction:row}:host([mode=mobile]) #container{width:100%}:host([mode=mobile]) #main{flex-direction:column}:host([mode=mobile]) #main ::slotted(*){--gutter-x: 0px;flex:0 0 100%;width:100%}';
7
+ var C = Object.create, h = Object.defineProperty, E = Object.getOwnPropertyDescriptor, y = (t, e) => (e = Symbol[t]) ? e : Symbol.for("Symbol." + t), b = (t) => {
8
+ throw TypeError(t);
9
+ }, j = (t, e, r) => e in t ? h(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, I = (t, e) => h(t, "name", { value: e, configurable: !0 }), L = (t) => [, , , C((t == null ? void 0 : t[y("metadata")]) ?? null)], D = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], w = (t) => t !== void 0 && typeof t != "function" ? b("Function expected") : t, F = (t, e, r, l, o) => ({ kind: D[t], name: e, metadata: l, addInitializer: (s) => r._ ? b("Already initialized") : o.push(w(s || null)) }), M = (t, e) => j(e, y("metadata"), t[3]), T = (t, e, r, l) => {
10
+ for (var o = 0, s = t[e >> 1], a = s && s.length; o < a; o++) s[o].call(r);
11
+ return l;
12
+ }, H = (t, e, r, l, o, s) => {
13
+ var a, v, u, c = e & 7, f = !1, x = 0, z = t[x] || (t[x] = []), n = c && (o = o.prototype, c < 5 && (c > 3 || !f) && E(o, r));
14
+ I(o, r);
15
+ for (var d = l.length - 1; d >= 0; d--)
16
+ u = F(c, r, v = {}, t[3], z), a = (0, l[d])(o, u), v._ = 1, w(a) && (o = a);
17
+ return M(t, o), n && h(o, r, n), f ? c ^ 4 ? s : n : o;
18
+ }, g, p, S;
19
+ g = [O("ntl-card-row")];
20
+ const m = class m extends (S = k({
21
+ breakpoints: !0,
22
+ subLayoutApply: !0
23
+ })) {
24
+ beforeLayoutCallback(e) {
25
+ var l;
26
+ const r = e.querySelector(':scope > section > [slot="header"]');
27
+ if (r instanceof HTMLElement) {
28
+ const o = r.parentElement, s = Array.from(e.children).find(
29
+ (a) => a.matches(".header, h1, h2, h3, h4, h5, h6")
30
+ );
31
+ s == null || s.setAttribute("slot", "header"), s ? s.after(r) : e.prepend(r), o != null && o.matches("section") && o.children.length === 0 && ((l = o.textContent) == null ? void 0 : l.trim()) === "" && o.remove();
32
+ }
33
+ return !1;
34
+ }
35
+ render() {
36
+ return q`
37
+ <div part="container" id="container">
38
+ <div id="header" part="header">
39
+ <slot
40
+ name="header"
41
+ data-query=":scope > .header | :scope > h1,:scope > h2,:scope > h3,:scope > h4,:scope > h5,:scope > h6, :scope > p"
42
+ ></slot>
43
+ </div>
44
+ <div part="main" id="main">
45
+ <!-- set .style-parent to indicate that the child elements should inherit the style of the parent -->
46
+ <slot
47
+ data-query=":scope > section"
48
+ data-set-attribute-layout="nte-card.style-parent"
49
+ data-query-opt=""
50
+ ></slot>
51
+ </div>
52
+ <div id="footer" part="footer">
53
+ <slot name="footer" data-query=":scope > footer"></slot>
54
+ </div>
55
+ </div>
56
+ `;
57
+ }
58
+ };
59
+ m.styles = [_(A), _(P)];
60
+ let i = m;
61
+ p = L(S);
62
+ i = H(p, 0, "NtlCardRowElement", g, i);
63
+ T(p, 1, i);
64
+ export {
65
+ i as NtlCardRowElement
66
+ };
package/index.scss ADDED
@@ -0,0 +1,6 @@
1
+ @forward 'src/scss/default-style';
2
+ @forward 'src/scss/with-borderless-cards';
3
+ @forward 'src/scss/with-footer-separators';
4
+ @forward 'src/scss/with-item-separators';
5
+ @forward 'src/scss/with-modifier-classes';
6
+ @forward 'src/scss/with-raised-card';
package/package.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "@nextrap/ntl-card-row",
3
+ "version": "2.0.0",
4
+ "files": [
5
+ "*.*",
6
+ "src",
7
+ ".agents"
8
+ ],
9
+ "main": "./index.js",
10
+ "repository": {
11
+ "directory": "nextrap-layout/ntl-card-row",
12
+ "type": "git",
13
+ "url": "https://github.com/nextrap/nextrap-monorepo"
14
+ },
15
+ "dependencies": {
16
+ "@nextrap/nte-card": "^2.0.0",
17
+ "@nextrap/nt-core": "^2.0.0",
18
+ "@nextrap/style-reset": "^2.0.0",
19
+ "lit": "^3.3.1"
20
+ },
21
+ "devDependencies": {
22
+ "@nextrap/style-base": "^2.0.0",
23
+ "@nextrap/style-utils": "^2.0.0",
24
+ "@trunkjs/markdown-loader": "^1.0.0"
25
+ },
26
+ "type": "module",
27
+ "types": "./index.d.ts",
28
+ "web-types": "./web-types.json"
29
+ }
@@ -0,0 +1,7 @@
1
+ declare const NtlCardRowElement_base: import('@nextrap/nt-core').InternalNextrapElementType;
2
+ export declare class NtlCardRowElement extends NtlCardRowElement_base {
3
+ static styles: import('lit').CSSResult[];
4
+ beforeLayoutCallback(sourceElement: HTMLElement): boolean;
5
+ render(): import('lit-html').TemplateResult<1>;
6
+ }
7
+ export {};
@@ -0,0 +1,81 @@
1
+ /* The ShadowDOM Styles */
2
+
3
+ :host {
4
+ --container-width: var(--nt-container-width, 100%);
5
+ --min-width: unset;
6
+ --max-width: unset;
7
+ --gutter-x: var(--nt-spacing-layout);
8
+ --gutter-y: var(--nt-spacing-layout);
9
+ --breakpoint: xl;
10
+
11
+ display: block;
12
+ box-sizing: border-box;
13
+ }
14
+
15
+ #container {
16
+ margin: 0 auto;
17
+ width: var(--container-width);
18
+ box-sizing: border-box;
19
+ }
20
+
21
+ #header,
22
+ #footer {
23
+ &:has(.slot-empty) {
24
+ display: none;
25
+ }
26
+ }
27
+
28
+ #main {
29
+ display: flex;
30
+ flex-wrap: wrap;
31
+ justify-content: center;
32
+ gap: var(--gutter-y, 0px) var(--gutter-x, 0px);
33
+
34
+ ::slotted(*) {
35
+ box-sizing: border-box;
36
+ flex: 0 1 calc(
37
+ 100% / 12 * var(--cols, 12)
38
+ - var(--gutter-x, 0px) * (12 - var(--cols, 12)) / 12
39
+ );
40
+ width: calc(
41
+ 100% / 12 * var(--cols, 12)
42
+ - var(--gutter-x, 0px) * (12 - var(--cols, 12)) / 12
43
+ );
44
+ min-width: var(--min-width);
45
+ max-width: var(--max-width);
46
+ overflow: hidden;
47
+ }
48
+ }
49
+
50
+ // Firefox cannot cast attr() values to numbers yet. Map the finite range without attr().
51
+ @for $cols from 1 through 12 {
52
+ :host([cols='#{$cols}']) {
53
+ --cols: #{$cols};
54
+ }
55
+
56
+ #main ::slotted([cols='#{$cols}']) {
57
+ --cols: #{$cols};
58
+ }
59
+ }
60
+
61
+ :host([mode='desktop']) {
62
+ #main {
63
+ flex-direction: row;
64
+ }
65
+ }
66
+
67
+ :host([mode='mobile']) {
68
+ #container {
69
+ width: 100%;
70
+ }
71
+
72
+ #main {
73
+ flex-direction: column;
74
+
75
+ ::slotted(*) {
76
+ --gutter-x: 0px; // Must be 0px - otherwise: error in Firefox
77
+ flex: 0 0 100%;
78
+ width: 100%;
79
+ }
80
+ }
81
+ }
@@ -0,0 +1,3 @@
1
+ /**
2
+ * Shared utility functions for file operations.
3
+ */
@@ -0,0 +1,49 @@
1
+ @use 'with-modifier-classes' as modifier-classes;
2
+
3
+ @mixin default-style(
4
+ $container-width: var(--nt-container-width, 100%),
5
+ $cols: null,
6
+ $gap: var(--nt-spacing-layout),
7
+ $inner-padding: 0,
8
+ $container-background: transparent,
9
+ $container-border: none,
10
+ $container-border-radius: 0,
11
+ $modifierClasses: true
12
+ ) {
13
+ --container-width: #{$container-width};
14
+ --gutter-x: #{$gap};
15
+ --gutter-y: #{$gap};
16
+ --row-inner-padding: #{$inner-padding};
17
+ --container-background: #{$container-background};
18
+ --container-border: #{$container-border};
19
+ --container-border-radius: #{$container-border-radius};
20
+
21
+ @if ($cols != null and $cols != none) {
22
+ --cols: #{$cols};
23
+ }
24
+
25
+ @if ($modifierClasses != false and $modifierClasses != none) {
26
+ @include modifier-classes.with-modifier-classes();
27
+ }
28
+
29
+ &::part(header) {
30
+ text-align: center;
31
+ }
32
+
33
+ &::part(container) {
34
+ background: var(--container-background);
35
+ border: var(--container-border);
36
+ border-radius: var(--container-border-radius);
37
+ box-sizing: border-box;
38
+ padding: var(--row-inner-padding);
39
+ }
40
+
41
+ &[mode='mobile'] > nte-card {
42
+ box-sizing: border-box;
43
+ // No Padding here
44
+ }
45
+
46
+ &[mode='desktop'] > nte-card {
47
+ padding: 0;
48
+ }
49
+ }
@@ -0,0 +1,6 @@
1
+ @mixin with-borderless-cards($card-border: none, $card-inner-padding: 0) {
2
+ > nte-card {
3
+ --border: #{$card-border};
4
+ --inner-padding: #{$card-inner-padding};
5
+ }
6
+ }
@@ -0,0 +1,12 @@
1
+ @mixin with-footer-separators($separator-color: var(--nt-primary), $card-border: none, $card-border-radius: 0) {
2
+ --separator-color: #{$separator-color};
3
+
4
+ > nte-card {
5
+ --border: #{$card-border};
6
+ --border-radius: #{$card-border-radius};
7
+ }
8
+
9
+ &[mode='desktop'] > nte-card:not(:last-child)::part(wrapper) {
10
+ border-right: 1px solid var(--separator-color);
11
+ }
12
+ }
@@ -0,0 +1,30 @@
1
+ @mixin with-item-separators($separator-color: var(--nt-primary), $separator-width: 1px, $separator-inset: 0) {
2
+ --item-separator-color: #{$separator-color};
3
+ --item-separator-width: #{$separator-width};
4
+ --item-separator-inset: #{$separator-inset};
5
+
6
+ > nte-card {
7
+ position: relative;
8
+ }
9
+
10
+ > nte-card:not(:last-child)::after {
11
+ content: '';
12
+ position: absolute;
13
+ background: var(--item-separator-color);
14
+ pointer-events: none;
15
+ }
16
+
17
+ &[mode='desktop'] > nte-card:not(:last-child)::after {
18
+ top: var(--item-separator-inset);
19
+ right: calc(var(--gutter-x, 0px) / -2 - var(--item-separator-width) / 2);
20
+ bottom: var(--item-separator-inset);
21
+ width: var(--item-separator-width);
22
+ }
23
+
24
+ &[mode='mobile'] > nte-card:not(:last-child)::after {
25
+ right: var(--item-separator-inset);
26
+ bottom: calc(var(--gutter-y, 0px) / -2 - var(--item-separator-width) / 2);
27
+ left: var(--item-separator-inset);
28
+ height: var(--item-separator-width);
29
+ }
30
+ }
@@ -0,0 +1,13 @@
1
+ @use 'with-footer-separators' as footer-separators;
2
+ @use 'with-raised-card' as raised-card;
3
+
4
+ @mixin with-modifier-classes {
5
+ &.footer-separators,
6
+ &.style-footer {
7
+ @include footer-separators.with-footer-separators();
8
+ }
9
+
10
+ > nte-card.highlight {
11
+ @include raised-card.with-raised-card();
12
+ }
13
+ }
@@ -0,0 +1,13 @@
1
+ @mixin with-raised-card(
2
+ $scale: 1.05,
3
+ $shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15),
4
+ $transition: (
5
+ transform 0.3s ease,
6
+ box-shadow 0.3s ease,
7
+ )
8
+ ) {
9
+ transform: scale($scale);
10
+ box-shadow: $shadow;
11
+ transition: $transition;
12
+ z-index: 1;
13
+ }