crdx-components 1.0.0 → 2.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 (105) hide show
  1. package/fesm2022/crdx-components.mjs +1960 -0
  2. package/fesm2022/crdx-components.mjs.map +1 -0
  3. package/package.json +28 -23
  4. package/src/lib/styles/index.scss +1 -0
  5. package/src/lib/styles/overrides/_index.scss +2 -4
  6. package/src/lib/styles/overrides/_mat-button-overrides.scss +0 -11
  7. package/src/lib/styles/overrides/_mat-checkbox-overrides.scss +2 -2
  8. package/src/lib/styles/overrides/_mat-radio-overrides.scss +40 -0
  9. package/types/crdx-components.d.ts +811 -0
  10. package/types/crdx-components.d.ts.map +1 -0
  11. package/.github/workflows/publish.yml +0 -38
  12. package/bun.lock +0 -491
  13. package/crdx-components-1.0.0.tgz +0 -0
  14. package/crdx-components-tokenized-components-1.0.1.tgz +0 -0
  15. package/ng-package.json +0 -12
  16. package/npm +0 -0
  17. package/src/index.ts +0 -45
  18. package/src/lib/components/breadcrumb/breadcrumb.component.css +0 -206
  19. package/src/lib/components/breadcrumb/breadcrumb.component.html +0 -15
  20. package/src/lib/components/breadcrumb/breadcrumb.component.ts +0 -47
  21. package/src/lib/components/button/button.css +0 -371
  22. package/src/lib/components/button/button.html +0 -187
  23. package/src/lib/components/button/button.ts +0 -103
  24. package/src/lib/components/card/card.css +0 -285
  25. package/src/lib/components/card/card.html +0 -69
  26. package/src/lib/components/card/card.ts +0 -93
  27. package/src/lib/components/checkbox/checkbox-showcase.component.css +0 -42
  28. package/src/lib/components/checkbox/checkbox-showcase.component.html +0 -36
  29. package/src/lib/components/checkbox/checkbox-showcase.component.ts +0 -13
  30. package/src/lib/components/checkbox/checkbox.css +0 -10
  31. package/src/lib/components/checkbox/checkbox.html +0 -13
  32. package/src/lib/components/checkbox/checkbox.ts +0 -64
  33. package/src/lib/components/circular-progress-stepper/circular-progress-stepper.css +0 -89
  34. package/src/lib/components/circular-progress-stepper/circular-progress-stepper.html +0 -23
  35. package/src/lib/components/circular-progress-stepper/circular-progress-stepper.ts +0 -40
  36. package/src/lib/components/dialogs/alert-modal/alert-modal.css +0 -118
  37. package/src/lib/components/dialogs/alert-modal/alert-modal.html +0 -29
  38. package/src/lib/components/dialogs/alert-modal/alert-modal.ts +0 -28
  39. package/src/lib/components/dialogs/confirm-modal/confirm-modal.css +0 -219
  40. package/src/lib/components/dialogs/confirm-modal/confirm-modal.html +0 -60
  41. package/src/lib/components/dialogs/confirm-modal/confirm-modal.store.ts +0 -139
  42. package/src/lib/components/dialogs/confirm-modal/confirm-modal.ts +0 -63
  43. package/src/lib/components/dialogs/container-custom/container-custom.css +0 -11
  44. package/src/lib/components/dialogs/container-custom/container-custom.html +0 -3
  45. package/src/lib/components/dialogs/container-custom/container-custom.ts +0 -37
  46. package/src/lib/components/dialogs/container-custom/custom-modal.state.ts +0 -57
  47. package/src/lib/components/dialogs/error-modal/error-modal.css +0 -53
  48. package/src/lib/components/dialogs/error-modal/error-modal.html +0 -17
  49. package/src/lib/components/dialogs/error-modal/error-modal.ts +0 -20
  50. package/src/lib/components/dialogs/side-modal/side-modal.css +0 -80
  51. package/src/lib/components/dialogs/side-modal/side-modal.html +0 -30
  52. package/src/lib/components/dialogs/side-modal/side-modal.state.ts +0 -78
  53. package/src/lib/components/dialogs/side-modal/side-modal.ts +0 -50
  54. package/src/lib/components/divider/divider.css +0 -24
  55. package/src/lib/components/divider/divider.html +0 -7
  56. package/src/lib/components/divider/divider.ts +0 -13
  57. package/src/lib/components/footer-actions/footer/footer-flow.store.ts +0 -30
  58. package/src/lib/components/footer-actions/footer/footer.html +0 -14
  59. package/src/lib/components/footer-actions/footer/footer.ts +0 -50
  60. package/src/lib/components/footer-actions/modal-footer-actions/modal-footer-actions.css +0 -44
  61. package/src/lib/components/footer-actions/modal-footer-actions/modal-footer-actions.html +0 -7
  62. package/src/lib/components/footer-actions/modal-footer-actions/modal-footer-actions.ts +0 -12
  63. package/src/lib/components/footer-actions/page-footer-actions/page-footer-actions.css +0 -31
  64. package/src/lib/components/footer-actions/page-footer-actions/page-footer-actions.html +0 -7
  65. package/src/lib/components/footer-actions/page-footer-actions/page-footer-actions.ts +0 -12
  66. package/src/lib/components/form-field/select-field.css +0 -178
  67. package/src/lib/components/form-field/select-field.html +0 -94
  68. package/src/lib/components/form-field/select-field.ts +0 -324
  69. package/src/lib/components/form-field/text-field.css +0 -41
  70. package/src/lib/components/form-field/text-field.html +0 -38
  71. package/src/lib/components/form-field/text-field.ts +0 -102
  72. package/src/lib/components/header/header.css +0 -142
  73. package/src/lib/components/header/header.html +0 -36
  74. package/src/lib/components/header/header.ts +0 -101
  75. package/src/lib/components/icon-button/icon-button.css +0 -445
  76. package/src/lib/components/icon-button/icon-button.html +0 -15
  77. package/src/lib/components/icon-button/icon-button.ts +0 -49
  78. package/src/lib/components/list-item/list-item.css +0 -122
  79. package/src/lib/components/list-item/list-item.html +0 -79
  80. package/src/lib/components/list-item/list-item.ts +0 -104
  81. package/src/lib/components/menu/menu.css +0 -39
  82. package/src/lib/components/menu/menu.html +0 -57
  83. package/src/lib/components/menu/menu.ts +0 -159
  84. package/src/lib/components/shared-table/shared-table-cell-template.directive.ts +0 -25
  85. package/src/lib/components/shared-table/shared-table.component.css +0 -223
  86. package/src/lib/components/shared-table/shared-table.component.html +0 -96
  87. package/src/lib/components/shared-table/shared-table.component.ts +0 -172
  88. package/src/lib/components/sidebar/sidebar.css +0 -234
  89. package/src/lib/components/sidebar/sidebar.html +0 -67
  90. package/src/lib/components/sidebar/sidebar.ts +0 -92
  91. package/src/lib/components/slide-toggle/slide-toggle.css +0 -0
  92. package/src/lib/components/slide-toggle/slide-toggle.html +0 -3
  93. package/src/lib/components/slide-toggle/slide-toggle.ts +0 -18
  94. package/src/lib/components/spinner/spinner.css +0 -9
  95. package/src/lib/components/spinner/spinner.html +0 -9
  96. package/src/lib/components/spinner/spinner.ts +0 -17
  97. package/src/lib/components/tooltip/tooltip.css +0 -32
  98. package/src/lib/components/tooltip/tooltip.html +0 -3
  99. package/src/lib/components/tooltip/tooltip.ts +0 -31
  100. package/src/lib/icons/register-icons.ts +0 -101
  101. package/src/lib/lib-ui/lib-ui.html +0 -1
  102. package/src/lib/lib-ui/lib-ui.scss +0 -0
  103. package/src/lib/lib-ui/lib-ui.ts +0 -9
  104. package/tsconfig.json +0 -30
  105. package/tsconfig.lib.json +0 -20
