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 * @file 18 * @kit ArkUI 19 */ 20 21/** 22 * Defines the option of Progress. 23 * 24 * @interface ProgressOptions 25 * @syscap SystemCapability.ArkUI.ArkUI.Full 26 * @since 7 27 */ 28/** 29 * Defines the option of Progress. 30 * 31 * @interface ProgressOptions 32 * @syscap SystemCapability.ArkUI.ArkUI.Full 33 * @form 34 * @since 9 35 */ 36/** 37 * Defines the option of Progress. 38 * 39 * @interface ProgressOptions 40 * @syscap SystemCapability.ArkUI.ArkUI.Full 41 * @crossplatform 42 * @form 43 * @since 10 44 */ 45/** 46 * Defines the option of Progress. 47 * 48 * @interface ProgressOptions 49 * @syscap SystemCapability.ArkUI.ArkUI.Full 50 * @crossplatform 51 * @form 52 * @atomicservice 53 * @since 11 54 */ 55declare interface ProgressOptions<Type extends keyof ProgressStyleMap> { 56 /** 57 * Sets the value of Progress. 58 * 59 * @type { number } 60 * @syscap SystemCapability.ArkUI.ArkUI.Full 61 * @since 7 62 */ 63 /** 64 * Sets the value of Progress. 65 * 66 * @type { number } 67 * @syscap SystemCapability.ArkUI.ArkUI.Full 68 * @form 69 * @since 9 70 */ 71 /** 72 * Sets the value of Progress. 73 * 74 * @type { number } 75 * @syscap SystemCapability.ArkUI.ArkUI.Full 76 * @crossplatform 77 * @form 78 * @since 10 79 */ 80 /** 81 * Sets the value of Progress. 82 * 83 * @type { number } 84 * @syscap SystemCapability.ArkUI.ArkUI.Full 85 * @crossplatform 86 * @form 87 * @atomicservice 88 * @since 11 89 */ 90 value: number; 91 92 /** 93 * Sets the total of Progress. 94 * 95 * @type { ?number } 96 * @syscap SystemCapability.ArkUI.ArkUI.Full 97 * @since 7 98 */ 99 /** 100 * Sets the total of Progress. 101 * 102 * @type { ?number } 103 * @syscap SystemCapability.ArkUI.ArkUI.Full 104 * @form 105 * @since 9 106 */ 107 /** 108 * Sets the total of Progress. 109 * 110 * @type { ?number } 111 * @syscap SystemCapability.ArkUI.ArkUI.Full 112 * @crossplatform 113 * @form 114 * @since 10 115 */ 116 /** 117 * Sets the total of Progress. 118 * 119 * @type { ?number } 120 * @syscap SystemCapability.ArkUI.ArkUI.Full 121 * @crossplatform 122 * @form 123 * @atomicservice 124 * @since 11 125 */ 126 total?: number; 127 128 /** 129 * Sets the style of Progress. 130 * 131 * @type { ?ProgressStyle } 132 * @syscap SystemCapability.ArkUI.ArkUI.Full 133 * @since 7 134 * @deprecated since 8 135 * @useinstead type 136 */ 137 style?: ProgressStyle 138 139 /** 140 * Sets the type of Progress. 141 * 142 * @type { ?Type } 143 * @syscap SystemCapability.ArkUI.ArkUI.Full 144 * @since 8 145 */ 146 /** 147 * Sets the type of Progress. 148 * 149 * @type { ?Type } 150 * @syscap SystemCapability.ArkUI.ArkUI.Full 151 * @form 152 * @since 9 153 */ 154 /** 155 * Sets the type of Progress. 156 * 157 * @type { ?Type } 158 * @syscap SystemCapability.ArkUI.ArkUI.Full 159 * @crossplatform 160 * @form 161 * @since 10 162 */ 163 /** 164 * Sets the type of Progress. 165 * 166 * @type { ?Type } 167 * @syscap SystemCapability.ArkUI.ArkUI.Full 168 * @crossplatform 169 * @form 170 * @atomicservice 171 * @since 11 172 */ 173 type?: Type 174} 175 176/** 177 * Type of progress bar 178 * 179 * @enum { number } 180 * @syscap SystemCapability.ArkUI.ArkUI.Full 181 * @since 8 182 */ 183/** 184 * Type of progress bar 185 * 186 * @enum { number } 187 * @syscap SystemCapability.ArkUI.ArkUI.Full 188 * @form 189 * @since 9 190 */ 191/** 192 * Type of progress bar 193 * 194 * @enum { number } 195 * @syscap SystemCapability.ArkUI.ArkUI.Full 196 * @crossplatform 197 * @form 198 * @since 10 199 */ 200/** 201 * Type of progress bar 202 * 203 * @enum { number } 204 * @syscap SystemCapability.ArkUI.ArkUI.Full 205 * @crossplatform 206 * @form 207 * @atomicservice 208 * @since 11 209 */ 210declare enum ProgressType { 211 /** 212 * Linear progress bar style. 213 * 214 * @syscap SystemCapability.ArkUI.ArkUI.Full 215 * @since 8 216 */ 217 /** 218 * Linear progress bar style. 219 * 220 * @syscap SystemCapability.ArkUI.ArkUI.Full 221 * @form 222 * @since 9 223 */ 224 /** 225 * Linear progress bar style. 226 * 227 * @syscap SystemCapability.ArkUI.ArkUI.Full 228 * @crossplatform 229 * @form 230 * @since 10 231 */ 232 /** 233 * Linear progress bar style. 234 * 235 * @syscap SystemCapability.ArkUI.ArkUI.Full 236 * @crossplatform 237 * @form 238 * @atomicservice 239 * @since 11 240 */ 241 Linear = 0, 242 243 /** 244 * Ring progress bar. 245 * 246 * @syscap SystemCapability.ArkUI.ArkUI.Full 247 * @since 8 248 */ 249 /** 250 * Ring progress bar. 251 * 252 * @syscap SystemCapability.ArkUI.ArkUI.Full 253 * @form 254 * @since 9 255 */ 256 /** 257 * Ring progress bar. 258 * 259 * @syscap SystemCapability.ArkUI.ArkUI.Full 260 * @crossplatform 261 * @form 262 * @since 10 263 */ 264 /** 265 * Ring progress bar. 266 * 267 * @syscap SystemCapability.ArkUI.ArkUI.Full 268 * @crossplatform 269 * @form 270 * @atomicservice 271 * @since 11 272 */ 273 Ring = 1, 274 275 /** 276 * Eclipse progress bar. 277 * 278 * @syscap SystemCapability.ArkUI.ArkUI.Full 279 * @since 8 280 */ 281 /** 282 * Eclipse progress bar. 283 * 284 * @syscap SystemCapability.ArkUI.ArkUI.Full 285 * @form 286 * @since 9 287 */ 288 /** 289 * Eclipse progress bar. 290 * 291 * @syscap SystemCapability.ArkUI.ArkUI.Full 292 * @crossplatform 293 * @form 294 * @since 10 295 */ 296 /** 297 * Eclipse progress bar. 298 * 299 * @syscap SystemCapability.ArkUI.ArkUI.Full 300 * @crossplatform 301 * @form 302 * @atomicservice 303 * @since 11 304 */ 305 Eclipse = 2, 306 307 /** 308 * ScaleRing progress bar. 309 * 310 * @syscap SystemCapability.ArkUI.ArkUI.Full 311 * @since 8 312 */ 313 /** 314 * ScaleRing progress bar. 315 * 316 * @syscap SystemCapability.ArkUI.ArkUI.Full 317 * @form 318 * @since 9 319 */ 320 /** 321 * ScaleRing progress bar. 322 * 323 * @syscap SystemCapability.ArkUI.ArkUI.Full 324 * @crossplatform 325 * @form 326 * @since 10 327 */ 328 /** 329 * ScaleRing progress bar. 330 * 331 * @syscap SystemCapability.ArkUI.ArkUI.Full 332 * @crossplatform 333 * @form 334 * @atomicservice 335 * @since 11 336 */ 337 ScaleRing = 3, 338 339 /** 340 * Capsule progress bar. 341 * 342 * @syscap SystemCapability.ArkUI.ArkUI.Full 343 * @since 8 344 */ 345 /** 346 * Capsule progress bar. 347 * 348 * @syscap SystemCapability.ArkUI.ArkUI.Full 349 * @form 350 * @since 9 351 */ 352 /** 353 * Capsule progress bar. 354 * 355 * @syscap SystemCapability.ArkUI.ArkUI.Full 356 * @crossplatform 357 * @form 358 * @since 10 359 */ 360 /** 361 * Capsule progress bar. 362 * 363 * @syscap SystemCapability.ArkUI.ArkUI.Full 364 * @crossplatform 365 * @form 366 * @atomicservice 367 * @since 11 368 */ 369 Capsule = 4 370} 371 372/** 373 * Current status of progress bar. 374 * 375 * @enum { number } 376 * @syscap SystemCapability.ArkUI.ArkUI.Full 377 * @since 10 378 */ 379/** 380 * Current status of progress bar. 381 * 382 * @enum { number } 383 * @syscap SystemCapability.ArkUI.ArkUI.Full 384 * @crossplatform 385 * @atomicservice 386 * @since 11 387 */ 388declare enum ProgressStatus { 389 /** 390 * Loading status. 391 * 392 * @syscap SystemCapability.ArkUI.ArkUI.Full 393 * @since 10 394 */ 395 /** 396 * Loading status. 397 * 398 * @syscap SystemCapability.ArkUI.ArkUI.Full 399 * @crossplatform 400 * @atomicservice 401 * @since 11 402 */ 403 LOADING, 404 405 /** 406 * Processing status. 407 * 408 * @syscap SystemCapability.ArkUI.ArkUI.Full 409 * @since 10 410 */ 411 /** 412 * Processing status. 413 * 414 * @syscap SystemCapability.ArkUI.ArkUI.Full 415 * @crossplatform 416 * @atomicservice 417 * @since 11 418 */ 419 PROGRESSING 420} 421 422/** 423 * Defines style options for progress component. 424 * 425 * @interface ProgressStyleOptions 426 * @syscap SystemCapability.ArkUI.ArkUI.Full 427 * @since 8 428 */ 429/** 430 * Defines style options for progress component. 431 * 432 * @interface ProgressStyleOptions 433 * @syscap SystemCapability.ArkUI.ArkUI.Full 434 * @form 435 * @since 9 436 */ 437/** 438 * Defines style options for progress component. 439 * 440 * @interface ProgressStyleOptions 441 * @syscap SystemCapability.ArkUI.ArkUI.Full 442 * @crossplatform 443 * @form 444 * @since 10 445 */ 446/** 447 * Defines style options for progress component. 448 * 449 * @interface ProgressStyleOptions 450 * @syscap SystemCapability.ArkUI.ArkUI.Full 451 * @crossplatform 452 * @form 453 * @atomicservice 454 * @since 11 455 */ 456declare interface ProgressStyleOptions extends CommonProgressStyleOptions { 457 /** 458 * Defines the strokeWidth property. 459 * 460 * @type { ?Length } 461 * @syscap SystemCapability.ArkUI.ArkUI.Full 462 * @since 8 463 */ 464 /** 465 * Defines the strokeWidth property. 466 * 467 * @type { ?Length } 468 * @syscap SystemCapability.ArkUI.ArkUI.Full 469 * @form 470 * @since 9 471 */ 472 /** 473 * Defines the strokeWidth property. 474 * 475 * @type { ?Length } 476 * @syscap SystemCapability.ArkUI.ArkUI.Full 477 * @crossplatform 478 * @form 479 * @since 10 480 */ 481 /** 482 * Defines the strokeWidth property. 483 * 484 * @type { ?Length } 485 * @syscap SystemCapability.ArkUI.ArkUI.Full 486 * @crossplatform 487 * @form 488 * @atomicservice 489 * @since 11 490 */ 491 strokeWidth?: Length; 492 493 /** 494 * Defines the scaleCount property. 495 * 496 * @type { ?number } 497 * @syscap SystemCapability.ArkUI.ArkUI.Full 498 * @since 8 499 */ 500 /** 501 * Defines the scaleCount property. 502 * 503 * @type { ?number } 504 * @syscap SystemCapability.ArkUI.ArkUI.Full 505 * @form 506 * @since 9 507 */ 508 /** 509 * Defines the scaleCount property. 510 * 511 * @type { ?number } 512 * @syscap SystemCapability.ArkUI.ArkUI.Full 513 * @crossplatform 514 * @form 515 * @since 10 516 */ 517 /** 518 * Defines the scaleCount property. 519 * 520 * @type { ?number } 521 * @syscap SystemCapability.ArkUI.ArkUI.Full 522 * @crossplatform 523 * @form 524 * @atomicservice 525 * @since 11 526 */ 527 scaleCount?: number; 528 529 /** 530 * Defines the scaleWidth property. 531 * 532 * @type { ?Length } 533 * @syscap SystemCapability.ArkUI.ArkUI.Full 534 * @since 8 535 */ 536 /** 537 * Defines the scaleWidth property. 538 * 539 * @type { ?Length } 540 * @syscap SystemCapability.ArkUI.ArkUI.Full 541 * @form 542 * @since 9 543 */ 544 /** 545 * Defines the scaleWidth property. 546 * 547 * @type { ?Length } 548 * @syscap SystemCapability.ArkUI.ArkUI.Full 549 * @crossplatform 550 * @form 551 * @since 10 552 */ 553 /** 554 * Defines the scaleWidth property. 555 * 556 * @type { ?Length } 557 * @syscap SystemCapability.ArkUI.ArkUI.Full 558 * @crossplatform 559 * @form 560 * @atomicservice 561 * @since 11 562 */ 563 scaleWidth?: Length; 564} 565 566/** 567 * Progress common style options. 568 * 569 * @interface CommonProgressStyleOptions 570 * @syscap SystemCapability.ArkUI.ArkUI.Full 571 * @since 10 572 */ 573/** 574 * Progress common style options. 575 * 576 * @interface CommonProgressStyleOptions 577 * @syscap SystemCapability.ArkUI.ArkUI.Full 578 * @crossplatform 579 * @atomicservice 580 * @since 11 581 */ 582declare interface CommonProgressStyleOptions { 583 /** 584 * Enable smooth effect. 585 * 586 * @type { ?boolean } 587 * @default true 588 * @syscap SystemCapability.ArkUI.ArkUI.Full 589 * @since 10 590 */ 591 /** 592 * Enable smooth effect. 593 * 594 * @type { ?boolean } 595 * @default true 596 * @syscap SystemCapability.ArkUI.ArkUI.Full 597 * @crossplatform 598 * @atomicservice 599 * @since 11 600 */ 601 enableSmoothEffect?: boolean; 602} 603 604/** 605 * Defines the enable scan effect. 606 * 607 * @interface ScanEffectOptions 608 * @syscap SystemCapability.ArkUI.ArkUI.Full 609 * @since 10 610 */ 611/** 612 * Defines the enable scan effect. 613 * 614 * @interface ScanEffectOptions 615 * @syscap SystemCapability.ArkUI.ArkUI.Full 616 * @crossplatform 617 * @atomicservice 618 * @since 11 619 */ 620declare interface ScanEffectOptions { 621 /** 622 * Enable scan effect. 623 * 624 * @type { ?boolean } 625 * @default false 626 * @syscap SystemCapability.ArkUI.ArkUI.Full 627 * @since 10 628 */ 629 /** 630 * Enable scan effect. 631 * 632 * @type { ?boolean } 633 * @default false 634 * @syscap SystemCapability.ArkUI.ArkUI.Full 635 * @crossplatform 636 * @atomicservice 637 * @since 11 638 */ 639 enableScanEffect?: boolean; 640} 641 642/** 643 * Defines the Eclipse style Options. 644 * 645 * @interface EclipseStyleOptions 646 * @syscap SystemCapability.ArkUI.ArkUI.Full 647 * @since 10 648 */ 649/** 650 * Defines the Eclipse style Options. 651 * 652 * @interface EclipseStyleOptions 653 * @syscap SystemCapability.ArkUI.ArkUI.Full 654 * @atomicservice 655 * @since 11 656 */ 657declare interface EclipseStyleOptions extends CommonProgressStyleOptions { 658 659} 660 661/** 662 * Defines the ScaleRing style Options. 663 * 664 * @interface ScaleRingStyleOptions 665 * @syscap SystemCapability.ArkUI.ArkUI.Full 666 * @since 10 667 */ 668/** 669 * Defines the ScaleRing style Options. 670 * 671 * @interface ScaleRingStyleOptions 672 * @syscap SystemCapability.ArkUI.ArkUI.Full 673 * @crossplatform 674 * @atomicservice 675 * @since 11 676 */ 677declare interface ScaleRingStyleOptions extends CommonProgressStyleOptions { 678 /** 679 * Defines the strokeWidth property. 680 * 681 * @type { ?Length } 682 * @syscap SystemCapability.ArkUI.ArkUI.Full 683 * @since 10 684 */ 685 /** 686 * Defines the strokeWidth property. 687 * 688 * @type { ?Length } 689 * @syscap SystemCapability.ArkUI.ArkUI.Full 690 * @crossplatform 691 * @atomicservice 692 * @since 11 693 */ 694 strokeWidth?: Length; 695 696 /** 697 * Defines the scaleWidth property. 698 * 699 * @type { ?Length } 700 * @syscap SystemCapability.ArkUI.ArkUI.Full 701 * @since 10 702 */ 703 /** 704 * Defines the scaleWidth property. 705 * 706 * @type { ?Length } 707 * @syscap SystemCapability.ArkUI.ArkUI.Full 708 * @crossplatform 709 * @atomicservice 710 * @since 11 711 */ 712 scaleWidth?: Length; 713 714 /** 715 * Defines the scaleCount property. 716 * 717 * @type { ?number } 718 * @syscap SystemCapability.ArkUI.ArkUI.Full 719 * @since 10 720 */ 721 /** 722 * Defines the scaleCount property. 723 * 724 * @type { ?number } 725 * @syscap SystemCapability.ArkUI.ArkUI.Full 726 * @crossplatform 727 * @atomicservice 728 * @since 11 729 */ 730 scaleCount?: number; 731} 732 733/** 734 * Defines the ring style Options. 735 * 736 * @interface RingStyleOptions 737 * @syscap SystemCapability.ArkUI.ArkUI.Full 738 * @since 10 739 */ 740/** 741 * Defines the ring style Options. 742 * 743 * @interface RingStyleOptions 744 * @syscap SystemCapability.ArkUI.ArkUI.Full 745 * @crossplatform 746 * @atomicservice 747 * @since 11 748 */ 749declare interface RingStyleOptions extends ScanEffectOptions, CommonProgressStyleOptions { 750 /** 751 * Defines the strokeWidth property. 752 * 753 * @type { ?Length } 754 * @syscap SystemCapability.ArkUI.ArkUI.Full 755 * @since 10 756 */ 757 /** 758 * Defines the strokeWidth property. 759 * 760 * @type { ?Length } 761 * @syscap SystemCapability.ArkUI.ArkUI.Full 762 * @crossplatform 763 * @atomicservice 764 * @since 11 765 */ 766 strokeWidth?: Length; 767 768 /** 769 * Enables progress shadow. 770 * 771 * @type { ?boolean } 772 * @syscap SystemCapability.ArkUI.ArkUI.Full 773 * @since 10 774 */ 775 /** 776 * Enables progress shadow. 777 * 778 * @type { ?boolean } 779 * @syscap SystemCapability.ArkUI.ArkUI.Full 780 * @crossplatform 781 * @atomicservice 782 * @since 11 783 */ 784 shadow?: boolean; 785 786 /** 787 * The status of progress, default is PROGRESSING. Set to LOADING status will trigger the loading animation. 788 * 789 * @type { ?ProgressStatus } 790 * @syscap SystemCapability.ArkUI.ArkUI.Full 791 * @since 10 792 */ 793 /** 794 * The status of progress, default is PROGRESSING. Set to LOADING status will trigger the loading animation. 795 * 796 * @type { ?ProgressStatus } 797 * @syscap SystemCapability.ArkUI.ArkUI.Full 798 * @crossplatform 799 * @atomicservice 800 * @since 11 801 */ 802 status?: ProgressStatus; 803} 804 805/** 806 * Defines the linear style Options. 807 * 808 * @interface LinearStyleOptions 809 * @syscap SystemCapability.ArkUI.ArkUI.Full 810 * @since 10 811 */ 812/** 813 * Defines the linear style Options. 814 * 815 * @interface LinearStyleOptions 816 * @syscap SystemCapability.ArkUI.ArkUI.Full 817 * @crossplatform 818 * @atomicservice 819 * @since 11 820 */ 821declare interface LinearStyleOptions extends ScanEffectOptions, CommonProgressStyleOptions { 822 /** 823 * Defines the strokeWidth property. 824 * 825 * @type { ?Length } 826 * @syscap SystemCapability.ArkUI.ArkUI.Full 827 * @since 10 828 */ 829 /** 830 * Defines the strokeWidth property. 831 * 832 * @type { ?Length } 833 * @syscap SystemCapability.ArkUI.ArkUI.Full 834 * @crossplatform 835 * @atomicservice 836 * @since 11 837 */ 838 strokeWidth?: Length; 839 /** 840 * Defines the stroke radius property. 841 * 842 * @type { ?(PX | VP | LPX | Resource) } 843 * @default strokeWidth / 2 844 * @syscap SystemCapability.ArkUI.ArkUI.Full 845 * @since 10 846 */ 847 /** 848 * Defines the stroke radius property. 849 * 850 * @type { ?(PX | VP | LPX | Resource) } 851 * @default strokeWidth / 2 852 * @syscap SystemCapability.ArkUI.ArkUI.Full 853 * @crossplatform 854 * @atomicservice 855 * @since 11 856 */ 857 strokeRadius?: PX | VP | LPX | Resource; 858} 859 860/** 861 * Defines the capsule style Options. 862 * 863 * @interface CapsuleStyleOptions 864 * @syscap SystemCapability.ArkUI.ArkUI.Full 865 * @since 10 866 */ 867/** 868 * Defines the capsule style Options. 869 * 870 * @interface CapsuleStyleOptions 871 * @syscap SystemCapability.ArkUI.ArkUI.Full 872 * @crossplatform 873 * @atomicservice 874 * @since 11 875 */ 876declare interface CapsuleStyleOptions extends ScanEffectOptions, CommonProgressStyleOptions { 877 /** 878 * Set the inner border color. 879 * 880 * @type { ?ResourceColor } 881 * @syscap SystemCapability.ArkUI.ArkUI.Full 882 * @since 10 883 */ 884 /** 885 * Set the inner border color. 886 * 887 * @type { ?ResourceColor } 888 * @syscap SystemCapability.ArkUI.ArkUI.Full 889 * @crossplatform 890 * @atomicservice 891 * @since 11 892 */ 893 borderColor?: ResourceColor; 894 895 /** 896 * Set the border width. 897 * 898 * @type { ?Length } 899 * @syscap SystemCapability.ArkUI.ArkUI.Full 900 * @since 10 901 */ 902 /** 903 * Set the border width. 904 * 905 * @type { ?Length } 906 * @syscap SystemCapability.ArkUI.ArkUI.Full 907 * @crossplatform 908 * @atomicservice 909 * @since 11 910 */ 911 borderWidth?: Length; 912 913 /** 914 * Set the text content. 915 * 916 * @type { ?string } 917 * @syscap SystemCapability.ArkUI.ArkUI.Full 918 * @since 10 919 */ 920 /** 921 * Set the text content. 922 * 923 * @type { ?string } 924 * @syscap SystemCapability.ArkUI.ArkUI.Full 925 * @crossplatform 926 * @atomicservice 927 * @since 11 928 */ 929 content?: string; 930 931 /** 932 * Set the text style. 933 * 934 * @type { ?Font } 935 * @syscap SystemCapability.ArkUI.ArkUI.Full 936 * @since 10 937 */ 938 /** 939 * Set the text style. 940 * 941 * @type { ?Font } 942 * @syscap SystemCapability.ArkUI.ArkUI.Full 943 * @crossplatform 944 * @atomicservice 945 * @since 11 946 */ 947 font?: Font; 948 949 /** 950 * Set the text fontColor. 951 * 952 * @type { ?ResourceColor } 953 * @syscap SystemCapability.ArkUI.ArkUI.Full 954 * @since 10 955 */ 956 /** 957 * Set the text fontColor. 958 * 959 * @type { ?ResourceColor } 960 * @syscap SystemCapability.ArkUI.ArkUI.Full 961 * @crossplatform 962 * @atomicservice 963 * @since 11 964 */ 965 fontColor?: ResourceColor; 966 967 /** 968 * show default percentage. 969 * 970 * @type { ?boolean } 971 * @default false 972 * @syscap SystemCapability.ArkUI.ArkUI.Full 973 * @since 10 974 */ 975 /** 976 * show default percentage. 977 * 978 * @type { ?boolean } 979 * @default false 980 * @syscap SystemCapability.ArkUI.ArkUI.Full 981 * @crossplatform 982 * @atomicservice 983 * @since 11 984 */ 985 showDefaultPercentage?: boolean; 986} 987 988/** 989 * Type of progress bar 990 * 991 * @enum { number } 992 * @syscap SystemCapability.ArkUI.ArkUI.Full 993 * @since 7 994 */ 995/** 996 * Type of progress bar 997 * 998 * @enum { number } 999 * @syscap SystemCapability.ArkUI.ArkUI.Full 1000 * @form 1001 * @since 9 1002 */ 1003/** 1004 * Type of progress bar 1005 * 1006 * @enum { number } 1007 * @syscap SystemCapability.ArkUI.ArkUI.Full 1008 * @crossplatform 1009 * @form 1010 * @since 10 1011 */ 1012/** 1013 * Type of progress bar 1014 * 1015 * @enum { number } 1016 * @syscap SystemCapability.ArkUI.ArkUI.Full 1017 * @crossplatform 1018 * @form 1019 * @atomicservice 1020 * @since 11 1021 */ 1022declare enum ProgressStyle { 1023 /** 1024 * Linear progress bar style. 1025 * 1026 * @syscap SystemCapability.ArkUI.ArkUI.Full 1027 * @since 7 1028 */ 1029 /** 1030 * Linear progress bar style. 1031 * 1032 * @syscap SystemCapability.ArkUI.ArkUI.Full 1033 * @form 1034 * @since 9 1035 */ 1036 /** 1037 * Linear progress bar style. 1038 * 1039 * @syscap SystemCapability.ArkUI.ArkUI.Full 1040 * @crossplatform 1041 * @form 1042 * @since 10 1043 */ 1044 /** 1045 * Linear progress bar style. 1046 * 1047 * @syscap SystemCapability.ArkUI.ArkUI.Full 1048 * @crossplatform 1049 * @form 1050 * @atomicservice 1051 * @since 11 1052 */ 1053 Linear, 1054 1055 /** 1056 * Ring progress bar. 1057 * 1058 * @syscap SystemCapability.ArkUI.ArkUI.Full 1059 * @since 8 1060 */ 1061 /** 1062 * Ring progress bar. 1063 * 1064 * @syscap SystemCapability.ArkUI.ArkUI.Full 1065 * @form 1066 * @since 9 1067 */ 1068 /** 1069 * Ring progress bar. 1070 * 1071 * @syscap SystemCapability.ArkUI.ArkUI.Full 1072 * @crossplatform 1073 * @form 1074 * @since 10 1075 */ 1076 /** 1077 * Ring progress bar. 1078 * 1079 * @syscap SystemCapability.ArkUI.ArkUI.Full 1080 * @crossplatform 1081 * @form 1082 * @atomicservice 1083 * @since 11 1084 */ 1085 Ring, 1086 1087 /** 1088 * Eclipse progress bar. 1089 * 1090 * @syscap SystemCapability.ArkUI.ArkUI.Full 1091 * @since 7 1092 */ 1093 /** 1094 * Eclipse progress bar. 1095 * 1096 * @syscap SystemCapability.ArkUI.ArkUI.Full 1097 * @form 1098 * @since 9 1099 */ 1100 /** 1101 * Eclipse progress bar. 1102 * 1103 * @syscap SystemCapability.ArkUI.ArkUI.Full 1104 * @crossplatform 1105 * @form 1106 * @since 10 1107 */ 1108 /** 1109 * Eclipse progress bar. 1110 * 1111 * @syscap SystemCapability.ArkUI.ArkUI.Full 1112 * @crossplatform 1113 * @form 1114 * @atomicservice 1115 * @since 11 1116 */ 1117 Eclipse, 1118 1119 /** 1120 * ScaleRing progress bar. 1121 * 1122 * @syscap SystemCapability.ArkUI.ArkUI.Full 1123 * @since 8 1124 */ 1125 /** 1126 * ScaleRing progress bar. 1127 * 1128 * @syscap SystemCapability.ArkUI.ArkUI.Full 1129 * @form 1130 * @since 9 1131 */ 1132 /** 1133 * ScaleRing progress bar. 1134 * 1135 * @syscap SystemCapability.ArkUI.ArkUI.Full 1136 * @crossplatform 1137 * @form 1138 * @since 10 1139 */ 1140 /** 1141 * ScaleRing progress bar. 1142 * 1143 * @syscap SystemCapability.ArkUI.ArkUI.Full 1144 * @crossplatform 1145 * @form 1146 * @atomicservice 1147 * @since 11 1148 */ 1149 ScaleRing, 1150 1151 /** 1152 * Capsule progress bar. 1153 * 1154 * @syscap SystemCapability.ArkUI.ArkUI.Full 1155 * @since 8 1156 */ 1157 /** 1158 * Capsule progress bar. 1159 * 1160 * @syscap SystemCapability.ArkUI.ArkUI.Full 1161 * @form 1162 * @since 9 1163 */ 1164 /** 1165 * Capsule progress bar. 1166 * 1167 * @syscap SystemCapability.ArkUI.ArkUI.Full 1168 * @crossplatform 1169 * @form 1170 * @since 10 1171 */ 1172 /** 1173 * Capsule progress bar. 1174 * 1175 * @syscap SystemCapability.ArkUI.ArkUI.Full 1176 * @crossplatform 1177 * @form 1178 * @atomicservice 1179 * @since 11 1180 */ 1181 Capsule, 1182} 1183 1184/** 1185 * Defines the map for progress type and style. 1186 * 1187 * @interface ProgressStyleMap 1188 * @syscap SystemCapability.ArkUI.ArkUI.Full 1189 * @since 10 1190 */ 1191/** 1192 * Defines the map for progress type and style. 1193 * 1194 * @interface ProgressStyleMap 1195 * @syscap SystemCapability.ArkUI.ArkUI.Full 1196 * @atomicservice 1197 * @since 11 1198 */ 1199declare interface ProgressStyleMap { 1200 /** 1201 * Defines the map for Linear progress. 1202 * 1203 * @syscap SystemCapability.ArkUI.ArkUI.Full 1204 * @since 10 1205 */ 1206 /** 1207 * Defines the map for Linear progress. 1208 * 1209 * @type { LinearStyleOptions | ProgressStyleOptions } 1210 * @syscap SystemCapability.ArkUI.ArkUI.Full 1211 * @atomicservice 1212 * @since 11 1213 */ 1214 [ProgressType.Linear]: LinearStyleOptions | ProgressStyleOptions; 1215 1216 /** 1217 * Defines the map for Ring progress. 1218 * 1219 * @syscap SystemCapability.ArkUI.ArkUI.Full 1220 * @since 10 1221 */ 1222 /** 1223 * Defines the map for Ring progress. 1224 * 1225 * @type { RingStyleOptions | ProgressStyleOptions } 1226 * @syscap SystemCapability.ArkUI.ArkUI.Full 1227 * @atomicservice 1228 * @since 11 1229 */ 1230 [ProgressType.Ring]: RingStyleOptions | ProgressStyleOptions; 1231 1232 /** 1233 * Defines the map for Eclipse progress. 1234 * 1235 * @syscap SystemCapability.ArkUI.ArkUI.Full 1236 * @since 10 1237 */ 1238 /** 1239 * Defines the map for Eclipse progress. 1240 * 1241 * @type { EclipseStyleOptions | ProgressStyleOptions } 1242 * @syscap SystemCapability.ArkUI.ArkUI.Full 1243 * @atomicservice 1244 * @since 11 1245 */ 1246 [ProgressType.Eclipse]: EclipseStyleOptions | ProgressStyleOptions; 1247 1248 /** 1249 * Defines the map for ScaleRing progress. 1250 * 1251 * @syscap SystemCapability.ArkUI.ArkUI.Full 1252 * @since 10 1253 */ 1254 /** 1255 * Defines the map for ScaleRing progress. 1256 * 1257 * @type { ScaleRingStyleOptions | ProgressStyleOptions } 1258 * @syscap SystemCapability.ArkUI.ArkUI.Full 1259 * @atomicservice 1260 * @since 11 1261 */ 1262 [ProgressType.ScaleRing]: ScaleRingStyleOptions | ProgressStyleOptions; 1263 1264 /** 1265 * Defines the map for Capsule progress. 1266 * 1267 * @syscap SystemCapability.ArkUI.ArkUI.Full 1268 * @since 10 1269 */ 1270 /** 1271 * Defines the map for Capsule progress. 1272 * 1273 * @type { CapsuleStyleOptions | ProgressStyleOptions } 1274 * @syscap SystemCapability.ArkUI.ArkUI.Full 1275 * @atomicservice 1276 * @since 11 1277 */ 1278 [ProgressType.Capsule]: CapsuleStyleOptions | ProgressStyleOptions; 1279} 1280 1281/** 1282 * Provides the progress bar interface. 1283 * 1284 * @interface ProgressInterface 1285 * @syscap SystemCapability.ArkUI.ArkUI.Full 1286 * @since 7 1287 */ 1288/** 1289 * Provides the progress bar interface. 1290 * 1291 * @interface ProgressInterface 1292 * @syscap SystemCapability.ArkUI.ArkUI.Full 1293 * @form 1294 * @since 9 1295 */ 1296/** 1297 * Provides the progress bar interface. 1298 * 1299 * @interface ProgressInterface 1300 * @syscap SystemCapability.ArkUI.ArkUI.Full 1301 * @crossplatform 1302 * @form 1303 * @since 10 1304 */ 1305/** 1306 * Provides the progress bar interface. 1307 * 1308 * @interface ProgressInterface 1309 * @syscap SystemCapability.ArkUI.ArkUI.Full 1310 * @crossplatform 1311 * @form 1312 * @atomicservice 1313 * @since 11 1314 */ 1315interface ProgressInterface { 1316 /** 1317 * Called when the progress bar is set. 1318 * 1319 * @param { ProgressOptions<Type> } options 1320 * @returns { ProgressAttribute<Type> } 1321 * @syscap SystemCapability.ArkUI.ArkUI.Full 1322 * @since 7 1323 */ 1324 /** 1325 * Called when the progress bar is set. 1326 * 1327 * @param { ProgressOptions<Type> } options 1328 * @returns { ProgressAttribute<Type> } 1329 * @syscap SystemCapability.ArkUI.ArkUI.Full 1330 * @form 1331 * @since 9 1332 */ 1333 /** 1334 * Called when the progress bar is set. 1335 * 1336 * @param { ProgressOptions<Type> } options 1337 * @returns { ProgressAttribute<Type> } 1338 * @syscap SystemCapability.ArkUI.ArkUI.Full 1339 * @crossplatform 1340 * @form 1341 * @since 10 1342 */ 1343 /** 1344 * Called when the progress bar is set. 1345 * 1346 * @param { ProgressOptions<Type> } options 1347 * @returns { ProgressAttribute<Type> } 1348 * @syscap SystemCapability.ArkUI.ArkUI.Full 1349 * @crossplatform 1350 * @form 1351 * @atomicservice 1352 * @since 11 1353 */ 1354 <Type extends keyof ProgressStyleMap>(options: ProgressOptions<Type>): ProgressAttribute<Type>; 1355} 1356 1357/** 1358 * Defines the progress attribute functions. 1359 * 1360 * @extends CommonMethod<ProgressAttribute<Type>> 1361 * @syscap SystemCapability.ArkUI.ArkUI.Full 1362 * @since 7 1363 */ 1364/** 1365 * Defines the progress attribute functions. 1366 * 1367 * @extends CommonMethod<ProgressAttribute<Type>> 1368 * @syscap SystemCapability.ArkUI.ArkUI.Full 1369 * @form 1370 * @since 9 1371 */ 1372/** 1373 * Defines the progress attribute functions. 1374 * 1375 * @extends CommonMethod<ProgressAttribute<Type>> 1376 * @syscap SystemCapability.ArkUI.ArkUI.Full 1377 * @crossplatform 1378 * @form 1379 * @since 10 1380 */ 1381/** 1382 * Defines the progress attribute functions. 1383 * 1384 * @extends CommonMethod<ProgressAttribute<Type>> 1385 * @syscap SystemCapability.ArkUI.ArkUI.Full 1386 * @crossplatform 1387 * @form 1388 * @atomicservice 1389 * @since 11 1390 */ 1391declare class ProgressAttribute<Type extends keyof ProgressStyleMap = keyof ProgressStyleMap, 1392 Style extends ProgressStyleMap[Type] = ProgressStyleMap[Type]> extends CommonMethod<ProgressAttribute<Type>> { 1393 /** 1394 * Called when the current progress value is set. 1395 * 1396 * @param { number } value 1397 * @returns { ProgressAttribute<Type> } 1398 * @syscap SystemCapability.ArkUI.ArkUI.Full 1399 * @since 7 1400 */ 1401 /** 1402 * Called when the current progress value is set. 1403 * 1404 * @param { number } value 1405 * @returns { ProgressAttribute<Type> } 1406 * @syscap SystemCapability.ArkUI.ArkUI.Full 1407 * @form 1408 * @since 9 1409 */ 1410 /** 1411 * Called when the current progress value is set. 1412 * 1413 * @param { number } value 1414 * @returns { ProgressAttribute<Type> } 1415 * @syscap SystemCapability.ArkUI.ArkUI.Full 1416 * @crossplatform 1417 * @form 1418 * @since 10 1419 */ 1420 /** 1421 * Called when the current progress value is set. 1422 * 1423 * @param { number } value 1424 * @returns { ProgressAttribute<Type> } 1425 * @syscap SystemCapability.ArkUI.ArkUI.Full 1426 * @crossplatform 1427 * @form 1428 * @atomicservice 1429 * @since 11 1430 */ 1431 value(value: number): ProgressAttribute<Type>; 1432 1433 /** 1434 * Called when the progress bar foreground is set. 1435 * 1436 * @param { ResourceColor | LinearGradient } value 1437 * @returns { ProgressAttribute<Type> } 1438 * @syscap SystemCapability.ArkUI.ArkUI.Full 1439 * @since 7 1440 */ 1441 /** 1442 * Called when the progress bar foreground is set. 1443 * 1444 * @param { ResourceColor | LinearGradient } value 1445 * @returns { ProgressAttribute<Type> } 1446 * @syscap SystemCapability.ArkUI.ArkUI.Full 1447 * @form 1448 * @since 9 1449 */ 1450 /** 1451 * Called when the progress bar foreground is set. 1452 * 1453 * @param { ResourceColor | LinearGradient } value - indicates the color of the progress. 1454 * @returns { ProgressAttribute<Type> } the attribute of the progress. 1455 * @syscap SystemCapability.ArkUI.ArkUI.Full 1456 * @crossplatform 1457 * @form 1458 * @since 10 1459 */ 1460 /** 1461 * Called when the progress bar foreground is set. 1462 * 1463 * @param { ResourceColor | LinearGradient } value - indicates the color of the progress. 1464 * @returns { ProgressAttribute<Type> } the attribute of the progress. 1465 * @syscap SystemCapability.ArkUI.ArkUI.Full 1466 * @crossplatform 1467 * @form 1468 * @atomicservice 1469 * @since 11 1470 */ 1471 color(value: ResourceColor | LinearGradient): ProgressAttribute<Type>; 1472 1473 /** 1474 * Called when the style of progress bar is set. 1475 * 1476 * @param { Style } value 1477 * @returns { ProgressAttribute<Type> } 1478 * @syscap SystemCapability.ArkUI.ArkUI.Full 1479 * @since 8 1480 */ 1481 /** 1482 * Called when the style of progress bar is set. 1483 * 1484 * @param { Style } value 1485 * @returns { ProgressAttribute<Type> } 1486 * @syscap SystemCapability.ArkUI.ArkUI.Full 1487 * @form 1488 * @since 9 1489 */ 1490 /** 1491 * Called when the style of progress bar is set. 1492 * 1493 * @param { Style } value - indicates the style of the progress. 1494 * @returns { ProgressAttribute<Type> } the attribute of the progress. 1495 * @syscap SystemCapability.ArkUI.ArkUI.Full 1496 * @crossplatform 1497 * @form 1498 * @since 10 1499 */ 1500 /** 1501 * Called when the style of progress bar is set. 1502 * 1503 * @param { Style } value - indicates the style of the progress. 1504 * @returns { ProgressAttribute<Type> } the attribute of the progress. 1505 * @syscap SystemCapability.ArkUI.ArkUI.Full 1506 * @crossplatform 1507 * @form 1508 * @atomicservice 1509 * @since 11 1510 */ 1511 style(value: Style): ProgressAttribute<Type>; 1512 1513 /** 1514 * Set the contentModifier of progress. 1515 * 1516 * @param { ContentModifier<ProgressConfiguration> } modifier - The contentModifier of progress. 1517 * @returns { ProgressAttribute<Type> } the attribute of the progress. 1518 * @syscap SystemCapability.ArkUI.ArkUI.Full 1519 * @crossplatform 1520 * @atomicservice 1521 * @since 12 1522 */ 1523 contentModifier(modifier: ContentModifier<ProgressConfiguration>): ProgressAttribute<Type>; 1524 1525 /** 1526 * Sets if mark to privacy sensitive. 1527 * 1528 * @param { Optional<boolean> } isPrivacySensitiveMode - indicates if mark to privacy sensitive. 1529 * @returns { ProgressAttribute<Type> } the attribute of the progress. 1530 * @syscap SystemCapability.ArkUI.ArkUI.Full 1531 * @crossplatform 1532 * @form 1533 * @atomicservice 1534 * @since 12 1535 */ 1536 privacySensitive(isPrivacySensitiveMode: Optional<boolean>): ProgressAttribute<Type>; 1537} 1538 1539/** 1540 * ProgressConfiguration used by progress contentModifier 1541 * 1542 * @interface ProgressConfiguration 1543 * @syscap SystemCapability.ArkUI.ArkUI.Full 1544 * @crossplatform 1545 * @atomicservice 1546 * @since 12 1547 */ 1548declare interface ProgressConfiguration extends CommonConfiguration<ProgressConfiguration> { 1549 /** 1550 * The value of Progress. 1551 * 1552 * @type { number } 1553 * @syscap SystemCapability.ArkUI.ArkUI.Full 1554 * @crossplatform 1555 * @atomicservice 1556 * @since 12 1557 */ 1558 value: number; 1559 1560 /** 1561 * The total of Progress. 1562 * 1563 * @type { number } 1564 * @syscap SystemCapability.ArkUI.ArkUI.Full 1565 * @crossplatform 1566 * @atomicservice 1567 * @since 12 1568 */ 1569 total: number; 1570} 1571 1572/** 1573 * Defines Progress Component. 1574 * 1575 * @syscap SystemCapability.ArkUI.ArkUI.Full 1576 * @since 7 1577 */ 1578/** 1579 * Defines Progress Component. 1580 * 1581 * @syscap SystemCapability.ArkUI.ArkUI.Full 1582 * @form 1583 * @since 9 1584 */ 1585/** 1586 * Defines Progress Component. 1587 * 1588 * @syscap SystemCapability.ArkUI.ArkUI.Full 1589 * @crossplatform 1590 * @form 1591 * @since 10 1592 */ 1593/** 1594 * Defines Progress Component. 1595 * 1596 * @syscap SystemCapability.ArkUI.ArkUI.Full 1597 * @crossplatform 1598 * @form 1599 * @atomicservice 1600 * @since 11 1601 */ 1602declare const Progress: ProgressInterface; 1603 1604/** 1605 * Defines Progress Component instance. 1606 * 1607 * @syscap SystemCapability.ArkUI.ArkUI.Full 1608 * @since 7 1609 */ 1610/** 1611 * Defines Progress Component instance. 1612 * 1613 * @syscap SystemCapability.ArkUI.ArkUI.Full 1614 * @form 1615 * @since 9 1616 */ 1617/** 1618 * Defines Progress Component instance. 1619 * 1620 * @syscap SystemCapability.ArkUI.ArkUI.Full 1621 * @crossplatform 1622 * @form 1623 * @since 10 1624 */ 1625/** 1626 * Defines Progress Component instance. 1627 * 1628 * @syscap SystemCapability.ArkUI.ArkUI.Full 1629 * @crossplatform 1630 * @form 1631 * @atomicservice 1632 * @since 11 1633 */ 1634declare const ProgressInstance: ProgressAttribute<keyof ProgressStyleMap>; 1635