@ojiepermana/angular 21.0.8 → 21.1.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.
Files changed (31) hide show
  1. package/collection.json +28 -28
  2. package/etos/README.md +68 -0
  3. package/etos/package.json +4 -0
  4. package/etos/styles/index.css +15 -0
  5. package/etos/styles/layout.css +186 -0
  6. package/{theme/styles/themes/brand/etos → etos/styles}/style.css +18 -17
  7. package/fesm2022/ojiepermana-angular-etos.mjs +283 -0
  8. package/fesm2022/ojiepermana-angular-etos.mjs.map +1 -0
  9. package/fesm2022/ojiepermana-angular-layout.mjs +23 -10
  10. package/fesm2022/ojiepermana-angular-layout.mjs.map +1 -1
  11. package/fesm2022/ojiepermana-angular-navigation.mjs +32 -21
  12. package/fesm2022/ojiepermana-angular-navigation.mjs.map +1 -1
  13. package/fesm2022/ojiepermana-angular.mjs +1 -0
  14. package/fesm2022/ojiepermana-angular.mjs.map +1 -1
  15. package/generator/api/schematics/init/schema.json +17 -17
  16. package/generator/api/schematics/ng-add/schema.json +13 -13
  17. package/generator/api/schematics/sdk/schema.json +17 -17
  18. package/generator/api/sdk.config.example.json +21 -21
  19. package/generator/guide/guide.config.example.json +8 -8
  20. package/generator/guide/schematics/build/schema.json +12 -12
  21. package/generator/guide/schematics/init/schema.json +17 -17
  22. package/package.json +7 -1
  23. package/theme/styles/etos.css +3 -35
  24. package/theme/styles/themes/library/style/brutal.css +1 -0
  25. package/theme/styles/themes/library/style/default.css +1 -0
  26. package/theme/styles/themes/library/style/sharp.css +1 -0
  27. package/theme/styles/themes/library/style/soft.css +1 -0
  28. package/types/ojiepermana-angular-etos.d.ts +73 -0
  29. package/types/ojiepermana-angular-layout.d.ts +3 -2
  30. package/types/ojiepermana-angular-navigation.d.ts +2 -1
  31. /package/{theme/styles/themes/brand/etos → etos/styles}/color.css +0 -0
