UNPKG

@visa/nova-angular

Version:

Visa Product Design System Nova Angular library

82 lines (81 loc) 3.23 kB
/** * Copyright (c) 2025 Visa, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * **/ import { BooleanInput } from '@angular/cdk/coercion'; import { UUIDService } from '../_utilities/services/uuid.service'; import * as i0 from "@angular/core"; export declare const BadgeType: { readonly DEFAULT: "default"; readonly NEUTRAL: "neutral"; readonly CRITICAL: "critical"; readonly NEGATIVE: "negative"; readonly STABLE: "stable"; readonly WARNING: "warning"; readonly SUBTLE: "subtle"; readonly NUMBER: "number"; readonly ACTIVE: "active"; }; export type BadgeType = (typeof BadgeType)[keyof typeof BadgeType]; export declare class BadgeDirective { private uuidService; /** * Sets badge type. * @default 'default' | BadgeType.DEFAULT * @options 'default' | BadgeType.DEFAULT | <br> 'neutral' | BadgeType.NEUTRAL | <br> 'critical' | BadgeType.CRITICAL | <br> 'stable' | BadgeType.STABLE | <br> 'warning' | BadgeType.WARNING | <br> 'subtle' | BadgeType.SUBTLE | <br> 'number' | BadgeType.NUMBER */ get badgeType(): BadgeType; set badgeType(value: BadgeType); _badgeType: BadgeType; /** * Provides custom class&#40;es&#41; for custom styling. * @default .v-badge */ get class(): string; set class(value: string); _class: string; get hostClass(): string; /** * Sets custom id. * @default uuidService.getUUID('v-badge-') * @builtin true */ id: string; get hostId(): string; constructor(uuidService: UUIDService); /** * Sets badge to number variant when true. <br /> * Using this flag rather than <code>badgeType="number"</code> allows for number badges with other badge types. * @default false */ get number(): boolean; set number(value: BooleanInput); _number: boolean; /** * Whether or not badge contains an icon. * @default false */ get icon(): boolean; set icon(value: BooleanInput); _icon: boolean; /** * Removes background color from badge when true. */ get noBackground(): boolean; set noBackground(value: BooleanInput); _noBackground: boolean; static ɵfac: i0.ɵɵFactoryDeclaration<BadgeDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<BadgeDirective, "[v-badge]", never, { "badgeType": { "alias": "badgeType"; "required": false; }; "class": { "alias": "class"; "required": false; }; "id": { "alias": "id"; "required": false; }; "number": { "alias": "number"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "noBackground": { "alias": "noBackground"; "required": false; }; }, {}, never, never, true, never>; }