9afce6f6创建于 2025年5月7日历史提交
/*
 * Copyright (c) 2024 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.
 */

/**
 * Common constants for common component.
 */
export default class CommonConstants {
  // opacity
  static readonly FIRST_LEVEL_OPACITY: number = 0.9;
  static readonly SECOND_LEVEL_OPACITY: number = 0.6;
  static readonly HALF_OPACITY: number = 0.5;
  // space
  static readonly SPACE_4: number = 4;
  static readonly SPACE_8: number = 8;
  static readonly SPACE_12: number = 12;
  // maxLines
  static readonly MAX_LINE_ONE: number = 1;
  static readonly MAX_LINE_TWO: number = 2;
  // percent
  static readonly FULL_PERCENT: string = '100%';
  // layout weight
  static readonly LAYOUT_WEIGHT: number = 1;
  // font weight
  static readonly LABEL_FONT_WEIGHT: number = 300
  static readonly HALF_FONT_WEIGHT: number = 450;
  static readonly LABEL_BUBBLE_FONT_WEIGHT: number = 700;
  static readonly PLACE_HOLDER_FONT_WEIGHT: number = 400;
  // height
  static readonly LIST_ITEM_HEIGHT: number = 400;
  static readonly LIST_ITEM_HEIGHT_TWO: number = 130;
  static readonly LIST_HEIGHT: number = 1755;
  static readonly ROW_HEIGHT: number = 150;
  static readonly LIST_ITEM_ROW_HEIGHT: number = 40;
  static readonly AVOID_AREA_HEIGHT: number = 500;
  static readonly BUBBLE_AREA_HEIGHT: number = 36;
  static readonly BUBBLE_CHECK_HEIGHT: number = 15;
  static readonly TEXT_HEIGHT: number = 30;
  static readonly ROW_HEIGHT_TWO: number = 30;
  static readonly ROW_HEIGHT_THREE: number = 30;
  static readonly BUTTON_HEIGHT: number = 40;
  static readonly ROW_HEIGHT_FOUR: number = 40;
  static readonly TEXT_AREA_HEIGHT: number = 70;
  static readonly STACK_HEIGHT: number = 80;
  static readonly STACK_HEIGHT_TWO: number = 40;
  static readonly TEXT_INPUT_HEIGHT: number = 80;
  static readonly IMAGE_HEIGHT: number = 15;
  static readonly IMAGE_HEIGHT_TWO: number = 18;
  // border width
  static readonly BORDER_WIDTH: number = 1;
  static readonly BORDER_RADIUS: number = 24;
  static readonly BORDER_RADIUS_TWO: number = 30;
  static readonly BORDER_RADIUS_THREE: number = 10;
  static readonly BUBBLE_BORDER_RADIUS: number = 55;
  static readonly BUBBLE_BORDER_RADIUS_TWO: number = 10;
  // aspect ratio
  static readonly IMAGE_ASPECT_RATIO_ONE: number = 1;
  static readonly IMAGE_ASPECT_RATIO_ONE_POINT_SIX: number = 1.6;
  // fontsize
  static readonly LABEL_NAME_FONTSIZE: number = 16;
  static readonly LABEL_FONTSIZE: number = 13;
  static readonly HALF_FONTSIZE: number = 18;
  static readonly HALF_FONTSIZE_TITLE: number = 19;
  static readonly TEXT_FONTSIZE: number = 18;
  static readonly BUBBLE_FONTSIZE: number = 12;
  static readonly PLACE_HOLDER_FONTSIZE: number = 14;
  static readonly BUBBLE_CHECK_FONTSIZE: number = 10;
  // size
  static readonly HALF_PADDING_BOTTOM: number = 15;
  static readonly PADDING_TOP: number = 20;
  static readonly PADDING_TOP_TWO: number = 10;
  static readonly PADDING_BOTTOM: number = 5;
  static readonly PADDING_LEFT: number = 13;
  static readonly PADDING_LEFT_TWO: number = 5;
  static readonly PADDING_RIGHT: number = 8;
  static readonly PADDING: number = 15;
  static readonly MARGIN_TOP: number = 10;
  static readonly MARGIN_TOP_TWO: number = 25;
  static readonly MARGIN_TOP_THREE: number = 45;
  static readonly MARGIN_TOP_FOUR: number = 55;
  static readonly MARGIN_LEFT: number = 20;
  static readonly MARGIN_LEFT_TWO: number = 35;
  static readonly MARGIN_LEFT_THREE: number = 5;
  static readonly MARGIN_RIGHT: number = 15;
  static readonly MARGIN_RIGHT_TWO: number = 5;
}

// 地址标签数组
export const ADDRESS_LABEL: string[] = ['家', '公司', '学校', '父母', '朋友', '亲戚'];