package/collection.json CHANGED
@@ -1,30 +1,30 @@
1
1
  {
2
- "$schema": "../../node_modules/@angular-devkit/schematics/collection-schema.json",
3
- "schematics": {
4
- "ng-add": {
5
- "description": "Add @ojiepermana/angular and its required peer dependencies to an Angular workspace.",
6
- "factory": "./generator/api/bin/schematics/ng-add/index.js#ngAdd",
7
- "schema": "./generator/api/schematics/ng-add/schema.json"
8
- },
9
- "sdk": {
10
- "description": "Generate an Angular SDK from an OpenAPI spec.",
11
- "factory": "./generator/api/bin/schematics/sdk/index.js#sdk",
12
- "schema": "./generator/api/schematics/sdk/schema.json"
13
- },
14
- "sdk-init": {
15
- "description": "Create config/sdk.config.json under the workspace root.",
16
- "factory": "./generator/api/bin/schematics/init/index.js#init",
17
- "schema": "./generator/api/schematics/init/schema.json"
18
- },
19
- "guide": {
20
- "description": "Compile Markdown files into Angular standalone components and a nested route tree.",
21
- "factory": "./generator/guide/bin/schematics/build/index.js#build",
22
- "schema": "./generator/guide/schematics/build/schema.json"
23
- },
24
- "guide-init": {
25
- "description": "Create config/guide.config.json under the workspace root.",
26
- "factory": "./generator/guide/bin/schematics/init/index.js#init",
27
- "schema": "./generator/guide/schematics/init/schema.json"
28
- }
2
+ "$schema": "../../node_modules/@angular-devkit/schematics/collection-schema.json",
3
+ "schematics": {
4
+ "ng-add": {
5
+ "description": "Add @ojiepermana/angular and its required peer dependencies to an Angular workspace.",
6
+ "factory": "./generator/api/bin/schematics/ng-add/index.js#ngAdd",
7
+ "schema": "./generator/api/schematics/ng-add/schema.json"
8
+ },
9
+ "sdk": {
10
+ "description": "Generate an Angular SDK from an OpenAPI spec.",
11
+ "factory": "./generator/api/bin/schematics/sdk/index.js#sdk",
12
+ "schema": "./generator/api/schematics/sdk/schema.json"
13
+ },
14
+ "sdk-init": {
15
+ "description": "Create config/sdk.config.json under the workspace root.",
16
+ "factory": "./generator/api/bin/schematics/init/index.js#init",
17
+ "schema": "./generator/api/schematics/init/schema.json"
18
+ },
19
+ "guide": {
20
+ "description": "Compile Markdown files into Angular standalone components and a nested route tree.",
21
+ "factory": "./generator/guide/bin/schematics/build/index.js#build",
22
+ "schema": "./generator/guide/schematics/build/schema.json"
23
+ },
24
+ "guide-init": {
25
+ "description": "Create config/guide.config.json under the workspace root.",
26
+ "factory": "./generator/guide/bin/schematics/init/index.js#init",
27
+ "schema": "./generator/guide/schematics/init/schema.json"
29
28
  }
30
- }
29
+ }
30
+ }
package/etos/README.md ADDED
@@ -0,0 +1,68 @@
1
+ # Etos Brand
2
+
3
+ Etos implementation lives under `projects/angular/etos`. Published consumers should use `@ojiepermana/angular/etos`.
4
+
5
+ Use this folder for Etos-specific implementation:
6
+
7
+ - `core/` contains Etos provider composition and brand defaults.
8
+ - `themes/` contains Etos color, style, layout, and component-facing CSS.
9
+ - `layouts/` contains Etos shell components.
10
+ - `navigation/`, `components/`, `assets/`, and `docs/` can be added when Etos needs brand-specific behavior beyond shared primitives.
11
+
12
+ Shared services, types, and primitives stay in the generic libraries:
13
+
14
+ - `@ojiepermana/angular/theme`
15
+ - `@ojiepermana/angular/layout`
16
+ - `@ojiepermana/angular/navigation`
17
+
18
+ ## Package usage
19
+
20
+ Published consumers should import Etos through the short public entrypoint:
21
+
22
+ ```ts
23
+ import { type EtosBrandOptions, EtosLayoutComponent, provideEtosBrand } from '@ojiepermana/angular/etos';
24
+
25
+ export const etosBrandConfig = {
26
+ theme: { mode: 'light' },
27
+ layout: { mode: 'vertical' },
28
+ } satisfies EtosBrandOptions;
29
+
30
+ export const appConfig = {
31
+ providers: [provideEtosBrand(etosBrandConfig)],
32
+ };
33
+ ```
34
+
35
+ ```ts
36
+ @Component({
37
+ imports: [EtosLayoutComponent],
38
+ template: `<etos-layout />`,
39
+ })
40
+ export class Pages {}
41
+ ```
42
+
43
+ App CSS should import the Etos package stylesheet before Tailwind:
44
+
45
+ ```css
46
+ @import '@ojiepermana/angular/etos/styles';
47
+ @import 'tailwindcss';
48
+ @import '@ojiepermana/angular/theme/tailwind/theme.css';
49
+ ```
50
+
51
+ ## Workspace usage in this repository
52
+
53
+ The Etos demo under `projects/demo/etos` already uses the short TypeScript entrypoint:
54
+
55
+ - `src/app/app.config.ts` imports `provideEtosBrand` from `@ojiepermana/angular/etos`.
56
+ - `src/pages/pages.ts` imports `EtosLayoutComponent` from `@ojiepermana/angular/etos`.
57
+
58
+ For CSS, the workspace demo currently imports the Etos source stylesheet directly:
59
+
60
+ ```css
61
+ @import '../../../angular/etos/themes/index.css';
62
+ @import 'tailwindcss';
63
+ @import '@ojiepermana/angular/theme/tailwind/theme.css';
64
+ ```
65
+
66
+ That local CSS path is intentional while developing inside this monorepo. Angular resolves bare CSS package imports from `node_modules/@ojiepermana/angular`, while TypeScript imports in the demo resolve through `tsconfig.json` path aliases. After the package is built, published, and installed with the latest exports, consumers should use `@ojiepermana/angular/etos/styles`.
67
+
68
+ The older `@ojiepermana/angular/theme/styles/etos.css` path is kept only as a compatibility shim.
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/ojiepermana-angular-etos.mjs",
3
+ "typings": "../types/ojiepermana-angular-etos.d.ts"
4
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @ojiepermana/angular/etos — complete Etos brand stylesheet.
3
+ *
4
+ * Import before Tailwind, then import the shared Tailwind token bridge.
5
+ */
6
+ @import '@ojiepermana/angular/theme/styles/themes/library/_layers.css';
7
+ @import '@ojiepermana/angular/theme/styles/themes/mode/index.css';
8
+ @import '@ojiepermana/angular/theme/styles/themes/library/color/index.css';
9
+ @import '@ojiepermana/angular/theme/styles/themes/library/style/index.css';
10
+ @import './color.css';
11
+ @import './style.css';
12
+ @import './layout.css';
13
+ @import '@ojiepermana/angular/theme/styles/themes/library/_tokens.css';
14
+ @import '@ojiepermana/angular/theme/styles/themes/library/_material-overrides.css';
15
+ @import '@ojiepermana/angular/theme/styles/themes/library/_components.css';
@@ -0,0 +1,186 @@
1
+ /**
2
+ * Etos brand layout layer.
3
+ */
4
+ @layer tokens {
5
+ [theme-brand='etos'] {
6
+ --etos-layout-shell-padding: clamp(1rem, 2vw, 2rem);
7
+ --etos-layout-frame-radius: var(--radius-lg);
8
+ --etos-layout-frame-shadow: var(--shadow-sm);
9
+ --etos-layout-sidebar-width: 17.5rem;
10
+ --etos-layout-main-max-width: 80rem;
11
+ --etos-layout-vertical-shell-max-width: calc(var(--etos-layout-sidebar-width) + var(--etos-layout-main-max-width));
12
+ --etos-layout-empty-max-width: 24rem;
13
+ --etos-layout-empty-padding: clamp(1.5rem, 4vw, 3rem);
14
+ --etos-layout-topbar-inline: 0.875rem;
15
+ --etos-layout-brand-mark-size: 2rem;
16
+ }
17
+
18
+ [data-mode='dark'][theme-brand='etos'] {
19
+ --etos-layout-frame-shadow: 0 0 0 1px hsl(var(--border));
20
+ }
21
+ }
22
+
23
+ @layer components {
24
+ .etos-layout-host {
25
+ display: block;
26
+ height: 100dvh;
27
+ width: 100%;
28
+ overflow: hidden;
29
+ background: hsl(var(--background));
30
+ color: hsl(var(--foreground));
31
+ }
32
+
33
+ .etos-layout-host--fixed {
34
+ box-sizing: border-box;
35
+ }
36
+
37
+ .etos-layout-frame {
38
+ display: flex;
39
+ height: 100%;
40
+ width: 100%;
41
+ overflow: hidden;
42
+ background: hsl(var(--background));
43
+ }
44
+
45
+ .etos-layout-frame--horizontal {
46
+ flex-direction: column;
47
+ }
48
+
49
+ .etos-layout-main {
50
+ min-width: 0;
51
+ flex: 1 1 0%;
52
+ overflow: auto;
53
+ }
54
+
55
+ .etos-layout-main--fixed {
56
+ width: 100%;
57
+ max-width: var(--etos-layout-main-max-width);
58
+ margin-inline: auto;
59
+ }
60
+
61
+ .etos-layout-topbar {
62
+ width: 100%;
63
+ flex-shrink: 0;
64
+ border-bottom: var(--border-width) solid hsl(var(--border));
65
+ }
66
+
67
+ .etos-layout-topbar-slot {
68
+ display: flex;
69
+ min-width: 0;
70
+ align-items: center;
71
+ }
72
+
73
+ .etos-layout-topbar-slot--end {
74
+ justify-content: flex-end;
75
+ }
76
+
77
+ .etos-layout-empty-host {
78
+ display: flex;
79
+ min-height: 100dvh;
80
+ width: 100%;
81
+ align-items: center;
82
+ justify-content: center;
83
+ padding: var(--etos-layout-empty-padding);
84
+ background: hsl(var(--background));
85
+ color: hsl(var(--foreground));
86
+ }
87
+
88
+ .etos-layout-empty-main {
89
+ width: 100%;
90
+ max-width: var(--etos-layout-empty-max-width);
91
+ }
92
+
93
+ .etos-brand-link,
94
+ .etos-profile-trigger {
95
+ display: inline-flex;
96
+ align-items: center;
97
+ gap: 0.75rem;
98
+ min-height: 2.5rem;
99
+ padding: 0.375rem 0.5rem;
100
+ color: hsl(var(--foreground));
101
+ text-decoration: none;
102
+ transition:
103
+ color 160ms ease,
104
+ background-color 160ms ease;
105
+ }
106
+
107
+ .etos-brand-link:focus-visible,
108
+ .etos-profile-trigger:focus-visible {
109
+ outline: 2px solid hsl(var(--ring));
110
+ outline-offset: 2px;
111
+ }
112
+
113
+ .etos-brand-mark,
114
+ .etos-profile-mark {
115
+ display: inline-flex;
116
+ height: var(--etos-layout-brand-mark-size);
117
+ width: var(--etos-layout-brand-mark-size);
118
+ align-items: center;
119
+ justify-content: center;
120
+ border-radius: var(--radius-md);
121
+ background: hsl(var(--primary));
122
+ color: hsl(var(--primary-foreground));
123
+ font-size: 0.7rem;
124
+ font-weight: 700;
125
+ letter-spacing: 0.18em;
126
+ line-height: 1;
127
+ }
128
+
129
+ .etos-profile-mark {
130
+ border-radius: 999px;
131
+ letter-spacing: 0;
132
+ }
133
+
134
+ .etos-brand-copy {
135
+ display: none;
136
+ min-width: 0;
137
+ flex-direction: column;
138
+ gap: 0.125rem;
139
+ }
140
+
141
+ .etos-brand-name {
142
+ font-size: var(--text-sm);
143
+ font-weight: 700;
144
+ line-height: 1;
145
+ }
146
+
147
+ .etos-brand-subtitle,
148
+ .etos-profile-name {
149
+ font-size: var(--text-xs);
150
+ line-height: 1;
151
+ color: hsl(var(--muted-foreground));
152
+ }
153
+
154
+ .etos-profile-name {
155
+ display: none;
156
+ font-weight: 600;
157
+ }
158
+
159
+ @media (min-width: 40rem) {
160
+ .etos-brand-copy,
161
+ .etos-profile-name {
162
+ display: flex;
163
+ }
164
+ }
165
+
166
+ @media (min-width: 64rem) {
167
+ .etos-layout-host--fixed {
168
+ padding: var(--etos-layout-shell-padding);
169
+ }
170
+
171
+ .etos-layout-frame--vertical-fixed {
172
+ max-width: var(--etos-layout-vertical-shell-max-width);
173
+ margin-inline: auto;
174
+ }
175
+
176
+ .etos-layout-frame--fixed {
177
+ border: var(--border-width) solid hsl(var(--border));
178
+ border-radius: var(--etos-layout-frame-radius);
179
+ box-shadow: var(--etos-layout-frame-shadow);
180
+ }
181
+
182
+ .etos-layout-main--vertical-fixed {
183
+ margin-inline: 0;
184
+ }
185
+ }
186
+ }
@@ -1,12 +1,12 @@
1
1
  /**
2
- * Etos mirrors the baseline style layer.
2
+ * Etos brand style layer.
3
3
  */
