@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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, model, output, computed, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { inject, ElementRef, input, model, output, computed, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
import { CbIcon } from '@caribeng/ui/icon';
|
|
4
4
|
import { CbButton } from '@caribeng/ui/button';
|
|
5
|
-
import { injectCbTranslation } from '@caribeng/ui';
|
|
5
|
+
import { injectCbTranslation, cbFormat } from '@caribeng/ui';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Tabla de precios de CaribeNG: selector Mensual/Anual opcional y planes
|
|
@@ -18,6 +18,7 @@ class CbPricing {
|
|
|
18
18
|
constructor() {
|
|
19
19
|
/** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
|
|
20
20
|
this.t = injectCbTranslation();
|
|
21
|
+
this.host = inject(ElementRef);
|
|
21
22
|
/** Planes a mostrar. */
|
|
22
23
|
this.plans = input([], /* @ts-ignore */
|
|
23
24
|
...(ngDevMode ? [{ debugName: "plans" }] : /* istanbul ignore next */ []));
|
|
@@ -27,12 +28,25 @@ class CbPricing {
|
|
|
27
28
|
/** Muestra el selector Mensual/Anual. */
|
|
28
29
|
this.showToggle = input(true, /* @ts-ignore */
|
|
29
30
|
...(ngDevMode ? [{ debugName: "showToggle" }] : /* istanbul ignore next */ []));
|
|
30
|
-
/** Disposición de los planes
|
|
31
|
+
/** Disposición de los planes (ver {@link CbPricingLayout}). */
|
|
31
32
|
this.layout = input('grid', /* @ts-ignore */
|
|
32
33
|
...(ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []));
|
|
33
34
|
/** Título opcional sobre la tabla. */
|
|
34
35
|
this.title = input('', /* @ts-ignore */
|
|
35
36
|
...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
37
|
+
/** Texto de ayuda bajo el título (solo en `horizontal`). */
|
|
38
|
+
this.subtitle = input('', /* @ts-ignore */
|
|
39
|
+
...(ngDevMode ? [{ debugName: "subtitle" }] : /* istanbul ignore next */ []));
|
|
40
|
+
/** Etiqueta junto a la opción anual (p. ej. "25% OFF"; solo en `horizontal`). */
|
|
41
|
+
this.annualBadge = input('', /* @ts-ignore */
|
|
42
|
+
...(ngDevMode ? [{ debugName: "annualBadge" }] : /* istanbul ignore next */ []));
|
|
43
|
+
/**
|
|
44
|
+
* Cómo se muestra el precio anual: `total` (importe del año, "/año") o `monthly`
|
|
45
|
+
* (equivalente mensual, "/mes", con el total facturado y el ahorro debajo).
|
|
46
|
+
* Por defecto `monthly` en `horizontal` y `total` en el resto.
|
|
47
|
+
*/
|
|
48
|
+
this.annualDisplay = input(undefined, /* @ts-ignore */
|
|
49
|
+
...(ngDevMode ? [{ debugName: "annualDisplay" }] : /* istanbul ignore next */ []));
|
|
36
50
|
/** Símbolo de moneda. */
|
|
37
51
|
this.currency = input('$', /* @ts-ignore */
|
|
38
52
|
...(ngDevMode ? [{ debugName: "currency" }] : /* istanbul ignore next */ []));
|
|
@@ -50,14 +64,50 @@ class CbPricing {
|
|
|
50
64
|
...(ngDevMode ? [{ debugName: "ctaLabel" }] : /* istanbul ignore next */ []));
|
|
51
65
|
/** Emite el plan elegido. */
|
|
52
66
|
this.planSelect = output();
|
|
67
|
+
this.choices = ['annual', 'monthly'];
|
|
68
|
+
this.horizontal = computed(() => this.layout() === 'horizontal', /* @ts-ignore */
|
|
69
|
+
...(ngDevMode ? [{ debugName: "horizontal" }] : /* istanbul ignore next */ []));
|
|
53
70
|
this.annual = computed(() => this.billing() === 'annual', /* @ts-ignore */
|
|
54
71
|
...(ngDevMode ? [{ debugName: "annual" }] : /* istanbul ignore next */ []));
|
|
72
|
+
this.annualMonthly = computed(() => (this.annualDisplay() ?? (this.horizontal() ? 'monthly' : 'total')) === 'monthly', /* @ts-ignore */
|
|
73
|
+
...(ngDevMode ? [{ debugName: "annualMonthly" }] : /* istanbul ignore next */ []));
|
|
74
|
+
/** El precio visible es mensual (ciclo mensual, o anual expresado por mes). */
|
|
75
|
+
this.perMonthShown = computed(() => !this.annual() || this.annualMonthly(), /* @ts-ignore */
|
|
76
|
+
...(ngDevMode ? [{ debugName: "perMonthShown" }] : /* istanbul ignore next */ []));
|
|
77
|
+
this.numberFormat = computed(() => ({
|
|
78
|
+
whole: new Intl.NumberFormat(this.t().intlLocale, { maximumFractionDigits: 0 }),
|
|
79
|
+
cents: new Intl.NumberFormat(this.t().intlLocale, { minimumFractionDigits: 2, maximumFractionDigits: 2 }),
|
|
80
|
+
}), /* @ts-ignore */
|
|
81
|
+
...(ngDevMode ? [{ debugName: "numberFormat" }] : /* istanbul ignore next */ []));
|
|
82
|
+
}
|
|
83
|
+
num(n) {
|
|
84
|
+
const f = this.numberFormat();
|
|
85
|
+
return Number.isInteger(Math.round(n * 100) / 100) ? f.whole.format(n) : f.cents.format(n);
|
|
86
|
+
}
|
|
87
|
+
annualOf(p) {
|
|
88
|
+
return p.priceAnnual ?? p.priceMonthly * 10;
|
|
55
89
|
}
|
|
56
90
|
priceOf(p) {
|
|
57
|
-
|
|
91
|
+
if (!this.annual())
|
|
92
|
+
return p.priceMonthly;
|
|
93
|
+
return this.annualMonthly() ? this.annualOf(p) / 12 : this.annualOf(p);
|
|
58
94
|
}
|
|
59
95
|
oldPriceOf(p) {
|
|
60
|
-
|
|
96
|
+
if (!this.annual())
|
|
97
|
+
return p.oldMonthly;
|
|
98
|
+
return p.oldAnnual !== undefined && this.annualMonthly() ? p.oldAnnual / 12 : p.oldAnnual;
|
|
99
|
+
}
|
|
100
|
+
billedOf(p) {
|
|
101
|
+
return cbFormat(this.t().billedAnnually, this.currency() + this.num(this.annualOf(p)));
|
|
102
|
+
}
|
|
103
|
+
savingOf(p) {
|
|
104
|
+
return Math.round((p.priceMonthly * 12 - this.annualOf(p)) * 100) / 100;
|
|
105
|
+
}
|
|
106
|
+
savingLabel(p) {
|
|
107
|
+
return cbFormat(this.t().youSave, this.currency() + this.num(this.savingOf(p)));
|
|
108
|
+
}
|
|
109
|
+
badgeOf(p) {
|
|
110
|
+
return p.badge ?? (p.featured ? this.t().recommended : '');
|
|
61
111
|
}
|
|
62
112
|
labelOf(f) {
|
|
63
113
|
return typeof f === 'string' ? f : f.label;
|
|
@@ -65,50 +115,128 @@ class CbPricing {
|
|
|
65
115
|
includedOf(f) {
|
|
66
116
|
return typeof f === 'string' ? true : f.included !== false;
|
|
67
117
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
118
|
+
iconOf(f) {
|
|
119
|
+
if (!this.includedOf(f))
|
|
120
|
+
return 'x';
|
|
121
|
+
return (typeof f === 'string' ? undefined : f.icon) ?? 'check';
|
|
122
|
+
}
|
|
123
|
+
/** Flechas dentro del grupo de opciones de facturación (patrón radiogroup). */
|
|
124
|
+
onChoiceKey(event) {
|
|
125
|
+
if (!['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'Home', 'End'].includes(event.key))
|
|
126
|
+
return;
|
|
127
|
+
event.preventDefault();
|
|
128
|
+
const i = this.choices.indexOf(this.billing());
|
|
129
|
+
const next = event.key === 'Home'
|
|
130
|
+
? this.choices[0]
|
|
131
|
+
: event.key === 'End'
|
|
132
|
+
? this.choices[this.choices.length - 1]
|
|
133
|
+
: this.choices[(i + (event.key === 'ArrowUp' || event.key === 'ArrowLeft' ? -1 : 1) + this.choices.length) % this.choices.length];
|
|
134
|
+
this.billing.set(next);
|
|
135
|
+
this.host.nativeElement.querySelector(`.cb-pricing__choice[data-billing="${next}"]`)?.focus();
|
|
72
136
|
}
|
|
137
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbPricing, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
138
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: CbPricing, isStandalone: true, selector: "cb-pricing", inputs: { plans: { classPropertyName: "plans", publicName: "plans", isSignal: true, isRequired: false, transformFunction: null }, billing: { classPropertyName: "billing", publicName: "billing", isSignal: true, isRequired: false, transformFunction: null }, showToggle: { classPropertyName: "showToggle", publicName: "showToggle", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, subtitle: { classPropertyName: "subtitle", publicName: "subtitle", isSignal: true, isRequired: false, transformFunction: null }, annualBadge: { classPropertyName: "annualBadge", publicName: "annualBadge", isSignal: true, isRequired: false, transformFunction: null }, annualDisplay: { classPropertyName: "annualDisplay", publicName: "annualDisplay", isSignal: true, isRequired: false, transformFunction: null }, currency: { classPropertyName: "currency", publicName: "currency", isSignal: true, isRequired: false, transformFunction: null }, monthlyLabel: { classPropertyName: "monthlyLabel", publicName: "monthlyLabel", isSignal: true, isRequired: false, transformFunction: null }, annualLabel: { classPropertyName: "annualLabel", publicName: "annualLabel", isSignal: true, isRequired: false, transformFunction: null }, perMonthLabel: { classPropertyName: "perMonthLabel", publicName: "perMonthLabel", isSignal: true, isRequired: false, transformFunction: null }, perYearLabel: { classPropertyName: "perYearLabel", publicName: "perYearLabel", isSignal: true, isRequired: false, transformFunction: null }, ctaLabel: { classPropertyName: "ctaLabel", publicName: "ctaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { billing: "billingChange", planSelect: "planSelect" }, host: { properties: { "class.cb-pricing--horizontal": "layout() === 'horizontal'", "class.cb-pricing--list": "layout() === 'list'" }, classAttribute: "cb-pricing" }, ngImport: i0, template: `
|
|
139
|
+
@if (horizontal()) {
|
|
140
|
+
@if (title() || subtitle() || showToggle()) {
|
|
141
|
+
<div class="cb-pricing__top">
|
|
142
|
+
<div class="cb-pricing__intro">
|
|
143
|
+
@if (title()) {
|
|
144
|
+
<h2 class="cb-pricing__title">{{ title() }}</h2>
|
|
145
|
+
}
|
|
146
|
+
@if (subtitle()) {
|
|
147
|
+
<p class="cb-pricing__subtitle">
|
|
148
|
+
<cb-icon name="info" [size]="16" aria-hidden="true" />
|
|
149
|
+
{{ subtitle() }}
|
|
150
|
+
</p>
|
|
151
|
+
}
|
|
152
|
+
</div>
|
|
153
|
+
@if (showToggle()) {
|
|
154
|
+
<div class="cb-pricing__choices" role="radiogroup" [attr.aria-label]="t().billingCycle" (keydown)="onChoiceKey($event)">
|
|
155
|
+
@for (c of choices; track c) {
|
|
156
|
+
<button
|
|
157
|
+
type="button"
|
|
158
|
+
role="radio"
|
|
159
|
+
class="cb-pricing__choice"
|
|
160
|
+
[attr.data-billing]="c"
|
|
161
|
+
[attr.aria-checked]="billing() === c"
|
|
162
|
+
[attr.tabindex]="billing() === c ? 0 : -1"
|
|
163
|
+
(click)="billing.set(c)"
|
|
164
|
+
>
|
|
165
|
+
<span class="cb-pricing__box" aria-hidden="true">
|
|
166
|
+
@if (billing() === c) {
|
|
167
|
+
<cb-icon name="check" [size]="12" />
|
|
168
|
+
}
|
|
169
|
+
</span>
|
|
170
|
+
{{ c === 'annual' ? (annualLabel() ?? t().payAnnually) : (monthlyLabel() ?? t().payMonthly) }}
|
|
171
|
+
@if (c === 'annual' && annualBadge()) {
|
|
172
|
+
<span class="cb-pricing__discount">{{ annualBadge() }}</span>
|
|
173
|
+
}
|
|
174
|
+
</button>
|
|
175
|
+
}
|
|
176
|
+
</div>
|
|
177
|
+
}
|
|
178
|
+
</div>
|
|
179
|
+
}
|
|
180
|
+
} @else {
|
|
181
|
+
@if (title()) {
|
|
182
|
+
<h2 class="cb-pricing__title">{{ title() }}</h2>
|
|
183
|
+
}
|
|
73
184
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
185
|
+
@if (showToggle()) {
|
|
186
|
+
<div class="cb-pricing__toggle-wrap">
|
|
187
|
+
<div class="cb-pricing__toggle" [class.cb-pricing__toggle--annual]="billing() === 'annual'" role="group" [attr.aria-label]="t().billingCycle">
|
|
188
|
+
<span class="cb-pricing__toggle-thumb"></span>
|
|
189
|
+
<button
|
|
190
|
+
type="button"
|
|
191
|
+
class="cb-pricing__toggle-btn"
|
|
192
|
+
[class.cb-pricing__toggle-btn--on]="billing() === 'monthly'"
|
|
193
|
+
[attr.aria-pressed]="billing() === 'monthly'"
|
|
194
|
+
(click)="billing.set('monthly')"
|
|
195
|
+
>
|
|
196
|
+
{{ (monthlyLabel() ?? t().monthly) }}
|
|
197
|
+
</button>
|
|
198
|
+
<button
|
|
199
|
+
type="button"
|
|
200
|
+
class="cb-pricing__toggle-btn"
|
|
201
|
+
[class.cb-pricing__toggle-btn--on]="billing() === 'annual'"
|
|
202
|
+
[attr.aria-pressed]="billing() === 'annual'"
|
|
203
|
+
(click)="billing.set('annual')"
|
|
204
|
+
>
|
|
205
|
+
{{ (annualLabel() ?? t().yearly) }}
|
|
206
|
+
</button>
|
|
207
|
+
</div>
|
|
94
208
|
</div>
|
|
95
|
-
|
|
209
|
+
}
|
|
96
210
|
}
|
|
97
211
|
|
|
98
212
|
<div class="cb-pricing__grid">
|
|
99
213
|
@for (p of plans(); track p.name) {
|
|
100
214
|
<div class="cb-pricing__plan" [class.cb-pricing__plan--featured]="p.featured">
|
|
101
215
|
<div class="cb-pricing__head">
|
|
102
|
-
<span class="cb-pricing__plan-name">
|
|
216
|
+
<span class="cb-pricing__plan-name">
|
|
217
|
+
{{ p.name }}
|
|
218
|
+
@if (badgeOf(p); as badge) {
|
|
219
|
+
<span class="cb-pricing__badge">
|
|
220
|
+
<cb-icon name="star" [size]="12" aria-hidden="true" />
|
|
221
|
+
{{ badge }}
|
|
222
|
+
</span>
|
|
223
|
+
}
|
|
224
|
+
</span>
|
|
103
225
|
<div class="cb-pricing__price-row">
|
|
104
226
|
<div class="cb-pricing__price">
|
|
105
|
-
<strong>{{ currency() }}{{ priceOf(p) }}</strong>
|
|
106
|
-
<span class="cb-pricing__per">{{
|
|
227
|
+
<strong><span class="cb-pricing__currency">{{ currency() }}</span>{{ num(priceOf(p)) }}</strong>
|
|
228
|
+
<span class="cb-pricing__per">{{ perMonthShown() ? (perMonthLabel() ?? t().perMonth) : (perYearLabel() ?? t().perYear) }}</span>
|
|
107
229
|
</div>
|
|
108
230
|
@if (oldPriceOf(p); as old) {
|
|
109
|
-
<span class="cb-pricing__old">{{ currency() }}{{ old }}</span>
|
|
231
|
+
<span class="cb-pricing__old">{{ currency() }}{{ num(old) }}</span>
|
|
110
232
|
}
|
|
111
233
|
</div>
|
|
234
|
+
@if (perMonthShown() && annual()) {
|
|
235
|
+
<p class="cb-pricing__billed">{{ billedOf(p) }}</p>
|
|
236
|
+
@if (savingOf(p) > 0) {
|
|
237
|
+
<span class="cb-pricing__saving">{{ savingLabel(p) }}</span>
|
|
238
|
+
}
|
|
239
|
+
}
|
|
112
240
|
@if (p.description) {
|
|
113
241
|
<p class="cb-pricing__desc">{{ p.description }}</p>
|
|
114
242
|
}
|
|
@@ -118,8 +246,11 @@ class CbPricing {
|
|
|
118
246
|
<ul class="cb-pricing__features">
|
|
119
247
|
@for (f of p.features; track labelOf(f)) {
|
|
120
248
|
<li [class.cb-pricing__feature--off]="!includedOf(f)">
|
|
121
|
-
<cb-icon [name]="
|
|
249
|
+
<cb-icon [name]="iconOf(f)" [size]="16" class="cb-pricing__check" aria-hidden="true" />
|
|
122
250
|
{{ labelOf(f) }}
|
|
251
|
+
@if (!includedOf(f)) {
|
|
252
|
+
<span class="cb-pricing__sr">({{ t().notIncluded }})</span>
|
|
253
|
+
}
|
|
123
254
|
</li>
|
|
124
255
|
}
|
|
125
256
|
</ul>
|
|
@@ -127,7 +258,7 @@ class CbPricing {
|
|
|
127
258
|
<cb-button
|
|
128
259
|
class="cb-pricing__cta"
|
|
129
260
|
[fullWidth]="true"
|
|
130
|
-
[severity]="p.featured ? 'primary' : 'secondary'"
|
|
261
|
+
[severity]="p.featured || horizontal() ? 'primary' : 'secondary'"
|
|
131
262
|
[variant]="p.featured ? 'solid' : 'outlined'"
|
|
132
263
|
(click)="planSelect.emit(p)"
|
|
133
264
|
>
|
|
@@ -136,56 +267,116 @@ class CbPricing {
|
|
|
136
267
|
</div>
|
|
137
268
|
}
|
|
138
269
|
</div>
|
|
139
|
-
`, isInline: true, styles: [":host{display:block;font-family:var(--cb-font-sans);color:var(--cb-color-text)}.cb-pricing__title{max-width:30rem;margin:0 auto 1.75rem;text-align:center;font-size:1.4rem;line-height:1.3}.cb-pricing__toggle-wrap{display:flex;justify-content:center;margin-bottom:2rem}.cb-pricing__toggle{position:relative;display:inline-flex;padding:4px;border-radius:999px;background:var(--cb-color-surface-hover, rgba(0, 0, 0, .06))}.cb-pricing__toggle-thumb{position:absolute;top:4px;left:4px;width:110px;height:calc(100% - 8px);border-radius:999px;background:var(--cb-color-surface-raised, #fff);box-shadow:var(--cb-shadow-sm, 0 1px 3px rgba(0, 0, 0, .1));transition:transform .2s ease}.cb-pricing__toggle--annual .cb-pricing__toggle-thumb{transform:translate(110px)}.cb-pricing__toggle-btn{position:relative;z-index:1;width:110px;height:40px;border:0;background:transparent;color:var(--cb-color-text-muted);font:inherit;font-weight:500;cursor:pointer}.cb-pricing__toggle-btn--on{color:var(--cb-color-text)}.cb-pricing__grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:var(--cb-space-4, 1rem);align-items:start}.cb-pricing__plan{display:flex;flex-direction:column;padding:1.5rem;border:1px solid var(--cb-color-border);border-radius:var(--cb-radius-lg, 16px);background:var(--cb-color-surface)}.cb-pricing__plan--featured{background:var(--cb-color-primary-
|
|
270
|
+
`, isInline: true, styles: [":host{display:block;min-width:0;font-family:var(--cb-font-sans);color:var(--cb-color-text)}.cb-pricing__title{max-width:30rem;margin:0 auto 1.75rem;text-align:center;font-size:1.4rem;line-height:1.3}.cb-pricing__toggle-wrap{display:flex;justify-content:center;margin-bottom:2rem}.cb-pricing__toggle{position:relative;display:inline-flex;padding:4px;border-radius:999px;background:var(--cb-color-surface-hover, rgba(0, 0, 0, .06))}.cb-pricing__toggle-thumb{position:absolute;top:4px;left:4px;width:110px;height:calc(100% - 8px);border-radius:999px;background:var(--cb-color-surface-raised, #fff);box-shadow:var(--cb-shadow-sm, 0 1px 3px rgba(0, 0, 0, .1));transition:transform .2s ease}.cb-pricing__toggle--annual .cb-pricing__toggle-thumb{transform:translate(110px)}.cb-pricing__toggle-btn{position:relative;z-index:1;width:110px;height:40px;border:0;background:transparent;color:var(--cb-color-text-muted);font:inherit;font-weight:500;cursor:pointer}.cb-pricing__toggle-btn--on{color:var(--cb-color-text)}.cb-pricing__grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:var(--cb-space-4, 1rem);align-items:start}.cb-pricing__plan{display:flex;flex-direction:column;padding:1.5rem;border:1px solid var(--cb-color-border);border-radius:var(--cb-radius-lg, 16px);background:var(--cb-color-surface)}.cb-pricing__plan--featured{background:var(--cb-color-primary-700, #047857);border-color:var(--cb-color-primary-700, #047857);color:#fff}.cb-pricing__plan-name{font-weight:600;font-size:1.1rem;margin-bottom:.75rem}.cb-pricing__price-row{display:flex;align-items:center;justify-content:space-between;gap:.5rem}.cb-pricing__price{display:flex;align-items:flex-end;gap:.25rem}.cb-pricing__price strong{font-size:1.9rem;line-height:1}.cb-pricing__per{font-size:.85rem;opacity:.7;margin-bottom:.2rem}.cb-pricing__old{font-size:1.1rem;font-weight:600;text-decoration:line-through;opacity:.45}.cb-pricing__desc{margin:.5rem 0 0;font-size:.85rem;opacity:.8}.cb-pricing__divider{height:1px;margin:1.25rem 0;background:currentColor;opacity:.15}.cb-pricing__features{flex:1;margin:0 0 1.5rem;padding:0;list-style:none;display:flex;flex-direction:column;gap:.65rem}.cb-pricing__features li{display:flex;align-items:center;gap:.6rem;font-size:.875rem}.cb-pricing__feature--off{opacity:.5}.cb-pricing__sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}.cb-pricing__check{color:var(--cb-color-success-500, #22c55e);flex:none}.cb-pricing__feature--off .cb-pricing__check{color:var(--cb-color-text-muted)}.cb-pricing__plan--featured .cb-pricing__check{color:#fff}:host(.cb-pricing--list) .cb-pricing__grid{grid-template-columns:1fr}:host(.cb-pricing--list) .cb-pricing__plan{flex-direction:row;align-items:center;gap:1.75rem}:host(.cb-pricing--list) .cb-pricing__head{flex:0 0 210px}:host(.cb-pricing--list) .cb-pricing__plan-name{margin-bottom:.5rem}:host(.cb-pricing--list) .cb-pricing__divider{display:none}:host(.cb-pricing--list) .cb-pricing__features{flex:1;margin:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem 1.25rem}:host(.cb-pricing--list) .cb-pricing__cta{flex:0 0 170px;align-self:center}@media(max-width:720px){:host(.cb-pricing--list) .cb-pricing__plan{flex-direction:column;align-items:stretch;gap:1rem}:host(.cb-pricing--list) .cb-pricing__head{flex:none}:host(.cb-pricing--list) .cb-pricing__features{grid-template-columns:1fr}:host(.cb-pricing--list) .cb-pricing__cta{flex:none}}.cb-pricing__plan-name{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem}.cb-pricing__badge{display:inline-flex;align-items:center;gap:.25rem;padding:.125rem .5rem;border-radius:999px;background:color-mix(in srgb,currentColor 14%,transparent);font-size:.75rem;font-weight:600;white-space:nowrap}.cb-pricing__badge cb-icon ::ng-deep svg{fill:currentColor}.cb-pricing__billed{margin:.5rem 0 0;font-size:.75rem;opacity:.7}.cb-pricing__saving{align-self:flex-start;margin-top:.25rem;padding:.125rem .5rem;border-radius:999px;background:color-mix(in srgb,var(--cb-color-primary) 16%,transparent);color:color-mix(in srgb,var(--cb-color-primary) 75%,var(--cb-color-text));font-size:.75rem;font-weight:600}.cb-pricing__plan--featured .cb-pricing__saving{background:#fff3;color:inherit}.cb-pricing__head{display:flex;flex-direction:column}.cb-pricing__top{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:1rem 2rem;margin-bottom:1.5rem}:host(.cb-pricing--horizontal) .cb-pricing__title{max-width:none;margin:0;text-align:left;font-size:2rem;line-height:1.2}.cb-pricing__subtitle{display:flex;align-items:center;gap:.375rem;margin:.75rem 0 0;color:var(--cb-color-text-muted);font-size:.875rem}.cb-pricing__choices{display:flex;flex-direction:column;gap:.25rem}.cb-pricing__choice{display:inline-flex;align-items:center;gap:.625rem;padding:.25rem .375rem;border:0;border-radius:var(--cb-radius-md, 6px);background:transparent;color:var(--cb-color-text);font:inherit;font-size:.875rem;text-align:left;cursor:pointer}.cb-pricing__choice:hover{background:var(--cb-color-surface-hover)}.cb-pricing__choice:focus-visible{outline:2px solid var(--cb-color-focus-ring);outline-offset:1px}.cb-pricing__box{display:inline-flex;flex:none;align-items:center;justify-content:center;width:1.125rem;height:1.125rem;border:1.5px solid var(--cb-color-border-strong);border-radius:4px;background:var(--cb-color-surface)}.cb-pricing__choice[aria-checked=true] .cb-pricing__box{border-color:var(--cb-color-primary);background:var(--cb-color-primary);color:var(--cb-color-primary-contrast, #fff)}.cb-pricing__discount{padding:.125rem .5rem;border-radius:var(--cb-radius-sm, 4px);background:var(--cb-color-text);color:var(--cb-color-surface);font-size:.75rem;font-weight:700;white-space:nowrap}:host(.cb-pricing--horizontal) .cb-pricing__grid{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:minmax(12.5rem,1fr);align-items:stretch;overflow-x:auto;padding:.25rem .25rem .5rem}:host(.cb-pricing--horizontal) .cb-pricing__plan{padding:1.25rem}:host(.cb-pricing--horizontal) .cb-pricing__plan-name{margin-bottom:1rem;font-size:1.25rem}:host(.cb-pricing--horizontal) .cb-pricing__price{align-items:baseline}:host(.cb-pricing--horizontal) .cb-pricing__price strong{display:inline-block;font-size:2rem;letter-spacing:-.02em}:host(.cb-pricing--horizontal) .cb-pricing__currency{display:inline-block;margin:.2rem .25rem 0 0;vertical-align:top;letter-spacing:0;font-size:.8rem;font-weight:500;opacity:.7}:host(.cb-pricing--horizontal) .cb-pricing__per{font-size:.9rem}:host(.cb-pricing--horizontal) .cb-pricing__divider{margin:.75rem 0 1rem}:host(.cb-pricing--horizontal) .cb-pricing__features li{align-items:flex-start;line-height:1.45}:host(.cb-pricing--horizontal) .cb-pricing__check{margin-top:.125rem;color:var(--cb-color-primary-text)}:host(.cb-pricing--horizontal) .cb-pricing__feature--off .cb-pricing__check{color:var(--cb-color-text-muted)}:host(.cb-pricing--horizontal) .cb-pricing__plan--featured{border-color:color-mix(in srgb,var(--cb-color-primary) 45%,transparent);background:radial-gradient(circle at 30% 35%,color-mix(in srgb,var(--cb-color-primary) 18%,var(--cb-color-surface)),transparent 60%),linear-gradient(160deg,color-mix(in srgb,var(--cb-color-primary) 42%,var(--cb-color-surface)),color-mix(in srgb,var(--cb-color-primary) 26%,var(--cb-color-surface)) 50%,color-mix(in srgb,var(--cb-color-primary) 48%,var(--cb-color-surface)));box-shadow:var(--cb-shadow-md, 0 6px 20px rgba(0, 0, 0, .08));color:var(--cb-color-text)}:host(.cb-pricing--horizontal) .cb-pricing__plan--featured .cb-pricing__badge{background:var(--cb-color-surface);color:color-mix(in srgb,var(--cb-color-primary) 75%,var(--cb-color-text))}:host(.cb-pricing--horizontal) .cb-pricing__plan--featured .cb-pricing__saving{background:color-mix(in srgb,var(--cb-color-surface) 55%,transparent);color:color-mix(in srgb,var(--cb-color-primary) 60%,var(--cb-color-text))}:host(.cb-pricing--horizontal) .cb-pricing__plan--featured .cb-pricing__check{color:color-mix(in srgb,var(--cb-color-primary) 60%,var(--cb-color-text))}\n"], dependencies: [{ kind: "component", type: CbIcon, selector: "cb-icon", inputs: ["name", "size", "spin", "ariaLabel"] }, { kind: "component", type: CbButton, selector: "cb-button", inputs: ["severity", "variant", "size", "disabled", "loading", "fullWidth", "type", "ariaLabel", "ariaHaspopup", "ariaExpanded", "ariaControls"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
140
271
|
}
|
|
141
272
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbPricing, decorators: [{
|
|
142
273
|
type: Component,
|
|
143
274
|
args: [{ selector: 'cb-pricing', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, imports: [CbIcon, CbButton], host: {
|
|
144
275
|
class: 'cb-pricing',
|
|
145
276
|
'[class.cb-pricing--horizontal]': "layout() === 'horizontal'",
|
|
277
|
+
'[class.cb-pricing--list]': "layout() === 'list'",
|
|
146
278
|
}, template: `
|
|
147
|
-
@if (
|
|
148
|
-
|
|
149
|
-
|
|
279
|
+
@if (horizontal()) {
|
|
280
|
+
@if (title() || subtitle() || showToggle()) {
|
|
281
|
+
<div class="cb-pricing__top">
|
|
282
|
+
<div class="cb-pricing__intro">
|
|
283
|
+
@if (title()) {
|
|
284
|
+
<h2 class="cb-pricing__title">{{ title() }}</h2>
|
|
285
|
+
}
|
|
286
|
+
@if (subtitle()) {
|
|
287
|
+
<p class="cb-pricing__subtitle">
|
|
288
|
+
<cb-icon name="info" [size]="16" aria-hidden="true" />
|
|
289
|
+
{{ subtitle() }}
|
|
290
|
+
</p>
|
|
291
|
+
}
|
|
292
|
+
</div>
|
|
293
|
+
@if (showToggle()) {
|
|
294
|
+
<div class="cb-pricing__choices" role="radiogroup" [attr.aria-label]="t().billingCycle" (keydown)="onChoiceKey($event)">
|
|
295
|
+
@for (c of choices; track c) {
|
|
296
|
+
<button
|
|
297
|
+
type="button"
|
|
298
|
+
role="radio"
|
|
299
|
+
class="cb-pricing__choice"
|
|
300
|
+
[attr.data-billing]="c"
|
|
301
|
+
[attr.aria-checked]="billing() === c"
|
|
302
|
+
[attr.tabindex]="billing() === c ? 0 : -1"
|
|
303
|
+
(click)="billing.set(c)"
|
|
304
|
+
>
|
|
305
|
+
<span class="cb-pricing__box" aria-hidden="true">
|
|
306
|
+
@if (billing() === c) {
|
|
307
|
+
<cb-icon name="check" [size]="12" />
|
|
308
|
+
}
|
|
309
|
+
</span>
|
|
310
|
+
{{ c === 'annual' ? (annualLabel() ?? t().payAnnually) : (monthlyLabel() ?? t().payMonthly) }}
|
|
311
|
+
@if (c === 'annual' && annualBadge()) {
|
|
312
|
+
<span class="cb-pricing__discount">{{ annualBadge() }}</span>
|
|
313
|
+
}
|
|
314
|
+
</button>
|
|
315
|
+
}
|
|
316
|
+
</div>
|
|
317
|
+
}
|
|
318
|
+
</div>
|
|
319
|
+
}
|
|
320
|
+
} @else {
|
|
321
|
+
@if (title()) {
|
|
322
|
+
<h2 class="cb-pricing__title">{{ title() }}</h2>
|
|
323
|
+
}
|
|
150
324
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
325
|
+
@if (showToggle()) {
|
|
326
|
+
<div class="cb-pricing__toggle-wrap">
|
|
327
|
+
<div class="cb-pricing__toggle" [class.cb-pricing__toggle--annual]="billing() === 'annual'" role="group" [attr.aria-label]="t().billingCycle">
|
|
328
|
+
<span class="cb-pricing__toggle-thumb"></span>
|
|
329
|
+
<button
|
|
330
|
+
type="button"
|
|
331
|
+
class="cb-pricing__toggle-btn"
|
|
332
|
+
[class.cb-pricing__toggle-btn--on]="billing() === 'monthly'"
|
|
333
|
+
[attr.aria-pressed]="billing() === 'monthly'"
|
|
334
|
+
(click)="billing.set('monthly')"
|
|
335
|
+
>
|
|
336
|
+
{{ (monthlyLabel() ?? t().monthly) }}
|
|
337
|
+
</button>
|
|
338
|
+
<button
|
|
339
|
+
type="button"
|
|
340
|
+
class="cb-pricing__toggle-btn"
|
|
341
|
+
[class.cb-pricing__toggle-btn--on]="billing() === 'annual'"
|
|
342
|
+
[attr.aria-pressed]="billing() === 'annual'"
|
|
343
|
+
(click)="billing.set('annual')"
|
|
344
|
+
>
|
|
345
|
+
{{ (annualLabel() ?? t().yearly) }}
|
|
346
|
+
</button>
|
|
347
|
+
</div>
|
|
171
348
|
</div>
|
|
172
|
-
|
|
349
|
+
}
|
|
173
350
|
}
|
|
174
351
|
|
|
175
352
|
<div class="cb-pricing__grid">
|
|
176
353
|
@for (p of plans(); track p.name) {
|
|
177
354
|
<div class="cb-pricing__plan" [class.cb-pricing__plan--featured]="p.featured">
|
|
178
355
|
<div class="cb-pricing__head">
|
|
179
|
-
<span class="cb-pricing__plan-name">
|
|
356
|
+
<span class="cb-pricing__plan-name">
|
|
357
|
+
{{ p.name }}
|
|
358
|
+
@if (badgeOf(p); as badge) {
|
|
359
|
+
<span class="cb-pricing__badge">
|
|
360
|
+
<cb-icon name="star" [size]="12" aria-hidden="true" />
|
|
361
|
+
{{ badge }}
|
|
362
|
+
</span>
|
|
363
|
+
}
|
|
364
|
+
</span>
|
|
180
365
|
<div class="cb-pricing__price-row">
|
|
181
366
|
<div class="cb-pricing__price">
|
|
182
|
-
<strong>{{ currency() }}{{ priceOf(p) }}</strong>
|
|
183
|
-
<span class="cb-pricing__per">{{
|
|
367
|
+
<strong><span class="cb-pricing__currency">{{ currency() }}</span>{{ num(priceOf(p)) }}</strong>
|
|
368
|
+
<span class="cb-pricing__per">{{ perMonthShown() ? (perMonthLabel() ?? t().perMonth) : (perYearLabel() ?? t().perYear) }}</span>
|
|
184
369
|
</div>
|
|
185
370
|
@if (oldPriceOf(p); as old) {
|
|
186
|
-
<span class="cb-pricing__old">{{ currency() }}{{ old }}</span>
|
|
371
|
+
<span class="cb-pricing__old">{{ currency() }}{{ num(old) }}</span>
|
|
187
372
|
}
|
|
188
373
|
</div>
|
|
374
|
+
@if (perMonthShown() && annual()) {
|
|
375
|
+
<p class="cb-pricing__billed">{{ billedOf(p) }}</p>
|
|
376
|
+
@if (savingOf(p) > 0) {
|
|
377
|
+
<span class="cb-pricing__saving">{{ savingLabel(p) }}</span>
|
|
378
|
+
}
|
|
379
|
+
}
|
|
189
380
|
@if (p.description) {
|
|
190
381
|
<p class="cb-pricing__desc">{{ p.description }}</p>
|
|
191
382
|
}
|
|
@@ -195,8 +386,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
195
386
|
<ul class="cb-pricing__features">
|
|
196
387
|
@for (f of p.features; track labelOf(f)) {
|
|
197
388
|
<li [class.cb-pricing__feature--off]="!includedOf(f)">
|
|
198
|
-
<cb-icon [name]="
|
|
389
|
+
<cb-icon [name]="iconOf(f)" [size]="16" class="cb-pricing__check" aria-hidden="true" />
|
|
199
390
|
{{ labelOf(f) }}
|
|
391
|
+
@if (!includedOf(f)) {
|
|
392
|
+
<span class="cb-pricing__sr">({{ t().notIncluded }})</span>
|
|
393
|
+
}
|
|
200
394
|
</li>
|
|
201
395
|
}
|
|
202
396
|
</ul>
|
|
@@ -204,7 +398,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
204
398
|
<cb-button
|
|
205
399
|
class="cb-pricing__cta"
|
|
206
400
|
[fullWidth]="true"
|
|
207
|
-
[severity]="p.featured ? 'primary' : 'secondary'"
|
|
401
|
+
[severity]="p.featured || horizontal() ? 'primary' : 'secondary'"
|
|
208
402
|
[variant]="p.featured ? 'solid' : 'outlined'"
|
|
209
403
|
(click)="planSelect.emit(p)"
|
|
210
404
|
>
|
|
@@ -213,8 +407,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
213
407
|
</div>
|
|
214
408
|
}
|
|
215
409
|
</div>
|
|
216
|
-
`, styles: [":host{display:block;font-family:var(--cb-font-sans);color:var(--cb-color-text)}.cb-pricing__title{max-width:30rem;margin:0 auto 1.75rem;text-align:center;font-size:1.4rem;line-height:1.3}.cb-pricing__toggle-wrap{display:flex;justify-content:center;margin-bottom:2rem}.cb-pricing__toggle{position:relative;display:inline-flex;padding:4px;border-radius:999px;background:var(--cb-color-surface-hover, rgba(0, 0, 0, .06))}.cb-pricing__toggle-thumb{position:absolute;top:4px;left:4px;width:110px;height:calc(100% - 8px);border-radius:999px;background:var(--cb-color-surface-raised, #fff);box-shadow:var(--cb-shadow-sm, 0 1px 3px rgba(0, 0, 0, .1));transition:transform .2s ease}.cb-pricing__toggle--annual .cb-pricing__toggle-thumb{transform:translate(110px)}.cb-pricing__toggle-btn{position:relative;z-index:1;width:110px;height:40px;border:0;background:transparent;color:var(--cb-color-text-muted);font:inherit;font-weight:500;cursor:pointer}.cb-pricing__toggle-btn--on{color:var(--cb-color-text)}.cb-pricing__grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:var(--cb-space-4, 1rem);align-items:start}.cb-pricing__plan{display:flex;flex-direction:column;padding:1.5rem;border:1px solid var(--cb-color-border);border-radius:var(--cb-radius-lg, 16px);background:var(--cb-color-surface)}.cb-pricing__plan--featured{background:var(--cb-color-primary-
|
|
217
|
-
}], propDecorators: { plans: [{ type: i0.Input, args: [{ isSignal: true, alias: "plans", required: false }] }], billing: [{ type: i0.Input, args: [{ isSignal: true, alias: "billing", required: false }] }, { type: i0.Output, args: ["billingChange"] }], showToggle: [{ type: i0.Input, args: [{ isSignal: true, alias: "showToggle", required: false }] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], currency: [{ type: i0.Input, args: [{ isSignal: true, alias: "currency", required: false }] }], monthlyLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "monthlyLabel", required: false }] }], annualLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "annualLabel", required: false }] }], perMonthLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "perMonthLabel", required: false }] }], perYearLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "perYearLabel", required: false }] }], ctaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ctaLabel", required: false }] }], planSelect: [{ type: i0.Output, args: ["planSelect"] }] } });
|
|
410
|
+
`, styles: [":host{display:block;min-width:0;font-family:var(--cb-font-sans);color:var(--cb-color-text)}.cb-pricing__title{max-width:30rem;margin:0 auto 1.75rem;text-align:center;font-size:1.4rem;line-height:1.3}.cb-pricing__toggle-wrap{display:flex;justify-content:center;margin-bottom:2rem}.cb-pricing__toggle{position:relative;display:inline-flex;padding:4px;border-radius:999px;background:var(--cb-color-surface-hover, rgba(0, 0, 0, .06))}.cb-pricing__toggle-thumb{position:absolute;top:4px;left:4px;width:110px;height:calc(100% - 8px);border-radius:999px;background:var(--cb-color-surface-raised, #fff);box-shadow:var(--cb-shadow-sm, 0 1px 3px rgba(0, 0, 0, .1));transition:transform .2s ease}.cb-pricing__toggle--annual .cb-pricing__toggle-thumb{transform:translate(110px)}.cb-pricing__toggle-btn{position:relative;z-index:1;width:110px;height:40px;border:0;background:transparent;color:var(--cb-color-text-muted);font:inherit;font-weight:500;cursor:pointer}.cb-pricing__toggle-btn--on{color:var(--cb-color-text)}.cb-pricing__grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:var(--cb-space-4, 1rem);align-items:start}.cb-pricing__plan{display:flex;flex-direction:column;padding:1.5rem;border:1px solid var(--cb-color-border);border-radius:var(--cb-radius-lg, 16px);background:var(--cb-color-surface)}.cb-pricing__plan--featured{background:var(--cb-color-primary-700, #047857);border-color:var(--cb-color-primary-700, #047857);color:#fff}.cb-pricing__plan-name{font-weight:600;font-size:1.1rem;margin-bottom:.75rem}.cb-pricing__price-row{display:flex;align-items:center;justify-content:space-between;gap:.5rem}.cb-pricing__price{display:flex;align-items:flex-end;gap:.25rem}.cb-pricing__price strong{font-size:1.9rem;line-height:1}.cb-pricing__per{font-size:.85rem;opacity:.7;margin-bottom:.2rem}.cb-pricing__old{font-size:1.1rem;font-weight:600;text-decoration:line-through;opacity:.45}.cb-pricing__desc{margin:.5rem 0 0;font-size:.85rem;opacity:.8}.cb-pricing__divider{height:1px;margin:1.25rem 0;background:currentColor;opacity:.15}.cb-pricing__features{flex:1;margin:0 0 1.5rem;padding:0;list-style:none;display:flex;flex-direction:column;gap:.65rem}.cb-pricing__features li{display:flex;align-items:center;gap:.6rem;font-size:.875rem}.cb-pricing__feature--off{opacity:.5}.cb-pricing__sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}.cb-pricing__check{color:var(--cb-color-success-500, #22c55e);flex:none}.cb-pricing__feature--off .cb-pricing__check{color:var(--cb-color-text-muted)}.cb-pricing__plan--featured .cb-pricing__check{color:#fff}:host(.cb-pricing--list) .cb-pricing__grid{grid-template-columns:1fr}:host(.cb-pricing--list) .cb-pricing__plan{flex-direction:row;align-items:center;gap:1.75rem}:host(.cb-pricing--list) .cb-pricing__head{flex:0 0 210px}:host(.cb-pricing--list) .cb-pricing__plan-name{margin-bottom:.5rem}:host(.cb-pricing--list) .cb-pricing__divider{display:none}:host(.cb-pricing--list) .cb-pricing__features{flex:1;margin:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem 1.25rem}:host(.cb-pricing--list) .cb-pricing__cta{flex:0 0 170px;align-self:center}@media(max-width:720px){:host(.cb-pricing--list) .cb-pricing__plan{flex-direction:column;align-items:stretch;gap:1rem}:host(.cb-pricing--list) .cb-pricing__head{flex:none}:host(.cb-pricing--list) .cb-pricing__features{grid-template-columns:1fr}:host(.cb-pricing--list) .cb-pricing__cta{flex:none}}.cb-pricing__plan-name{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem}.cb-pricing__badge{display:inline-flex;align-items:center;gap:.25rem;padding:.125rem .5rem;border-radius:999px;background:color-mix(in srgb,currentColor 14%,transparent);font-size:.75rem;font-weight:600;white-space:nowrap}.cb-pricing__badge cb-icon ::ng-deep svg{fill:currentColor}.cb-pricing__billed{margin:.5rem 0 0;font-size:.75rem;opacity:.7}.cb-pricing__saving{align-self:flex-start;margin-top:.25rem;padding:.125rem .5rem;border-radius:999px;background:color-mix(in srgb,var(--cb-color-primary) 16%,transparent);color:color-mix(in srgb,var(--cb-color-primary) 75%,var(--cb-color-text));font-size:.75rem;font-weight:600}.cb-pricing__plan--featured .cb-pricing__saving{background:#fff3;color:inherit}.cb-pricing__head{display:flex;flex-direction:column}.cb-pricing__top{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:1rem 2rem;margin-bottom:1.5rem}:host(.cb-pricing--horizontal) .cb-pricing__title{max-width:none;margin:0;text-align:left;font-size:2rem;line-height:1.2}.cb-pricing__subtitle{display:flex;align-items:center;gap:.375rem;margin:.75rem 0 0;color:var(--cb-color-text-muted);font-size:.875rem}.cb-pricing__choices{display:flex;flex-direction:column;gap:.25rem}.cb-pricing__choice{display:inline-flex;align-items:center;gap:.625rem;padding:.25rem .375rem;border:0;border-radius:var(--cb-radius-md, 6px);background:transparent;color:var(--cb-color-text);font:inherit;font-size:.875rem;text-align:left;cursor:pointer}.cb-pricing__choice:hover{background:var(--cb-color-surface-hover)}.cb-pricing__choice:focus-visible{outline:2px solid var(--cb-color-focus-ring);outline-offset:1px}.cb-pricing__box{display:inline-flex;flex:none;align-items:center;justify-content:center;width:1.125rem;height:1.125rem;border:1.5px solid var(--cb-color-border-strong);border-radius:4px;background:var(--cb-color-surface)}.cb-pricing__choice[aria-checked=true] .cb-pricing__box{border-color:var(--cb-color-primary);background:var(--cb-color-primary);color:var(--cb-color-primary-contrast, #fff)}.cb-pricing__discount{padding:.125rem .5rem;border-radius:var(--cb-radius-sm, 4px);background:var(--cb-color-text);color:var(--cb-color-surface);font-size:.75rem;font-weight:700;white-space:nowrap}:host(.cb-pricing--horizontal) .cb-pricing__grid{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:minmax(12.5rem,1fr);align-items:stretch;overflow-x:auto;padding:.25rem .25rem .5rem}:host(.cb-pricing--horizontal) .cb-pricing__plan{padding:1.25rem}:host(.cb-pricing--horizontal) .cb-pricing__plan-name{margin-bottom:1rem;font-size:1.25rem}:host(.cb-pricing--horizontal) .cb-pricing__price{align-items:baseline}:host(.cb-pricing--horizontal) .cb-pricing__price strong{display:inline-block;font-size:2rem;letter-spacing:-.02em}:host(.cb-pricing--horizontal) .cb-pricing__currency{display:inline-block;margin:.2rem .25rem 0 0;vertical-align:top;letter-spacing:0;font-size:.8rem;font-weight:500;opacity:.7}:host(.cb-pricing--horizontal) .cb-pricing__per{font-size:.9rem}:host(.cb-pricing--horizontal) .cb-pricing__divider{margin:.75rem 0 1rem}:host(.cb-pricing--horizontal) .cb-pricing__features li{align-items:flex-start;line-height:1.45}:host(.cb-pricing--horizontal) .cb-pricing__check{margin-top:.125rem;color:var(--cb-color-primary-text)}:host(.cb-pricing--horizontal) .cb-pricing__feature--off .cb-pricing__check{color:var(--cb-color-text-muted)}:host(.cb-pricing--horizontal) .cb-pricing__plan--featured{border-color:color-mix(in srgb,var(--cb-color-primary) 45%,transparent);background:radial-gradient(circle at 30% 35%,color-mix(in srgb,var(--cb-color-primary) 18%,var(--cb-color-surface)),transparent 60%),linear-gradient(160deg,color-mix(in srgb,var(--cb-color-primary) 42%,var(--cb-color-surface)),color-mix(in srgb,var(--cb-color-primary) 26%,var(--cb-color-surface)) 50%,color-mix(in srgb,var(--cb-color-primary) 48%,var(--cb-color-surface)));box-shadow:var(--cb-shadow-md, 0 6px 20px rgba(0, 0, 0, .08));color:var(--cb-color-text)}:host(.cb-pricing--horizontal) .cb-pricing__plan--featured .cb-pricing__badge{background:var(--cb-color-surface);color:color-mix(in srgb,var(--cb-color-primary) 75%,var(--cb-color-text))}:host(.cb-pricing--horizontal) .cb-pricing__plan--featured .cb-pricing__saving{background:color-mix(in srgb,var(--cb-color-surface) 55%,transparent);color:color-mix(in srgb,var(--cb-color-primary) 60%,var(--cb-color-text))}:host(.cb-pricing--horizontal) .cb-pricing__plan--featured .cb-pricing__check{color:color-mix(in srgb,var(--cb-color-primary) 60%,var(--cb-color-text))}\n"] }]
|
|
411
|
+
}], propDecorators: { plans: [{ type: i0.Input, args: [{ isSignal: true, alias: "plans", required: false }] }], billing: [{ type: i0.Input, args: [{ isSignal: true, alias: "billing", required: false }] }, { type: i0.Output, args: ["billingChange"] }], showToggle: [{ type: i0.Input, args: [{ isSignal: true, alias: "showToggle", required: false }] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], subtitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "subtitle", required: false }] }], annualBadge: [{ type: i0.Input, args: [{ isSignal: true, alias: "annualBadge", required: false }] }], annualDisplay: [{ type: i0.Input, args: [{ isSignal: true, alias: "annualDisplay", required: false }] }], currency: [{ type: i0.Input, args: [{ isSignal: true, alias: "currency", required: false }] }], monthlyLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "monthlyLabel", required: false }] }], annualLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "annualLabel", required: false }] }], perMonthLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "perMonthLabel", required: false }] }], perYearLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "perYearLabel", required: false }] }], ctaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ctaLabel", required: false }] }], planSelect: [{ type: i0.Output, args: ["planSelect"] }] } });
|
|
218
412
|
|
|
219
413
|
/*
|
|
220
414
|
* Public API Surface de @caribeng/ui/pricing
|