@caribeng/ui 22.2.0 → 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.
Files changed (121) hide show
  1. package/README.md +93 -11
  2. package/fesm2022/caribeng-ui-accordion.mjs +2 -2
  3. package/fesm2022/caribeng-ui-avatar.mjs +2 -2
  4. package/fesm2022/caribeng-ui-badge.mjs +8 -2
  5. package/fesm2022/caribeng-ui-breadcrumb.mjs +13 -6
  6. package/fesm2022/caribeng-ui-chart.mjs +8 -5
  7. package/fesm2022/caribeng-ui-chat.mjs +1303 -0
  8. package/fesm2022/caribeng-ui-code-block.mjs +332 -0
  9. package/fesm2022/caribeng-ui-colorpicker.mjs +99 -5
  10. package/fesm2022/caribeng-ui-command-palette.mjs +476 -0
  11. package/fesm2022/caribeng-ui-confirmdialog.mjs +78 -13
  12. package/fesm2022/caribeng-ui-confirmpopup.mjs +91 -16
  13. package/fesm2022/caribeng-ui-contextmenu.mjs +8 -4
  14. package/fesm2022/caribeng-ui-copy-button.mjs +230 -0
  15. package/fesm2022/caribeng-ui-dataview.mjs +4 -1
  16. package/fesm2022/caribeng-ui-dock.mjs +52 -12
  17. package/fesm2022/caribeng-ui-drawer.mjs +9 -4
  18. package/fesm2022/caribeng-ui-editor.mjs +21 -0
  19. package/fesm2022/caribeng-ui-fieldset.mjs +2 -2
  20. package/fesm2022/caribeng-ui-file-card.mjs +134 -17
  21. package/fesm2022/caribeng-ui-folder-card.mjs +122 -12
  22. package/fesm2022/caribeng-ui-inlinemessage.mjs +2 -2
  23. package/fesm2022/caribeng-ui-inputmask.mjs +8 -2
  24. package/fesm2022/caribeng-ui-kanban.mjs +4612 -0
  25. package/fesm2022/caribeng-ui-kbd.mjs +122 -0
  26. package/fesm2022/caribeng-ui-megamenu.mjs +13 -9
  27. package/fesm2022/caribeng-ui-mentions.mjs +495 -0
  28. package/fesm2022/caribeng-ui-menu.mjs +8 -4
  29. package/fesm2022/caribeng-ui-menubar.mjs +9 -5
  30. package/fesm2022/caribeng-ui-message.mjs +6 -3
  31. package/fesm2022/caribeng-ui-organizationchart.mjs +6 -10
  32. package/fesm2022/caribeng-ui-panel.mjs +6 -6
  33. package/fesm2022/caribeng-ui-panelmenu.mjs +9 -6
  34. package/fesm2022/caribeng-ui-phone-input.mjs +688 -0
  35. package/fesm2022/caribeng-ui-pricing.mjs +263 -69
  36. package/fesm2022/caribeng-ui-qrcode.mjs +564 -0
  37. package/fesm2022/caribeng-ui-ripple.mjs +2 -0
  38. package/fesm2022/caribeng-ui-scrolltop.mjs +3 -1
  39. package/fesm2022/caribeng-ui-sidebar.mjs +573 -0
  40. package/fesm2022/caribeng-ui-stepper.mjs +10 -3
  41. package/fesm2022/caribeng-ui-table.mjs +10 -4
  42. package/fesm2022/caribeng-ui-tabmenu.mjs +8 -4
  43. package/fesm2022/caribeng-ui-tieredmenu.mjs +109 -19
  44. package/fesm2022/caribeng-ui.mjs +388 -1
  45. package/package.json +42 -2
  46. package/schematics/collection.json +5 -0
  47. package/schematics/migrate-from-primeng/core-icons.json +1 -0
  48. package/schematics/migrate-from-primeng/icons.js +269 -0
  49. package/schematics/migrate-from-primeng/index.js +290 -0
  50. package/schematics/migrate-from-primeng/mappings/button.js +93 -0
  51. package/schematics/migrate-from-primeng/mappings/card.js +33 -0
  52. package/schematics/migrate-from-primeng/mappings/checkbox.js +44 -0
  53. package/schematics/migrate-from-primeng/mappings/confirm.js +221 -0
  54. package/schematics/migrate-from-primeng/mappings/datepicker.js +121 -0
  55. package/schematics/migrate-from-primeng/mappings/dialog.js +84 -0
  56. package/schematics/migrate-from-primeng/mappings/index.js +88 -0
  57. package/schematics/migrate-from-primeng/mappings/inputnumber.js +62 -0
  58. package/schematics/migrate-from-primeng/mappings/inputtext.js +60 -0
  59. package/schematics/migrate-from-primeng/mappings/menu.js +468 -0
  60. package/schematics/migrate-from-primeng/mappings/multiselect.js +49 -0
  61. package/schematics/migrate-from-primeng/mappings/radiobutton.js +22 -0
  62. package/schematics/migrate-from-primeng/mappings/rules.js +206 -0
  63. package/schematics/migrate-from-primeng/mappings/select.js +97 -0
  64. package/schematics/migrate-from-primeng/mappings/service-calls.js +100 -0
  65. package/schematics/migrate-from-primeng/mappings/table.js +613 -0
  66. package/schematics/migrate-from-primeng/mappings/tabs.js +225 -0
  67. package/schematics/migrate-from-primeng/mappings/tag.js +29 -0
  68. package/schematics/migrate-from-primeng/mappings/textarea.js +44 -0
  69. package/schematics/migrate-from-primeng/mappings/toast.js +173 -0
  70. package/schematics/migrate-from-primeng/mappings/toggleswitch.js +37 -0
  71. package/schematics/migrate-from-primeng/mappings/tooltip.js +44 -0
  72. package/schematics/migrate-from-primeng/mappings/types.js +10 -0
  73. package/schematics/migrate-from-primeng/report.js +79 -0
  74. package/schematics/migrate-from-primeng/schema.js +2 -0
  75. package/schematics/migrate-from-primeng/schema.json +34 -0
  76. package/schematics/migrate-from-primeng/template.js +387 -0
  77. package/schematics/migrate-from-primeng/todo.js +5 -0
  78. package/schematics/migrate-from-primeng/typescript.js +442 -0
  79. package/schematics/migrate-from-primeng/workspace.js +117 -0
  80. package/schematics/ng-add/index.js +16 -1
  81. package/types/caribeng-ui-badge.d.ts +3 -1
  82. package/types/caribeng-ui-breadcrumb.d.ts +8 -0
  83. package/types/caribeng-ui-chart.d.ts +3 -1
  84. package/types/caribeng-ui-chat.d.ts +299 -0
  85. package/types/caribeng-ui-code-block.d.ts +65 -0
  86. package/types/caribeng-ui-colorpicker.d.ts +5 -1
  87. package/types/caribeng-ui-command-palette.d.ts +133 -0
  88. package/types/caribeng-ui-confirmdialog.d.ts +34 -2
  89. package/types/caribeng-ui-confirmpopup.d.ts +39 -2
  90. package/types/caribeng-ui-contextmenu.d.ts +7 -0
  91. package/types/caribeng-ui-copy-button.d.ts +90 -0
  92. package/types/caribeng-ui-dataview.d.ts +2 -0
  93. package/types/caribeng-ui-dock.d.ts +13 -1
  94. package/types/caribeng-ui-drawer.d.ts +3 -1
  95. package/types/caribeng-ui-file-card.d.ts +27 -2
  96. package/types/caribeng-ui-folder-card.d.ts +27 -5
  97. package/types/caribeng-ui-inputmask.d.ts +3 -1
  98. package/types/caribeng-ui-kanban.d.ts +783 -0
  99. package/types/caribeng-ui-kbd.d.ts +36 -0
  100. package/types/caribeng-ui-megamenu.d.ts +11 -0
  101. package/types/caribeng-ui-mentions.d.ts +127 -0
  102. package/types/caribeng-ui-menu.d.ts +7 -0
  103. package/types/caribeng-ui-menubar.d.ts +7 -0
  104. package/types/caribeng-ui-message.d.ts +2 -0
  105. package/types/caribeng-ui-panelmenu.d.ts +7 -0
  106. package/types/caribeng-ui-phone-input.d.ts +168 -0
  107. package/types/caribeng-ui-pricing.d.ts +41 -4
  108. package/types/caribeng-ui-qrcode.d.ts +88 -0
  109. package/types/caribeng-ui-sidebar.d.ts +167 -0
  110. package/types/caribeng-ui-stepper.d.ts +2 -0
  111. package/types/caribeng-ui-table.d.ts +1 -1
  112. package/types/caribeng-ui-tabmenu.d.ts +7 -0
  113. package/types/caribeng-ui-tieredmenu.d.ts +17 -1
  114. package/types/caribeng-ui.d.ts +276 -2
  115. package/styles/caribeng.css +0 -380
  116. package/styles/scss/_mixins.scss +0 -46
  117. package/styles/scss/_overlay.scss +0 -15
  118. package/styles/scss/_tokens.scss +0 -267
  119. package/styles/scss/_utilities.scss +0 -73
  120. package/styles/scss/_variables.scss +0 -33
  121. package/styles/scss/index.scss +0 -16
