1/* 2 * Copyright (c) 2022-2025 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/*** if arkts 1.2 */ 22import { ChildrenMainSize, CommonMethod } from './common'; 23import { CustomBuilder } from './builder' 24import { ComponentContent } from '../ComponentContent' 25import { ListDividerOptions } from './list'; 26/*** endif */ 27 28/** 29 * Defines the list item group style. 30 * 31 * @enum { number } 32 * @syscap SystemCapability.ArkUI.ArkUI.Full 33 * @since 10 34 */ 35/** 36 * Defines the list item group style. 37 * 38 * @enum { number } 39 * @syscap SystemCapability.ArkUI.ArkUI.Full 40 * @crossplatform 41 * @atomicservice 42 * @since arkts {'1.1':'11','1.2':'20'} 43 * @arkts 1.1&1.2 44 */ 45declare enum ListItemGroupStyle { 46 /** 47 * Show custom style. 48 * 49 * @syscap SystemCapability.ArkUI.ArkUI.Full 50 * @since 10 51 */ 52 /** 53 * Show custom style. 54 * 55 * @syscap SystemCapability.ArkUI.ArkUI.Full 56 * @crossplatform 57 * @atomicservice 58 * @since arkts {'1.1':'11','1.2':'20'} 59 * @arkts 1.1&1.2 60 */ 61 NONE = 0, 62 63 /** 64 * Show default style. 65 * 66 * @syscap SystemCapability.ArkUI.ArkUI.Full 67 * @since 10 68 */ 69 /** 70 * Show default style. 71 * 72 * @syscap SystemCapability.ArkUI.ArkUI.Full 73 * @crossplatform 74 * @atomicservice 75 * @since arkts {'1.1':'11','1.2':'20'} 76 * @arkts 1.1&1.2 77 */ 78 CARD = 1, 79} 80 81/** 82 * Defines the list item group options. 83 * 84 * @interface ListItemGroupOptions 85 * @syscap SystemCapability.ArkUI.ArkUI.Full 86 * @since 9 87 */ 88/** 89 * Defines the list item group options. 90 * 91 * @interface ListItemGroupOptions 92 * @syscap SystemCapability.ArkUI.ArkUI.Full 93 * @crossplatform 94 * @since 10 95 */ 96/** 97 * Defines the list item group options. 98 * 99 * @interface ListItemGroupOptions 100 * @syscap SystemCapability.ArkUI.ArkUI.Full 101 * @crossplatform 102 * @atomicservice 103 * @since arkts {'1.1':'11','1.2':'20'} 104 * @arkts 1.1&1.2 105 */ 106declare interface ListItemGroupOptions { 107 /** 108 * Describes the ListItemGroup header. 109 * 110 * @type { ?CustomBuilder } 111 * @syscap SystemCapability.ArkUI.ArkUI.Full 112 * @since 9 113 */ 114 /** 115 * Describes the ListItemGroup header. 116 * 117 * @type { ?CustomBuilder } 118 * @syscap SystemCapability.ArkUI.ArkUI.Full 119 * @crossplatform 120 * @since 10 121 */ 122 /** 123 * Describes the ListItemGroup header. 124 * 125 * @type { ?CustomBuilder } 126 * @syscap SystemCapability.ArkUI.ArkUI.Full 127 * @crossplatform 128 * @atomicservice 129 * @since arkts {'1.1':'11','1.2':'20'} 130 * @arkts 1.1&1.2 131 */ 132 header?: CustomBuilder; 133 134 /** 135 * Describes the ListItemGroup headerComponent. 136 * 137 * @type { ?ComponentContent } 138 * @syscap SystemCapability.ArkUI.ArkUI.Full 139 * @crossplatform 140 * @atomicservice 141 * @since arkts {'1.1':'13','1.2':'20'} 142 * @arkts 1.1&1.2 143 */ 144 headerComponent?: ComponentContent; 145 146 /** 147 * Describes the ListItemGroup footer. 148 * 149 * @type { ?CustomBuilder } 150 * @syscap SystemCapability.ArkUI.ArkUI.Full 151 * @since 9 152 */ 153 /** 154 * Describes the ListItemGroup footer. 155 * 156 * @type { ?CustomBuilder } 157 * @syscap SystemCapability.ArkUI.ArkUI.Full 158 * @crossplatform 159 * @since 10 160 */ 161 /** 162 * Describes the ListItemGroup footer. 163 * 164 * @type { ?CustomBuilder } 165 * @syscap SystemCapability.ArkUI.ArkUI.Full 166 * @crossplatform 167 * @atomicservice 168 * @since arkts {'1.1':'11','1.2':'20'} 169 * @arkts 1.1&1.2 170 */ 171 footer?: CustomBuilder; 172 173 /** 174 * Describes the ListItemGroup footerComponent. 175 * 176 * @type { ?ComponentContent } 177 * @syscap SystemCapability.ArkUI.ArkUI.Full 178 * @crossplatform 179 * @atomicservice 180 * @since arkts {'1.1':'13','1.2':'20'} 181 * @arkts 1.1&1.2 182 */ 183 footerComponent?: ComponentContent; 184 185 /** 186 * Describes the ListItemGroup space. 187 * 188 * @type { ?(number | string) } 189 * @syscap SystemCapability.ArkUI.ArkUI.Full 190 * @since 9 191 */ 192 /** 193 * Describes the ListItemGroup space. 194 * 195 * @type { ?(number | string) } 196 * @syscap SystemCapability.ArkUI.ArkUI.Full 197 * @crossplatform 198 * @since 10 199 */ 200 /** 201 * Describes the ListItemGroup space. 202 * 203 * @type { ?(number | string) } 204 * @syscap SystemCapability.ArkUI.ArkUI.Full 205 * @crossplatform 206 * @atomicservice 207 * @since arkts {'1.1':'11','1.2':'20'} 208 * @arkts 1.1&1.2 209 */ 210 space?: number | string; 211 212 /** 213 * Describes the ListItemGroup style. 214 * 215 * @type { ?ListItemGroupStyle } 216 * @syscap SystemCapability.ArkUI.ArkUI.Full 217 * @since 10 218 */ 219 /** 220 * Describes the ListItemGroup style. 221 * 222 * @type { ?ListItemGroupStyle } 223 * @syscap SystemCapability.ArkUI.ArkUI.Full 224 * @crossplatform 225 * @atomicservice 226 * @since arkts {'1.1':'11','1.2':'20'} 227 * @arkts 1.1&1.2 228 */ 229 style?: ListItemGroupStyle; 230} 231 232/** 233 * Defines the ListItemGroup component 234 * 235 * @interface ListItemGroupInterface 236 * @syscap SystemCapability.ArkUI.ArkUI.Full 237 * @since 9 238 */ 239/** 240 * Defines the ListItemGroup component 241 * 242 * @interface ListItemGroupInterface 243 * @syscap SystemCapability.ArkUI.ArkUI.Full 244 * @crossplatform 245 * @since 10 246 */ 247/** 248 * Defines the ListItemGroup component 249 * 250 * @interface ListItemGroupInterface 251 * @syscap SystemCapability.ArkUI.ArkUI.Full 252 * @crossplatform 253 * @atomicservice 254 * @since arkts {'1.1':'11','1.2':'20'} 255 * @arkts 1.1&1.2 256 */ 257interface ListItemGroupInterface { 258 /** 259 * Called when interface is called. 260 * 261 * @param { ListItemGroupOptions } options 262 * @returns { ListItemGroupAttribute } 263 * @syscap SystemCapability.ArkUI.ArkUI.Full 264 * @since 9 265 */ 266 /** 267 * Called when interface is called. 268 * 269 * @param { ListItemGroupOptions } options 270 * @returns { ListItemGroupAttribute } 271 * @syscap SystemCapability.ArkUI.ArkUI.Full 272 * @crossplatform 273 * @since 10 274 */ 275 /** 276 * Called when interface is called. 277 * 278 * @param { ListItemGroupOptions } options 279 * @returns { ListItemGroupAttribute } 280 * @syscap SystemCapability.ArkUI.ArkUI.Full 281 * @crossplatform 282 * @atomicservice 283 * @since arkts {'1.1':'11','1.2':'20'} 284 * @arkts 1.1&1.2 285 */ 286 (options?: ListItemGroupOptions): ListItemGroupAttribute; 287} 288 289/** 290 * Defines the item group attribute functions. 291 * 292 * @extends CommonMethod<ListItemGroupAttribute> 293 * @syscap SystemCapability.ArkUI.ArkUI.Full 294 * @since 9 295 */ 296/** 297 * Defines the item group attribute functions. 298 * 299 * @extends CommonMethod<ListItemGroupAttribute> 300 * @syscap SystemCapability.ArkUI.ArkUI.Full 301 * @crossplatform 302 * @since 10 303 */ 304/** 305 * Defines the item group attribute functions. 306 * 307 * @extends CommonMethod<ListItemGroupAttribute> 308 * @syscap SystemCapability.ArkUI.ArkUI.Full 309 * @crossplatform 310 * @atomicservice 311 * @since arkts {'1.1':'11','1.2':'20'} 312 * @arkts 1.1&1.2 313 */ 314declare class ListItemGroupAttribute extends CommonMethod<ListItemGroupAttribute> { 315 /** 316 * Called when the ListItemGroup split line style is set. 317 * 318 * @param { { 319 * strokeWidth: Length; 320 * color?: ResourceColor; 321 * startMargin?: Length; 322 * endMargin?: Length; 323 * } | null } value 324 * @returns { ListItemGroupAttribute } 325 * @syscap SystemCapability.ArkUI.ArkUI.Full 326 * @since 9 327 */ 328 /** 329 * Called when the ListItemGroup split line style is set. 330 * 331 * @param { { 332 * strokeWidth: Length; 333 * color?: ResourceColor; 334 * startMargin?: Length; 335 * endMargin?: Length; 336 * } | null } value 337 * @returns { ListItemGroupAttribute } 338 * @syscap SystemCapability.ArkUI.ArkUI.Full 339 * @crossplatform 340 * @since 10 341 */ 342 /** 343 * Called when the ListItemGroup split line style is set. 344 * 345 * @param { { 346 * strokeWidth: Length; 347 * color?: ResourceColor; 348 * startMargin?: Length; 349 * endMargin?: Length; 350 * } | null } value 351 * @returns { ListItemGroupAttribute } 352 * @syscap SystemCapability.ArkUI.ArkUI.Full 353 * @crossplatform 354 * @atomicservice 355 * @since 11 356 */ 357 /** 358 * Called when the ListItemGroup split line style is set. 359 * Anonymous Object Rectification. 360 * 361 * @param { ListDividerOptions | null } value 362 * @returns { ListItemGroupAttribute } 363 * @syscap SystemCapability.ArkUI.ArkUI.Full 364 * @crossplatform 365 * @atomicservice 366 * @since arkts {'1.1':'18','1.2':'20'} 367 * @arkts 1.1&1.2 368 */ 369 divider( 370 value: ListDividerOptions | null, 371 ): ListItemGroupAttribute; 372 373 /** 374 * Set children main size for ListItemGroup. 375 * 376 * @param { ChildrenMainSize } value - children main size for ListItemGroup 377 * @returns { ListItemGroupAttribute } the attribute of the ListItemGroup. 378 * @syscap SystemCapability.ArkUI.ArkUI.Full 379 * @crossplatform 380 * @atomicservice 381 * @since arkts {'1.1':'12','1.2':'20'} 382 * @arkts 1.1&1.2 383 */ 384 childrenMainSize(value: ChildrenMainSize): ListItemGroupAttribute; 385} 386 387/** 388 * Defines ListItemGroup Component instance. 389 * 390 * @syscap SystemCapability.ArkUI.ArkUI.Full 391 * @since 9 392 */ 393/** 394 * Defines ListItemGroup Component instance. 395 * 396 * @syscap SystemCapability.ArkUI.ArkUI.Full 397 * @crossplatform 398 * @since 10 399 */ 400/** 401 * Defines ListItemGroup Component instance. 402 * 403 * @syscap SystemCapability.ArkUI.ArkUI.Full 404 * @crossplatform 405 * @atomicservice 406 * @since 11 407 */ 408declare const ListItemGroupInstance: ListItemGroupAttribute; 409 410/** 411 * Defines ListItemGroup Component. 412 * 413 * @syscap SystemCapability.ArkUI.ArkUI.Full 414 * @since 9 415 */ 416/** 417 * Defines ListItemGroup Component. 418 * 419 * @syscap SystemCapability.ArkUI.ArkUI.Full 420 * @crossplatform 421 * @since 10 422 */ 423/** 424 * Defines ListItemGroup Component. 425 * 426 * @syscap SystemCapability.ArkUI.ArkUI.Full 427 * @crossplatform 428 * @atomicservice 429 * @since 11 430 */ 431declare const ListItemGroup: ListItemGroupInterface; 432