/* * 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 */ /** * Defines the badge position property. * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Defines the badge position property. * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** * Defines the badge position property. * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** * Defines the badge position property. * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ declare enum BadgePosition { /** * The dot is displayed vertically centered on the right. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * The dot is displayed vertically centered on the right. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** * The dot is displayed vertically centered on the right. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** * The dot is displayed vertically centered on the right. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ RightTop, /** * Dots are displayed in the upper right corner. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Dots are displayed in the upper right corner. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** * Dots are displayed in the upper right corner. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** * Dots are displayed in the upper right corner. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ Right, /** * The dot is displayed in the left vertical center. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * The dot is displayed in the left vertical center. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** * The dot is displayed in the left vertical center. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** * The dot is displayed in the left vertical center. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ Left, } /** * BadgeStyle object * * @interface BadgeStyle * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * BadgeStyle object * * @interface BadgeStyle * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** * BadgeStyle object * * @interface BadgeStyle * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** * BadgeStyle object * * @interface BadgeStyle * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ declare interface BadgeStyle { /** * Text Color * * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Text Color * * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** * Text Color * * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** * Text Color * * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ color?: ResourceColor; /** * Text size. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Text size. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** * Text size. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** * Text size. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ fontSize?: number | string; /** * Size of a badge. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Size of a badge. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** * Size of a badge. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** * Size of a badge. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ badgeSize?: number | string; /** * Color of the badge. * * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Color of the badge. * * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** * Color of the badge. * * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** * Color of the badge. * * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ badgeColor?: ResourceColor; /** * Define the border color of the badge. * * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Define the border color of the badge. * * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ borderColor?: ResourceColor; /** * Define the border width of the badge. * * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Define the border width of the badge. * * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ borderWidth?: Length; /** * Define the font weight of the badge. * * @type { ?(number | FontWeight | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Define the font weight of the badge. * * @type { ?(number | FontWeight | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ fontWeight?: number | FontWeight | string; } /** * Defines the base param of badge. * * @interface BadgeParam * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Defines the base param of badge. * * @interface BadgeParam * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** * Defines the base param of badge. * * @interface BadgeParam * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** * Defines the base param of badge. * * @interface BadgeParam * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ declare interface BadgeParam { /** * Set the display position of the prompt point. * * @type { ?(BadgePosition) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Set the display position of the prompt point. * * @type { ?(BadgePosition) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** * Set the display position of the prompt point. * * @type { ?(BadgePosition | Position) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** * Set the display position of the prompt point. * * @type { ?(BadgePosition | Position) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ position?: BadgePosition | Position; /** * Defines the style of the Badge component, including the text color, size, dot color, and size. * * @type { BadgeStyle } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Defines the style of the Badge component, including the text color, size, dot color, and size. * * @type { BadgeStyle } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** * Defines the style of the Badge component, including the text color, size, dot color, and size. * * @type { BadgeStyle } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** * Defines the style of the Badge component, including the text color, size, dot color, and size. * * @type { BadgeStyle } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ style: BadgeStyle; } /** * Defines the badge param with count and maxCount. * * @extends BadgeParam * @interface BadgeParamWithNumber * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Defines the badge param with count and maxCount. * * @extends BadgeParam * @interface BadgeParamWithNumber * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** * Defines the badge param with count and maxCount. * * @extends BadgeParam * @interface BadgeParamWithNumber * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** * Defines the badge param with count and maxCount. * * @extends BadgeParam * @interface BadgeParamWithNumber * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ declare interface BadgeParamWithNumber extends BadgeParam { /** * Set the number of reminder messages. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Set the number of reminder messages. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** * Set the number of reminder messages. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** * Set the number of reminder messages. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ count: number; /** * Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** * Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** * Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ maxCount?: number; } /** * Defines the badge param with string value. * * @extends BadgeParam * @interface BadgeParamWithString * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Defines the badge param with string value. * * @extends BadgeParam * @interface BadgeParamWithString * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** * Defines the badge param with string value. * * @extends BadgeParam * @interface BadgeParamWithString * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** * Defines the badge param with string value. * * @extends BadgeParam * @interface BadgeParamWithString * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ declare interface BadgeParamWithString extends BadgeParam { /** * Text string of the prompt content. * * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Text string of the prompt content. * * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** * Text string of the prompt content. * * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** * Text string of the prompt content. * * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ value: string; } /** * Defines Badge Component. * * @interface BadgeInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Defines Badge Component. * * @interface BadgeInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** * Defines Badge Component. * * @interface BadgeInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** * Defines Badge Component. * * @interface BadgeInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ interface BadgeInterface { /** * position: Set the display position of the prompt point. * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. * count: Set the number of reminder messages. * style: You can set the style of the Badge component, including the text color, size, dot color, and size. * * @param { BadgeParamWithNumber } value * @returns { BadgeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * position: Set the display position of the prompt point. * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. * count: Set the number of reminder messages. * style: You can set the style of the Badge component, including the text color, size, dot color, and size. * * @param { BadgeParamWithNumber } value * @returns { BadgeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** * position: Set the display position of the prompt point. * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. * count: Set the number of reminder messages. * style: You can set the style of the Badge component, including the text color, size, dot color, and size. * * @param { BadgeParamWithNumber } value * @returns { BadgeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** * position: Set the display position of the prompt point. * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. * count: Set the number of reminder messages. * style: You can set the style of the Badge component, including the text color, size, dot color, and size. * * @param { BadgeParamWithNumber } value * @returns { BadgeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ (value: BadgeParamWithNumber): BadgeAttribute; /** * value: Text string of the prompt content. * position: Set the display position of the prompt point. * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. * style: You can set the style of the Badge component, including the text color, size, dot color, and size. * * @param { BadgeParamWithString } value * @returns { BadgeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * value: Text string of the prompt content. * position: Set the display position of the prompt point. * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. * style: You can set the style of the Badge component, including the text color, size, dot color, and size. * * @param { BadgeParamWithString } value * @returns { BadgeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** * value: Text string of the prompt content. * position: Set the display position of the prompt point. * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. * style: You can set the style of the Badge component, including the text color, size, dot color, and size. * * @param { BadgeParamWithString } value * @returns { BadgeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** * value: Text string of the prompt content. * position: Set the display position of the prompt point. * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. * style: You can set the style of the Badge component, including the text color, size, dot color, and size. * * @param { BadgeParamWithString } value * @returns { BadgeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ (value: BadgeParamWithString): BadgeAttribute; } /** * Defines Badge Component attribute. * * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Defines Badge Component attribute. * * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** * Defines Badge Component attribute. * * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** * Defines Badge Component attribute. * * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ declare class BadgeAttribute extends CommonMethod {} /** * Defines Badge Component. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Defines Badge Component. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** * Defines Badge Component. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** * Defines Badge Component. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ declare const Badge: BadgeInterface; /** * Defines Badge Component instance. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Defines Badge Component instance. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** * Defines Badge Component instance. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** * Defines Badge Component instance. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ declare const BadgeInstance: BadgeAttribute;