@ojiepermana/angular 0.1.1 → 21.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.
Files changed (92) hide show
  1. package/README.md +41 -249
  2. package/fesm2022/ojiepermana-angular-chart.mjs +3714 -0
  3. package/fesm2022/ojiepermana-angular-chart.mjs.map +1 -0
  4. package/fesm2022/ojiepermana-angular-component.mjs +3463 -0
  5. package/fesm2022/ojiepermana-angular-component.mjs.map +1 -0
  6. package/fesm2022/ojiepermana-angular-layout.mjs +276 -408
  7. package/fesm2022/ojiepermana-angular-layout.mjs.map +1 -1
  8. package/fesm2022/ojiepermana-angular-navigation.mjs +2198 -404
  9. package/fesm2022/ojiepermana-angular-navigation.mjs.map +1 -1
  10. package/fesm2022/ojiepermana-angular-theme.mjs +381 -1
  11. package/fesm2022/ojiepermana-angular-theme.mjs.map +1 -1
  12. package/fesm2022/ojiepermana-angular.mjs +15 -1
  13. package/fesm2022/ojiepermana-angular.mjs.map +1 -1
  14. package/package.json +49 -36
  15. package/theme/styles/etos.css +38 -0
  16. package/theme/styles/index.css +32 -8
  17. package/theme/styles/themes/brand/etos/color.css +21 -0
  18. package/theme/styles/themes/brand/etos/style.css +50 -0
  19. package/theme/styles/themes/library/_components.css +63 -0
  20. package/theme/styles/themes/library/_layers.css +15 -0
  21. package/theme/styles/themes/library/_material-overrides.css +254 -0
  22. package/theme/styles/themes/library/_tokens.css +54 -0
  23. package/theme/styles/themes/library/color/amber.css +18 -0
  24. package/theme/styles/themes/library/color/blue.css +23 -0
  25. package/theme/styles/themes/library/color/green.css +18 -0
  26. package/theme/styles/themes/library/color/index.css +9 -0
  27. package/theme/styles/themes/library/color/purple.css +18 -0
  28. package/theme/styles/themes/library/color/red.css +18 -0
  29. package/theme/styles/themes/library/style/brutal.css +47 -0
  30. package/theme/styles/themes/library/style/default.css +51 -0
  31. package/theme/styles/themes/library/style/index.css +8 -0
  32. package/theme/styles/themes/library/style/sharp.css +47 -0
  33. package/theme/styles/themes/library/style/soft.css +47 -0
  34. package/theme/styles/themes/mode/dark.css +20 -0
  35. package/theme/styles/themes/mode/index.css +6 -0
  36. package/theme/styles/themes/mode/light.css +24 -0
  37. package/theme/styles/themes/taildwind.css +109 -0
  38. package/types/ojiepermana-angular-chart.d.ts +1094 -0
  39. package/types/ojiepermana-angular-component.d.ts +1174 -0
  40. package/types/ojiepermana-angular-layout.d.ts +123 -76
  41. package/types/ojiepermana-angular-navigation.d.ts +256 -116
  42. package/types/ojiepermana-angular-theme.d.ts +170 -1
  43. package/types/ojiepermana-angular.d.ts +2 -1
  44. package/fesm2022/ojiepermana-angular-internal.mjs +0 -489
  45. package/fesm2022/ojiepermana-angular-internal.mjs.map +0 -1
  46. package/fesm2022/ojiepermana-angular-navigation-horizontal.mjs +0 -721
  47. package/fesm2022/ojiepermana-angular-navigation-horizontal.mjs.map +0 -1
  48. package/fesm2022/ojiepermana-angular-navigation-vertical.mjs +0 -1647
  49. package/fesm2022/ojiepermana-angular-navigation-vertical.mjs.map +0 -1
  50. package/fesm2022/ojiepermana-angular-shell.mjs +0 -19
  51. package/fesm2022/ojiepermana-angular-shell.mjs.map +0 -1
  52. package/fesm2022/ojiepermana-angular-theme-component.mjs +0 -235
  53. package/fesm2022/ojiepermana-angular-theme-component.mjs.map +0 -1
  54. package/fesm2022/ojiepermana-angular-theme-directive.mjs +0 -29
  55. package/fesm2022/ojiepermana-angular-theme-directive.mjs.map +0 -1
  56. package/fesm2022/ojiepermana-angular-theme-service.mjs +0 -241
  57. package/fesm2022/ojiepermana-angular-theme-service.mjs.map +0 -1
  58. package/layout/README.md +0 -144
  59. package/layout/src/component/horizontal/horizontal.css +0 -130
  60. package/layout/src/component/vertical/vertical.css +0 -75
  61. package/layout/src/layout.css +0 -16
  62. package/navigation/README.md +0 -301
  63. package/navigation/horizontal/README.md +0 -49
  64. package/shell/README.md +0 -41
  65. package/styles/index.css +0 -2
  66. package/styles/resets.css +0 -22
  67. package/theme/README.md +0 -379
  68. package/theme/styles/adapters/material-ui/index.css +0 -205
  69. package/theme/styles/modes/dark.css +0 -84
  70. package/theme/styles/presets/colors/blue.css +0 -45
  71. package/theme/styles/presets/colors/brand.css +0 -52
  72. package/theme/styles/presets/colors/cyan.css +0 -45
  73. package/theme/styles/presets/colors/green.css +0 -45
  74. package/theme/styles/presets/colors/index.css +0 -7
  75. package/theme/styles/presets/colors/orange.css +0 -45
  76. package/theme/styles/presets/colors/purple.css +0 -45
  77. package/theme/styles/presets/colors/red.css +0 -45
  78. package/theme/styles/presets/styles/flat.css +0 -61
  79. package/theme/styles/presets/styles/glass.css +0 -28
  80. package/theme/styles/presets/styles/index.css +0 -2
  81. package/theme/styles/roles/index.css +0 -67
  82. package/theme/styles/tokens/foundation.css +0 -136
  83. package/theme/styles/tokens/semantic.css +0 -87
  84. package/theme/styles/utilities/index.css +0 -88
  85. package/types/ojiepermana-angular-internal.d.ts +0 -90
  86. package/types/ojiepermana-angular-navigation-horizontal.d.ts +0 -81
  87. package/types/ojiepermana-angular-navigation-vertical.d.ts +0 -262
  88. package/types/ojiepermana-angular-shell.d.ts +0 -14
  89. package/types/ojiepermana-angular-theme-component.d.ts +0 -46
  90. package/types/ojiepermana-angular-theme-directive.d.ts +0 -10
  91. package/types/ojiepermana-angular-theme-service.d.ts +0 -68
  92. /package/{navigation/vertical → chart}/README.md +0 -0
