/*
* Copyright (c) 2025 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 class CommonConstants {
// Font family
static readonly HARMONY_HEI_TI_FONT_FAMILY = 'HarmonyHeiTi';
static readonly HARMONY_HEITI_MEDIUM_FONT_FAMILY = 'HarmonyHeiTi-Medium';
static readonly HARMONY_HEITI_BOLD_FONT_FAMILY = 'HarmonyHeiTi-Bold';
// Font weight
static readonly DIALOG_TITLE_FONT_WEIGHT: number = 700;
static readonly DIALOG_BUTTON_FONT_WEIGHT: number = 500;
static readonly NORMAL_FONT_WEIGHT: number = 400;
// Opacity
static readonly FIRST_LEVEL_OPACITY: number = 0.9;
static readonly SECOND_LEVEL_OPACITY: number = 0.6;
static readonly HALF_OPACITY: number = 0.5;
static readonly THIRD_LEVEL_OPACITY: number = 0.3;
static readonly Divider_OPACITY: number = 0.05;
// Blur
static readonly REGULAR_BLUR: number = 250;
// Space
static readonly SPACE_4: number = 4;
static readonly SPACE_8: number = 8;
static readonly SPACE_12: number = 12;
static readonly SPACE_16: number = 16;
// MaxLines
static readonly MAX_LINE_TWO: number = 2;
// Column count
static readonly SM_COLUMN_COUNT: number = 1;
static readonly MD_COLUMN_COUNT: number = 2;
static readonly LG_COLUMN_COUNT: number = 3;
// Swiper duration
static readonly SWIPER_DURATION: number = 1000;
// Percent
static readonly FULL_PERCENT: string = '100%';
static readonly HALF_PERCENT: string = '50%';
static readonly NAVI_BAR_WIDTH: string = '40%';
// Skeleton animation config
static readonly SKELETON_ANIMATION: AnimateParam = {
duration: 400,
tempo: 0.6,
curve: Curve.EaseInOut,
delay: 200,
iterations: -1,
playMode: PlayMode.Alternate
}
// Web UA
static readonly WEB_UA: string =
'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.134 Safari/537.36';
}