1 | import { Color } from '../../color';
|
2 | import { ViewBase } from '../core/view-base';
|
3 | import { FontStyleType, FontVariationSettingsType, FontWeightType } from '../styling/font';
|
4 | import { CoreTypes } from '../../core-types';
|
5 |
|
6 | /**
|
7 | * A class used to create a single part of formatted string with a common text properties.
|
8 | */
|
9 | export class Span extends ViewBase {
|
10 | /**
|
11 | * Gets or sets the font family of the span.
|
12 | */
|
13 | public fontFamily: string;
|
14 |
|
15 | /**
|
16 | * Gets or sets the font size of the span.
|
17 | */
|
18 | public fontSize: number;
|
19 |
|
20 | /**
|
21 | * Gets or sets the font style of the span.
|
22 | */
|
23 | public fontStyle: FontStyleType;
|
24 |
|
25 | /**
|
26 | * Gets or sets the font weight of the span.
|
27 | */
|
28 | public fontWeight: FontWeightType;
|
29 |
|
30 | /**
|
31 | * Gets or sets the font variation settings of the span.
|
32 | */
|
33 | public fontVariationSettings: FontVariationSettingsType[];
|
34 |
|
35 | /**
|
36 | * Gets or sets text decorations for the span.
|
37 | */
|
38 | public textDecoration: CoreTypes.TextDecorationType;
|
39 |
|
40 | /**
|
41 | * Gets or sets the font foreground color of the span.
|
42 | */
|
43 | public color: Color;
|
44 |
|
45 | /**
|
46 | * Gets or sets the font background color of the span.
|
47 | */
|
48 | public backgroundColor: Color;
|
49 |
|
50 | /**
|
51 | * Defines whether accessibility font scale should affect font size.
|
52 | */
|
53 | iosAccessibilityAdjustsFontSize: boolean;
|
54 |
|
55 | /**
|
56 | * Gets or sets the minimum accessibility font scale.
|
57 | */
|
58 | iosAccessibilityMinFontScale: number;
|
59 |
|
60 | /**
|
61 | * Gets or sets the maximum accessibility font scale.
|
62 | */
|
63 | iosAccessibilityMaxFontScale: number;
|
64 |
|
65 | /**
|
66 | * Gets or sets the text for the span.
|
67 | */
|
68 | public text: string;
|
69 | /**
|
70 | * String value used when hooking to linkTap event.
|
71 | */
|
72 | public static linkTapEvent: string;
|
73 |
|
74 | /**
|
75 | * Gets if the span is tappable or not.
|
76 | */
|
77 | public readonly tappable: boolean;
|
78 |
|
79 | //@private
|
80 | /**
|
81 | * @private
|
82 | */
|
83 | _setTextInternal(value: string): void;
|
84 | //@endprivate
|
85 | }
|