@lucca-front/ng 21.4.0 → 21.4.2

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 (165) hide show
  1. package/fesm2022/lucca-front-ng-a11y.mjs +9 -9
  2. package/fesm2022/lucca-front-ng-activity-feed.mjs +9 -9
  3. package/fesm2022/lucca-front-ng-api.mjs +40 -40
  4. package/fesm2022/lucca-front-ng-app-layout.mjs +3 -3
  5. package/fesm2022/lucca-front-ng-box.mjs +3 -3
  6. package/fesm2022/lucca-front-ng-breadcrumbs.mjs +6 -6
  7. package/fesm2022/lucca-front-ng-bubble-icon.mjs +3 -3
  8. package/fesm2022/lucca-front-ng-bubble-illustration.mjs +3 -3
  9. package/fesm2022/lucca-front-ng-callout.mjs +24 -24
  10. package/fesm2022/lucca-front-ng-chip.mjs +3 -3
  11. package/fesm2022/lucca-front-ng-clear.mjs +3 -3
  12. package/fesm2022/lucca-front-ng-code.mjs +3 -3
  13. package/fesm2022/lucca-front-ng-color.mjs +3 -3
  14. package/fesm2022/lucca-front-ng-comment.mjs +12 -11
  15. package/fesm2022/lucca-front-ng-comment.mjs.map +1 -1
  16. package/fesm2022/lucca-front-ng-container.mjs +3 -3
  17. package/fesm2022/lucca-front-ng-core-select-api.mjs +23 -16
  18. package/fesm2022/lucca-front-ng-core-select-api.mjs.map +1 -1
  19. package/fesm2022/lucca-front-ng-core-select-department.mjs +6 -6
  20. package/fesm2022/lucca-front-ng-core-select-establishment.mjs +9 -9
  21. package/fesm2022/lucca-front-ng-core-select-job-qualification.mjs +6 -6
  22. package/fesm2022/lucca-front-ng-core-select-occupation-category.mjs +3 -3
  23. package/fesm2022/lucca-front-ng-core-select-user.mjs +28 -23
  24. package/fesm2022/lucca-front-ng-core-select-user.mjs.map +1 -1
  25. package/fesm2022/lucca-front-ng-core-select.mjs +86 -53
  26. package/fesm2022/lucca-front-ng-core-select.mjs.map +1 -1
  27. package/fesm2022/lucca-front-ng-core.mjs +15 -15
  28. package/fesm2022/lucca-front-ng-data-table.mjs +24 -24
  29. package/fesm2022/lucca-front-ng-date.mjs +40 -40
  30. package/fesm2022/lucca-front-ng-date2.mjs +22 -22
  31. package/fesm2022/lucca-front-ng-date2.mjs.map +1 -1
  32. package/fesm2022/lucca-front-ng-department.mjs +24 -24
  33. package/fesm2022/lucca-front-ng-dialog.mjs +69 -52
  34. package/fesm2022/lucca-front-ng-dialog.mjs.map +1 -1
  35. package/fesm2022/lucca-front-ng-divider.mjs +3 -3
  36. package/fesm2022/lucca-front-ng-dropdown.mjs +40 -40
  37. package/fesm2022/lucca-front-ng-empty-state.mjs +9 -9
  38. package/fesm2022/lucca-front-ng-error-page.mjs +4 -4
  39. package/fesm2022/lucca-front-ng-error-page.mjs.map +1 -1
  40. package/fesm2022/lucca-front-ng-establishment.mjs +33 -33
  41. package/fesm2022/lucca-front-ng-fancy-box.mjs +3 -3
  42. package/fesm2022/lucca-front-ng-file-upload.mjs +16 -16
  43. package/fesm2022/lucca-front-ng-file-upload.mjs.map +1 -1
  44. package/fesm2022/lucca-front-ng-filter-pills.mjs +28 -24
  45. package/fesm2022/lucca-front-ng-filter-pills.mjs.map +1 -1
  46. package/fesm2022/lucca-front-ng-footer.mjs +4 -4
  47. package/fesm2022/lucca-front-ng-footer.mjs.map +1 -1
  48. package/fesm2022/lucca-front-ng-form-field.mjs +20 -20
  49. package/fesm2022/lucca-front-ng-form-field.mjs.map +1 -1
  50. package/fesm2022/lucca-front-ng-form-header.mjs +3 -3
  51. package/fesm2022/lucca-front-ng-form-label.mjs +3 -3
  52. package/fesm2022/lucca-front-ng-form.mjs +3 -3
  53. package/fesm2022/lucca-front-ng-formly.mjs +58 -58
  54. package/fesm2022/lucca-front-ng-forms-phone-number-input.mjs +6 -6
  55. package/fesm2022/lucca-front-ng-forms-rich-text-input-formatters-html.mjs +3 -3
  56. package/fesm2022/lucca-front-ng-forms-rich-text-input-formatters-markdown.mjs +6 -6
  57. package/fesm2022/lucca-front-ng-forms-rich-text-input-formatters-plain-text.mjs +3 -3
  58. package/fesm2022/lucca-front-ng-forms-rich-text-input.mjs +53 -38
  59. package/fesm2022/lucca-front-ng-forms-rich-text-input.mjs.map +1 -1
  60. package/fesm2022/lucca-front-ng-forms.mjs +68 -66
  61. package/fesm2022/lucca-front-ng-forms.mjs.map +1 -1
  62. package/fesm2022/lucca-front-ng-gauge.mjs +3 -3
  63. package/fesm2022/lucca-front-ng-grid.mjs +6 -6
  64. package/fesm2022/lucca-front-ng-highlight-data.mjs +4 -4
  65. package/fesm2022/lucca-front-ng-highlight-data.mjs.map +1 -1
  66. package/fesm2022/lucca-front-ng-highlight-text.mjs +3 -3
  67. package/fesm2022/lucca-front-ng-horizontal-navigation.mjs +11 -11
  68. package/fesm2022/lucca-front-ng-horizontal-navigation.mjs.map +1 -1
  69. package/fesm2022/lucca-front-ng-impersonation.mjs +4 -4
  70. package/fesm2022/lucca-front-ng-impersonation.mjs.map +1 -1
  71. package/fesm2022/lucca-front-ng-index-table.mjs +30 -30
  72. package/fesm2022/lucca-front-ng-inline-message.mjs +3 -3
  73. package/fesm2022/lucca-front-ng-input.mjs +21 -21
  74. package/fesm2022/lucca-front-ng-link.mjs +16 -8
  75. package/fesm2022/lucca-front-ng-link.mjs.map +1 -1
  76. package/fesm2022/lucca-front-ng-listbox.mjs +9 -9
  77. package/fesm2022/lucca-front-ng-listing.mjs +6 -6
  78. package/fesm2022/lucca-front-ng-loading.mjs +3 -3
  79. package/fesm2022/lucca-front-ng-main-layout.mjs +6 -6
  80. package/fesm2022/lucca-front-ng-mobile-push.mjs +3 -3
  81. package/fesm2022/lucca-front-ng-modal.mjs +22 -22
  82. package/fesm2022/lucca-front-ng-multi-select.mjs +157 -110
  83. package/fesm2022/lucca-front-ng-multi-select.mjs.map +1 -1
  84. package/fesm2022/lucca-front-ng-new-badge.mjs +3 -3
  85. package/fesm2022/lucca-front-ng-number-format.mjs +6 -6
  86. package/fesm2022/lucca-front-ng-number.mjs +7 -7
  87. package/fesm2022/lucca-front-ng-numeric-badge.mjs +9 -5
  88. package/fesm2022/lucca-front-ng-numeric-badge.mjs.map +1 -1
  89. package/fesm2022/lucca-front-ng-option.mjs +126 -126
  90. package/fesm2022/lucca-front-ng-page-header.mjs +3 -3
  91. package/fesm2022/lucca-front-ng-pagination.mjs +3 -3
  92. package/fesm2022/lucca-front-ng-plg-push.mjs +3 -3
  93. package/fesm2022/lucca-front-ng-popover.mjs +17 -17
  94. package/fesm2022/lucca-front-ng-popover2.mjs +6 -6
  95. package/fesm2022/lucca-front-ng-popup.mjs +10 -10
  96. package/fesm2022/lucca-front-ng-progress-bar.mjs +3 -3
  97. package/fesm2022/lucca-front-ng-progress-stepper.mjs +6 -6
  98. package/fesm2022/lucca-front-ng-read-more.mjs +11 -5
  99. package/fesm2022/lucca-front-ng-read-more.mjs.map +1 -1
  100. package/fesm2022/lucca-front-ng-resource-card.mjs +13 -13
  101. package/fesm2022/lucca-front-ng-resource-card.mjs.map +1 -1
  102. package/fesm2022/lucca-front-ng-safe-content.mjs +10 -10
  103. package/fesm2022/lucca-front-ng-scroll-box.mjs +3 -3
  104. package/fesm2022/lucca-front-ng-scroll.mjs +7 -7
  105. package/fesm2022/lucca-front-ng-segmented-control-tabs.mjs +6 -6
  106. package/fesm2022/lucca-front-ng-segmented-control.mjs +6 -6
  107. package/fesm2022/lucca-front-ng-select.mjs +14 -14
  108. package/fesm2022/lucca-front-ng-sidepanel.mjs +7 -7
  109. package/fesm2022/lucca-front-ng-simple-select.mjs +16 -29
  110. package/fesm2022/lucca-front-ng-simple-select.mjs.map +1 -1
  111. package/fesm2022/lucca-front-ng-skeleton.mjs +26 -26
  112. package/fesm2022/lucca-front-ng-skeleton.mjs.map +1 -1
  113. package/fesm2022/lucca-front-ng-software-icon-wrapper.mjs +6 -6
  114. package/fesm2022/lucca-front-ng-software-icon.mjs +3 -3
  115. package/fesm2022/lucca-front-ng-sortable-list.mjs +6 -6
  116. package/fesm2022/lucca-front-ng-status-badge.mjs +3 -3
  117. package/fesm2022/lucca-front-ng-table-of-content.mjs +6 -6
  118. package/fesm2022/lucca-front-ng-tag.mjs +3 -3
  119. package/fesm2022/lucca-front-ng-text-flow.mjs +3 -3
  120. package/fesm2022/lucca-front-ng-time.mjs +18 -18
  121. package/fesm2022/lucca-front-ng-title.mjs +22 -13
  122. package/fesm2022/lucca-front-ng-title.mjs.map +1 -1
  123. package/fesm2022/lucca-front-ng-toast.mjs +10 -10
  124. package/fesm2022/lucca-front-ng-tooltip.mjs +35 -24
  125. package/fesm2022/lucca-front-ng-tooltip.mjs.map +1 -1
  126. package/fesm2022/lucca-front-ng-tree-select.mjs +6 -6
  127. package/fesm2022/lucca-front-ng-user-popover.mjs +21 -18
  128. package/fesm2022/lucca-front-ng-user-popover.mjs.map +1 -1
  129. package/fesm2022/lucca-front-ng-user.mjs +59 -59
  130. package/fesm2022/lucca-front-ng-vertical-navigation.mjs +12 -12
  131. package/package.json +4 -4
  132. package/schematics/action-icon/migration.spec.js +2 -2
  133. package/schematics/alignment-utilities/migration.spec.js +2 -2
  134. package/schematics/cdn-urls/migration.spec.js +2 -2
  135. package/schematics/class-prefix/migration.spec.js +2 -2
  136. package/schematics/color-text/migration.spec.js +2 -2
  137. package/schematics/component-path/migration.spec.js +2 -2
  138. package/schematics/deprecated-resolver/migration.spec.js +1 -1
  139. package/schematics/empty-state-title/migration.spec.js +1 -1
  140. package/schematics/lib/migration-test.js +6 -1
  141. package/schematics/lu-button/migration.spec.js +1 -1
  142. package/schematics/lu-container/migration.spec.js +1 -1
  143. package/schematics/lu-grid/migration.js +24 -16
  144. package/schematics/lu-grid/migration.spec.js +1 -1
  145. package/schematics/lu-icon/migration.spec.js +1 -1
  146. package/schematics/lu-loading/migration.spec.js +1 -1
  147. package/schematics/lu-select/migration.spec.js +1 -1
  148. package/schematics/lu-text-input/migration.spec.js +1 -1
  149. package/schematics/new-icons/migration.spec.js +2 -2
  150. package/schematics/palettes/index.js +28 -8
  151. package/schematics/palettes/migration.spec.js +2 -2
  152. package/schematics/tokens-radius/migration.spec.js +2 -2
  153. package/schematics/tokens-spacing/migration.spec.js +2 -2
  154. package/schematics/tokens-typo/migration.spec.js +2 -2
  155. package/types/lucca-front-ng-comment.d.ts +2 -1
  156. package/types/lucca-front-ng-core-select.d.ts +13 -1
  157. package/types/lucca-front-ng-dialog.d.ts +4 -3
  158. package/types/lucca-front-ng-filter-pills.d.ts +1 -0
  159. package/types/lucca-front-ng-forms-rich-text-input.d.ts +5 -1
  160. package/types/lucca-front-ng-forms.d.ts +14 -5
  161. package/types/lucca-front-ng-multi-select.d.ts +29 -5
  162. package/types/lucca-front-ng-numeric-badge.d.ts +1 -0
  163. package/types/lucca-front-ng-read-more.d.ts +6 -1
  164. package/types/lucca-front-ng-simple-select.d.ts +1 -3
  165. package/types/lucca-front-ng-title.d.ts +5 -5
