diff --git a/BUILD.gn b/BUILD.gn index 9e3164720c9ebc438e035f6f5a00f2f3374a032c..6bc4bf42765efe5104d10bbaa66da51d1f6b62f7 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -18,6 +18,7 @@ import("//build/templates/metadata/module_info.gni") ohos_copy("ets_internal_api") { sources = [ "api/@internal/ets/index.d.ts", + "api/@internal/ets/lifecycle.d.ts", "api/@internal/global.d.ts", ] outputs = [ target_out_dir + "/$target_name/{{source_file_part}}" ] @@ -31,36 +32,42 @@ ohos_copy("ets_component") { "api/@internal/component/ets/alert_dialog.d.ts", "api/@internal/component/ets/alphabet_indexer.d.ts", "api/@internal/component/ets/animator.d.ts", + "api/@internal/component/ets/badge.d.ts", "api/@internal/component/ets/blank.d.ts", "api/@internal/component/ets/button.d.ts", "api/@internal/component/ets/calendar.d.ts", - "api/@internal/component/ets/camera.d.ts", "api/@internal/component/ets/circle.d.ts", "api/@internal/component/ets/column.d.ts", "api/@internal/component/ets/column_split.d.ts", "api/@internal/component/ets/common.d.ts", "api/@internal/component/ets/counter.d.ts", "api/@internal/component/ets/custom_dialog_controller.d.ts", - "api/@internal/component/ets/datapanel.d.ts", + "api/@internal/component/ets/data_panel.d.ts", + "api/@internal/component/ets/date_picker.d.ts", "api/@internal/component/ets/divider.d.ts", "api/@internal/component/ets/ellipse.d.ts", + "api/@internal/component/ets/enums.d.ts", "api/@internal/component/ets/flex.d.ts", "api/@internal/component/ets/forEach.d.ts", "api/@internal/component/ets/form_component.d.ts", - "api/@internal/component/ets/geometryView.d.ts", + "api/@internal/component/ets/gauge.d.ts", + "api/@internal/component/ets/geometry_view.d.ts", "api/@internal/component/ets/gesture.d.ts", "api/@internal/component/ets/grid.d.ts", "api/@internal/component/ets/gridItem.d.ts", "api/@internal/component/ets/grid_container.d.ts", + "api/@internal/component/ets/hyperlink.d.ts", "api/@internal/component/ets/image.d.ts", "api/@internal/component/ets/image_animator.d.ts", "api/@internal/component/ets/index.d.ts", "api/@internal/component/ets/lazyForEach.d.ts", + "api/@internal/component/ets/line.d.ts", "api/@internal/component/ets/list.d.ts", "api/@internal/component/ets/listItem.d.ts", - "api/@internal/component/ets/loadingProgress.d.ts", + "api/@internal/component/ets/loading_progress.d.ts", + "api/@internal/component/ets/marquee.d.ts", + "api/@internal/component/ets/navigation.d.ts", "api/@internal/component/ets/navigator.d.ts", - "api/@internal/component/ets/navigatorView.d.ts", "api/@internal/component/ets/pageTransition.d.ts", "api/@internal/component/ets/panel.d.ts", "api/@internal/component/ets/path.d.ts", @@ -72,9 +79,11 @@ ohos_copy("ets_component") { "api/@internal/component/ets/radio.d.ts", "api/@internal/component/ets/rating.d.ts", "api/@internal/component/ets/rect.d.ts", + "api/@internal/component/ets/refresh.d.ts", "api/@internal/component/ets/row.d.ts", "api/@internal/component/ets/row_split.d.ts", "api/@internal/component/ets/scroll.d.ts", + "api/@internal/component/ets/search.d.ts", "api/@internal/component/ets/shape.d.ts", "api/@internal/component/ets/slider.d.ts", "api/@internal/component/ets/span.d.ts", @@ -84,8 +93,13 @@ ohos_copy("ets_component") { "api/@internal/component/ets/tab_content.d.ts", "api/@internal/component/ets/tabs.d.ts", "api/@internal/component/ets/text.d.ts", + "api/@internal/component/ets/text_area.d.ts", + "api/@internal/component/ets/text_input.d.ts", + "api/@internal/component/ets/text_picker.d.ts", "api/@internal/component/ets/toggle.d.ts", + "api/@internal/component/ets/units.d.ts", "api/@internal/component/ets/video.d.ts", + "api/@internal/component/ets/web.d.ts", ] outputs = [ target_out_dir + "/$target_name/{{source_file_part}}" ] module_source_dir = target_out_dir + "/$target_name" @@ -111,9 +125,7 @@ ohos_copy("common_api") { "api/common/@system.prompt.d.ts", "api/common/@system.request.d.ts", "api/common/@system.router.d.ts", - "api/common/@system.sensor.d.ts", "api/common/@system.storage.d.ts", - "api/common/@system.vibrator.d.ts", ] outputs = [ target_out_dir + "/$target_name/{{source_file_part}}" ] module_source_dir = target_out_dir + "/$target_name" diff --git a/README.md b/README.md deleted file mode 100644 index 5c6f8b5693c4c30bd71c14bcc690392f47b74686..0000000000000000000000000000000000000000 --- a/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# Public JS API Repository - -- [Introduction](#section11660541593) - -## Introduction - -This repository is used to submit **d.ts** declaration files of JS APIs. - diff --git a/api/@internal/component/ets/ability_component.d.ts b/api/@internal/component/ets/ability_component.d.ts index 06bb6c2d78768190c05f83dd9c480b34b64f9897..6375574cc39f560f6a56539ff71a1e00758b4385 100644 --- a/api/@internal/component/ets/ability_component.d.ts +++ b/api/@internal/component/ets/ability_component.d.ts @@ -13,24 +13,95 @@ * limitations under the License. */ -import {CommonMethod} from "./common"; -import {Want} from "../../../ability/want"; +import { CommonMethod } from "./common"; +import { Want } from "../api/common/ability/want"; +/** + * controller of ability. + * @since 7 + * @systemapi + */ export declare class AbilityController { - constructor(); - startAbility(value: Want); - performBackPress(); - getStackCount(); + /** + * constructor. + */ + constructor(); + + /** + * load the ability in the AbilityComponent. + * Want: Capability description to be loaded + */ + startAbility(value: Want); + + /** + * Perform a return operation inside the AbilityComponent. + */ + performBackPress(); + + /** + * Obtains the number of tasks in the internal task stack of the AbilityComponent. + */ + getStackCount(); +} + +/** + * AbilityComponent constructor params. + * @since 7 + * @systemapi + */ +export declare interface AbilityComponentOptions { + /** + * Capability description to be loaded. + */ + want: Want; + + /** + * controller: Ability Controller. + */ + controller?: AbilityController; } -interface AbilityComponent extends CommonMethod { - (value: { want: Want, controller?: AbilityController }): AbilityComponent; +/** + * AbilityComponent inheritance abilitycomponentattribute. + * @since 7 + * @systemapi + */ +interface AbilityComponent extends AbilityComponentAttribute { + (value: AbilityComponentOptions): AbilityComponent; +} + +/** + * The attribute of ability. + * @since 7 + * @systemapi + */ +declare class AbilityComponentAttribute extends CommonMethod { + /** + * Callback when the abilityComponent environment starts up, after which the abilityController methods can be used. + */ + onReady(event: () => void): T; + + /** + * Callback when the abilityComponent environment is destroyed. + */ + onDestroy(event: () => void): T; + + /** + * This event is triggered when the abilityComponent loads the mobility. Name indicates the Ability name. + */ + onAbilityCreated(event: (name: string) => void): T; + + /** + * Internal to the AbilityComponent, which is triggered when the Ability moves to the foreground. + */ + onAbilityMoveToFront(event: () => void): T; - onReady(event: () => void): AbilityComponent; - onDestroy(event: () => void): AbilityComponent; - onAbilityCreated(event: (name: string) => void): AbilityComponent; - onAbilityMoveToFront(event: () => void): AbilityComponent; - onAbilityWillRemove(event: () => void): AbilityComponent; + /** + * Internal to the AbilityComponent, which is triggered before the Mobility is removed. + */ + onAbilityWillRemove(event: () => void): T; } +// Used for IDE. +export declare class AbilityComponentExtend extends AbilityComponentAttribute {} export declare const AbilityComponentInterface: AbilityComponent; diff --git a/api/@internal/component/ets/alert_dialog.d.ts b/api/@internal/component/ets/alert_dialog.d.ts index 620f47db15360d2d22437bfdba9591eda0e3cfa9..632988ed228461bbdb926bb7990f4400a2e10448 100644 --- a/api/@internal/component/ets/alert_dialog.d.ts +++ b/api/@internal/component/ets/alert_dialog.d.ts @@ -13,32 +13,193 @@ * limitations under the License. */ -import {CommonMethod, Resource} from "./common" - -interface AlertDialog extends CommonMethod { - show(value: { - title?: string | Resource; - message: string | Resource; - autoCancel?: boolean; - confirm?: { - value: string | Resource; - action: () => void; - }; - cancel?: () => void; - } | { - title?: string | Resource; - message: string | Resource; - autoCancel?: boolean; - primaryButton: { - value: string | Resource; - action: () => void; - }; - secondaryButton: { - value: string | Resource; - action: () => void; - }; - cancel?: () => void; - }); +import { ResourceColor } from "."; +import { Offset, ResourceStr } from "./units"; + +/** + * The alignment of dialog, + * @since 7 + */ +export declare enum DialogAlignment { + /** + * Vertical top alignment. + * @since 7 + */ + Top, + + /** + * Align vertically to the center. + * @since 7 + */ + Center, + + /** + * Vertical bottom alignment. + * @since 7 + */ + Bottom, + + /** + * Default alignment. + * @since 7 + */ + Default, +} + +/** + * Base param used for AlertDialog.show method. + * @since 7 + */ +export declare interface AlertDialogParam { + /** + * Title Properties + * @since 7 + */ + title?: ResourceStr; + + /** + * message Properties + * @since 7 + */ + message: ResourceStr; + + /** + * Allows users to click the mask layer to exit. + * @since 7 + */ + autoCancel?: boolean; + + /** + * Execute Cancel Function. + * @since 7 + */ + cancel?: () => void; + + /** + * Alignment in the vertical direction. + * @since 7 + */ + alignment?: DialogAlignment; + + /** + * Offset of the pop-up window relative to the alignment position. + * @since 7 + */ + offset?: Offset; + + /** + * Grid count of dialog. + * @since 7 + */ + gridCount?: number; } -export declare const AlertDialogInterface: AlertDialog; +/** + * Defines the AlertDialog with confirm button. + * @since 7 + */ +export declare interface AlertDialogParamWithConfirm extends AlertDialogParam { + /** + * Invoke the commit function. + * @since 7 + */ + confirm?: { + /** + * Text content of the confirmation button. + * @since 7 + */ + value: ResourceStr; + + /** + * Text color of the confirmation button. + * @since 7 + */ + fontColor?: ResourceColor; + + /** + * Backgound color of the confirmation button. + * @since 7 + */ + backgroundColor?: ResourceColor; + + /** + * Method executed by the callback. + * @since 7 + */ + action: () => void; + }; +} + +export declare interface AlertDialogParamWithButtons extends AlertDialogParam { + /** + * First button. + * @since 7 + */ + primaryButton: { + /** + * Text content of the confirmation button. + * @since 7 + */ + value: ResourceStr; + + /** + * Text color of the confirmation button. + * @since 7 + */ + fontColor?: ResourceColor; + + /** + * Backgound color of the confirmation button. + * @since 7 + */ + backgroundColor?: ResourceColor; + + /** + * Method executed by the callback. + * @since 7 + */ + action: () => void; + }; + + /** + * Second button. + * @since 7 + */ + secondaryButton: { + /** + * Text content of the confirmation button. + * @since 7 + */ + value: ResourceStr; + + /** + * Text color of the confirmation button. + * @since 7 + */ + fontColor?: ResourceColor; + + /** + * Backgound color of the confirmation button. + * @since 7 + */ + backgroundColor?: ResourceColor; + + /** + * Method executed by the callback. + * @since 7 + */ + action: () => void; + }; +} + +/** + * Defines AlertDialog which uses show method to show alert dialog. + * @since 7 + */ +export declare class AlertDialog { + /** + * Invoking method display. + * @since 7 + */ + static show(value: AlertDialogParamWithConfirm | AlertDialogParamWithButtons); +} diff --git a/api/@internal/component/ets/alphabet_indexer.d.ts b/api/@internal/component/ets/alphabet_indexer.d.ts index db74e50e4cf284eb1cde57d1d6ff21a9f618c22a..57aa49bc45496317188e5d3510b2ced89af72bb8 100644 --- a/api/@internal/component/ets/alphabet_indexer.d.ts +++ b/api/@internal/component/ets/alphabet_indexer.d.ts @@ -13,40 +13,117 @@ * limitations under the License. */ -import {CommonMethod, Color, Resource} from "./common"; -import {FontWeight, FontStyle} from "./text"; +import { CommonMethod } from "./common"; +import { ResourceColor, Font } from "./units"; +/** + * indexer align property. + * @since 7 + */ export declare enum IndexerAlign { - Left, - Right + /** + * A dialog box is displayed on the right of the index bar. + * @since 7 + */ + Left, + + /** + * A dialog box is displayed on the left of the index bar. + * @since 7 + */ + Right, } -interface AlphabetIndexer extends CommonMethod { - (value: {ArrayValue : Array, selected : number}): AlphabetIndexer; - - onSelected(event: (index: number) => void): AlphabetIndexer; - - color(value: Color | number | string | Resource): AlphabetIndexer; - - selectedColor(value: Color | number | string | Resource): AlphabetIndexer; - - popupColor(value: Color | number | string | Resource): AlphabetIndexer; - - selectedBackgroundColor(value: Color | number | string | Resource): AlphabetIndexer; - - popupBackground(value: Color | number | string | Resource): AlphabetIndexer; - - usingPopup(value: boolean): AlphabetIndexer; - - selectedFont(value: { size?: number, weight?: FontWeight, family?: string, style?: FontStyle}): AlphabetIndexer; - - popupFont(value: { size?: number, weight?: FontWeight, family?: string, style?: FontStyle}): AlphabetIndexer; - - iteamSize(value: string | number): AlphabetIndexer; - - font(value: { size?: number, weight?: FontWeight, family?: string, style?: FontStyle}): AlphabetIndexer; +/** + * Alphabet index bar. + * @since 7 + */ +interface AlphabetIndexer extends AlphabetIndexerAttribute { + /** + * ArrayValue: Alphabetical index string array. + * selected: ID of the selected item. + * @since 7 + */ + (value: { arrayValue: Array; selected: number }): AlphabetIndexer; +} - alignStyle(value: IndexerAlign): AlphabetIndexer; +/** + * Defines the alphabet index bar attribute functions. + * @since 7 + */ +declare class AlphabetIndexerAttribute extends CommonMethod { + /** + * Index bar selection callback. + * @since 7 + */ + onSelected(event: (index: number) => void): T; + + /** + * Definitions color. + * @since 7 + */ + color(value: ResourceColor): T; + + /** + * Select the text color. + * @since 7 + */ + selectedColor(value: ResourceColor): T; + + /** + * Font color of the pop-up prompt text. + * @since 7 + */ + popupColor(value: ResourceColor): T; + + /** + * Select the text background color. + * @since 7 + */ + selectedBackgroundColor(value: ResourceColor): T; + + /** + * Background color of the pop-up window index. + * @since 7 + */ + popupBackground(value: ResourceColor): T; + + /** + * Whether to use pop-up index hints. + * @since 7 + */ + usingPopup(value: boolean): T; + + /** + * Select the text text style, + * @since 7 + */ + selectedFont(value: Font): T; + + /** + * Select the text background color. + * @since 7 + */ + popupFont(value: Font): T; + + /** + * Size of the letter area on the letter index bar. The letter area is a square. Set the length of the square side. + * @since 7 + */ + itemSize(value: string | number): T; + + /** + * Definitions fonts. + * @since 7 + */ + font(value: Font): T; + + /** + * Alphabet index bar alignment style. The left and right alignment styles are supported, which affects the pop-up position of the pop-up window. + * @since 7 + */ + alignStyle(value: IndexerAlign): T; } export declare const AlphabetIndexerInterface: AlphabetIndexer; +export declare class AlphabetIndexerExtend extends AlphabetIndexerAttribute {} diff --git a/api/@internal/component/ets/animator.d.ts b/api/@internal/component/ets/animator.d.ts index 5b2b585be9b07839347aa037032d62c593f87dc0..55c27f5f673644ef8c0e040663572119fc1bdb29 100644 --- a/api/@internal/component/ets/animator.d.ts +++ b/api/@internal/component/ets/animator.d.ts @@ -13,54 +13,183 @@ * limitations under the License. */ -import {CommonMethod, AnimationStatus, Curve, FillMode, PlayMode} from "./common"; +import { CommonMethod } from "./common"; +import { AnimationStatus, Curve, FillMode, PlayMode } from "./enums"; +/** + * Customize spring properties. + * @since 7 + * @systemapi + */ export declare class SpringProp { - constructor(mass: number, stiffness: number, damping: number): SpringProp; + /** + * Constructor parameters + * @since 7 + * @systemapi + */ + constructor(mass: number, stiffness: number, damping: number); } +/** + * Spring animation model. You can build a spring animation based on the start point, end point, initial speed, and spring attributes. + * @since 7 + * @systemapi + */ export declare class SpringMotion { - constructor(start: number, end: number, velocity: number, prop: SpringProp): SpringMotion; + /** + * Constructor parameters + * @since 7 + * @systemapi + */ + constructor(start: number, end: number, velocity: number, prop: SpringProp); } +/** + * Friction animation model. You can build friction animation by friction force, initial position, and initial velocity. + * @since 7 + * @systemapi + */ export declare class FrictionMotion { - constructor(friction: number, position: number, velocity: number): FrictionMotion; + /** + * Constructor parameters + * @since 7 + * @systemapi + */ + constructor(friction: number, position: number, velocity: number); } +/** + * Rolling animation model: You can build rolling animation based on the initial position, initial speed, boundary position, and spring attributes. + * @since 7 + * @systemapi + */ export declare class ScrollMotion { - constructor(position: number, velocity: number, min: number, max: number, prop: SpringProp): ScrollMotion; + /** + * Constructor parameters + * @since 7 + * @systemapi + */ + constructor(position: number, velocity: number, min: number, max: number, prop: SpringProp); } -interface Animator extends CommonMethod { - (value: string): Animator; - - state(value: AnimationStatus): Animator; - - duration(value: number): Animator; - - curve(value: Curve): Animator; - - delay(value: number): Animator; - - fillMode(value: FillMode): Animator; - - iterations(value: number): Animator; - - playMode(value: PlayMode): Animator; - - motion(value: Motion): Animator; - - onStart(event: () => void): Animator; - - onPause(event: () => void): Animator; - - onRepeat(event: () => void): Animator; - - onCancel(event: () => void): Animator; - - onFinish(event: () => void): Animator; +/** + * Defines Animtor. + * @since 7 + * @systemapi + */ +interface Animator extends AnimatorAttribute { + /** + * Constructor parameters + * @since 7 + * @systemapi + */ + (value: string): Animator; +} - onFrame(event: (value: number) => void): Animator; +/** + * Defines AnimatorAttribute. + * @since 7 + * @systemapi + */ +declare class AnimatorAttribute extends CommonMethod { + /** + * Controls the playback status. The default value is the initial state. + * @since 7 + * @systemapi + */ + state(value: AnimationStatus): T; + + /** + * Animation duration, in milliseconds. + * @since 7 + * @systemapi + */ + duration(value: number): T; + + /** + * Animation curve, default to linear curve + * @since 7 + * @systemapi + */ + curve(value: Curve): T; + + /** + * Delayed animation playback duration, in milliseconds. By default, the animation is not delayed. + * @since 7 + * @systemapi + */ + delay(value: number): T; + + /** + * Sets the state before and after the animation starts. + * @since 7 + * @systemapi + */ + fillMode(value: FillMode): T; + + /** + * The default playback is once. If the value is -1, the playback is unlimited. + * @since 7 + * @systemapi + */ + iterations(value: number): T; + + /** + * Sets the animation playback mode. By default, the animation starts to play again after the playback is complete. + * @since 7 + * @systemapi + */ + playMode(value: PlayMode): T; + + /** + * Configure the physical animation algorithm. + * @since 7 + * @systemapi + */ + motion(value: SpringMotion | FrictionMotion | ScrollMotion): T; + + /** + * Status callback, which is triggered when the animation starts to play. + * @since 7 + * @systemapi + */ + onStart(event: () => void): T; + + /** + * Status callback, triggered when the animation pauses. + * @since 7 + * @systemapi + */ + onPause(event: () => void): T; + + /** + * Status callback, triggered when the animation is replayed. + * @since 7 + * @systemapi + */ + onRepeat(event: () => void): T; + + /** + * Status callback, which is triggered when the animation is canceled. + * @since 7 + * @systemapi + */ + onCancel(event: () => void): T; + + /** + * Status callback, which is triggered when the animation playback is complete. + * @since 7 + * @systemapi + */ + onFinish(event: () => void): T; + + /** + * The callback input parameter is the interpolation during animation playback. + * @since 7 + * @systemapi + */ + onFrame(event: (value: number) => void): T; } -export declare const AnimatorInterface: Animator; \ No newline at end of file +export declare class AnimatorExtend extends AnimatorAttribute {} +export declare const AnimatorInterface: Animator; diff --git a/api/@internal/component/ets/badge.d.ts b/api/@internal/component/ets/badge.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..8b955feb71a2e526e139d3d2613d493cdc4ec93c --- /dev/null +++ b/api/@internal/component/ets/badge.d.ts @@ -0,0 +1,152 @@ +/* + * Copyright (c) 2021 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. + */ + +import { CommonMethod } from "./common"; +import { ResourceColor } from "./units"; + +/** + * Defines the badge position property. + * @since 7 + */ +export declare enum BadgePosition { + /** + * The dot is displayed vertically centered on the right. + * @since 7 + */ + RightTop, + + /** + * Dots are displayed in the upper right corner. + * @since 7 + */ + Right, + + /** + * The dot is displayed in the left vertical center. + * @since 7 + */ + Left, +} + +/** + * BadgeStyle object + * @since 7 + */ +export declare interface BadgeStyle { + /** + * Text Color + * @since 7 + */ + color?: ResourceColor; + + /** + * Text size. + * @since 7 + */ + fontSize?: number | string; + + /** + * Size of a badge. + * @since 7 + */ + badgeSize?: number | string; + + /** + * Color of the badge. + * @since 7 + */ + badgeColor?: ResourceColor; +} + +/** + * Defines the base param of badge. + * @since 7 + */ +export declare interface BadgeParam { + /** + * Set the display position of the prompt point. + * @since 7 + */ + position?: BadgePosition; + + /** + * Defines the style of the Badge component, including the text color, size, dot color, and size. + * @since 7 + */ + style: BadgeStyle; +} + +/** + * Defines the badge param with count and maxCount. + * @since 7 + */ +export declare interface BadgeParamWithNumber extends BadgeParam { + /** + * Set the number of reminder messages. + * @since 7 + */ + count: number; + + /** + * Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. + * @since 7 + */ + maxCount?: number; +} + +/** + * Defines the badge param with string value. + * @since 7 + */ +export declare interface BadgeParamWithString extends BadgeParam { + /** + * Text string of the prompt content. + * @since 7 + */ + value: string; +} + +/** + * Defines Badge Componrnt. + * @since 7 + */ +interface Badge extends BadgeAttribute { + /** + * 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. + * @since 7 + */ + (value: BadgeParamWithNumber): Badge; + + /** + * 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. + * @since 7 + */ + (value: BadgeParamWithString): Badge; +} + +/** + * Defines Badge Componrnt attribute. + * @since 7 + */ +declare class BadgeAttribute extends CommonMethod {} + +export declare class BadgeExtend extends BadgeAttribute {} +export declare const BadgeInterface: Badge; diff --git a/api/@internal/component/ets/blank.d.ts b/api/@internal/component/ets/blank.d.ts index 91fcb25f9be5d7aedb4be61b2458ea3517049bbe..782cf284d358d31b6fe8f024728e09efd3114b4b 100644 --- a/api/@internal/component/ets/blank.d.ts +++ b/api/@internal/component/ets/blank.d.ts @@ -13,12 +13,32 @@ * limitations under the License. */ -import {CommonMethod, Color, Resource} from "./common" +import { CommonMethod } from "./common"; +import { ResourceColor } from "./units"; -interface Blank extends CommonMethod { +/** + * Create Blank. + * @since 7 + */ +interface Blank extends BlankAttribute { + /** + * The minimum size of the blank fill assembly on the container spindle. + * @since 7 + */ (min?: number | string): Blank; +} - color(value: Color | number | string | Resource): Blank; +/** + * Inheritance CommonMethod Set Styles + * @since 7 + */ +declare class BlankAttribute extends CommonMethod { + /** + * color: set color. + * @since 7 + */ + color(value: ResourceColor): T; } -export declare const BlankInterface: Blank \ No newline at end of file +export declare class BlankExtend extends BlankAttribute {} +export declare const BlankInterface: Blank; diff --git a/api/@internal/component/ets/button.d.ts b/api/@internal/component/ets/button.d.ts index a27720e294d7dac0d8792f5fd9b4207fd7ff487a..8eab0ed01ace07c182085ccdc22b55e3f2c48d3b 100644 --- a/api/@internal/component/ets/button.d.ts +++ b/api/@internal/component/ets/button.d.ts @@ -13,32 +13,111 @@ * limitations under the License. */ -import {CommonMethod, Color, Resource} from "./common" -import {FontWeight} from "./text" +import { CommonMethod } from "./common"; +import { FontWeight } from "./enums"; +import { Length, ResourceColor, ResourceStr } from "./units"; +/** + * Provides a button component. + * @since 7 + */ export declare enum ButtonType { + /** + * Capsule button (rounded corners default to half the height). + * @since 7 + */ Capsule, + + /** + * Round buttons. + * @since 7 + */ Circle, - Arc, - Normal + + /** + * Common button (no rounded corners by default). + * @since 7 + */ + Normal, +} + +/** + * Defines the button options. + * @since 7 + */ +export declare interface ButtonOption { + /** + * Describes the button style. + * @since 7 + */ + type?: ButtonType; + + /** + * Indicates whether to enable the switchover effect when the button is pressed. When the status is set to false, the switchover effect is disabled. + * @since 7 + */ + stateEffect?: boolean; } -interface Button extends CommonMethod