@gravionlabs/helix-shell 22.1.5 → 22.1.7
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/README.md
CHANGED
|
@@ -12,7 +12,7 @@ Angular application shell for [Helix](../../README.md), extending
|
|
|
12
12
|
- 🔐 **Auth & error pages** — login, error, access-denied, not-found, with lazy route config
|
|
13
13
|
- 🚀 **Landing widgets** — hero, features, highlights, pricing, footer sections
|
|
14
14
|
- 📝 **Form infrastructure** — `HelixFormField`, `HelixValidators`, `helixFormErrorMap`
|
|
15
|
-
- 🎨 **Helix
|
|
15
|
+
- 🎨 **Helix theming** — the Helix preset (plus Aura / Lara / Nora), dark mode via View Transitions
|
|
16
16
|
- 📦 **Standalone components** — no NgModule required
|
|
17
17
|
|
|
18
18
|
## Installation
|
|
@@ -30,14 +30,14 @@ npm install @gravionlabs/helix-shell
|
|
|
30
30
|
|
|
31
31
|
```typescript
|
|
32
32
|
// app.config.ts
|
|
33
|
-
import {
|
|
33
|
+
import { helixPreset } from '@gravionlabs/helix-core/themes/helix';
|
|
34
34
|
import { provideHelix } from '@gravionlabs/helix-core/config';
|
|
35
35
|
|
|
36
36
|
export const appConfig: ApplicationConfig = {
|
|
37
37
|
providers: [
|
|
38
38
|
provideRouter(appRoutes),
|
|
39
39
|
provideHttpClient(),
|
|
40
|
-
provideHelix({ theme: { preset:
|
|
40
|
+
provideHelix({ theme: { preset: helixPreset, options: { darkModeSelector: '.app-dark' } } })
|
|
41
41
|
]
|
|
42
42
|
};
|
|
43
43
|
```
|
|
@@ -20,6 +20,7 @@ import * as i3$1 from "@gravionlabs/helix-core/selectbutton";
|
|
|
20
20
|
import { SelectButtonModule } from "@gravionlabs/helix-core/selectbutton";
|
|
21
21
|
import { $t, updatePreset, updateSurfacePalette } from "@gravionlabs/helix-core/themes";
|
|
22
22
|
import { auraPreset } from "@gravionlabs/helix-core/themes/aura";
|
|
23
|
+
import { helixPreset } from "@gravionlabs/helix-core/themes/helix";
|
|
23
24
|
import { laraPreset } from "@gravionlabs/helix-core/themes/lara";
|
|
24
25
|
import { noraPreset } from "@gravionlabs/helix-core/themes/nora";
|
|
25
26
|
import * as i2$1 from "@gravionlabs/helix-core/button";
|
|
@@ -424,8 +425,8 @@ function writeCollapsed(collapsed) {
|
|
|
424
425
|
} catch {}
|
|
425
426
|
}
|
|
426
427
|
const initialState = {
|
|
427
|
-
preset: "
|
|
428
|
-
primary:
|
|
428
|
+
preset: "Helix",
|
|
429
|
+
primary: null,
|
|
429
430
|
surface: null,
|
|
430
431
|
darkTheme: false,
|
|
431
432
|
menuMode: "static",
|
|
@@ -1621,6 +1622,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1621
1622
|
}
|
|
1622
1623
|
});
|
|
1623
1624
|
const presets = {
|
|
1625
|
+
Helix: helixPreset,
|
|
1624
1626
|
Aura: auraPreset,
|
|
1625
1627
|
Lara: laraPreset,
|
|
1626
1628
|
Nora: noraPreset
|
|
@@ -1817,6 +1819,7 @@ var HelixConfigurator = class HelixConfigurator {
|
|
|
1817
1819
|
if (isPlatformBrowser(this.platformId)) this.onPresetChange(this.store.preset());
|
|
1818
1820
|
}
|
|
1819
1821
|
getPresetExt() {
|
|
1822
|
+
if (this.selectedPrimaryColor() === null) return {};
|
|
1820
1823
|
const color = this.primaryColors().find((c) => c.name === this.selectedPrimaryColor()) || {};
|
|
1821
1824
|
const preset = this.store.preset();
|
|
1822
1825
|
if (color.name === "noir") return { semantic: {
|
|
@@ -1864,6 +1867,39 @@ var HelixConfigurator = class HelixConfigurator {
|
|
|
1864
1867
|
}
|
|
1865
1868
|
}
|
|
1866
1869
|
} };
|
|
1870
|
+
else if (preset === "Helix") return { semantic: {
|
|
1871
|
+
primary: color.palette,
|
|
1872
|
+
colorScheme: {
|
|
1873
|
+
light: {
|
|
1874
|
+
primary: {
|
|
1875
|
+
color: "{primary.600}",
|
|
1876
|
+
contrastColor: "#ffffff",
|
|
1877
|
+
hoverColor: "{primary.700}",
|
|
1878
|
+
activeColor: "{primary.800}"
|
|
1879
|
+
},
|
|
1880
|
+
highlight: {
|
|
1881
|
+
background: "{primary.50}",
|
|
1882
|
+
focusBackground: "{primary.100}",
|
|
1883
|
+
color: "{primary.700}",
|
|
1884
|
+
focusColor: "{primary.800}"
|
|
1885
|
+
}
|
|
1886
|
+
},
|
|
1887
|
+
dark: {
|
|
1888
|
+
primary: {
|
|
1889
|
+
color: "{primary.400}",
|
|
1890
|
+
contrastColor: "{surface.950}",
|
|
1891
|
+
hoverColor: "{primary.300}",
|
|
1892
|
+
activeColor: "{primary.200}"
|
|
1893
|
+
},
|
|
1894
|
+
highlight: {
|
|
1895
|
+
background: "color-mix(in srgb, {primary.400}, transparent 84%)",
|
|
1896
|
+
focusBackground: "color-mix(in srgb, {primary.400}, transparent 76%)",
|
|
1897
|
+
color: "rgba(255,255,255,.87)",
|
|
1898
|
+
focusColor: "rgba(255,255,255,.87)"
|
|
1899
|
+
}
|
|
1900
|
+
}
|
|
1901
|
+
}
|
|
1902
|
+
} };
|
|
1867
1903
|
else if (preset === "Nora") return { semantic: {
|
|
1868
1904
|
primary: color.palette,
|
|
1869
1905
|
colorScheme: {
|