@caribeng/ui 22.1.1 → 22.4.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.
- package/README.md +134 -12
- package/fesm2022/caribeng-ui-accordion.mjs +4 -4
- package/fesm2022/caribeng-ui-anchor.mjs +169 -0
- package/fesm2022/caribeng-ui-autocomplete.mjs +10 -8
- package/fesm2022/caribeng-ui-avatar.mjs +2 -2
- package/fesm2022/caribeng-ui-avatargroup.mjs +9 -3
- package/fesm2022/caribeng-ui-badge.mjs +8 -2
- package/fesm2022/caribeng-ui-blockui.mjs +12 -4
- package/fesm2022/caribeng-ui-breadcrumb.mjs +17 -7
- package/fesm2022/caribeng-ui-button.mjs +22 -2
- package/fesm2022/caribeng-ui-caribe-alert.mjs +5 -2
- package/fesm2022/caribeng-ui-caribe-animation-lottie.mjs +6 -3
- package/fesm2022/caribeng-ui-caribe-button-group.mjs +6 -3
- package/fesm2022/caribeng-ui-caribe-calendar.mjs +11 -6
- package/fesm2022/caribeng-ui-caribe-card-content.mjs +6 -3
- package/fesm2022/caribeng-ui-caribe-card-move.mjs +29 -7
- package/fesm2022/caribeng-ui-caribe-card-select.mjs +56 -14
- package/fesm2022/caribeng-ui-caribe-circle-loading.mjs +10 -7
- package/fesm2022/caribeng-ui-caribe-coachmark.mjs +42 -19
- package/fesm2022/caribeng-ui-caribe-data-table.mjs +15 -9
- package/fesm2022/caribeng-ui-caribe-dots-indicator.mjs +38 -5
- package/fesm2022/caribeng-ui-caribe-expansion-panel.mjs +16 -5
- package/fesm2022/caribeng-ui-caribe-fab-menu.mjs +56 -7
- package/fesm2022/caribeng-ui-caribe-file-download.mjs +68 -27
- package/fesm2022/caribeng-ui-caribe-file-select.mjs +22 -17
- package/fesm2022/caribeng-ui-caribe-float-menu.mjs +6 -3
- package/fesm2022/caribeng-ui-caribe-footer.mjs +8 -4
- package/fesm2022/caribeng-ui-caribe-header.mjs +6 -3
- package/fesm2022/caribeng-ui-caribe-icon-button.mjs +6 -3
- package/fesm2022/caribeng-ui-caribe-illustration.mjs +6 -3
- package/fesm2022/caribeng-ui-caribe-inline-alert.mjs +5 -2
- package/fesm2022/caribeng-ui-caribe-input-search.mjs +14 -10
- package/fesm2022/caribeng-ui-caribe-input-select.mjs +12 -10
- package/fesm2022/caribeng-ui-caribe-input-token.mjs +61 -11
- package/fesm2022/caribeng-ui-caribe-link.mjs +7 -2
- package/fesm2022/caribeng-ui-caribe-loader.mjs +8 -5
- package/fesm2022/caribeng-ui-caribe-modal.mjs +32 -16
- package/fesm2022/caribeng-ui-caribe-off-canvas.mjs +26 -12
- package/fesm2022/caribeng-ui-caribe-onboarding.mjs +44 -19
- package/fesm2022/caribeng-ui-caribe-pictogram.mjs +6 -3
- package/fesm2022/caribeng-ui-caribe-pop-over.mjs +34 -10
- package/fesm2022/caribeng-ui-caribe-preloader.mjs +9 -6
- package/fesm2022/caribeng-ui-caribe-progress-bar.mjs +5 -2
- package/fesm2022/caribeng-ui-caribe-shortcut.mjs +8 -3
- package/fesm2022/caribeng-ui-caribe-step-indicator.mjs +12 -5
- package/fesm2022/caribeng-ui-caribe-stroke.mjs +6 -3
- package/fesm2022/caribeng-ui-caribe-switch.mjs +5 -3
- package/fesm2022/caribeng-ui-caribe-tag-button.mjs +1 -1
- package/fesm2022/caribeng-ui-caribe-tracker.mjs +5 -2
- package/fesm2022/caribeng-ui-caribe-transaction-status.mjs +1 -1
- package/fesm2022/caribeng-ui-caribe-voucher.mjs +11 -8
- package/fesm2022/caribeng-ui-carousel.mjs +49 -14
- package/fesm2022/caribeng-ui-cascadeselect.mjs +22 -8
- package/fesm2022/caribeng-ui-chart.mjs +2601 -303
- package/fesm2022/caribeng-ui-chat.mjs +1303 -0
- package/fesm2022/caribeng-ui-chip.mjs +9 -4
- package/fesm2022/caribeng-ui-chips.mjs +9 -5
- package/fesm2022/caribeng-ui-code-block.mjs +332 -0
- package/fesm2022/caribeng-ui-colorpicker.mjs +107 -11
- package/fesm2022/caribeng-ui-command-palette.mjs +476 -0
- package/fesm2022/caribeng-ui-confirmdialog.mjs +140 -10
- package/fesm2022/caribeng-ui-confirmpopup.mjs +209 -9
- package/fesm2022/caribeng-ui-contextmenu.mjs +13 -6
- package/fesm2022/caribeng-ui-copy-button.mjs +230 -0
- package/fesm2022/caribeng-ui-dataview.mjs +214 -6
- package/fesm2022/caribeng-ui-datepicker.mjs +1630 -393
- package/fesm2022/caribeng-ui-descriptions.mjs +124 -0
- package/fesm2022/caribeng-ui-dialog.mjs +10 -7
- package/fesm2022/caribeng-ui-dock.mjs +58 -15
- package/fesm2022/caribeng-ui-drawer.mjs +17 -9
- package/fesm2022/caribeng-ui-dynamicdialog.mjs +210 -6
- package/fesm2022/caribeng-ui-editor.mjs +4413 -243
- package/fesm2022/caribeng-ui-empty.mjs +80 -0
- package/fesm2022/caribeng-ui-fieldset.mjs +2 -2
- package/fesm2022/caribeng-ui-file-card.mjs +136 -19
- package/fesm2022/caribeng-ui-fileupload.mjs +96 -19
- package/fesm2022/caribeng-ui-floatlabel.mjs +4 -2
- package/fesm2022/caribeng-ui-folder-card.mjs +132 -15
- package/fesm2022/caribeng-ui-galleria.mjs +76 -45
- package/fesm2022/caribeng-ui-image.mjs +52 -29
- package/fesm2022/caribeng-ui-inlinemessage.mjs +2 -2
- package/fesm2022/caribeng-ui-inplace.mjs +22 -6
- package/fesm2022/caribeng-ui-input-number.mjs +9 -7
- package/fesm2022/caribeng-ui-inputgroup.mjs +2 -2
- package/fesm2022/caribeng-ui-inputmask.mjs +22 -13
- package/fesm2022/caribeng-ui-inputotp.mjs +12 -6
- package/fesm2022/caribeng-ui-kanban.mjs +4612 -0
- package/fesm2022/caribeng-ui-kbd.mjs +122 -0
- package/fesm2022/caribeng-ui-keyfilter.mjs +72 -0
- package/fesm2022/caribeng-ui-listbox.mjs +13 -11
- package/fesm2022/caribeng-ui-megamenu.mjs +228 -32
- package/fesm2022/caribeng-ui-mentions.mjs +495 -0
- package/fesm2022/caribeng-ui-menu.mjs +18 -8
- package/fesm2022/caribeng-ui-menubar.mjs +17 -8
- package/fesm2022/caribeng-ui-message.mjs +13 -7
- package/fesm2022/caribeng-ui-metergroup.mjs +29 -11
- package/fesm2022/caribeng-ui-multiselect.mjs +399 -97
- package/fesm2022/caribeng-ui-orderlist.mjs +230 -11
- package/fesm2022/caribeng-ui-organizationchart.mjs +16 -15
- package/fesm2022/caribeng-ui-paginator.mjs +18 -15
- package/fesm2022/caribeng-ui-panel.mjs +11 -8
- package/fesm2022/caribeng-ui-panelmenu.mjs +14 -8
- package/fesm2022/caribeng-ui-password.mjs +8 -6
- package/fesm2022/caribeng-ui-pdfviewer.mjs +1553 -0
- package/fesm2022/caribeng-ui-phone-input.mjs +688 -0
- package/fesm2022/caribeng-ui-picklist.mjs +251 -14
- package/fesm2022/caribeng-ui-pricing.mjs +272 -75
- package/fesm2022/caribeng-ui-qrcode.mjs +564 -0
- package/fesm2022/caribeng-ui-rating.mjs +7 -3
- package/fesm2022/caribeng-ui-repeater.mjs +223 -0
- package/fesm2022/caribeng-ui-result.mjs +91 -0
- package/fesm2022/caribeng-ui-ripple.mjs +2 -0
- package/fesm2022/caribeng-ui-scrollpanel.mjs +6 -3
- package/fesm2022/caribeng-ui-scrolltop.mjs +9 -4
- package/fesm2022/caribeng-ui-select.mjs +379 -87
- package/fesm2022/caribeng-ui-selectbutton.mjs +2 -2
- package/fesm2022/caribeng-ui-sidebar.mjs +573 -0
- package/fesm2022/caribeng-ui-slider.mjs +171 -75
- package/fesm2022/caribeng-ui-speeddial.mjs +7 -4
- package/fesm2022/caribeng-ui-spinner.mjs +5 -2
- package/fesm2022/caribeng-ui-splitbutton.mjs +163 -0
- package/fesm2022/caribeng-ui-splitter.mjs +5 -2
- package/fesm2022/caribeng-ui-statistic.mjs +183 -0
- package/fesm2022/caribeng-ui-stepper.mjs +17 -7
- package/fesm2022/caribeng-ui-steps.mjs +6 -3
- package/fesm2022/caribeng-ui-table.mjs +716 -84
- package/fesm2022/caribeng-ui-tabmenu.mjs +13 -6
- package/fesm2022/caribeng-ui-tag.mjs +2 -2
- package/fesm2022/caribeng-ui-terminal.mjs +45 -9
- package/fesm2022/caribeng-ui-themetoggle.mjs +82 -0
- package/fesm2022/caribeng-ui-tieredmenu.mjs +113 -20
- package/fesm2022/caribeng-ui-timeline.mjs +175 -6
- package/fesm2022/caribeng-ui-toast.mjs +7 -4
- package/fesm2022/caribeng-ui-togglebutton.mjs +8 -6
- package/fesm2022/caribeng-ui-toolbar.mjs +6 -3
- package/fesm2022/caribeng-ui-tree.mjs +302 -6
- package/fesm2022/caribeng-ui-treeselect.mjs +26 -10
- package/fesm2022/caribeng-ui-treetable.mjs +269 -6
- package/fesm2022/caribeng-ui-virtualscroller.mjs +123 -10
- package/fesm2022/caribeng-ui.mjs +1216 -6
- package/package.json +93 -3
- package/schematics/collection.json +15 -0
- package/schematics/migrate-from-primeng/core-icons.json +1 -0
- package/schematics/migrate-from-primeng/icons.js +269 -0
- package/schematics/migrate-from-primeng/index.js +290 -0
- package/schematics/migrate-from-primeng/mappings/button.js +93 -0
- package/schematics/migrate-from-primeng/mappings/card.js +33 -0
- package/schematics/migrate-from-primeng/mappings/checkbox.js +44 -0
- package/schematics/migrate-from-primeng/mappings/confirm.js +221 -0
- package/schematics/migrate-from-primeng/mappings/datepicker.js +121 -0
- package/schematics/migrate-from-primeng/mappings/dialog.js +84 -0
- package/schematics/migrate-from-primeng/mappings/index.js +88 -0
- package/schematics/migrate-from-primeng/mappings/inputnumber.js +62 -0
- package/schematics/migrate-from-primeng/mappings/inputtext.js +60 -0
- package/schematics/migrate-from-primeng/mappings/menu.js +468 -0
- package/schematics/migrate-from-primeng/mappings/multiselect.js +49 -0
- package/schematics/migrate-from-primeng/mappings/radiobutton.js +22 -0
- package/schematics/migrate-from-primeng/mappings/rules.js +206 -0
- package/schematics/migrate-from-primeng/mappings/select.js +97 -0
- package/schematics/migrate-from-primeng/mappings/service-calls.js +100 -0
- package/schematics/migrate-from-primeng/mappings/table.js +613 -0
- package/schematics/migrate-from-primeng/mappings/tabs.js +225 -0
- package/schematics/migrate-from-primeng/mappings/tag.js +29 -0
- package/schematics/migrate-from-primeng/mappings/textarea.js +44 -0
- package/schematics/migrate-from-primeng/mappings/toast.js +173 -0
- package/schematics/migrate-from-primeng/mappings/toggleswitch.js +37 -0
- package/schematics/migrate-from-primeng/mappings/tooltip.js +44 -0
- package/schematics/migrate-from-primeng/mappings/types.js +10 -0
- package/schematics/migrate-from-primeng/report.js +79 -0
- package/schematics/migrate-from-primeng/schema.js +2 -0
- package/schematics/migrate-from-primeng/schema.json +34 -0
- package/schematics/migrate-from-primeng/template.js +387 -0
- package/schematics/migrate-from-primeng/todo.js +5 -0
- package/schematics/migrate-from-primeng/typescript.js +442 -0
- package/schematics/migrate-from-primeng/workspace.js +117 -0
- package/schematics/ng-add/index.js +140 -0
- package/schematics/ng-add/schema.js +2 -0
- package/schematics/ng-add/schema.json +66 -0
- package/types/caribeng-ui-anchor.d.ts +50 -0
- package/types/caribeng-ui-autocomplete.d.ts +4 -2
- package/types/caribeng-ui-avatargroup.d.ts +3 -1
- package/types/caribeng-ui-badge.d.ts +3 -1
- package/types/caribeng-ui-blockui.d.ts +9 -4
- package/types/caribeng-ui-breadcrumb.d.ts +11 -0
- package/types/caribeng-ui-button.d.ts +9 -1
- package/types/caribeng-ui-caribe-alert.d.ts +3 -0
- package/types/caribeng-ui-caribe-animation-lottie.d.ts +4 -1
- package/types/caribeng-ui-caribe-button-group.d.ts +4 -1
- package/types/caribeng-ui-caribe-calendar.d.ts +5 -1
- package/types/caribeng-ui-caribe-card-content.d.ts +4 -1
- package/types/caribeng-ui-caribe-card-move.d.ts +13 -13
- package/types/caribeng-ui-caribe-card-select.d.ts +10 -1
- package/types/caribeng-ui-caribe-circle-loading.d.ts +4 -1
- package/types/caribeng-ui-caribe-coachmark.d.ts +6 -0
- package/types/caribeng-ui-caribe-data-table.d.ts +7 -2
- package/types/caribeng-ui-caribe-dots-indicator.d.ts +9 -0
- package/types/caribeng-ui-caribe-expansion-panel.d.ts +7 -10
- package/types/caribeng-ui-caribe-fab-menu.d.ts +10 -1
- package/types/caribeng-ui-caribe-file-download.d.ts +8 -10
- package/types/caribeng-ui-caribe-file-select.d.ts +7 -1
- package/types/caribeng-ui-caribe-float-menu.d.ts +4 -1
- package/types/caribeng-ui-caribe-header.d.ts +3 -0
- package/types/caribeng-ui-caribe-icon-button.d.ts +4 -1
- package/types/caribeng-ui-caribe-illustration.d.ts +4 -1
- package/types/caribeng-ui-caribe-inline-alert.d.ts +3 -0
- package/types/caribeng-ui-caribe-input-search.d.ts +4 -2
- package/types/caribeng-ui-caribe-input-select.d.ts +4 -2
- package/types/caribeng-ui-caribe-input-token.d.ts +16 -1
- package/types/caribeng-ui-caribe-link.d.ts +3 -0
- package/types/caribeng-ui-caribe-loader.d.ts +4 -1
- package/types/caribeng-ui-caribe-modal.d.ts +7 -10
- package/types/caribeng-ui-caribe-off-canvas.d.ts +6 -1
- package/types/caribeng-ui-caribe-onboarding.d.ts +6 -0
- package/types/caribeng-ui-caribe-pictogram.d.ts +4 -1
- package/types/caribeng-ui-caribe-pop-over.d.ts +7 -10
- package/types/caribeng-ui-caribe-preloader.d.ts +4 -1
- package/types/caribeng-ui-caribe-progress-bar.d.ts +3 -0
- package/types/caribeng-ui-caribe-shortcut.d.ts +3 -1
- package/types/caribeng-ui-caribe-step-indicator.d.ts +6 -0
- package/types/caribeng-ui-caribe-stroke.d.ts +4 -1
- package/types/caribeng-ui-caribe-switch.d.ts +3 -1
- package/types/caribeng-ui-caribe-tracker.d.ts +3 -0
- package/types/caribeng-ui-caribe-voucher.d.ts +5 -2
- package/types/caribeng-ui-carousel.d.ts +10 -1
- package/types/caribeng-ui-cascadeselect.d.ts +7 -2
- package/types/caribeng-ui-chart.d.ts +471 -44
- package/types/caribeng-ui-chat.d.ts +299 -0
- package/types/caribeng-ui-chip.d.ts +6 -0
- package/types/caribeng-ui-chips.d.ts +6 -2
- package/types/caribeng-ui-code-block.d.ts +65 -0
- package/types/caribeng-ui-colorpicker.d.ts +8 -2
- package/types/caribeng-ui-command-palette.d.ts +133 -0
- package/types/caribeng-ui-confirmdialog.d.ts +57 -6
- package/types/caribeng-ui-confirmpopup.d.ts +74 -5
- package/types/caribeng-ui-contextmenu.d.ts +11 -1
- package/types/caribeng-ui-copy-button.d.ts +90 -0
- package/types/caribeng-ui-dataview.d.ts +65 -5
- package/types/caribeng-ui-datepicker.d.ts +186 -21
- package/types/caribeng-ui-descriptions.d.ts +63 -0
- package/types/caribeng-ui-dialog.d.ts +4 -1
- package/types/caribeng-ui-dock.d.ts +17 -2
- package/types/caribeng-ui-drawer.d.ts +7 -2
- package/types/caribeng-ui-dynamicdialog.d.ts +93 -3
- package/types/caribeng-ui-editor.d.ts +486 -13
- package/types/caribeng-ui-empty.d.ts +34 -0
- package/types/caribeng-ui-file-card.d.ts +28 -3
- package/types/caribeng-ui-fileupload.d.ts +27 -4
- package/types/caribeng-ui-folder-card.d.ts +31 -6
- package/types/caribeng-ui-galleria.d.ts +9 -0
- package/types/caribeng-ui-image.d.ts +10 -0
- package/types/caribeng-ui-inplace.d.ts +8 -0
- package/types/caribeng-ui-input-number.d.ts +3 -1
- package/types/caribeng-ui-inputmask.d.ts +8 -1
- package/types/caribeng-ui-inputotp.d.ts +7 -2
- package/types/caribeng-ui-kanban.d.ts +783 -0
- package/types/caribeng-ui-kbd.d.ts +36 -0
- package/types/caribeng-ui-keyfilter.d.ts +30 -0
- package/types/caribeng-ui-listbox.d.ts +5 -3
- package/types/caribeng-ui-megamenu.d.ts +37 -2
- package/types/caribeng-ui-mentions.d.ts +127 -0
- package/types/caribeng-ui-menu.d.ts +14 -2
- package/types/caribeng-ui-menubar.d.ts +12 -1
- package/types/caribeng-ui-message.d.ts +5 -0
- package/types/caribeng-ui-metergroup.d.ts +9 -1
- package/types/caribeng-ui-multiselect.d.ts +71 -10
- package/types/caribeng-ui-orderlist.d.ts +58 -6
- package/types/caribeng-ui-organizationchart.d.ts +7 -1
- package/types/caribeng-ui-paginator.d.ts +3 -0
- package/types/caribeng-ui-panel.d.ts +3 -0
- package/types/caribeng-ui-panelmenu.d.ts +11 -1
- package/types/caribeng-ui-password.d.ts +4 -2
- package/types/caribeng-ui-pdfviewer.d.ts +258 -0
- package/types/caribeng-ui-phone-input.d.ts +168 -0
- package/types/caribeng-ui-picklist.d.ts +67 -7
- package/types/caribeng-ui-pricing.d.ts +49 -9
- package/types/caribeng-ui-qrcode.d.ts +88 -0
- package/types/caribeng-ui-rating.d.ts +6 -2
- package/types/caribeng-ui-repeater.d.ts +79 -0
- package/types/caribeng-ui-result.d.ts +35 -0
- package/types/caribeng-ui-scrollpanel.d.ts +4 -1
- package/types/caribeng-ui-scrolltop.d.ts +4 -1
- package/types/caribeng-ui-select.d.ts +73 -9
- package/types/caribeng-ui-sidebar.d.ts +167 -0
- package/types/caribeng-ui-slider.d.ts +63 -10
- package/types/caribeng-ui-speeddial.d.ts +5 -2
- package/types/caribeng-ui-spinner.d.ts +3 -0
- package/types/caribeng-ui-splitbutton.d.ts +49 -0
- package/types/caribeng-ui-splitter.d.ts +3 -0
- package/types/caribeng-ui-statistic.d.ts +65 -0
- package/types/caribeng-ui-stepper.d.ts +5 -0
- package/types/caribeng-ui-steps.d.ts +4 -1
- package/types/caribeng-ui-table.d.ts +185 -17
- package/types/caribeng-ui-tabmenu.d.ts +11 -1
- package/types/caribeng-ui-terminal.d.ts +10 -0
- package/types/caribeng-ui-themetoggle.d.ts +32 -0
- package/types/caribeng-ui-tieredmenu.d.ts +22 -3
- package/types/caribeng-ui-timeline.d.ts +63 -4
- package/types/caribeng-ui-toast.d.ts +3 -0
- package/types/caribeng-ui-togglebutton.d.ts +5 -3
- package/types/caribeng-ui-toolbar.d.ts +7 -4
- package/types/caribeng-ui-tree.d.ts +76 -4
- package/types/caribeng-ui-treeselect.d.ts +10 -2
- package/types/caribeng-ui-treetable.d.ts +68 -4
- package/types/caribeng-ui-virtualscroller.d.ts +45 -5
- package/types/caribeng-ui.d.ts +775 -12
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { input, model, output, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { injectCbTranslation, cbFormat } from '@caribeng/ui';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Onboarding de Caribe Design: panel de bienvenida paso a paso con progreso y
|
|
@@ -12,6 +13,10 @@ import { input, model, output, ViewEncapsulation, ChangeDetectionStrategy, Compo
|
|
|
12
13
|
*/
|
|
13
14
|
class CbOnboarding {
|
|
14
15
|
constructor() {
|
|
16
|
+
/** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
|
|
17
|
+
this.t = injectCbTranslation();
|
|
18
|
+
/** Rellena `{0}`, `{1}`… de un texto traducido. */
|
|
19
|
+
this.fmt = cbFormat;
|
|
15
20
|
this.steps = input([], /* @ts-ignore */
|
|
16
21
|
...(ngDevMode ? [{ debugName: "steps" }] : /* istanbul ignore next */ []));
|
|
17
22
|
this.visible = model(true, /* @ts-ignore */
|
|
@@ -21,7 +26,9 @@ class CbOnboarding {
|
|
|
21
26
|
this.currentStepIndex = output();
|
|
22
27
|
}
|
|
23
28
|
previous() {
|
|
24
|
-
this.index
|
|
29
|
+
if (this.index() === 0)
|
|
30
|
+
return;
|
|
31
|
+
this.index.update((i) => i - 1);
|
|
25
32
|
this.currentStepIndex.emit(this.index());
|
|
26
33
|
}
|
|
27
34
|
next() {
|
|
@@ -36,7 +43,12 @@ class CbOnboarding {
|
|
|
36
43
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbOnboarding, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
37
44
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: CbOnboarding, isStandalone: true, selector: "cb-onboarding", inputs: { steps: { classPropertyName: "steps", publicName: "steps", isSignal: true, isRequired: false, transformFunction: null }, visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visible: "visibleChange", index: "indexChange", currentStepIndex: "currentStepIndex" }, ngImport: i0, template: `
|
|
38
45
|
@if (visible() && steps().length) {
|
|
39
|
-
<section
|
|
46
|
+
<section
|
|
47
|
+
class="cb-onboarding"
|
|
48
|
+
role="dialog"
|
|
49
|
+
[attr.aria-label]="t().onboarding"
|
|
50
|
+
(keydown.escape)="visible.set(false)"
|
|
51
|
+
>
|
|
40
52
|
<div class="cb-onboarding__dots" aria-hidden="true">
|
|
41
53
|
@for (step of steps(); track $index) {
|
|
42
54
|
<span
|
|
@@ -45,10 +57,14 @@ class CbOnboarding {
|
|
|
45
57
|
></span>
|
|
46
58
|
}
|
|
47
59
|
</div>
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
60
|
+
<!-- Región viva: al cambiar de paso se anuncian el contador y el título. -->
|
|
61
|
+
<div class="cb-onboarding__announce" aria-live="polite" aria-atomic="true">
|
|
62
|
+
<span class="cb-onboarding__counter" aria-hidden="true">
|
|
63
|
+
{{ index() + 1 }} / {{ steps().length }}
|
|
64
|
+
</span>
|
|
65
|
+
<span class="cb-onboarding__sr">{{ fmt(t().stepOf, index() + 1, steps().length) }}</span>
|
|
66
|
+
<h2 class="cb-onboarding__title">{{ steps()[index()] }}</h2>
|
|
67
|
+
</div>
|
|
52
68
|
<div class="cb-onboarding__body"><ng-content /></div>
|
|
53
69
|
<div class="cb-onboarding__actions">
|
|
54
70
|
<button
|
|
@@ -56,7 +72,7 @@ class CbOnboarding {
|
|
|
56
72
|
class="cb-onboarding__btn cb-onboarding__btn--ghost"
|
|
57
73
|
(click)="visible.set(false)"
|
|
58
74
|
>
|
|
59
|
-
|
|
75
|
+
{{ t().skip }}
|
|
60
76
|
</button>
|
|
61
77
|
<button
|
|
62
78
|
type="button"
|
|
@@ -64,25 +80,30 @@ class CbOnboarding {
|
|
|
64
80
|
(click)="previous()"
|
|
65
81
|
[disabled]="index() === 0"
|
|
66
82
|
>
|
|
67
|
-
|
|
83
|
+
{{ t().previous }}
|
|
68
84
|
</button>
|
|
69
85
|
<button
|
|
70
86
|
type="button"
|
|
71
87
|
class="cb-onboarding__btn cb-onboarding__btn--primary"
|
|
72
88
|
(click)="next()"
|
|
73
89
|
>
|
|
74
|
-
{{ index() === steps().length - 1 ?
|
|
90
|
+
{{ index() === steps().length - 1 ? t().start : t().continue }}
|
|
75
91
|
</button>
|
|
76
92
|
</div>
|
|
77
93
|
</section>
|
|
78
94
|
}
|
|
79
|
-
`, isInline: true, styles: [":host{display:block;width:100%;max-width:24rem}.cb-onboarding{display:flex;flex-direction:column;gap:var(--cb-space-3, .75rem);box-sizing:border-box;padding:var(--cb-space-6, 1.5rem);font-family:var(--cb-font-sans, inherit);color:var(--cb-color-text-strong, #0f172a);background-color:var(--cb-color-surface-0, #ffffff);border:1px solid var(--cb-color-border, #e2e8f0);border-radius:var(--cb-radius-lg, .75rem);box-shadow:var(--cb-shadow-md, 0 8px 24px rgba(0, 0, 0, .12));text-align:center}.cb-onboarding__dots{display:flex;justify-content:center;gap:var(--cb-space-1, .3rem)}.cb-onboarding__dot{width:.5rem;height:.5rem;border-radius:var(--cb-radius-full, 999px);background-color:var(--cb-color-surface-300, #cbd5e1);transition:all var(--cb-duration-normal, .2s) var(--cb-ease, ease)}.cb-onboarding__dot.cb-is-active{width:1.25rem;background-color:var(--cb-color-primary-500, #10b981)}.cb-onboarding__counter{font-size:var(--cb-text-xs, .75rem);font-weight:var(--cb-font-weight-semibold, 600);color:var(--cb-color-text-muted, #64748b)}.cb-onboarding__title{margin:0;font-size:var(--cb-text-xl, 1.25rem);font-weight:var(--cb-font-weight-bold, 700)}.cb-onboarding__body{font-size:var(--cb-text-sm, .875rem);color:var(--cb-color-text, #334155);line-height:var(--cb-line-height-relaxed, 1.6)}.cb-onboarding__body:empty{display:none}.cb-onboarding__actions{display:flex;justify-content:center;gap:var(--cb-space-2, .5rem);margin-top:var(--cb-space-2, .5rem)}.cb-onboarding__btn{padding:var(--cb-space-2, .5rem) var(--cb-space-4, 1rem);font:inherit;font-size:var(--cb-text-sm, .875rem);font-weight:var(--cb-font-weight-semibold, 600);color:var(--cb-color-text-strong, #0f172a);background-color:var(--cb-color-surface-100, #f1f5f9);border:none;border-radius:var(--cb-radius-md, .5rem);cursor:pointer;transition:background-color var(--cb-duration-fast, .12s) var(--cb-ease, ease)}.cb-onboarding__btn:hover:not(:disabled){background-color:var(--cb-color-surface-200, #e2e8f0)}.cb-onboarding__btn:disabled{opacity:.4;cursor:not-allowed}.cb-onboarding__btn--ghost{background-color:transparent;color:var(--cb-color-text-muted, #64748b)}.cb-onboarding__btn--primary{color:var(--cb-color-primary-contrast, #ffffff);background-color:var(--cb-color-primary-600, #047857)}.cb-onboarding__btn--primary:hover:not(:disabled){background-color:var(--cb-color-primary-700, #065f46)}:host-context([data-theme=\"dark\"]) .cb-onboarding{color:var(--cb-color-surface-0, #f8fafc);background-color:var(--cb-color-surface-800, #1e293b);border-color:var(--cb-color-surface-600, #475569)}:host-context([data-theme=\"dark\"]) .cb-onboarding__body{color:var(--cb-color-surface-200, #e2e8f0)}:host-context([data-theme=\"dark\"]) .cb-onboarding__btn{color:var(--cb-color-surface-0, #f8fafc);background-color:var(--cb-color-surface-700, #334155)}:host-context([data-theme=\"dark\"]) .cb-onboarding__btn--ghost{background-color:transparent;color:var(--cb-color-surface-300, #cbd5e1)}:host-context([data-theme=\"dark\"]) .cb-onboarding__btn--primary{background-color:var(--cb-color-primary-500, #10b981)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
95
|
+
`, isInline: true, styles: [":host{display:block;width:100%;max-width:24rem}.cb-onboarding{display:flex;flex-direction:column;gap:var(--cb-space-3, .75rem);box-sizing:border-box;padding:var(--cb-space-6, 1.5rem);font-family:var(--cb-font-sans, inherit);color:var(--cb-color-text-strong, #0f172a);background-color:var(--cb-color-surface-0, #ffffff);border:1px solid var(--cb-color-border, #e2e8f0);border-radius:var(--cb-radius-lg, .75rem);box-shadow:var(--cb-shadow-md, 0 8px 24px rgba(0, 0, 0, .12));text-align:center}.cb-onboarding__dots{display:flex;justify-content:center;gap:var(--cb-space-1, .3rem)}.cb-onboarding__dot{width:.5rem;height:.5rem;border-radius:var(--cb-radius-full, 999px);background-color:var(--cb-color-surface-300, #cbd5e1);transition:all var(--cb-duration-normal, .2s) var(--cb-ease, ease)}.cb-onboarding__dot.cb-is-active{width:1.25rem;background-color:var(--cb-color-primary-500, #10b981)}.cb-onboarding__announce{display:flex;flex-direction:column;gap:var(--cb-space-3, .75rem)}.cb-onboarding__counter{font-size:var(--cb-text-xs, .75rem);font-weight:var(--cb-font-weight-semibold, 600);color:var(--cb-color-text-muted, #64748b)}.cb-onboarding__title{margin:0;font-size:var(--cb-text-xl, 1.25rem);font-weight:var(--cb-font-weight-bold, 700)}.cb-onboarding__body{font-size:var(--cb-text-sm, .875rem);color:var(--cb-color-text, #334155);line-height:var(--cb-line-height-relaxed, 1.6)}.cb-onboarding__body:empty{display:none}.cb-onboarding__actions{display:flex;justify-content:center;gap:var(--cb-space-2, .5rem);margin-top:var(--cb-space-2, .5rem)}.cb-onboarding__btn{padding:var(--cb-space-2, .5rem) var(--cb-space-4, 1rem);font:inherit;font-size:var(--cb-text-sm, .875rem);font-weight:var(--cb-font-weight-semibold, 600);color:var(--cb-color-text-strong, #0f172a);background-color:var(--cb-color-surface-100, #f1f5f9);border:none;border-radius:var(--cb-radius-md, .5rem);cursor:pointer;transition:background-color var(--cb-duration-fast, .12s) var(--cb-ease, ease)}.cb-onboarding__btn:hover:not(:disabled){background-color:var(--cb-color-surface-200, #e2e8f0)}.cb-onboarding__btn:disabled{opacity:.4;cursor:not-allowed}.cb-onboarding__btn--ghost{background-color:transparent;color:var(--cb-color-text-muted, #64748b)}.cb-onboarding__btn--primary{color:var(--cb-color-primary-contrast, #ffffff);background-color:var(--cb-color-primary-600, #047857)}.cb-onboarding__btn--primary:hover:not(:disabled){background-color:var(--cb-color-primary-700, #065f46)}:host-context([data-theme=\"dark\"]) .cb-onboarding{color:var(--cb-color-surface-0, #f8fafc);background-color:var(--cb-color-surface-800, #1e293b);border-color:var(--cb-color-surface-600, #475569)}:host-context([data-theme=\"dark\"]) .cb-onboarding__body{color:var(--cb-color-surface-200, #e2e8f0)}:host-context([data-theme=\"dark\"]) .cb-onboarding__btn{color:var(--cb-color-surface-0, #f8fafc);background-color:var(--cb-color-surface-700, #334155)}:host-context([data-theme=\"dark\"]) .cb-onboarding__btn--ghost{background-color:transparent;color:var(--cb-color-surface-300, #cbd5e1)}:host-context([data-theme=\"dark\"]) .cb-onboarding__btn--primary{background-color:var(--cb-color-primary-500, #10b981)}.cb-onboarding__sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
80
96
|
}
|
|
81
97
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbOnboarding, decorators: [{
|
|
82
98
|
type: Component,
|
|
83
99
|
args: [{ selector: 'cb-onboarding', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, template: `
|
|
84
100
|
@if (visible() && steps().length) {
|
|
85
|
-
<section
|
|
101
|
+
<section
|
|
102
|
+
class="cb-onboarding"
|
|
103
|
+
role="dialog"
|
|
104
|
+
[attr.aria-label]="t().onboarding"
|
|
105
|
+
(keydown.escape)="visible.set(false)"
|
|
106
|
+
>
|
|
86
107
|
<div class="cb-onboarding__dots" aria-hidden="true">
|
|
87
108
|
@for (step of steps(); track $index) {
|
|
88
109
|
<span
|
|
@@ -91,10 +112,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
91
112
|
></span>
|
|
92
113
|
}
|
|
93
114
|
</div>
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
115
|
+
<!-- Región viva: al cambiar de paso se anuncian el contador y el título. -->
|
|
116
|
+
<div class="cb-onboarding__announce" aria-live="polite" aria-atomic="true">
|
|
117
|
+
<span class="cb-onboarding__counter" aria-hidden="true">
|
|
118
|
+
{{ index() + 1 }} / {{ steps().length }}
|
|
119
|
+
</span>
|
|
120
|
+
<span class="cb-onboarding__sr">{{ fmt(t().stepOf, index() + 1, steps().length) }}</span>
|
|
121
|
+
<h2 class="cb-onboarding__title">{{ steps()[index()] }}</h2>
|
|
122
|
+
</div>
|
|
98
123
|
<div class="cb-onboarding__body"><ng-content /></div>
|
|
99
124
|
<div class="cb-onboarding__actions">
|
|
100
125
|
<button
|
|
@@ -102,7 +127,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
102
127
|
class="cb-onboarding__btn cb-onboarding__btn--ghost"
|
|
103
128
|
(click)="visible.set(false)"
|
|
104
129
|
>
|
|
105
|
-
|
|
130
|
+
{{ t().skip }}
|
|
106
131
|
</button>
|
|
107
132
|
<button
|
|
108
133
|
type="button"
|
|
@@ -110,19 +135,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
110
135
|
(click)="previous()"
|
|
111
136
|
[disabled]="index() === 0"
|
|
112
137
|
>
|
|
113
|
-
|
|
138
|
+
{{ t().previous }}
|
|
114
139
|
</button>
|
|
115
140
|
<button
|
|
116
141
|
type="button"
|
|
117
142
|
class="cb-onboarding__btn cb-onboarding__btn--primary"
|
|
118
143
|
(click)="next()"
|
|
119
144
|
>
|
|
120
|
-
{{ index() === steps().length - 1 ?
|
|
145
|
+
{{ index() === steps().length - 1 ? t().start : t().continue }}
|
|
121
146
|
</button>
|
|
122
147
|
</div>
|
|
123
148
|
</section>
|
|
124
149
|
}
|
|
125
|
-
`, styles: [":host{display:block;width:100%;max-width:24rem}.cb-onboarding{display:flex;flex-direction:column;gap:var(--cb-space-3, .75rem);box-sizing:border-box;padding:var(--cb-space-6, 1.5rem);font-family:var(--cb-font-sans, inherit);color:var(--cb-color-text-strong, #0f172a);background-color:var(--cb-color-surface-0, #ffffff);border:1px solid var(--cb-color-border, #e2e8f0);border-radius:var(--cb-radius-lg, .75rem);box-shadow:var(--cb-shadow-md, 0 8px 24px rgba(0, 0, 0, .12));text-align:center}.cb-onboarding__dots{display:flex;justify-content:center;gap:var(--cb-space-1, .3rem)}.cb-onboarding__dot{width:.5rem;height:.5rem;border-radius:var(--cb-radius-full, 999px);background-color:var(--cb-color-surface-300, #cbd5e1);transition:all var(--cb-duration-normal, .2s) var(--cb-ease, ease)}.cb-onboarding__dot.cb-is-active{width:1.25rem;background-color:var(--cb-color-primary-500, #10b981)}.cb-onboarding__counter{font-size:var(--cb-text-xs, .75rem);font-weight:var(--cb-font-weight-semibold, 600);color:var(--cb-color-text-muted, #64748b)}.cb-onboarding__title{margin:0;font-size:var(--cb-text-xl, 1.25rem);font-weight:var(--cb-font-weight-bold, 700)}.cb-onboarding__body{font-size:var(--cb-text-sm, .875rem);color:var(--cb-color-text, #334155);line-height:var(--cb-line-height-relaxed, 1.6)}.cb-onboarding__body:empty{display:none}.cb-onboarding__actions{display:flex;justify-content:center;gap:var(--cb-space-2, .5rem);margin-top:var(--cb-space-2, .5rem)}.cb-onboarding__btn{padding:var(--cb-space-2, .5rem) var(--cb-space-4, 1rem);font:inherit;font-size:var(--cb-text-sm, .875rem);font-weight:var(--cb-font-weight-semibold, 600);color:var(--cb-color-text-strong, #0f172a);background-color:var(--cb-color-surface-100, #f1f5f9);border:none;border-radius:var(--cb-radius-md, .5rem);cursor:pointer;transition:background-color var(--cb-duration-fast, .12s) var(--cb-ease, ease)}.cb-onboarding__btn:hover:not(:disabled){background-color:var(--cb-color-surface-200, #e2e8f0)}.cb-onboarding__btn:disabled{opacity:.4;cursor:not-allowed}.cb-onboarding__btn--ghost{background-color:transparent;color:var(--cb-color-text-muted, #64748b)}.cb-onboarding__btn--primary{color:var(--cb-color-primary-contrast, #ffffff);background-color:var(--cb-color-primary-600, #047857)}.cb-onboarding__btn--primary:hover:not(:disabled){background-color:var(--cb-color-primary-700, #065f46)}:host-context([data-theme=\"dark\"]) .cb-onboarding{color:var(--cb-color-surface-0, #f8fafc);background-color:var(--cb-color-surface-800, #1e293b);border-color:var(--cb-color-surface-600, #475569)}:host-context([data-theme=\"dark\"]) .cb-onboarding__body{color:var(--cb-color-surface-200, #e2e8f0)}:host-context([data-theme=\"dark\"]) .cb-onboarding__btn{color:var(--cb-color-surface-0, #f8fafc);background-color:var(--cb-color-surface-700, #334155)}:host-context([data-theme=\"dark\"]) .cb-onboarding__btn--ghost{background-color:transparent;color:var(--cb-color-surface-300, #cbd5e1)}:host-context([data-theme=\"dark\"]) .cb-onboarding__btn--primary{background-color:var(--cb-color-primary-500, #10b981)}\n"] }]
|
|
150
|
+
`, styles: [":host{display:block;width:100%;max-width:24rem}.cb-onboarding{display:flex;flex-direction:column;gap:var(--cb-space-3, .75rem);box-sizing:border-box;padding:var(--cb-space-6, 1.5rem);font-family:var(--cb-font-sans, inherit);color:var(--cb-color-text-strong, #0f172a);background-color:var(--cb-color-surface-0, #ffffff);border:1px solid var(--cb-color-border, #e2e8f0);border-radius:var(--cb-radius-lg, .75rem);box-shadow:var(--cb-shadow-md, 0 8px 24px rgba(0, 0, 0, .12));text-align:center}.cb-onboarding__dots{display:flex;justify-content:center;gap:var(--cb-space-1, .3rem)}.cb-onboarding__dot{width:.5rem;height:.5rem;border-radius:var(--cb-radius-full, 999px);background-color:var(--cb-color-surface-300, #cbd5e1);transition:all var(--cb-duration-normal, .2s) var(--cb-ease, ease)}.cb-onboarding__dot.cb-is-active{width:1.25rem;background-color:var(--cb-color-primary-500, #10b981)}.cb-onboarding__announce{display:flex;flex-direction:column;gap:var(--cb-space-3, .75rem)}.cb-onboarding__counter{font-size:var(--cb-text-xs, .75rem);font-weight:var(--cb-font-weight-semibold, 600);color:var(--cb-color-text-muted, #64748b)}.cb-onboarding__title{margin:0;font-size:var(--cb-text-xl, 1.25rem);font-weight:var(--cb-font-weight-bold, 700)}.cb-onboarding__body{font-size:var(--cb-text-sm, .875rem);color:var(--cb-color-text, #334155);line-height:var(--cb-line-height-relaxed, 1.6)}.cb-onboarding__body:empty{display:none}.cb-onboarding__actions{display:flex;justify-content:center;gap:var(--cb-space-2, .5rem);margin-top:var(--cb-space-2, .5rem)}.cb-onboarding__btn{padding:var(--cb-space-2, .5rem) var(--cb-space-4, 1rem);font:inherit;font-size:var(--cb-text-sm, .875rem);font-weight:var(--cb-font-weight-semibold, 600);color:var(--cb-color-text-strong, #0f172a);background-color:var(--cb-color-surface-100, #f1f5f9);border:none;border-radius:var(--cb-radius-md, .5rem);cursor:pointer;transition:background-color var(--cb-duration-fast, .12s) var(--cb-ease, ease)}.cb-onboarding__btn:hover:not(:disabled){background-color:var(--cb-color-surface-200, #e2e8f0)}.cb-onboarding__btn:disabled{opacity:.4;cursor:not-allowed}.cb-onboarding__btn--ghost{background-color:transparent;color:var(--cb-color-text-muted, #64748b)}.cb-onboarding__btn--primary{color:var(--cb-color-primary-contrast, #ffffff);background-color:var(--cb-color-primary-600, #047857)}.cb-onboarding__btn--primary:hover:not(:disabled){background-color:var(--cb-color-primary-700, #065f46)}:host-context([data-theme=\"dark\"]) .cb-onboarding{color:var(--cb-color-surface-0, #f8fafc);background-color:var(--cb-color-surface-800, #1e293b);border-color:var(--cb-color-surface-600, #475569)}:host-context([data-theme=\"dark\"]) .cb-onboarding__body{color:var(--cb-color-surface-200, #e2e8f0)}:host-context([data-theme=\"dark\"]) .cb-onboarding__btn{color:var(--cb-color-surface-0, #f8fafc);background-color:var(--cb-color-surface-700, #334155)}:host-context([data-theme=\"dark\"]) .cb-onboarding__btn--ghost{background-color:transparent;color:var(--cb-color-surface-300, #cbd5e1)}:host-context([data-theme=\"dark\"]) .cb-onboarding__btn--primary{background-color:var(--cb-color-primary-500, #10b981)}.cb-onboarding__sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}\n"] }]
|
|
126
151
|
}], propDecorators: { steps: [{ type: i0.Input, args: [{ isSignal: true, alias: "steps", required: false }] }], visible: [{ type: i0.Input, args: [{ isSignal: true, alias: "visible", required: false }] }, { type: i0.Output, args: ["visibleChange"] }], index: [{ type: i0.Input, args: [{ isSignal: true, alias: "index", required: false }] }, { type: i0.Output, args: ["indexChange"] }], currentStepIndex: [{ type: i0.Output, args: ["currentStepIndex"] }] } });
|
|
127
152
|
|
|
128
153
|
/**
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { input, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { injectCbTranslation } from '@caribeng/ui';
|
|
3
4
|
|
|
4
5
|
class CbPictogram {
|
|
5
6
|
constructor() {
|
|
7
|
+
/** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
|
|
8
|
+
this.t = injectCbTranslation();
|
|
6
9
|
this.name = input('security-shield', /* @ts-ignore */
|
|
7
10
|
...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
8
11
|
this.size = input('56px', /* @ts-ignore */
|
|
9
12
|
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
10
|
-
this.alt = input(
|
|
13
|
+
this.alt = input(undefined, /* @ts-ignore */
|
|
11
14
|
...(ngDevMode ? [{ debugName: "alt" }] : /* istanbul ignore next */ []));
|
|
12
15
|
}
|
|
13
16
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbPictogram, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
@@ -15,7 +18,7 @@ class CbPictogram {
|
|
|
15
18
|
<svg
|
|
16
19
|
viewBox="0 0 64 64"
|
|
17
20
|
role="img"
|
|
18
|
-
[attr.aria-label]="alt() || name()"
|
|
21
|
+
[attr.aria-label]="(alt() ?? t().pictogram) || name()"
|
|
19
22
|
style="width: 100%; height: 100%"
|
|
20
23
|
>
|
|
21
24
|
<circle cx="32" cy="32" r="28" fill="var(--cb-color-primary-100, #d1fae5)" />
|
|
@@ -33,7 +36,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
33
36
|
<svg
|
|
34
37
|
viewBox="0 0 64 64"
|
|
35
38
|
role="img"
|
|
36
|
-
[attr.aria-label]="alt() || name()"
|
|
39
|
+
[attr.aria-label]="(alt() ?? t().pictogram) || name()"
|
|
37
40
|
style="width: 100%; height: 100%"
|
|
38
41
|
>
|
|
39
42
|
<circle cx="32" cy="32" r="28" fill="var(--cb-color-primary-100, #d1fae5)" />
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, model, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { input, model, viewChild, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { injectCbTranslation, cbOverlayFocus } from '@caribeng/ui';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Pop-over de Caribe Design: disparador con panel flotante de contenido
|
|
@@ -10,30 +11,45 @@ import { input, model, ViewEncapsulation, ChangeDetectionStrategy, Component } f
|
|
|
10
11
|
* <cb-pop-over triggerLabel="Más info">Detalle contextual…</cb-pop-over>
|
|
11
12
|
* ```
|
|
12
13
|
*/
|
|
14
|
+
let nextId = 0;
|
|
13
15
|
class CbPopOver {
|
|
14
16
|
constructor() {
|
|
15
|
-
|
|
17
|
+
/** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
|
|
18
|
+
this.t = injectCbTranslation();
|
|
19
|
+
this.triggerLabel = input(undefined, /* @ts-ignore */
|
|
16
20
|
...(ngDevMode ? [{ debugName: "triggerLabel" }] : /* istanbul ignore next */ []));
|
|
17
21
|
this.visible = model(false, /* @ts-ignore */
|
|
18
22
|
...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
|
|
23
|
+
this.panelId = `cb-pop-over-${++nextId}`;
|
|
24
|
+
this.closeBtn = viewChild('closeBtn', /* @ts-ignore */
|
|
25
|
+
...(ngDevMode ? [{ debugName: "closeBtn" }] : /* istanbul ignore next */ []));
|
|
26
|
+
cbOverlayFocus({ open: this.visible, initialFocus: () => this.closeBtn()?.nativeElement });
|
|
19
27
|
}
|
|
20
28
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbPopOver, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
21
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: CbPopOver, isStandalone: true, selector: "cb-pop-over", inputs: { triggerLabel: { classPropertyName: "triggerLabel", publicName: "triggerLabel", isSignal: true, isRequired: false, transformFunction: null }, visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visible: "visibleChange" }, ngImport: i0, template: `
|
|
29
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: CbPopOver, isStandalone: true, selector: "cb-pop-over", inputs: { triggerLabel: { classPropertyName: "triggerLabel", publicName: "triggerLabel", isSignal: true, isRequired: false, transformFunction: null }, visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visible: "visibleChange" }, viewQueries: [{ propertyName: "closeBtn", first: true, predicate: ["closeBtn"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
22
30
|
<div class="cb-pop-over">
|
|
23
31
|
<button
|
|
24
32
|
type="button"
|
|
25
33
|
class="cb-pop-over__trigger"
|
|
26
34
|
[attr.aria-expanded]="visible()"
|
|
35
|
+
[attr.aria-controls]="visible() ? panelId : null"
|
|
27
36
|
(click)="visible.update((v) => !v)"
|
|
28
37
|
>
|
|
29
|
-
{{ triggerLabel() }}
|
|
38
|
+
{{ (triggerLabel() ?? t().showInfo) }}
|
|
30
39
|
</button>
|
|
31
40
|
@if (visible()) {
|
|
32
|
-
<section
|
|
41
|
+
<section
|
|
42
|
+
class="cb-pop-over__panel"
|
|
43
|
+
role="dialog"
|
|
44
|
+
[id]="panelId"
|
|
45
|
+
[attr.aria-label]="triggerLabel() ?? t().showInfo"
|
|
46
|
+
(keydown.escape)="visible.set(false)"
|
|
47
|
+
>
|
|
33
48
|
<button
|
|
49
|
+
#closeBtn
|
|
34
50
|
type="button"
|
|
35
51
|
class="cb-pop-over__close"
|
|
36
|
-
aria-label="
|
|
52
|
+
[attr.aria-label]="t().close"
|
|
37
53
|
(click)="visible.set(false)"
|
|
38
54
|
>
|
|
39
55
|
×
|
|
@@ -52,16 +68,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
52
68
|
type="button"
|
|
53
69
|
class="cb-pop-over__trigger"
|
|
54
70
|
[attr.aria-expanded]="visible()"
|
|
71
|
+
[attr.aria-controls]="visible() ? panelId : null"
|
|
55
72
|
(click)="visible.update((v) => !v)"
|
|
56
73
|
>
|
|
57
|
-
{{ triggerLabel() }}
|
|
74
|
+
{{ (triggerLabel() ?? t().showInfo) }}
|
|
58
75
|
</button>
|
|
59
76
|
@if (visible()) {
|
|
60
|
-
<section
|
|
77
|
+
<section
|
|
78
|
+
class="cb-pop-over__panel"
|
|
79
|
+
role="dialog"
|
|
80
|
+
[id]="panelId"
|
|
81
|
+
[attr.aria-label]="triggerLabel() ?? t().showInfo"
|
|
82
|
+
(keydown.escape)="visible.set(false)"
|
|
83
|
+
>
|
|
61
84
|
<button
|
|
85
|
+
#closeBtn
|
|
62
86
|
type="button"
|
|
63
87
|
class="cb-pop-over__close"
|
|
64
|
-
aria-label="
|
|
88
|
+
[attr.aria-label]="t().close"
|
|
65
89
|
(click)="visible.set(false)"
|
|
66
90
|
>
|
|
67
91
|
×
|
|
@@ -71,7 +95,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
71
95
|
}
|
|
72
96
|
</div>
|
|
73
97
|
`, styles: [":host{display:inline-block}.cb-pop-over{position:relative;display:inline-block;font-family:var(--cb-font-sans, inherit)}.cb-pop-over__trigger{padding:var(--cb-space-2, .5rem) var(--cb-space-4, 1rem);font:inherit;font-size:var(--cb-text-sm, .875rem);font-weight:var(--cb-font-weight-medium, 500);color:var(--cb-color-text-strong, #0f172a);background-color:var(--cb-color-surface-0, #ffffff);border:1px solid var(--cb-color-border, #cbd5e1);border-radius:var(--cb-radius-md, .5rem);cursor:pointer}.cb-pop-over__trigger:hover{background-color:var(--cb-color-surface-100, #f1f5f9)}.cb-pop-over__panel{position:absolute;top:calc(100% + var(--cb-space-2, .5rem));left:0;z-index:var(--cb-z-popover, 900);min-width:14rem;max-width:20rem;padding:var(--cb-space-4, 1rem);padding-right:var(--cb-space-6, 2rem);font-size:var(--cb-text-sm, .875rem);color:var(--cb-color-text, #334155);background-color:var(--cb-color-surface-0, #ffffff);border:1px solid var(--cb-color-border, #e2e8f0);border-radius:var(--cb-radius-md, .5rem);box-shadow:var(--cb-shadow-lg, 0 12px 28px rgba(0, 0, 0, .18));animation:cb-pop-in var(--cb-duration-fast, .12s) var(--cb-ease-out, ease-out)}.cb-pop-over__close{position:absolute;top:var(--cb-space-1, .25rem);right:var(--cb-space-1, .25rem);display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;font-size:1rem;line-height:1;color:var(--cb-color-text-muted, #64748b);background:transparent;border:none;border-radius:var(--cb-radius-full, 999px);cursor:pointer}.cb-pop-over__close:hover{background-color:var(--cb-color-surface-100, #f1f5f9)}@keyframes cb-pop-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}:host-context([data-theme=\"dark\"]) .cb-pop-over__trigger,:host-context([data-theme=\"dark\"]) .cb-pop-over__panel{color:var(--cb-color-surface-0, #f8fafc);background-color:var(--cb-color-surface-800, #1e293b);border-color:var(--cb-color-surface-600, #475569)}:host-context([data-theme=\"dark\"]) .cb-pop-over__trigger:hover{background-color:var(--cb-color-surface-700, #334155)}\n"] }]
|
|
74
|
-
}], propDecorators: { triggerLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "triggerLabel", required: false }] }], visible: [{ type: i0.Input, args: [{ isSignal: true, alias: "visible", required: false }] }, { type: i0.Output, args: ["visibleChange"] }] } });
|
|
98
|
+
}], ctorParameters: () => [], propDecorators: { triggerLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "triggerLabel", required: false }] }], visible: [{ type: i0.Input, args: [{ isSignal: true, alias: "visible", required: false }] }, { type: i0.Output, args: ["visibleChange"] }], closeBtn: [{ type: i0.ViewChild, args: ['closeBtn', { isSignal: true }] }] } });
|
|
75
99
|
|
|
76
100
|
/**
|
|
77
101
|
* Generated bundle index. Do not edit.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { input, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { injectCbTranslation } from '@caribeng/ui';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Preloader de Caribe Design: pantalla/bloque de carga inicial con marca,
|
|
@@ -12,22 +13,24 @@ import { input, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@a
|
|
|
12
13
|
*/
|
|
13
14
|
class CbPreloader {
|
|
14
15
|
constructor() {
|
|
16
|
+
/** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
|
|
17
|
+
this.t = injectCbTranslation();
|
|
15
18
|
this.active = input(true, /* @ts-ignore */
|
|
16
19
|
...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
|
|
17
|
-
this.title = input('
|
|
20
|
+
this.title = input('', /* @ts-ignore */
|
|
18
21
|
...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
19
|
-
this.label = input(
|
|
22
|
+
this.label = input(undefined, /* @ts-ignore */
|
|
20
23
|
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
21
24
|
}
|
|
22
25
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbPreloader, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
23
26
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: CbPreloader, isStandalone: true, selector: "cb-preloader", inputs: { active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "cb-preloader-host" }, ngImport: i0, template: `
|
|
24
27
|
@if (active()) {
|
|
25
|
-
<div class="cb-preloader" role="alert"
|
|
28
|
+
<div class="cb-preloader" role="alert">
|
|
26
29
|
<strong class="cb-preloader__title">{{ title() }}</strong>
|
|
27
30
|
<div class="cb-preloader__bar" aria-hidden="true">
|
|
28
31
|
<span class="cb-preloader__bar-fill"></span>
|
|
29
32
|
</div>
|
|
30
|
-
<span class="cb-preloader__label">{{ label() }}</span>
|
|
33
|
+
<span class="cb-preloader__label">{{ (label() ?? t().preparingSession) }}</span>
|
|
31
34
|
</div>
|
|
32
35
|
}
|
|
33
36
|
`, isInline: true, styles: [":host{display:inline-flex}.cb-preloader{display:flex;flex-direction:column;align-items:center;gap:var(--cb-space-3, .75rem);box-sizing:border-box;min-width:15rem;padding:var(--cb-space-6, 1.5rem) var(--cb-space-8, 2rem);font-family:var(--cb-font-sans, inherit);text-align:center;color:var(--cb-color-text-strong, #0f172a);background-color:var(--cb-color-surface-0, #ffffff);border:1px solid var(--cb-color-border, #e2e8f0);border-radius:var(--cb-radius-lg, .75rem);box-shadow:var(--cb-shadow-sm, 0 1px 3px rgba(0, 0, 0, .08))}.cb-preloader__title{font-size:var(--cb-text-lg, 1.05rem);font-weight:var(--cb-font-weight-bold, 700);color:var(--cb-color-primary-600, #047857)}.cb-preloader__bar{position:relative;width:100%;height:.375rem;overflow:hidden;background-color:var(--cb-color-surface-200, #e2e8f0);border-radius:var(--cb-radius-full, 999px)}.cb-preloader__bar-fill{position:absolute;top:0;left:0;width:40%;height:100%;background-color:var(--cb-color-primary-500, #10b981);border-radius:var(--cb-radius-full, 999px);animation:cb-preloader-slide 1.3s ease-in-out infinite}.cb-preloader__label{font-size:var(--cb-text-sm, .8125rem);color:var(--cb-color-text-muted, #64748b)}@keyframes cb-preloader-slide{0%{left:-40%}to{left:100%}}@media(prefers-reduced-motion:reduce){.cb-preloader__bar-fill{animation-duration:3s}}:host-context([data-theme=\"dark\"]) .cb-preloader{color:var(--cb-color-surface-0, #f8fafc);background-color:var(--cb-color-surface-800, #1e293b);border-color:var(--cb-color-surface-600, #475569)}:host-context([data-theme=\"dark\"]) .cb-preloader__bar{background-color:var(--cb-color-surface-700, #334155)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
@@ -36,12 +39,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
36
39
|
type: Component,
|
|
37
40
|
args: [{ selector: 'cb-preloader', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, host: { class: 'cb-preloader-host' }, template: `
|
|
38
41
|
@if (active()) {
|
|
39
|
-
<div class="cb-preloader" role="alert"
|
|
42
|
+
<div class="cb-preloader" role="alert">
|
|
40
43
|
<strong class="cb-preloader__title">{{ title() }}</strong>
|
|
41
44
|
<div class="cb-preloader__bar" aria-hidden="true">
|
|
42
45
|
<span class="cb-preloader__bar-fill"></span>
|
|
43
46
|
</div>
|
|
44
|
-
<span class="cb-preloader__label">{{ label() }}</span>
|
|
47
|
+
<span class="cb-preloader__label">{{ (label() ?? t().preparingSession) }}</span>
|
|
45
48
|
</div>
|
|
46
49
|
}
|
|
47
50
|
`, styles: [":host{display:inline-flex}.cb-preloader{display:flex;flex-direction:column;align-items:center;gap:var(--cb-space-3, .75rem);box-sizing:border-box;min-width:15rem;padding:var(--cb-space-6, 1.5rem) var(--cb-space-8, 2rem);font-family:var(--cb-font-sans, inherit);text-align:center;color:var(--cb-color-text-strong, #0f172a);background-color:var(--cb-color-surface-0, #ffffff);border:1px solid var(--cb-color-border, #e2e8f0);border-radius:var(--cb-radius-lg, .75rem);box-shadow:var(--cb-shadow-sm, 0 1px 3px rgba(0, 0, 0, .08))}.cb-preloader__title{font-size:var(--cb-text-lg, 1.05rem);font-weight:var(--cb-font-weight-bold, 700);color:var(--cb-color-primary-600, #047857)}.cb-preloader__bar{position:relative;width:100%;height:.375rem;overflow:hidden;background-color:var(--cb-color-surface-200, #e2e8f0);border-radius:var(--cb-radius-full, 999px)}.cb-preloader__bar-fill{position:absolute;top:0;left:0;width:40%;height:100%;background-color:var(--cb-color-primary-500, #10b981);border-radius:var(--cb-radius-full, 999px);animation:cb-preloader-slide 1.3s ease-in-out infinite}.cb-preloader__label{font-size:var(--cb-text-sm, .8125rem);color:var(--cb-color-text-muted, #64748b)}@keyframes cb-preloader-slide{0%{left:-40%}to{left:100%}}@media(prefers-reduced-motion:reduce){.cb-preloader__bar-fill{animation-duration:3s}}:host-context([data-theme=\"dark\"]) .cb-preloader{color:var(--cb-color-surface-0, #f8fafc);background-color:var(--cb-color-surface-800, #1e293b);border-color:var(--cb-color-surface-600, #475569)}:host-context([data-theme=\"dark\"]) .cb-preloader__bar{background-color:var(--cb-color-surface-700, #334155)}\n"] }]
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { input, computed, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { injectCbTranslation } from '@caribeng/ui';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Progress-bar de Caribe Design: barra de progreso determinada (0–100) con
|
|
@@ -12,6 +13,8 @@ import { input, computed, ViewEncapsulation, ChangeDetectionStrategy, Component
|
|
|
12
13
|
*/
|
|
13
14
|
class CbProgressBar {
|
|
14
15
|
constructor() {
|
|
16
|
+
/** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
|
|
17
|
+
this.t = injectCbTranslation();
|
|
15
18
|
/** Valor actual (0–100). */
|
|
16
19
|
this.value = input(60, /* @ts-ignore */
|
|
17
20
|
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
@@ -41,7 +44,7 @@ class CbProgressBar {
|
|
|
41
44
|
[attr.aria-valuenow]="clamped()"
|
|
42
45
|
aria-valuemin="0"
|
|
43
46
|
aria-valuemax="100"
|
|
44
|
-
[attr.aria-label]="label() ||
|
|
47
|
+
[attr.aria-label]="label() || t().progress"
|
|
45
48
|
>
|
|
46
49
|
<div class="cb-progress-bar__fill" [style.width.%]="clamped()"></div>
|
|
47
50
|
</div>
|
|
@@ -66,7 +69,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
66
69
|
[attr.aria-valuenow]="clamped()"
|
|
67
70
|
aria-valuemin="0"
|
|
68
71
|
aria-valuemax="100"
|
|
69
|
-
[attr.aria-label]="label() ||
|
|
72
|
+
[attr.aria-label]="label() || t().progress"
|
|
70
73
|
>
|
|
71
74
|
<div class="cb-progress-bar__fill" [style.width.%]="clamped()"></div>
|
|
72
75
|
</div>
|
|
@@ -14,7 +14,7 @@ import { CbIcon } from '@caribeng/ui/icon';
|
|
|
14
14
|
class CbShortcut {
|
|
15
15
|
constructor() {
|
|
16
16
|
/** Texto del acceso directo. */
|
|
17
|
-
this.label = input('
|
|
17
|
+
this.label = input('', /* @ts-ignore */
|
|
18
18
|
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
19
19
|
/** Icono del set núcleo. */
|
|
20
20
|
this.icon = input('arrow-right', /* @ts-ignore */
|
|
@@ -22,14 +22,18 @@ class CbShortcut {
|
|
|
22
22
|
/** Deshabilita el acceso. */
|
|
23
23
|
this.disabled = input(false, /* @ts-ignore */
|
|
24
24
|
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
25
|
+
/** Nombre accesible cuando el atajo no tiene `label` visible. */
|
|
26
|
+
this.ariaLabel = input(undefined, /* @ts-ignore */
|
|
27
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
25
28
|
/** Emite al activar el acceso. */
|
|
26
29
|
this.action = output();
|
|
27
30
|
}
|
|
28
31
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbShortcut, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
29
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: CbShortcut, isStandalone: true, selector: "cb-shortcut", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { action: "action" }, host: { classAttribute: "cb-shortcut-host" }, ngImport: i0, template: `
|
|
32
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: CbShortcut, isStandalone: true, selector: "cb-shortcut", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { action: "action" }, host: { classAttribute: "cb-shortcut-host" }, ngImport: i0, template: `
|
|
30
33
|
<button
|
|
31
34
|
type="button"
|
|
32
35
|
class="cb-shortcut"
|
|
36
|
+
[attr.aria-label]="ariaLabel() || null"
|
|
33
37
|
[disabled]="disabled()"
|
|
34
38
|
(click)="!disabled() && action.emit()"
|
|
35
39
|
>
|
|
@@ -46,6 +50,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
46
50
|
<button
|
|
47
51
|
type="button"
|
|
48
52
|
class="cb-shortcut"
|
|
53
|
+
[attr.aria-label]="ariaLabel() || null"
|
|
49
54
|
[disabled]="disabled()"
|
|
50
55
|
(click)="!disabled() && action.emit()"
|
|
51
56
|
>
|
|
@@ -55,7 +60,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
55
60
|
<span class="cb-shortcut__label">{{ label() }}</span>
|
|
56
61
|
</button>
|
|
57
62
|
`, styles: [":host{display:inline-flex}.cb-shortcut{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--cb-space-2, .5rem);min-width:6rem;padding:var(--cb-space-4, 1rem);font-family:var(--cb-font-sans, inherit);color:var(--cb-color-text-strong, #0f172a);background-color:var(--cb-color-surface-0, #ffffff);border:1px solid var(--cb-color-border, #e2e8f0);border-radius:var(--cb-radius-lg, .75rem);cursor:pointer;transition:border-color var(--cb-duration-fast, .12s) var(--cb-ease, ease),box-shadow var(--cb-duration-fast, .12s) var(--cb-ease, ease),transform var(--cb-duration-fast, .12s) var(--cb-ease, ease)}.cb-shortcut__icon{display:inline-flex;align-items:center;justify-content:center;width:2.75rem;height:2.75rem;color:var(--cb-color-primary-600, #047857);background-color:var(--cb-color-primary-50, #ecfdf5);border-radius:var(--cb-radius-full, 999px)}.cb-shortcut__label{font-size:var(--cb-text-sm, .8125rem);font-weight:var(--cb-font-weight-semibold, 600);text-align:center}.cb-shortcut:hover:not(:disabled){border-color:var(--cb-color-primary-300, #6ee7b7);box-shadow:var(--cb-shadow-md, 0 4px 12px rgba(0, 0, 0, .1));transform:translateY(-1px)}.cb-shortcut:focus-visible{outline:2px solid var(--cb-color-focus-ring, var(--cb-color-primary-500, #10b981));outline-offset:2px}.cb-shortcut:disabled{opacity:.55;cursor:not-allowed}:host-context([data-theme=\"dark\"]) .cb-shortcut{color:var(--cb-color-surface-0, #f8fafc);background-color:var(--cb-color-surface-800, #1e293b);border-color:var(--cb-color-surface-600, #475569)}:host-context([data-theme=\"dark\"]) .cb-shortcut__icon{color:var(--cb-color-primary-300, #6ee7b7);background-color:color-mix(in srgb,var(--cb-color-primary-500, #10b981) 18%,transparent)}\n"] }]
|
|
58
|
-
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], action: [{ type: i0.Output, args: ["action"] }] } });
|
|
63
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], action: [{ type: i0.Output, args: ["action"] }] } });
|
|
59
64
|
|
|
60
65
|
/**
|
|
61
66
|
* Generated bundle index. Do not edit.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { input, computed, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { injectCbTranslation, cbFormat } from '@caribeng/ui';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Step-indicator de Caribe Design: progreso por segmentos para flujos de varios
|
|
@@ -13,6 +14,10 @@ import { input, computed, ViewEncapsulation, ChangeDetectionStrategy, Component
|
|
|
13
14
|
*/
|
|
14
15
|
class CbStepIndicator {
|
|
15
16
|
constructor() {
|
|
17
|
+
/** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
|
|
18
|
+
this.t = injectCbTranslation();
|
|
19
|
+
/** Rellena `{0}`, `{1}`… de un texto traducido. */
|
|
20
|
+
this.fmt = cbFormat;
|
|
16
21
|
/** Paso actual (1-based). */
|
|
17
22
|
this.currentStep = input(1, /* @ts-ignore */
|
|
18
23
|
...(ngDevMode ? [{ debugName: "currentStep" }] : /* istanbul ignore next */ []));
|
|
@@ -20,7 +25,7 @@ class CbStepIndicator {
|
|
|
20
25
|
this.totalSteps = input(4, /* @ts-ignore */
|
|
21
26
|
...(ngDevMode ? [{ debugName: "totalSteps" }] : /* istanbul ignore next */ []));
|
|
22
27
|
/** Leyenda del paso actual. */
|
|
23
|
-
this.label = input('
|
|
28
|
+
this.label = input('', /* @ts-ignore */
|
|
24
29
|
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
25
30
|
this.total = computed(() => Math.max(1, this.totalSteps()), /* @ts-ignore */
|
|
26
31
|
...(ngDevMode ? [{ debugName: "total" }] : /* istanbul ignore next */ []));
|
|
@@ -37,7 +42,8 @@ class CbStepIndicator {
|
|
|
37
42
|
[attr.aria-valuenow]="current()"
|
|
38
43
|
aria-valuemin="1"
|
|
39
44
|
[attr.aria-valuemax]="total()"
|
|
40
|
-
[attr.aria-
|
|
45
|
+
[attr.aria-valuetext]="fmt(t().stepOf, current(), total())"
|
|
46
|
+
[attr.aria-label]="label() || t().stepsProgress"
|
|
41
47
|
>
|
|
42
48
|
<div class="cb-step-indicator__track" aria-hidden="true">
|
|
43
49
|
@for (step of steps(); track step) {
|
|
@@ -49,7 +55,7 @@ class CbStepIndicator {
|
|
|
49
55
|
}
|
|
50
56
|
</div>
|
|
51
57
|
<div class="cb-step-indicator__caption">
|
|
52
|
-
<strong class="cb-step-indicator__count">
|
|
58
|
+
<strong class="cb-step-indicator__count">{{ fmt(t().stepOf, current(), total()) }}</strong>
|
|
53
59
|
@if (label()) {
|
|
54
60
|
<span class="cb-step-indicator__label">· {{ label() }}</span>
|
|
55
61
|
}
|
|
@@ -66,7 +72,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
66
72
|
[attr.aria-valuenow]="current()"
|
|
67
73
|
aria-valuemin="1"
|
|
68
74
|
[attr.aria-valuemax]="total()"
|
|
69
|
-
[attr.aria-
|
|
75
|
+
[attr.aria-valuetext]="fmt(t().stepOf, current(), total())"
|
|
76
|
+
[attr.aria-label]="label() || t().stepsProgress"
|
|
70
77
|
>
|
|
71
78
|
<div class="cb-step-indicator__track" aria-hidden="true">
|
|
72
79
|
@for (step of steps(); track step) {
|
|
@@ -78,7 +85,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
78
85
|
}
|
|
79
86
|
</div>
|
|
80
87
|
<div class="cb-step-indicator__caption">
|
|
81
|
-
<strong class="cb-step-indicator__count">
|
|
88
|
+
<strong class="cb-step-indicator__count">{{ fmt(t().stepOf, current(), total()) }}</strong>
|
|
82
89
|
@if (label()) {
|
|
83
90
|
<span class="cb-step-indicator__label">· {{ label() }}</span>
|
|
84
91
|
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { input, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { injectCbTranslation } from '@caribeng/ui';
|
|
3
4
|
|
|
4
5
|
class CbStroke {
|
|
5
6
|
constructor() {
|
|
7
|
+
/** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
|
|
8
|
+
this.t = injectCbTranslation();
|
|
6
9
|
this.name = input('01', /* @ts-ignore */
|
|
7
10
|
...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
8
11
|
this.size = input('220px', /* @ts-ignore */
|
|
@@ -11,7 +14,7 @@ class CbStroke {
|
|
|
11
14
|
...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
12
15
|
this.ariaHidden = input(true, /* @ts-ignore */
|
|
13
16
|
...(ngDevMode ? [{ debugName: "ariaHidden" }] : /* istanbul ignore next */ []));
|
|
14
|
-
this.alt = input(
|
|
17
|
+
this.alt = input(undefined, /* @ts-ignore */
|
|
15
18
|
...(ngDevMode ? [{ debugName: "alt" }] : /* istanbul ignore next */ []));
|
|
16
19
|
}
|
|
17
20
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbStroke, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
@@ -21,7 +24,7 @@ class CbStroke {
|
|
|
21
24
|
viewBox="0 0 240 36"
|
|
22
25
|
[attr.role]="ariaHidden() ? null : 'img'"
|
|
23
26
|
[attr.aria-hidden]="ariaHidden() ? 'true' : null"
|
|
24
|
-
[attr.aria-label]="ariaHidden() ? null : alt()"
|
|
27
|
+
[attr.aria-label]="ariaHidden() ? null : (alt() ?? t().decorativeStroke)"
|
|
25
28
|
style="width: 100%; height: auto"
|
|
26
29
|
>
|
|
27
30
|
<path
|
|
@@ -45,7 +48,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
45
48
|
viewBox="0 0 240 36"
|
|
46
49
|
[attr.role]="ariaHidden() ? null : 'img'"
|
|
47
50
|
[attr.aria-hidden]="ariaHidden() ? 'true' : null"
|
|
48
|
-
[attr.aria-label]="ariaHidden() ? null : alt()"
|
|
51
|
+
[attr.aria-label]="ariaHidden() ? null : (alt() ?? t().decorativeStroke)"
|
|
49
52
|
style="width: 100%; height: auto"
|
|
50
53
|
>
|
|
51
54
|
<path
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { input, model, output, signal, computed, forwardRef, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
4
|
-
import { cbFieldState } from '@caribeng/ui';
|
|
4
|
+
import { injectCbTranslation, cbFieldState } from '@caribeng/ui';
|
|
5
5
|
|
|
6
6
|
let nextUid = 0;
|
|
7
7
|
/**
|
|
@@ -17,6 +17,8 @@ let nextUid = 0;
|
|
|
17
17
|
*/
|
|
18
18
|
class CbSwitch {
|
|
19
19
|
constructor() {
|
|
20
|
+
/** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
|
|
21
|
+
this.t = injectCbTranslation();
|
|
20
22
|
/** Etiqueta visible junto al control. */
|
|
21
23
|
this.label = input('', /* @ts-ignore */
|
|
22
24
|
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
@@ -102,7 +104,7 @@ class CbSwitch {
|
|
|
102
104
|
[disabled]="isDisabled()"
|
|
103
105
|
[attr.aria-checked]="checked()"
|
|
104
106
|
[attr.aria-required]="fieldState.required() || null"
|
|
105
|
-
[attr.aria-label]="label() ? null :
|
|
107
|
+
[attr.aria-label]="label() ? null : t().switch"
|
|
106
108
|
(change)="toggle()"
|
|
107
109
|
(blur)="handleBlur()"
|
|
108
110
|
/>
|
|
@@ -148,7 +150,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
148
150
|
[disabled]="isDisabled()"
|
|
149
151
|
[attr.aria-checked]="checked()"
|
|
150
152
|
[attr.aria-required]="fieldState.required() || null"
|
|
151
|
-
[attr.aria-label]="label() ? null :
|
|
153
|
+
[attr.aria-label]="label() ? null : t().switch"
|
|
152
154
|
(change)="toggle()"
|
|
153
155
|
(blur)="handleBlur()"
|
|
154
156
|
/>
|
|
@@ -13,7 +13,7 @@ import { input, model, output, ViewEncapsulation, ChangeDetectionStrategy, Compo
|
|
|
13
13
|
class CbTagButton {
|
|
14
14
|
constructor() {
|
|
15
15
|
/** Texto del tag. */
|
|
16
|
-
this.label = input('
|
|
16
|
+
this.label = input('', /* @ts-ignore */
|
|
17
17
|
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
18
18
|
/** Deshabilita la interacción. */
|
|
19
19
|
this.disabled = input(false, /* @ts-ignore */
|