package/README.md CHANGED
@@ -1,283 +1,75 @@
1
1
  # @ojiepermana/angular
2
2
 
3
- Theme, layout, and navigation primitives for Angular applications.
3
+ This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 21.2.0.
4
4
 
5
- This package is organized around secondary entry points. The root TypeScript package is intentionally empty, so application code should not import APIs from `@ojiepermana/angular` directly.
5
+ ## Package manager
6
6
 
7
- ## Current Package Shape
7
+ Install dependencies from the workspace root with Bun:
8
8
 
9
- Use these entry points in application code:
10
-
11
- - `@ojiepermana/angular/theme/service`
12
- - `@ojiepermana/angular/theme/component`
13
- - `@ojiepermana/angular/theme/directive`
14
- - `@ojiepermana/angular/layout`
15
- - `@ojiepermana/angular/navigation`
16
- - `@ojiepermana/angular/navigation/vertical`
17
- - `@ojiepermana/angular/navigation/horizontal`
18
- - `@ojiepermana/angular/shell`
19
- - `@ojiepermana/angular/styles/index.css`
20
- - `@ojiepermana/angular/styles/resets.css` for optional application-level resets
21
-
22
- Do not import consumer code from:
23
-
24
- - `@ojiepermana/angular`
25
- - `@ojiepermana/angular/internal`
26
-
27
- ## What The Library Provides
28
-
29
- - Theme runtime state through `ThemeService` and `provideNgTheme()` for scheme, color, and style.
30
- - Theme host mirroring through `ThemeHostDirective`.
31
- - Theme controls through `StyleSwitcherComponent`, `ColorPickerComponent`, and `SchemeSwitcherComponent`.
32
- - Layout runtime state through `LayoutService` and `provideNgLayout()` for shell mode and container width.
33
- - Combined runtime registration through `provideNgShell()`.
34
- - Layout host mirroring through `LayoutHostDirective`.
35
- - Reusable shell components through `LayoutVerticalComponent` and `LayoutHorizontalComponent`.
36
- - Layout controls through `LayoutModeSwitcherComponent` and `LayoutContainerSwitcherComponent`.
37
- - Navigation runtime state through `NavigationService` and shared navigation utilities.
38
- - Reusable navigation components through `HorizontalNavigation` and the vertical navigation variants.
39
- - A combined stylesheet bundle through `@ojiepermana/angular/styles/index.css`.
40
-
41
- ## Requirements
42
-
43
- The published package currently declares peer dependencies for:
44
-
45
- - `@angular/common` `^21.2.0`
46
- - `@angular/core` `^21.2.0`
47
- - `@angular/cdk` `^21.0.0`
48
- - `@angular/material` `^21.0.0`
49
- - `@lucide/angular` `>=1.0.0`
50
- - `tailwindcss` `>=4.0.0`
51
-
52
- If you use the layout shells or the navigation components, your application should also already be using Angular Router because those APIs render router primitives such as `RouterOutlet` and `RouterLink`.
53
-
54
- ## Runtime Contract
55
-
56
- ### Theme Runtime
57
-
58
- `ThemeService` writes these values to `document.documentElement`:
59
-
60
- - `.dark` when the resolved scheme is dark.
61
- - `style.color-scheme` with the resolved browser color scheme.
62
- - `data-theme-scheme`
63
- - `data-theme-color`
64
- - `data-theme-style`
65
-
66
- Theme persistence keys:
67
-
68
- - `theme-scheme`
69
- - `theme-color`
70
- - `theme-style`
71
-
72
- ### Layout Runtime
73
-
74
- `LayoutService` writes these values to `document.documentElement`:
75
-
76
- - `data-layout-mode`
77
- - `data-layout-container`
78
-
79
- Layout persistence keys:
80
-
81
- - `layout-mode`
82
- - `layout-container`
83
-
84
- Legacy `ng-theme:v2:*` keys are migrated automatically by the owning runtime service when they are read.
85
-
86
- Deprecated config fields `storageKey` and `storageVersion` have been removed from the public config interfaces. The persistence keys are now fixed by the library runtime.
87
-
88
- Theme color labels can be localized through `provideNgTheme({ colorLabels: { ... } })`, and layout shells now prefer the internal `shell-content` marker over the deprecated HTML `content` element name.
89
-
90
- ## Styling Model
91
-
92
- - `@ojiepermana/angular/styles/index.css` is the canonical aggregate bundle for applications. It imports theme first, then the layout-wide `data-layout-*` rules.
93
- - Application-level resets are intentionally not bundled. Import `@ojiepermana/angular/styles/resets.css` only if you want the library's optional reset helpers.
94
- - Theme styles remain in the aggregate bundle, while horizontal and vertical shell CSS are colocated with their standalone layout components.
95
- - Semantic tokens are the visual source of truth.
96
- - Angular Material is the behavior layer and consumes the shared theme variables.
97
-
98
- ## Quick Start
99
-
100
- ### 1. Register Providers
9
+ ```bash
10
+ bun install
11
+ ```
101
12
 