@@ -1,9 +0,0 @@
1
- <mat-spinner
2
- mode="indeterminate"
3
- class="lib-spinner"
4
- [attr.aria-label]="ariaLabel()"
5
- [diameter]="diameter()"
6
- [strokeWidth]="strokeWidth()"
7
- [style.--lib-spinner-color]="color()"
8
- ></mat-spinner>
9
-
@@ -1,17 +0,0 @@
1
- import { Component, input } from '@angular/core';
2
- import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
3
-
4
- @Component({
5
- selector: 'lib-spinner, spinner',
6
- standalone: true,
7
- imports: [MatProgressSpinnerModule],
8
- templateUrl: './spinner.html',
9
- styleUrl: './spinner.css',
10
- })
11
- export class LibSpinnerComponent {
12
- diameter = input<number>(48);
13
- strokeWidth = input<number>(4);
14
- color = input<string>('var(--Rojo-400, #e30613)');
15
- ariaLabel = input<string>('Cargando');
16
- }
17
-
@@ -1,32 +0,0 @@
1
- :host.ui-tooltip-host {
2
- display: inline-flex;
3
- }
4
-
5
- .ui-tooltip {
6
- display: inline-flex;
7
- align-items: center;
8
- justify-content: center;
9
- min-height: 24px;
10
- padding: 4px 8px;
11
- border-radius: calc(var(--tooltips-plain-enabled-container-plain-tooltip-container-shape, 4) * 1px);
12
- background: var(--tooltips-plain-enabled-container-plain-tooltip-container-color, #2d3133);
13
- box-sizing: border-box;
14
- }
15
-
16
- .ui-tooltip__text {
17
- color: var(--tooltips-plain-enabled-supporting-text-plain-tooltip-supporting-text-color, #eef1f3);
18
- font-family: var(--tooltips-plain-enabled-supporting-text-plain-tooltip-supporting-text-font, 'Heebo'), sans-serif;
19
- font-size: var(--tooltips-plain-enabled-supporting-text-plain-tooltip-supporting-text-size, 12px);
20
- font-style: normal;
21
- font-weight: var(--tooltips-plain-enabled-supporting-text-plain-tooltip-supporting-text-weight, 400);
22
- line-height: calc(var(--tooltips-plain-enabled-supporting-text-plain-tooltip-supporting-text-line-height, 16) * 1px);
23
- letter-spacing: var(--tooltips-plain-enabled-supporting-text-plain-tooltip-supporting-text-tracking, 0.4px);
24
- }
25
-
26
- .ui-tooltip--single-line .ui-tooltip__text {
27
- white-space: nowrap;
28
- }
29
-
30
- .ui-tooltip--multi-line .ui-tooltip__text {
31
- white-space: normal;
32
- }
@@ -1,3 +0,0 @@
1
- <div class="ui-tooltip" [ngClass]="classes()" [style.max-width]="maxWidth()">
2
- <span class="ui-tooltip__text">{{ text() }}</span>
3
- </div>
@@ -1,31 +0,0 @@
1
- import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
2
- import { NgClass } from '@angular/common';
3
-
4
- export type LibTooltipType = 'single-line' | 'multi-line';
5
-
6
- @Component({
7
- selector: 'lib-tooltip',
8
- standalone: true,
9
- imports: [NgClass],
10
- templateUrl: './tooltip.html',
11
- styleUrl: './tooltip.css',
12
- changeDetection: ChangeDetectionStrategy.OnPush,
13
- host: {
14
- '[class.ui-tooltip-host]': 'true',
15
- },
16
- })
17
- export class LibTooltipComponent {
18
- /** Texto del tooltip. */
19
- text = input('Supporting text');
20
-
21
- /** Variante del tooltip según Figma: single-line o multi-line. */
22
- type = input<LibTooltipType>('single-line');
23
-
24
- /** Ancho máximo opcional para controlar el wrap en multi-line (ej: "12.5rem", "200px"). */
25
- maxWidth = input<string | null>(null);
26
-
27
- readonly classes = computed(() => ({
28
- 'ui-tooltip--single-line': this.type() === 'single-line',
29
- 'ui-tooltip--multi-line': this.type() === 'multi-line',
30
- }));
31
- }
@@ -1,101 +0,0 @@
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
- }
@@ -1 +0,0 @@
1
- <p>LibUi works!</p>
File without changes
@@ -1,9 +0,0 @@
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 {}
package/tsconfig.json DELETED
@@ -1,30 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "es2022",
4
- "module": "preserve",
5
- "moduleResolution": "bundler",
6
- "strict": true,
7
- "noImplicitOverride": true,
8
- "noPropertyAccessFromIndexSignature": true,
9
- "noImplicitReturns": true,
10
- "noFallthroughCasesInSwitch": true,
11
- "emitDecoratorMetadata": false,
12
- "experimentalDecorators": true,
13
- "useDefineForClassFields": false,
14
- "forceConsistentCasingInFileNames": true,
15
- "skipLibCheck": true,
16
- "lib": ["es2022", "dom"]
17
- },
18
- "angularCompilerOptions": {
19
- "enableI18nLegacyMessageIdFormat": false,
20
- "strictInjectionParameters": true,
21
- "strictInputAccessModifiers": true,
22
- "strictTemplates": true,
23
- "skipTemplateCodegen": true
24
- },
25
- "files": [],
26
- "include": [],
27
- "references": [
28
- { "path": "./tsconfig.lib.json" }
29
- ]
30
- }
package/tsconfig.lib.json DELETED
@@ -1,20 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "./out-tsc",
5
- "declaration": true,
6
- "declarationMap": true,
7
- "inlineSources": true,
8
- "types": [],
9
- "isolatedModules": false
10
- },
11
- "angularCompilerOptions": {
12
- "compilationMode": "full",
13
- "enableI18nLegacyMessageIdFormat": false,
14
- "strictInjectionParameters": true,
15
- "strictInputAccessModifiers": true,
16
- "strictTemplates": true
17
- },
18
- "include": ["src/**/*.ts"],
19
- "exclude": ["src/**/*.spec.ts", "src/**/*.test.ts"]
20
- }