crdx-components 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 (128) hide show
  1. package/.github/workflows/publish.yml +38 -0
  2. package/bun.lock +491 -0
  3. package/crdx-components-1.0.0.tgz +0 -0
  4. package/crdx-components-tokenized-components-1.0.1.tgz +0 -0
  5. package/ng-package.json +12 -0
  6. package/npm +0 -0
  7. package/package.json +33 -0
  8. package/src/index.ts +45 -0
  9. package/src/lib/components/breadcrumb/breadcrumb.component.css +206 -0
  10. package/src/lib/components/breadcrumb/breadcrumb.component.html +15 -0
  11. package/src/lib/components/breadcrumb/breadcrumb.component.ts +47 -0
  12. package/src/lib/components/button/button.css +371 -0
  13. package/src/lib/components/button/button.html +187 -0
  14. package/src/lib/components/button/button.ts +103 -0
  15. package/src/lib/components/card/card.css +285 -0
  16. package/src/lib/components/card/card.html +69 -0
  17. package/src/lib/components/card/card.ts +93 -0
  18. package/src/lib/components/checkbox/checkbox-showcase.component.css +42 -0
  19. package/src/lib/components/checkbox/checkbox-showcase.component.html +36 -0
  20. package/src/lib/components/checkbox/checkbox-showcase.component.ts +13 -0
  21. package/src/lib/components/checkbox/checkbox.css +10 -0
  22. package/src/lib/components/checkbox/checkbox.html +13 -0
  23. package/src/lib/components/checkbox/checkbox.ts +64 -0
  24. package/src/lib/components/circular-progress-stepper/circular-progress-stepper.css +89 -0
  25. package/src/lib/components/circular-progress-stepper/circular-progress-stepper.html +23 -0
  26. package/src/lib/components/circular-progress-stepper/circular-progress-stepper.ts +40 -0
  27. package/src/lib/components/dialogs/alert-modal/alert-modal.css +118 -0
  28. package/src/lib/components/dialogs/alert-modal/alert-modal.html +29 -0
  29. package/src/lib/components/dialogs/alert-modal/alert-modal.ts +28 -0
  30. package/src/lib/components/dialogs/confirm-modal/confirm-modal.css +219 -0
  31. package/src/lib/components/dialogs/confirm-modal/confirm-modal.html +60 -0
  32. package/src/lib/components/dialogs/confirm-modal/confirm-modal.store.ts +139 -0
  33. package/src/lib/components/dialogs/confirm-modal/confirm-modal.ts +63 -0
  34. package/src/lib/components/dialogs/container-custom/container-custom.css +11 -0
  35. package/src/lib/components/dialogs/container-custom/container-custom.html +3 -0
  36. package/src/lib/components/dialogs/container-custom/container-custom.ts +37 -0
  37. package/src/lib/components/dialogs/container-custom/custom-modal.state.ts +57 -0
  38. package/src/lib/components/dialogs/error-modal/error-modal.css +53 -0
  39. package/src/lib/components/dialogs/error-modal/error-modal.html +17 -0
  40. package/src/lib/components/dialogs/error-modal/error-modal.ts +20 -0
  41. package/src/lib/components/dialogs/side-modal/side-modal.css +80 -0
  42. package/src/lib/components/dialogs/side-modal/side-modal.html +30 -0
  43. package/src/lib/components/dialogs/side-modal/side-modal.state.ts +78 -0
  44. package/src/lib/components/dialogs/side-modal/side-modal.ts +50 -0
  45. package/src/lib/components/divider/divider.css +24 -0
  46. package/src/lib/components/divider/divider.html +7 -0
  47. package/src/lib/components/divider/divider.ts +13 -0
  48. package/src/lib/components/footer-actions/footer/footer-flow.store.ts +30 -0
  49. package/src/lib/components/footer-actions/footer/footer.html +14 -0
  50. package/src/lib/components/footer-actions/footer/footer.ts +50 -0
  51. package/src/lib/components/footer-actions/modal-footer-actions/modal-footer-actions.css +44 -0
  52. package/src/lib/components/footer-actions/modal-footer-actions/modal-footer-actions.html +7 -0
  53. package/src/lib/components/footer-actions/modal-footer-actions/modal-footer-actions.ts +12 -0
  54. package/src/lib/components/footer-actions/page-footer-actions/page-footer-actions.css +31 -0
  55. package/src/lib/components/footer-actions/page-footer-actions/page-footer-actions.html +7 -0
  56. package/src/lib/components/footer-actions/page-footer-actions/page-footer-actions.ts +12 -0
  57. package/src/lib/components/form-field/select-field.css +178 -0
  58. package/src/lib/components/form-field/select-field.html +94 -0
  59. package/src/lib/components/form-field/select-field.ts +324 -0
  60. package/src/lib/components/form-field/text-field.css +41 -0
  61. package/src/lib/components/form-field/text-field.html +38 -0
  62. package/src/lib/components/form-field/text-field.ts +102 -0
  63. package/src/lib/components/header/header.css +142 -0
  64. package/src/lib/components/header/header.html +36 -0
  65. package/src/lib/components/header/header.ts +101 -0
  66. package/src/lib/components/icon-button/icon-button.css +445 -0
  67. package/src/lib/components/icon-button/icon-button.html +15 -0
  68. package/src/lib/components/icon-button/icon-button.ts +49 -0
  69. package/src/lib/components/list-item/list-item.css +122 -0
  70. package/src/lib/components/list-item/list-item.html +79 -0
  71. package/src/lib/components/list-item/list-item.ts +104 -0
  72. package/src/lib/components/menu/menu.css +39 -0
  73. package/src/lib/components/menu/menu.html +57 -0
  74. package/src/lib/components/menu/menu.ts +159 -0
  75. package/src/lib/components/shared-table/shared-table-cell-template.directive.ts +25 -0
  76. package/src/lib/components/shared-table/shared-table.component.css +223 -0
  77. package/src/lib/components/shared-table/shared-table.component.html +96 -0
  78. package/src/lib/components/shared-table/shared-table.component.ts +172 -0
  79. package/src/lib/components/sidebar/sidebar.css +234 -0
  80. package/src/lib/components/sidebar/sidebar.html +67 -0
  81. package/src/lib/components/sidebar/sidebar.ts +92 -0
  82. package/src/lib/components/slide-toggle/slide-toggle.css +0 -0
  83. package/src/lib/components/slide-toggle/slide-toggle.html +3 -0
  84. package/src/lib/components/slide-toggle/slide-toggle.ts +18 -0
  85. package/src/lib/components/spinner/spinner.css +9 -0
  86. package/src/lib/components/spinner/spinner.html +9 -0
  87. package/src/lib/components/spinner/spinner.ts +17 -0
  88. package/src/lib/components/tooltip/tooltip.css +32 -0
  89. package/src/lib/components/tooltip/tooltip.html +3 -0
  90. package/src/lib/components/tooltip/tooltip.ts +31 -0
  91. package/src/lib/icons/configuration-countable.svg +8 -0
  92. package/src/lib/icons/edit-table.svg +3 -0
  93. package/src/lib/icons/edit.svg +3 -0
  94. package/src/lib/icons/error-circle.svg +8 -0
  95. package/src/lib/icons/hub.svg +3 -0
  96. package/src/lib/icons/icon-menu.svg +8 -0
  97. package/src/lib/icons/info-error.svg +8 -0
  98. package/src/lib/icons/keyboard_arrow_down.svg +1 -0
  99. package/src/lib/icons/logo.svg +0 -0
  100. package/src/lib/icons/logout.svg +0 -0
  101. package/src/lib/icons/notifications.svg +0 -0
  102. package/src/lib/icons/profile-user-menu.svg +0 -0
  103. package/src/lib/icons/profile.svg +0 -0
  104. package/src/lib/icons/register-icons.ts +101 -0
  105. package/src/lib/icons/visibility.svg +0 -0
  106. package/src/lib/lib-ui/lib-ui.html +1 -0
  107. package/src/lib/lib-ui/lib-ui.scss +0 -0
  108. package/src/lib/lib-ui/lib-ui.ts +9 -0
  109. package/src/lib/styles/generated/_app-tokens.scss +2757 -0
  110. package/src/lib/styles/generated/_md3-tokens.scss +179 -0
  111. package/src/lib/styles/generated/_tokens-avatars.scss +4 -0
  112. package/src/lib/styles/global-material-theme.scss +69 -0
  113. package/src/lib/styles/index.scss +16 -0
  114. package/src/lib/styles/layout.scss +29 -0
  115. package/src/lib/styles/overrides/_index.scss +11 -0
  116. package/src/lib/styles/overrides/_mat-button-overrides.scss +105 -0
  117. package/src/lib/styles/overrides/_mat-checkbox-overrides.scss +49 -0
  118. package/src/lib/styles/overrides/_mat-form-field-overrides.scss +148 -0
  119. package/src/lib/styles/overrides/_mat-icon-button-overrides.scss +20 -0
  120. package/src/lib/styles/overrides/_mat-list-overrides.scss +59 -0
  121. package/src/lib/styles/overrides/_mat-slide-toggle-overrides.scss +33 -0
  122. package/src/lib/styles/overrides/_mat-table-overrides.scss +259 -0
  123. package/src/lib/styles/overrides/_mat-tabs-overrides.scss +116 -0
  124. package/src/lib/styles/scrollbar.scss +40 -0
  125. package/src/lib/styles/text-classes.scss +116 -0
  126. package/src/lib/styles/typography.scss +14 -0
  127. package/tsconfig.json +30 -0
  128. package/tsconfig.lib.json +20 -0
