@caribeng/ui 22.2.0 → 22.5.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 +311 -231
- package/fesm2022/caribeng-ui-accordion.mjs +2 -2
- package/fesm2022/caribeng-ui-account-picker.mjs +533 -0
- package/fesm2022/caribeng-ui-aging.mjs +488 -0
- package/fesm2022/{caribeng-ui-caribe-alert.mjs → caribeng-ui-alert.mjs} +45 -45
- package/fesm2022/caribeng-ui-amount.mjs +249 -0
- package/fesm2022/caribeng-ui-anchor.mjs +2 -2
- package/fesm2022/{caribeng-ui-caribe-animation-lottie.mjs → caribeng-ui-animation-lottie.mjs} +41 -41
- package/fesm2022/caribeng-ui-audit-log.mjs +323 -0
- package/fesm2022/caribeng-ui-avatar.mjs +4 -4
- package/fesm2022/caribeng-ui-badge.mjs +8 -2
- package/fesm2022/caribeng-ui-breadcrumb.mjs +26 -9
- package/fesm2022/{caribeng-ui-caribe-button-group.mjs → caribeng-ui-button-group.mjs} +15 -15
- package/fesm2022/caribeng-ui-button.mjs +2 -2
- package/fesm2022/{caribeng-ui-caribe-card-content.mjs → caribeng-ui-card-content.mjs} +39 -39
- package/fesm2022/{caribeng-ui-caribe-card-move.mjs → caribeng-ui-card-move.mjs} +65 -65
- package/fesm2022/{caribeng-ui-caribe-card-primary.mjs → caribeng-ui-card-primary.mjs} +31 -31
- package/fesm2022/{caribeng-ui-caribe-card-select.mjs → caribeng-ui-card-select.mjs} +67 -67
- package/fesm2022/caribeng-ui-carousel.mjs +2 -2
- package/fesm2022/caribeng-ui-cascadeselect.mjs +45 -9
- package/fesm2022/caribeng-ui-chart.mjs +8 -5
- package/fesm2022/caribeng-ui-chat.mjs +1303 -0
- package/fesm2022/{caribeng-ui-caribe-coachmark.mjs → caribeng-ui-coachmark.mjs} +85 -85
- package/fesm2022/caribeng-ui-code-block.mjs +332 -0
- package/fesm2022/caribeng-ui-colorpicker.mjs +99 -5
- package/fesm2022/caribeng-ui-command-palette.mjs +476 -0
- package/fesm2022/caribeng-ui-comments.mjs +864 -0
- package/fesm2022/caribeng-ui-confirmdialog.mjs +78 -13
- package/fesm2022/caribeng-ui-confirmpopup.mjs +91 -16
- package/fesm2022/caribeng-ui-contextmenu.mjs +8 -4
- package/fesm2022/caribeng-ui-copy-button.mjs +230 -0
- package/fesm2022/caribeng-ui-datagrid.mjs +1635 -0
- package/fesm2022/caribeng-ui-dataview.mjs +6 -3
- package/fesm2022/caribeng-ui-datepicker.mjs +2 -2
- package/fesm2022/caribeng-ui-dock.mjs +52 -12
- package/fesm2022/caribeng-ui-document.mjs +495 -0
- package/fesm2022/{caribeng-ui-caribe-dots-indicator.mjs → caribeng-ui-dots-indicator.mjs} +41 -41
- package/fesm2022/caribeng-ui-drawer.mjs +9 -4
- package/fesm2022/caribeng-ui-dynamic-form.mjs +1581 -0
- package/fesm2022/caribeng-ui-editor.mjs +2324 -1311
- package/fesm2022/{caribeng-ui-caribe-expansion-panel.mjs → caribeng-ui-expansion-panel.mjs} +39 -39
- package/fesm2022/{caribeng-ui-caribe-fab-menu.mjs → caribeng-ui-fab-menu.mjs} +75 -75
- package/fesm2022/caribeng-ui-fieldset.mjs +2 -2
- package/fesm2022/caribeng-ui-file-card.mjs +134 -17
- package/fesm2022/{caribeng-ui-caribe-file-download.mjs → caribeng-ui-file-download.mjs} +63 -63
- package/fesm2022/caribeng-ui-financial-report.mjs +380 -0
- package/fesm2022/{caribeng-ui-caribe-float-menu.mjs → caribeng-ui-float-menu.mjs} +31 -31
- package/fesm2022/caribeng-ui-floatlabel.mjs +2 -2
- package/fesm2022/caribeng-ui-flow.mjs +1508 -0
- package/fesm2022/caribeng-ui-folder-card.mjs +122 -12
- package/fesm2022/{caribeng-ui-caribe-footer.mjs → caribeng-ui-footer.mjs} +19 -19
- package/fesm2022/caribeng-ui-gantt.mjs +1094 -0
- package/fesm2022/{caribeng-ui-caribe-header.mjs → caribeng-ui-header.mjs} +49 -49
- package/fesm2022/{caribeng-ui-caribe-icon-button.mjs → caribeng-ui-icon-button.mjs} +23 -23
- package/fesm2022/caribeng-ui-image-cropper.mjs +671 -0
- package/fesm2022/caribeng-ui-import-wizard.mjs +746 -0
- package/fesm2022/caribeng-ui-infinite-scroll.mjs +226 -0
- package/fesm2022/caribeng-ui-inlinemessage.mjs +2 -2
- package/fesm2022/caribeng-ui-input-number.mjs +22 -6
- package/fesm2022/{caribeng-ui-caribe-input-search.mjs → caribeng-ui-input-search.mjs} +65 -65
- package/fesm2022/{caribeng-ui-caribe-input-token.mjs → caribeng-ui-input-token.mjs} +59 -59
- package/fesm2022/caribeng-ui-inputmask.mjs +8 -2
- package/fesm2022/caribeng-ui-inputotp.mjs +2 -2
- package/fesm2022/caribeng-ui-journal-entry.mjs +340 -0
- package/fesm2022/caribeng-ui-kanban.mjs +4612 -0
- package/fesm2022/caribeng-ui-kbd.mjs +122 -0
- package/fesm2022/caribeng-ui-kpi.mjs +189 -0
- package/fesm2022/{caribeng-ui-caribe-link.mjs → caribeng-ui-link.mjs} +37 -37
- package/fesm2022/caribeng-ui-masonry.mjs +93 -0
- package/fesm2022/caribeng-ui-media-player.mjs +821 -0
- package/fesm2022/caribeng-ui-megamenu.mjs +13 -9
- package/fesm2022/caribeng-ui-mentions.mjs +495 -0
- package/fesm2022/caribeng-ui-menu.mjs +8 -4
- package/fesm2022/caribeng-ui-menubar.mjs +9 -5
- package/fesm2022/caribeng-ui-message.mjs +6 -3
- package/fesm2022/caribeng-ui-notification-center.mjs +636 -0
- package/fesm2022/{caribeng-ui-caribe-off-canvas.mjs → caribeng-ui-off-canvas.mjs} +55 -55
- package/fesm2022/{caribeng-ui-caribe-onboarding.mjs → caribeng-ui-onboarding.mjs} +105 -105
- package/fesm2022/caribeng-ui-orderlist.mjs +2 -2
- package/fesm2022/caribeng-ui-organizationchart.mjs +6 -10
- package/fesm2022/caribeng-ui-panel.mjs +6 -6
- package/fesm2022/caribeng-ui-panelmenu.mjs +9 -6
- package/fesm2022/caribeng-ui-pdfviewer.mjs +1755 -25
- package/fesm2022/caribeng-ui-period-picker.mjs +637 -0
- package/fesm2022/caribeng-ui-phone-input.mjs +688 -0
- package/fesm2022/caribeng-ui-picklist.mjs +2 -2
- package/fesm2022/caribeng-ui-pivot.mjs +419 -0
- package/fesm2022/caribeng-ui-pricing.mjs +263 -69
- package/fesm2022/caribeng-ui-qrcode.mjs +564 -0
- package/fesm2022/caribeng-ui-rating.mjs +14 -17
- package/fesm2022/caribeng-ui-reconciliation.mjs +386 -0
- package/fesm2022/caribeng-ui-ripple.mjs +2 -0
- package/fesm2022/caribeng-ui-scheduler.mjs +1027 -0
- package/fesm2022/caribeng-ui-scrolltop.mjs +3 -1
- package/fesm2022/caribeng-ui-select.mjs +2 -2
- package/fesm2022/{caribeng-ui-caribe-shortcut.mjs → caribeng-ui-shortcut.mjs} +29 -29
- package/fesm2022/caribeng-ui-sidebar.mjs +573 -0
- package/fesm2022/caribeng-ui-signature-pad.mjs +654 -0
- package/fesm2022/{caribeng-ui-caribe-status.mjs → caribeng-ui-status.mjs} +11 -11
- package/fesm2022/{caribeng-ui-caribe-step-indicator.mjs → caribeng-ui-step-indicator.mjs} +53 -53
- package/fesm2022/caribeng-ui-stepper.mjs +12 -5
- package/fesm2022/caribeng-ui-steps.mjs +2 -2
- package/fesm2022/caribeng-ui-table.mjs +333 -19
- package/fesm2022/caribeng-ui-tabmenu.mjs +10 -6
- package/fesm2022/caribeng-ui-tabs.mjs +2 -2
- package/fesm2022/{caribeng-ui-caribe-tag-button.mjs → caribeng-ui-tag-button.mjs} +25 -25
- package/fesm2022/caribeng-ui-tag.mjs +2 -2
- package/fesm2022/caribeng-ui-tieredmenu.mjs +111 -21
- package/fesm2022/{caribeng-ui-caribe-tracker.mjs → caribeng-ui-tracker.mjs} +29 -29
- package/fesm2022/{caribeng-ui-caribe-transaction-status.mjs → caribeng-ui-transaction-status.mjs} +11 -11
- package/fesm2022/caribeng-ui-treeselect.mjs +44 -9
- package/fesm2022/caribeng-ui-treetable.mjs +236 -17
- package/fesm2022/{caribeng-ui-caribe-voucher.mjs → caribeng-ui-voucher.mjs} +45 -45
- package/fesm2022/caribeng-ui-xlsx.mjs +486 -0
- package/fesm2022/caribeng-ui.mjs +1568 -1
- package/package.json +258 -178
- package/schematics/collection.json +5 -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 +16 -1
- package/types/caribeng-ui-account-picker.d.ts +142 -0
- package/types/caribeng-ui-aging.d.ts +123 -0
- package/types/{caribeng-ui-caribe-alert.d.ts → caribeng-ui-alert.d.ts} +2 -2
- package/types/caribeng-ui-amount.d.ts +82 -0
- package/types/{caribeng-ui-caribe-animation-lottie.d.ts → caribeng-ui-animation-lottie.d.ts} +2 -2
- package/types/caribeng-ui-audit-log.d.ts +86 -0
- package/types/caribeng-ui-badge.d.ts +3 -1
- package/types/caribeng-ui-breadcrumb.d.ts +9 -1
- package/types/{caribeng-ui-caribe-button-group.d.ts → caribeng-ui-button-group.d.ts} +2 -2
- package/types/{caribeng-ui-caribe-card-content.d.ts → caribeng-ui-card-content.d.ts} +2 -2
- package/types/{caribeng-ui-caribe-card-move.d.ts → caribeng-ui-card-move.d.ts} +1 -1
- package/types/{caribeng-ui-caribe-card-primary.d.ts → caribeng-ui-card-primary.d.ts} +2 -2
- package/types/{caribeng-ui-caribe-card-select.d.ts → caribeng-ui-card-select.d.ts} +2 -2
- package/types/caribeng-ui-cascadeselect.d.ts +6 -0
- package/types/caribeng-ui-chart.d.ts +3 -1
- package/types/caribeng-ui-chat.d.ts +299 -0
- package/types/{caribeng-ui-caribe-coachmark.d.ts → caribeng-ui-coachmark.d.ts} +2 -2
- package/types/caribeng-ui-code-block.d.ts +65 -0
- package/types/caribeng-ui-colorpicker.d.ts +5 -1
- package/types/caribeng-ui-command-palette.d.ts +133 -0
- package/types/caribeng-ui-comments.d.ts +214 -0
- package/types/caribeng-ui-confirmdialog.d.ts +34 -2
- package/types/caribeng-ui-confirmpopup.d.ts +39 -2
- package/types/caribeng-ui-contextmenu.d.ts +7 -0
- package/types/caribeng-ui-copy-button.d.ts +90 -0
- package/types/caribeng-ui-datagrid.d.ts +269 -0
- package/types/caribeng-ui-dataview.d.ts +2 -0
- package/types/caribeng-ui-dock.d.ts +13 -1
- package/types/caribeng-ui-document.d.ts +138 -0
- package/types/{caribeng-ui-caribe-dots-indicator.d.ts → caribeng-ui-dots-indicator.d.ts} +2 -2
- package/types/caribeng-ui-drawer.d.ts +3 -1
- package/types/caribeng-ui-dynamic-form.d.ts +409 -0
- package/types/caribeng-ui-editor.d.ts +110 -12
- package/types/{caribeng-ui-caribe-expansion-panel.d.ts → caribeng-ui-expansion-panel.d.ts} +1 -1
- package/types/{caribeng-ui-caribe-fab-menu.d.ts → caribeng-ui-fab-menu.d.ts} +2 -2
- package/types/caribeng-ui-file-card.d.ts +27 -2
- package/types/{caribeng-ui-caribe-file-download.d.ts → caribeng-ui-file-download.d.ts} +1 -1
- package/types/caribeng-ui-financial-report.d.ts +102 -0
- package/types/{caribeng-ui-caribe-float-menu.d.ts → caribeng-ui-float-menu.d.ts} +2 -2
- package/types/caribeng-ui-flow.d.ts +228 -0
- package/types/caribeng-ui-folder-card.d.ts +27 -5
- package/types/{caribeng-ui-caribe-footer.d.ts → caribeng-ui-footer.d.ts} +2 -2
- package/types/caribeng-ui-gantt.d.ts +244 -0
- package/types/{caribeng-ui-caribe-header.d.ts → caribeng-ui-header.d.ts} +2 -2
- package/types/{caribeng-ui-caribe-icon-button.d.ts → caribeng-ui-icon-button.d.ts} +2 -2
- package/types/{caribeng-ui-caribe-illustration.d.ts → caribeng-ui-illustration.d.ts} +1 -1
- package/types/caribeng-ui-image-cropper.d.ts +169 -0
- package/types/caribeng-ui-import-wizard.d.ts +149 -0
- package/types/caribeng-ui-infinite-scroll.d.ts +75 -0
- package/types/caribeng-ui-input-number.d.ts +1 -1
- package/types/{caribeng-ui-caribe-input-search.d.ts → caribeng-ui-input-search.d.ts} +2 -2
- package/types/{caribeng-ui-caribe-input-token.d.ts → caribeng-ui-input-token.d.ts} +2 -2
- package/types/caribeng-ui-inputmask.d.ts +3 -1
- package/types/caribeng-ui-journal-entry.d.ts +110 -0
- package/types/caribeng-ui-kanban.d.ts +783 -0
- package/types/caribeng-ui-kbd.d.ts +36 -0
- package/types/caribeng-ui-kpi.d.ts +64 -0
- package/types/{caribeng-ui-caribe-link.d.ts → caribeng-ui-link.d.ts} +2 -2
- package/types/{caribeng-ui-caribe-logo.d.ts → caribeng-ui-logo.d.ts} +1 -1
- package/types/caribeng-ui-masonry.d.ts +32 -0
- package/types/caribeng-ui-media-player.d.ts +140 -0
- package/types/caribeng-ui-megamenu.d.ts +11 -0
- package/types/caribeng-ui-mentions.d.ts +127 -0
- package/types/caribeng-ui-menu.d.ts +7 -0
- package/types/caribeng-ui-menubar.d.ts +7 -0
- package/types/caribeng-ui-message.d.ts +2 -0
- package/types/caribeng-ui-notification-center.d.ts +153 -0
- package/types/{caribeng-ui-caribe-off-canvas.d.ts → caribeng-ui-off-canvas.d.ts} +2 -2
- package/types/{caribeng-ui-caribe-onboarding.d.ts → caribeng-ui-onboarding.d.ts} +2 -2
- package/types/caribeng-ui-panelmenu.d.ts +7 -0
- package/types/caribeng-ui-pdfviewer.d.ts +245 -5
- package/types/caribeng-ui-period-picker.d.ts +148 -0
- package/types/caribeng-ui-phone-input.d.ts +168 -0
- package/types/caribeng-ui-pivot.d.ts +116 -0
- package/types/caribeng-ui-pricing.d.ts +41 -4
- package/types/caribeng-ui-qrcode.d.ts +88 -0
- package/types/caribeng-ui-reconciliation.d.ts +109 -0
- package/types/caribeng-ui-scheduler.d.ts +188 -0
- package/types/{caribeng-ui-caribe-shortcut.d.ts → caribeng-ui-shortcut.d.ts} +2 -2
- package/types/caribeng-ui-sidebar.d.ts +167 -0
- package/types/caribeng-ui-signature-pad.d.ts +151 -0
- package/types/{caribeng-ui-caribe-status.d.ts → caribeng-ui-status.d.ts} +2 -2
- package/types/{caribeng-ui-caribe-step-indicator.d.ts → caribeng-ui-step-indicator.d.ts} +2 -2
- package/types/caribeng-ui-stepper.d.ts +2 -0
- package/types/caribeng-ui-table.d.ts +67 -3
- package/types/caribeng-ui-tabmenu.d.ts +7 -0
- package/types/{caribeng-ui-caribe-tag-button.d.ts → caribeng-ui-tag-button.d.ts} +2 -2
- package/types/caribeng-ui-tieredmenu.d.ts +17 -1
- package/types/{caribeng-ui-caribe-tracker.d.ts → caribeng-ui-tracker.d.ts} +2 -2
- package/types/{caribeng-ui-caribe-transaction-status.d.ts → caribeng-ui-transaction-status.d.ts} +2 -2
- package/types/caribeng-ui-treeselect.d.ts +6 -0
- package/types/caribeng-ui-treetable.d.ts +67 -2
- package/types/{caribeng-ui-caribe-voucher.d.ts → caribeng-ui-voucher.d.ts} +2 -2
- package/types/caribeng-ui-xlsx.d.ts +79 -0
- package/types/caribeng-ui.d.ts +985 -2
- package/fesm2022/caribeng-ui-caribe-calendar.mjs +0 -92
- package/fesm2022/caribeng-ui-caribe-circle-loading.mjs +0 -130
- package/fesm2022/caribeng-ui-caribe-data-table.mjs +0 -94
- package/fesm2022/caribeng-ui-caribe-file-select.mjs +0 -88
- package/fesm2022/caribeng-ui-caribe-inline-alert.mjs +0 -100
- package/fesm2022/caribeng-ui-caribe-input-date.mjs +0 -138
- package/fesm2022/caribeng-ui-caribe-input-select.mjs +0 -154
- package/fesm2022/caribeng-ui-caribe-loader.mjs +0 -48
- package/fesm2022/caribeng-ui-caribe-modal.mjs +0 -119
- package/fesm2022/caribeng-ui-caribe-pictogram.mjs +0 -52
- package/fesm2022/caribeng-ui-caribe-pop-over.mjs +0 -104
- package/fesm2022/caribeng-ui-caribe-preloader.mjs +0 -57
- package/fesm2022/caribeng-ui-caribe-progress-bar.mjs +0 -84
- package/fesm2022/caribeng-ui-caribe-stroke.mjs +0 -69
- package/fesm2022/caribeng-ui-caribe-switch.mjs +0 -182
- package/styles/caribeng.css +0 -380
- package/styles/scss/_mixins.scss +0 -46
- package/styles/scss/_overlay.scss +0 -15
- package/styles/scss/_tokens.scss +0 -267
- package/styles/scss/_utilities.scss +0 -73
- package/styles/scss/_variables.scss +0 -33
- package/styles/scss/index.scss +0 -16
- package/types/caribeng-ui-caribe-calendar.d.ts +0 -27
- package/types/caribeng-ui-caribe-circle-loading.d.ts +0 -28
- package/types/caribeng-ui-caribe-data-table.d.ts +0 -26
- package/types/caribeng-ui-caribe-file-select.d.ts +0 -31
- package/types/caribeng-ui-caribe-inline-alert.d.ts +0 -28
- package/types/caribeng-ui-caribe-input-date.d.ts +0 -40
- package/types/caribeng-ui-caribe-input-select.d.ts +0 -47
- package/types/caribeng-ui-caribe-loader.d.ts +0 -22
- package/types/caribeng-ui-caribe-modal.d.ts +0 -21
- package/types/caribeng-ui-caribe-pictogram.d.ts +0 -15
- package/types/caribeng-ui-caribe-pop-over.d.ts +0 -17
- package/types/caribeng-ui-caribe-preloader.d.ts +0 -24
- package/types/caribeng-ui-caribe-progress-bar.d.ts +0 -28
- package/types/caribeng-ui-caribe-stroke.d.ts +0 -17
- package/types/caribeng-ui-caribe-switch.d.ts +0 -55
- /package/fesm2022/{caribeng-ui-caribe-illustration.mjs → caribeng-ui-illustration.mjs} +0 -0
- /package/fesm2022/{caribeng-ui-caribe-logo.mjs → caribeng-ui-logo.mjs} +0 -0
|
@@ -3,7 +3,7 @@ import { input, model, output, inject, ElementRef, computed, ViewEncapsulation,
|
|
|
3
3
|
import { injectCbTranslation } from '@caribeng/ui';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* Card-select
|
|
6
|
+
* Card-select: tarjeta con buscador y lista de opciones
|
|
7
7
|
* seleccionables.
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
@@ -55,76 +55,76 @@ class CbCardSelect {
|
|
|
55
55
|
options[target].focus();
|
|
56
56
|
}
|
|
57
57
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbCardSelect, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
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: `
|
|
59
|
-
<section class="cb-card-select">
|
|
60
|
-
<input
|
|
61
|
-
class="cb-card-select__search"
|
|
62
|
-
type="search"
|
|
63
|
-
[value]="query()"
|
|
64
|
-
(input)="query.set($any($event.target).value)"
|
|
65
|
-
[attr.aria-label]="t().filterOptions"
|
|
66
|
-
[placeholder]="t().search"
|
|
67
|
-
/>
|
|
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) {
|
|
75
|
-
<button
|
|
76
|
-
type="button"
|
|
77
|
-
class="cb-card-select__option"
|
|
78
|
-
role="option"
|
|
79
|
-
[class.cb-is-selected]="selected() === item"
|
|
80
|
-
[attr.aria-selected]="selected() === item"
|
|
81
|
-
[attr.tabindex]="$index === tabbable() ? 0 : -1"
|
|
82
|
-
(click)="choose(item)"
|
|
83
|
-
>
|
|
84
|
-
{{ item }}
|
|
85
|
-
</button>
|
|
86
|
-
} @empty {
|
|
87
|
-
<span class="cb-card-select__empty">{{ t().noResults }}</span>
|
|
88
|
-
}
|
|
89
|
-
</div>
|
|
90
|
-
</section>
|
|
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: `
|
|
59
|
+
<section class="cb-card-select">
|
|
60
|
+
<input
|
|
61
|
+
class="cb-card-select__search"
|
|
62
|
+
type="search"
|
|
63
|
+
[value]="query()"
|
|
64
|
+
(input)="query.set($any($event.target).value)"
|
|
65
|
+
[attr.aria-label]="t().filterOptions"
|
|
66
|
+
[placeholder]="t().search"
|
|
67
|
+
/>
|
|
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) {
|
|
75
|
+
<button
|
|
76
|
+
type="button"
|
|
77
|
+
class="cb-card-select__option"
|
|
78
|
+
role="option"
|
|
79
|
+
[class.cb-is-selected]="selected() === item"
|
|
80
|
+
[attr.aria-selected]="selected() === item"
|
|
81
|
+
[attr.tabindex]="$index === tabbable() ? 0 : -1"
|
|
82
|
+
(click)="choose(item)"
|
|
83
|
+
>
|
|
84
|
+
{{ item }}
|
|
85
|
+
</button>
|
|
86
|
+
} @empty {
|
|
87
|
+
<span class="cb-card-select__empty">{{ t().noResults }}</span>
|
|
88
|
+
}
|
|
89
|
+
</div>
|
|
90
|
+
</section>
|
|
91
91
|
`, isInline: true, styles: [":host{display:block;width:100%;max-width:22rem}.cb-card-select{display:flex;flex-direction:column;gap:var(--cb-space-2, .5rem);box-sizing:border-box;padding:var(--cb-space-3, .75rem);font-family:var(--cb-font-sans, inherit);background-color:var(--cb-color-surface-0, #ffffff);border:1px solid var(--cb-color-border, #e2e8f0);border-radius:var(--cb-radius-lg, .75rem)}.cb-card-select__search{box-sizing:border-box;width:100%;padding:var(--cb-space-2, .5rem) var(--cb-space-3, .75rem);font:inherit;font-size:var(--cb-text-sm, .875rem);color:var(--cb-color-text-strong, #0f172a);background-color:var(--cb-color-surface-50, #f8fafc);border:1px solid var(--cb-color-border, #e2e8f0);border-radius:var(--cb-radius-md, .5rem)}.cb-card-select__search:focus-visible{outline:2px solid var(--cb-color-focus-ring, var(--cb-color-primary-500, #10b981));outline-offset:0}.cb-card-select__list{display:flex;flex-direction:column;gap:2px;max-height:12rem;overflow-y:auto}.cb-card-select__option{padding:var(--cb-space-2, .5rem) var(--cb-space-3, .75rem);font:inherit;font-size:var(--cb-text-sm, .875rem);text-align:left;color:var(--cb-color-text, #334155);background:transparent;border:none;border-radius:var(--cb-radius-md, .5rem);cursor:pointer;transition:background-color var(--cb-duration-fast, .12s) var(--cb-ease, ease)}.cb-card-select__option:hover{background-color:var(--cb-color-surface-100, #f1f5f9)}.cb-card-select__option.cb-is-selected{color:var(--cb-color-primary-700, #065f46);background-color:var(--cb-color-primary-50, #ecfdf5);font-weight:var(--cb-font-weight-semibold, 600)}.cb-card-select__empty{padding:var(--cb-space-3, .75rem);font-size:var(--cb-text-sm, .875rem);color:var(--cb-color-text-muted, #64748b);text-align:center}:host-context([data-theme=\"dark\"]) .cb-card-select{background-color:var(--cb-color-surface-800, #1e293b);border-color:var(--cb-color-surface-600, #475569)}:host-context([data-theme=\"dark\"]) .cb-card-select__search{color:var(--cb-color-surface-0, #f8fafc);background-color:var(--cb-color-surface-900, #0f172a);border-color:var(--cb-color-surface-600, #475569)}:host-context([data-theme=\"dark\"]) .cb-card-select__option{color:var(--cb-color-surface-100, #f1f5f9)}:host-context([data-theme=\"dark\"]) .cb-card-select__option:hover{background-color:var(--cb-color-surface-700, #334155)}:host-context([data-theme=\"dark\"]) .cb-card-select__option.cb-is-selected{color:var(--cb-color-primary-200, #a7f3d0);background-color:color-mix(in srgb,var(--cb-color-primary-500, #10b981) 20%,transparent)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
92
92
|
}
|
|
93
93
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbCardSelect, decorators: [{
|
|
94
94
|
type: Component,
|
|
95
|
-
args: [{ selector: 'cb-card-select', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, template: `
|
|
96
|
-
<section class="cb-card-select">
|
|
97
|
-
<input
|
|
98
|
-
class="cb-card-select__search"
|
|
99
|
-
type="search"
|
|
100
|
-
[value]="query()"
|
|
101
|
-
(input)="query.set($any($event.target).value)"
|
|
102
|
-
[attr.aria-label]="t().filterOptions"
|
|
103
|
-
[placeholder]="t().search"
|
|
104
|
-
/>
|
|
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) {
|
|
112
|
-
<button
|
|
113
|
-
type="button"
|
|
114
|
-
class="cb-card-select__option"
|
|
115
|
-
role="option"
|
|
116
|
-
[class.cb-is-selected]="selected() === item"
|
|
117
|
-
[attr.aria-selected]="selected() === item"
|
|
118
|
-
[attr.tabindex]="$index === tabbable() ? 0 : -1"
|
|
119
|
-
(click)="choose(item)"
|
|
120
|
-
>
|
|
121
|
-
{{ item }}
|
|
122
|
-
</button>
|
|
123
|
-
} @empty {
|
|
124
|
-
<span class="cb-card-select__empty">{{ t().noResults }}</span>
|
|
125
|
-
}
|
|
126
|
-
</div>
|
|
127
|
-
</section>
|
|
95
|
+
args: [{ selector: 'cb-card-select', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, template: `
|
|
96
|
+
<section class="cb-card-select">
|
|
97
|
+
<input
|
|
98
|
+
class="cb-card-select__search"
|
|
99
|
+
type="search"
|
|
100
|
+
[value]="query()"
|
|
101
|
+
(input)="query.set($any($event.target).value)"
|
|
102
|
+
[attr.aria-label]="t().filterOptions"
|
|
103
|
+
[placeholder]="t().search"
|
|
104
|
+
/>
|
|
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) {
|
|
112
|
+
<button
|
|
113
|
+
type="button"
|
|
114
|
+
class="cb-card-select__option"
|
|
115
|
+
role="option"
|
|
116
|
+
[class.cb-is-selected]="selected() === item"
|
|
117
|
+
[attr.aria-selected]="selected() === item"
|
|
118
|
+
[attr.tabindex]="$index === tabbable() ? 0 : -1"
|
|
119
|
+
(click)="choose(item)"
|
|
120
|
+
>
|
|
121
|
+
{{ item }}
|
|
122
|
+
</button>
|
|
123
|
+
} @empty {
|
|
124
|
+
<span class="cb-card-select__empty">{{ t().noResults }}</span>
|
|
125
|
+
}
|
|
126
|
+
</div>
|
|
127
|
+
</section>
|
|
128
128
|
`, styles: [":host{display:block;width:100%;max-width:22rem}.cb-card-select{display:flex;flex-direction:column;gap:var(--cb-space-2, .5rem);box-sizing:border-box;padding:var(--cb-space-3, .75rem);font-family:var(--cb-font-sans, inherit);background-color:var(--cb-color-surface-0, #ffffff);border:1px solid var(--cb-color-border, #e2e8f0);border-radius:var(--cb-radius-lg, .75rem)}.cb-card-select__search{box-sizing:border-box;width:100%;padding:var(--cb-space-2, .5rem) var(--cb-space-3, .75rem);font:inherit;font-size:var(--cb-text-sm, .875rem);color:var(--cb-color-text-strong, #0f172a);background-color:var(--cb-color-surface-50, #f8fafc);border:1px solid var(--cb-color-border, #e2e8f0);border-radius:var(--cb-radius-md, .5rem)}.cb-card-select__search:focus-visible{outline:2px solid var(--cb-color-focus-ring, var(--cb-color-primary-500, #10b981));outline-offset:0}.cb-card-select__list{display:flex;flex-direction:column;gap:2px;max-height:12rem;overflow-y:auto}.cb-card-select__option{padding:var(--cb-space-2, .5rem) var(--cb-space-3, .75rem);font:inherit;font-size:var(--cb-text-sm, .875rem);text-align:left;color:var(--cb-color-text, #334155);background:transparent;border:none;border-radius:var(--cb-radius-md, .5rem);cursor:pointer;transition:background-color var(--cb-duration-fast, .12s) var(--cb-ease, ease)}.cb-card-select__option:hover{background-color:var(--cb-color-surface-100, #f1f5f9)}.cb-card-select__option.cb-is-selected{color:var(--cb-color-primary-700, #065f46);background-color:var(--cb-color-primary-50, #ecfdf5);font-weight:var(--cb-font-weight-semibold, 600)}.cb-card-select__empty{padding:var(--cb-space-3, .75rem);font-size:var(--cb-text-sm, .875rem);color:var(--cb-color-text-muted, #64748b);text-align:center}:host-context([data-theme=\"dark\"]) .cb-card-select{background-color:var(--cb-color-surface-800, #1e293b);border-color:var(--cb-color-surface-600, #475569)}:host-context([data-theme=\"dark\"]) .cb-card-select__search{color:var(--cb-color-surface-0, #f8fafc);background-color:var(--cb-color-surface-900, #0f172a);border-color:var(--cb-color-surface-600, #475569)}:host-context([data-theme=\"dark\"]) .cb-card-select__option{color:var(--cb-color-surface-100, #f1f5f9)}:host-context([data-theme=\"dark\"]) .cb-card-select__option:hover{background-color:var(--cb-color-surface-700, #334155)}:host-context([data-theme=\"dark\"]) .cb-card-select__option.cb-is-selected{color:var(--cb-color-primary-200, #a7f3d0);background-color:color-mix(in srgb,var(--cb-color-primary-500, #10b981) 20%,transparent)}\n"] }]
|
|
129
129
|
}], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }, { type: i0.Output, args: ["selectedChange"] }], selectionChange: [{ type: i0.Output, args: ["selectionChange"] }], query: [{ type: i0.Input, args: [{ isSignal: true, alias: "query", required: false }] }, { type: i0.Output, args: ["queryChange"] }] } });
|
|
130
130
|
|
|
@@ -134,7 +134,7 @@ class CbCarousel {
|
|
|
134
134
|
}
|
|
135
135
|
</div>
|
|
136
136
|
}
|
|
137
|
-
`, isInline: true, styles: [":host{display:block;width:100%;font-family:var(--cb-font-sans)}.cb-carousel__Stage{display:flex;align-items:center;gap:var(--cb-space-3)}.cb-carousel__viewport{flex:1;border:var(--cb-border-width) solid var(--cb-color-border);border-radius:var(--cb-radius-lg);background:var(--cb-color-surface);color:var(--cb-color-text);overflow:hidden}.cb-carousel__slide{padding:var(--cb-space-4)}.cb-carousel__img{width:100%;max-height:180px;object-fit:cover;border-radius:var(--cb-radius-md);margin-bottom:var(--cb-space-3)}.cb-carousel__badge{display:inline-block;padding:.125rem .5rem;border-radius:999px;background:color-mix(in srgb,var(--cb-color-primary-500) 15%,transparent);color:var(--cb-color-primary-
|
|
137
|
+
`, isInline: true, styles: [":host{display:block;width:100%;font-family:var(--cb-font-sans)}.cb-carousel__Stage{display:flex;align-items:center;gap:var(--cb-space-3)}.cb-carousel__viewport{flex:1;border:var(--cb-border-width) solid var(--cb-color-border);border-radius:var(--cb-radius-lg);background:var(--cb-color-surface);color:var(--cb-color-text);overflow:hidden}.cb-carousel__slide{padding:var(--cb-space-4)}.cb-carousel__img{width:100%;max-height:180px;object-fit:cover;border-radius:var(--cb-radius-md);margin-bottom:var(--cb-space-3)}.cb-carousel__badge{display:inline-block;padding:.125rem .5rem;border-radius:999px;background:color-mix(in srgb,var(--cb-color-primary-500) 15%,transparent);color:var(--cb-color-primary-text);font-size:.75rem;font-weight:var(--cb-font-semibold);margin-bottom:.375rem}.cb-carousel__title{margin:0 0 .25rem;font-size:var(--cb-text-base);font-weight:var(--cb-font-semibold)}.cb-carousel__desc{margin:0;font-size:var(--cb-text-sm);color:var(--cb-color-text-muted)}.cb-carousel__nav{display:inline-flex;align-items:center;justify-content:center;width:2.25rem;height:2.25rem;border:var(--cb-border-width) solid var(--cb-color-border);border-radius:999px;background:var(--cb-color-surface);color:var(--cb-color-text);cursor:pointer}.cb-carousel__indicators{display:flex;justify-content:center;gap:.5rem;margin-top:var(--cb-space-3)}.cb-carousel__dot{width:.55rem;height:.55rem;padding:0;border:none;border-radius:999px;background:var(--cb-color-border);cursor:pointer}.cb-carousel__dot.cb-is-active{width:1.4rem;background:var(--cb-color-primary-500)}\n"], dependencies: [{ kind: "component", type: CbIcon, selector: "cb-icon", inputs: ["name", "size", "spin", "ariaLabel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
138
138
|
}
|
|
139
139
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbCarousel, decorators: [{
|
|
140
140
|
type: Component,
|
|
@@ -208,7 +208,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
208
208
|
}
|
|
209
209
|
</div>
|
|
210
210
|
}
|
|
211
|
-
`, styles: [":host{display:block;width:100%;font-family:var(--cb-font-sans)}.cb-carousel__Stage{display:flex;align-items:center;gap:var(--cb-space-3)}.cb-carousel__viewport{flex:1;border:var(--cb-border-width) solid var(--cb-color-border);border-radius:var(--cb-radius-lg);background:var(--cb-color-surface);color:var(--cb-color-text);overflow:hidden}.cb-carousel__slide{padding:var(--cb-space-4)}.cb-carousel__img{width:100%;max-height:180px;object-fit:cover;border-radius:var(--cb-radius-md);margin-bottom:var(--cb-space-3)}.cb-carousel__badge{display:inline-block;padding:.125rem .5rem;border-radius:999px;background:color-mix(in srgb,var(--cb-color-primary-500) 15%,transparent);color:var(--cb-color-primary-
|
|
211
|
+
`, styles: [":host{display:block;width:100%;font-family:var(--cb-font-sans)}.cb-carousel__Stage{display:flex;align-items:center;gap:var(--cb-space-3)}.cb-carousel__viewport{flex:1;border:var(--cb-border-width) solid var(--cb-color-border);border-radius:var(--cb-radius-lg);background:var(--cb-color-surface);color:var(--cb-color-text);overflow:hidden}.cb-carousel__slide{padding:var(--cb-space-4)}.cb-carousel__img{width:100%;max-height:180px;object-fit:cover;border-radius:var(--cb-radius-md);margin-bottom:var(--cb-space-3)}.cb-carousel__badge{display:inline-block;padding:.125rem .5rem;border-radius:999px;background:color-mix(in srgb,var(--cb-color-primary-500) 15%,transparent);color:var(--cb-color-primary-text);font-size:.75rem;font-weight:var(--cb-font-semibold);margin-bottom:.375rem}.cb-carousel__title{margin:0 0 .25rem;font-size:var(--cb-text-base);font-weight:var(--cb-font-semibold)}.cb-carousel__desc{margin:0;font-size:var(--cb-text-sm);color:var(--cb-color-text-muted)}.cb-carousel__nav{display:inline-flex;align-items:center;justify-content:center;width:2.25rem;height:2.25rem;border:var(--cb-border-width) solid var(--cb-color-border);border-radius:999px;background:var(--cb-color-surface);color:var(--cb-color-text);cursor:pointer}.cb-carousel__indicators{display:flex;justify-content:center;gap:.5rem;margin-top:var(--cb-space-3)}.cb-carousel__dot{width:.55rem;height:.55rem;padding:0;border:none;border-radius:999px;background:var(--cb-color-border);cursor:pointer}.cb-carousel__dot.cb-is-active{width:1.4rem;background:var(--cb-color-primary-500)}\n"] }]
|
|
212
212
|
}], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], circular: [{ type: i0.Input, args: [{ isSignal: true, alias: "circular", required: false }] }], showNavigators: [{ type: i0.Input, args: [{ isSignal: true, alias: "showNavigators", required: false }] }], showIndicators: [{ type: i0.Input, args: [{ isSignal: true, alias: "showIndicators", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], page: [{ type: i0.Input, args: [{ isSignal: true, alias: "page", required: false }] }, { type: i0.Output, args: ["pageChange"] }] } });
|
|
213
213
|
|
|
214
214
|
/**
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, booleanAttribute, model, signal, computed, viewChild, forwardRef, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { input, booleanAttribute, model, signal, computed, viewChild, inject, ElementRef, forwardRef, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/cdk/overlay';
|
|
4
|
+
import { OverlayModule } from '@angular/cdk/overlay';
|
|
3
5
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
4
6
|
import { CbIcon } from '@caribeng/ui/icon';
|
|
5
7
|
import { injectCbTranslation, cbFieldState } from '@caribeng/ui';
|
|
@@ -49,6 +51,14 @@ class CbCascadeSelect {
|
|
|
49
51
|
this.onChange = () => { };
|
|
50
52
|
this.onTouched = () => { };
|
|
51
53
|
this.trigger = viewChild.required('trigger');
|
|
54
|
+
this.host = inject(ElementRef);
|
|
55
|
+
this.triggerWidth = signal(0, /* @ts-ignore */
|
|
56
|
+
...(ngDevMode ? [{ debugName: "triggerWidth" }] : /* istanbul ignore next */ []));
|
|
57
|
+
this.positions = [
|
|
58
|
+
{ originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: 4 },
|
|
59
|
+
{ originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetY: -4 },
|
|
60
|
+
{ originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top', offsetY: 4 },
|
|
61
|
+
];
|
|
52
62
|
}
|
|
53
63
|
writeValue(val) {
|
|
54
64
|
this.value.set(val ?? null);
|
|
@@ -62,9 +72,14 @@ class CbCascadeSelect {
|
|
|
62
72
|
setDisabledState(isDisabled) {
|
|
63
73
|
this.cvaDisabled.set(isDisabled);
|
|
64
74
|
}
|
|
75
|
+
/** Un clic fuera del panel lo cierra (el del disparador ya lo alterna). */
|
|
76
|
+
onOutsideClick(event) {
|
|
77
|
+
if (!this.host.nativeElement.contains(event.target))
|
|
78
|
+
this.open.set(false);
|
|
79
|
+
}
|
|
65
80
|
/** Escape cierra el panel y devuelve el foco al disparador. */
|
|
66
81
|
closeOnEscape(event) {
|
|
67
|
-
if (!this.open())
|
|
82
|
+
if (!this.open() || event.key !== 'Escape')
|
|
68
83
|
return;
|
|
69
84
|
event.preventDefault();
|
|
70
85
|
this.open.set(false);
|
|
@@ -73,6 +88,7 @@ class CbCascadeSelect {
|
|
|
73
88
|
toggleOpen() {
|
|
74
89
|
if (this.isDisabled())
|
|
75
90
|
return;
|
|
91
|
+
this.triggerWidth.set(this.trigger().nativeElement.offsetWidth);
|
|
76
92
|
this.open.set(!this.open());
|
|
77
93
|
}
|
|
78
94
|
onGroupClick(group) {
|
|
@@ -116,7 +132,17 @@ class CbCascadeSelect {
|
|
|
116
132
|
<cb-icon name="chevron-down" [size]="16" aria-hidden="true" />
|
|
117
133
|
</button>
|
|
118
134
|
|
|
119
|
-
|
|
135
|
+
<!-- El panel va en un overlay: no lo recorta un contenedor con overflow (tarjetas, diálogos, tablas). -->
|
|
136
|
+
<ng-template
|
|
137
|
+
cdkConnectedOverlay
|
|
138
|
+
[cdkConnectedOverlayOrigin]="trigger"
|
|
139
|
+
[cdkConnectedOverlayOpen]="open()"
|
|
140
|
+
[cdkConnectedOverlayMinWidth]="triggerWidth()"
|
|
141
|
+
[cdkConnectedOverlayPositions]="positions"
|
|
142
|
+
(overlayOutsideClick)="onOutsideClick($event)"
|
|
143
|
+
(overlayKeydown)="closeOnEscape($event)"
|
|
144
|
+
(detach)="open.set(false)"
|
|
145
|
+
>
|
|
120
146
|
<div class="cb-cascade-select__menus">
|
|
121
147
|
<ul class="cb-cascade-select__list" role="listbox">
|
|
122
148
|
@for (group of options(); track group.label) {
|
|
@@ -152,12 +178,12 @@ class CbCascadeSelect {
|
|
|
152
178
|
</ul>
|
|
153
179
|
}
|
|
154
180
|
</div>
|
|
155
|
-
|
|
156
|
-
`, isInline: true, styles: [":host{position:relative;display:inline-block;width:100%;font-family:var(--cb-font-sans)}.cb-cascade-select__trigger{width:100%;display:flex;align-items:center;justify-content:space-between;gap:var(--cb-space-2);padding:var(--cb-space-2) var(--cb-space-3);border:var(--cb-border-width) solid var(--cb-color-border);border-radius:var(--cb-radius-md);background:var(--cb-color-surface);color:var(--cb-color-text);font-family:inherit;font-size:var(--cb-text-sm);cursor:pointer}.cb-cascade-select__label.cb-is-placeholder{color:var(--cb-color-text-muted)}.cb-cascade-select__menus{
|
|
181
|
+
</ng-template>
|
|
182
|
+
`, isInline: true, styles: [":host{position:relative;display:inline-block;width:100%;font-family:var(--cb-font-sans)}.cb-cascade-select__trigger{width:100%;display:flex;align-items:center;justify-content:space-between;gap:var(--cb-space-2);padding:var(--cb-space-2) var(--cb-space-3);border:var(--cb-border-width) solid var(--cb-color-border);border-radius:var(--cb-radius-md);background:var(--cb-color-surface);color:var(--cb-color-text);font-family:inherit;font-size:var(--cb-text-sm);cursor:pointer}.cb-cascade-select__label.cb-is-placeholder{color:var(--cb-color-text-muted)}.cb-cascade-select__menus{display:flex;max-width:calc(100vw - 1rem);border:var(--cb-border-width) solid var(--cb-color-border);border-radius:var(--cb-radius-md);background:var(--cb-color-surface);box-shadow:var(--cb-shadow-md, 0 8px 20px rgba(0, 0, 0, .12));overflow:hidden}.cb-cascade-select__list{list-style:none;margin:0;padding:var(--cb-space-1);min-width:min(150px,44vw);max-height:16rem;overflow-y:auto;border-right:var(--cb-border-width) solid var(--cb-color-border)}.cb-cascade-select__list:last-child{border-right:none}.cb-cascade-select__option{width:100%;display:flex;align-items:center;justify-content:space-between;gap:var(--cb-space-2);padding:.4rem .6rem;border:none;border-radius:var(--cb-radius-sm);background:transparent;color:var(--cb-color-text);font-family:inherit;font-size:var(--cb-text-sm);cursor:pointer}.cb-cascade-select__option.cb-is-active,.cb-cascade-select__option.cb-is-selected{background:color-mix(in srgb,var(--cb-color-primary-500) 14%,transparent)}.cb-cascade-select__trigger.cb-is-invalid{border-color:var(--cb-color-danger)}\n"], dependencies: [{ kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i1.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "component", type: CbIcon, selector: "cb-icon", inputs: ["name", "size", "spin", "ariaLabel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
157
183
|
}
|
|
158
184
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbCascadeSelect, decorators: [{
|
|
159
185
|
type: Component,
|
|
160
|
-
args: [{ selector: 'cb-cascade-select', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, imports: [CbIcon], providers: [
|
|
186
|
+
args: [{ selector: 'cb-cascade-select', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, imports: [OverlayModule, CbIcon], providers: [
|
|
161
187
|
{
|
|
162
188
|
provide: NG_VALUE_ACCESSOR,
|
|
163
189
|
useExisting: forwardRef(() => CbCascadeSelect),
|
|
@@ -186,7 +212,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
186
212
|
<cb-icon name="chevron-down" [size]="16" aria-hidden="true" />
|
|
187
213
|
</button>
|
|
188
214
|
|
|
189
|
-
|
|
215
|
+
<!-- El panel va en un overlay: no lo recorta un contenedor con overflow (tarjetas, diálogos, tablas). -->
|
|
216
|
+
<ng-template
|
|
217
|
+
cdkConnectedOverlay
|
|
218
|
+
[cdkConnectedOverlayOrigin]="trigger"
|
|
219
|
+
[cdkConnectedOverlayOpen]="open()"
|
|
220
|
+
[cdkConnectedOverlayMinWidth]="triggerWidth()"
|
|
221
|
+
[cdkConnectedOverlayPositions]="positions"
|
|
222
|
+
(overlayOutsideClick)="onOutsideClick($event)"
|
|
223
|
+
(overlayKeydown)="closeOnEscape($event)"
|
|
224
|
+
(detach)="open.set(false)"
|
|
225
|
+
>
|
|
190
226
|
<div class="cb-cascade-select__menus">
|
|
191
227
|
<ul class="cb-cascade-select__list" role="listbox">
|
|
192
228
|
@for (group of options(); track group.label) {
|
|
@@ -222,8 +258,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
222
258
|
</ul>
|
|
223
259
|
}
|
|
224
260
|
</div>
|
|
225
|
-
|
|
226
|
-
`, styles: [":host{position:relative;display:inline-block;width:100%;font-family:var(--cb-font-sans)}.cb-cascade-select__trigger{width:100%;display:flex;align-items:center;justify-content:space-between;gap:var(--cb-space-2);padding:var(--cb-space-2) var(--cb-space-3);border:var(--cb-border-width) solid var(--cb-color-border);border-radius:var(--cb-radius-md);background:var(--cb-color-surface);color:var(--cb-color-text);font-family:inherit;font-size:var(--cb-text-sm);cursor:pointer}.cb-cascade-select__label.cb-is-placeholder{color:var(--cb-color-text-muted)}.cb-cascade-select__menus{
|
|
261
|
+
</ng-template>
|
|
262
|
+
`, styles: [":host{position:relative;display:inline-block;width:100%;font-family:var(--cb-font-sans)}.cb-cascade-select__trigger{width:100%;display:flex;align-items:center;justify-content:space-between;gap:var(--cb-space-2);padding:var(--cb-space-2) var(--cb-space-3);border:var(--cb-border-width) solid var(--cb-color-border);border-radius:var(--cb-radius-md);background:var(--cb-color-surface);color:var(--cb-color-text);font-family:inherit;font-size:var(--cb-text-sm);cursor:pointer}.cb-cascade-select__label.cb-is-placeholder{color:var(--cb-color-text-muted)}.cb-cascade-select__menus{display:flex;max-width:calc(100vw - 1rem);border:var(--cb-border-width) solid var(--cb-color-border);border-radius:var(--cb-radius-md);background:var(--cb-color-surface);box-shadow:var(--cb-shadow-md, 0 8px 20px rgba(0, 0, 0, .12));overflow:hidden}.cb-cascade-select__list{list-style:none;margin:0;padding:var(--cb-space-1);min-width:min(150px,44vw);max-height:16rem;overflow-y:auto;border-right:var(--cb-border-width) solid var(--cb-color-border)}.cb-cascade-select__list:last-child{border-right:none}.cb-cascade-select__option{width:100%;display:flex;align-items:center;justify-content:space-between;gap:var(--cb-space-2);padding:.4rem .6rem;border:none;border-radius:var(--cb-radius-sm);background:transparent;color:var(--cb-color-text);font-family:inherit;font-size:var(--cb-text-sm);cursor:pointer}.cb-cascade-select__option.cb-is-active,.cb-cascade-select__option.cb-is-selected{background:color-mix(in srgb,var(--cb-color-primary-500) 14%,transparent)}.cb-cascade-select__trigger.cb-is-invalid{border-color:var(--cb-color-danger)}\n"] }]
|
|
227
263
|
}], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], trigger: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }] } });
|
|
228
264
|
|
|
229
265
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DOCUMENT, NgTemplateOutlet } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { signal, Injectable, input, ChangeDetectionStrategy, Component, Directive, forwardRef, booleanAttribute, numberAttribute, output, contentChildren, viewChild, inject, ElementRef,
|
|
3
|
+
import { signal, Injectable, input, ChangeDetectionStrategy, Component, Directive, forwardRef, booleanAttribute, numberAttribute, computed, output, contentChildren, viewChild, inject, ElementRef, DestroyRef, afterNextRender, effect, untracked, ViewEncapsulation } from '@angular/core';
|
|
4
4
|
import { injectCbTranslation } from '@caribeng/ui';
|
|
5
5
|
|
|
6
6
|
// Tipos públicos del gráfico y modelo interno de la escena que dibuja cada renderer.
|
|
@@ -1751,9 +1751,12 @@ class CbChart {
|
|
|
1751
1751
|
/** Formato de los valores (ejes, tooltip y tabla). */
|
|
1752
1752
|
this.valueFormat = input(undefined, /* @ts-ignore */
|
|
1753
1753
|
...(ngDevMode ? [{ debugName: "valueFormat" }] : /* istanbul ignore next */ []));
|
|
1754
|
-
/** Locale BCP 47 para el formato (por defecto, el del
|
|
1754
|
+
/** Locale BCP 47 para el formato (por defecto, el del idioma activo de CaribeNG: `intlLocale`). */
|
|
1755
1755
|
this.locale = input(undefined, /* @ts-ignore */
|
|
1756
1756
|
...(ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []));
|
|
1757
|
+
/** Locale efectivo: el input o, si no se indica, el del idioma activo. */
|
|
1758
|
+
this.intlLocale = computed(() => this.locale() ?? this.t().intlLocale, /* @ts-ignore */
|
|
1759
|
+
...(ngDevMode ? [{ debugName: "intlLocale" }] : /* istanbul ignore next */ []));
|
|
1757
1760
|
/** Valor mínimo del medidor (`gauge`). */
|
|
1758
1761
|
this.min = input(0, /* @ts-ignore */
|
|
1759
1762
|
...(ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []));
|
|
@@ -1824,7 +1827,7 @@ class CbChart {
|
|
|
1824
1827
|
...(ngDevMode ? [{ debugName: "isEmpty" }] : /* istanbul ignore next */ []));
|
|
1825
1828
|
this.numberFormat = computed(() => this.formatter(this.valueFormat()), /* @ts-ignore */
|
|
1826
1829
|
...(ngDevMode ? [{ debugName: "numberFormat" }] : /* istanbul ignore next */ []));
|
|
1827
|
-
this.percentFormat = computed(() => new Intl.NumberFormat(this.
|
|
1830
|
+
this.percentFormat = computed(() => new Intl.NumberFormat(this.intlLocale(), { style: 'percent', maximumFractionDigits: 1 }).format, /* @ts-ignore */
|
|
1828
1831
|
...(ngDevMode ? [{ debugName: "percentFormat" }] : /* istanbul ignore next */ []));
|
|
1829
1832
|
/** Lo declarado en los hijos, como datos planos para el renderer. */
|
|
1830
1833
|
this.composedSpec = computed(() => {
|
|
@@ -1894,7 +1897,7 @@ class CbChart {
|
|
|
1894
1897
|
bands: this.bands(),
|
|
1895
1898
|
format: this.numberFormat(),
|
|
1896
1899
|
percent: this.percentFormat(),
|
|
1897
|
-
locale: this.
|
|
1900
|
+
locale: this.intlLocale(),
|
|
1898
1901
|
text: { total: t.chartTotal, change: t.chartChange, open: t.chartOpen, high: t.chartHigh, low: t.chartLow, close: t.chartClose },
|
|
1899
1902
|
composed: this.composedSpec(),
|
|
1900
1903
|
};
|
|
@@ -1977,7 +1980,7 @@ class CbChart {
|
|
|
1977
1980
|
});
|
|
1978
1981
|
}
|
|
1979
1982
|
formatter(vf) {
|
|
1980
|
-
return typeof vf === 'function' ? vf : new Intl.NumberFormat(this.
|
|
1983
|
+
return typeof vf === 'function' ? vf : new Intl.NumberFormat(this.intlLocale(), vf ?? { maximumFractionDigits: 2 }).format;
|
|
1981
1984
|
}
|
|
1982
1985
|
setWindow(window) {
|
|
1983
1986
|
this.active.set(null);
|