codexly-ui 0.16.2 → 0.17.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.
@@ -16843,6 +16843,87 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
16843
16843
  }]
16844
16844
  }], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: true }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }] } });
16845
16845
 
16846
+ const SEVERITY_COLOR = {
16847
+ critical: 'red',
16848
+ warning: 'amber',
16849
+ info: 'sky',
16850
+ };
16851
+ const SEVERITY_ICON = {
16852
+ critical: 'error',
16853
+ warning: 'warning',
16854
+ info: 'info',
16855
+ };
16856
+ const SEVERITY_LABEL = {
16857
+ critical: 'Crítico',
16858
+ warning: 'Bajo',
16859
+ info: 'Info',
16860
+ };
16861
+ /** A list of alert rows: severity icon chip + title + short description on the left, severity
16862
+ * badge on the right — e.g. "Stock bajo" on the Inventory dashboard. Distinct from
16863
+ * ClxRankedListComponent (which pairs a value with an optional trend, for rankings) — this widget
16864
+ * has no numeric value, just a problem description and how bad it is. */
16865
+ class ClxAlertListComponent {
16866
+ items = input.required(...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
16867
+ chipClass(severity) {
16868
+ return resolveColor(SEVERITY_COLOR[severity]).bgSubtle;
16869
+ }
16870
+ iconClass(severity) {
16871
+ return resolveColor(SEVERITY_COLOR[severity]).textSubtle;
16872
+ }
16873
+ badgeColor(severity) {
16874
+ return SEVERITY_COLOR[severity];
16875
+ }
16876
+ icon(severity) {
16877
+ return SEVERITY_ICON[severity];
16878
+ }
16879
+ label(severity) {
16880
+ return SEVERITY_LABEL[severity];
16881
+ }
16882
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxAlertListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
16883
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: ClxAlertListComponent, isStandalone: true, selector: "clx-alert-list", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "flex flex-col" }, ngImport: i0, template: `
16884
+ @for (item of items(); track item.title; let last = $last) {
16885
+ <div class="flex items-center gap-3 py-2.5" [class.border-b]="!last" [class.border-clx-border-soft]="!last">
16886
+ <div class="w-9 h-9 rounded-full flex items-center justify-center shrink-0" [class]="chipClass(item.severity)">
16887
+ <span clx-icon [name]="icon(item.severity)" size="sm" [class]="iconClass(item.severity)"></span>
16888
+ </div>
16889
+ <div class="min-w-0 flex-1">
16890
+ <p class="text-sm text-clx-text-label truncate">{{ item.title }}</p>
16891
+ <p class="text-xs text-clx-text-muted truncate">{{ item.description }}</p>
16892
+ </div>
16893
+ <span clx-badge size="xs" variant="light" shape="pill" [color]="badgeColor(item.severity)" class="shrink-0">
16894
+ {{ label(item.severity) }}
16895
+ </span>
16896
+ </div>
16897
+ }
16898
+ `, isInline: true, dependencies: [{ kind: "component", type: ClxBadgeComponent, selector: "span[clx-badge]", inputs: ["variant", "color", "size", "shape", "positioned"] }, { kind: "component", type: ClxIconComponent, selector: "span[clx-icon]", inputs: ["name", "size", "color", "fill"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
16899
+ }
16900
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: ClxAlertListComponent, decorators: [{
16901
+ type: Component,
16902
+ args: [{
16903
+ selector: 'clx-alert-list',
16904
+ standalone: true,
16905
+ imports: [ClxBadgeComponent, ClxIconComponent],
16906
+ changeDetection: ChangeDetectionStrategy.OnPush,
16907
+ host: { class: 'flex flex-col' },
16908
+ template: `
16909
+ @for (item of items(); track item.title; let last = $last) {
16910
+ <div class="flex items-center gap-3 py-2.5" [class.border-b]="!last" [class.border-clx-border-soft]="!last">
16911
+ <div class="w-9 h-9 rounded-full flex items-center justify-center shrink-0" [class]="chipClass(item.severity)">
16912
+ <span clx-icon [name]="icon(item.severity)" size="sm" [class]="iconClass(item.severity)"></span>
16913
+ </div>
16914
+ <div class="min-w-0 flex-1">
16915
+ <p class="text-sm text-clx-text-label truncate">{{ item.title }}</p>
16916
+ <p class="text-xs text-clx-text-muted truncate">{{ item.description }}</p>
16917
+ </div>
16918
+ <span clx-badge size="xs" variant="light" shape="pill" [color]="badgeColor(item.severity)" class="shrink-0">
16919
+ {{ label(item.severity) }}
16920
+ </span>
16921
+ </div>
16922
+ }
16923
+ `,
16924
+ }]
16925
+ }], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: true }] }] } });
16926
+
16846
16927
  const PRODUCT_TAG_LABEL = {
16847
16928
  'new': 'Nuevo',
16848
16929
  'sale': 'Oferta',
@@ -19446,5 +19527,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
19446
19527
  * Generated bundle index. Do not edit.
19447
19528
  */
19448
19529
 
19449
- export { CLX_ADDON_BORDER, CLX_ADDON_TEXT, CLX_ALERT_OPTIONS, CLX_ALERT_RESOLVE, CLX_BG_ADDON, CLX_BG_DISABLED, CLX_BG_ICON_WRAP, CLX_BG_SECTION, CLX_BG_SURFACE, CLX_BORDER_DEFAULT, CLX_BORDER_DISABLED, CLX_BORDER_MEDIUM, CLX_COLOR_HEX, CLX_COLOR_HEX_100, CLX_COLOR_MAP, CLX_FONT_CATALOG, CLX_MODAL_ANIM_CONFIG, CLX_MODAL_DATA, CLX_MODAL_REF, CLX_OPTION_DISABLED, CLX_PLACEHOLDER, CLX_RADIO_GROUP, CLX_RADIUS_MAP, CLX_TEXT_BODY, CLX_TEXT_DISABLED, CLX_TEXT_HEADING, CLX_TEXT_HINT, CLX_TEXT_IDLE, CLX_TEXT_INPUT, CLX_TEXT_LABEL, CLX_TEXT_OPTION, CLX_TEXT_SUBTITLE, CLX_TEXT_TITLE, CLX_THEME_CONFIG, CLX_THEME_DEFAULTS, CLX_TOAST_DEFAULTS, ClxAlertComponent, ClxAlertService, ClxAnimateDirective, ClxAnimateGroupDirective, ClxAnimateService, ClxAppLayoutComponent, ClxAvatarComponent, ClxBadgeComponent, ClxBrandComponent, ClxButtonComponent, ClxButtonGroupComponent, ClxCardBodyDirective, ClxCardComponent, ClxCardExpiryInputComponent, ClxCardFooterDirective, ClxCardHeaderActionsDirective, ClxCardHeaderDirective, ClxCardNumberInputComponent, ClxCardValidators, ClxCarouselComponent, ClxCarouselDirective, ClxCartComponent, ClxCartSummaryDrawer, ClxCellDirective, ClxCheckboxComponent, ClxCollapseComponent, ClxColorPickerComponent, ClxColumnDefDirective, ClxDateRangePickerComponent, ClxDatepickerComponent, ClxDrawerComponent, ClxDrawerService, ClxEditorComponent, ClxEditorImageModalComponent, ClxEditorLinkModalComponent, ClxFabComponent, ClxFilterPanelComponent, ClxHeaderCellDirective, ClxIconComponent, ClxInputComponent, ClxListComponent, ClxListItemComponent, ClxMenuComponent, ClxMenuItemComponent, ClxMenuItemTrailingDirective, ClxModalComponent, ClxModalService, ClxNativeOverlayService, ClxNavGroupComponent, ClxNotificationComponent, ClxNumberComponent, ClxOtpComponent, ClxPageEmptyComponent, ClxPageHeaderComponent, ClxPageHeaderTitleDirective, ClxPageNotFoundComponent, ClxPageServerErrorComponent, ClxPageUnauthorizedComponent, ClxPaginationComponent, ClxProductComponent, ClxProductDetailComponent, ClxProductQuickViewComponent, ClxProfileComponent, ClxProgressBarComponent, ClxRadioComponent, ClxRadioGroupComponent, ClxRankedListComponent, ClxRatingComponent, ClxSearchComponent, ClxSelectComponent, ClxSkeletonComponent, ClxSliderComponent, ClxSocialIconComponent, ClxSpinnerComponent, ClxStatCardComponent, ClxStepComponent, ClxStepperComponent, ClxSwitchComponent, ClxTabDirective, ClxTableActionsComponent, ClxTableComponent, ClxTableProductCellComponent, ClxTableProgressCellComponent, ClxTableStatusCellComponent, ClxTabsComponent, ClxTagComponent, ClxTextareaComponent, ClxThemeService, ClxTimelineComponent, ClxTimelineItemComponent, ClxTimepickerComponent, ClxToastComponent, ClxToastContainerComponent, ClxToastService, ClxTooltipComponent, ClxTooltipDirective, ClxTreeComponent, ClxUploadComponent, ClxWidgetCardComponent, ClxWishlistComponent, ClxWizardComponent, TIMEPICKER_SIZE_MAP, detectClxCardBrand, isClxCardExpired, parseColorInput, provideCodexlyTheme, resolveColor, resolveContainerRadius, resolveRadius };
19530
+ export { CLX_ADDON_BORDER, CLX_ADDON_TEXT, CLX_ALERT_OPTIONS, CLX_ALERT_RESOLVE, CLX_BG_ADDON, CLX_BG_DISABLED, CLX_BG_ICON_WRAP, CLX_BG_SECTION, CLX_BG_SURFACE, CLX_BORDER_DEFAULT, CLX_BORDER_DISABLED, CLX_BORDER_MEDIUM, CLX_COLOR_HEX, CLX_COLOR_HEX_100, CLX_COLOR_MAP, CLX_FONT_CATALOG, CLX_MODAL_ANIM_CONFIG, CLX_MODAL_DATA, CLX_MODAL_REF, CLX_OPTION_DISABLED, CLX_PLACEHOLDER, CLX_RADIO_GROUP, CLX_RADIUS_MAP, CLX_TEXT_BODY, CLX_TEXT_DISABLED, CLX_TEXT_HEADING, CLX_TEXT_HINT, CLX_TEXT_IDLE, CLX_TEXT_INPUT, CLX_TEXT_LABEL, CLX_TEXT_OPTION, CLX_TEXT_SUBTITLE, CLX_TEXT_TITLE, CLX_THEME_CONFIG, CLX_THEME_DEFAULTS, CLX_TOAST_DEFAULTS, ClxAlertComponent, ClxAlertListComponent, ClxAlertService, ClxAnimateDirective, ClxAnimateGroupDirective, ClxAnimateService, ClxAppLayoutComponent, ClxAvatarComponent, ClxBadgeComponent, ClxBrandComponent, ClxButtonComponent, ClxButtonGroupComponent, ClxCardBodyDirective, ClxCardComponent, ClxCardExpiryInputComponent, ClxCardFooterDirective, ClxCardHeaderActionsDirective, ClxCardHeaderDirective, ClxCardNumberInputComponent, ClxCardValidators, ClxCarouselComponent, ClxCarouselDirective, ClxCartComponent, ClxCartSummaryDrawer, ClxCellDirective, ClxCheckboxComponent, ClxCollapseComponent, ClxColorPickerComponent, ClxColumnDefDirective, ClxDateRangePickerComponent, ClxDatepickerComponent, ClxDrawerComponent, ClxDrawerService, ClxEditorComponent, ClxEditorImageModalComponent, ClxEditorLinkModalComponent, ClxFabComponent, ClxFilterPanelComponent, ClxHeaderCellDirective, ClxIconComponent, ClxInputComponent, ClxListComponent, ClxListItemComponent, ClxMenuComponent, ClxMenuItemComponent, ClxMenuItemTrailingDirective, ClxModalComponent, ClxModalService, ClxNativeOverlayService, ClxNavGroupComponent, ClxNotificationComponent, ClxNumberComponent, ClxOtpComponent, ClxPageEmptyComponent, ClxPageHeaderComponent, ClxPageHeaderTitleDirective, ClxPageNotFoundComponent, ClxPageServerErrorComponent, ClxPageUnauthorizedComponent, ClxPaginationComponent, ClxProductComponent, ClxProductDetailComponent, ClxProductQuickViewComponent, ClxProfileComponent, ClxProgressBarComponent, ClxRadioComponent, ClxRadioGroupComponent, ClxRankedListComponent, ClxRatingComponent, ClxSearchComponent, ClxSelectComponent, ClxSkeletonComponent, ClxSliderComponent, ClxSocialIconComponent, ClxSpinnerComponent, ClxStatCardComponent, ClxStepComponent, ClxStepperComponent, ClxSwitchComponent, ClxTabDirective, ClxTableActionsComponent, ClxTableComponent, ClxTableProductCellComponent, ClxTableProgressCellComponent, ClxTableStatusCellComponent, ClxTabsComponent, ClxTagComponent, ClxTextareaComponent, ClxThemeService, ClxTimelineComponent, ClxTimelineItemComponent, ClxTimepickerComponent, ClxToastComponent, ClxToastContainerComponent, ClxToastService, ClxTooltipComponent, ClxTooltipDirective, ClxTreeComponent, ClxUploadComponent, ClxWidgetCardComponent, ClxWishlistComponent, ClxWizardComponent, TIMEPICKER_SIZE_MAP, detectClxCardBrand, isClxCardExpired, parseColorInput, provideCodexlyTheme, resolveColor, resolveContainerRadius, resolveRadius };
19450
19531
  //# sourceMappingURL=codexly-ui.mjs.map