@@ -0,0 +1,101 @@
1
+ import { DomSanitizer } from '@angular/platform-browser';
2
+ import { MatIconRegistry } from '@angular/material/icon';
3
+
4
+ const DEFAULT_ICON_BASE_PATH = 'assets/icons';
5
+
6
+ const ICON_MENU_FILE = 'icon-menu.svg';
7
+ const LOGO_FILE = 'logo.svg';
8
+ const SMILEY_FILE = 'smiley.svg';
9
+
10
+ const ICON_FILE_MAP = Object.freeze({
11
+ CollapseMenu: ICON_MENU_FILE,
12
+ 'collapse-menu': ICON_MENU_FILE,
13
+ 'icon-menu': ICON_MENU_FILE,
14
+
15
+ logo: LOGO_FILE,
16
+ 'credix-logo': LOGO_FILE,
17
+ smiley: SMILEY_FILE,
18
+ 'error-circle': 'error-circle.svg',
19
+ 'info-error': 'info-error.svg',
20
+ 'configuration-countable': 'configuration-countable.svg',
21
+ edit: 'edit.svg',
22
+ 'edit-table': 'edit-table.svg',
23
+ hub: 'hub.svg',
24
+ logout: 'logout.svg',
25
+ notifications: 'notifications.svg',
26
+ profile: 'profile.svg',
27
+ 'profile-user-menu': 'profile-user-menu.svg',
28
+ visibility: 'visibility-eye.svg',
29
+ check: 'success-check_icon.svg',
30
+ 'gif-icon-massive': 'gif-icon.svg',
31
+ 'background-color-massive': 'background-color-massive.svg',
32
+ 'content-edit-massive': 'trailing-icon.svg',
33
+ 'edit-massive': 'edit-massive.svg',
34
+ 'edit-massive-white': 'edit-white.svg',
35
+ 'edit-gray': 'edit-gray.svg',
36
+ 'check-update': 'check-update.svg',
37
+ 'download-simple': 'download-simple.svg',
38
+ 'download-file': 'download-file.svg',
39
+ 'content-copy': 'content-copy.svg',
40
+ 'add-create': 'add-create.svg',
41
+ 'add-create-dark': 'add-create-dark.svg',
42
+ 'add-create-dark-icon': 'add-create-dark-icon.svg',
43
+ 'add-circle-filled': 'add_circle_filled.svg',
44
+ 'add-circle-tonal': 'add_circle_tonal.svg',
45
+ 'add-circle-outlined': 'add_circle_outline.svg',
46
+ 'add-circle-elevated': 'add_circle_text.svg',
47
+ 'add-circle-text': 'add_circle_text.svg',
48
+ } satisfies Record<string, string>);
49
+
50
+ function normalizeBasePath(basePath?: string): string {
51
+ const targetPath = basePath ?? DEFAULT_ICON_BASE_PATH;
52
+
53
+ if (/^(https?:)?\/\//.test(targetPath)) {
54
+ return targetPath.replace(/\/$/, '');
55
+ }
56
+
57
+ return targetPath.replace(/\/$/, '');
58
+ }
59
+
60
+ export type UiIconName = keyof typeof ICON_FILE_MAP;
61
+
62
+ export const UI_ICON_NAMES = Object.keys(ICON_FILE_MAP) as UiIconName[];
63
+
64
+ export interface RegisterUiIconOptions {
65
+ basePath?: string;
66
+ }
67
+
68
+ export function resolveUiIconResource(
69
+ iconName: UiIconName,
70
+ options?: RegisterUiIconOptions
71
+ ): string {
72
+ const fileName = ICON_FILE_MAP[iconName];
73
+
74
+ if (!fileName) {
75
+ throw new Error(`Icon "${iconName}" is not registered in ICON_FILE_MAP.`);
76
+ }
77
+
78
+ return `${normalizeBasePath(options?.basePath)}/${fileName}`;
79
+ }
80
+
81
+ export function registerUiIcons(
82
+ registry: MatIconRegistry,
83
+ sanitizer: DomSanitizer,
84
+ icons: UiIconName[] = UI_ICON_NAMES,
85
+ options?: RegisterUiIconOptions
86
+ ): void {
87
+ const basePath = normalizeBasePath(options?.basePath);
88
+
89
+ icons.forEach((iconName) => {
90
+ const fileName = ICON_FILE_MAP[iconName];
91
+ if (!fileName) {
92
+ return;
93
+ }
94
+
95
+ const resourceUrl = `${basePath}/${fileName}`;
96
+ registry.addSvgIcon(
97
+ iconName,
98
+ sanitizer.bypassSecurityTrustResourceUrl(resourceUrl)
99
+ );
100
+ });
101
+ }
File without changes
@@ -0,0 +1 @@
1
+ <p>LibUi works!</p>
File without changes
@@ -0,0 +1,9 @@
1
+ import { Component } from '@angular/core';
2
+
3
+ @Component({
4
+ selector: 'lib-lib-ui',
5
+ imports: [],
6
+ templateUrl: './lib-ui.html',
7
+ styleUrl: './lib-ui.scss',
8
+ })
9
+ export class LibUi {}