102
- ```ts
103
- import { ApplicationConfig, provideBrowserGlobalErrorListeners } from '@angular/core';
104
- import { provideRouter } from '@angular/router';
105
- import { provideNgShell } from '@ojiepermana/angular/shell';
13
+ ## Code scaffolding
106
14
 
107
- import { routes } from './app.routes';
15
+ Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
108
16
 
109
- export const appConfig: ApplicationConfig = {
110
- providers: [
111
- provideBrowserGlobalErrorListeners(),
112
- provideRouter(routes),
113
- provideNgShell({
114
- theme: {
115
- defaultScheme: 'system',
116
- defaultColor: 'brand',
117
- defaultStyle: 'flat',
118
- },
119
- layout: {
120
- defaultMode: 'vertical',
121
- defaultContainer: 'boxed',
122
- },
123
- }),
124
- ],
125
- };
17
+ ```bash
18
+ bun run ng generate component component-name
126
19
  ```
127
20
 
128
- ### 2. Register Styles
21
+ For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
129
22
 
130
- ```css
131
- @import '@ojiepermana/angular/styles/index.css';
132
- @import 'tailwindcss';
23
+ ```bash
24
+ bun run ng --help
133
25
  ```
134
26
 
135
- Use this aggregate import for consumer applications.
27
+ ## Building
136
28
 
