@erathen/theme 1.0.2 → 1.0.4
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/fesm2022/erathen-theme.mjs +1 -1
- package/fesm2022/erathen-theme.mjs.map +1 -1
- package/package.json +1 -1
- package/styles/common.sass +4 -0
- package/styles/dark.sass +14 -4
- package/styles/light.sass +18 -5
- package/styles/variables/_color.sass +22 -0
- package/styles/variables/_radius.sass +15 -0
- package/styles/variables/_spacing.sass +11 -0
- package/styles/variables/_typography.sass +25 -0
|
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { signal, Injectable, makeEnvironmentProviders, provideAppInitializer } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
class EraThemeService {
|
|
5
|
-
theme = signal('
|
|
5
|
+
theme = signal('', ...(ngDevMode ? [{ debugName: "theme" }] : []));
|
|
6
6
|
setTheme(theme) {
|
|
7
7
|
this.theme.set(theme);
|
|
8
8
|
document.documentElement.setAttribute('class', theme);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"erathen-theme.mjs","sources":["../../../projects/theme/src/lib/theme/theme.service.ts","../../../projects/theme/src/lib/theme/theme.provider.ts","../../../projects/theme/src/lib/theme/index.ts","../../../projects/theme/src/public-api.ts","../../../projects/theme/src/erathen-theme.ts"],"sourcesContent":["import { Injectable, signal } from '@angular/core';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class EraThemeService {\r\n private theme = signal<string>('
|
|
1
|
+
{"version":3,"file":"erathen-theme.mjs","sources":["../../../projects/theme/src/lib/theme/theme.service.ts","../../../projects/theme/src/lib/theme/theme.provider.ts","../../../projects/theme/src/lib/theme/index.ts","../../../projects/theme/src/public-api.ts","../../../projects/theme/src/erathen-theme.ts"],"sourcesContent":["import { Injectable, signal } from '@angular/core';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class EraThemeService {\r\n private theme = signal<string>('');\r\n\r\n setTheme(theme: string): void {\r\n this.theme.set(theme);\r\n document.documentElement.setAttribute('class', theme);\r\n }\r\n\r\n getTheme(): string {\r\n return this.theme();\r\n }\r\n}\r\n","// theme.provider.ts\r\nimport {\r\n EnvironmentProviders,\r\n makeEnvironmentProviders,\r\n provideAppInitializer\r\n} from '@angular/core';\r\n\r\nenum EraTheme {\r\n LIGHT = 'e-light',\r\n DARK = 'e-dark'\r\n}\r\n\r\nexport interface EraThemeConfig {\r\n defaultTheme?: EraTheme;\r\n}\r\n\r\nexport function provideEraTheme(\r\n config: EraThemeConfig = {}\r\n): EnvironmentProviders {\r\n return makeEnvironmentProviders([\r\n provideAppInitializer(() => {\r\n document.documentElement.setAttribute(\r\n 'class',\r\n config.defaultTheme ?? ''\r\n );\r\n })\r\n ]);\r\n}\r\n","// index.ts\r\nexport * from './theme.service';\r\nexport * from './theme.provider';\r\n","/*\r\n * Public API Surface of theme\r\n */\r\n\r\nexport * from './lib/theme';\r\n\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAGa,eAAe,CAAA;AAClB,IAAA,KAAK,GAAG,MAAM,CAAS,EAAE,iDAAC;AAElC,IAAA,QAAQ,CAAC,KAAa,EAAA;AACpB,QAAA,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC;QACrB,QAAQ,CAAC,eAAe,CAAC,YAAY,CAAC,OAAO,EAAE,KAAK,CAAC;IACvD;IAEA,QAAQ,GAAA;AACN,QAAA,OAAO,IAAI,CAAC,KAAK,EAAE;IACrB;uGAVW,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAf,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,cADF,MAAM,EAAA,CAAA;;2FACnB,eAAe,EAAA,UAAA,EAAA,CAAA;kBAD3B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACFlC;AAOA,IAAK,QAGJ;AAHD,CAAA,UAAK,QAAQ,EAAA;AACX,IAAA,QAAA,CAAA,OAAA,CAAA,GAAA,SAAiB;AACjB,IAAA,QAAA,CAAA,MAAA,CAAA,GAAA,QAAe;AACjB,CAAC,EAHI,QAAQ,KAAR,QAAQ,GAAA,EAAA,CAAA,CAAA;AASP,SAAU,eAAe,CAC7B,MAAA,GAAyB,EAAE,EAAA;AAE3B,IAAA,OAAO,wBAAwB,CAAC;QAC9B,qBAAqB,CAAC,MAAK;AACzB,YAAA,QAAQ,CAAC,eAAe,CAAC,YAAY,CACnC,OAAO,EACP,MAAM,CAAC,YAAY,IAAI,EAAE,CAC1B;AACH,QAAA,CAAC;AACF,KAAA,CAAC;AACJ;;AC3BA;;ACAA;;AAEG;;ACFH;;AAEG;;;;"}
|
package/package.json
CHANGED
package/styles/dark.sass
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
.e-dark
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
.e-dark
|
|
2
|
+
/* Neutral / Surface Colors */
|
|
3
|
+
--e-color-surface-100: #0b0f19
|
|
4
|
+
--e-color-surface-200: #090c14
|
|
5
|
+
--e-color-surface-400: #07090f
|
|
6
|
+
--e-color-surface-600: #04060a
|
|
7
|
+
--e-color-surface-800: #020305
|
|
8
|
+
|
|
9
|
+
/* Text Colors */
|
|
10
|
+
--e-color-text-primary: #f9fafb
|
|
11
|
+
--e-color-text-secondary: #e5e7eb
|
|
12
|
+
--e-color-text-muted: #9ca3af
|
|
13
|
+
--e-color-text-disabled: #6b7280
|
|
14
|
+
--e-color-text-inverse: #070a10
|
package/styles/light.sass
CHANGED
|
@@ -1,7 +1,20 @@
|
|
|
1
1
|
:root,
|
|
2
2
|
:host,
|
|
3
|
-
.e-light
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
.e-light
|
|
4
|
+
/* Neutral / Surface Colors */
|
|
5
|
+
--e-color-surface-100: #ffffff
|
|
6
|
+
--e-color-surface-200: #cccccc
|
|
7
|
+
--e-color-surface-400: #999999
|
|
8
|
+
--e-color-surface-600: #666666
|
|
9
|
+
--e-color-surface-800: #333333
|
|
10
|
+
|
|
11
|
+
/* Text Colors */
|
|
12
|
+
--e-color-text-primary: #070a10
|
|
13
|
+
--e-color-text-secondary: #374151
|
|
14
|
+
--e-color-text-muted: #6b7280
|
|
15
|
+
--e-color-text-disabled: #cfd1d4
|
|
16
|
+
--e-color-text-inverse: #ffffff
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
:root,
|
|
2
|
+
:host
|
|
3
|
+
/* Brand Colors */
|
|
4
|
+
--e-color-brand-100: #e71d36
|
|
5
|
+
--e-color-brand-200: #b9172b
|
|
6
|
+
--e-color-brand-400: #8b1120
|
|
7
|
+
--e-color-brand-600: #5c0c16
|
|
8
|
+
--e-color-brand-800: #2e060b
|
|
9
|
+
--e-color-brand-tint-100: #e71d36
|
|
10
|
+
--e-color-brand-tint-200: #ec4a5e
|
|
11
|
+
--e-color-brand-tint-400: #f17786
|
|
12
|
+
--e-color-brand-tint-600: #f5a5af
|
|
13
|
+
--e-color-brand-tint-800: #fad2d7
|
|
14
|
+
|
|
15
|
+
/* State Colors */
|
|
16
|
+
--e-color-success: #16a34a;
|
|
17
|
+
--e-color-warning: #f59e0b;
|
|
18
|
+
--e-color-danger: #dc2626;
|
|
19
|
+
--e-color-info: #2563eb;
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
:root,
|
|
2
|
+
:host
|
|
3
|
+
/* Radius Sizes */
|
|
4
|
+
--e-radius-xs: 2px
|
|
5
|
+
--e-radius-sm: 4px
|
|
6
|
+
--e-radius-md: 6px
|
|
7
|
+
--e-radius-lg: 8px
|
|
8
|
+
--e-radius-xl: 12px
|
|
9
|
+
--e-radius-xxl: 16px
|
|
10
|
+
--e-radius-full: 9999px
|
|
11
|
+
|
|
12
|
+
/* Shadows */
|
|
13
|
+
--e-shadow-sm: 0 1px 2px rgba(0,0,0,0.05)
|
|
14
|
+
--e-shadow-md: 0 4px 6px rgba(0,0,0,0.1)
|
|
15
|
+
--e-shadow-lg: 0 10px 15px rgba(0,0,0,0.15)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
:root,
|
|
2
|
+
:host
|
|
3
|
+
/* Font Families */
|
|
4
|
+
--e-font-family-base: 'Inter', system-ui, sans-serif
|
|
5
|
+
|
|
6
|
+
/* Font Sizes */
|
|
7
|
+
--e-font-size-xs: 0.75rem
|
|
8
|
+
--e-font-size-sm: 0.875rem
|
|
9
|
+
--e-font-size-md: 1rem
|
|
10
|
+
--e-font-size-lg: 1.125rem
|
|
11
|
+
--e-font-size-xl: 1.25rem
|
|
12
|
+
--e-font-size-xxl: 1.5rem
|
|
13
|
+
|
|
14
|
+
/* Font Weights */
|
|
15
|
+
--e-font-weight-regular: 400
|
|
16
|
+
--e-font-weight-medium: 500
|
|
17
|
+
--e-font-weight-semibold: 600
|
|
18
|
+
--e-font-weight-bold: 700
|
|
19
|
+
--e-font-weight-extrabold: 800
|
|
20
|
+
--e-font-weight-black: 900
|
|
21
|
+
|
|
22
|
+
/* Line Heights */
|
|
23
|
+
--e-line-height-tight: 1.25
|
|
24
|
+
--e-line-height-normal:1.5
|
|
25
|
+
--e-line-height-relaxed:1.75
|