@caribeng/ui 22.1.1 → 22.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +134 -12
- package/fesm2022/caribeng-ui-accordion.mjs +4 -4
- package/fesm2022/caribeng-ui-anchor.mjs +169 -0
- package/fesm2022/caribeng-ui-autocomplete.mjs +10 -8
- package/fesm2022/caribeng-ui-avatar.mjs +2 -2
- package/fesm2022/caribeng-ui-avatargroup.mjs +9 -3
- package/fesm2022/caribeng-ui-badge.mjs +8 -2
- package/fesm2022/caribeng-ui-blockui.mjs +12 -4
- package/fesm2022/caribeng-ui-breadcrumb.mjs +17 -7
- package/fesm2022/caribeng-ui-button.mjs +22 -2
- package/fesm2022/caribeng-ui-caribe-alert.mjs +5 -2
- package/fesm2022/caribeng-ui-caribe-animation-lottie.mjs +6 -3
- package/fesm2022/caribeng-ui-caribe-button-group.mjs +6 -3
- package/fesm2022/caribeng-ui-caribe-calendar.mjs +11 -6
- package/fesm2022/caribeng-ui-caribe-card-content.mjs +6 -3
- package/fesm2022/caribeng-ui-caribe-card-move.mjs +29 -7
- package/fesm2022/caribeng-ui-caribe-card-select.mjs +56 -14
- package/fesm2022/caribeng-ui-caribe-circle-loading.mjs +10 -7
- package/fesm2022/caribeng-ui-caribe-coachmark.mjs +42 -19
- package/fesm2022/caribeng-ui-caribe-data-table.mjs +15 -9
- package/fesm2022/caribeng-ui-caribe-dots-indicator.mjs +38 -5
- package/fesm2022/caribeng-ui-caribe-expansion-panel.mjs +16 -5
- package/fesm2022/caribeng-ui-caribe-fab-menu.mjs +56 -7
- package/fesm2022/caribeng-ui-caribe-file-download.mjs +68 -27
- package/fesm2022/caribeng-ui-caribe-file-select.mjs +22 -17
- package/fesm2022/caribeng-ui-caribe-float-menu.mjs +6 -3
- package/fesm2022/caribeng-ui-caribe-footer.mjs +8 -4
- package/fesm2022/caribeng-ui-caribe-header.mjs +6 -3
- package/fesm2022/caribeng-ui-caribe-icon-button.mjs +6 -3
- package/fesm2022/caribeng-ui-caribe-illustration.mjs +6 -3
- package/fesm2022/caribeng-ui-caribe-inline-alert.mjs +5 -2
- package/fesm2022/caribeng-ui-caribe-input-search.mjs +14 -10
- package/fesm2022/caribeng-ui-caribe-input-select.mjs +12 -10
- package/fesm2022/caribeng-ui-caribe-input-token.mjs +61 -11
- package/fesm2022/caribeng-ui-caribe-link.mjs +7 -2
- package/fesm2022/caribeng-ui-caribe-loader.mjs +8 -5
- package/fesm2022/caribeng-ui-caribe-modal.mjs +32 -16
- package/fesm2022/caribeng-ui-caribe-off-canvas.mjs +26 -12
- package/fesm2022/caribeng-ui-caribe-onboarding.mjs +44 -19
- package/fesm2022/caribeng-ui-caribe-pictogram.mjs +6 -3
- package/fesm2022/caribeng-ui-caribe-pop-over.mjs +34 -10
- package/fesm2022/caribeng-ui-caribe-preloader.mjs +9 -6
- package/fesm2022/caribeng-ui-caribe-progress-bar.mjs +5 -2
- package/fesm2022/caribeng-ui-caribe-shortcut.mjs +8 -3
- package/fesm2022/caribeng-ui-caribe-step-indicator.mjs +12 -5
- package/fesm2022/caribeng-ui-caribe-stroke.mjs +6 -3
- package/fesm2022/caribeng-ui-caribe-switch.mjs +5 -3
- package/fesm2022/caribeng-ui-caribe-tag-button.mjs +1 -1
- package/fesm2022/caribeng-ui-caribe-tracker.mjs +5 -2
- package/fesm2022/caribeng-ui-caribe-transaction-status.mjs +1 -1
- package/fesm2022/caribeng-ui-caribe-voucher.mjs +11 -8
- package/fesm2022/caribeng-ui-carousel.mjs +49 -14
- package/fesm2022/caribeng-ui-cascadeselect.mjs +22 -8
- package/fesm2022/caribeng-ui-chart.mjs +2601 -303
- package/fesm2022/caribeng-ui-chat.mjs +1303 -0
- package/fesm2022/caribeng-ui-chip.mjs +9 -4
- package/fesm2022/caribeng-ui-chips.mjs +9 -5
- package/fesm2022/caribeng-ui-code-block.mjs +332 -0
- package/fesm2022/caribeng-ui-colorpicker.mjs +107 -11
- package/fesm2022/caribeng-ui-command-palette.mjs +476 -0
- package/fesm2022/caribeng-ui-confirmdialog.mjs +140 -10
- package/fesm2022/caribeng-ui-confirmpopup.mjs +209 -9
- package/fesm2022/caribeng-ui-contextmenu.mjs +13 -6
- package/fesm2022/caribeng-ui-copy-button.mjs +230 -0
- package/fesm2022/caribeng-ui-dataview.mjs +214 -6
- package/fesm2022/caribeng-ui-datepicker.mjs +1630 -393
- package/fesm2022/caribeng-ui-descriptions.mjs +124 -0
- package/fesm2022/caribeng-ui-dialog.mjs +10 -7
- package/fesm2022/caribeng-ui-dock.mjs +58 -15
- package/fesm2022/caribeng-ui-drawer.mjs +17 -9
- package/fesm2022/caribeng-ui-dynamicdialog.mjs +210 -6
- package/fesm2022/caribeng-ui-editor.mjs +4413 -243
- package/fesm2022/caribeng-ui-empty.mjs +80 -0
- package/fesm2022/caribeng-ui-fieldset.mjs +2 -2
- package/fesm2022/caribeng-ui-file-card.mjs +136 -19
- package/fesm2022/caribeng-ui-fileupload.mjs +96 -19
- package/fesm2022/caribeng-ui-floatlabel.mjs +4 -2
- package/fesm2022/caribeng-ui-folder-card.mjs +132 -15
- package/fesm2022/caribeng-ui-galleria.mjs +76 -45
- package/fesm2022/caribeng-ui-image.mjs +52 -29
- package/fesm2022/caribeng-ui-inlinemessage.mjs +2 -2
- package/fesm2022/caribeng-ui-inplace.mjs +22 -6
- package/fesm2022/caribeng-ui-input-number.mjs +9 -7
- package/fesm2022/caribeng-ui-inputgroup.mjs +2 -2
- package/fesm2022/caribeng-ui-inputmask.mjs +22 -13
- package/fesm2022/caribeng-ui-inputotp.mjs +12 -6
- package/fesm2022/caribeng-ui-kanban.mjs +4612 -0
- package/fesm2022/caribeng-ui-kbd.mjs +122 -0
- package/fesm2022/caribeng-ui-keyfilter.mjs +72 -0
- package/fesm2022/caribeng-ui-listbox.mjs +13 -11
- package/fesm2022/caribeng-ui-megamenu.mjs +228 -32
- package/fesm2022/caribeng-ui-mentions.mjs +495 -0
- package/fesm2022/caribeng-ui-menu.mjs +18 -8
- package/fesm2022/caribeng-ui-menubar.mjs +17 -8
- package/fesm2022/caribeng-ui-message.mjs +13 -7
- package/fesm2022/caribeng-ui-metergroup.mjs +29 -11
- package/fesm2022/caribeng-ui-multiselect.mjs +399 -97
- package/fesm2022/caribeng-ui-orderlist.mjs +230 -11
- package/fesm2022/caribeng-ui-organizationchart.mjs +16 -15
- package/fesm2022/caribeng-ui-paginator.mjs +18 -15
- package/fesm2022/caribeng-ui-panel.mjs +11 -8
- package/fesm2022/caribeng-ui-panelmenu.mjs +14 -8
- package/fesm2022/caribeng-ui-password.mjs +8 -6
- package/fesm2022/caribeng-ui-pdfviewer.mjs +1553 -0
- package/fesm2022/caribeng-ui-phone-input.mjs +688 -0
- package/fesm2022/caribeng-ui-picklist.mjs +251 -14
- package/fesm2022/caribeng-ui-pricing.mjs +272 -75
- package/fesm2022/caribeng-ui-qrcode.mjs +564 -0
- package/fesm2022/caribeng-ui-rating.mjs +7 -3
- package/fesm2022/caribeng-ui-repeater.mjs +223 -0
- package/fesm2022/caribeng-ui-result.mjs +91 -0
- package/fesm2022/caribeng-ui-ripple.mjs +2 -0
- package/fesm2022/caribeng-ui-scrollpanel.mjs +6 -3
- package/fesm2022/caribeng-ui-scrolltop.mjs +9 -4
- package/fesm2022/caribeng-ui-select.mjs +379 -87
- package/fesm2022/caribeng-ui-selectbutton.mjs +2 -2
- package/fesm2022/caribeng-ui-sidebar.mjs +573 -0
- package/fesm2022/caribeng-ui-slider.mjs +171 -75
- package/fesm2022/caribeng-ui-speeddial.mjs +7 -4
- package/fesm2022/caribeng-ui-spinner.mjs +5 -2
- package/fesm2022/caribeng-ui-splitbutton.mjs +163 -0
- package/fesm2022/caribeng-ui-splitter.mjs +5 -2
- package/fesm2022/caribeng-ui-statistic.mjs +183 -0
- package/fesm2022/caribeng-ui-stepper.mjs +17 -7
- package/fesm2022/caribeng-ui-steps.mjs +6 -3
- package/fesm2022/caribeng-ui-table.mjs +716 -84
- package/fesm2022/caribeng-ui-tabmenu.mjs +13 -6
- package/fesm2022/caribeng-ui-tag.mjs +2 -2
- package/fesm2022/caribeng-ui-terminal.mjs +45 -9
- package/fesm2022/caribeng-ui-themetoggle.mjs +82 -0
- package/fesm2022/caribeng-ui-tieredmenu.mjs +113 -20
- package/fesm2022/caribeng-ui-timeline.mjs +175 -6
- package/fesm2022/caribeng-ui-toast.mjs +7 -4
- package/fesm2022/caribeng-ui-togglebutton.mjs +8 -6
- package/fesm2022/caribeng-ui-toolbar.mjs +6 -3
- package/fesm2022/caribeng-ui-tree.mjs +302 -6
- package/fesm2022/caribeng-ui-treeselect.mjs +26 -10
- package/fesm2022/caribeng-ui-treetable.mjs +269 -6
- package/fesm2022/caribeng-ui-virtualscroller.mjs +123 -10
- package/fesm2022/caribeng-ui.mjs +1216 -6
- package/package.json +93 -3
- package/schematics/collection.json +15 -0
- package/schematics/migrate-from-primeng/core-icons.json +1 -0
- package/schematics/migrate-from-primeng/icons.js +269 -0
- package/schematics/migrate-from-primeng/index.js +290 -0
- package/schematics/migrate-from-primeng/mappings/button.js +93 -0
- package/schematics/migrate-from-primeng/mappings/card.js +33 -0
- package/schematics/migrate-from-primeng/mappings/checkbox.js +44 -0
- package/schematics/migrate-from-primeng/mappings/confirm.js +221 -0
- package/schematics/migrate-from-primeng/mappings/datepicker.js +121 -0
- package/schematics/migrate-from-primeng/mappings/dialog.js +84 -0
- package/schematics/migrate-from-primeng/mappings/index.js +88 -0
- package/schematics/migrate-from-primeng/mappings/inputnumber.js +62 -0
- package/schematics/migrate-from-primeng/mappings/inputtext.js +60 -0
- package/schematics/migrate-from-primeng/mappings/menu.js +468 -0
- package/schematics/migrate-from-primeng/mappings/multiselect.js +49 -0
- package/schematics/migrate-from-primeng/mappings/radiobutton.js +22 -0
- package/schematics/migrate-from-primeng/mappings/rules.js +206 -0
- package/schematics/migrate-from-primeng/mappings/select.js +97 -0
- package/schematics/migrate-from-primeng/mappings/service-calls.js +100 -0
- package/schematics/migrate-from-primeng/mappings/table.js +613 -0
- package/schematics/migrate-from-primeng/mappings/tabs.js +225 -0
- package/schematics/migrate-from-primeng/mappings/tag.js +29 -0
- package/schematics/migrate-from-primeng/mappings/textarea.js +44 -0
- package/schematics/migrate-from-primeng/mappings/toast.js +173 -0
- package/schematics/migrate-from-primeng/mappings/toggleswitch.js +37 -0
- package/schematics/migrate-from-primeng/mappings/tooltip.js +44 -0
- package/schematics/migrate-from-primeng/mappings/types.js +10 -0
- package/schematics/migrate-from-primeng/report.js +79 -0
- package/schematics/migrate-from-primeng/schema.js +2 -0
- package/schematics/migrate-from-primeng/schema.json +34 -0
- package/schematics/migrate-from-primeng/template.js +387 -0
- package/schematics/migrate-from-primeng/todo.js +5 -0
- package/schematics/migrate-from-primeng/typescript.js +442 -0
- package/schematics/migrate-from-primeng/workspace.js +117 -0
- package/schematics/ng-add/index.js +140 -0
- package/schematics/ng-add/schema.js +2 -0
- package/schematics/ng-add/schema.json +66 -0
- package/types/caribeng-ui-anchor.d.ts +50 -0
- package/types/caribeng-ui-autocomplete.d.ts +4 -2
- package/types/caribeng-ui-avatargroup.d.ts +3 -1
- package/types/caribeng-ui-badge.d.ts +3 -1
- package/types/caribeng-ui-blockui.d.ts +9 -4
- package/types/caribeng-ui-breadcrumb.d.ts +11 -0
- package/types/caribeng-ui-button.d.ts +9 -1
- package/types/caribeng-ui-caribe-alert.d.ts +3 -0
- package/types/caribeng-ui-caribe-animation-lottie.d.ts +4 -1
- package/types/caribeng-ui-caribe-button-group.d.ts +4 -1
- package/types/caribeng-ui-caribe-calendar.d.ts +5 -1
- package/types/caribeng-ui-caribe-card-content.d.ts +4 -1
- package/types/caribeng-ui-caribe-card-move.d.ts +13 -13
- package/types/caribeng-ui-caribe-card-select.d.ts +10 -1
- package/types/caribeng-ui-caribe-circle-loading.d.ts +4 -1
- package/types/caribeng-ui-caribe-coachmark.d.ts +6 -0
- package/types/caribeng-ui-caribe-data-table.d.ts +7 -2
- package/types/caribeng-ui-caribe-dots-indicator.d.ts +9 -0
- package/types/caribeng-ui-caribe-expansion-panel.d.ts +7 -10
- package/types/caribeng-ui-caribe-fab-menu.d.ts +10 -1
- package/types/caribeng-ui-caribe-file-download.d.ts +8 -10
- package/types/caribeng-ui-caribe-file-select.d.ts +7 -1
- package/types/caribeng-ui-caribe-float-menu.d.ts +4 -1
- package/types/caribeng-ui-caribe-header.d.ts +3 -0
- package/types/caribeng-ui-caribe-icon-button.d.ts +4 -1
- package/types/caribeng-ui-caribe-illustration.d.ts +4 -1
- package/types/caribeng-ui-caribe-inline-alert.d.ts +3 -0
- package/types/caribeng-ui-caribe-input-search.d.ts +4 -2
- package/types/caribeng-ui-caribe-input-select.d.ts +4 -2
- package/types/caribeng-ui-caribe-input-token.d.ts +16 -1
- package/types/caribeng-ui-caribe-link.d.ts +3 -0
- package/types/caribeng-ui-caribe-loader.d.ts +4 -1
- package/types/caribeng-ui-caribe-modal.d.ts +7 -10
- package/types/caribeng-ui-caribe-off-canvas.d.ts +6 -1
- package/types/caribeng-ui-caribe-onboarding.d.ts +6 -0
- package/types/caribeng-ui-caribe-pictogram.d.ts +4 -1
- package/types/caribeng-ui-caribe-pop-over.d.ts +7 -10
- package/types/caribeng-ui-caribe-preloader.d.ts +4 -1
- package/types/caribeng-ui-caribe-progress-bar.d.ts +3 -0
- package/types/caribeng-ui-caribe-shortcut.d.ts +3 -1
- package/types/caribeng-ui-caribe-step-indicator.d.ts +6 -0
- package/types/caribeng-ui-caribe-stroke.d.ts +4 -1
- package/types/caribeng-ui-caribe-switch.d.ts +3 -1
- package/types/caribeng-ui-caribe-tracker.d.ts +3 -0
- package/types/caribeng-ui-caribe-voucher.d.ts +5 -2
- package/types/caribeng-ui-carousel.d.ts +10 -1
- package/types/caribeng-ui-cascadeselect.d.ts +7 -2
- package/types/caribeng-ui-chart.d.ts +471 -44
- package/types/caribeng-ui-chat.d.ts +299 -0
- package/types/caribeng-ui-chip.d.ts +6 -0
- package/types/caribeng-ui-chips.d.ts +6 -2
- package/types/caribeng-ui-code-block.d.ts +65 -0
- package/types/caribeng-ui-colorpicker.d.ts +8 -2
- package/types/caribeng-ui-command-palette.d.ts +133 -0
- package/types/caribeng-ui-confirmdialog.d.ts +57 -6
- package/types/caribeng-ui-confirmpopup.d.ts +74 -5
- package/types/caribeng-ui-contextmenu.d.ts +11 -1
- package/types/caribeng-ui-copy-button.d.ts +90 -0
- package/types/caribeng-ui-dataview.d.ts +65 -5
- package/types/caribeng-ui-datepicker.d.ts +186 -21
- package/types/caribeng-ui-descriptions.d.ts +63 -0
- package/types/caribeng-ui-dialog.d.ts +4 -1
- package/types/caribeng-ui-dock.d.ts +17 -2
- package/types/caribeng-ui-drawer.d.ts +7 -2
- package/types/caribeng-ui-dynamicdialog.d.ts +93 -3
- package/types/caribeng-ui-editor.d.ts +486 -13
- package/types/caribeng-ui-empty.d.ts +34 -0
- package/types/caribeng-ui-file-card.d.ts +28 -3
- package/types/caribeng-ui-fileupload.d.ts +27 -4
- package/types/caribeng-ui-folder-card.d.ts +31 -6
- package/types/caribeng-ui-galleria.d.ts +9 -0
- package/types/caribeng-ui-image.d.ts +10 -0
- package/types/caribeng-ui-inplace.d.ts +8 -0
- package/types/caribeng-ui-input-number.d.ts +3 -1
- package/types/caribeng-ui-inputmask.d.ts +8 -1
- package/types/caribeng-ui-inputotp.d.ts +7 -2
- package/types/caribeng-ui-kanban.d.ts +783 -0
- package/types/caribeng-ui-kbd.d.ts +36 -0
- package/types/caribeng-ui-keyfilter.d.ts +30 -0
- package/types/caribeng-ui-listbox.d.ts +5 -3
- package/types/caribeng-ui-megamenu.d.ts +37 -2
- package/types/caribeng-ui-mentions.d.ts +127 -0
- package/types/caribeng-ui-menu.d.ts +14 -2
- package/types/caribeng-ui-menubar.d.ts +12 -1
- package/types/caribeng-ui-message.d.ts +5 -0
- package/types/caribeng-ui-metergroup.d.ts +9 -1
- package/types/caribeng-ui-multiselect.d.ts +71 -10
- package/types/caribeng-ui-orderlist.d.ts +58 -6
- package/types/caribeng-ui-organizationchart.d.ts +7 -1
- package/types/caribeng-ui-paginator.d.ts +3 -0
- package/types/caribeng-ui-panel.d.ts +3 -0
- package/types/caribeng-ui-panelmenu.d.ts +11 -1
- package/types/caribeng-ui-password.d.ts +4 -2
- package/types/caribeng-ui-pdfviewer.d.ts +258 -0
- package/types/caribeng-ui-phone-input.d.ts +168 -0
- package/types/caribeng-ui-picklist.d.ts +67 -7
- package/types/caribeng-ui-pricing.d.ts +49 -9
- package/types/caribeng-ui-qrcode.d.ts +88 -0
- package/types/caribeng-ui-rating.d.ts +6 -2
- package/types/caribeng-ui-repeater.d.ts +79 -0
- package/types/caribeng-ui-result.d.ts +35 -0
- package/types/caribeng-ui-scrollpanel.d.ts +4 -1
- package/types/caribeng-ui-scrolltop.d.ts +4 -1
- package/types/caribeng-ui-select.d.ts +73 -9
- package/types/caribeng-ui-sidebar.d.ts +167 -0
- package/types/caribeng-ui-slider.d.ts +63 -10
- package/types/caribeng-ui-speeddial.d.ts +5 -2
- package/types/caribeng-ui-spinner.d.ts +3 -0
- package/types/caribeng-ui-splitbutton.d.ts +49 -0
- package/types/caribeng-ui-splitter.d.ts +3 -0
- package/types/caribeng-ui-statistic.d.ts +65 -0
- package/types/caribeng-ui-stepper.d.ts +5 -0
- package/types/caribeng-ui-steps.d.ts +4 -1
- package/types/caribeng-ui-table.d.ts +185 -17
- package/types/caribeng-ui-tabmenu.d.ts +11 -1
- package/types/caribeng-ui-terminal.d.ts +10 -0
- package/types/caribeng-ui-themetoggle.d.ts +32 -0
- package/types/caribeng-ui-tieredmenu.d.ts +22 -3
- package/types/caribeng-ui-timeline.d.ts +63 -4
- package/types/caribeng-ui-toast.d.ts +3 -0
- package/types/caribeng-ui-togglebutton.d.ts +5 -3
- package/types/caribeng-ui-toolbar.d.ts +7 -4
- package/types/caribeng-ui-tree.d.ts +76 -4
- package/types/caribeng-ui-treeselect.d.ts +10 -2
- package/types/caribeng-ui-treetable.d.ts +68 -4
- package/types/caribeng-ui-virtualscroller.d.ts +45 -5
- package/types/caribeng-ui.d.ts +775 -12
|
@@ -1,7 +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, cbFormat } from '@caribeng/ui';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Tabla de precios de CaribeNG: selector Mensual/Anual opcional y planes
|
|
@@ -15,6 +16,9 @@ import { CbButton } from '@caribeng/ui/button';
|
|
|
15
16
|
*/
|
|
16
17
|
class CbPricing {
|
|
17
18
|
constructor() {
|
|
19
|
+
/** Textos de interfaz en el idioma activo (`provideCaribeNG({ locale })`). */
|
|
20
|
+
this.t = injectCbTranslation();
|
|
21
|
+
this.host = inject(ElementRef);
|
|
18
22
|
/** Planes a mostrar. */
|
|
19
23
|
this.plans = input([], /* @ts-ignore */
|
|
20
24
|
...(ngDevMode ? [{ debugName: "plans" }] : /* istanbul ignore next */ []));
|
|
@@ -24,37 +28,86 @@ class CbPricing {
|
|
|
24
28
|
/** Muestra el selector Mensual/Anual. */
|
|
25
29
|
this.showToggle = input(true, /* @ts-ignore */
|
|
26
30
|
...(ngDevMode ? [{ debugName: "showToggle" }] : /* istanbul ignore next */ []));
|
|
27
|
-
/** Disposición de los planes
|
|
31
|
+
/** Disposición de los planes (ver {@link CbPricingLayout}). */
|
|
28
32
|
this.layout = input('grid', /* @ts-ignore */
|
|
29
33
|
...(ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []));
|
|
30
34
|
/** Título opcional sobre la tabla. */
|
|
31
35
|
this.title = input('', /* @ts-ignore */
|
|
32
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 */ []));
|
|
33
50
|
/** Símbolo de moneda. */
|
|
34
51
|
this.currency = input('$', /* @ts-ignore */
|
|
35
52
|
...(ngDevMode ? [{ debugName: "currency" }] : /* istanbul ignore next */ []));
|
|
36
53
|
/** Etiquetas configurables. */
|
|
37
|
-
this.monthlyLabel = input(
|
|
54
|
+
this.monthlyLabel = input(undefined, /* @ts-ignore */
|
|
38
55
|
...(ngDevMode ? [{ debugName: "monthlyLabel" }] : /* istanbul ignore next */ []));
|
|
39
|
-
this.annualLabel = input(
|
|
56
|
+
this.annualLabel = input(undefined, /* @ts-ignore */
|
|
40
57
|
...(ngDevMode ? [{ debugName: "annualLabel" }] : /* istanbul ignore next */ []));
|
|
41
|
-
this.perMonthLabel = input(
|
|
58
|
+
this.perMonthLabel = input(undefined, /* @ts-ignore */
|
|
42
59
|
...(ngDevMode ? [{ debugName: "perMonthLabel" }] : /* istanbul ignore next */ []));
|
|
43
|
-
this.perYearLabel = input(
|
|
60
|
+
this.perYearLabel = input(undefined, /* @ts-ignore */
|
|
44
61
|
...(ngDevMode ? [{ debugName: "perYearLabel" }] : /* istanbul ignore next */ []));
|
|
45
62
|
/** Prefijo del CTA cuando el plan no define `ctaLabel`. */
|
|
46
|
-
this.ctaLabel = input(
|
|
63
|
+
this.ctaLabel = input(undefined, /* @ts-ignore */
|
|
47
64
|
...(ngDevMode ? [{ debugName: "ctaLabel" }] : /* istanbul ignore next */ []));
|
|
48
65
|
/** Emite el plan elegido. */
|
|
49
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 */ []));
|
|
50
70
|
this.annual = computed(() => this.billing() === 'annual', /* @ts-ignore */
|
|
51
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;
|
|
52
89
|
}
|
|
53
90
|
priceOf(p) {
|
|
54
|
-
|
|
91
|
+
if (!this.annual())
|
|
92
|
+
return p.priceMonthly;
|
|
93
|
+
return this.annualMonthly() ? this.annualOf(p) / 12 : this.annualOf(p);
|
|
55
94
|
}
|
|
56
95
|
oldPriceOf(p) {
|
|
57
|
-
|
|
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 : '');
|
|
58
111
|
}
|
|
59
112
|
labelOf(f) {
|
|
60
113
|
return typeof f === 'string' ? f : f.label;
|
|
@@ -62,50 +115,128 @@ class CbPricing {
|
|
|
62
115
|
includedOf(f) {
|
|
63
116
|
return typeof f === 'string' ? true : f.included !== false;
|
|
64
117
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
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();
|
|
69
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
|
+
}
|
|
70
184
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
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>
|
|
91
208
|
</div>
|
|
92
|
-
|
|
209
|
+
}
|
|
93
210
|
}
|
|
94
211
|
|
|
95
212
|
<div class="cb-pricing__grid">
|
|
96
213
|
@for (p of plans(); track p.name) {
|
|
97
214
|
<div class="cb-pricing__plan" [class.cb-pricing__plan--featured]="p.featured">
|
|
98
215
|
<div class="cb-pricing__head">
|
|
99
|
-
<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>
|
|
100
225
|
<div class="cb-pricing__price-row">
|
|
101
226
|
<div class="cb-pricing__price">
|
|
102
|
-
<strong>{{ currency() }}{{ priceOf(p) }}</strong>
|
|
103
|
-
<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>
|
|
104
229
|
</div>
|
|
105
230
|
@if (oldPriceOf(p); as old) {
|
|
106
|
-
<span class="cb-pricing__old">{{ currency() }}{{ old }}</span>
|
|
231
|
+
<span class="cb-pricing__old">{{ currency() }}{{ num(old) }}</span>
|
|
107
232
|
}
|
|
108
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
|
+
}
|
|
109
240
|
@if (p.description) {
|
|
110
241
|
<p class="cb-pricing__desc">{{ p.description }}</p>
|
|
111
242
|
}
|
|
@@ -115,8 +246,11 @@ class CbPricing {
|
|
|
115
246
|
<ul class="cb-pricing__features">
|
|
116
247
|
@for (f of p.features; track labelOf(f)) {
|
|
117
248
|
<li [class.cb-pricing__feature--off]="!includedOf(f)">
|
|
118
|
-
<cb-icon [name]="
|
|
249
|
+
<cb-icon [name]="iconOf(f)" [size]="16" class="cb-pricing__check" aria-hidden="true" />
|
|
119
250
|
{{ labelOf(f) }}
|
|
251
|
+
@if (!includedOf(f)) {
|
|
252
|
+
<span class="cb-pricing__sr">({{ t().notIncluded }})</span>
|
|
253
|
+
}
|
|
120
254
|
</li>
|
|
121
255
|
}
|
|
122
256
|
</ul>
|
|
@@ -124,65 +258,125 @@ class CbPricing {
|
|
|
124
258
|
<cb-button
|
|
125
259
|
class="cb-pricing__cta"
|
|
126
260
|
[fullWidth]="true"
|
|
127
|
-
[severity]="p.featured ? 'primary' : 'secondary'"
|
|
261
|
+
[severity]="p.featured || horizontal() ? 'primary' : 'secondary'"
|
|
128
262
|
[variant]="p.featured ? 'solid' : 'outlined'"
|
|
129
263
|
(click)="planSelect.emit(p)"
|
|
130
264
|
>
|
|
131
|
-
{{ p.ctaLabel || ctaLabel() + ' ' + p.name }}
|
|
265
|
+
{{ p.ctaLabel || (ctaLabel() ?? t().choose) + ' ' + p.name }}
|
|
132
266
|
</cb-button>
|
|
133
267
|
</div>
|
|
134
268
|
}
|
|
135
269
|
</div>
|
|
136
|
-
`, 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-600, #059669);border-color:var(--cb-color-primary-600, #059669);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__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--
|
|
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-600, #059669);border-color:var(--cb-color-primary-600, #059669);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)}: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 }); }
|
|
137
271
|
}
|
|
138
272
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbPricing, decorators: [{
|
|
139
273
|
type: Component,
|
|
140
274
|
args: [{ selector: 'cb-pricing', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, imports: [CbIcon, CbButton], host: {
|
|
141
275
|
class: 'cb-pricing',
|
|
142
276
|
'[class.cb-pricing--horizontal]': "layout() === 'horizontal'",
|
|
277
|
+
'[class.cb-pricing--list]': "layout() === 'list'",
|
|
143
278
|
}, template: `
|
|
144
|
-
@if (
|
|
145
|
-
|
|
146
|
-
|
|
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
|
+
}
|
|
147
324
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
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>
|
|
168
348
|
</div>
|
|
169
|
-
|
|
349
|
+
}
|
|
170
350
|
}
|
|
171
351
|
|
|
172
352
|
<div class="cb-pricing__grid">
|
|
173
353
|
@for (p of plans(); track p.name) {
|
|
174
354
|
<div class="cb-pricing__plan" [class.cb-pricing__plan--featured]="p.featured">
|
|
175
355
|
<div class="cb-pricing__head">
|
|
176
|
-
<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>
|
|
177
365
|
<div class="cb-pricing__price-row">
|
|
178
366
|
<div class="cb-pricing__price">
|
|
179
|
-
<strong>{{ currency() }}{{ priceOf(p) }}</strong>
|
|
180
|
-
<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>
|
|
181
369
|
</div>
|
|
182
370
|
@if (oldPriceOf(p); as old) {
|
|
183
|
-
<span class="cb-pricing__old">{{ currency() }}{{ old }}</span>
|
|
371
|
+
<span class="cb-pricing__old">{{ currency() }}{{ num(old) }}</span>
|
|
184
372
|
}
|
|
185
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
|
+
}
|
|
186
380
|
@if (p.description) {
|
|
187
381
|
<p class="cb-pricing__desc">{{ p.description }}</p>
|
|
188
382
|
}
|
|
@@ -192,8 +386,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
192
386
|
<ul class="cb-pricing__features">
|
|
193
387
|
@for (f of p.features; track labelOf(f)) {
|
|
194
388
|
<li [class.cb-pricing__feature--off]="!includedOf(f)">
|
|
195
|
-
<cb-icon [name]="
|
|
389
|
+
<cb-icon [name]="iconOf(f)" [size]="16" class="cb-pricing__check" aria-hidden="true" />
|
|
196
390
|
{{ labelOf(f) }}
|
|
391
|
+
@if (!includedOf(f)) {
|
|
392
|
+
<span class="cb-pricing__sr">({{ t().notIncluded }})</span>
|
|
393
|
+
}
|
|
197
394
|
</li>
|
|
198
395
|
}
|
|
199
396
|
</ul>
|
|
@@ -201,17 +398,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
201
398
|
<cb-button
|
|
202
399
|
class="cb-pricing__cta"
|
|
203
400
|
[fullWidth]="true"
|
|
204
|
-
[severity]="p.featured ? 'primary' : 'secondary'"
|
|
401
|
+
[severity]="p.featured || horizontal() ? 'primary' : 'secondary'"
|
|
205
402
|
[variant]="p.featured ? 'solid' : 'outlined'"
|
|
206
403
|
(click)="planSelect.emit(p)"
|
|
207
404
|
>
|
|
208
|
-
{{ p.ctaLabel || ctaLabel() + ' ' + p.name }}
|
|
405
|
+
{{ p.ctaLabel || (ctaLabel() ?? t().choose) + ' ' + p.name }}
|
|
209
406
|
</cb-button>
|
|
210
407
|
</div>
|
|
211
408
|
}
|
|
212
409
|
</div>
|
|
213
|
-
`, 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-600, #059669);border-color:var(--cb-color-primary-600, #059669);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__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--
|
|
214
|
-
}], 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-600, #059669);border-color:var(--cb-color-primary-600, #059669);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)}: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"] }] } });
|
|
215
412
|
|
|
216
413
|
/*
|
|
217
414
|
* Public API Surface de @caribeng/ui/pricing
|