@caribeng/ui 22.1.0 → 22.2.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 +52 -12
- package/fesm2022/caribeng-ui-accordion.mjs +2 -2
- package/fesm2022/caribeng-ui-anchor.mjs +169 -0
- package/fesm2022/caribeng-ui-autocomplete.mjs +10 -8
- package/fesm2022/caribeng-ui-avatargroup.mjs +9 -3
- package/fesm2022/caribeng-ui-blockui.mjs +12 -4
- package/fesm2022/caribeng-ui-breadcrumb.mjs +5 -2
- 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 +2598 -303
- package/fesm2022/caribeng-ui-chip.mjs +9 -4
- package/fesm2022/caribeng-ui-chips.mjs +9 -5
- package/fesm2022/caribeng-ui-colorpicker.mjs +9 -7
- package/fesm2022/caribeng-ui-confirmdialog.mjs +74 -9
- package/fesm2022/caribeng-ui-confirmpopup.mjs +134 -9
- package/fesm2022/caribeng-ui-contextmenu.mjs +6 -3
- package/fesm2022/caribeng-ui-dataview.mjs +211 -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 +6 -3
- package/fesm2022/caribeng-ui-drawer.mjs +10 -7
- package/fesm2022/caribeng-ui-dynamicdialog.mjs +210 -6
- package/fesm2022/caribeng-ui-editor.mjs +4392 -243
- package/fesm2022/caribeng-ui-empty.mjs +80 -0
- package/fesm2022/caribeng-ui-file-card.mjs +2 -2
- package/fesm2022/caribeng-ui-fileupload.mjs +96 -19
- package/fesm2022/caribeng-ui-floatlabel.mjs +4 -2
- package/fesm2022/caribeng-ui-folder-card.mjs +10 -3
- package/fesm2022/caribeng-ui-galleria.mjs +76 -45
- package/fesm2022/caribeng-ui-image.mjs +52 -29
- 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 +14 -11
- package/fesm2022/caribeng-ui-inputotp.mjs +12 -6
- package/fesm2022/caribeng-ui-keyfilter.mjs +72 -0
- package/fesm2022/caribeng-ui-listbox.mjs +13 -11
- package/fesm2022/caribeng-ui-megamenu.mjs +222 -30
- package/fesm2022/caribeng-ui-menu.mjs +11 -5
- package/fesm2022/caribeng-ui-menubar.mjs +10 -5
- package/fesm2022/caribeng-ui-message.mjs +7 -4
- 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 +12 -7
- package/fesm2022/caribeng-ui-paginator.mjs +18 -15
- package/fesm2022/caribeng-ui-panel.mjs +5 -2
- package/fesm2022/caribeng-ui-panelmenu.mjs +6 -3
- package/fesm2022/caribeng-ui-password.mjs +8 -6
- package/fesm2022/caribeng-ui-pdfviewer.mjs +1553 -0
- package/fesm2022/caribeng-ui-picklist.mjs +251 -14
- package/fesm2022/caribeng-ui-pricing.mjs +17 -14
- 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-scrollpanel.mjs +6 -3
- package/fesm2022/caribeng-ui-scrolltop.mjs +6 -3
- package/fesm2022/caribeng-ui-select.mjs +379 -87
- package/fesm2022/caribeng-ui-selectbutton.mjs +2 -2
- 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 +8 -5
- package/fesm2022/caribeng-ui-steps.mjs +6 -3
- package/fesm2022/caribeng-ui-table.mjs +708 -82
- package/fesm2022/caribeng-ui-tabmenu.mjs +6 -3
- 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 +9 -6
- 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 +829 -6
- package/package.json +70 -11
- package/schematics/collection.json +10 -0
- package/schematics/ng-add/index.js +125 -0
- package/schematics/ng-add/schema.js +2 -0
- package/schematics/ng-add/schema.json +66 -0
- package/styles/caribeng.css +380 -0
- package/styles/scss/_mixins.scss +46 -0
- package/styles/scss/_overlay.scss +15 -0
- package/styles/scss/_tokens.scss +267 -0
- package/styles/scss/_utilities.scss +73 -0
- package/styles/scss/_variables.scss +33 -0
- package/styles/scss/index.scss +16 -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-blockui.d.ts +9 -4
- package/types/caribeng-ui-breadcrumb.d.ts +3 -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 +469 -44
- package/types/caribeng-ui-chip.d.ts +6 -0
- package/types/caribeng-ui-chips.d.ts +6 -2
- package/types/caribeng-ui-colorpicker.d.ts +3 -1
- package/types/caribeng-ui-confirmdialog.d.ts +25 -6
- package/types/caribeng-ui-confirmpopup.d.ts +37 -5
- package/types/caribeng-ui-contextmenu.d.ts +4 -1
- package/types/caribeng-ui-dataview.d.ts +63 -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 +4 -1
- package/types/caribeng-ui-drawer.d.ts +4 -1
- 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 +1 -1
- package/types/caribeng-ui-fileupload.d.ts +27 -4
- package/types/caribeng-ui-folder-card.d.ts +4 -1
- 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 +5 -0
- package/types/caribeng-ui-inputotp.d.ts +7 -2
- 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 +26 -2
- package/types/caribeng-ui-menu.d.ts +7 -2
- package/types/caribeng-ui-menubar.d.ts +5 -1
- package/types/caribeng-ui-message.d.ts +3 -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 +4 -1
- package/types/caribeng-ui-password.d.ts +4 -2
- package/types/caribeng-ui-pdfviewer.d.ts +258 -0
- package/types/caribeng-ui-picklist.d.ts +67 -7
- package/types/caribeng-ui-pricing.d.ts +8 -5
- 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-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 +3 -0
- package/types/caribeng-ui-steps.d.ts +4 -1
- package/types/caribeng-ui-table.d.ts +184 -16
- package/types/caribeng-ui-tabmenu.d.ts +4 -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 +5 -2
- 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 +501 -12
|
@@ -35,6 +35,18 @@ class CbButton {
|
|
|
35
35
|
/** Tipo nativo del botón. */
|
|
36
36
|
this.type = input('button', /* @ts-ignore */
|
|
37
37
|
...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
|
|
38
|
+
/** Nombre accesible (imprescindible en botones de solo icono). */
|
|
39
|
+
this.ariaLabel = input(undefined, /* @ts-ignore */
|
|
40
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
41
|
+
/** Tipo de elemento que abre (`menu`, `dialog`, `listbox`…). */
|
|
42
|
+
this.ariaHaspopup = input(undefined, /* @ts-ignore */
|
|
43
|
+
...(ngDevMode ? [{ debugName: "ariaHaspopup" }] : /* istanbul ignore next */ []));
|
|
44
|
+
/** Si lo que abre está desplegado. */
|
|
45
|
+
this.ariaExpanded = input(undefined, /* @ts-ignore */
|
|
46
|
+
...(ngDevMode ? [{ debugName: "ariaExpanded" }] : /* istanbul ignore next */ []));
|
|
47
|
+
/** Id del elemento que controla. */
|
|
48
|
+
this.ariaControls = input(undefined, /* @ts-ignore */
|
|
49
|
+
...(ngDevMode ? [{ debugName: "ariaControls" }] : /* istanbul ignore next */ []));
|
|
38
50
|
this.variantClasses = computed(() => {
|
|
39
51
|
const severity = this.severity();
|
|
40
52
|
const classes = [
|
|
@@ -58,7 +70,7 @@ class CbButton {
|
|
|
58
70
|
'help',
|
|
59
71
|
]); }
|
|
60
72
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbButton, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
61
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: CbButton, isStandalone: true, selector: "cb-button", inputs: { severity: { classPropertyName: "severity", publicName: "severity", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.cb-button-host--block": "fullWidth()" }, classAttribute: "cb-button-host" }, ngImport: i0, template: `
|
|
73
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: CbButton, isStandalone: true, selector: "cb-button", inputs: { severity: { classPropertyName: "severity", publicName: "severity", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaHaspopup: { classPropertyName: "ariaHaspopup", publicName: "ariaHaspopup", isSignal: true, isRequired: false, transformFunction: null }, ariaExpanded: { classPropertyName: "ariaExpanded", publicName: "ariaExpanded", isSignal: true, isRequired: false, transformFunction: null }, ariaControls: { classPropertyName: "ariaControls", publicName: "ariaControls", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.cb-button-host--block": "fullWidth()" }, classAttribute: "cb-button-host" }, ngImport: i0, template: `
|
|
62
74
|
<button
|
|
63
75
|
class="cb-button"
|
|
64
76
|
[class]="variantClasses()"
|
|
@@ -67,6 +79,10 @@ class CbButton {
|
|
|
67
79
|
[attr.type]="type()"
|
|
68
80
|
[disabled]="disabled() || loading()"
|
|
69
81
|
[attr.aria-busy]="loading() ? 'true' : null"
|
|
82
|
+
[attr.aria-label]="ariaLabel() || null"
|
|
83
|
+
[attr.aria-haspopup]="ariaHaspopup() || null"
|
|
84
|
+
[attr.aria-expanded]="ariaExpanded() ?? null"
|
|
85
|
+
[attr.aria-controls]="ariaControls() || null"
|
|
70
86
|
>
|
|
71
87
|
@if (loading()) {
|
|
72
88
|
<cb-icon class="cb-button__spinner" name="loader" spin [size]="16" aria-hidden="true" />
|
|
@@ -91,6 +107,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
91
107
|
[attr.type]="type()"
|
|
92
108
|
[disabled]="disabled() || loading()"
|
|
93
109
|
[attr.aria-busy]="loading() ? 'true' : null"
|
|
110
|
+
[attr.aria-label]="ariaLabel() || null"
|
|
111
|
+
[attr.aria-haspopup]="ariaHaspopup() || null"
|
|
112
|
+
[attr.aria-expanded]="ariaExpanded() ?? null"
|
|
113
|
+
[attr.aria-controls]="ariaControls() || null"
|
|
94
114
|
>
|
|
95
115
|
@if (loading()) {
|
|
96
116
|
<cb-icon class="cb-button__spinner" name="loader" spin [size]="16" aria-hidden="true" />
|
|
@@ -100,7 +120,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
100
120
|
</span>
|
|
101
121
|
</button>
|
|
102
122
|
`, styles: [":host{display:inline-flex}:host(.cb-button-host--block){display:flex;width:100%}:host(.cb-button-host--block) .cb-button{width:100%}.cb-button{display:inline-flex;align-items:center;justify-content:center;gap:var(--cb-space-2);box-sizing:border-box;border:var(--cb-border-width) solid transparent;border-radius:var(--cb-radius-md);font-family:var(--cb-font-sans);font-weight:var(--cb-font-weight-semibold);line-height:var(--cb-line-height-tight);text-decoration:none;cursor:pointer;-webkit-user-select:none;user-select:none;background-color:transparent;transition:background-color var(--cb-duration-fast) var(--cb-ease),color var(--cb-duration-fast) var(--cb-ease),border-color var(--cb-duration-fast) var(--cb-ease),box-shadow var(--cb-duration-fast) var(--cb-ease)}.cb-button:focus-visible{outline:2px solid var(--cb-color-focus-ring);outline-offset:2px}.cb-button:disabled,.cb-button.cb-is-disabled{cursor:not-allowed;opacity:.55}.cb-button.cb-is-loading{cursor:progress}.cb-button--primary{--_50: var(--cb-color-primary-50);--_100: var(--cb-color-primary-100);--_200: var(--cb-color-primary-200);--_300: var(--cb-color-primary-300);--_400: var(--cb-color-primary-400);--_500: var(--cb-color-primary-500);--_600: var(--cb-color-primary-600);--_700: var(--cb-color-primary-700);--_950: var(--cb-color-primary-950)}.cb-button--success{--_50: var(--cb-color-success-50);--_100: var(--cb-color-success-100);--_200: var(--cb-color-success-200);--_300: var(--cb-color-success-300);--_400: var(--cb-color-success-400);--_500: var(--cb-color-success-500);--_600: var(--cb-color-success-600);--_700: var(--cb-color-success-700);--_950: var(--cb-color-success-950)}.cb-button--info{--_50: var(--cb-color-info-50);--_100: var(--cb-color-info-100);--_200: var(--cb-color-info-200);--_300: var(--cb-color-info-300);--_400: var(--cb-color-info-400);--_500: var(--cb-color-info-500);--_600: var(--cb-color-info-600);--_700: var(--cb-color-info-700);--_950: var(--cb-color-info-950)}.cb-button--warning{--_50: var(--cb-color-warning-50);--_100: var(--cb-color-warning-100);--_200: var(--cb-color-warning-200);--_300: var(--cb-color-warning-300);--_400: var(--cb-color-warning-400);--_500: var(--cb-color-warning-500);--_600: var(--cb-color-warning-600);--_700: var(--cb-color-warning-700);--_950: var(--cb-color-warning-950)}.cb-button--danger{--_50: var(--cb-color-danger-50);--_100: var(--cb-color-danger-100);--_200: var(--cb-color-danger-200);--_300: var(--cb-color-danger-300);--_400: var(--cb-color-danger-400);--_500: var(--cb-color-danger-500);--_600: var(--cb-color-danger-600);--_700: var(--cb-color-danger-700);--_950: var(--cb-color-danger-950)}.cb-button--help{--_50: var(--cb-color-help-50);--_100: var(--cb-color-help-100);--_200: var(--cb-color-help-200);--_300: var(--cb-color-help-300);--_400: var(--cb-color-help-400);--_500: var(--cb-color-help-500);--_600: var(--cb-color-help-600);--_700: var(--cb-color-help-700);--_950: var(--cb-color-help-950)}.cb-button--chromatic.cb-button--solid{background-color:var(--_500);color:#fff;border-color:var(--_500)}.cb-button--chromatic.cb-button--solid:hover:not(:disabled):not(.cb-is-loading){background-color:var(--_600);border-color:var(--_600)}.cb-button--chromatic.cb-button--solid:active:not(:disabled):not(.cb-is-loading){background-color:var(--_700);border-color:var(--_700)}.cb-button--chromatic.cb-button--outlined{color:var(--_500);border-color:var(--_200)}.cb-button--chromatic.cb-button--outlined:hover:not(:disabled):not(.cb-is-loading){background-color:var(--_50)}.cb-button--chromatic.cb-button--outlined:active:not(:disabled):not(.cb-is-loading){background-color:var(--_100)}.cb-button--chromatic.cb-button--text{color:var(--_500)}.cb-button--chromatic.cb-button--text:hover:not(:disabled):not(.cb-is-loading){background-color:var(--_50)}.cb-button--chromatic.cb-button--text:active:not(:disabled):not(.cb-is-loading){background-color:var(--_100)}:host-context([data-theme=\"dark\"]) .cb-button--chromatic.cb-button--solid{background-color:var(--_400);color:var(--_950);border-color:var(--_400)}:host-context([data-theme=\"dark\"]) .cb-button--chromatic.cb-button--solid:hover:not(:disabled):not(.cb-is-loading){background-color:var(--_300);border-color:var(--_300)}:host-context([data-theme=\"dark\"]) .cb-button--chromatic.cb-button--solid:active:not(:disabled):not(.cb-is-loading){background-color:var(--_200);border-color:var(--_200)}:host-context([data-theme=\"dark\"]) .cb-button--chromatic.cb-button--outlined{color:var(--_400);border-color:var(--_700)}:host-context([data-theme=\"dark\"]) .cb-button--chromatic.cb-button--text{color:var(--_400)}:host-context([data-theme=\"dark\"]) .cb-button--chromatic.cb-button--outlined:hover:not(:disabled):not(.cb-is-loading),:host-context([data-theme=\"dark\"]) .cb-button--chromatic.cb-button--text:hover:not(:disabled):not(.cb-is-loading){background-color:color-mix(in srgb,var(--_400) 6%,transparent)}:host-context([data-theme=\"dark\"]) .cb-button--chromatic.cb-button--outlined:active:not(:disabled):not(.cb-is-loading),:host-context([data-theme=\"dark\"]) .cb-button--chromatic.cb-button--text:active:not(:disabled):not(.cb-is-loading){background-color:color-mix(in srgb,var(--_400) 16%,transparent)}.cb-button--secondary.cb-button--solid{background-color:var(--cb-color-surface-100);color:var(--cb-color-surface-600);border-color:var(--cb-color-surface-100)}.cb-button--secondary.cb-button--solid:hover:not(:disabled):not(.cb-is-loading){background-color:var(--cb-color-surface-200);border-color:var(--cb-color-surface-200)}.cb-button--secondary.cb-button--solid:active:not(:disabled):not(.cb-is-loading){background-color:var(--cb-color-surface-300);border-color:var(--cb-color-surface-300)}.cb-button--secondary.cb-button--outlined{color:var(--cb-color-surface-500);border-color:var(--cb-color-surface-200)}.cb-button--secondary.cb-button--text{color:var(--cb-color-surface-500)}.cb-button--secondary.cb-button--outlined:hover:not(:disabled):not(.cb-is-loading),.cb-button--secondary.cb-button--text:hover:not(:disabled):not(.cb-is-loading){background-color:var(--cb-color-surface-50)}.cb-button--secondary.cb-button--outlined:active:not(:disabled):not(.cb-is-loading),.cb-button--secondary.cb-button--text:active:not(:disabled):not(.cb-is-loading){background-color:var(--cb-color-surface-100)}:host-context([data-theme=\"dark\"]) .cb-button--secondary.cb-button--solid{background-color:var(--cb-color-surface-800);color:var(--cb-color-surface-300);border-color:var(--cb-color-surface-800)}:host-context([data-theme=\"dark\"]) .cb-button--secondary.cb-button--solid:hover:not(:disabled):not(.cb-is-loading){background-color:var(--cb-color-surface-700);border-color:var(--cb-color-surface-700)}:host-context([data-theme=\"dark\"]) .cb-button--secondary.cb-button--solid:active:not(:disabled):not(.cb-is-loading){background-color:var(--cb-color-surface-600);border-color:var(--cb-color-surface-600)}:host-context([data-theme=\"dark\"]) .cb-button--secondary.cb-button--outlined{color:var(--cb-color-surface-400);border-color:var(--cb-color-surface-700)}:host-context([data-theme=\"dark\"]) .cb-button--secondary.cb-button--text{color:var(--cb-color-surface-400)}:host-context([data-theme=\"dark\"]) .cb-button--secondary.cb-button--outlined:hover:not(:disabled):not(.cb-is-loading),:host-context([data-theme=\"dark\"]) .cb-button--secondary.cb-button--text:hover:not(:disabled):not(.cb-is-loading){background-color:color-mix(in srgb,var(--cb-color-surface-0) 6%,transparent)}:host-context([data-theme=\"dark\"]) .cb-button--secondary.cb-button--outlined:active:not(:disabled):not(.cb-is-loading),:host-context([data-theme=\"dark\"]) .cb-button--secondary.cb-button--text:active:not(:disabled):not(.cb-is-loading){background-color:color-mix(in srgb,var(--cb-color-surface-0) 14%,transparent)}.cb-button--contrast.cb-button--solid{background-color:var(--cb-color-surface-950);color:var(--cb-color-surface-0);border-color:var(--cb-color-surface-950)}.cb-button--contrast.cb-button--solid:hover:not(:disabled):not(.cb-is-loading){background-color:var(--cb-color-surface-900);border-color:var(--cb-color-surface-900)}.cb-button--contrast.cb-button--solid:active:not(:disabled):not(.cb-is-loading){background-color:var(--cb-color-surface-800);border-color:var(--cb-color-surface-800)}.cb-button--contrast.cb-button--outlined{color:var(--cb-color-surface-950);border-color:var(--cb-color-surface-700)}.cb-button--contrast.cb-button--text{color:var(--cb-color-surface-950)}.cb-button--contrast.cb-button--outlined:hover:not(:disabled):not(.cb-is-loading),.cb-button--contrast.cb-button--text:hover:not(:disabled):not(.cb-is-loading){background-color:var(--cb-color-surface-50)}.cb-button--contrast.cb-button--outlined:active:not(:disabled):not(.cb-is-loading),.cb-button--contrast.cb-button--text:active:not(:disabled):not(.cb-is-loading){background-color:var(--cb-color-surface-100)}:host-context([data-theme=\"dark\"]) .cb-button--contrast.cb-button--solid{background-color:var(--cb-color-surface-0);color:var(--cb-color-surface-950);border-color:var(--cb-color-surface-0)}:host-context([data-theme=\"dark\"]) .cb-button--contrast.cb-button--solid:hover:not(:disabled):not(.cb-is-loading){background-color:var(--cb-color-surface-100);border-color:var(--cb-color-surface-100)}:host-context([data-theme=\"dark\"]) .cb-button--contrast.cb-button--solid:active:not(:disabled):not(.cb-is-loading){background-color:var(--cb-color-surface-200);border-color:var(--cb-color-surface-200)}:host-context([data-theme=\"dark\"]) .cb-button--contrast.cb-button--outlined{color:var(--cb-color-surface-0);border-color:var(--cb-color-surface-500)}:host-context([data-theme=\"dark\"]) .cb-button--contrast.cb-button--text{color:var(--cb-color-surface-0)}:host-context([data-theme=\"dark\"]) .cb-button--contrast.cb-button--outlined:hover:not(:disabled):not(.cb-is-loading),:host-context([data-theme=\"dark\"]) .cb-button--contrast.cb-button--text:hover:not(:disabled):not(.cb-is-loading){background-color:var(--cb-color-surface-800)}:host-context([data-theme=\"dark\"]) .cb-button--contrast.cb-button--outlined:active:not(:disabled):not(.cb-is-loading),:host-context([data-theme=\"dark\"]) .cb-button--contrast.cb-button--text:active:not(:disabled):not(.cb-is-loading){background-color:var(--cb-color-surface-700)}.cb-button--sm{min-height:2rem;padding:var(--cb-space-1) var(--cb-space-3);font-size:var(--cb-text-sm)}.cb-button--md{min-height:2.5rem;padding:var(--cb-space-2) var(--cb-space-4);font-size:var(--cb-text-base)}.cb-button--lg{min-height:3rem;padding:var(--cb-space-3) var(--cb-space-6);font-size:var(--cb-text-lg)}.cb-button__content{display:inline-flex;align-items:center;gap:var(--cb-space-2)}.cb-button__spinner{color:currentColor}\n"] }]
|
|
103
|
-
}], propDecorators: { severity: [{ type: i0.Input, args: [{ isSignal: true, alias: "severity", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }] } });
|
|
123
|
+
}], propDecorators: { severity: [{ type: i0.Input, args: [{ isSignal: true, alias: "severity", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaHaspopup: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaHaspopup", required: false }] }], ariaExpanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaExpanded", required: false }] }], ariaControls: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaControls", required: false }] }] } });
|
|
104
124
|
function toBoolean(value) {
|
|
105
125
|
return value !== false && value != null && `${value}` !== 'false';
|
|
106
126
|
}
|
|
@@ -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 } from '@caribeng/ui';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Alert de Caribe Design: banner de notificación con severidad, título,
|
|
@@ -12,6 +13,8 @@ import { input, model, output, ViewEncapsulation, ChangeDetectionStrategy, Compo
|
|
|
12
13
|
*/
|
|
13
14
|
class CbAlert {
|
|
14
15
|
constructor() {
|
|
16
|
+
/** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
|
|
17
|
+
this.t = injectCbTranslation();
|
|
15
18
|
this.title = input('', /* @ts-ignore */
|
|
16
19
|
...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
17
20
|
this.severity = input('info', /* @ts-ignore */
|
|
@@ -53,7 +56,7 @@ class CbAlert {
|
|
|
53
56
|
<button
|
|
54
57
|
type="button"
|
|
55
58
|
class="cb-alert__close"
|
|
56
|
-
aria-label="
|
|
59
|
+
[attr.aria-label]="t().close"
|
|
57
60
|
(click)="close()"
|
|
58
61
|
>
|
|
59
62
|
×
|
|
@@ -79,7 +82,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
79
82
|
<button
|
|
80
83
|
type="button"
|
|
81
84
|
class="cb-alert__close"
|
|
82
|
-
aria-label="
|
|
85
|
+
[attr.aria-label]="t().close"
|
|
83
86
|
(click)="close()"
|
|
84
87
|
>
|
|
85
88
|
×
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { input, signal, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { injectCbTranslation } from '@caribeng/ui';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Animation-lottie de Caribe Design: contenedor de animación (placeholder
|
|
@@ -12,6 +13,8 @@ import { input, signal, ViewEncapsulation, ChangeDetectionStrategy, Component }
|
|
|
12
13
|
*/
|
|
13
14
|
class CbAnimationLottie {
|
|
14
15
|
constructor() {
|
|
16
|
+
/** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
|
|
17
|
+
this.t = injectCbTranslation();
|
|
15
18
|
this.src = input('', /* @ts-ignore */
|
|
16
19
|
...(ngDevMode ? [{ debugName: "src" }] : /* istanbul ignore next */ []));
|
|
17
20
|
this.autoplay = input(true, /* @ts-ignore */
|
|
@@ -20,7 +23,7 @@ class CbAnimationLottie {
|
|
|
20
23
|
...(ngDevMode ? [{ debugName: "loop" }] : /* istanbul ignore next */ []));
|
|
21
24
|
this.size = input('96px', /* @ts-ignore */
|
|
22
25
|
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
23
|
-
this.ariaLabel = input(
|
|
26
|
+
this.ariaLabel = input(undefined, /* @ts-ignore */
|
|
24
27
|
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
25
28
|
this.playing = signal(true, /* @ts-ignore */
|
|
26
29
|
...(ngDevMode ? [{ debugName: "playing" }] : /* istanbul ignore next */ []));
|
|
@@ -33,7 +36,7 @@ class CbAnimationLottie {
|
|
|
33
36
|
}
|
|
34
37
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbAnimationLottie, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
35
38
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: CbAnimationLottie, isStandalone: true, selector: "cb-animation-lottie", inputs: { src: { classPropertyName: "src", publicName: "src", isSignal: true, isRequired: false, transformFunction: null }, autoplay: { classPropertyName: "autoplay", publicName: "autoplay", isSignal: true, isRequired: false, transformFunction: null }, loop: { classPropertyName: "loop", publicName: "loop", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.width": "size()", "style.height": "size()" }, classAttribute: "cb-animation-lottie-host" }, ngImport: i0, template: `
|
|
36
|
-
<div class="cb-animation-lottie" role="img" [attr.aria-label]="ariaLabel()">
|
|
39
|
+
<div class="cb-animation-lottie" role="img" [attr.aria-label]="(ariaLabel() ?? t().animation)">
|
|
37
40
|
<svg
|
|
38
41
|
class="cb-animation-lottie__svg"
|
|
39
42
|
[class.cb-is-playing]="playing()"
|
|
@@ -61,7 +64,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
61
64
|
'[style.width]': 'size()',
|
|
62
65
|
'[style.height]': 'size()',
|
|
63
66
|
}, template: `
|
|
64
|
-
<div class="cb-animation-lottie" role="img" [attr.aria-label]="ariaLabel()">
|
|
67
|
+
<div class="cb-animation-lottie" role="img" [attr.aria-label]="(ariaLabel() ?? t().animation)">
|
|
65
68
|
<svg
|
|
66
69
|
class="cb-animation-lottie__svg"
|
|
67
70
|
[class.cb-is-playing]="playing()"
|
|
@@ -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
|
* Button-group de Caribe Design: contenedor que agrupa acciones relacionadas
|
|
@@ -14,15 +15,17 @@ import { input, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@a
|
|
|
14
15
|
*/
|
|
15
16
|
class CbButtonGroup {
|
|
16
17
|
constructor() {
|
|
18
|
+
/** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
|
|
19
|
+
this.t = injectCbTranslation();
|
|
17
20
|
/** Dirección del grupo. */
|
|
18
21
|
this.orientation = input('horizontal', /* @ts-ignore */
|
|
19
22
|
...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
20
23
|
/** Etiqueta accesible del grupo. */
|
|
21
|
-
this.ariaLabel = input(
|
|
24
|
+
this.ariaLabel = input(undefined, /* @ts-ignore */
|
|
22
25
|
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
23
26
|
}
|
|
24
27
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbButtonGroup, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
25
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: CbButtonGroup, isStandalone: true, selector: "cb-button-group", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "group" }, properties: { "attr.aria-label": "ariaLabel()", "class.cb-button-group-host--vertical": "orientation() === 'vertical'" }, classAttribute: "cb-button-group-host" }, ngImport: i0, template: `
|
|
28
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: CbButtonGroup, isStandalone: true, selector: "cb-button-group", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "group" }, properties: { "attr.aria-label": "(ariaLabel() ?? t().actionGroup)", "class.cb-button-group-host--vertical": "orientation() === 'vertical'" }, classAttribute: "cb-button-group-host" }, ngImport: i0, template: `
|
|
26
29
|
<div
|
|
27
30
|
class="cb-button-group"
|
|
28
31
|
[class.cb-button-group--vertical]="orientation() === 'vertical'"
|
|
@@ -36,7 +39,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
36
39
|
args: [{ selector: 'cb-button-group', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, host: {
|
|
37
40
|
class: 'cb-button-group-host',
|
|
38
41
|
role: 'group',
|
|
39
|
-
'[attr.aria-label]': 'ariaLabel()',
|
|
42
|
+
'[attr.aria-label]': '(ariaLabel() ?? t().actionGroup)',
|
|
40
43
|
'[class.cb-button-group-host--vertical]': "orientation() === 'vertical'",
|
|
41
44
|
}, template: `
|
|
42
45
|
<div
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { input, model, computed, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { injectCbTranslation } from '@caribeng/ui';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Calendar de Caribe Design: cuadrícula mensual con selección de día.
|
|
@@ -11,13 +12,17 @@ import { input, model, computed, ViewEncapsulation, ChangeDetectionStrategy, Com
|
|
|
11
12
|
*/
|
|
12
13
|
class CbCalendar {
|
|
13
14
|
constructor() {
|
|
14
|
-
this.monthLabel = input('
|
|
15
|
+
this.monthLabel = input('', /* @ts-ignore */
|
|
15
16
|
...(ngDevMode ? [{ debugName: "monthLabel" }] : /* istanbul ignore next */ []));
|
|
16
17
|
this.totalDays = input(31, /* @ts-ignore */
|
|
17
18
|
...(ngDevMode ? [{ debugName: "totalDays" }] : /* istanbul ignore next */ []));
|
|
18
19
|
this.selectedDay = model(17, /* @ts-ignore */
|
|
19
20
|
...(ngDevMode ? [{ debugName: "selectedDay" }] : /* istanbul ignore next */ []));
|
|
20
|
-
|
|
21
|
+
/** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
|
|
22
|
+
this.t = injectCbTranslation();
|
|
23
|
+
/** Iniciales de lunes a domingo en el idioma activo. */
|
|
24
|
+
this.weekdays = computed(() => this.t().weekdaysMin.split(','), /* @ts-ignore */
|
|
25
|
+
...(ngDevMode ? [{ debugName: "weekdays" }] : /* istanbul ignore next */ []));
|
|
21
26
|
this.days = computed(() => Array.from({ length: Math.max(28, Math.min(31, this.totalDays())) }, (_, i) => i + 1), /* @ts-ignore */
|
|
22
27
|
...(ngDevMode ? [{ debugName: "days" }] : /* istanbul ignore next */ []));
|
|
23
28
|
}
|
|
@@ -31,11 +36,11 @@ class CbCalendar {
|
|
|
31
36
|
<strong class="cb-calendar__month">{{ monthLabel() }}</strong>
|
|
32
37
|
</header>
|
|
33
38
|
<div class="cb-calendar__weekdays" aria-hidden="true">
|
|
34
|
-
@for (w of weekdays; track
|
|
39
|
+
@for (w of weekdays(); track $index) {
|
|
35
40
|
<span class="cb-calendar__weekday">{{ w }}</span>
|
|
36
41
|
}
|
|
37
42
|
</div>
|
|
38
|
-
<div class="cb-calendar__grid" role="
|
|
43
|
+
<div class="cb-calendar__grid" role="group" [attr.aria-label]="monthLabel() || null">
|
|
39
44
|
@for (d of days(); track d) {
|
|
40
45
|
<button
|
|
41
46
|
type="button"
|
|
@@ -59,11 +64,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
59
64
|
<strong class="cb-calendar__month">{{ monthLabel() }}</strong>
|
|
60
65
|
</header>
|
|
61
66
|
<div class="cb-calendar__weekdays" aria-hidden="true">
|
|
62
|
-
@for (w of weekdays; track
|
|
67
|
+
@for (w of weekdays(); track $index) {
|
|
63
68
|
<span class="cb-calendar__weekday">{{ w }}</span>
|
|
64
69
|
}
|
|
65
70
|
</div>
|
|
66
|
-
<div class="cb-calendar__grid" role="
|
|
71
|
+
<div class="cb-calendar__grid" role="group" [attr.aria-label]="monthLabel() || null">
|
|
67
72
|
@for (d of days(); track d) {
|
|
68
73
|
<button
|
|
69
74
|
type="button"
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { input, output, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { injectCbTranslation } from '@caribeng/ui';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Card-content de Caribe Design: tarjeta de contenido con título, subtítulo,
|
|
@@ -12,11 +13,13 @@ import { input, output, ViewEncapsulation, ChangeDetectionStrategy, Component }
|
|
|
12
13
|
*/
|
|
13
14
|
class CbCardContent {
|
|
14
15
|
constructor() {
|
|
16
|
+
/** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
|
|
17
|
+
this.t = injectCbTranslation();
|
|
15
18
|
this.title = input('', /* @ts-ignore */
|
|
16
19
|
...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
17
20
|
this.subtitle = input('', /* @ts-ignore */
|
|
18
21
|
...(ngDevMode ? [{ debugName: "subtitle" }] : /* istanbul ignore next */ []));
|
|
19
|
-
this.actionLabel = input(
|
|
22
|
+
this.actionLabel = input(undefined, /* @ts-ignore */
|
|
20
23
|
...(ngDevMode ? [{ debugName: "actionLabel" }] : /* istanbul ignore next */ []));
|
|
21
24
|
this.action = output();
|
|
22
25
|
}
|
|
@@ -36,7 +39,7 @@ class CbCardContent {
|
|
|
36
39
|
class="cb-card-content__action"
|
|
37
40
|
(click)="action.emit()"
|
|
38
41
|
>
|
|
39
|
-
{{ actionLabel() }}
|
|
42
|
+
{{ (actionLabel() ?? t().viewDetails) }}
|
|
40
43
|
</button>
|
|
41
44
|
</footer>
|
|
42
45
|
</article>
|
|
@@ -59,7 +62,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
59
62
|
class="cb-card-content__action"
|
|
60
63
|
(click)="action.emit()"
|
|
61
64
|
>
|
|
62
|
-
{{ actionLabel() }}
|
|
65
|
+
{{ (actionLabel() ?? t().viewDetails) }}
|
|
63
66
|
</button>
|
|
64
67
|
</footer>
|
|
65
68
|
</article>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { model, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { model, inject, ElementRef, Injector, afterNextRender, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { injectCbTranslation } from '@caribeng/ui';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Card-move de Caribe Design: lista de elementos reordenables mediante botones
|
|
@@ -10,10 +11,17 @@ import { model, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@a
|
|
|
10
11
|
* <cb-card-move [(items)]="opciones" />
|
|
11
12
|
* ```
|
|
12
13
|
*/
|
|
14
|
+
let nextId = 0;
|
|
13
15
|
class CbCardMove {
|
|
14
16
|
constructor() {
|
|
17
|
+
/** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
|
|
18
|
+
this.t = injectCbTranslation();
|
|
15
19
|
this.items = model([], /* @ts-ignore */
|
|
16
20
|
...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
21
|
+
/** Prefijo de ids: cada botón se describe con la etiqueta de su elemento. */
|
|
22
|
+
this.uid = `cb-card-move-${++nextId}`;
|
|
23
|
+
this.host = inject(ElementRef);
|
|
24
|
+
this.injector = inject(Injector);
|
|
17
25
|
}
|
|
18
26
|
move(index, delta) {
|
|
19
27
|
const next = [...this.items()];
|
|
@@ -22,6 +30,16 @@ class CbCardMove {
|
|
|
22
30
|
return;
|
|
23
31
|
[next[index], next[target]] = [next[target], next[index]];
|
|
24
32
|
this.items.set(next);
|
|
33
|
+
this.followItem(target, delta);
|
|
34
|
+
}
|
|
35
|
+
/** El foco sigue al elemento movido; si su botón queda deshabilitado (extremo), pasa al otro. */
|
|
36
|
+
followItem(row, delta) {
|
|
37
|
+
afterNextRender(() => {
|
|
38
|
+
const items = this.host.nativeElement.querySelectorAll('.cb-card-move__item');
|
|
39
|
+
const buttons = Array.from(items[row]?.querySelectorAll('.cb-card-move__btn') ?? []);
|
|
40
|
+
const same = buttons[delta < 0 ? 0 : 1];
|
|
41
|
+
(same && !same.disabled ? same : buttons.find((b) => !b.disabled))?.focus();
|
|
42
|
+
}, { injector: this.injector });
|
|
25
43
|
}
|
|
26
44
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbCardMove, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
27
45
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: CbCardMove, isStandalone: true, selector: "cb-card-move", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { items: "itemsChange" }, ngImport: i0, template: `
|
|
@@ -29,12 +47,13 @@ class CbCardMove {
|
|
|
29
47
|
<ul class="cb-card-move__list">
|
|
30
48
|
@for (item of items(); track $index) {
|
|
31
49
|
<li class="cb-card-move__item">
|
|
32
|
-
<span class="cb-card-move__label">{{ item }}</span>
|
|
50
|
+
<span class="cb-card-move__label" [id]="uid + '-' + $index">{{ item }}</span>
|
|
33
51
|
<span class="cb-card-move__controls">
|
|
34
52
|
<button
|
|
35
53
|
type="button"
|
|
36
54
|
class="cb-card-move__btn"
|
|
37
|
-
aria-label="
|
|
55
|
+
[attr.aria-label]="t().moveUp"
|
|
56
|
+
[attr.aria-describedby]="uid + '-' + $index"
|
|
38
57
|
[disabled]="$first"
|
|
39
58
|
(click)="move($index, -1)"
|
|
40
59
|
>
|
|
@@ -43,7 +62,8 @@ class CbCardMove {
|
|
|
43
62
|
<button
|
|
44
63
|
type="button"
|
|
45
64
|
class="cb-card-move__btn"
|
|
46
|
-
aria-label="
|
|
65
|
+
[attr.aria-label]="t().moveDown"
|
|
66
|
+
[attr.aria-describedby]="uid + '-' + $index"
|
|
47
67
|
[disabled]="$last"
|
|
48
68
|
(click)="move($index, 1)"
|
|
49
69
|
>
|
|
@@ -63,12 +83,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
63
83
|
<ul class="cb-card-move__list">
|
|
64
84
|
@for (item of items(); track $index) {
|
|
65
85
|
<li class="cb-card-move__item">
|
|
66
|
-
<span class="cb-card-move__label">{{ item }}</span>
|
|
86
|
+
<span class="cb-card-move__label" [id]="uid + '-' + $index">{{ item }}</span>
|
|
67
87
|
<span class="cb-card-move__controls">
|
|
68
88
|
<button
|
|
69
89
|
type="button"
|
|
70
90
|
class="cb-card-move__btn"
|
|
71
|
-
aria-label="
|
|
91
|
+
[attr.aria-label]="t().moveUp"
|
|
92
|
+
[attr.aria-describedby]="uid + '-' + $index"
|
|
72
93
|
[disabled]="$first"
|
|
73
94
|
(click)="move($index, -1)"
|
|
74
95
|
>
|
|
@@ -77,7 +98,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
77
98
|
<button
|
|
78
99
|
type="button"
|
|
79
100
|
class="cb-card-move__btn"
|
|
80
|
-
aria-label="
|
|
101
|
+
[attr.aria-label]="t().moveDown"
|
|
102
|
+
[attr.aria-describedby]="uid + '-' + $index"
|
|
81
103
|
[disabled]="$last"
|
|
82
104
|
(click)="move($index, 1)"
|
|
83
105
|
>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, model, output, computed, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { input, model, output, inject, ElementRef, computed, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { injectCbTranslation } from '@caribeng/ui';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Card-select de Caribe Design: tarjeta con buscador y lista de opciones
|
|
@@ -12,18 +13,47 @@ import { input, model, output, computed, ViewEncapsulation, ChangeDetectionStrat
|
|
|
12
13
|
*/
|
|
13
14
|
class CbCardSelect {
|
|
14
15
|
constructor() {
|
|
16
|
+
/** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
|
|
17
|
+
this.t = injectCbTranslation();
|
|
15
18
|
this.items = input([], /* @ts-ignore */
|
|
16
19
|
...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
17
|
-
this.label = input(
|
|
20
|
+
this.label = input(undefined, /* @ts-ignore */
|
|
18
21
|
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
19
22
|
this.selected = model(null, /* @ts-ignore */
|
|
20
23
|
...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
|
|
21
24
|
this.selectionChange = output();
|
|
22
25
|
this.query = model('', /* @ts-ignore */
|
|
23
26
|
...(ngDevMode ? [{ debugName: "query" }] : /* istanbul ignore next */ []));
|
|
27
|
+
this.host = inject(ElementRef);
|
|
28
|
+
/** Opción que entra en el orden de tabulación: la elegida o, si no está visible, la primera. */
|
|
29
|
+
this.tabbable = computed(() => Math.max(0, this.filtered().indexOf(this.selected() ?? '')), /* @ts-ignore */
|
|
30
|
+
...(ngDevMode ? [{ debugName: "tabbable" }] : /* istanbul ignore next */ []));
|
|
24
31
|
this.filtered = computed(() => this.items().filter((x) => x.toLocaleLowerCase().includes(this.query().toLocaleLowerCase())), /* @ts-ignore */
|
|
25
32
|
...(ngDevMode ? [{ debugName: "filtered" }] : /* istanbul ignore next */ []));
|
|
26
33
|
}
|
|
34
|
+
choose(item) {
|
|
35
|
+
this.selected.set(item);
|
|
36
|
+
this.selectionChange.emit(item);
|
|
37
|
+
}
|
|
38
|
+
/** Patrón *listbox*: flechas (circular), Inicio y Fin mueven el foco; Enter / Espacio eligen (botón nativo). */
|
|
39
|
+
onListKeydown(event) {
|
|
40
|
+
const options = Array.from(this.host.nativeElement.querySelectorAll('.cb-card-select__option'));
|
|
41
|
+
const cur = options.indexOf(event.target);
|
|
42
|
+
if (cur < 0)
|
|
43
|
+
return;
|
|
44
|
+
const last = options.length - 1;
|
|
45
|
+
const target = event.key === 'ArrowDown' ? (cur < last ? cur + 1 : 0)
|
|
46
|
+
: event.key === 'ArrowUp' ? (cur > 0 ? cur - 1 : last)
|
|
47
|
+
: event.key === 'Home' ? 0
|
|
48
|
+
: event.key === 'End' ? last
|
|
49
|
+
: -1;
|
|
50
|
+
if (target < 0)
|
|
51
|
+
return;
|
|
52
|
+
event.preventDefault();
|
|
53
|
+
for (const [i, option] of options.entries())
|
|
54
|
+
option.tabIndex = i === target ? 0 : -1;
|
|
55
|
+
options[target].focus();
|
|
56
|
+
}
|
|
27
57
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbCardSelect, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
28
58
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: CbCardSelect, isStandalone: true, selector: "cb-card-select", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, query: { classPropertyName: "query", publicName: "query", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selectedChange", selectionChange: "selectionChange", query: "queryChange" }, ngImport: i0, template: `
|
|
29
59
|
<section class="cb-card-select">
|
|
@@ -32,23 +62,29 @@ class CbCardSelect {
|
|
|
32
62
|
type="search"
|
|
33
63
|
[value]="query()"
|
|
34
64
|
(input)="query.set($any($event.target).value)"
|
|
35
|
-
aria-label="
|
|
36
|
-
placeholder="
|
|
65
|
+
[attr.aria-label]="t().filterOptions"
|
|
66
|
+
[placeholder]="t().search"
|
|
37
67
|
/>
|
|
38
|
-
<div
|
|
39
|
-
|
|
68
|
+
<div
|
|
69
|
+
class="cb-card-select__list"
|
|
70
|
+
role="listbox"
|
|
71
|
+
[attr.aria-label]="(label() ?? t().options)"
|
|
72
|
+
(keydown)="onListKeydown($event)"
|
|
73
|
+
>
|
|
74
|
+
@for (item of filtered(); track $index) {
|
|
40
75
|
<button
|
|
41
76
|
type="button"
|
|
42
77
|
class="cb-card-select__option"
|
|
43
78
|
role="option"
|
|
44
79
|
[class.cb-is-selected]="selected() === item"
|
|
45
80
|
[attr.aria-selected]="selected() === item"
|
|
46
|
-
|
|
81
|
+
[attr.tabindex]="$index === tabbable() ? 0 : -1"
|
|
82
|
+
(click)="choose(item)"
|
|
47
83
|
>
|
|
48
84
|
{{ item }}
|
|
49
85
|
</button>
|
|
50
86
|
} @empty {
|
|
51
|
-
<span class="cb-card-select__empty">
|
|
87
|
+
<span class="cb-card-select__empty">{{ t().noResults }}</span>
|
|
52
88
|
}
|
|
53
89
|
</div>
|
|
54
90
|
</section>
|
|
@@ -63,23 +99,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
63
99
|
type="search"
|
|
64
100
|
[value]="query()"
|
|
65
101
|
(input)="query.set($any($event.target).value)"
|
|
66
|
-
aria-label="
|
|
67
|
-
placeholder="
|
|
102
|
+
[attr.aria-label]="t().filterOptions"
|
|
103
|
+
[placeholder]="t().search"
|
|
68
104
|
/>
|
|
69
|
-
<div
|
|
70
|
-
|
|
105
|
+
<div
|
|
106
|
+
class="cb-card-select__list"
|
|
107
|
+
role="listbox"
|
|
108
|
+
[attr.aria-label]="(label() ?? t().options)"
|
|
109
|
+
(keydown)="onListKeydown($event)"
|
|
110
|
+
>
|
|
111
|
+
@for (item of filtered(); track $index) {
|
|
71
112
|
<button
|
|
72
113
|
type="button"
|
|
73
114
|
class="cb-card-select__option"
|
|
74
115
|
role="option"
|
|
75
116
|
[class.cb-is-selected]="selected() === item"
|
|
76
117
|
[attr.aria-selected]="selected() === item"
|
|
77
|
-
|
|
118
|
+
[attr.tabindex]="$index === tabbable() ? 0 : -1"
|
|
119
|
+
(click)="choose(item)"
|
|
78
120
|
>
|
|
79
121
|
{{ item }}
|
|
80
122
|
</button>
|
|
81
123
|
} @empty {
|
|
82
|
-
<span class="cb-card-select__empty">
|
|
124
|
+
<span class="cb-card-select__empty">{{ t().noResults }}</span>
|
|
83
125
|
}
|
|
84
126
|
</div>
|
|
85
127
|
</section>
|
|
@@ -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
|
* Circle-loading de Caribe Design: progreso circular determinado o
|
|
@@ -13,13 +14,15 @@ import { input, computed, ViewEncapsulation, ChangeDetectionStrategy, Component
|
|
|
13
14
|
*/
|
|
14
15
|
class CbCircleLoading {
|
|
15
16
|
constructor() {
|
|
17
|
+
/** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
|
|
18
|
+
this.t = injectCbTranslation();
|
|
16
19
|
this.progress = input(65, /* @ts-ignore */
|
|
17
20
|
...(ngDevMode ? [{ debugName: "progress" }] : /* istanbul ignore next */ []));
|
|
18
21
|
this.size = input(48, /* @ts-ignore */
|
|
19
22
|
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
20
23
|
this.indeterminate = input(false, /* @ts-ignore */
|
|
21
24
|
...(ngDevMode ? [{ debugName: "indeterminate" }] : /* istanbul ignore next */ []));
|
|
22
|
-
this.label = input(
|
|
25
|
+
this.label = input(undefined, /* @ts-ignore */
|
|
23
26
|
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
24
27
|
this.circumference = 2 * Math.PI * 20;
|
|
25
28
|
this.dashOffset = computed(() => {
|
|
@@ -38,7 +41,7 @@ class CbCircleLoading {
|
|
|
38
41
|
[attr.aria-valuenow]="indeterminate() ? null : progress()"
|
|
39
42
|
aria-valuemin="0"
|
|
40
43
|
aria-valuemax="100"
|
|
41
|
-
[attr.aria-label]="label()"
|
|
44
|
+
[attr.aria-label]="(label() ?? t().loading)"
|
|
42
45
|
>
|
|
43
46
|
<svg
|
|
44
47
|
class="cb-circle-loading__svg"
|
|
@@ -68,8 +71,8 @@ class CbCircleLoading {
|
|
|
68
71
|
transform="rotate(-90 24 24)"
|
|
69
72
|
/>
|
|
70
73
|
</svg>
|
|
71
|
-
@if (label()) {
|
|
72
|
-
<span class="cb-circle-loading__label">{{ label() }}</span>
|
|
74
|
+
@if ((label() ?? t().loading)) {
|
|
75
|
+
<span class="cb-circle-loading__label">{{ (label() ?? t().loading) }}</span>
|
|
73
76
|
}
|
|
74
77
|
</div>
|
|
75
78
|
`, isInline: true, styles: [":host{display:inline-flex}.cb-circle-loading{display:inline-flex;flex-direction:column;align-items:center;gap:var(--cb-space-2, .4rem);font-family:var(--cb-font-sans, inherit)}.cb-circle-loading__track{stroke:var(--cb-color-surface-200, #e2e8f0)}.cb-circle-loading__bar{stroke:var(--cb-color-primary-500, #10b981);transition:stroke-dashoffset var(--cb-duration-normal, .2s) var(--cb-ease, ease)}.cb-circle-loading__svg.cb-is-indeterminate{animation:cb-circle-spin .9s linear infinite;transform-origin:center}.cb-circle-loading__label{font-size:var(--cb-text-xs, .75rem);color:var(--cb-color-text-muted, #64748b)}@keyframes cb-circle-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.cb-circle-loading__svg.cb-is-indeterminate{animation-duration:2.4s}}:host-context([data-theme=\"dark\"]) .cb-circle-loading__track{stroke:var(--cb-color-surface-700, #334155)}:host-context([data-theme=\"dark\"]) .cb-circle-loading__label{color:var(--cb-color-surface-300, #cbd5e1)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
@@ -83,7 +86,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
83
86
|
[attr.aria-valuenow]="indeterminate() ? null : progress()"
|
|
84
87
|
aria-valuemin="0"
|
|
85
88
|
aria-valuemax="100"
|
|
86
|
-
[attr.aria-label]="label()"
|
|
89
|
+
[attr.aria-label]="(label() ?? t().loading)"
|
|
87
90
|
>
|
|
88
91
|
<svg
|
|
89
92
|
class="cb-circle-loading__svg"
|
|
@@ -113,8 +116,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
113
116
|
transform="rotate(-90 24 24)"
|
|
114
117
|
/>
|
|
115
118
|
</svg>
|
|
116
|
-
@if (label()) {
|
|
117
|
-
<span class="cb-circle-loading__label">{{ label() }}</span>
|
|
119
|
+
@if ((label() ?? t().loading)) {
|
|
120
|
+
<span class="cb-circle-loading__label">{{ (label() ?? t().loading) }}</span>
|
|
118
121
|
}
|
|
119
122
|
</div>
|
|
120
123
|
`, styles: [":host{display:inline-flex}.cb-circle-loading{display:inline-flex;flex-direction:column;align-items:center;gap:var(--cb-space-2, .4rem);font-family:var(--cb-font-sans, inherit)}.cb-circle-loading__track{stroke:var(--cb-color-surface-200, #e2e8f0)}.cb-circle-loading__bar{stroke:var(--cb-color-primary-500, #10b981);transition:stroke-dashoffset var(--cb-duration-normal, .2s) var(--cb-ease, ease)}.cb-circle-loading__svg.cb-is-indeterminate{animation:cb-circle-spin .9s linear infinite;transform-origin:center}.cb-circle-loading__label{font-size:var(--cb-text-xs, .75rem);color:var(--cb-color-text-muted, #64748b)}@keyframes cb-circle-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.cb-circle-loading__svg.cb-is-indeterminate{animation-duration:2.4s}}:host-context([data-theme=\"dark\"]) .cb-circle-loading__track{stroke:var(--cb-color-surface-700, #334155)}:host-context([data-theme=\"dark\"]) .cb-circle-loading__label{color:var(--cb-color-surface-300, #cbd5e1)}\n"] }]
|