@@ -29,7 +29,7 @@ class CbOrganizationChart {
29
29
  }
30
30
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbOrganizationChart, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
31
31
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: CbOrganizationChart, isStandalone: true, selector: "cb-organization-chart", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selection: "selectionChange" }, ngImport: i0, template: `
32
- <div class="cb-organization-chart" role="tree" [attr.aria-label]="(ariaLabel() ?? t().orgChart)">
32
+ <div class="cb-organization-chart" role="group" [attr.aria-label]="(ariaLabel() ?? t().orgChart)">
33
33
  <ng-container
34
34
  [ngTemplateOutlet]="nodesTemplate"
35
35
  [ngTemplateOutletContext]="{ $implicit: value() }"
@@ -39,18 +39,16 @@ class CbOrganizationChart {
39
39
  <ng-template #nodesTemplate let-nodes>
40
40
  <ul class="cb-organization-chart__nodes">
41
41
  @for (node of nodes; track node.key) {
42
- <li class="cb-organization-chart__branch" role="none">
42
+ <li class="cb-organization-chart__branch">
43
43
  <div
44
44
  class="cb-organization-chart__card"
45
- role="treeitem"
46
45
  [class.cb-organization-chart__card--selected]="selection()?.key === node.key"
47
- [attr.aria-selected]="selection()?.key === node.key"
48
- [attr.aria-expanded]="node.children?.length ? expanded().has(node.key) : null"
49
46
  >
50
47
  <button
51
48
  class="cb-organization-chart__select"
52
49
  type="button"
53
50
  (click)="selection.set(node)"
51
+ [attr.aria-pressed]="selection()?.key === node.key"
54
52
  [attr.aria-label]="fmt(t().selectItem, node.label)"
55
53
  >
56
54
  @if (node.icon) {
@@ -85,7 +83,7 @@ class CbOrganizationChart {
85
83
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbOrganizationChart, decorators: [{
86
84
  type: Component,
87
85
  args: [{ selector: 'cb-organization-chart', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgTemplateOutlet, CbIcon], template: `
