1/* 2 * Copyright (c) 2021-2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16/** 17 * Defines the badge position property. 18 * 19 * @enum { number } 20 * @syscap SystemCapability.ArkUI.ArkUI.Full 21 * @since 7 22 */ 23/** 24 * Defines the badge position property. 25 * 26 * @enum { number } 27 * @syscap SystemCapability.ArkUI.ArkUI.Full 28 * @since 9 29 * @form 30 */ 31/** 32 * Defines the badge position property. 33 * 34 * @enum { number } 35 * @syscap SystemCapability.ArkUI.ArkUI.Full 36 * @crossplatform 37 * @since 10 38 * @form 39 */ 40declare enum BadgePosition { 41 /** 42 * The dot is displayed vertically centered on the right. 43 * 44 * @syscap SystemCapability.ArkUI.ArkUI.Full 45 * @since 7 46 */ 47 /** 48 * The dot is displayed vertically centered on the right. 49 * 50 * @syscap SystemCapability.ArkUI.ArkUI.Full 51 * @since 9 52 * @form 53 */ 54 /** 55 * The dot is displayed vertically centered on the right. 56 * 57 * @syscap SystemCapability.ArkUI.ArkUI.Full 58 * @crossplatform 59 * @since 10 60 * @form 61 */ 62 RightTop, 63 64 /** 65 * Dots are displayed in the upper right corner. 66 * 67 * @syscap SystemCapability.ArkUI.ArkUI.Full 68 * @since 7 69 */ 70 /** 71 * Dots are displayed in the upper right corner. 72 * 73 * @syscap SystemCapability.ArkUI.ArkUI.Full 74 * @since 9 75 * @form 76 */ 77 /** 78 * Dots are displayed in the upper right corner. 79 * 80 * @syscap SystemCapability.ArkUI.ArkUI.Full 81 * @crossplatform 82 * @since 10 83 * @form 84 */ 85 Right, 86 87 /** 88 * The dot is displayed in the left vertical center. 89 * 90 * @syscap SystemCapability.ArkUI.ArkUI.Full 91 * @since 7 92 */ 93 /** 94 * The dot is displayed in the left vertical center. 95 * 96 * @syscap SystemCapability.ArkUI.ArkUI.Full 97 * @since 9 98 * @form 99 */ 100 /** 101 * The dot is displayed in the left vertical center. 102 * 103 * @syscap SystemCapability.ArkUI.ArkUI.Full 104 * @crossplatform 105 * @since 10 106 * @form 107 */ 108 Left, 109} 110 111/** 112 * BadgeStyle object 113 * 114 * @interface BadgeStyle 115 * @syscap SystemCapability.ArkUI.ArkUI.Full 116 * @since 7 117 */ 118/** 119 * BadgeStyle object 120 * 121 * @interface BadgeStyle 122 * @syscap SystemCapability.ArkUI.ArkUI.Full 123 * @since 9 124 * @form 125 */ 126/** 127 * BadgeStyle object 128 * 129 * @interface BadgeStyle 130 * @syscap SystemCapability.ArkUI.ArkUI.Full 131 * @crossplatform 132 * @since 10 133 * @form 134 */ 135declare interface BadgeStyle { 136 /** 137 * Text Color 138 * 139 * @type { ?ResourceColor } 140 * @syscap SystemCapability.ArkUI.ArkUI.Full 141 * @since 7 142 */ 143 /** 144 * Text Color 145 * 146 * @type { ?ResourceColor } 147 * @syscap SystemCapability.ArkUI.ArkUI.Full 148 * @since 9 149 * @form 150 */ 151 /** 152 * Text Color 153 * 154 * @type { ?ResourceColor } 155 * @syscap SystemCapability.ArkUI.ArkUI.Full 156 * @crossplatform 157 * @since 10 158 * @form 159 */ 160 color?: ResourceColor; 161 162 /** 163 * Text size. 164 * 165 * @type { ?(number | string) } 166 * @syscap SystemCapability.ArkUI.ArkUI.Full 167 * @since 7 168 */ 169 /** 170 * Text size. 171 * 172 * @type { ?(number | string) } 173 * @syscap SystemCapability.ArkUI.ArkUI.Full 174 * @since 9 175 * @form 176 */ 177 /** 178 * Text size. 179 * 180 * @type { ?(number | string) } 181 * @syscap SystemCapability.ArkUI.ArkUI.Full 182 * @crossplatform 183 * @since 10 184 * @form 185 */ 186 fontSize?: number | string; 187 188 /** 189 * Size of a badge. 190 * 191 * @type { ?(number | string) } 192 * @syscap SystemCapability.ArkUI.ArkUI.Full 193 * @since 7 194 */ 195 /** 196 * Size of a badge. 197 * 198 * @type { ?(number | string) } 199 * @syscap SystemCapability.ArkUI.ArkUI.Full 200 * @since 9 201 * @form 202 */ 203 /** 204 * Size of a badge. 205 * 206 * @type { ?(number | string) } 207 * @syscap SystemCapability.ArkUI.ArkUI.Full 208 * @crossplatform 209 * @since 10 210 * @form 211 */ 212 badgeSize?: number | string; 213 214 /** 215 * Color of the badge. 216 * 217 * @type { ?ResourceColor } 218 * @syscap SystemCapability.ArkUI.ArkUI.Full 219 * @since 7 220 */ 221 /** 222 * Color of the badge. 223 * 224 * @type { ?ResourceColor } 225 * @syscap SystemCapability.ArkUI.ArkUI.Full 226 * @since 9 227 * @form 228 */ 229 /** 230 * Color of the badge. 231 * 232 * @type { ?ResourceColor } 233 * @syscap SystemCapability.ArkUI.ArkUI.Full 234 * @crossplatform 235 * @since 10 236 * @form 237 */ 238 badgeColor?: ResourceColor; 239 240 /** 241 * Define the border color of the badge. 242 * 243 * @type { ?ResourceColor } 244 * @syscap SystemCapability.ArkUI.ArkUI.Full 245 * @crossplatform 246 * @since 10 247 */ 248 borderColor?: ResourceColor; 249 250 /** 251 * Define the border width of the badge. 252 * 253 * @type { ?Length } 254 * @syscap SystemCapability.ArkUI.ArkUI.Full 255 * @crossplatform 256 * @since 10 257 */ 258 borderWidth?: Length; 259 260 /** 261 * Define the font weight of the badge. 262 * 263 * @type { ?(number | FontWeight | string) } 264 * @syscap SystemCapability.ArkUI.ArkUI.Full 265 * @crossplatform 266 * @since 10 267 */ 268 fontWeight?: number | FontWeight | string; 269} 270 271/** 272 * Defines the base param of badge. 273 * 274 * @interface BadgeParam 275 * @syscap SystemCapability.ArkUI.ArkUI.Full 276 * @since 7 277 */ 278/** 279 * Defines the base param of badge. 280 * 281 * @interface BadgeParam 282 * @syscap SystemCapability.ArkUI.ArkUI.Full 283 * @since 9 284 * @form 285 */ 286/** 287 * Defines the base param of badge. 288 * 289 * @interface BadgeParam 290 * @syscap SystemCapability.ArkUI.ArkUI.Full 291 * @crossplatform 292 * @since 10 293 * @form 294 */ 295declare interface BadgeParam { 296 /** 297 * Set the display position of the prompt point. 298 * 299 * @type { ?(BadgePosition | Position) } 300 * @syscap SystemCapability.ArkUI.ArkUI.Full 301 * @since 7 302 */ 303 /** 304 * Set the display position of the prompt point. 305 * 306 * @type { ?(BadgePosition | Position) } 307 * @syscap SystemCapability.ArkUI.ArkUI.Full 308 * @since 9 309 * @form 310 */ 311 /** 312 * Set the display position of the prompt point. 313 * 314 * @type { ?(BadgePosition | Position) } 315 * @syscap SystemCapability.ArkUI.ArkUI.Full 316 * @crossplatform 317 * @since 10 318 * @form 319 */ 320 position?: BadgePosition | Position; 321 322 /** 323 * Defines the style of the Badge component, including the text color, size, dot color, and size. 324 * 325 * @type { BadgeStyle } 326 * @syscap SystemCapability.ArkUI.ArkUI.Full 327 * @since 7 328 */ 329 /** 330 * Defines the style of the Badge component, including the text color, size, dot color, and size. 331 * 332 * @type { BadgeStyle } 333 * @syscap SystemCapability.ArkUI.ArkUI.Full 334 * @since 9 335 * @form 336 */ 337 /** 338 * Defines the style of the Badge component, including the text color, size, dot color, and size. 339 * 340 * @type { BadgeStyle } 341 * @syscap SystemCapability.ArkUI.ArkUI.Full 342 * @crossplatform 343 * @since 10 344 * @form 345 */ 346 style: BadgeStyle; 347} 348 349/** 350 * Defines the badge param with count and maxCount. 351 * 352 * @interface BadgeParamWithNumber 353 * @syscap SystemCapability.ArkUI.ArkUI.Full 354 * @since 7 355 */ 356/** 357 * Defines the badge param with count and maxCount. 358 * 359 * @interface BadgeParamWithNumber 360 * @syscap SystemCapability.ArkUI.ArkUI.Full 361 * @since 9 362 * @form 363 */ 364/** 365 * Defines the badge param with count and maxCount. 366 * 367 * @interface BadgeParamWithNumber 368 * @syscap SystemCapability.ArkUI.ArkUI.Full 369 * @crossplatform 370 * @since 10 371 * @form 372 */ 373declare interface BadgeParamWithNumber extends BadgeParam { 374 /** 375 * Set the number of reminder messages. 376 * 377 * @type { number } 378 * @syscap SystemCapability.ArkUI.ArkUI.Full 379 * @since 7 380 */ 381 /** 382 * Set the number of reminder messages. 383 * 384 * @type { number } 385 * @syscap SystemCapability.ArkUI.ArkUI.Full 386 * @since 9 387 * @form 388 */ 389 /** 390 * Set the number of reminder messages. 391 * 392 * @type { number } 393 * @syscap SystemCapability.ArkUI.ArkUI.Full 394 * @crossplatform 395 * @since 10 396 * @form 397 */ 398 count: number; 399 400 /** 401 * Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. 402 * 403 * @type { ?number } 404 * @syscap SystemCapability.ArkUI.ArkUI.Full 405 * @since 7 406 */ 407 /** 408 * Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. 409 * 410 * @type { ?number } 411 * @syscap SystemCapability.ArkUI.ArkUI.Full 412 * @since 9 413 * @form 414 */ 415 /** 416 * Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. 417 * 418 * @type { ?number } 419 * @syscap SystemCapability.ArkUI.ArkUI.Full 420 * @crossplatform 421 * @since 10 422 * @form 423 */ 424 maxCount?: number; 425} 426 427/** 428 * Defines the badge param with string value. 429 * 430 * @interface BadgeParamWithString 431 * @syscap SystemCapability.ArkUI.ArkUI.Full 432 * @since 7 433 */ 434/** 435 * Defines the badge param with string value. 436 * 437 * @interface BadgeParamWithString 438 * @syscap SystemCapability.ArkUI.ArkUI.Full 439 * @since 9 440 * @form 441 */ 442/** 443 * Defines the badge param with string value. 444 * 445 * @interface BadgeParamWithString 446 * @syscap SystemCapability.ArkUI.ArkUI.Full 447 * @crossplatform 448 * @since 10 449 * @form 450 */ 451declare interface BadgeParamWithString extends BadgeParam { 452 /** 453 * Text string of the prompt content. 454 * 455 * @type { string } 456 * @syscap SystemCapability.ArkUI.ArkUI.Full 457 * @since 7 458 */ 459 /** 460 * Text string of the prompt content. 461 * 462 * @type { string } 463 * @syscap SystemCapability.ArkUI.ArkUI.Full 464 * @since 9 465 * @form 466 */ 467 /** 468 * Text string of the prompt content. 469 * 470 * @type { string } 471 * @syscap SystemCapability.ArkUI.ArkUI.Full 472 * @crossplatform 473 * @since 10 474 * @form 475 */ 476 value: string; 477} 478 479/** 480 * Defines Badge Component. 481 * 482 * @interface BadgeInterface 483 * @syscap SystemCapability.ArkUI.ArkUI.Full 484 * @since 7 485 */ 486/** 487 * Defines Badge Component. 488 * 489 * @interface BadgeInterface 490 * @syscap SystemCapability.ArkUI.ArkUI.Full 491 * @since 9 492 * @form 493 */ 494/** 495 * Defines Badge Component. 496 * 497 * @interface BadgeInterface 498 * @syscap SystemCapability.ArkUI.ArkUI.Full 499 * @crossplatform 500 * @since 10 501 * @form 502 */ 503interface BadgeInterface { 504 /** 505 * position: Set the display position of the prompt point. 506 * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. 507 * count: Set the number of reminder messages. 508 * style: You can set the style of the Badge component, including the text color, size, dot color, and size. 509 * 510 * @param { BadgeParamWithNumber } value 511 * @returns { BadgeAttribute } 512 * @syscap SystemCapability.ArkUI.ArkUI.Full 513 * @since 7 514 */ 515 /** 516 * position: Set the display position of the prompt point. 517 * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. 518 * count: Set the number of reminder messages. 519 * style: You can set the style of the Badge component, including the text color, size, dot color, and size. 520 * 521 * @param { BadgeParamWithNumber } value 522 * @returns { BadgeAttribute } 523 * @syscap SystemCapability.ArkUI.ArkUI.Full 524 * @since 9 525 * @form 526 */ 527 /** 528 * position: Set the display position of the prompt point. 529 * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. 530 * count: Set the number of reminder messages. 531 * style: You can set the style of the Badge component, including the text color, size, dot color, and size. 532 * 533 * @param { BadgeParamWithNumber } value 534 * @returns { BadgeAttribute } 535 * @syscap SystemCapability.ArkUI.ArkUI.Full 536 * @crossplatform 537 * @since 10 538 * @form 539 */ 540 (value: BadgeParamWithNumber): BadgeAttribute; 541 542 /** 543 * value: Text string of the prompt content. 544 * position: Set the display position of the prompt point. 545 * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. 546 * style: You can set the style of the Badge component, including the text color, size, dot color, and size. 547 * 548 * @param { BadgeParamWithString } value 549 * @returns { BadgeAttribute } 550 * @syscap SystemCapability.ArkUI.ArkUI.Full 551 * @since 7 552 */ 553 /** 554 * value: Text string of the prompt content. 555 * position: Set the display position of the prompt point. 556 * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. 557 * style: You can set the style of the Badge component, including the text color, size, dot color, and size. 558 * 559 * @param { BadgeParamWithString } value 560 * @returns { BadgeAttribute } 561 * @syscap SystemCapability.ArkUI.ArkUI.Full 562 * @since 9 563 * @form 564 */ 565 /** 566 * value: Text string of the prompt content. 567 * position: Set the display position of the prompt point. 568 * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. 569 * style: You can set the style of the Badge component, including the text color, size, dot color, and size. 570 * 571 * @param { BadgeParamWithString } value 572 * @returns { BadgeAttribute } 573 * @syscap SystemCapability.ArkUI.ArkUI.Full 574 * @crossplatform 575 * @since 10 576 * @form 577 */ 578 (value: BadgeParamWithString): BadgeAttribute; 579} 580 581/** 582 * Defines Badge Component attribute. 583 * 584 * @extends CommonMethod 585 * @syscap SystemCapability.ArkUI.ArkUI.Full 586 * @since 7 587 */ 588/** 589 * Defines Badge Component attribute. 590 * 591 * @extends CommonMethod 592 * @syscap SystemCapability.ArkUI.ArkUI.Full 593 * @since 9 594 * @form 595 */ 596/** 597 * Defines Badge Component attribute. 598 * 599 * @extends CommonMethod <BadgeAttribute> 600 * @syscap SystemCapability.ArkUI.ArkUI.Full 601 * @crossplatform 602 * @since 10 603 * @form 604 */ 605declare class BadgeAttribute extends CommonMethod<BadgeAttribute> {} 606 607/** 608 * Defines Badge Component. 609 * 610 * @syscap SystemCapability.ArkUI.ArkUI.Full 611 * @since 7 612 */ 613/** 614 * Defines Badge Component. 615 * 616 * @syscap SystemCapability.ArkUI.ArkUI.Full 617 * @since 9 618 * @form 619 */ 620/** 621 * Defines Badge Component. 622 * 623 * @syscap SystemCapability.ArkUI.ArkUI.Full 624 * @crossplatform 625 * @since 10 626 * @form 627 */ 628declare const Badge: BadgeInterface; 629 630/** 631 * Defines Badge Component instance. 632 * 633 * @syscap SystemCapability.ArkUI.ArkUI.Full 634 * @since 7 635 */ 636/** 637 * Defines Badge Component instance. 638 * 639 * @syscap SystemCapability.ArkUI.ArkUI.Full 640 * @since 9 641 * @form 642 */ 643/** 644 * Defines Badge Component instance. 645 * 646 * @syscap SystemCapability.ArkUI.ArkUI.Full 647 * @crossplatform 648 * @since 10 649 * @form 650 */ 651declare const BadgeInstance: BadgeAttribute; 652