diff --git a/BUILD.gn b/BUILD.gn index f7d21c2b719f1c13aeff64807f7f9667bf0501ae..4c6cde11597a94c38c1c42e432690c2dcaf5cb7d 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -28,7 +28,6 @@ ohos_copy("ets_internal_api") { ohos_copy("ets_component") { sources = [ - "api/@internal/component/ets/ability_component.d.ts", "api/@internal/component/ets/action_sheet.d.ts", "api/@internal/component/ets/alert_dialog.d.ts", "api/@internal/component/ets/alphabet_indexer.d.ts", @@ -37,27 +36,26 @@ ohos_copy("ets_component") { "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/canvas.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/datePicker.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/gauge.d.ts", - "api/@internal/component/ets/geometryView.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", @@ -65,12 +63,10 @@ ohos_copy("ets_component") { "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/menu.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/option.d.ts", "api/@internal/component/ets/pageTransition.d.ts", "api/@internal/component/ets/panel.d.ts", "api/@internal/component/ets/path.d.ts", @@ -82,23 +78,31 @@ 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/scroll_bar.d.ts", + "api/@internal/component/ets/search.d.ts", "api/@internal/component/ets/shape.d.ts", + "api/@internal/component/ets/sheet.d.ts", "api/@internal/component/ets/slider.d.ts", "api/@internal/component/ets/span.d.ts", "api/@internal/component/ets/stack.d.ts", "api/@internal/component/ets/stateManagement.d.ts", + "api/@internal/component/ets/stepper.d.ts", + "api/@internal/component/ets/stepperItem.d.ts", "api/@internal/component/ets/swiper.d.ts", "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/textPicker.d.ts", - "api/@internal/component/ets/textarea.d.ts", - "api/@internal/component/ets/textinput.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/xcomponent.d.ts", ] outputs = [ target_out_dir + "/$target_name/{{source_file_part}}" ] module_source_dir = target_out_dir + "/$target_name" @@ -107,6 +111,7 @@ ohos_copy("ets_component") { ohos_copy("common_api") { sources = [ + "api/@ohos.wifi.d.ts", "api/common/@system.app.d.ts", "api/common/@system.battery.d.ts", "api/common/@system.bluetooth.d.ts", @@ -133,6 +138,16 @@ ohos_copy("common_api") { module_install_name = "" } +ohos_copy("bundle_api") { + sources = [ + "api/bundle/bundleFlag.d.ts", + "api/bundle/bundleStatusCallback.d.ts", + ] + outputs = [ target_out_dir + "/$target_name/{{source_file_part}}" ] + module_source_dir = target_out_dir + "/$target_name" + module_install_name = "" +} + template("ohos_declaration_template") { forward_variables_from(invoker, "*") action_with_pydeps(target_name) { diff --git a/api/@internal/component/ets/action_sheet.d.ts b/api/@internal/component/ets/action_sheet.d.ts index 26a0620988ba02a72140f0e6594110ea990e3817..54d279ddb60d4f1a0762b9d161a77e0b06f1cb61 100644 --- a/api/@internal/component/ets/action_sheet.d.ts +++ b/api/@internal/component/ets/action_sheet.d.ts @@ -14,34 +14,100 @@ */ import { DialogAlignment } from "./alert_dialog"; -import {CommonMethod, Resource} from "./common" +import { Resource } from "."; +/** + * The information of sheet. + * @since 8 + */ interface SheetInfo { + /** + * Title Properties + * @since 8 + */ title: string | Resource; - icon?: string | Resource; - action: () => void; -} -export declare class ActionSheetExtend extends ActionSheetAttribute { -} + /** + * Icon Properties. + * @since 8 + */ + icon?: string | Resource; -interface ActionSheet extends ActionSheetAttribute { + /** + * Callback method after the operation. + * @since 8 + */ + action: () => void; } -declare class ActionSheetAttribute extends CommonMethod { - show(value: { +/** + * Declare the ActionSheet + * @since 8 + */ +export declare class ActionSheet { + /** + * Invoking method display. + * @since 8 + */ + static show(value: { + /** + * Title Properties + * @since 8 + */ title: string | Resource; + + /** + * message Properties + * @since 8 + */ message: string | Resource; + + /** + * Invoke the commit function. + * @since 8 + */ confirm?: { + /** + * Text content of the confirmation button. + * @since 8 + */ value: string | Resource; + + /** + * Method executed by the callback. + * @since 8 + */ action: () => void; }; + + /** + * Execute Cancel Function. + * @since 8 + */ cancel?: () => void; + + /** + * The Array of sheets + * @since 8 + */ sheets: Array; + + /** + * Allows users to click the mask layer to exit. + * @since 8 + */ autoCancel?: boolean; + + /** + * Alignment in the vertical direction. + * @since 8 + */ alignment?: DialogAlignment; - offset?: { dx: number | string | Resource, dy: number | string | Resource }; + + /** + * Offset of the pop-up window relative to the alignment position. + * @since 8 + */ + offset?: { dx: number | string | Resource; dy: number | string | Resource }; }); } - -export declare const ActionSheetInterface: ActionSheet; diff --git a/api/@internal/component/ets/alert_dialog.d.ts b/api/@internal/component/ets/alert_dialog.d.ts index 361b9823cc132048c5780b626f13d481cb3cfdf3..6a017f1979cf95ffff7bc8ba45c07796a9d40f3c 100644 --- a/api/@internal/component/ets/alert_dialog.d.ts +++ b/api/@internal/component/ets/alert_dialog.d.ts @@ -1,55 +1,205 @@ -/* - * 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, Resource} from "./common" - -export declare enum DialogAlignment { - Top, - Center, - Bottom, - Default -} - -interface AlertDialog { - show(value: { - title?: string | Resource; - message: string | Resource; - autoCancel?: boolean; - confirm?: { - value: string | Resource; - action: () => void; - }; - cancel?: () => void; - alignment?: DialogAlignment; - offset?: { dx: number | string | Resource, dy: number | string | Resource }; - } | { - title?: string | Resource; - message: string | Resource; - autoCancel?: boolean; - primaryButton: { - value: string | Resource; - action: () => void; - }; - secondaryButton: { - value: string | Resource; - action: () => void; - }; - cancel?: () => void; - alignment?: DialogAlignment; - offset?: { dx: number | string | Resource, dy: number | string | Resource }; - }); -} - -export declare const AlertDialogInterface: AlertDialog; +/* + * 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 { 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; +} + +/** + * 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; + + /** + * Background 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; + + /** + * Background 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; + + /** + * Background 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 27d0858af6d35065cd5795a3082390cb79f7ef05..57aa49bc45496317188e5d3510b2ced89af72bb8 100644 --- a/api/@internal/component/ets/alphabet_indexer.d.ts +++ b/api/@internal/component/ets/alphabet_indexer.d.ts @@ -13,45 +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 { + /** + * A dialog box is displayed on the right of the index bar. + * @since 7 + */ Left, - Right -} -export declare class AlphabetIndexerExtend extends AlphabetIndexerAttribute { + /** + * A dialog box is displayed on the left of the index bar. + * @since 7 + */ + Right, } +/** + * Alphabet index bar. + * @since 7 + */ interface AlphabetIndexer extends AlphabetIndexerAttribute { - (value: {ArrayValue : Array, selected : number}): AlphabetIndexer; + /** + * ArrayValue: Alphabetical index string array. + * selected: ID of the selected item. + * @since 7 + */ + (value: { arrayValue: Array; selected: number }): 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; - color(value: Color | number | string | Resource): T; - - selectedColor(value: Color | number | string | Resource): T; - - popupColor(value: Color | number | string | Resource): T; - - selectedBackgroundColor(value: Color | number | string | Resource): T; - - popupBackground(value: Color | number | string | Resource): 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; - selectedFont(value: { size?: number, weight?: FontWeight, family?: string, style?: FontStyle}): T; - - popupFont(value: { size?: number, weight?: FontWeight, family?: string, style?: FontStyle}): 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; - font(value: { size?: number, weight?: FontWeight, family?: string, style?: FontStyle}): 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 2e51167d79395db85b2229575965e5b04518afca..55c27f5f673644ef8c0e040663572119fc1bdb29 100644 --- a/api/@internal/component/ets/animator.d.ts +++ b/api/@internal/component/ets/animator.d.ts @@ -13,59 +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 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 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 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 parameters + * @since 7 + * @systemapi + */ constructor(position: number, velocity: number, min: number, max: number, prop: SpringProp); } -export declare class AnimatorExtend extends AnimatorAttribute { -} - +/** + * Defines Animtor. + * @since 7 + * @systemapi + */ interface Animator extends AnimatorAttribute { + /** + * Constructor parameters + * @since 7 + * @systemapi + */ (value: string): 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 index 49587d21ee2bd80205bd31d44c626d767193c63c..8b955feb71a2e526e139d3d2613d493cdc4ec93c 100644 --- a/api/@internal/component/ets/badge.d.ts +++ b/api/@internal/component/ets/badge.d.ts @@ -1,42 +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, Color} from "./common" - -declare enum BadgePosition { - Right, - RightTop, - Left -} - -interface BadgeStyle { - color?: Color; - fontSize?: number | string; - badgeSize?: number | string; - badgeColor: Color; -} - -export declare class BadgeExtend extends BadgeAttribute { -} - -interface Badge extends BadgeAttribute { - (value: {count: number, position?: BadgePosition, maxCount?: number, style?: BadgeStyle}): Badge; - (value: {value: string, position?: BadgePosition, maxCount?: number, style?: BadgeStyle}): Badge; -} - -declare class BadgeAttribute extends CommonMethod { -} - -export declare const BadgeInterface: Badge \ No newline at end of file +/* + * 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 42a841d29d59dd3b8c6f03ffbf8ae2ab277b198a..782cf284d358d31b6fe8f024728e09efd3114b4b 100644 --- a/api/@internal/component/ets/blank.d.ts +++ b/api/@internal/component/ets/blank.d.ts @@ -13,17 +13,32 @@ * limitations under the License. */ -import {CommonMethod, Color, Resource} from "./common" - -export declare class BlankExtend extends BlankAttribute { -} +import { CommonMethod } from "./common"; +import { ResourceColor } from "./units"; +/** + * 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; } +/** + * Inheritance CommonMethod Set Styles + * @since 7 + */ declare class BlankAttribute extends CommonMethod { - color(value: Color | number | string | Resource): T; + /** + * 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 8f7fd66a661e841cab04781a665e23344d266a7b..86a59621195612a5e429072bb1bc73ed418a0424 100644 --- a/api/@internal/component/ets/button.d.ts +++ b/api/@internal/component/ets/button.d.ts @@ -13,37 +13,124 @@ * limitations under the License. */ -import {CommonMethod, Color, Resource} from "./common" -import {FontWeight} from "./text" +import { Resource } from '.'; +import { CommonMethod } from "./common"; +import { FontWeight, FontStyle } 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, } -export declare class ButtonExtend extends ButtonAttribute { +/** + * 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; } +/** + * Defines the Button Component. + * @since 7 + */ interface Button extends ButtonAttribute