diff --git a/api/@ohos.arkui.advanced.DialogV2.static.d.ets b/api/@ohos.arkui.advanced.DialogV2.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..402cb09ad108c932075aeb031e4744f7e22ff050 --- /dev/null +++ b/api/@ohos.arkui.advanced.DialogV2.static.d.ets @@ -0,0 +1,714 @@ +'use static' +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"), + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * @kit ArkUI + * @arkts 1.2 + */ +import { ComponentV2 } from './arkui/component/customComponent'; +import { ResourceStr, ResourceColor, LocalizedPadding, SizeOptions } from './arkui/component/units'; +import { ButtonStyleMode, ButtonRole } from './arkui/component/button'; +import { PixelMap, ThemeColorMode, CustomPopupOptions } from './arkui/component/common'; +import { Local, Param, ObservedV2, Require, Trace, Event } from './arkui/stateManagement/decorator'; +import { BuilderParam, Builder, CustomBuilder } from './arkui/component/builder'; +import { LengthMetrics, ColorMetrics } from './arkui/Graphics'; +import { SheetInfo } from './arkui/component/actionSheet'; +/** + * Declare the action when the button of dialog is clicked. + * + * @typedef { function } AdvancedDialogV2ButtonAction + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare type AdvancedDialogV2ButtonAction = () => void; +/** + * Declare AdvancedDialogV2Button. + * + * @class AdvancedDialogV2Button + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@ObservedV2 +export declare class AdvancedDialogV2Button { + /** + * Sets the Display Content of a Button. + * + * @type { ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace + content: ResourceStr; + /** + * Sets the Button Callback. + * + * @type { ?AdvancedDialogV2ButtonAction } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace + action?: AdvancedDialogV2ButtonAction; + /** + * Sets the background color of a button. + * + * @type { ?ColorMetrics } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace + background?: ColorMetrics; + /** + * Sets the Button Text Color. + * + * @type { ?ColorMetrics } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace + fontColor?: ColorMetrics; + /** + * Describes the Button style. + * + * @type { ?ButtonStyleMode } + * @default ButtonStyleMode.TEXTUAL + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace + buttonStyle?: ButtonStyleMode; + /** + * Describes the Button role. + * + * @type { ?ButtonRole } + * @default ButtonRole.NORMAL + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace + role?: ButtonRole; + /** + * Set the default focus of a button. + * + * @type { ?boolean } + * @default { false } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace + defaultFocus?: boolean; + /** + * Set the availability of the button. + * + * @type { ?boolean } + * @default { true } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace + enabled?: boolean; + /** + * The constructor used to create a AdvancedDialogV2Button object. + * + * @param { AdvancedDialogV2ButtonOptions } options - button info. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + constructor(options: AdvancedDialogV2ButtonOptions); +} +/** + * Declare the options of AdvancedDialogV2Button + * + * @interface AdvancedDialogV2ButtonOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare interface AdvancedDialogV2ButtonOptions { + /** + * Sets the Display Content of a Button. + * + * @type { ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + content: ResourceStr; + /** + * Sets the Button Callback. + * + * @type { ?AdvancedDialogV2ButtonAction } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + action?: AdvancedDialogV2ButtonAction; + /** + * Sets the background color of a button. + * + * @type { ?ColorMetrics } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + background?: ColorMetrics; + /** + * Sets the Button Text Color. + * + * @type { ?ColorMetrics } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontColor?: ColorMetrics; + /** + * Describes the Button style. + * + * @type { ?ButtonStyleMode } + * @default ButtonStyleMode.TEXTUAL + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + buttonStyle?: ButtonStyleMode; + /** + * Describes the Button role. + * + * @type { ?ButtonRole } + * @default ButtonRole.NORMAL + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + role?: ButtonRole; + /** + * Set the default focus of a button. + * + * @type { ?boolean } + * @default { false } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + defaultFocus?: boolean; + /** + * Set the availability of the button. + * + * @type { ?boolean } + * @default { true } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + enabled?: boolean; +} +/** + * Declare the callback when the checkbox of dialog is changed. + * + * @typedef { function } AdvancedDialogV2OnCheckedChange + * @param { boolean } checked - Checkbox status. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare type AdvancedDialogV2OnCheckedChange = (checked: boolean) => void; +/** + * Declare CustomDialog TipsDialogV2 + * + * @struct { TipsDialogV2 } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@ComponentV2 +export declare struct TipsDialogV2 { + /** + * Sets the TipsDialogV2 imageRes. + * + * @type { ResourceStr | PixelMap } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Require + @Param + imageRes: ResourceStr | PixelMap; + /** + * Sets the TipsDialogV2 image size. + * + * @type { ?SizeOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + imageSize?: SizeOptions; + /** + * Sets the borderColor of TipsDialogV2 image. + * + * @type { ?ColorMetrics } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + imageBorderColor?: ColorMetrics; + /** + * Sets the borderWidth of TipsDialogV2 image. + * + * @type { ?LengthMetrics } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + imageBorderWidth?: LengthMetrics; + /** + * Sets the TipsDialogV2 title. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + title?: ResourceStr; + /** + * Sets the TipsDialogV2 content. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + content?: ResourceStr; + /** + * Sets the TipsDialogV2 checkbox tips. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + checkTips?: ResourceStr; + /** + * Sets the TipsDialogV2 checkbox check state. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + checked?: boolean; + /** + * Sets the TipsDialogV2 primary button. + * + * @type { ?AdvancedDialogV2Button } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + primaryButton?: AdvancedDialogV2Button; + /** + * Sets the TipsDialogV2 secondary button. + * + * @type { ?AdvancedDialogV2Button } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + secondaryButton?: AdvancedDialogV2Button; + /** + * Sets the TipsDialogV2 CheckBox Callback. + * @type { ?AdvancedDialogV2OnCheckedChange } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + onCheckedChange?: AdvancedDialogV2OnCheckedChange; + /** + * The method to build component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Builder + build(): void; +} +/** + * Declare CustomDialog SelectDialogV2 + * + * @struct { SelectDialogV2 } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@ComponentV2 +export declare struct SelectDialogV2 { + /** + * Sets the SelectDialogV2 title. + * + * @type { ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Require + @Param + title: ResourceStr; + /** + * Sets the SelectDialogV2 content. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + content?: ResourceStr; + /** + * Sets the SelectDialogV2 selected index. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + selectedIndex?: number; + /** + * Sets the SelectDialogV2 confirm button. + * + * @type { ?AdvancedDialogV2Button } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + confirm?: AdvancedDialogV2Button; + /** + * Sets the SelectDialog sheets. + * @type { SheetInfo[] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Require + @Param + radioContent: SheetInfo[]; + /** + * The method to build component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Builder + build(): void; +} +/** + * Declare CustomDialog ConfirmDialogV2 + * + * @struct { ConfirmDialogV2 } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@ComponentV2 +export declare struct ConfirmDialogV2 { + /** + * Sets the ConfirmDialogV2 title. + * + * @type { ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Require + @Param + title: ResourceStr; + /** + * Sets the ConfirmDialogV2 content. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + content?: ResourceStr; + /** + * Sets the ConfirmDialogV2 checkbox tips. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + checkTips?: ResourceStr; + /** + * Sets the ConfirmDialogV2 checkbox state. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + checked?: boolean; + /** + * Sets the ConfirmDialogV2 primary button. + * + * @type { ?AdvancedDialogV2Button } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + primaryButton?: AdvancedDialogV2Button; + /** + * Sets the ConfirmDialogV2 secondary button. + * + * @type { ?AdvancedDialogV2Button } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + secondaryButton?: AdvancedDialogV2Button; + /** + * Sets the ConfirmDialogV2 CheckBox Callback. + * + * @type { ?AdvancedDialogV2OnCheckedChange } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + onCheckedChange?: AdvancedDialogV2OnCheckedChange; + /** + * The method to build component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Builder + build(): void; +} +/** + * Declare CustomDialog AlertDialogV2. + * + * @struct { AlertDialogV2 } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@ComponentV2 +export declare struct AlertDialogV2 { + /** + * Sets the AlertDialogV2 title. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + primaryTitle?: ResourceStr; + /** + * Sets the AlertDialogV2 secondary title. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + secondaryTitle?: ResourceStr; + /** + * Sets the AlertDialogV2 content. + * + * @type { ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Require + @Param + content: ResourceStr; + /** + * Sets the AlertDialogV2 primary button. + * + * @type { ?AdvancedDialogV2Button } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + primaryButton?: AdvancedDialogV2Button; + /** + * Sets the AlertDialogV2 secondary button. + * + * @type { ?AdvancedDialogV2Button } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + secondaryButton?: AdvancedDialogV2Button; + /** + * The method to build component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Builder + build(): void; +} +/** + * Declare CustomDialog LoadingDialogV2 + * + * @struct { LoadingDialogV2 } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@ComponentV2 +export declare struct LoadingDialogV2 { + /** + * Sets the LoadingDialogV2 content. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + content?: ResourceStr; + /** + * The method to build component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Builder + build(): void; +} +/** + * Declare custom content dialog + * + * @struct { CustomContentDialogV2 } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@ComponentV2 +export declare struct CustomContentDialogV2 { + /** + * Sets the CustomContentDialogV2 title. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + primaryTitle?: ResourceStr; + /** + * Sets the CustomContentDialogV2 secondary title. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + secondaryTitle?: ResourceStr; + /** + * Sets the CustomContentDialogV2 content. + * + * @type { CustomBuilder } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @BuilderParam + contentBuilder: CustomBuilder; + /** + * Sets the CustomContentDialogV2 content area padding. + * + * @type { ?LocalizedPadding } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + contentAreaPadding?: LocalizedPadding; + /** + * Sets the CustomContentDialogV2 buttons. + * @type { ?AdvancedDialogV2Button[] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + buttons?: AdvancedDialogV2Button[]; + /** + * The method to build component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Builder + build(): void; +} +/** + * Declare struct PopoverDialogV2 + * + * @struct { PopoverDialogV2 } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@ComponentV2 +export declare struct PopoverDialogV2 { + /** + * Sets the PopoverDialogV2 Visible Status. + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Require + @Param + visible: boolean; + /** + * Sets the callback when visibility changed. + * + * @type { ?PopoverDialogV2OnVisibleChange } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Event + $visible?: PopoverDialogV2OnVisibleChange; + /** + * Sets the PopoverDialogV2 options. + * + * @type { PopoverDialogV2Options } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Require + @Param + popover: PopoverDialogV2Options; + /** + * Sets the targetBuilder content. + * + * @type { CustomBuilder } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @BuilderParam + targetBuilder: CustomBuilder; + /** + * The method to build component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Builder + build(): void; +} +/** + * Declare the callback when the visibility of PopoverDialogV2 is changed. + * + * @typedef { function } PopoverDialogV2OnVisibleChange + * @param { boolean } visible - The visibility of PopoverDialogV2. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare type PopoverDialogV2OnVisibleChange = (visible: boolean) => void; +/** + * Defines PopoverDialogV2 Options + * + * @extends CustomPopupOptions + * @interface PopoverDialogV2Options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare interface PopoverDialogV2Options extends CustomPopupOptions { +} diff --git a/api/@ohos.arkui.advanced.ProgressButtonV2.static.d.ets b/api/@ohos.arkui.advanced.ProgressButtonV2.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..6a95512b3871683ef31d4e83a16fa23f30715ffb --- /dev/null +++ b/api/@ohos.arkui.advanced.ProgressButtonV2.static.d.ets @@ -0,0 +1,217 @@ +'use static' +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"), + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * @kit ArkUI + * @arkts 1.2 + */ +import { ComponentV2 } from './arkui/component/customComponent'; +import { Require, Param, Once, Trace, ObservedV2 } from './arkui/stateManagement/decorator'; +import { ResourceStr } from './arkui/component/units'; +import { Builder } from './arkui/component/builder'; +import { LengthMetrics, ColorMetrics } from './arkui/Graphics'; +/** + * Declare Component ProgressButtonV2 + * @struct { ProgressButtonV2 } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@ComponentV2 +export declare struct ProgressButtonV2 { + /** + * Sets the ProgressButtonV2 progress. + * + * @type { number } + * @readonly + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Require + @Param + readonly progress: number; + /** + * Sets the ProgressButtonV2 content. + * + * @type { ResourceStr } + * @readonly + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Require + @Param + readonly content: ResourceStr; + /** + * Sets the ProgressButtonV2 progressButtonWidth. + * + * @type { ?LengthMetrics } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + @Once + progressButtonWidth?: LengthMetrics; + /** + * Sets the ProgressButtonV2 onClicked. + * + * @type { ClickCallback } + * @readonly + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + readonly onClicked: ClickCallback; + /** + * Sets the ProgressButtonV2 isEnabled state. + * + * @type { boolean } + * @readonly + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + readonly isEnabled: boolean; + /** + * Set Color options of the ProgressButtonV2. + * + * @type { ?ProgressButtonV2Color } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + colorOptions?: ProgressButtonV2Color; + /** + * Set border rounded corner radius of progress. + * + * @type { ?LengthMetrics } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + progressButtonRadius?: LengthMetrics; + /** + * The method to build component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Builder + build(): void; +} +/** + * Declare ProgressButtonV2 Color. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@ObservedV2 +export declare class ProgressButtonV2Color { + /** + * Set progress color of the ProgressButtonV2. + * + * @type { ?ColorMetrics } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace + progressColor?: ColorMetrics; + /** + * Set border color of the ProgressButtonV2. + * + * @type { ?ColorMetrics } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace + borderColor?: ColorMetrics; + /** + * Set text color of the ProgressButtonV2. + * + * @type { ?ColorMetrics } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace + textColor?: ColorMetrics; + /** + * Set background color of the ProgressButtonV2. + * + * @type { ?ColorMetrics } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace + backgroundColor?: ColorMetrics; + /** + * The constructor of ProgressButtonV2 + * + * @param { ProgressButtonV2ColorOptions } options - the options of the ProgressButtonV2 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + constructor(options: ProgressButtonV2ColorOptions); +} +/** + * Defines ClickCallback of the ProgressButtonV2. + * @typedef { function } ClickCallback + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export type ClickCallback = () => void; +/** + * Declare Color options interface of the ProgressButtonV2. + * @typedef ProgressButtonV2ColorOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare interface ProgressButtonV2ColorOptions { + /** + * Set progress color of the ProgressButtonV2. + * + * @type { ?ColorMetrics } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + progressColor?: ColorMetrics; + /** + * Set border color of the ProgressButtonV2. + * + * @type { ?ColorMetrics } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + borderColor?: ColorMetrics; + /** + * Set text color of the ProgressButtonV2. + * + * @type { ?ColorMetrics } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + textColor?: ColorMetrics; + /** + * Set background color of the ProgressButtonV2. + * + * @type { ?ColorMetrics } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + backgroundColor?: ColorMetrics; +} diff --git a/api/@ohos.arkui.advanced.SelectTitleBar.static.d.ets b/api/@ohos.arkui.advanced.SelectTitleBar.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..03cd121589f4127181dbaf02abcce2e8b6d1bb8f --- /dev/null +++ b/api/@ohos.arkui.advanced.SelectTitleBar.static.d.ets @@ -0,0 +1,184 @@ +'use static' +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"), + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * @kit ArkUI + * @arkts 1.2 + */ +import { ResourceStr } from './arkui/component/units'; +import { Component } from './arkui/component/customComponent'; +import { SymbolGlyphModifier } from './arkui/SymbolGlyphModifier'; +import { SelectOption } from './arkui/component/select'; +import { Builder } from './arkui/component/builder'; +import { PropRef } from './arkui/stateManagement/decorator'; +/** + * Declaration of the menu item on the right side. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare class SelectTitleBarMenuItem { + /** + * Icon resource for this menu item. + * + * @type { ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + value: ResourceStr; + /** + * Symbol resource for this menu item. + * + * @type { ?SymbolGlyphModifier }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + symbolStyle?: SymbolGlyphModifier; + /** + * Icon label for this menu item. + * + * @type { ?ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + label?: ResourceStr; + /** + * Whether to enable this menu item. + * + * @type { ?boolean }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + isEnabled?: boolean; + /** + * Callback function when click on this menu item. + * + * @type { ?function }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + action?: () => void; + /** + * The accessibilityText of this menu item. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + accessibilityText?: ResourceStr; + /** + * The accessibilityDescription of this menu item. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + accessibilityDescription?: ResourceStr; + /** + * The accessibilityLevel of this menu item. + * + * @type { ?string } + * @default "auto" + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + accessibilityLevel?: string; +} +/** + * Callback method when an option is selected. + * @typedef { function } OnSelectedCallback + * @param { number } index -the result of option. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +declare type OnSelectedCallback = (index: number) => void; +/** + * Declaration of the selectable title bar. + * @struct { SelectTitleBar } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@Component +export declare struct SelectTitleBar { + /** + * Selected index of the initial options in the drop-down menu. The index of the first item is 0. + * If this attribute is not set, the default value is -1. Which means, no menu item is selected. + * + * @type { number }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @PropRef + selected: number; + /** + * Options inside the drop-down list. + * + * @type { Array }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + options: Array; + /** + * Menu items on the right side. + * + * @type { ?Array }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + menuItems?: Array; + /** + * Sub-title of this title bar. + * + * @type { ?ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + subtitle?: ResourceStr; + /** + * The number displayed in a badge. + * + * @type { ?number }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + badgeValue?: number; + /** + * Whether to hide the back arrow at the left side. + * + * @type { ?boolean }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + hidesBackButton?: boolean; + /** + * Callback function when an option is selected + * + * @type { ?OnSelectedCallback }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onSelected?: OnSelectedCallback; + /** + * The method to build component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Builder build(): void; +} diff --git a/api/@ohos.arkui.advanced.SubHeaderV2.static.d.ets b/api/@ohos.arkui.advanced.SubHeaderV2.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..774c90c1712434737baaa7a18c1c59ba1b3597aa --- /dev/null +++ b/api/@ohos.arkui.advanced.SubHeaderV2.static.d.ets @@ -0,0 +1,548 @@ +'use static' +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"), + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * @kit ArkUI + * @arkts 1.2 + */ +import { TextModifier } from './arkui/TextModifier'; +import { ResourceStr } from './arkui/component/units'; +import { SymbolGlyphModifier } from './arkui/SymbolGlyphModifier'; +import { SelectOption } from './arkui/component/select'; +import { ObservedV2, Trace, Param } from './arkui/stateManagement/decorator'; +import { ComponentV2 } from './arkui/component/customComponent'; +import { BuilderParam, Builder } from './arkui/component/builder'; +/** + * SubHeaderV2IconType + * + * @typedef { ResourceStr | SymbolGlyphModifier } SubHeaderV2IconType + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +declare type SubHeaderV2IconType = ResourceStr | SymbolGlyphModifier; +/** + * Defines the SubHeaderV2TitleOptions. + * + * @interface SubHeaderV2TitleOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export interface SubHeaderV2TitleOptions { + /** + * The first line text of content area. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + primaryTitle?: ResourceStr; + /** + * Text modifier for primary title. + * + * @type { ?TextModifier } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + primaryTitleModifier?: TextModifier; + /** + * The secondary line text of content area. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + secondaryTitle?: ResourceStr; + /** + * Text modifier for secondary title. + * + * @type { ?TextModifier } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + secondaryTitleModifier?: TextModifier; +} +/** + * Declare the SubHeaderV2Title + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@ObservedV2 +export declare class SubHeaderV2Title { + /** + * The first line text of content area. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace + primaryTitle?: ResourceStr; + /** + * Text modifier for primary title. + * + * @type { ?TextModifier } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace + primaryTitleModifier?: TextModifier; + /** + * The secondary line text of content area. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace + secondaryTitle?: ResourceStr; + /** + * Text modifier for secondary title. + * + * @type { ?TextModifier } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace + secondaryTitleModifier?: TextModifier; + /** + * The constructor of SubHeaderV2Title + * + * @param { SubHeaderV2TitleOptions } options - the options of the SubHeaderV2Title + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + constructor(options: SubHeaderV2TitleOptions); +} +/** + * The callback function that will be invoked when the selectedIndex of the SubHeaderV2Select is selected. + * + * @typedef { function } SubHeaderV2SelectOnSelect + * @param { number } selectedIndex - the index of selected item + * @param { string } [selectedContent] - the content of selected item + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export type SubHeaderV2SelectOnSelect = (selectedIndex: number, selectedContent?: string) => void; +/** + * Defines the SubHeaderV2SelectOptions. + * + * @interface SubHeaderV2SelectOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export interface SubHeaderV2SelectOptions { + /** + * Sets the options of the SubHeaderV2SelectOptions. + * + * @type { SelectOption[] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + options: SelectOption[]; + /** + * Sets the selected index of the SubHeaderV2SelectOptions. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + selectedIndex?: number; + /** + * Sets the selected content of the SubHeaderV2SelectOptions. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + selectedContent?: ResourceStr; + /** + * Sets the onSelect of the SubHeaderV2SelectOptions. + * + * @type { ?SubHeaderV2SelectOnSelect } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onSelect?: SubHeaderV2SelectOnSelect; + /** + * Sets the default focus state of SubHeaderV2SelectOptions. + * + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + defaultFocus?: boolean; +} +/** + * Declare the SubHeaderV2Select + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@ObservedV2 +export declare class SubHeaderV2Select { + /** + * Sets the options of the SubHeaderV2SelectOptions. + * + * @type { SelectOption[] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace + options: SelectOption[]; + /** + * Sets the selected index of the SubHeaderV2SelectOptions. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace + selectedIndex?: number; + /** + * Sets the selected content of the SubHeaderV2SelectOptions. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace + selectedContent?: ResourceStr; + /** + * Sets the onSelect of the SubHeaderV2SelectOptions. + * + * @type { ?SubHeaderV2SelectOnSelect } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace + onSelect?: SubHeaderV2SelectOnSelect; + /** + * Sets the default focus state of SubHeaderV2SelectOptions. + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace + defaultFocus?: boolean; + /** + * The constructor of SubHeaderV2Select + * + * @param { SubHeaderV2SelectOptions } options - the options of the SubHeaderV2Select + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + constructor(options: SubHeaderV2SelectOptions); +} +/** + * Control style of operation element + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare enum SubHeaderV2OperationType { + /** + * The TextArrow style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + TEXT_ARROW = 0, + /** + * The Button style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + BUTTON = 1, + /** + * The IconGroup style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + ICON_GROUP = 2, + /** + * The LoadingProgress style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + LOADING = 3 +} +/** + * Defines the action callback of the SubHeaderV2OperationItem. + * + * @typedef { function } OnClicked + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export type SubHeaderV2OperationItemAction = () => void; +/** + * SubHeaderV2OperationItemType + * + * @typedef { ResourceStr | SymbolGlyphModifier } SubHeaderV2OperationItemType + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +declare type SubHeaderV2OperationItemType = ResourceStr | SymbolGlyphModifier; +/** + * Defines the SubHeaderV2OperationItemOptions. + * + * @interface SubHeaderV2OperationItemOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export interface SubHeaderV2OperationItemOptions { + /** + * The content of text or the address of icon. + * + * @type { SubHeaderV2OperationItemType } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + content: SubHeaderV2OperationItemType; + /** + * callback function when operate the text or icon. + * + * @type { ?SubHeaderV2OperationItemAction } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + action?: SubHeaderV2OperationItemAction; + /** + * The accessibilityText of this text or icon. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + accessibilityText?: ResourceStr; + /** + * The accessibilityDescription of this text or icon. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + accessibilityDescription?: ResourceStr; + /** + * The accessibilityLevel of this text or icon. + * + * @type { ?string } + * @default "auto".The options are as follows:
+ * "auto":The value is converted to "yes" or "no" based on the component. + * "yes": the current component is selectable for the accessibility service. + * "no": The current component is not selectable for the accessibility service. + * "no-hide-descendants":The current component and all its child components are not selectable
+ * for the accessibility service. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + accessibilityLevel?: string; + /** + * Sets the default focus state of the text or icon. + * + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + defaultFocus?: boolean; +} +/** + * Declare the SubHeaderV2OperationItem + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@ObservedV2 +export declare class SubHeaderV2OperationItem { + /** + * The content of text or the address of icon. + * + * @type { SubHeaderV2OperationItemType } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace + content: SubHeaderV2OperationItemType; + /** + * callback function when operate the text or icon. + * + * @type { ?SubHeaderV2OperationItemAction } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace + action?: SubHeaderV2OperationItemAction; + /** + * The constructor of SubHeaderV2OperationItem + * + * @param { SubHeaderV2OperationItemOptions } options - the options of the SubHeaderV2OperationItem + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + constructor(options: SubHeaderV2OperationItemOptions); + /** + * The accessibilityText of this text or icon. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace + accessibilityText?: ResourceStr; + /** + * The accessibilityDescription of this text or icon. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace + accessibilityDescription?: ResourceStr; + /** + * The accessibilityLevel of this text or icon. + * + * @type { ?string } + * @default "auto".The options are as follows:
+ * "auto":The value is converted to "yes" or "no" based on the component. + * "yes": the current component is selectable for the accessibility service. + * "no": The current component is not selectable for the accessibility service. + * "no-hide-descendants":The current component and all its child components are not selectable
+ * for the accessibility service. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace + accessibilityLevel?: string; + /** + * Sets the default focus state of the text or icon. + * + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace + defaultFocus?: boolean; +} +/** + * The callback function that will be invoked when the title build. + * + * @typedef { function } SubHeaderV2TitleBuilder + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@Builder +export type SubHeaderV2TitleBuilder = () => void; +/** + * Defines struct SubHeaderV2. + * + * @struct { SubHeaderV2 } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@ComponentV2 +export declare struct SubHeaderV2 { + /** + * Sets the icon of the SubHeaderV2. + * + * @type { ?SubHeaderV2IconType } + * @readonly + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + readonly icon?: SubHeaderV2IconType; + /** + * Sets the title of the SubHeaderV2. + * + * @type { ?SubHeaderV2Title } + * @readonly + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + readonly title?: SubHeaderV2Title; + /** + * Sets the select of the SubHeaderV2. + * + * @type { ?SubHeaderV2Select } + * @readonly + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + readonly select?: SubHeaderV2Select; + /** + * Sets the operationType of the SubHeaderV2. + * + * @type { ?SubHeaderV2OperationType } + * @readonly + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + readonly operationType?: SubHeaderV2OperationType; + /** + * Sets the operationItems of the SubHeaderV2. + * + * @type { ?SubHeaderV2OperationItem[] } + * @readonly + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + readonly operationItems?: SubHeaderV2OperationItem[]; + /** + * Set the title content. + * + * @type { ?SubHeaderV2TitleBuilder } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @BuilderParam + titleBuilder?: SubHeaderV2TitleBuilder; + + /** + * The method to build component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Builder + build(): void; +} + diff --git a/api/@ohos.arkui.advanced.ToolBarV2.static.d.ets b/api/@ohos.arkui.advanced.ToolBarV2.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..4dbfdc9a7210a5a8f72f052749f8454a35a55a60 --- /dev/null +++ b/api/@ohos.arkui.advanced.ToolBarV2.static.d.ets @@ -0,0 +1,549 @@ +'use static' +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"), + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * @kit ArkUI + * @arkts 1.2 + */ +import { ComponentV2 } from './arkui/component/customComponent'; +import { ResourceStr } from './arkui/component/units'; +import { ObservedV2, Param, Require, Trace } from './arkui/stateManagement/decorator'; +import { SymbolGlyphModifier } from './arkui/SymbolGlyphModifier'; +import { DividerModifier } from './arkui/DividerModifier'; +import { ColorMetrics, LengthMetrics } from './arkui/Graphics'; +import { Builder } from './arkui/component/builder'; +/** + * Declare enum ToolBarV2ItemState. + * + * @enum { number }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare enum ToolBarV2ItemState { + /** + * Enable type. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + ENABLE = 1, + /** + * Disable type. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + DISABLE = 2, + /** + * Activate type. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + ACTIVATE = 3 +} +/** + * Defines toolBarV2 symbolGlyph. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@ObservedV2 +export declare class ToolBarV2SymbolGlyph { + /** + * Modifier of toolbarV2's normal symbol. + * + * @type { SymbolGlyphModifier } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace + normal: SymbolGlyphModifier; + /** + * Modifier of toolbarV2's activated symbol. + * + * @type { ?SymbolGlyphModifier } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace + activated?: SymbolGlyphModifier; + /** + * The constructor used to create a ToolBarV2SymbolGlyph object. + * + * @param { ToolBarV2SymbolGlyphOptions } options - symbol info. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + constructor(options: ToolBarV2SymbolGlyphOptions); +} +/** + * Declare the options of ToolBarV2SymbolGlyph. + * + * @interface ToolBarV2SymbolGlyphOptions. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export interface ToolBarV2SymbolGlyphOptions { + /** + * Modifier of toolbarV2's normal symbol. + * + * @type { SymbolGlyphModifier } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + normal: SymbolGlyphModifier; + /** + * Modifier of toolbarV2's activated symbol. + * + * @type { ?SymbolGlyphModifier } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + activated?: SymbolGlyphModifier; +} +/** + * Declare type ToolBarV2ItemText. + * + * @class ToolBarV2ItemText. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@ObservedV2 +export declare class ToolBarV2ItemText { + /** + * Define text content. + * + * @type { ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace + text: ResourceStr; + /** + * Define text fontColor. + * + * @type { ?ColorMetrics } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace + color?: ColorMetrics; + /** + * Text fontColor when the item is activated. + * + * @type { ?ColorMetrics } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace + activatedColor?: ColorMetrics; + /** + * The constructor used to create a ToolBarV2ItemText object. + * + * @param { ToolBarV2ItemTextOptions } options - text info. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + constructor(options: ToolBarV2ItemTextOptions); +} +/** + * Declare the options of ToolBarV2ItemText. + * + * @interface ToolBarV2ItemTextOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export interface ToolBarV2ItemTextOptions { + /** + * Define text content. + * + * @type { ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + text: ResourceStr; + /** + * Define text fontColor. + * + * @type { ?ColorMetrics } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + color?: ColorMetrics; + /** + * Text fontColor when the item is activated. + * + * @type { ?ColorMetrics } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + activatedColor?: ColorMetrics; +} +/** + * Defines the icon type of ToolBarV2 item. + * @typedef { ToolBarV2ItemImage | ToolBarV2SymbolGlyph } ToolBarV2ItemIconType + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare type ToolBarV2ItemIconType = ToolBarV2ItemImage | ToolBarV2SymbolGlyph; +/** + * Declare type ToolBarV2ItemImage. + * + * @class ToolBarV2ItemImage. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@ObservedV2 +export declare class ToolBarV2ItemImage { + /** + * Define icon resource. + * + * @type { ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace + src: ResourceStr; + /** + * Define icon fillColor. + * + * @type { ?ColorMetrics } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace + color?: ColorMetrics; + /** + * Icon fillColor when the item is activated. + * + * @type { ?ColorMetrics } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace + activatedColor?: ColorMetrics; + /** + * The constructor used to create a ToolBarV2ItemImage object. + * + * @param { ToolBarV2ItemImageOptions } options - text info. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + constructor(options: ToolBarV2ItemImageOptions); +} +/** + * Declare the options of ToolBarV2ItemImage. + * + * @interface ToolBarV2ItemImageOptions. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export interface ToolBarV2ItemImageOptions { + /** + * Define icon resource. + * + * @type { ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + src: ResourceStr; + /** + * Define icon fillColor. + * + * @type { ?ColorMetrics } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + color?: ColorMetrics; + /** + * Icon fillColor when the item is activated. + * + * @type { ?ColorMetrics } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + activatedColor?: ColorMetrics; +} +/** + * Declare type ToolBarV2Item. + * + * @class ToolBarV2Item + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@ObservedV2 +export declare class ToolBarV2Item { + /** + * Define text content. + * + * @type { ToolBarV2ItemText } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace + content: ToolBarV2ItemText; + /** + * Define the action event. + * + * @type { ?ToolBarV2ItemAction } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace + action?: ToolBarV2ItemAction; + /** + * Define icon resource. + * + * @type { ?ToolBarV2ItemIconType } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace + icon?: ToolBarV2ItemIconType; + /** + * Define item type. + * + * @type { ?ToolBarV2ItemState } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace + state?: ToolBarV2ItemState; + /** + * The accessibilityText of item. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace + accessibilityText?: ResourceStr; + /** + * The accessibilityDescription of item. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace + accessibilityDescription?: ResourceStr; + /** + * The accessibilityLevel of item. + * + * @type { ?string } + * @default "auto" + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Trace + accessibilityLevel?: string; + /** + * The constructor used to create a ToolBarV2Item object. + * + * @param { ToolBarV2ItemOptions } options - text info. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + constructor(options: ToolBarV2ItemOptions); +} +/** + * Declare the options of ToolBarV2Item. + * + * @interface ToolBarV2ItemOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export interface ToolBarV2ItemOptions { + /** + * Define text content. + * + * @type { ToolBarV2ItemText } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + content: ToolBarV2ItemText; + /** + * Define the action event. + * + * @type { ?ToolBarV2ItemAction } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + action?: ToolBarV2ItemAction; + /** + * Define icon resource. + * + * @type { ?ToolBarV2ItemIconType } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + icon?: ToolBarV2ItemIconType; + /** + * Define item type. + * + * @type { ?ToolBarV2ItemState } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + state?: ToolBarV2ItemState; + /** + * The accessibilityText of item. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + accessibilityText?: ResourceStr; + /** + * The accessibilityDescription of item. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + accessibilityDescription?: ResourceStr; + /** + * The accessibilityLevel of item. + * + * @type { ?string } + * @default "auto". + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + accessibilityLevel?: string; +} +/** + * Defines the action callback of ToolBarV2Item. + * @typedef { function } ToolBarV2ItemAction + * @param { number } index - toolBarV2's ItemAction. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export type ToolBarV2ItemAction = (index: number) => void; +/** + * Declare ToolBarV2Modifier used in ToolBar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare class ToolBarV2Modifier { + /** + * Sets the height of the toolBarV2. + * + * @param { LengthMetrics } height - toolBarV2's height. + * @returns { ToolBarV2Modifier } returns the instance of the ToolBarV2Modifier. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + height(height: LengthMetrics): ToolBarV2Modifier; + /** + * Sets the backgroundColor of the toolBarV2. + * + * @param { ColorMetrics } backgroundColor - toolBarV2's backgroundColor. + * @returns { ToolBarV2Modifier } returns the instance of the ToolBarV2Modifier. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + backgroundColor(backgroundColor: ColorMetrics): ToolBarV2Modifier; + /** + * Sets the left and right padding of the toolbarV2. + * + * @param { LengthMetrics } padding - left and right padding. + * @returns { ToolBarV2Modifier } returns the instance of the ToolBarV2Modifier. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + padding(padding: LengthMetrics): ToolBarV2Modifier; + /** + * Sets whether or not to display the press status effect. + * + * @param { boolean } stateEffect - press status effect. + * @returns { ToolBarV2Modifier } returns the instance of the ToolBarV2Modifier. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + stateEffect(stateEffect: boolean): ToolBarV2Modifier; +} +/** + * Declare Component ToolBarV2 + * + * @struct { ToolBarV2 }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@ComponentV2 +export declare struct ToolBarV2 { + /** + * Define toolbarV2 item list. + * + * @type { ToolBarV2Item[] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Require + @Param + toolBarList: ToolBarV2Item[]; + /** + * Define toolbarV2 activate item index, default is -1. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + activatedIndex?: number; + /** + * Define divider Modifier. + * + * @type { ?DividerModifier } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + dividerModifier?: DividerModifier; + /** + * Define toolbarV2 modifier. + * + * @type { ?ToolBarV2Modifier } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Param + toolBarModifier?: ToolBarV2Modifier; + /** + * The method to build component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Builder + build(): void; +} \ No newline at end of file