/* * Copyright (c) 2021-2023 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 */ /*** if arkts 1.2 */ import { Resource } from '../../global/resource'; import { VoidCallback, ResourceStr, ResourceColor, Dimension, BorderRadiuses, LocalizedEdgeColors, EdgeColors, EdgeWidths, LocalizedEdgeWidths, EdgeStyles, LocalizedBorderRadiuses } from './units'; import { Callback, DismissReason, Rectangle, BlurStyle, TransitionEffect, ShadowOptions, HoverModeAreaType, ShadowStyle, BackgroundBlurStyleOptions, BackgroundEffectOptions } from './common'; import { DialogButtonStyle, BorderStyle } from './enums'; import { DialogAlignment } from './alertDialog'; import { LevelOrder, LevelMode, ImmersiveMode } from '../../@ohos.promptAction'; /*** endif */ /** * The information of sheet. * * @interface SheetInfo * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * The information of sheet. * * @interface SheetInfo * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * The information of sheet. * * @interface SheetInfo * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ interface SheetInfo { /** * Title Properties * * @type { string | Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Title Properties * * @type { string | Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Sheet text. * * @type { string | Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ title: string | Resource; /** * Icon Properties. * * @type { ?(string | Resource) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Icon Properties. * * @type { ?(string | Resource) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Sheet icon. By default, no icon is displayed. * * @type { ?(string | Resource) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ icon?: string | Resource; /** * Callback method after the operation. * * @type { function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Callback method after the operation. * * @type { function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Callback method after the operation. * * @type { function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ /** * Callback when the sheet is selected. * Anonymous Object Rectification. * * @type { VoidCallback } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ action: VoidCallback; } /** * Provides information about the action to dismiss the dialog box. * * @interface DismissDialogAction * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ declare interface DismissDialogAction { /** * Callback for dismissing the dialog box. This API is called only when the dialog box needs to be exited. * * @type { Callback } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ dismiss: Callback; /** * Dismiss reason type. * * @type { DismissReason } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ reason: DismissReason; } /** * Base button params used for ActionSheet. * * @interface ActionSheetButtonOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ interface ActionSheetButtonOptions { /** * Enable switch of confirmation button * @type { ?boolean } * @default true * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Enable switch of confirmation button * @type { ?boolean } * @default true * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ /** * Whether to respond when the button is clicked. The value true means to respond when the button is clicked, * and false means the opposite. * Anonymous Object Rectification. * * @type { ?boolean } * @default true * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ enabled?: boolean; /** * Default focus switch of confirmation button * @type { ?boolean } * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Default focus switch of confirmation button * @type { ?boolean } * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ /** * Whether the button is the default focus. The value true means that the button is the default focus, * and false means the opposite. * Anonymous Object Rectification. * * @type { ?boolean } * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ defaultFocus?: boolean; /** * Style of confirmation button. * @type { ?DialogButtonStyle } * @default DialogButtonStyle.DEFAULT * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Style of confirmation button. * @type { ?DialogButtonStyle } * @default DialogButtonStyle.DEFAULT * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ /** * Button style. * Anonymous Object Rectification. * * @type { ?DialogButtonStyle } * @default DialogButtonStyle.DEFAULT * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ style?: DialogButtonStyle; /** * Text content of the confirmation button. * * @type { string | Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Text content of the confirmation button. * * @type { string | Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Text content of the confirmation button. * * @type { string | Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ /** * Button text. * Anonymous Object Rectification. * * @type { string | Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ value: string | Resource; /** * Method executed by the callback. * * @type { function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Method executed by the callback. * * @type { function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Method executed by the callback. * * @type { function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ /** * Callback invoked when the button is selected. * Anonymous Object Rectification. * * @type { VoidCallback } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ action: VoidCallback; } /** * ActionSheet offset. * * @interface ActionSheetOffset * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ interface ActionSheetOffset { /** * Offset of the action sheet along the x-axis relative to the alignment position. * Anonymous Object Rectification. * * @type { number | string | Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ dx: number | string | Resource; /** * Offset of the action sheet along the y-axis relative to the alignment position. * Anonymous Object Rectification. * * @type { number | string | Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ dy: number | string | Resource; } /** * Import the LevelMode type from promptAction. * * @typedef { import('../api/@ohos.promptAction').LevelMode } LevelMode * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 15 */ declare type LevelMode = import('../api/@ohos.promptAction').LevelMode; /** * Import the ImmersiveMode type from promptAction. * * @typedef { import('../api/@ohos.promptAction').ImmersiveMode } ImmersiveMode * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 15 */ declare type ImmersiveMode = import('../api/@ohos.promptAction').ImmersiveMode; /** * The options of ActionSheet. * * @interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * The options of ActionSheet. * * @interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * The options of ActionSheet. * * @interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ interface ActionSheetOptions { /** * Title Properties * * @type { string | Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Title Properties * * @type { string | Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Title of the dialog box. * * @type { string | Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ title: string | Resource; /** * Subtitle Properties * @type { ?ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Subtitle of the dialog box. * @type { ?ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ subtitle?: ResourceStr; /** * message Properties * * @type { string | Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * message Properties * * @type { string | Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Content of the dialog box. * * @type { string | Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ message: string | Resource; /** * Invoke the commit function. * * @type { ?object } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Invoke the commit function. * * @type { ?object } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Invoke the commit function. * * @type { ?object } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ /** * Information about the confirm button. When the dialog box has focus and focus has not been shifted using the Tab * key, the button responds to the Enter key by default, and multiple dialog boxes can gain focus consecutively * to respond automatically. The default response to the Enter key does not work when defaultFocus is set to true. * * @type { ?ActionSheetButtonOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ confirm?: ActionSheetButtonOptions; /** * Execute Cancel Function. * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Execute Cancel Function. * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Execute Cancel Function. * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ /** * Callback invoked when the dialog box is closed after the overlay is clicked. * Anonymous Object Rectification. * * @type { ?VoidCallback } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ cancel?: VoidCallback; /** * The Array of sheets * * @type { Array } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * The Array of sheets * * @type { Array } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Options in the dialog box. Each option supports the image, text, and callback. * * @type { Array } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ sheets: Array; /** * Allows users to click the mask layer to exit. * * @type { ?boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Allows users to click the mask layer to exit. * * @type { ?boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Whether to close the dialog box when the overlay is clicked. * * @type { ?boolean } * @default true - The value true means to close the dialog box when the overlay is clicked, and false means * the opposite. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ autoCancel?: boolean; /** * Alignment in the vertical direction. * * @type { ?DialogAlignment } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Alignment in the vertical direction. * * @type { ?DialogAlignment } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Alignment mode of the dialog box in the vertical direction. *

NOTE: *
If showInSubWindow is set to true in UIExtension, the dialog box is aligned with the host window based * on UIExtension. *

* * @type { ?DialogAlignment } * @default DialogAlignment.Bottom * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ alignment?: DialogAlignment; /** * Offset of the pop-up window relative to the alignment position. * * @type { ?object } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Offset of the pop-up window relative to the alignment position. * * @type { ?object } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Offset of the pop-up window relative to the alignment position. * * @type { ?object } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ /** * Offset of the dialog box relative to the alignment position. *
When alignment is set to Top, TopStart, or TopEnd: {dx: 0,dy: "40vp"} *
When alignment is set to any other value: {dx: 0,dy: "-40vp"} * * @type { ?ActionSheetOffset } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ offset?: ActionSheetOffset; /** * Mask Region of dialog. The size cannot exceed the main window. * * @type { ?Rectangle } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Mask area of the dialog box. Events outside the mask area are transparently transmitted, * and events within the mask area are not. *

NOTE: *
maskRect does not take effect when showInSubWindow is set to true. *

* * @type { ?Rectangle } * @default - {x:0,y:0, width:'100%', height:'100%'} * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ maskRect?: Rectangle; /** * Whether to display in the sub window. * * @type { ?boolean } * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** * Whether to show the dialog box in a subwindow when the dialog box needs to be displayed outside the main window. *

NOTE: *
A dialog box whose showInSubWindow attribute is true cannot trigger the display of another dialog box whose * showInSubWindow attribute is also true. *

* * @type { ?boolean } * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ showInSubWindow?: boolean; /** * Whether it is a modal dialog * @type { ?boolean } * @default true * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** * Whether the dialog box is a modal. A modal dialog box has a mask applied, while a non-modal dialog box does not. * @type { ?boolean } * @default true * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ isModal?: boolean; /** * Defines the actionSheet's background color * * @type { ?ResourceColor } * @default Color.Transparent * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** * Background color of the dialog box. *

NOTE: *
When backgroundColor is set to a non-transparent color, backgroundBlurStyle must be set to BlurStyle.NONE; * otherwise, the color display may not meet the expected effect. *

* * @type { ?ResourceColor } * @default Color.Transparent * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ backgroundColor?: ResourceColor; /** * Defines the actionSheet's background blur Style * * @type { ?BlurStyle } * @default BlurStyle.COMPONENT_ULTRA_THICK * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** * Background blur style of the dialog box. *

NOTE: *
Setting this parameter to BlurStyle.NONE disables the background blur. When backgroundBlurStyle is set to a * value other than NONE, do not set backgroundColor. If you do, the color display may not produce the expected * visual effect. *

* * @type { ?BlurStyle } * @default BlurStyle.COMPONENT_ULTRA_THICK * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ backgroundBlurStyle?: BlurStyle; /** * Defines the actionSheet's background blur style with options * * @type { ?BackgroundBlurStyleOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'19','1.2':'20'} * @arkts 1.1&1.2 */ backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; /** * Defines the actionSheet's background effect with options * * @type { ?BackgroundEffectOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'19','1.2':'20'} * @arkts 1.1&1.2 */ backgroundEffect?: BackgroundEffectOptions; /** * Callback for interactive closure of the dialog box. *

NOTE: * 1. If this callback is registered, the dialog box will not be closed immediately after the user touches the * mask or the Back button, presses the Esc key, or swipes left or right on the screen. The reason parameter in * the callback is used to determine whether the dialog box can be closed. The reason returned by the component * does not support the value CLOSE_BUTTON. * 2. In the onWillDismiss callback, another onWillDismiss callback is not allowed. *

* * @type { ?Callback } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ onWillDismiss?: Callback; /** * Transition effect for the entrance and exit of the dialog box. *

NOTE: * 1. If this parameter is not set, the default effect is used. * 2. Touching the Back button during the entrance animation pauses the entrance animation and starts the exit * animation. The final effect is one obtained after the curves of the entrance and exit animations are combined. * 3. Touching the Back button during the exit animation does not affect the animation playback. Touching the * Back button again closes the application. *

* * @type { ?TransitionEffect } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ transition?: TransitionEffect; /** * Corner radius of the background. You can set the radius for each of the four corners individually. * * @type { ?(Dimension | BorderRadiuses | LocalizedBorderRadiuses) } * @default - {topLeft:'32vp', topRight:'32vp', bottomLeft:'32vp', bottomRight:'32vp'}, The corner radius is subject * to the component size, with the maximum value being half of the component width or height. If the value is * negative, the default value is used. When set to a percentage, the value defines the radius as a percentage of the * parent component's width or height. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ cornerRadius?: Dimension | BorderRadiuses | LocalizedBorderRadiuses; /** * Width of the dialog box. * * @type { ?Dimension } * @default - Default maximum width of the dialog box: 400 vp, * When this parameter is set to a percentage, the reference width of the dialog box is the width of the window * where the dialog box is located. You can decrease or increase the width as needed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ width?: Dimension; /** * Height of the dialog box. * * @type { ?Dimension } * @default - Default maximum height of the dialog box: 0.9 x (Window height – Safe area) *
When this parameter is set to a percentage, the reference height of the dialog box is the height of the * window where the dialog box is located minus the safe area. You can decrease or increase the height as needed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ height?: Dimension; /** * Border width of the dialog box. * You can set the width for all four sides or set separate widths for individual sides. * * @type { ?(Dimension | EdgeWidths | LocalizedEdgeWidths) } * @default 0 - When set to a percentage, the value defines the border width as a percentage of the parent dialog * box's width. If the left and right borders are greater than its width, or the top and bottom borders are greater * than its height, the dialog box may not display as expected. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ borderWidth?: Dimension | EdgeWidths | LocalizedEdgeWidths; /** * Border color of the dialog box. *

NOTE: *
When borderColor is of type LocalizedEdgeColors, the layout order can be dynamically adjusted based on the * user's language settings. *

* * @type { ?(ResourceColor | EdgeColors | LocalizedEdgeColors) } * @default Color.Black - borderColor must be used with borderWidth in pairs. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ borderColor?: ResourceColor | EdgeColors | LocalizedEdgeColors; /** * Border style of the dialog box. * * @type { ?(BorderStyle | EdgeStyles) } * @default BorderStyle.Solid - borderStyle must be used with borderWidth in pairs. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ borderStyle?: BorderStyle | EdgeStyles; /** * Shadow of the dialog box. * * @type { ?(ShadowOptions | ShadowStyle) } * @default - Default value on 2-in-1 devices: ShadowStyle.OUTER_FLOATING_MD when the dialog box is focused and * ShadowStyle.OUTER_FLOATING_SM otherwise. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ shadow?: ShadowOptions | ShadowStyle; /** * Whether to enable the hover mode. * * @type { ?boolean } * @default false - meaning not to enable the hover mode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'14','1.2':'20'} * @arkts 1.1&1.2 */ enableHoverMode?: boolean; /** * Display area of the dialog box in hover mode. * * @type { ?HoverModeAreaType } * @default HoverModeAreaType.BOTTOM_SCREEN * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'14','1.2':'20'} * @arkts 1.1&1.2 */ hoverModeArea?: HoverModeAreaType; /** * Callback function when the dialog appears. * * @type { ?Callback } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'19','1.2':'20'} * @arkts 1.1&1.2 */ onDidAppear?: Callback; /** * Callback function when the dialog disappears. * * @type { ?Callback } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'19','1.2':'20'} * @arkts 1.1&1.2 */ onDidDisappear?: Callback; /** * Callback function before the dialog openAnimation starts. * * @type { ?Callback } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'19','1.2':'20'} * @arkts 1.1&1.2 */ onWillAppear?: Callback; /** * Callback function before the dialog closeAnimation starts. * * @type { ?Callback } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'19','1.2':'20'} * @arkts 1.1&1.2 */ onWillDisappear?: Callback; /** * Display level of the dialog box. * * @type { ?LevelMode } * @default LevelMode.OVERLAY - This parameter takes effect only when showInSubWindow is set to false. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'15','1.2':'20'} * @arkts 1.1&1.2 */ levelMode?: LevelMode; /** * Unique ID of the node under the display level for the page-level dialog box. *

NOTE: *
This parameter takes effect only when levelMode is set to LevelMode.EMBEDDED. *

* * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'15','1.2':'20'} * @arkts 1.1&1.2 */ levelUniqueId?: number; /** * Overlay effect for the page-level dialog box. * * @type { ?ImmersiveMode } * @default ImmersiveMode.DEFAULT - This parameter takes effect only when levelMode is set to LevelMode.EMBEDDED. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'15','1.2':'20'} * @arkts 1.1&1.2 */ immersiveMode?: ImmersiveMode; /** * Determine the display order of the dialog. * * @type { ?LevelOrder } * @default The value returns by LevelOrder.clamp(0) * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ levelOrder?: LevelOrder; } /** * Declare the ActionSheet * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Declare the ActionSheet * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Declare the ActionSheet * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ declare class ActionSheet { /** * Invoking method display. * * @param { ActionSheetOptions } value * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Invoking method display. * * @param { ActionSheetOptions } value * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Invoking method display. * * @param { ActionSheetOptions } value * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 * @deprecated since 18 * @useinstead ohos.arkui.UIContext.UIContext#showActionSheet */ static show(value: ActionSheetOptions); }