@@ -9,10 +9,10 @@ class NewBadgeComponent {
9
9
  this.label = input.required(/* @ts-ignore */
10
10
  ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
11
11
  }
12
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NewBadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
13
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: NewBadgeComponent, isStandalone: true, selector: "lu-new-badge", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "newBadge" }, ngImport: i0, template: "{{ label() }}\n", styles: ["@layer components{.newBadge{--components-newBadge-color: var(--palettes-brand-0);--components-newBadge-backgroundColor: var(--palettes-brand-700);display:inline-flex;font:var(--pr-t-font-body-XS);font-weight:var(--pr-t-font-fontWeight-semibold);background-color:var(--components-newBadge-backgroundColor);color:var(--components-newBadge-color);padding-block:0;padding-inline:var(--pr-t-spacings-50);border-radius:var(--pr-t-border-radius-small)}}@layer mods{.newBadge.mod-inverted{--components-newBadge-color: var(--palettes-brand-700);--components-newBadge-backgroundColor: var(--palettes-brand-0)}}@layer base{lu-new-badge{display:inline-flex}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
12
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: NewBadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
13
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.8", type: NewBadgeComponent, isStandalone: true, selector: "lu-new-badge", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "newBadge" }, ngImport: i0, template: "{{ label() }}\n", styles: ["@layer components{.newBadge{--components-newBadge-color: var(--palettes-brand-0);--components-newBadge-backgroundColor: var(--palettes-brand-700);display:inline-flex;font:var(--pr-t-font-body-XS);font-weight:var(--pr-t-font-fontWeight-semibold);background-color:var(--components-newBadge-backgroundColor);color:var(--components-newBadge-color);padding-block:0;padding-inline:var(--pr-t-spacings-50);border-radius:var(--pr-t-border-radius-small)}}@layer mods{.newBadge.mod-inverted{--components-newBadge-color: var(--palettes-brand-700);--components-newBadge-backgroundColor: var(--palettes-brand-0)}}@layer base{lu-new-badge{display:inline-flex}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
14
14
  }
15
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NewBadgeComponent, decorators: [{
15
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: NewBadgeComponent, decorators: [{
16
16
  type: Component,
17
17
  args: [{ selector: 'lu-new-badge', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
18
18
  class: 'newBadge',
@@ -189,10 +189,10 @@ class LuFormatNumberPipe {
189
189
  transform(value, options) {
190
190
  return new NumberFormat(options).format(value);
191
191
  }
192
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: LuFormatNumberPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
193
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0.4", ngImport: i0, type: LuFormatNumberPipe, isStandalone: true, name: "luNumberFormat" }); }
192
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LuFormatNumberPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
193
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: LuFormatNumberPipe, isStandalone: true, name: "luNumberFormat" }); }
194
194
  }
195
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: LuFormatNumberPipe, decorators: [{
195
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LuFormatNumberPipe, decorators: [{
196
196
  type: Pipe,
197
197
  args: [{
198
198
  name: 'luNumberFormat',
@@ -252,8 +252,8 @@ class NumberFormatDirective {
252
252
  this.#value.set(parsedInput.value);
253
253
  this.onChange?.(parsedInput.value);
254
254
  }
255
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NumberFormatDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
256
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.4", type: NumberFormatDirective, isStandalone: true, selector: "input[luNumberFormatInput]", inputs: { formatOptions: { classPropertyName: "formatOptions", publicName: "formatOptions", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "focus": "focus()", "blur": "lostFocus()", "input": "input()" } }, providers: [
255
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: NumberFormatDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
256
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.8", type: NumberFormatDirective, isStandalone: true, selector: "input[luNumberFormatInput]", inputs: { formatOptions: { classPropertyName: "formatOptions", publicName: "formatOptions", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "focus": "focus()", "blur": "lostFocus()", "input": "input()" } }, providers: [
257
257
  {
258
258
  provide: NG_VALUE_ACCESSOR,
259
259
  useExisting: forwardRef(() => NumberFormatDirective),
@@ -261,7 +261,7 @@ class NumberFormatDirective {
261
261
  },
262
262
  ], ngImport: i0 }); }
263
263
  }
264
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NumberFormatDirective, decorators: [{
264
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: NumberFormatDirective, decorators: [{
265
265
  type: Directive,
266
266
  args: [{
267
267
  selector: 'input[luNumberFormatInput]',
@@ -19,10 +19,10 @@ class LuNumberPipe {
19
19
  return integral;
20
20
  }
21
21
  }
22
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: LuNumberPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe }); }
23
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0.4", ngImport: i0, type: LuNumberPipe, isStandalone: true, name: "luNumber" }); }
22
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LuNumberPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe }); }
23
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: LuNumberPipe, isStandalone: true, name: "luNumber" }); }
24
24
  }
25
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: LuNumberPipe, decorators: [{
25
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LuNumberPipe, decorators: [{
26
26
  type: Pipe,
27
27
  args: [{
28
28
  name: 'luNumber',
@@ -37,11 +37,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImpor
37
37
  * @deprecated use `LuNumberPipe` instead
38
38
  */
39
39
  class LuNumberModule {
40
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: LuNumberModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
41
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.4", ngImport: i0, type: LuNumberModule, imports: [LuNumberPipe], exports: [LuNumberPipe] }); }
42
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: LuNumberModule }); }
40
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LuNumberModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
41
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: LuNumberModule, imports: [LuNumberPipe], exports: [LuNumberPipe] }); }
42
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LuNumberModule }); }
43
43
  }
