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,234 @@
1
+ :host {
2
+ display: block;
3
+ height: 100%;
4
+ }
5
+
6
+ .sidebar {
7
+ position: relative;
8
+ display: flex;
9
+ flex-direction: column;
10
+ align-items: center;
11
+ width: calc(var(--navigation-rail-nav-rail-collapsed-nav-rail-collapsed-container-width, 96) * 1px);
12
+ min-width: calc(var(--navigation-rail-nav-rail-collapsed-nav-rail-collapsed-container-width, 96) * 1px);
13
+ height: 100%;
14
+ padding: calc(var(--navigation-rail-nav-rail-collapsed-nav-rail-collapsed-item-top-space, 44) * 1px) 0
15
+ calc(var(--navigation-rail-nav-rail-collapsed-nav-rail-collapsed-item-vertical-space, 4) * 1px);
16
+ box-sizing: border-box;
17
+ gap: calc(var(--navigation-rail-nav-rail-collapsed-nav-rail-collapsed-item-vertical-space, 4) * 1px);
18
+ background-color: var(--navigation-rail-nav-rail-collapsed-nav-rail-collapsed-container-color, #ebeef0);
19
+ border-radius: calc(var(--navigation-rail-nav-rail-collapsed-nav-rail-collapsed-container-shape, 0) * 1px);
20
+ color: var(--navigation-rail-nav-rail-item-vertical-nav-rail-item-vertical-text-color, #434749);
21
+ transition: width 280ms ease, min-width 280ms ease, padding 280ms ease;
22
+ }
23
+
24
+ .sidebar--show-labels {
25
+ align-items: stretch;
26
+ width: calc(var(--navigation-rail-nav-rail-expanded-nav-rail-expanded-container-width-minimum, 220) * 1px);
27
+ min-width: calc(var(--navigation-rail-nav-rail-expanded-nav-rail-expanded-container-width-minimum, 220) * 1px);
28
+ }
29
+
30
+ .sidebar__header,
31
+ .sidebar__footer {
32
+ display: flex;
33
+ justify-content: center;
34
+ padding-inline: calc(var(--navigation-rail-nav-rail-item-vertical-nav-rail-item-vertical-leading-space, 16) * 1px);
35
+ width: 100%;
36
+ }
37
+
38
+ .sidebar__header {
39
+ min-height: calc(var(--navigation-rail-nav-rail-item-common-nav-rail-item-header-space-minimum, 40) * 1px);
40
+ align-items: center;
41
+ }
42
+
43
+ .sidebar__header:empty,
44
+ .sidebar__footer:empty {
45
+ display: none;
46
+ }
47
+
48
+ .sidebar__nav {
49
+ flex: 1;
50
+ display: flex;
51
+ flex-direction: column;
52
+ width: 100%;
53
+ padding: 0 var(--padding-container-main, 16px) 0;
54
+ }
55
+
56
+ .sidebar__list {
57
+ list-style: none;
58
+ margin: 0;
59
+ padding: 0;
60
+ display: flex;
61
+ flex-direction: column;
62
+ align-items: center;
63
+ gap: calc(var(--navigation-rail-nav-rail-item-common-nav-rail-item-container-vertical-space, 6) * 1px);
64
+ }
65
+
66
+ .sidebar--show-labels .sidebar__list {
67
+ align-items: stretch;
68
+ }
69
+
70
+ .sidebar__item {
71
+ width: 100%;
72
+ display: flex;
73
+ align-items: center;
74
+ }
75
+
76
+ .sidebar--show-labels .sidebar__item {
77
+ justify-content: flex-start;
78
+ }
79
+
80
+ .sidebar__button {
81
+ position: relative;
82
+ display: flex;
83
+ justify-content: center;
84
+ width: auto;
85
+ max-width: 100%;
86
+ height: calc(var(--navigation-rail-nav-rail-item-common-nav-rail-item-container-height, 64) * 1px);
87
+ margin: 0;
88
+ padding-inline: 0;
89
+ padding-block: 0;
90
+ border: 0;
91
+ background: none;
92
+ cursor: pointer;
93
+ color: var(--navigation-rail-nav-rail-item-common-nav-rail-item-icon-color, #181c1e);
94
+ text-decoration: none;
95
+ transition:
96
+ color 180ms ease,
97
+ height 320ms ease,
98
+ max-width 320ms ease,
99
+ padding 320ms ease;
100
+ }
101
+
102
+ .sidebar__button--expanded {
103
+ align-self: center;
104
+ width: auto;
105
+ max-width: 100%;
106
+ height: calc(var(--navigation-rail-nav-rail-item-common-nav-rail-item-container-height, 64) * 1px);
107
+ justify-content: flex-start;
108
+ padding-inline: 0;
109
+ }
110
+
111
+ .sidebar__button:focus-visible {
112
+ outline: 2px solid var(--navigation-rail-nav-rail-item-common-nav-rail-item-focus-indicator, #5b5f61);
113
+ outline-offset: 4px;
114
+ }
115
+
116
+ .sidebar__button:disabled {
117
+ cursor: default;
118
+ opacity: 0.48;
119
+ }
120
+
121
+ .sidebar__active {
122
+ position: relative;
123
+ display: inline-flex;
124
+ align-items: center;
125
+ justify-content: center;
126
+ gap: calc(var(--navigation-rail-nav-rail-item-common-nav-rail-item-active-indicator-icon-label-space, 8) * 1px);
127
+ height: calc(var(--navigation-rail-nav-rail-item-vertical-nav-rail-item-vertical-active-indicator-height, 32) * 1px);
128
+ padding-inline: calc(var(--navigation-rail-nav-rail-item-common-nav-rail-item-active-indicator-leading-space, 16) * 1px)
129
+ calc(var(--navigation-rail-nav-rail-item-common-nav-rail-item-active-indicator-trailing-space, 16) * 1px);
130
+ border-radius: calc(var(--navigation-rail-nav-rail-item-common-nav-rail-item-active-indicator-shape, 1000) * 1px);
131
+ background-color: transparent;
132
+ transition:
133
+ background-color 180ms ease,
134
+ color 180ms ease,
135
+ gap 320ms cubic-bezier(0.4, 0, 0.2, 1),
136
+ padding 320ms cubic-bezier(0.4, 0, 0.2, 1),
137
+ width 320ms cubic-bezier(0.4, 0, 0.2, 1),
138
+ max-width 320ms cubic-bezier(0.4, 0, 0.2, 1);
139
+ max-width: calc(var(--navigation-rail-nav-rail-expanded-nav-rail-expanded-container-width-minimum, 220) * 1px);
140
+ overflow: hidden;
141
+ }
142
+
143
+ .sidebar__button--expanded .sidebar__active,
144
+ .sidebar__active--expanded {
145
+ width: auto;
146
+ max-width: 100%;
147
+ height: 100%;
148
+ align-items: center;
149
+ justify-content: flex-start;
150
+ padding-inline: calc(var(--navigation-rail-nav-rail-item-horizontal-nav-rail-item-horizontal-full-width-leading-space, 16) * 1px);
151
+ gap: calc(var(--navigation-rail-nav-rail-item-horizontal-nav-rail-item-horizontal-icon-label-space, 8) * 1px);
152
+ }
153
+
154
+ .sidebar__button:not(:disabled):hover .sidebar__active {
155
+ background-color: rgba(24, 28, 30, 0.08);
156
+ }
157
+
158
+ .sidebar__button:not(:disabled):active .sidebar__active {
159
+ background-color: rgba(24, 28, 30, 0.12);
160
+ }
161
+
162
+ .sidebar__button--selected .sidebar__active {
163
+ background-color: var(--navigation-rail-nav-rail-item-common-nav-rail-item-container-selected-color, #e42313);
164
+ color: var(--navigation-rail-nav-rail-item-common-nav-rail-item-icon-selected-color, #ffffff);
165
+ }
166
+
167
+ .sidebar__button--selected:not(:disabled):hover .sidebar__active {
168
+ background-color: rgba(228, 35, 19, 0.88);
169
+ }
170
+
171
+ .sidebar__button--selected:not(:disabled):active .sidebar__active {
172
+ background-color: rgba(228, 35, 19, 0.76);
173
+ }
174
+
175
+ .sidebar__icon {
176
+ display: flex;
177
+ align-items: center;
178
+ justify-content: center;
179
+ width: calc(var(--navigation-rail-nav-rail-item-common-nav-rail-item-icon-size, 24) * 1px);
180
+ height: calc(var(--navigation-rail-nav-rail-item-common-nav-rail-item-icon-size, 24) * 1px);
181
+ color: currentColor;
182
+ }
183
+
184
+ .sidebar__icon-svg,
185
+ .sidebar__icon-img {
186
+ width: 100%;
187
+ height: 100%;
188
+ }
189
+
190
+ .sidebar__icon-svg {
191
+ fill: currentColor;
192
+ }
193
+
194
+ .sidebar__icon-img {
195
+ object-fit: contain;
196
+ }
197
+
198
+ .sidebar__label {
199
+ flex: 1 1 auto;
200
+ min-width: 0;
201
+ font-size: 0.8125rem;
202
+ font-weight: 600;
203
+ letter-spacing: 0.01em;
204
+ line-height: 1.2;
205
+ color: inherit;
206
+ white-space: nowrap;
207
+ overflow: hidden;
208
+ text-overflow: ellipsis;
209
+ max-width: 100%;
210
+ transition: opacity 200ms ease;
211
+ }
212
+
213
+ .sidebar__accessory {
214
+ display: flex;
215
+ align-items: center;
216
+ justify-content: center;
217
+ width: 16px;
218
+ height: 16px;
219
+ margin-left: auto;
220
+ color: inherit;
221
+ }
222
+
223
+ .sidebar__accessory-svg,
224
+ .sidebar__accessory-img {
225
+ width: 100%;
226
+ height: 100%;
227
+ fill: currentColor;
228
+ }
229
+
230
+ .sidebar__footer {
231
+ margin-top: auto;
232
+ align-items: flex-end;
233
+ padding-bottom: calc(var(--navigation-rail-nav-rail-collapsed-nav-rail-collapsed-item-vertical-space, 4) * 1px);
234
+ }
@@ -0,0 +1,67 @@
1
+ <aside class="sidebar" role="navigation" aria-label="Navegación principal" [class.sidebar--show-labels]="hasLabels()">
2
+ <div class="sidebar__header">
3
+ <ng-content select="[sidebar-header]"></ng-content>
4
+ </div>
5
+
6
+ <nav class="sidebar__nav" aria-label="Secciones">
7
+ <ul class="sidebar__list">
8
+ @for (item of items(); track trackById($index, item)) {
9
+ <li
10
+ class="sidebar__item"
11
+ [class.sidebar__item--selected]="isSelected(item)"
12
+ [class.sidebar__item--disabled]="item.disabled"
13
+ >
14
+ <button
15
+ type="button"
16
+ class="sidebar__button"
17
+ [class.sidebar__button--expanded]="hasLabels()"
18
+ [class.sidebar__button--selected]="isSelected(item)"
19
+ [attr.aria-label]="item.ariaLabel ?? item.label"
20
+ [attr.aria-current]="isSelected(item) ? 'page' : null"
21
+ [attr.title]="shouldShowLabel(item) ? null : (item.ariaLabel || item.label)"
22
+ [disabled]="item.disabled"
23
+ (click)="onSelect(item)"
24
+ >
25
+ <span class="sidebar__active" [class.sidebar__active--expanded]="hasLabels()">
26
+ @if (iconRef(item); as iconSrc) {
27
+ <span class="sidebar__icon" aria-hidden="true">
28
+ <ng-container
29
+ [ngTemplateOutlet]="renderIcon"
30
+ [ngTemplateOutletContext]="{ $implicit: iconSrc, svgClass: 'sidebar__icon-svg', imgClass: 'sidebar__icon-img' }"
31
+ ></ng-container>
32
+ </span>
33
+ }
34
+
35
+ @if (shouldShowLabel(item)) {
36
+ <span class="sidebar__label">{{ item.label }}</span>
37
+ }
38
+
39
+ @if (accessoryRef(item); as accessorySrc) {
40
+ <span class="sidebar__accessory" aria-hidden="true">
41
+ <ng-container
42
+ [ngTemplateOutlet]="renderIcon"
43
+ [ngTemplateOutletContext]="{ $implicit: accessorySrc, svgClass: 'sidebar__accessory-svg', imgClass: 'sidebar__accessory-img' }"
44
+ ></ng-container>
45
+ </span>
46
+ }
47
+ </span>
48
+ </button>
49
+ </li>
50
+ }
51
+ </ul>
52
+ </nav>
53
+
54
+ <div class="sidebar__footer">
55
+ <ng-content select="[sidebar-footer]"></ng-content>
56
+ </div>
57
+
58
+ <ng-template #renderIcon let-src let-svgClass="svgClass" let-imgClass="imgClass">
59
+ @if (isSprite(src)) {
60
+ <svg [attr.class]="svgClass">
61
+ <use [attr.href]="src"></use>
62
+ </svg>
63
+ } @else {
64
+ <img [attr.class]="imgClass" [src]="src" alt="" />
65
+ }
66
+ </ng-template>
67
+ </aside>
@@ -0,0 +1,92 @@
1
+ import { ChangeDetectionStrategy, Component, EventEmitter, Output, computed, input } from '@angular/core';
2
+ import { NgTemplateOutlet } from '@angular/common';
3
+
4
+ export interface SidebarNavItem {
5
+ id: string;
6
+ label: string;
7
+ icon: string;
8
+ iconPath?: string;
9
+ accessoryIcon?: string;
10
+ accessoryIconPath?: string;
11
+ ariaLabel?: string;
12
+ disabled?: boolean;
13
+ }
14
+
15
+ @Component({
16
+ selector: 'lib-sidebar',
17
+ standalone: true,
18
+ imports: [NgTemplateOutlet],
19
+ templateUrl: './sidebar.html',
20
+ styleUrl: './sidebar.css',
21
+ changeDetection: ChangeDetectionStrategy.OnPush,
22
+ })
23
+ export class SidebarComponent {
24
+ readonly items = input<readonly SidebarNavItem[]>([]);
25
+ readonly selectedId = input<string | null>(null);
26
+ readonly showLabels = input(true);
27
+ readonly spritePath = input('assets/icons/sprite.svg');
28
+
29
+ @Output() readonly itemSelected = new EventEmitter<SidebarNavItem>();
30
+
31
+ protected readonly hasLabels = computed(() => this.showLabels() && this.items().some(({ label }) => !!label));
32
+
33
+ protected onSelect(item: SidebarNavItem): void {
34
+ if (item.disabled) {
35
+ return;
36
+ }
37
+
38
+ this.itemSelected.emit(item);
39
+ }
40
+
41
+ protected isSelected(item: SidebarNavItem): boolean {
42
+ return item.id === this.selectedId();
43
+ }
44
+
45
+ protected trackById(_index: number, item: SidebarNavItem): string {
46
+ return item.id;
47
+ }
48
+
49
+ protected iconHref(icon: string): string {
50
+ return `${this.spritePath()}#${icon}`;
51
+ }
52
+
53
+ protected accessoryHref(accessoryIcon: string): string {
54
+ return `${this.spritePath()}#${accessoryIcon}`;
55
+ }
56
+
57
+ protected iconRef(item: SidebarNavItem): string | null {
58
+ if (item.iconPath) {
59
+ return item.iconPath;
60
+ }
61
+
62
+ if (item.icon) {
63
+ return this.iconHref(item.icon);
64
+ }
65
+
66
+ return null;
67
+ }
68
+
69
+ protected accessoryRef(item: SidebarNavItem): string | null {
70
+ if (item.accessoryIconPath) {
71
+ return item.accessoryIconPath;
72
+ }
73
+
74
+ if (item.accessoryIcon) {
75
+ return this.accessoryHref(item.accessoryIcon);
76
+ }
77
+
78
+ return null;
79
+ }
80
+
81
+ protected isSprite(ref: string | null | undefined): ref is string {
82
+ return !!ref && ref.includes('#');
83
+ }
84
+
85
+ protected shouldShowLabel(item: SidebarNavItem): boolean {
86
+ if (!item.label) {
87
+ return false;
88
+ }
89
+
90
+ return this.showLabels();
91
+ }
92
+ }
@@ -0,0 +1,3 @@
1
+ <mat-slide-toggle [checked]="checked()" [hideIcon]="true" (change)="onChange($event)">
2
+ <ng-content></ng-content>
3
+ </mat-slide-toggle>
@@ -0,0 +1,18 @@
1
+ import { Component, input, output } from '@angular/core';
2
+ import { MatSlideToggleModule, MatSlideToggleChange } from '@angular/material/slide-toggle';
3
+
4
+ @Component({
5
+ selector: 'lib-slide-toggle, slide-toggle',
6
+ standalone: true,
7
+ imports: [MatSlideToggleModule],
8
+ templateUrl: './slide-toggle.html',
9
+ styleUrl: './slide-toggle.css',
10
+ })
11
+ export class SlideToggle {
12
+ checked = input(false);
13
+ checkedChange = output<boolean>();
14
+
15
+ onChange(event: MatSlideToggleChange) {
16
+ this.checkedChange.emit(event.checked);
17
+ }
18
+ }
@@ -0,0 +1,9 @@
1
+ :host {
2
+ display: inline-flex;
3
+ align-items: center;
4
+ justify-content: center;
5
+ }
6
+
7
+ :host ::ng-deep .lib-spinner {
8
+ --mdc-circular-progress-active-indicator-color: var(--lib-spinner-color, var(--Rojo-400, #e30613));
9
+ }
@@ -0,0 +1,9 @@
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
+
@@ -0,0 +1,17 @@
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
+
@@ -0,0 +1,32 @@
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
+ }
@@ -0,0 +1,3 @@
1
+ <div class="ui-tooltip" [ngClass]="classes()" [style.max-width]="maxWidth()">
2
+ <span class="ui-tooltip__text">{{ text() }}</span>
3
+ </div>
@@ -0,0 +1,31 @@
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
+ }
@@ -0,0 +1,8 @@
1
+ <svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <mask id="mask0_6882_6295" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="48" height="48">
3
+ <rect width="48" height="48" fill="#D9D9D9"/>
4
+ </mask>
5
+ <g mask="url(#mask0_6882_6295)">
6
+ <path d="M12 44C10.3333 44 8.91667 43.4167 7.75 42.25C6.58333 41.0833 6 39.6667 6 38V32H12V4L15 7L18 4L21 7L24 4L27 7L30 4L33 7L36 4L39 7L42 4V38C42 39.6667 41.4167 41.0833 40.25 42.25C39.0833 43.4167 37.6667 44 36 44H12ZM36 40C36.5667 40 37.0417 39.8083 37.425 39.425C37.8083 39.0417 38 38.5667 38 38V10H16V32H34V38C34 38.5667 34.1917 39.0417 34.575 39.425C34.9583 39.8083 35.4333 40 36 40ZM18 18V14H30V18H18ZM18 24V20H30V24H18ZM34 18C33.4333 18 32.9583 17.8083 32.575 17.425C32.1917 17.0417 32 16.5667 32 16C32 15.4333 32.1917 14.9583 32.575 14.575C32.9583 14.1917 33.4333 14 34 14C34.5667 14 35.0417 14.1917 35.425 14.575C35.8083 14.9583 36 15.4333 36 16C36 16.5667 35.8083 17.0417 35.425 17.425C35.0417 17.8083 34.5667 18 34 18ZM34 24C33.4333 24 32.9583 23.8083 32.575 23.425C32.1917 23.0417 32 22.5667 32 22C32 21.4333 32.1917 20.9583 32.575 20.575C32.9583 20.1917 33.4333 20 34 20C34.5667 20 35.0417 20.1917 35.425 20.575C35.8083 20.9583 36 21.4333 36 22C36 22.5667 35.8083 23.0417 35.425 23.425C35.0417 23.8083 34.5667 24 34 24ZM12 40H30V36H10V38C10 38.5667 10.1917 39.0417 10.575 39.425C10.9583 39.8083 11.4333 40 12 40Z" fill="#3E3E3E"/>
7
+ </g>
8
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M13 27H14.425L24.2 17.225L22.775 15.8L13 25.575V27ZM11 29V24.75L24.2 11.575C24.4 11.3917 24.6208 11.25 24.8625 11.15C25.1042 11.05 25.3583 11 25.625 11C25.8917 11 26.15 11.05 26.4 11.15C26.65 11.25 26.8667 11.4 27.05 11.6L28.425 13C28.625 13.1833 28.7708 13.4 28.8625 13.65C28.9542 13.9 29 14.15 29 14.4C29 14.6667 28.9542 14.9208 28.8625 15.1625C28.7708 15.4042 28.625 15.625 28.425 15.825L15.25 29H11ZM23.475 16.525L22.775 15.8L24.2 17.225L23.475 16.525Z" fill="#434749"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M4 32H6.85L26.4 12.45L23.55 9.6L4 29.15V32ZM0 36V27.5L26.4 1.15C26.8 0.783333 27.2417 0.5 27.725 0.3C28.2083 0.1 28.7167 0 29.25 0C29.7833 0 30.3 0.1 30.8 0.3C31.3 0.5 31.7333 0.8 32.1 1.2L34.85 4C35.25 4.36667 35.5417 4.8 35.725 5.3C35.9083 5.8 36 6.3 36 6.8C36 7.33333 35.9083 7.84167 35.725 8.325C35.5417 8.80833 35.25 9.25 34.85 9.65L8.5 36H0ZM24.95 11.05L23.55 9.6L26.4 12.45L24.95 11.05Z" fill="#3E3E3E"/>
3
+ </svg>
@@ -0,0 +1,8 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <mask id="mask0_1307_40" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="24" height="24">
3
+ <rect width="24" height="24" fill="#D9D9D9"/>
4
+ </mask>
5
+ <g mask="url(#mask0_1307_40)">
6
+ <path d="M8.4 17L12 13.4L15.6 17L17 15.6L13.4 12L17 8.4L15.6 7L12 10.6L8.4 7L7 8.4L10.6 12L7 15.6L8.4 17ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76667 19.225 7.875 17.675 6.325C16.125 4.775 14.2333 4 12 4C9.76667 4 7.875 4.775 6.325 6.325C4.775 7.875 4 9.76667 4 12C4 14.2333 4.775 16.125 6.325 17.675C7.875 19.225 9.76667 20 12 20Z" fill="#434749"/>
7
+ </g>
8
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="48" height="46" viewBox="0 0 48 46" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M12 46C10.3333 46 8.91667 45.4167 7.75 44.25C6.58333 43.0833 6 41.6667 6 40C6 38.3333 6.58333 36.9167 7.75 35.75C8.91667 34.5833 10.3333 34 12 34C12.4667 34 12.9 34.05 13.3 34.15C13.7 34.25 14.0833 34.3833 14.45 34.55L17.3 31C16.3667 29.9667 15.7167 28.8 15.35 27.5C14.9833 26.2 14.9 24.9 15.1 23.6L11.05 22.25C10.4833 23.0833 9.76667 23.75 8.9 24.25C8.03333 24.75 7.06667 25 6 25C4.33333 25 2.91667 24.4167 1.75 23.25C0.583333 22.0833 0 20.6667 0 19C0 17.3333 0.583333 15.9167 1.75 14.75C2.91667 13.5833 4.33333 13 6 13C7.66667 13 9.08333 13.5833 10.25 14.75C11.4167 15.9167 12 17.3333 12 19V19.4L16.05 20.8C16.7167 19.6 17.6083 18.5833 18.725 17.75C19.8417 16.9167 21.1 16.3833 22.5 16.15V11.8C21.2 11.4333 20.125 10.725 19.275 9.675C18.425 8.625 18 7.4 18 6C18 4.33333 18.5833 2.91667 19.75 1.75C20.9167 0.583333 22.3333 0 24 0C25.6667 0 27.0833 0.583333 28.25 1.75C29.4167 2.91667 30 4.33333 30 6C30 7.4 29.5667 8.625 28.7 9.675C27.8333 10.725 26.7667 11.4333 25.5 11.8V16.15C26.9 16.3833 28.1583 16.9167 29.275 17.75C30.3917 18.5833 31.2833 19.6 31.95 20.8L36 19.4V19C36 17.3333 36.5833 15.9167 37.75 14.75C38.9167 13.5833 40.3333 13 42 13C43.6667 13 45.0833 13.5833 46.25 14.75C47.4167 15.9167 48 17.3333 48 19C48 20.6667 47.4167 22.0833 46.25 23.25C45.0833 24.4167 43.6667 25 42 25C40.9333 25 39.9583 24.75 39.075 24.25C38.1917 23.75 37.4833 23.0833 36.95 22.25L32.9 23.6C33.1 24.9 33.0167 26.1917 32.65 27.475C32.2833 28.7583 31.6333 29.9333 30.7 31L33.55 34.5C33.9167 34.3333 34.3 34.2083 34.7 34.125C35.1 34.0417 35.5333 34 36 34C37.6667 34 39.0833 34.5833 40.25 35.75C41.4167 36.9167 42 38.3333 42 40C42 41.6667 41.4167 43.0833 40.25 44.25C39.0833 45.4167 37.6667 46 36 46C34.3333 46 32.9167 45.4167 31.75 44.25C30.5833 43.0833 30 41.6667 30 40C30 39.3333 30.1083 38.6917 30.325 38.075C30.5417 37.4583 30.8333 36.9 31.2 36.4L28.35 32.85C26.9833 33.6167 25.525 34 23.975 34C22.425 34 20.9667 33.6167 19.6 32.85L16.8 36.4C17.1667 36.9 17.4583 37.4583 17.675 38.075C17.8917 38.6917 18 39.3333 18 40C18 41.6667 17.4167 43.0833 16.25 44.25C15.0833 45.4167 13.6667 46 12 46ZM6 21C6.56667 21 7.04167 20.8083 7.425 20.425C7.80833 20.0417 8 19.5667 8 19C8 18.4333 7.80833 17.9583 7.425 17.575C7.04167 17.1917 6.56667 17 6 17C5.43333 17 4.95833 17.1917 4.575 17.575C4.19167 17.9583 4 18.4333 4 19C4 19.5667 4.19167 20.0417 4.575 20.425C4.95833 20.8083 5.43333 21 6 21ZM12 42C12.5667 42 13.0417 41.8083 13.425 41.425C13.8083 41.0417 14 40.5667 14 40C14 39.4333 13.8083 38.9583 13.425 38.575C13.0417 38.1917 12.5667 38 12 38C11.4333 38 10.9583 38.1917 10.575 38.575C10.1917 38.9583 10 39.4333 10 40C10 40.5667 10.1917 41.0417 10.575 41.425C10.9583 41.8083 11.4333 42 12 42ZM24 8C24.5667 8 25.0417 7.80833 25.425 7.425C25.8083 7.04167 26 6.56667 26 6C26 5.43333 25.8083 4.95833 25.425 4.575C25.0417 4.19167 24.5667 4 24 4C23.4333 4 22.9583 4.19167 22.575 4.575C22.1917 4.95833 22 5.43333 22 6C22 6.56667 22.1917 7.04167 22.575 7.425C22.9583 7.80833 23.4333 8 24 8ZM24 30C25.4 30 26.5833 29.5167 27.55 28.55C28.5167 27.5833 29 26.4 29 25C29 23.6 28.5167 22.4167 27.55 21.45C26.5833 20.4833 25.4 20 24 20C22.6 20 21.4167 20.4833 20.45 21.45C19.4833 22.4167 19 23.6 19 25C19 26.4 19.4833 27.5833 20.45 28.55C21.4167 29.5167 22.6 30 24 30ZM36 42C36.5667 42 37.0417 41.8083 37.425 41.425C37.8083 41.0417 38 40.5667 38 40C38 39.4333 37.8083 38.9583 37.425 38.575C37.0417 38.1917 36.5667 38 36 38C35.4333 38 34.9583 38.1917 34.575 38.575C34.1917 38.9583 34 39.4333 34 40C34 40.5667 34.1917 41.0417 34.575 41.425C34.9583 41.8083 35.4333 42 36 42ZM42 21C42.5667 21 43.0417 20.8083 43.425 20.425C43.8083 20.0417 44 19.5667 44 19C44 18.4333 43.8083 17.9583 43.425 17.575C43.0417 17.1917 42.5667 17 42 17C41.4333 17 40.9583 17.1917 40.575 17.575C40.1917 17.9583 40 18.4333 40 19C40 19.5667 40.1917 20.0417 40.575 20.425C40.9583 20.8083 41.4333 21 42 21Z" fill="white"/>
3
+ </svg>
@@ -0,0 +1,8 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <mask id="mask0_8126_1421" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="24" height="24">
3
+ <rect width="24" height="24" fill="#D9D9D9"/>
4
+ </mask>
5
+ <g mask="url(#mask0_8126_1421)">
6
+ <path d="M3 18V16H21V18H3ZM3 13V11H21V13H3ZM3 8V6H21V8H3Z" fill="#181C1E"/>
7
+ </g>
8
+ </svg>
@@ -0,0 +1,8 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <mask id="mask0_1307_212" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="24" height="24">
3
+ <rect width="24" height="24" fill="#D9D9D9"/>
4
+ </mask>
5
+ <g mask="url(#mask0_1307_212)">
6
+ <path d="M12 17C12.2833 17 12.5208 16.9042 12.7125 16.7125C12.9042 16.5208 13 16.2833 13 16C13 15.7167 12.9042 15.4792 12.7125 15.2875C12.5208 15.0958 12.2833 15 12 15C11.7167 15 11.4792 15.0958 11.2875 15.2875C11.0958 15.4792 11 15.7167 11 16C11 16.2833 11.0958 16.5208 11.2875 16.7125C11.4792 16.9042 11.7167 17 12 17ZM11 13H13V7H11V13ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22Z" fill="#FF4965"/>
7
+ </g>
8
+ </svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"/></svg>
File without changes
File without changes
File without changes
File without changes
File without changes