137
- If your application also wants the library's optional reset helpers, add this before the aggregate bundle:
29
+ To build the library, run:
138
30
 
139
- ```css
140
- @import '@ojiepermana/angular/styles/resets.css';
141
- @import '@ojiepermana/angular/styles/index.css';
142
- @import 'tailwindcss';
31
+ ```bash
32
+ bun run build
143
33
  ```
144
34
 
145
- ### 3. Compose A Shell
35
+ This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
146
36
 
147
- ```ts
148
- import { ChangeDetectionStrategy, Component } from '@angular/core';
149
- import { LayoutContainerSwitcherComponent, LayoutVerticalComponent } from '@ojiepermana/angular/layout';
150
- import {
151
- StyleSwitcherComponent,
152
- ColorPickerComponent,
153
- SchemeSwitcherComponent,
154
- } from '@ojiepermana/angular/theme/component';
37
+ ### Publishing the Library
155
38
 
156
- @Component({
157
- selector: 'app-shell',
158
- imports: [
159
- StyleSwitcherComponent,
160
- ColorPickerComponent,
161
- LayoutContainerSwitcherComponent,
162
- LayoutVerticalComponent,
163
- SchemeSwitcherComponent,
164
- ],
165
- template: `
166
- <vertical>
167
- <nav navigation class="flex h-full w-full flex-col gap-6 px-4 py-5">
168
- <div class="flex items-center gap-1">
169
- <style-switcher />
170
- <layout-container-switcher />
171
- <scheme-switcher />
172
- </div>
173
-
174
- <color-picker />
175
- </nav>
176
- </vertical>
177
- `,
178
- changeDetection: ChangeDetectionStrategy.OnPush,
179
- })
180
- export class AppShellComponent {}
181
- ```
39
+ Publish the scoped package to the public npm registry from the workspace root.
182
40
 
183
- ### 4. Mirror Runtime State To A Subtree
41
+ First, log in to npm:
184
42
 
185
- ```html
186
- <section ngtThemeHost ngtLayoutHost>
187
- <ng-content />
188
- </section>
43
+ ```bash
44
+ npm login
189
45
  ```
190
46
 
191
- ## Entry Point Summary
47
+ Then run:
192
48
 