44
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: LuNumberModule, decorators: [{
44
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LuNumberModule, decorators: [{
45
45
  type: NgModule,
46
46
  args: [{
47
47
  imports: [LuNumberPipe],
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, input, booleanAttribute, computed, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { inject, input, booleanAttribute, HostAttributeToken, computed, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { LuClass, ɵeffectWithDeps as _effectWithDeps } from '@lucca-front/ng/core';
4
4
  import * as i1 from '@lucca-front/ng/tooltip';
5
5
  import { LuTooltipModule } from '@lucca-front/ng/tooltip';
@@ -11,6 +11,7 @@ const NUMERIC_BADGE_SIZE = ['XS', 'S', 'M'];
11
11
 
12
12
  class NumericBadgeComponent {
13
13
  #luClass;
14
+ #initialAriaHidden;
14
15
  constructor() {
15
16
  this.#luClass = inject(LuClass);
16
17
  /**
@@ -41,6 +42,9 @@ class NumericBadgeComponent {
41
42
  * Disabled tooltip on numeric badge
42
43
  */
43
44
  this.disableTooltip = input(false, { ...(ngDevMode ? { debugName: "disableTooltip" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
45
+ this.#initialAriaHidden = inject(new HostAttributeToken('aria-hidden'), { optional: true });
46
+ this.ariaHidden = computed(() => (this.loading() ? 'true' : this.#initialAriaHidden), /* @ts-ignore */
47
+ ...(ngDevMode ? [{ debugName: "ariaHidden" }] : /* istanbul ignore next */ []));
44
48
  this.numericBadgeClasses = computed(() => {
45
49
  const palette = this.palette();
46
50
  const size = this.size();
@@ -69,15 +73,15 @@ class NumericBadgeComponent {
69
73
  }
70
74
  });
71
75
  }
72
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NumericBadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
73
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.4", type: NumericBadgeComponent, isStandalone: true, selector: "lu-numeric-badge", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, palette: { classPropertyName: "palette", publicName: "palette", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, maxValue: { classPropertyName: "maxValue", publicName: "maxValue", isSignal: true, isRequired: false, transformFunction: null }, disableTooltip: { classPropertyName: "disableTooltip", publicName: "disableTooltip", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.is-loading": "loading()", "attr.aria-hidden": "loading()" }, classAttribute: "numericBadge" }, providers: [LuClass], ngImport: i0, template: "<span class=\"numericBadge-value\" [luTooltip]=\"value()\" [luTooltipDisabled]=\"isDisabled()\">{{ displayValue() }}</span>\n", styles: ["@charset \"UTF-8\";@layer components{.numericBadge{--components-numericBadge-background: var(--palettes-200, var(--palettes-neutral-200));--components-numericBadge-color: var(--palettes-800, var(--palettes-neutral-700));--components-numericBadge-loadingColor: var(--palettes-500, var(--palettes-neutral-500));--components-numericBadge-size: 1.5rem;--components-numericBadge-font: var(--pr-t-font-body-S);--components-numericBadge-borderRadius: var(--pr-t-border-radius-default);display:inline-flex;align-items:center;justify-content:center;block-size:var(--components-numericBadge-size);min-inline-size:var(--components-numericBadge-size);padding:var(--pr-t-spacings-50);font:var(--components-numericBadge-font);font-weight:var(--pr-t-font-fontWeight-semibold);background-color:var(--components-numericBadge-background);color:var(--components-numericBadge-color);border-radius:var(--components-numericBadge-borderRadius);transition-timing-function:ease;white-space:nowrap;position:relative;transition-duration:var(--commons-animations-durations-fast);transition-property:color}.numericBadge:empty:before{content:\"\\a0\"/\"\"}.numericBadge-value{outline:none}}@layer mods{.numericBadge.mod-S{--components-numericBadge-size: 1.25rem;--components-numericBadge-borderRadius: var(--pr-t-border-radius-small);--components-numericBadge-font: var(--pr-t-font-body-XS)}.numericBadge.mod-XS{--components-numericBadge-size: 1rem;--components-numericBadge-borderRadius: var(--pr-t-border-radius-small);--components-numericBadge-font: var(--pr-t-font-body-XS)}.numericBadge.is-loading{--commons-loading-frontground: var(--components-numericBadge-loadingColor);--commons-loading-borderWidth: 2px;--components-numericBadge-color: transparent}.numericBadge.is-loading:after{content:\"\";inline-size:calc(var(--components-numericBadge-size) - var(--pr-t-spacings-100));block-size:calc(var(--components-numericBadge-size) - var(--pr-t-spacings-100));border-radius:var(--pr-t-border-radius-full);line-height:.8rem;border-width:var(--commons-loading-borderWidth);inset:0;margin:auto;position:absolute;border-style:solid;animation-name:rotate;animation-duration:var(--commons-loading-speed);animation-timing-function:linear;animation-iteration-count:infinite;border-color:var(--commons-loading-frontground);border-block-start-color:transparent}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.numericBadge.is-loading.mod-S{--commons-loading-borderWidth: 1.5px}.numericBadge.is-loading.mod-XS{--commons-loading-borderWidth: 1px}.numericBadge:focus-within{outline:2px solid var(--palettes-700, var(--palettes-product-700));outline-offset:2px}}@layer base{lu-numeric-badge{display:inline-flex}}\n"], dependencies: [{ kind: "ngmodule", type: LuTooltipModule }, { kind: "directive", type: i1.LuTooltipTriggerDirective, selector: "[luTooltip]", inputs: ["luTooltip", "luTooltipEnterDelay", "luTooltipLeaveDelay", "luTooltipDisabled", "luTooltipOnlyForDisplay", "luTooltipPosition", "luTooltipWhenEllipsis", "luTooltipAnchor", "id"], exportAs: ["luTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
76
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: NumericBadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
77
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.8", type: NumericBadgeComponent, isStandalone: true, selector: "lu-numeric-badge", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, palette: { classPropertyName: "palette", publicName: "palette", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, maxValue: { classPropertyName: "maxValue", publicName: "maxValue", isSignal: true, isRequired: false, transformFunction: null }, disableTooltip: { classPropertyName: "disableTooltip", publicName: "disableTooltip", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.is-loading": "loading()", "attr.aria-hidden": "ariaHidden()" }, classAttribute: "numericBadge" }, providers: [LuClass], ngImport: i0, template: "<span class=\"numericBadge-value\" [luTooltip]=\"value()\" [luTooltipDisabled]=\"isDisabled()\">{{ displayValue() }}</span>\n", styles: ["@charset \"UTF-8\";@layer components{.numericBadge{--components-numericBadge-background: var(--palettes-200, var(--palettes-neutral-200));--components-numericBadge-color: var(--palettes-800, var(--palettes-neutral-700));--components-numericBadge-loadingColor: var(--palettes-500, var(--palettes-neutral-500));--components-numericBadge-size: 1.5rem;--components-numericBadge-font: var(--pr-t-font-body-S);--components-numericBadge-borderRadius: var(--pr-t-border-radius-default);display:inline-flex;align-items:center;justify-content:center;block-size:var(--components-numericBadge-size);min-inline-size:var(--components-numericBadge-size);padding:var(--pr-t-spacings-50);font:var(--components-numericBadge-font);font-weight:var(--pr-t-font-fontWeight-semibold);background-color:var(--components-numericBadge-background);color:var(--components-numericBadge-color);border-radius:var(--components-numericBadge-borderRadius);transition-timing-function:ease;white-space:nowrap;position:relative;transition-duration:var(--commons-animations-durations-fast);transition-property:color}.numericBadge:empty:before{content:\"\\a0\"/\"\"}.numericBadge-value{outline:none}}@layer mods{.numericBadge.mod-S{--components-numericBadge-size: 1.25rem;--components-numericBadge-borderRadius: var(--pr-t-border-radius-small);--components-numericBadge-font: var(--pr-t-font-body-XS)}.numericBadge.mod-XS{--components-numericBadge-size: 1rem;--components-numericBadge-borderRadius: var(--pr-t-border-radius-small);--components-numericBadge-font: var(--pr-t-font-body-XS)}.numericBadge.is-loading{--commons-loading-frontground: var(--components-numericBadge-loadingColor);--commons-loading-borderWidth: 2px;--components-numericBadge-color: transparent}.numericBadge.is-loading:after{content:\"\";inline-size:calc(var(--components-numericBadge-size) - var(--pr-t-spacings-100));block-size:calc(var(--components-numericBadge-size) - var(--pr-t-spacings-100));border-radius:var(--pr-t-border-radius-full);line-height:.8rem;border-width:var(--commons-loading-borderWidth);inset:0;margin:auto;position:absolute;border-style:solid;animation-name:rotate;animation-duration:var(--commons-loading-speed);animation-timing-function:linear;animation-iteration-count:infinite;border-color:var(--commons-loading-frontground);border-block-start-color:transparent}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.numericBadge.is-loading.mod-S{--commons-loading-borderWidth: 1.5px}.numericBadge.is-loading.mod-XS{--commons-loading-borderWidth: 1px}.numericBadge:focus-within{outline:2px solid var(--palettes-700, var(--palettes-product-700));outline-offset:2px}}@layer base{lu-numeric-badge{display:inline-flex}}\n"], dependencies: [{ kind: "ngmodule", type: LuTooltipModule }, { kind: "directive", type: i1.LuTooltipTriggerDirective, selector: "[luTooltip]", inputs: ["luTooltip", "luTooltipEnterDelay", "luTooltipLeaveDelay", "luTooltipDisabled", "luTooltipOnlyForDisplay", "luTooltipPosition", "luTooltipWhenEllipsis", "luTooltipAnchor", "id"], exportAs: ["luTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
74
78
  }
75
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.4", ngImport: i0, type: NumericBadgeComponent, decorators: [{
79
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: NumericBadgeComponent, decorators: [{
76
80
  type: Component,
77
81
  args: [{ selector: 'lu-numeric-badge', changeDetection: ChangeDetectionStrategy.OnPush, imports: [LuTooltipModule], providers: [LuClass], host: {
78
82
  class: 'numericBadge',
79
83
  '[class.is-loading]': 'loading()',
80
- '[attr.aria-hidden]': 'loading()',
84
+ '[attr.aria-hidden]': 'ariaHidden()',
81
85
  }, encapsulation: ViewEncapsulation.None, template: "<span class=\"numericBadge-value\" [luTooltip]=\"value()\" [luTooltipDisabled]=\"isDisabled()\">{{ displayValue() }}</span>\n", styles: ["@charset \"UTF-8\";@layer components{.numericBadge{--components-numericBadge-background: var(--palettes-200, var(--palettes-neutral-200));--components-numericBadge-color: var(--palettes-800, var(--palettes-neutral-700));--components-numericBadge-loadingColor: var(--palettes-500, var(--palettes-neutral-500));--components-numericBadge-size: 1.5rem;--components-numericBadge-font: var(--pr-t-font-body-S);--components-numericBadge-borderRadius: var(--pr-t-border-radius-default);display:inline-flex;align-items:center;justify-content:center;block-size:var(--components-numericBadge-size);min-inline-size:var(--components-numericBadge-size);padding:var(--pr-t-spacings-50);font:var(--components-numericBadge-font);font-weight:var(--pr-t-font-fontWeight-semibold);background-color:var(--components-numericBadge-background);color:var(--components-numericBadge-color);border-radius:var(--components-numericBadge-borderRadius);transition-timing-function:ease;white-space:nowrap;position:relative;transition-duration:var(--commons-animations-durations-fast);transition-property:color}.numericBadge:empty:before{content:\"\\a0\"/\"\"}.numericBadge-value{outline:none}}@layer mods{.numericBadge.mod-S{--components-numericBadge-size: 1.25rem;--components-numericBadge-borderRadius: var(--pr-t-border-radius-small);--components-numericBadge-font: var(--pr-t-font-body-XS)}.numericBadge.mod-XS{--components-numericBadge-size: 1rem;--components-numericBadge-borderRadius: var(--pr-t-border-radius-small);--components-numericBadge-font: var(--pr-t-font-body-XS)}.numericBadge.is-loading{--commons-loading-frontground: var(--components-numericBadge-loadingColor);--commons-loading-borderWidth: 2px;--components-numericBadge-color: transparent}.numericBadge.is-loading:after{content:\"\";inline-size:calc(var(--components-numericBadge-size) - var(--pr-t-spacings-100));block-size:calc(var(--components-numericBadge-size) - var(--pr-t-spacings-100));border-radius:var(--pr-t-border-radius-full);line-height:.8rem;border-width:var(--commons-loading-borderWidth);inset:0;margin:auto;position:absolute;border-style:solid;animation-name:rotate;animation-duration:var(--commons-loading-speed);animation-timing-function:linear;animation-iteration-count:infinite;border-color:var(--commons-loading-frontground);border-block-start-color:transparent}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.numericBadge.is-loading.mod-S{--commons-loading-borderWidth: 1.5px}.numericBadge.is-loading.mod-XS{--commons-loading-borderWidth: 1px}.numericBadge:focus-within{outline:2px solid var(--palettes-700, var(--palettes-product-700));outline-offset:2px}}@layer base{lu-numeric-badge{display:inline-flex}}\n"] }]
82
86
  }], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], palette: [{ type: i0.Input, args: [{ isSignal: true, alias: "palette", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], maxValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxValue", required: false }] }], disableTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableTooltip", required: false }] }] } });
83
87
 
@@ -1 +1 @@
1
- {"version":3,"file":"lucca-front-ng-numeric-badge.mjs","sources":["../../../packages/ng/numeric-badge/numeric-badge.type.ts","../../../packages/ng/numeric-badge/numeric-badge.component.ts","../../../packages/ng/numeric-badge/numeric-badge.component.html","../../../packages/ng/numeric-badge/lucca-front-ng-numeric-badge.ts"],"sourcesContent":["/**\n * Available NumericBadgeComponent Types\n */\n\nexport const NUMERIC_BADGE_SIZE = ['XS', 'S', 'M'] as const;\nexport type NumericBadgeSize = (typeof NUMERIC_BADGE_SIZE)[number];\n","import { booleanAttribute, ChangeDetectionStrategy, Component, computed, inject, input, ViewEncapsulation } from '@angular/core';\nimport { LuClass, Palette, ɵeffectWithDeps } from '@lucca-front/ng/core';\nimport { LuTooltipModule } from '@lucca-front/ng/tooltip';\nimport { NumericBadgeSize } from './numeric-badge.type';\n\n@Component({\n\tselector: 'lu-numeric-badge',\n\ttemplateUrl: './numeric-badge.component.html',\n\tstyleUrl: './numeric-badge.component.scss',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\timports: [LuTooltipModule],\n\tproviders: [LuClass],\n\thost: {\n\t\tclass: 'numericBadge',\n\t\t'[class.is-loading]': 'loading()',\n\t\t'[attr.aria-hidden]': 'loading()',\n\t},\n\tencapsulation: ViewEncapsulation.None,\n})\nexport class NumericBadgeComponent {\n\t#luClass = inject(LuClass);\n\n\t/**\n\t * The value to display, number or string contains number only.\n\t */\n\treadonly value = input.required<number | string>();\n\n\t/**\n\t * The size of the badge\n\t */\n\treadonly size = input<NumericBadgeSize>();\n\n\t/**\n\t * The palette to use for this badge. Defaults to 'none' (inherits parent palette)\n\t */\n\treadonly palette = input<Palette>('none');\n\n\t/**\n\t * Applies the loading state\n\t */\n\treadonly loading = input(false, { transform: booleanAttribute });\n\n\t/**\n\t * Indicates the maximum value of number for the numeric badge\n\t */\n\treadonly maxValue = input<number>(999);\n\n\t/**\n\t * Disabled tooltip on numeric badge\n\t */\n\treadonly disableTooltip = input(false, { transform: booleanAttribute });\n\n\treadonly numericBadgeClasses = computed(() => {\n\t\tconst palette = this.palette();\n\t\tconst size = this.size();\n\t\treturn { [`palette-${palette}`]: !!palette, [`mod-${size}`]: !!size };\n\t});\n\n\treadonly displayValue = computed(() => {\n\t\tconst value = this.value();\n\t\tconst maxValue = this.maxValue();\n\t\tif (typeof value === 'number') {\n\t\t\treturn +value > maxValue ? `${maxValue}+` : value;\n\t\t} else {\n\t\t\treturn value;\n\t\t}\n\t});\n\n\treadonly isDisabled = computed<boolean>(() => {\n\t\tconst value = this.value();\n\t\treturn this.disableTooltip() || typeof value !== 'number' || this.loading() || this.maxValue() >= +value;\n\t});\n\n\tconstructor() {\n\t\tɵeffectWithDeps([this.numericBadgeClasses], (numericBadgeClasses) => {\n\t\t\tif (numericBadgeClasses) {\n\t\t\t\tthis.#luClass.setState(numericBadgeClasses);\n\t\t\t}\n\t\t});\n\t}\n}\n","<span class=\"numericBadge-value\" [luTooltip]=\"value()\" [luTooltipDisabled]=\"isDisabled()\">{{ displayValue() }}</span>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["ɵeffectWithDeps"],"mappings":";;;;;;AAAA;;AAEG;AAEI,MAAM,kBAAkB,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG;;MCepC,qBAAqB,CAAA;AACjC,IAAA,QAAQ;AAqDR,IAAA,WAAA,GAAA;AArDA,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC;AAE1B;;AAEG;QACM,IAAA,CAAA,KAAK,GAAG,KAAK,CAAC,QAAQ;kFAAmB;AAElD;;AAEG;AACM,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK;4FAAoB;AAEzC;;AAEG;QACM,IAAA,CAAA,OAAO,GAAG,KAAK,CAAU,MAAM;oFAAC;AAEzC;;AAEG;QACM,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,KAAK,+EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAEhE;;AAEG;QACM,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAS,GAAG;qFAAC;AAEtC;;AAEG;QACM,IAAA,CAAA,cAAc,GAAG,KAAK,CAAC,KAAK,sFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAE9D,QAAA,IAAA,CAAA,mBAAmB,GAAG,QAAQ,CAAC,MAAK;AAC5C,YAAA,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE;AAC9B,YAAA,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE;YACxB,OAAO,EAAE,CAAC,CAAA,QAAA,EAAW,OAAO,EAAE,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC,CAAA,IAAA,EAAO,IAAI,CAAA,CAAE,GAAG,CAAC,CAAC,IAAI,EAAE;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EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,yBAAA,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,CAAA,WAAA,EAAA,qBAAA,EAAA,qBAAA,EAAA,mBAAA,EAAA,yBAAA,EAAA,mBAAA,EAAA,uBAAA,EAAA,iBAAA,EAAA,IAAA,CAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FASb,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAdjC,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,kBAAkB,EAAA,eAAA,EAGX,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC,CAAC,eAAe,CAAC,EAAA,SAAA,EACf,CAAC,OAAO,CAAC,EAAA,IAAA,EACd;AACL,wBAAA,KAAK,EAAE,cAAc;AACrB,wBAAA,oBAAoB,EAAE,WAAW;AACjC,wBAAA,oBAAoB,EAAE,WAAW;qBACjC,EAAA,aAAA,EACc,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,+HAAA,EAAA,MAAA,EAAA,CAAA,yoFAAA,CAAA,EAAA;;;AEjBtC;;AAEG;;;;"}
1
+ {"version":3,"file":"lucca-front-ng-numeric-badge.mjs","sources":["../../../packages/ng/numeric-badge/numeric-badge.type.ts","../../../packages/ng/numeric-badge/numeric-badge.component.ts","../../../packages/ng/numeric-badge/numeric-badge.component.html","../../../packages/ng/numeric-badge/lucca-front-ng-numeric-badge.ts"],"sourcesContent":["/**\n * Available NumericBadgeComponent Types\n */\n\nexport const NUMERIC_BADGE_SIZE = ['XS', 'S', 'M'] as const;\nexport type NumericBadgeSize = (typeof NUMERIC_BADGE_SIZE)[number];\n","import { booleanAttribute, ChangeDetectionStrategy, Component, computed, HostAttributeToken, inject, input, ViewEncapsulation } from '@angular/core';\nimport { LuClass, Palette, ɵeffectWithDeps } from '@lucca-front/ng/core';\nimport { LuTooltipModule } from '@lucca-front/ng/tooltip';\nimport { NumericBadgeSize } from './numeric-badge.type';\n\n@Component({\n\tselector: 'lu-numeric-badge',\n\ttemplateUrl: './numeric-badge.component.html',\n\tstyleUrl: './numeric-badge.component.scss',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\timports: [LuTooltipModule],\n\tproviders: [LuClass],\n\thost: {\n\t\tclass: 'numericBadge',\n\t\t'[class.is-loading]': 'loading()',\n\t\t'[attr.aria-hidden]': 'ariaHidden()',\n\t},\n\tencapsulation: ViewEncapsulation.None,\n})\nexport class NumericBadgeComponent {\n\t#luClass = inject(LuClass);\n\n\t/**\n\t * The value to display, number or string contains number only.\n\t */\n\treadonly value = input.required<number | string>();\n\n\t/**\n\t * The size of the badge\n\t */\n\treadonly size = input<NumericBadgeSize>();\n\n\t/**\n\t * The palette to use for this badge. Defaults to 'none' (inherits parent palette)\n\t */\n\treadonly palette = input<Palette>('none');\n\n\t/**\n\t * Applies the loading state\n\t */\n\treadonly loading = input(false, { transform: booleanAttribute });\n\n\t/**\n\t * Indicates the maximum value of number for the numeric badge\n\t */\n\treadonly maxValue = input<number>(999);\n\n\t/**\n\t * Disabled tooltip on numeric badge\n\t */\n\treadonly disableTooltip = input(false, { transform: booleanAttribute });\n\n\treadonly #initialAriaHidden = inject(new HostAttributeToken('aria-hidden'), { optional: true });\n\n\treadonly ariaHidden = computed(() => (this.loading() ? 'true' : this.#initialAriaHidden));\n\n\treadonly numericBadgeClasses = computed(() => {\n\t\tconst palette = this.palette();\n\t\tconst size = this.size();\n\t\treturn { [`palette-${palette}`]: !!palette, [`mod-${size}`]: !!size };\n\t});\n\n\treadonly displayValue = computed(() => {\n\t\tconst value = this.value();\n\t\tconst maxValue = this.maxValue();\n\t\tif (typeof value === 'number') {\n\t\t\treturn +value > maxValue ? `${maxValue}+` : value;\n\t\t} else {\n\t\t\treturn value;\n\t\t}\n\t});\n\n\treadonly isDisabled = computed<boolean>(() => {\n\t\tconst value = this.value();\n\t\treturn this.disableTooltip() || typeof value !== 'number' || this.loading() || this.maxValue() >= +value;\n\t});\n\n\tconstructor() {\n\t\tɵeffectWithDeps([this.numericBadgeClasses], (numericBadgeClasses) => {\n\t\t\tif (numericBadgeClasses) {\n\t\t\t\tthis.#luClass.setState(numericBadgeClasses);\n\t\t\t}\n\t\t});\n\t}\n}\n","<span class=\"numericBadge-value\" [luTooltip]=\"value()\" [luTooltipDisabled]=\"isDisabled()\">{{ displayValue() }}</span>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["ɵeffectWithDeps"],"mappings":";;;;;;AAAA;;AAEG;AAEI,MAAM,kBAAkB,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG;;MCepC,qBAAqB,CAAA;AACjC,IAAA,QAAQ;AAgCC,IAAA,kBAAkB;AAyB3B,IAAA,WAAA,GAAA;AAzDA,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC;AAE1B;;AAEG;QACM,IAAA,CAAA,KAAK,GAAG,KAAK,CAAC,QAAQ;kFAAmB;AAElD;;AAEG;AACM,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK;4FAAoB;AAEzC;;AAEG;QACM,IAAA,CAAA,OAAO,GAAG,KAAK,CAAU,MAAM;oFAAC;AAEzC;;AAEG;QACM,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,KAAK,+EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAEhE;;AAEG;QACM,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAS,GAAG;qFAAC;AAEtC;;AAEG;QACM,IAAA,CAAA,cAAc,GAAG,KAAK,CAAC,KAAK,sFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAE9D,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,IAAI,kBAAkB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