@zambon-dev/ui 0.0.0-stage → 1.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 (42) hide show
  1. package/CHANGELOG.md +2329 -0
  2. package/README.md +80 -2
  3. package/fesm2022/zambon-dev-ui-framework.mjs +5960 -0
  4. package/fesm2022/zambon-dev-ui-framework.mjs.map +1 -0
  5. package/fesm2022/zambon-dev-ui-library.mjs +5795 -0
  6. package/fesm2022/zambon-dev-ui-library.mjs.map +1 -0
  7. package/fesm2022/zambon-dev-ui-shared.mjs +2517 -0
  8. package/fesm2022/zambon-dev-ui-shared.mjs.map +1 -0
  9. package/fesm2022/zambon-dev-ui-testing.mjs +76 -0
  10. package/fesm2022/zambon-dev-ui-testing.mjs.map +1 -0
  11. package/fesm2022/zambon-dev-ui.mjs +3 -0
  12. package/i18n/framework/en.json +63 -0
  13. package/i18n/framework/pt.json +63 -0
  14. package/i18n/shared/external-content/en.json +12 -0
  15. package/i18n/shared/external-content/pt.json +12 -0
  16. package/i18n/shared/language-selector/en.json +5 -0
  17. package/i18n/shared/language-selector/pt.json +5 -0
  18. package/i18n/shared/login/en.json +14 -0
  19. package/i18n/shared/login/pt.json +14 -0
  20. package/i18n/shared/operations-history/en.json +5 -0
  21. package/i18n/shared/operations-history/pt.json +5 -0
  22. package/i18n/shared/services-history/en.json +14 -0
  23. package/i18n/shared/services-history/pt.json +14 -0
  24. package/i18n/shared/top-bar/en.json +7 -0
  25. package/i18n/shared/top-bar/pt.json +7 -0
  26. package/package.json +106 -4
  27. package/styles/common.scss +10 -0
  28. package/styles/components/button.scss +101 -0
  29. package/styles/components/card.scss +13 -0
  30. package/styles/components/dropdown-static.scss +35 -0
  31. package/styles/components/input-group.scss +44 -0
  32. package/styles/components/input.scss +99 -0
  33. package/styles/components/label.scss +3 -0
  34. package/styles/components/row.scss +48 -0
  35. package/styles/mixins/background.scss +31 -0
  36. package/styles/theme.css +75 -0
  37. package/styles/variables.scss +60 -0
  38. package/types/zambon-dev-ui-framework.d.ts +1496 -0
  39. package/types/zambon-dev-ui-library.d.ts +1675 -0
  40. package/types/zambon-dev-ui-shared.d.ts +675 -0
  41. package/types/zambon-dev-ui-testing.d.ts +51 -0
  42. package/types/zambon-dev-ui.d.ts +3 -0
package/README.md CHANGED
@@ -1,3 +1,81 @@
1
- # Temporary Holding Version
1
+ # @zambon-dev/ui
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Angular UI components, an application shell and a shared application layer for Zambon
4
+ applications, in one package on one version.
5
+
6
+ The three layers are separate entry points, and they stack one way: `shared` builds on
7
+ `framework`, `framework` builds on `library`, and `library` builds on neither.
8
+
9
+ | Import | What is in it |
10
+ | -------------------------- | ------------------------------------------------------------- |
11
+ | `@zambon-dev/ui` | all three layers |
12
+ | `@zambon-dev/ui/library` | form controls, data grids, modals, the ribbon and the sidebar |
13
+ | `@zambon-dev/ui/framework` | tabbed navigation, view base classes, ribbon buttons |
14
+ | `@zambon-dev/ui/shared` | authentication, layouts, audit-history features |
15
+ | `@zambon-dev/ui/testing` | a test harness for rendering under an OnPush ancestor |
16
+
17
+ Importing a layer directly keeps the dependency honest and the bundle smaller; importing the root
18
+ is fine where the layer does not matter.
19
+
20
+ ## Install
21
+
22
+ ```bash
23
+ npm i @zambon-dev/ui
24
+ ```
25
+
26
+ Peer dependencies are the union of what the three layers need, and all are required:
27
+ `@angular/cdk`, `@angular/common`, `@angular/core`, `@angular/forms`, `@angular/platform-browser`,
28
+ `@angular/router`, `@auth0/angular-jwt`, `@microsoft/signalr`, `@ngx-translate/core`,
29
+ `ngx-resize-observer`, `ngx-translate-multi-http-loader` and `rxjs`. Angular 22 or later.
30
+
31
+ **Coming from the three separate packages?** See
32
+ [the migration guide](../../docs/guides/migrating-to-ui.md).
33
+
34
+ ## Styles
35
+
36
+ Each stylesheet is named by its own subpath:
37
+
38
+ ```scss
39
+ @use '@zambon-dev/ui/styles/variables.scss';
40
+ @use '@zambon-dev/ui/styles/common.scss';
41
+ ```
42
+
43
+ `@zambon-dev/ui/styles/theme.css` is the Tailwind entry point and carries the design tokens. An
44
+ application that uses the components' Tailwind utilities needs it in its own build.
45
+
46
+ ## Translations
47
+
48
+ The shipped translation files live under `i18n/framework` and `i18n/shared`. Spread the exported
49
+ asset patterns into your build rather than writing the paths out:
50
+
51
+ ```typescript
52
+ import { ZAMBON_FRAMEWORK_I18N_ASSET, provideZambonFrameworkTranslateService } from '@zambon-dev/ui/framework';
53
+ import { ZAMBON_SHARED_I18N_ASSET } from '@zambon-dev/ui/shared';
54
+ ```
55
+
56
+ ## Selectors
57
+
58
+ Each layer kept the prefix it published under, so a selector still says which layer it came from:
59
+ `<lib-*>` for library, `<framework-*>` for framework, `<shared-*>` for shared.
60
+
61
+ ## Development
62
+
63
+ ```bash
64
+ npx nx build ui # production package into dist/libs/ui
65
+ npx nx test ui # Jest
66
+ npx nx lint ui # ESLint
67
+ npx nx storybook ui # Storybook on :4400
68
+ ```
69
+
70
+ Every change under `src/` needs an entry under `## [Unreleased]` in `CHANGELOG.md`; CI enforces
71
+ it. The release pipeline stamps the version — do not write it yourself.
72
+
73
+ ## Layering
74
+
75
+ The one-way rule is enforced by `no-restricted-imports` overrides in `eslint.config.mjs`, which
76
+ reject both the published subpath and the equivalent relative path. As three packages the rule
77
+ held because npm cannot express a cycle; inside one package only the lint rule holds it.
78
+
79
+ ## License
80
+
81
+ MIT © Ricardo Zambon