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 * CheckboxGroup SelectStatus 23 * 24 * @enum { number } 25 * @syscap SystemCapability.ArkUI.ArkUI.Full 26 * @since 8 27 */ 28/** 29 * CheckboxGroup SelectStatus 30 * 31 * @enum { number } 32 * @syscap SystemCapability.ArkUI.ArkUI.Full 33 * @form 34 * @since 9 35 */ 36/** 37 * CheckboxGroup SelectStatus 38 * 39 * @enum { number } 40 * @syscap SystemCapability.ArkUI.ArkUI.Full 41 * @crossplatform 42 * @form 43 * @since 10 44 */ 45/** 46 * CheckboxGroup SelectStatus 47 * 48 * @enum { number } 49 * @syscap SystemCapability.ArkUI.ArkUI.Full 50 * @crossplatform 51 * @form 52 * @atomicservice 53 * @since 11 54 */ 55declare enum SelectStatus { 56 /** 57 * All checkboxes are selected. 58 * 59 * @syscap SystemCapability.ArkUI.ArkUI.Full 60 * @since 8 61 */ 62 /** 63 * All checkboxes are selected. 64 * 65 * @syscap SystemCapability.ArkUI.ArkUI.Full 66 * @form 67 * @since 9 68 */ 69 /** 70 * All checkboxes are selected. 71 * 72 * @syscap SystemCapability.ArkUI.ArkUI.Full 73 * @crossplatform 74 * @form 75 * @since 10 76 */ 77 /** 78 * All checkboxes are selected. 79 * 80 * @syscap SystemCapability.ArkUI.ArkUI.Full 81 * @crossplatform 82 * @form 83 * @atomicservice 84 * @since 11 85 */ 86 All, 87 /** 88 * Part of the checkbox is selected. 89 * 90 * @syscap SystemCapability.ArkUI.ArkUI.Full 91 * @since 8 92 */ 93 /** 94 * Part of the checkbox is selected. 95 * 96 * @syscap SystemCapability.ArkUI.ArkUI.Full 97 * @form 98 * @since 9 99 */ 100 /** 101 * Part of the checkbox is selected. 102 * 103 * @syscap SystemCapability.ArkUI.ArkUI.Full 104 * @crossplatform 105 * @form 106 * @since 10 107 */ 108 /** 109 * Part of the checkbox is selected. 110 * 111 * @syscap SystemCapability.ArkUI.ArkUI.Full 112 * @crossplatform 113 * @form 114 * @atomicservice 115 * @since 11 116 */ 117 Part, 118 /** 119 * None of the checkbox is selected. 120 * 121 * @syscap SystemCapability.ArkUI.ArkUI.Full 122 * @since 8 123 */ 124 /** 125 * None of the checkbox is selected. 126 * 127 * @syscap SystemCapability.ArkUI.ArkUI.Full 128 * @form 129 * @since 9 130 */ 131 /** 132 * None of the checkbox is selected. 133 * 134 * @syscap SystemCapability.ArkUI.ArkUI.Full 135 * @crossplatform 136 * @form 137 * @since 10 138 */ 139 /** 140 * None of the checkbox is selected. 141 * 142 * @syscap SystemCapability.ArkUI.ArkUI.Full 143 * @crossplatform 144 * @form 145 * @atomicservice 146 * @since 11 147 */ 148 None, 149} 150 151/** 152 * Defines the options of CheckboxGroup. 153 * 154 * @interface CheckboxGroupOptions 155 * @syscap SystemCapability.ArkUI.ArkUI.Full 156 * @since 8 157 */ 158/** 159 * Defines the options of CheckboxGroup. 160 * 161 * @interface CheckboxGroupOptions 162 * @syscap SystemCapability.ArkUI.ArkUI.Full 163 * @form 164 * @since 9 165 */ 166/** 167 * Defines the options of CheckboxGroup. 168 * 169 * @interface CheckboxGroupOptions 170 * @syscap SystemCapability.ArkUI.ArkUI.Full 171 * @crossplatform 172 * @form 173 * @since 10 174 */ 175/** 176 * Defines the options of CheckboxGroup. 177 * 178 * @interface CheckboxGroupOptions 179 * @syscap SystemCapability.ArkUI.ArkUI.Full 180 * @crossplatform 181 * @form 182 * @atomicservice 183 * @since 11 184 */ 185declare interface CheckboxGroupOptions { 186 /** 187 * Setting the group of CheckboxGroup. 188 * 189 * @type { ?string } 190 * @syscap SystemCapability.ArkUI.ArkUI.Full 191 * @since 8 192 */ 193 /** 194 * Setting the group of CheckboxGroup. 195 * 196 * @type { ?string } 197 * @syscap SystemCapability.ArkUI.ArkUI.Full 198 * @form 199 * @since 9 200 */ 201 /** 202 * Setting the group of CheckboxGroup. 203 * 204 * @type { ?string } 205 * @syscap SystemCapability.ArkUI.ArkUI.Full 206 * @crossplatform 207 * @form 208 * @since 10 209 */ 210 /** 211 * Setting the group of CheckboxGroup. 212 * 213 * @type { ?string } 214 * @syscap SystemCapability.ArkUI.ArkUI.Full 215 * @crossplatform 216 * @form 217 * @atomicservice 218 * @since 11 219 */ 220 group?: string; 221} 222 223/** 224 * Defines the options of CheckboxGroupResult. 225 * 226 * @interface CheckboxGroupResult 227 * @syscap SystemCapability.ArkUI.ArkUI.Full 228 * @since 8 229 */ 230/** 231 * Defines the options of CheckboxGroupResult. 232 * 233 * @interface CheckboxGroupResult 234 * @syscap SystemCapability.ArkUI.ArkUI.Full 235 * @form 236 * @since 9 237 */ 238/** 239 * Defines the options of CheckboxGroupResult. 240 * 241 * @interface CheckboxGroupResult 242 * @syscap SystemCapability.ArkUI.ArkUI.Full 243 * @crossplatform 244 * @form 245 * @since 10 246 */ 247/** 248 * Defines the options of CheckboxGroupResult. 249 * 250 * @interface CheckboxGroupResult 251 * @syscap SystemCapability.ArkUI.ArkUI.Full 252 * @crossplatform 253 * @form 254 * @atomicservice 255 * @since 11 256 */ 257declare interface CheckboxGroupResult { 258 /** 259 * Checkbox name. 260 * 261 * @type { Array<string> } 262 * @syscap SystemCapability.ArkUI.ArkUI.Full 263 * @since 8 264 */ 265 /** 266 * Checkbox name. 267 * 268 * @type { Array<string> } 269 * @syscap SystemCapability.ArkUI.ArkUI.Full 270 * @form 271 * @since 9 272 */ 273 /** 274 * Checkbox name. 275 * 276 * @type { Array<string> } 277 * @syscap SystemCapability.ArkUI.ArkUI.Full 278 * @crossplatform 279 * @form 280 * @since 10 281 */ 282 /** 283 * Checkbox name. 284 * 285 * @type { Array<string> } 286 * @syscap SystemCapability.ArkUI.ArkUI.Full 287 * @crossplatform 288 * @form 289 * @atomicservice 290 * @since 11 291 */ 292 name: Array<string>; 293 /** 294 * Set the group of status. 295 * 296 * @type { SelectStatus } 297 * @syscap SystemCapability.ArkUI.ArkUI.Full 298 * @since 8 299 */ 300 /** 301 * Set the group of status. 302 * 303 * @type { SelectStatus } 304 * @syscap SystemCapability.ArkUI.ArkUI.Full 305 * @form 306 * @since 9 307 */ 308 /** 309 * Set the group of status. 310 * 311 * @type { SelectStatus } 312 * @syscap SystemCapability.ArkUI.ArkUI.Full 313 * @crossplatform 314 * @form 315 * @since 10 316 */ 317 /** 318 * Set the group of status. 319 * 320 * @type { SelectStatus } 321 * @syscap SystemCapability.ArkUI.ArkUI.Full 322 * @crossplatform 323 * @form 324 * @atomicservice 325 * @since 11 326 */ 327 status: SelectStatus; 328} 329 330/** 331 * Provides an interface for the CheckboxGroup component. 332 * 333 * @interface CheckboxGroupInterface 334 * @syscap SystemCapability.ArkUI.ArkUI.Full 335 * @since 8 336 */ 337/** 338 * Provides an interface for the CheckboxGroup component. 339 * 340 * @interface CheckboxGroupInterface 341 * @syscap SystemCapability.ArkUI.ArkUI.Full 342 * @form 343 * @since 9 344 */ 345/** 346 * Provides an interface for the CheckboxGroup component. 347 * 348 * @interface CheckboxGroupInterface 349 * @syscap SystemCapability.ArkUI.ArkUI.Full 350 * @crossplatform 351 * @form 352 * @since 10 353 */ 354/** 355 * Provides an interface for the CheckboxGroup component. 356 * 357 * @interface CheckboxGroupInterface 358 * @syscap SystemCapability.ArkUI.ArkUI.Full 359 * @crossplatform 360 * @form 361 * @atomicservice 362 * @since 11 363 */ 364interface CheckboxGroupInterface { 365 /** 366 * Called when the CheckboxGroup component is used. 367 * 368 * @param { CheckboxGroupOptions } options 369 * @returns { CheckboxGroupAttribute } 370 * @syscap SystemCapability.ArkUI.ArkUI.Full 371 * @since 8 372 */ 373 /** 374 * Called when the CheckboxGroup component is used. 375 * 376 * @param { CheckboxGroupOptions } options 377 * @returns { CheckboxGroupAttribute } 378 * @syscap SystemCapability.ArkUI.ArkUI.Full 379 * @form 380 * @since 9 381 */ 382 /** 383 * Called when the CheckboxGroup component is used. 384 * 385 * @param { CheckboxGroupOptions } options 386 * @returns { CheckboxGroupAttribute } 387 * @syscap SystemCapability.ArkUI.ArkUI.Full 388 * @crossplatform 389 * @form 390 * @since 10 391 */ 392 /** 393 * Called when the CheckboxGroup component is used. 394 * 395 * @param { CheckboxGroupOptions } options 396 * @returns { CheckboxGroupAttribute } 397 * @syscap SystemCapability.ArkUI.ArkUI.Full 398 * @crossplatform 399 * @form 400 * @atomicservice 401 * @since 11 402 */ 403 (options?: CheckboxGroupOptions): CheckboxGroupAttribute; 404} 405 406/** 407 * Defines the attribute functions of CheckboxGroup. 408 * 409 * @extends CommonMethod<CheckboxGroupAttribute> 410 * @syscap SystemCapability.ArkUI.ArkUI.Full 411 * @since 8 412 */ 413/** 414 * Defines the attribute functions of CheckboxGroup. 415 * 416 * @extends CommonMethod<CheckboxGroupAttribute> 417 * @syscap SystemCapability.ArkUI.ArkUI.Full 418 * @form 419 * @since 9 420 */ 421/** 422 * Defines the attribute functions of CheckboxGroup. 423 * 424 * @extends CommonMethod<CheckboxGroupAttribute> 425 * @syscap SystemCapability.ArkUI.ArkUI.Full 426 * @crossplatform 427 * @form 428 * @since 10 429 */ 430/** 431 * Defines the attribute functions of CheckboxGroup. 432 * 433 * @extends CommonMethod<CheckboxGroupAttribute> 434 * @syscap SystemCapability.ArkUI.ArkUI.Full 435 * @crossplatform 436 * @form 437 * @atomicservice 438 * @since 11 439 */ 440declare class CheckboxGroupAttribute extends CommonMethod<CheckboxGroupAttribute> { 441 /** 442 * setting whether all checkbox is selected. 443 * 444 * @param { boolean } value 445 * @returns { CheckboxGroupAttribute } 446 * @syscap SystemCapability.ArkUI.ArkUI.Full 447 * @since 8 448 */ 449 /** 450 * setting whether all checkbox is selected. 451 * 452 * @param { boolean } value 453 * @returns { CheckboxGroupAttribute } 454 * @syscap SystemCapability.ArkUI.ArkUI.Full 455 * @form 456 * @since 9 457 */ 458 /** 459 * setting whether all checkbox is selected. 460 * 461 * @param { boolean } value 462 * @returns { CheckboxGroupAttribute } 463 * @syscap SystemCapability.ArkUI.ArkUI.Full 464 * @crossplatform 465 * @form 466 * @since 10 467 */ 468 /** 469 * setting whether all checkbox is selected. 470 * 471 * @param { boolean } value 472 * @returns { CheckboxGroupAttribute } 473 * @syscap SystemCapability.ArkUI.ArkUI.Full 474 * @crossplatform 475 * @form 476 * @atomicservice 477 * @since 11 478 */ 479 selectAll(value: boolean): CheckboxGroupAttribute; 480 481 /** 482 * setting the display color of checkbox. 483 * 484 * @param { ResourceColor } value 485 * @returns { CheckboxGroupAttribute } 486 * @syscap SystemCapability.ArkUI.ArkUI.Full 487 * @since 8 488 */ 489 /** 490 * setting the display color of checkbox. 491 * 492 * @param { ResourceColor } value 493 * @returns { CheckboxGroupAttribute } 494 * @syscap SystemCapability.ArkUI.ArkUI.Full 495 * @form 496 * @since 9 497 */ 498 /** 499 * setting the display color of checkbox. 500 * 501 * @param { ResourceColor } value 502 * @returns { CheckboxGroupAttribute } 503 * @syscap SystemCapability.ArkUI.ArkUI.Full 504 * @crossplatform 505 * @form 506 * @since 10 507 */ 508 /** 509 * setting the display color of checkbox. 510 * 511 * @param { ResourceColor } value 512 * @returns { CheckboxGroupAttribute } 513 * @syscap SystemCapability.ArkUI.ArkUI.Full 514 * @crossplatform 515 * @form 516 * @atomicservice 517 * @since 11 518 */ 519 selectedColor(value: ResourceColor): CheckboxGroupAttribute; 520 521 /** 522 * Set the display border color of unselected checkbox. 523 * 524 * @param { ResourceColor } value - The color of border when checkboxgroup unselected. 525 * @returns { CheckboxGroupAttribute } 526 * @syscap SystemCapability.ArkUI.ArkUI.Full 527 * @crossplatform 528 * @since 10 529 */ 530 /** 531 * Set the display border color of unselected checkbox. 532 * 533 * @param { ResourceColor } value - The color of border when checkboxgroup unselected. 534 * @returns { CheckboxGroupAttribute } 535 * @syscap SystemCapability.ArkUI.ArkUI.Full 536 * @crossplatform 537 * @atomicservice 538 * @since 11 539 */ 540 unselectedColor(value: ResourceColor): CheckboxGroupAttribute; 541 542 /** 543 * Set the mark style of checkbox. 544 * 545 * @param { MarkStyle } value - The style configuration of checkboxgroup mark. 546 * @returns { CheckboxGroupAttribute } 547 * @syscap SystemCapability.ArkUI.ArkUI.Full 548 * @crossplatform 549 * @since 10 550 */ 551 /** 552 * Set the mark style of checkbox. 553 * 554 * @param { MarkStyle } value - The style configuration of checkboxgroup mark. 555 * @returns { CheckboxGroupAttribute } 556 * @syscap SystemCapability.ArkUI.ArkUI.Full 557 * @crossplatform 558 * @atomicservice 559 * @since 11 560 */ 561 mark(value: MarkStyle): CheckboxGroupAttribute; 562 563 /** 564 * Called when the selection status changes. 565 * 566 * @param { function } callback 567 * @returns { CheckboxGroupAttribute } 568 * @syscap SystemCapability.ArkUI.ArkUI.Full 569 * @since 8 570 */ 571 /** 572 * Called when the selection status changes. 573 * 574 * @param { function } callback 575 * @returns { CheckboxGroupAttribute } 576 * @syscap SystemCapability.ArkUI.ArkUI.Full 577 * @form 578 * @since 9 579 */ 580 /** 581 * Called when the selection status changes. 582 * 583 * @param { function } callback 584 * @returns { CheckboxGroupAttribute } 585 * @syscap SystemCapability.ArkUI.ArkUI.Full 586 * @crossplatform 587 * @form 588 * @since 10 589 */ 590 /** 591 * Called when the selection status changes. 592 * 593 * @param { function } callback 594 * @returns { CheckboxGroupAttribute } 595 * @syscap SystemCapability.ArkUI.ArkUI.Full 596 * @crossplatform 597 * @form 598 * @atomicservice 599 * @since 11 600 */ 601 onChange(callback: (event: CheckboxGroupResult) => void): CheckboxGroupAttribute; 602 603 /** 604 * Setting the shape of checkbox group. 605 * 606 * @param { CheckBoxShape } value - The configuration of checkbox group shape. 607 * @returns { CheckboxGroupAttribute } 608 * @syscap SystemCapability.ArkUI.ArkUI.Full 609 * @crossplatform 610 * @form 611 * @atomicservice 612 * @since 12 613 */ 614 checkboxShape(value: CheckBoxShape): CheckboxGroupAttribute; 615} 616 617/** 618 * Defines CheckboxGroup Component. 619 * 620 * @syscap SystemCapability.ArkUI.ArkUI.Full 621 * @since 8 622 */ 623/** 624 * Defines CheckboxGroup Component. 625 * 626 * @syscap SystemCapability.ArkUI.ArkUI.Full 627 * @form 628 * @since 9 629 */ 630/** 631 * Defines CheckboxGroup Component. 632 * 633 * @syscap SystemCapability.ArkUI.ArkUI.Full 634 * @crossplatform 635 * @form 636 * @since 10 637 */ 638/** 639 * Defines CheckboxGroup Component. 640 * 641 * @syscap SystemCapability.ArkUI.ArkUI.Full 642 * @crossplatform 643 * @form 644 * @atomicservice 645 * @since 11 646 */ 647declare const CheckboxGroup: CheckboxGroupInterface; 648 649/** 650 * Defines CheckboxGroup Component instance. 651 * 652 * @syscap SystemCapability.ArkUI.ArkUI.Full 653 * @since 8 654 */ 655/** 656 * Defines CheckboxGroup Component instance. 657 * 658 * @syscap SystemCapability.ArkUI.ArkUI.Full 659 * @form 660 * @since 9 661 */ 662/** 663 * Defines CheckboxGroup Component instance. 664 * 665 * @syscap SystemCapability.ArkUI.ArkUI.Full 666 * @crossplatform 667 * @form 668 * @since 10 669 */ 670/** 671 * Defines CheckboxGroup Component instance. 672 * 673 * @syscap SystemCapability.ArkUI.ArkUI.Full 674 * @crossplatform 675 * @form 676 * @atomicservice 677 * @since 11 678 */ 679declare const CheckboxGroupInstance: CheckboxGroupAttribute; 680