4
4
  @layer tokens {
5
5
  [theme-brand='etos'] {
6
- --theme-radius-base: 0.5rem;
6
+ --theme-radius-base: 0.375rem;
7
7
  --theme-radius-sm: calc(var(--theme-radius-base) - 2px);
8
8
  --theme-radius-md: var(--theme-radius-base);
9
- --theme-radius-lg: calc(var(--theme-radius-base) + 4px);
9
+ --theme-radius-lg: calc(var(--theme-radius-base) + 2px);
10
10
 
11
11
  --radius: var(--theme-radius-base);
12
12
  --radius-sm: var(--theme-radius-sm);
@@ -15,10 +15,10 @@
15
15
 
16
16
  --border-width: 1px;
17
17
 
18
- --theme-shadow-sm: 0 1px 2px 0 hsl(0 0% 0% / 0.05);
19
- --theme-shadow: 0 1px 3px 0 hsl(0 0% 0% / 0.1);
20
- --theme-shadow-md: 0 4px 6px -1px hsl(0 0% 0% / 0.1);
21
- --theme-shadow-lg: 0 10px 15px -3px hsl(0 0% 0% / 0.1);
18
+ --theme-shadow-sm: 0 1px 0 0 hsl(211 95% 12% / 0.08);
19
+ --theme-shadow: 0 2px 4px -2px hsl(211 95% 12% / 0.14);
20
+ --theme-shadow-md: 0 8px 18px -14px hsl(211 95% 12% / 0.24);
21
+ --theme-shadow-lg: 0 18px 36px -28px hsl(211 95% 12% / 0.34);
22
22
 
23
23
  --shadow-sm: var(--theme-shadow-sm);
24
24
  --shadow: var(--theme-shadow);
@@ -30,21 +30,22 @@
30
30
 
31
31
  --font-sans: var(--theme-font-sans);
32
32
  --font-mono: var(--theme-font-mono);
33
- --font-weight-bold: 600;
33
+ --font-weight-bold: 650;
34
34
  --theme-text-scale: 1;
35
35
  --nav-font-family: var(--font-sans);
36
- --nav-text-size: var(--text-base);
37
- --nav-text-line-height: var(--text-base--line-height);
36
+ --nav-text-size: var(--text-sm);
37
+ --nav-text-line-height: var(--text-sm--line-height);
38
38
  --nav-heading-font-family: var(--font-sans);
39
- --nav-heading-size: var(--text-sm);
40
- --nav-heading-line-height: var(--text-sm--line-height);
41
- --nav-heading-weight: 600;
42
- --nav-heading-letter-spacing: 0.12em;
39
+ --nav-heading-size: var(--text-xs);
40
+ --nav-heading-line-height: var(--text-xs--line-height);
41
+ --nav-heading-weight: 700;
42
+ --nav-heading-letter-spacing: 0.14em;
43
43
  --nav-badge-font-family: var(--font-sans);
44
- --nav-badge-size: var(--text-sm);
45
- --nav-badge-line-height: var(--text-sm--line-height);
46
- --nav-badge-weight: 500;
44
+ --nav-badge-size: var(--text-xs);
45
+ --nav-badge-line-height: var(--text-xs--line-height);
46
+ --nav-badge-weight: 600;
47
47
  --letter-spacing: 0;
48
48
  --space-unit: 0.25rem;
49
+ --layout-topbar-height: 3.25rem;
49
50
  }
50
51
  }