2023-11-07 07:38:59 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 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.
|
|
|
|
*/
|
|
|
|
|
2023-12-11 09:08:03 +00:00
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
* @kit ArkUI
|
|
|
|
*/
|
|
|
|
|
2023-11-07 07:38:59 +00:00
|
|
|
/// <reference path="../component/units.d.ts" />
|
|
|
|
|
|
|
|
import { ResourceStr } from 'GlobalResource';
|
2024-04-29 13:35:23 +00:00
|
|
|
import { SymbolGlyphModifier } from './@ohos.arkui.modifier';
|
2023-11-07 07:38:59 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Enum for ChipSize
|
|
|
|
*
|
|
|
|
* @enum { string }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-03-18 03:42:48 +00:00
|
|
|
/**
|
|
|
|
* Enum for ChipSize
|
|
|
|
*
|
|
|
|
* @enum { string }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-12-11 09:08:03 +00:00
|
|
|
|
2023-11-07 07:38:59 +00:00
|
|
|
export declare enum ChipSize {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Normal type.
|
|
|
|
*
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-03-18 03:42:48 +00:00
|
|
|
/**
|
|
|
|
* Normal type.
|
|
|
|
*
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-11-07 07:38:59 +00:00
|
|
|
NORMAL = "NORMAL",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Small type.
|
|
|
|
*
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-03-18 03:42:48 +00:00
|
|
|
/**
|
|
|
|
* Small type.
|
|
|
|
*
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-11-07 07:38:59 +00:00
|
|
|
SMALL = "SMALL"
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Defines the icon common option.
|
|
|
|
*
|
|
|
|
* @interface IconCommonOptions
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-03-18 03:42:48 +00:00
|
|
|
/**
|
|
|
|
* Defines the icon common option.
|
|
|
|
*
|
|
|
|
* @interface IconCommonOptions
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-11-07 07:38:59 +00:00
|
|
|
export interface IconCommonOptions {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Image resource.
|
|
|
|
*
|
|
|
|
* @type { ResourceStr }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-03-18 03:42:48 +00:00
|
|
|
/**
|
|
|
|
* Image resource.
|
|
|
|
*
|
|
|
|
* @type { ResourceStr }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-11-07 07:38:59 +00:00
|
|
|
src: ResourceStr;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Image size option.
|
|
|
|
*
|
|
|
|
* @type { ?SizeOptions }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-03-18 03:42:48 +00:00
|
|
|
/**
|
|
|
|
* Image size option.
|
|
|
|
*
|
|
|
|
* @type { ?SizeOptions }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-11-07 07:38:59 +00:00
|
|
|
size?: SizeOptions;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Image filled color.
|
|
|
|
*
|
|
|
|
* @type { ?ResourceColor }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-03-18 03:42:48 +00:00
|
|
|
/**
|
|
|
|
* Image filled color.
|
|
|
|
*
|
|
|
|
* @type { ?ResourceColor }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-11-07 07:38:59 +00:00
|
|
|
fillColor?: ResourceColor;
|
2024-02-29 05:19:30 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Image filled color when chip is activated.
|
|
|
|
*
|
|
|
|
* @type { ?ResourceColor }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @since 12
|
|
|
|
*/
|
|
|
|
activatedFillColor?: ResourceColor;
|
2023-11-07 07:38:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Defines the suffix icon option.
|
|
|
|
*
|
|
|
|
* @interface SuffixIconOptions
|
|
|
|
* @extends IconCommonOptions
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-03-18 03:42:48 +00:00
|
|
|
/**
|
|
|
|
* Defines the suffix icon option.
|
|
|
|
*
|
|
|
|
* @interface SuffixIconOptions
|
|
|
|
* @extends IconCommonOptions
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-11-07 07:38:59 +00:00
|
|
|
export interface SuffixIconOptions extends IconCommonOptions {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Called when the suffix icon is clicked.
|
|
|
|
*
|
|
|
|
* @type { ?function }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-03-18 03:42:48 +00:00
|
|
|
/**
|
|
|
|
* Called when the suffix icon is clicked.
|
|
|
|
*
|
|
|
|
* @type { ?function }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-11-07 07:38:59 +00:00
|
|
|
action?: () => void;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Defines the prefix icon option.
|
|
|
|
*
|
|
|
|
* @interface PrefixIconOptions
|
|
|
|
* @extends IconCommonOptions
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-03-18 03:42:48 +00:00
|
|
|
/**
|
|
|
|
* Defines the prefix icon option.
|
|
|
|
*
|
|
|
|
* @interface PrefixIconOptions
|
|
|
|
* @extends IconCommonOptions
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-11-07 07:38:59 +00:00
|
|
|
export interface PrefixIconOptions extends IconCommonOptions {}
|
|
|
|
|
2024-04-29 13:35:23 +00:00
|
|
|
/**
|
|
|
|
* Defines symbol options.
|
|
|
|
*
|
|
|
|
* @interface SymbolOptions
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @since 12
|
|
|
|
*/
|
|
|
|
export interface SymbolOptions {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Symbol normal.
|
|
|
|
*
|
|
|
|
* @type { ?SymbolGlyphModifier }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @since 12
|
|
|
|
*/
|
|
|
|
normal?: SymbolGlyphModifier;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Symbol activated.
|
|
|
|
*
|
|
|
|
* @type { ?SymbolGlyphModifier }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @since 12
|
|
|
|
*/
|
|
|
|
activated?: SymbolGlyphModifier;
|
|
|
|
}
|
|
|
|
|
2023-11-07 07:38:59 +00:00
|
|
|
/**
|
|
|
|
* Defines label margin.
|
|
|
|
*
|
|
|
|
* @interface LabelMarginOptions
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-03-18 03:42:48 +00:00
|
|
|
/**
|
|
|
|
* Defines label margin.
|
|
|
|
*
|
|
|
|
* @interface LabelMarginOptions
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-11-07 07:38:59 +00:00
|
|
|
export interface LabelMarginOptions {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Left label margin length.
|
|
|
|
*
|
|
|
|
* @type { ?Dimension }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-03-18 03:42:48 +00:00
|
|
|
/**
|
|
|
|
* Left label margin length.
|
|
|
|
*
|
|
|
|
* @type { ?Dimension }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-11-07 07:38:59 +00:00
|
|
|
left?: Dimension;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Right label margin length.
|
|
|
|
*
|
|
|
|
* @type { ?Dimension }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-03-18 03:42:48 +00:00
|
|
|
/**
|
|
|
|
* Right label margin length.
|
|
|
|
*
|
|
|
|
* @type { ?Dimension }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-11-07 07:38:59 +00:00
|
|
|
right?: Dimension;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Defines label option.
|
|
|
|
*
|
|
|
|
* @interface LabelOptions
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-03-18 03:42:48 +00:00
|
|
|
/**
|
|
|
|
* Defines label option.
|
|
|
|
*
|
|
|
|
* @interface LabelOptions
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-11-07 07:38:59 +00:00
|
|
|
export interface LabelOptions {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Text content.
|
|
|
|
*
|
|
|
|
* @type { string }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-03-18 03:42:48 +00:00
|
|
|
/**
|
|
|
|
* Text content.
|
|
|
|
*
|
|
|
|
* @type { string }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-11-07 07:38:59 +00:00
|
|
|
text: string;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Text font size.
|
|
|
|
*
|
|
|
|
* @type { ?Dimension }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-03-18 03:42:48 +00:00
|
|
|
/**
|
|
|
|
* Text font size.
|
|
|
|
*
|
|
|
|
* @type { ?Dimension }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-11-07 07:38:59 +00:00
|
|
|
fontSize?: Dimension;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Text font color.
|
|
|
|
*
|
|
|
|
* @type { ?ResourceColor }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-03-18 03:42:48 +00:00
|
|
|
/**
|
|
|
|
* Text font color.
|
|
|
|
*
|
|
|
|
* @type { ?ResourceColor }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-11-07 07:38:59 +00:00
|
|
|
fontColor?: ResourceColor;
|
|
|
|
|
2024-02-29 05:19:30 +00:00
|
|
|
/**
|
|
|
|
* Text font color when chip is activated.
|
|
|
|
*
|
|
|
|
* @type { ?ResourceColor }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @since 12
|
|
|
|
*/
|
|
|
|
activatedFontColor?: ResourceColor;
|
|
|
|
|
2023-11-07 07:38:59 +00:00
|
|
|
/**
|
|
|
|
* Text font family.
|
|
|
|
*
|
|
|
|
* @type { ?string }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-03-18 03:42:48 +00:00
|
|
|
/**
|
|
|
|
* Text font family.
|
|
|
|
*
|
|
|
|
* @type { ?string }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-11-07 07:38:59 +00:00
|
|
|
fontFamily?: string;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Label margin.
|
|
|
|
*
|
|
|
|
* @type { ?LabelMarginOptions }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-03-18 03:42:48 +00:00
|
|
|
/**
|
|
|
|
* Label margin.
|
|
|
|
*
|
|
|
|
* @type { ?LabelMarginOptions }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-11-07 07:38:59 +00:00
|
|
|
labelMargin?: LabelMarginOptions;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Defines chip options.
|
|
|
|
*
|
|
|
|
* @interface ChipOptions
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-03-18 03:42:48 +00:00
|
|
|
/**
|
|
|
|
* Defines chip options.
|
|
|
|
*
|
|
|
|
* @interface ChipOptions
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-11-07 07:38:59 +00:00
|
|
|
export interface ChipOptions {
|
|
|
|
/**
|
|
|
|
* Chip prefix icon.
|
|
|
|
*
|
|
|
|
* @type { ?PrefixIconOptions }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-03-18 03:42:48 +00:00
|
|
|
/**
|
|
|
|
* Chip prefix icon.
|
|
|
|
*
|
|
|
|
* @type { ?PrefixIconOptions }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-11-07 07:38:59 +00:00
|
|
|
prefixIcon?: PrefixIconOptions;
|
|
|
|
|
2024-04-29 13:35:23 +00:00
|
|
|
/**
|
|
|
|
* Chip prefix symbol.
|
|
|
|
*
|
|
|
|
* @type { ?SymbolOptions }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @since 12
|
|
|
|
*/
|
|
|
|
prefixSymbol?: SymbolOptions;
|
|
|
|
|
2023-11-07 07:38:59 +00:00
|
|
|
/**
|
|
|
|
* Chip label.
|
|
|
|
*
|
|
|
|
* @type { LabelOptions }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-03-18 03:42:48 +00:00
|
|
|
/**
|
|
|
|
* Chip label.
|
|
|
|
*
|
|
|
|
* @type { LabelOptions }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-11-07 07:38:59 +00:00
|
|
|
label: LabelOptions;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Chip suffix icon.
|
|
|
|
*
|
|
|
|
* @type { ?SuffixIconOptions }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-03-18 03:42:48 +00:00
|
|
|
/**
|
|
|
|
* Chip suffix icon.
|
|
|
|
*
|
|
|
|
* @type { ?SuffixIconOptions }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-11-07 07:38:59 +00:00
|
|
|
suffixIcon?: SuffixIconOptions;
|
|
|
|
|
2024-04-29 13:35:23 +00:00
|
|
|
/**
|
|
|
|
* Chip suffix symbol.
|
|
|
|
*
|
|
|
|
* @type { ?SymbolOptions }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @since 12
|
|
|
|
*/
|
|
|
|
suffixSymbol?: SymbolOptions;
|
|
|
|
|
2023-11-07 07:38:59 +00:00
|
|
|
/**
|
|
|
|
* Show close icon.
|
|
|
|
*
|
|
|
|
* @type { ?boolean }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-03-18 03:42:48 +00:00
|
|
|
/**
|
|
|
|
* Show close icon.
|
|
|
|
*
|
|
|
|
* @type { ?boolean }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-11-07 07:38:59 +00:00
|
|
|
allowClose?: boolean;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Enable chip.
|
|
|
|
*
|
|
|
|
* @type { ?boolean }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-03-18 03:42:48 +00:00
|
|
|
/**
|
|
|
|
* Enable chip.
|
|
|
|
*
|
|
|
|
* @type { ?boolean }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-11-07 07:38:59 +00:00
|
|
|
enabled?: boolean;
|
|
|
|
|
2024-02-29 05:19:30 +00:00
|
|
|
/**
|
|
|
|
* Set whether chip is active or not.
|
|
|
|
*
|
|
|
|
* @type { ?boolean }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @since 12
|
|
|
|
*/
|
|
|
|
activated?: boolean;
|
|
|
|
|
2023-11-07 07:38:59 +00:00
|
|
|
/**
|
|
|
|
* Chip background color.
|
|
|
|
*
|
|
|
|
* @type { ?ResourceColor }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-03-18 03:42:48 +00:00
|
|
|
/**
|
|
|
|
* Chip background color.
|
|
|
|
*
|
|
|
|
* @type { ?ResourceColor }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-11-07 07:38:59 +00:00
|
|
|
backgroundColor?: ResourceColor;
|
|
|
|
|
2024-02-29 05:19:30 +00:00
|
|
|
/**
|
|
|
|
* Chip background color when chip is activated.
|
|
|
|
*
|
|
|
|
* @type { ?ResourceColor }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @since 12
|
|
|
|
*/
|
|
|
|
activatedBackgroundColor?: ResourceColor;
|
|
|
|
|
2023-11-07 07:38:59 +00:00
|
|
|
/**
|
|
|
|
* Chip radius.
|
|
|
|
*
|
|
|
|
* @type { ?Dimension }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-03-18 03:42:48 +00:00
|
|
|
/**
|
|
|
|
* Chip radius.
|
|
|
|
*
|
|
|
|
* @type { ?Dimension }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-11-07 07:38:59 +00:00
|
|
|
borderRadius?: Dimension;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Chip size.
|
|
|
|
*
|
|
|
|
* @type { ?ChipSize | SizeOptions }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-03-18 03:42:48 +00:00
|
|
|
/**
|
|
|
|
* Chip size.
|
|
|
|
*
|
|
|
|
* @type { ?ChipSize | SizeOptions }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-11-07 07:38:59 +00:00
|
|
|
size?: ChipSize | SizeOptions;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* On close action.
|
|
|
|
*
|
|
|
|
* @type { ?function }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-03-18 03:42:48 +00:00
|
|
|
/**
|
|
|
|
* On close action.
|
|
|
|
*
|
|
|
|
* @type { ?function }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-11-07 07:38:59 +00:00
|
|
|
onClose?: () => void;
|
2024-02-29 05:19:30 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* On clicked action.
|
|
|
|
*
|
|
|
|
* @type { ?Callback<void> }
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @since 12
|
|
|
|
*/
|
|
|
|
onClicked?: Callback<void>;
|
2023-11-07 07:38:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Build function of Chip.
|
|
|
|
*
|
|
|
|
* @param { ChipOptions } options - chip option.
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @since 11
|
|
|
|
*/
|
2024-03-18 03:42:48 +00:00
|
|
|
/**
|
|
|
|
* Build function of Chip.
|
|
|
|
*
|
|
|
|
* @param { ChipOptions } options - chip option.
|
|
|
|
* @syscap SystemCapability.ArkUI.ArkUI.Full
|
|
|
|
* @crossplatform
|
|
|
|
* @atomicservice
|
|
|
|
* @since 12
|
|
|
|
*/
|
2023-11-07 07:38:59 +00:00
|
|
|
@Builder
|
|
|
|
export declare function Chip(options: ChipOptions): void;
|