193
- ### `@ojiepermana/angular/theme/service`
194
-
195
- - `ThemeService`
196
- - `provideNgTheme`
197
- - `NG_THEME_CONFIG`
198
- - `ThemeScheme`
199
- - `ThemeColor`
200
- - `ThemeColorOption`
201
- - `ThemeStyle`
202
- - `NgThemeConfig`
203
-
204
- ### `@ojiepermana/angular/theme/component`
205
-
206
- - `StyleSwitcherComponent`
207
- - `ColorPickerComponent`
208
- - `SchemeSwitcherComponent`
209
-
210
- ### `@ojiepermana/angular/theme/directive`
211
-
212
- - `ThemeHostDirective`
213
-
214
- ### `@ojiepermana/angular/layout`
215
-
216
- - `LayoutService`
217
- - `provideNgLayout`
218
- - `NG_LAYOUT_CONFIG`
219
- - `LayoutMode`
220
- - `LayoutContainer`
221
- - `NgLayoutConfig`
222
- - `LayoutHostDirective`
223
- - `LayoutVerticalComponent`
224
- - `LayoutHorizontalComponent`
225
- - `LayoutModeSwitcherComponent`
226
- - `LayoutContainerSwitcherComponent`
49
+ ```bash
50
+ npm run publish
51
+ ```
227
52
 
228
- ### `@ojiepermana/angular/navigation`
53
+ This command rebuilds the library and publishes the generated `dist/angular` package with public access.
229
54
 
230
- - `provideNgNavigation`
231
- - `NG_NAVIGATION_CONFIG`
232
- - `NgNavigationConfig`
233
- - `NavigationPreferencesService`
234
- - `NavigationService`
235
- - `NavigationItem`
236
- - `NavigationBranchItem`
237
- - `NavigationLeafItem`
238
- - `NavigationBasicItem`
239
- - `NavigationAsideItem`
240
- - `NavigationCollapsableItem`
241
- - `NavigationGroupItem`
242
- - `NavigationDividerItem`
243
- - `NavigationSpacerItem`
244
- - `HorizontalNavigationVariant`
245
- - `VerticalNavigationAppearance`
246
- - `VerticalNavigationMode`
247
- - `VerticalNavigationPosition`
248
- - `getNavigationItemAction`
249
- - `getNavigationChildren`
250
- - `getNavigationItemVisibilityHandler`
251
- - `hasNavigationChildren`
252
- - `isNavigationItemHidden`
253
- - `isNavigationRoutableItem`
254
- - `shouldRenderNavigationItem`
55
+ ## Running unit tests
255
56
 
256
- ### `@ojiepermana/angular/navigation/vertical`
57
+ To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
257
58
 
258
- - `VerticalNavigationCollapsibleComponent`
259
- - `VerticalNavigationDefaultComponent`
260
- - `VerticalNavigationAsideItemComponent`
261
- - `VerticalNavigationBasicItemComponent`
262
- - `VerticalNavigationCollapsableItemComponent`
263
- - `VerticalNavigationDividerItemComponent`
264
- - `VerticalNavigationGroupItemComponent`
265
- - `VerticalNavigationSpacerItemComponent`
59
+ ```bash
60
+ bun run test
61
+ ```
266
62
 
267
- ### `@ojiepermana/angular/navigation/horizontal`
63
+ ## Running end-to-end tests
268
64
 
269
- - `HorizontalNavigation`
270
- - `HorizontalNavigationBranchItem`
65
+ For end-to-end (e2e) testing, run:
271
66
 
272
- ### `@ojiepermana/angular/shell`
67
+ ```bash
68
+ bun run ng e2e
69
+ ```
273
70
 
274
- - `provideNgShell`
275
- - `NgShellConfig`
71
+ Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
276
72
 
277
- ## Notes For Contributors
73
+ ## Additional Resources
278
74
 
279
- - Keep public imports domain-based through the documented secondary entry points.
280
- - Document `@ojiepermana/angular/styles/index.css` as the consumer stylesheet entry point.
281
- - Treat `@ojiepermana/angular/internal` as implementation-only. It exists so library entry points can share code without turning that code into a supported consumer contract.
282
- - Do not add exports to `@ojiepermana/angular` unless the package contract changes intentionally.
283
- - Keep the root README, theme README, layout README, navigation README, and entrypoint smoke tests aligned whenever the public surface changes.
75
+ For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.