88
- <div class="cb-organization-chart" role="tree" [attr.aria-label]="(ariaLabel() ?? t().orgChart)">
86
+ <div class="cb-organization-chart" role="group" [attr.aria-label]="(ariaLabel() ?? t().orgChart)">
89
87
  <ng-container
90
88
  [ngTemplateOutlet]="nodesTemplate"
91
89
  [ngTemplateOutletContext]="{ $implicit: value() }"
@@ -95,18 +93,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
95
93
  <ng-template #nodesTemplate let-nodes>
96
94
  <ul class="cb-organization-chart__nodes">
97
95
  @for (node of nodes; track node.key) {
98
- <li class="cb-organization-chart__branch" role="none">
96
+ <li class="cb-organization-chart__branch">
99
97
  <div
100
98
  class="cb-organization-chart__card"
101
- role="treeitem"
102
99
  [class.cb-organization-chart__card--selected]="selection()?.key === node.key"
103
- [attr.aria-selected]="selection()?.key === node.key"
104
- [attr.aria-expanded]="node.children?.length ? expanded().has(node.key) : null"
105
100
  >
106
101
  <button
107
102
  class="cb-organization-chart__select"
108
103
  type="button"
109
104
  (click)="selection.set(node)"
105
+ [attr.aria-pressed]="selection()?.key === node.key"
110
106
  [attr.aria-label]="fmt(t().selectItem, node.label)"
111
107
  >
112
108
  @if (node.icon) {
@@ -42,8 +42,8 @@ class CbPanel {
42
42
  }
43
43
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbPanel, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
44
44
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: CbPanel, isStandalone: true, selector: "cb-panel", inputs: { header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, toggleable: { classPropertyName: "toggleable", publicName: "toggleable", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { collapsed: "collapsedChange", collapsedChange2: "collapsedChange2" }, host: { properties: { "class.cb-panel--toggleable": "toggleable()", "class.cb-is-collapsed": "collapsed()" }, classAttribute: "cb-panel" }, ngImport: i0, template: `
45
- <div class="cb-panel__header" [id]="headerId">
46
- <span class="cb-panel__title">{{ header() }}</span>
45
+ <div class="cb-panel__header">
46
+ <span class="cb-panel__title" [id]="headerId">{{ header() }}</span>
47
47
  <div class="cb-panel__actions">
48
48
  <ng-content select="[cb-panel-icons]" />
49
49
  @if (toggleable()) {
@@ -51,7 +51,7 @@ class CbPanel {
51
51
  type="button"
52
52
  class="cb-panel__toggler"
53
53
  [attr.aria-expanded]="!collapsed()"
54
- [attr.aria-controls]="contentId"
54
+ [attr.aria-controls]="collapsed() ? null : contentId"
55
55
  [attr.aria-label]="header() || t().togglePanel"
56
56
  (click)="toggle()"
57
57
  >
@@ -86,8 +86,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
86
86
  '[class.cb-panel--toggleable]': 'toggleable()',
87
87
  '[class.cb-is-collapsed]': 'collapsed()',
88
88
  }, template: `
89
- <div class="cb-panel__header" [id]="headerId">
90
- <span class="cb-panel__title">{{ header() }}</span>
89
+ <div class="cb-panel__header">
90
+ <span class="cb-panel__title" [id]="headerId">{{ header() }}</span>
91
91
  <div class="cb-panel__actions">
92
92
  <ng-content select="[cb-panel-icons]" />
93
93
  @if (toggleable()) {
@@ -95,7 +95,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
95
95
  type="button"
96
96
  class="cb-panel__toggler"
97
97
  [attr.aria-expanded]="!collapsed()"
98
- [attr.aria-controls]="contentId"
98
+ [attr.aria-controls]="collapsed() ? null : contentId"
99
99
  [attr.aria-label]="header() || t().togglePanel"
100
100
  (click)="toggle()"
101
101
  >
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, output, signal, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { input, computed, output, signal, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { CbIcon } from '@caribeng/ui/icon';
4
- import { injectCbTranslation } from '@caribeng/ui';
4
+ import { injectCbTranslation, cbVisibleItems, cbRunCommand } from '@caribeng/ui';
5
5
 
6
6
  let nextPanelMenuId = 0;
7
7
  /** Vertical menu with collapsible sections. */
@@ -12,6 +12,9 @@ class CbPanelMenu {
12
12
  this.uid = ++nextPanelMenuId;
13
13
  this.items = input([], /* @ts-ignore */
14
14
  ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
15
+ /** Items sin los de `visible: false`. */
16
+ this.visibleItems = computed(() => cbVisibleItems(this.items()), /* @ts-ignore */
17
+ ...(ngDevMode ? [{ debugName: "visibleItems" }] : /* istanbul ignore next */ []));
15
18
  this.ariaLabel = input(undefined, /* @ts-ignore */
16
19
  ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
17
20
  this.multiple = input(false, /* @ts-ignore */
@@ -31,13 +34,13 @@ class CbPanelMenu {
31
34
  next.add(index);
32
35
  this.openItems.set(next);
33
36
  }
34
- select(item) { if (!item.disabled)
35
- this.itemSelect.emit(item); }
37
+ select(item) { if (item.disabled)
38
+ return; cbRunCommand(item); this.itemSelect.emit(item); }
36
39
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CbPanelMenu, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
37
40
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: CbPanelMenu, isStandalone: true, selector: "cb-panelmenu", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemSelect: "itemSelect" }, host: { classAttribute: "cb-panelmenu" }, ngImport: i0, template: `
38
41
  <nav [attr.aria-label]="(ariaLabel() ?? t().panelMenu)">
39
42
  <ul class="cb-panelmenu__list">
40
- @for (item of items(); track $index; let i = $index) {
43
+ @for (item of visibleItems(); track $index; let i = $index) {
41
44
  <li class="cb-panelmenu__entry">
42
45
  @if (item.items?.length) {
43
46
  <button class="cb-panelmenu__trigger" type="button" [disabled]="item.disabled" [attr.aria-expanded]="isOpen(i)" [attr.aria-controls]="panelId(i)" (click)="toggle(i)">
@@ -82,7 +85,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
82
85
  args: [{ selector: 'cb-panelmenu', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, imports: [CbIcon], host: { class: 'cb-panelmenu' }, template: `
83
86
  <nav [attr.aria-label]="(ariaLabel() ?? t().panelMenu)">
84
87
  <ul class="cb-panelmenu__list">
85
- @for (item of items(); track $index; let i = $index) {
88
+ @for (item of visibleItems(); track $index; let i = $index) {
86
89
  <li class="cb-panelmenu__entry">
87
90
  @if (item.items?.length) {
88
91
  <button class="cb-panelmenu__trigger" type="button" [disabled]="item.disabled" [attr.aria-expanded]="isOpen(i)" [attr.aria-controls]="panelId(i)" (click)="toggle(i)">