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 * Input parameter for creating a radio box. 18 * @since 8 19 */ 20/** 21 * Input parameter for creating a radio box. 22 * @form 23 * @since 9 24 */ 25declare interface RadioOptions { 26 /** 27 * Radio group name. 28 * @since 8 29 */ 30 /** 31 * Radio group name. 32 * @form 33 * @since 9 34 */ 35 group: string; 36 37 /** 38 * Radio name. 39 * @since 8 40 */ 41 /** 42 * Radio name. 43 * @form 44 * @since 9 45 */ 46 value: string; 47} 48 49/** 50 * Provides an interface for creating a radio box. 51 * @since 8 52 */ 53/** 54 * Provides an interface for creating a radio box. 55 * @form 56 * @since 9 57 */ 58interface RadioInterface { 59 /** 60 * Called when a radio box is created. 61 * @since 8 62 */ 63 /** 64 * Called when a radio box is created. 65 * @form 66 * @since 9 67 */ 68 (options: RadioOptions): RadioAttribute; 69} 70 71/** 72 * @since 8 73 */ 74/** 75 * @form 76 * @since 9 77 */ 78declare class RadioAttribute extends CommonMethod<RadioAttribute> { 79 /** 80 * Called when the radio box is selected. 81 * @since 8 82 */ 83 /** 84 * Called when the radio box is selected. 85 * @form 86 * @since 9 87 */ 88 checked(value: boolean): RadioAttribute; 89 90 /** 91 * Called when the radio box selection status changes. 92 * @since 8 93 */ 94 /** 95 * Called when the radio box selection status changes. 96 * @form 97 * @since 9 98 */ 99 onChange(callback: (isChecked: boolean) => void): RadioAttribute; 100} 101 102/** 103 * Defines Radio Component. 104 * @since 8 105 */ 106/** 107 * Defines Radio Component. 108 * @form 109 * @since 9 110 */ 111declare const Radio: RadioInterface; 112 113/** 114 * Defines Radio Component instance. 115 * @since 8 116 */ 117/** 118 * Defines Radio Component instance. 119 * @form 120 * @since 9 121 */ 122declare const RadioInstance: RadioAttribute; 123