@luzmo/lucero 1.0.1-alpha.39 → 1.0.1-alpha.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -12,9 +12,26 @@ export declare const remapMultiByteCharacters: Record<string, string>;
|
|
|
12
12
|
* @slot negative-help-text - negative help text to associate to your form element when `invalid`
|
|
13
13
|
*/
|
|
14
14
|
export declare class LuzmoNumberField extends LuzmoTextFieldBase {
|
|
15
|
+
/**
|
|
16
|
+
* The styles for the number field.
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
15
19
|
static get styles(): CSSResultArray;
|
|
20
|
+
/**
|
|
21
|
+
* The buttons for the number field.
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
16
24
|
private buttons;
|
|
25
|
+
/**
|
|
26
|
+
* Whether the number field is focused.
|
|
27
|
+
* @default false
|
|
28
|
+
* @type {boolean}
|
|
29
|
+
*/
|
|
17
30
|
focused: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* The forced unit for the number field.
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
18
35
|
_forcedUnit: string;
|
|
19
36
|
/**
|
|
20
37
|
* An `<luzmo-number-field>` element will process its numeric value with
|
|
@@ -27,43 +44,147 @@ export declare class LuzmoNumberField extends LuzmoTextFieldBase {
|
|
|
27
44
|
formatOptions: Intl.NumberFormatOptions;
|
|
28
45
|
/**
|
|
29
46
|
* Whether the stepper UI is hidden or not.
|
|
47
|
+
* @attribute {boolean} hide-stepper
|
|
48
|
+
* @default false
|
|
49
|
+
* @type {boolean}
|
|
30
50
|
*/
|
|
31
51
|
hideStepper: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Whether the number field should grow to fit the content.
|
|
54
|
+
* @default false
|
|
55
|
+
* @type {boolean}
|
|
56
|
+
*/
|
|
57
|
+
grows: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Whether the number field is indeterminate (temporary UI state)
|
|
60
|
+
* @default false
|
|
61
|
+
* @type {boolean}
|
|
62
|
+
*/
|
|
32
63
|
indeterminate: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Whether the number field is keyboard focused.
|
|
66
|
+
* @default false
|
|
67
|
+
* @type {boolean}
|
|
68
|
+
*/
|
|
33
69
|
keyboardFocused: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* The maximum value for the number field.
|
|
72
|
+
* @default undefined
|
|
73
|
+
* @type {number}
|
|
74
|
+
*/
|
|
34
75
|
max?: number;
|
|
76
|
+
/**
|
|
77
|
+
* The minimum value for the number field.
|
|
78
|
+
* @default undefined
|
|
79
|
+
* @type {number}
|
|
80
|
+
*/
|
|
35
81
|
min?: number;
|
|
36
82
|
/**
|
|
37
83
|
* The distance by which to alter the value of the element when taking a "step".
|
|
38
84
|
*
|
|
39
85
|
* When `this.formatOptions.style === 'percentage'` the default step will be
|
|
40
86
|
* set to 0.01 unless otherwise supplied to the element.
|
|
87
|
+
* @default undefined
|
|
88
|
+
* @type {number}
|
|
41
89
|
*/
|
|
42
90
|
step?: number;
|
|
91
|
+
/**
|
|
92
|
+
* Whether the number field is managed input.
|
|
93
|
+
* @internal
|
|
94
|
+
*/
|
|
43
95
|
managedInput: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* The modifier for the step.
|
|
98
|
+
* @default 10
|
|
99
|
+
* @type {number}
|
|
100
|
+
*/
|
|
44
101
|
stepModifier: number;
|
|
45
102
|
set value(rawValue: number);
|
|
46
103
|
get value(): number;
|
|
47
104
|
private get inputValue();
|
|
105
|
+
/**
|
|
106
|
+
* The value of the number field.
|
|
107
|
+
* @internal
|
|
108
|
+
*/
|
|
48
109
|
_value: number;
|
|
110
|
+
/**
|
|
111
|
+
* The value of the number field being tracked.
|
|
112
|
+
* @internal
|
|
113
|
+
*/
|
|
49
114
|
private _trackingValue;
|
|
115
|
+
/**
|
|
116
|
+
* The last committed value of the number field.
|
|
117
|
+
* @internal
|
|
118
|
+
*/
|
|
50
119
|
private lastCommitedValue?;
|
|
120
|
+
/**
|
|
121
|
+
* Set the value of the number field.
|
|
122
|
+
* @internal
|
|
123
|
+
*/
|
|
51
124
|
private setValue;
|
|
52
125
|
/**
|
|
53
126
|
* Retreive the value of the element parsed to a Number.
|
|
127
|
+
* @internal
|
|
54
128
|
*/
|
|
55
129
|
get valueAsString(): string;
|
|
130
|
+
/**
|
|
131
|
+
* Set the value of the number field as a string.
|
|
132
|
+
* @internal
|
|
133
|
+
*/
|
|
56
134
|
set valueAsString(value: string);
|
|
135
|
+
/**
|
|
136
|
+
* The formatted value of the number field.
|
|
137
|
+
*/
|
|
57
138
|
get formattedValue(): string;
|
|
139
|
+
/**
|
|
140
|
+
* The decimals characters for the number field.
|
|
141
|
+
* @internal
|
|
142
|
+
*/
|
|
58
143
|
private decimalsChars;
|
|
144
|
+
/**
|
|
145
|
+
* The value before focus of the number field.
|
|
146
|
+
* @internal
|
|
147
|
+
*/
|
|
59
148
|
private valueBeforeFocus;
|
|
149
|
+
/**
|
|
150
|
+
* Whether the number field is intenting to use a decimal separator.
|
|
151
|
+
* @internal
|
|
152
|
+
*/
|
|
60
153
|
private isIntentDecimal;
|
|
154
|
+
/**
|
|
155
|
+
* Convert the input value to a number.
|
|
156
|
+
* @internal
|
|
157
|
+
*/
|
|
61
158
|
private convertValueToNumber;
|
|
159
|
+
/**
|
|
160
|
+
* The step for the number field.
|
|
161
|
+
* @internal
|
|
162
|
+
*/
|
|
62
163
|
private get _step();
|
|
164
|
+
/**
|
|
165
|
+
* The next change for the number field.
|
|
166
|
+
* @internal
|
|
167
|
+
*/
|
|
63
168
|
private nextChange;
|
|
169
|
+
/**
|
|
170
|
+
* The change count for the number field.
|
|
171
|
+
* @internal
|
|
172
|
+
*/
|
|
64
173
|
private changeCount;
|
|
174
|
+
/**
|
|
175
|
+
* The find change for the number field.
|
|
176
|
+
* @internal
|
|
177
|
+
*/
|
|
65
178
|
private findChange;
|
|
179
|
+
/**
|
|
180
|
+
* The change for the number field.
|
|
181
|
+
* @internal
|
|
182
|
+
*/
|
|
66
183
|
private change;
|
|
184
|
+
/**
|
|
185
|
+
* The safty for the number field.
|
|
186
|
+
* @internal
|
|
187
|
+
*/
|
|
67
188
|
private safty;
|
|
68
189
|
private languageResolver;
|
|
69
190
|
private handlePointerdown;
|
|
@@ -97,12 +218,36 @@ export declare class LuzmoNumberField extends LuzmoTextFieldBase {
|
|
|
97
218
|
protected get numberFormatter(): NumberFormatter;
|
|
98
219
|
protected clearValueFormatterCache(): void;
|
|
99
220
|
protected get valueFormatter(): NumberFormatter;
|
|
221
|
+
/**
|
|
222
|
+
* The number formatter for the number field.
|
|
223
|
+
* @internal
|
|
224
|
+
*/
|
|
100
225
|
private _numberFormatter?;
|
|
226
|
+
/**
|
|
227
|
+
* The number formatter for the number field when focused.
|
|
228
|
+
* @internal
|
|
229
|
+
*/
|
|
101
230
|
private _numberFormatterFocused?;
|
|
231
|
+
/**
|
|
232
|
+
* The value formatter for the number field.
|
|
233
|
+
* @internal
|
|
234
|
+
*/
|
|
102
235
|
private _valueFormatter?;
|
|
236
|
+
/**
|
|
237
|
+
* The number parser for the number field.
|
|
238
|
+
* @internal
|
|
239
|
+
*/
|
|
103
240
|
protected get numberParser(): NumberParser;
|
|
104
241
|
applyFocusElementLabel: (value?: string) => void;
|
|
242
|
+
/**
|
|
243
|
+
* The number parser for the number field.
|
|
244
|
+
* @internal
|
|
245
|
+
*/
|
|
105
246
|
private _numberParser?;
|
|
247
|
+
/**
|
|
248
|
+
* The number parser for the number field when focused.
|
|
249
|
+
* @internal
|
|
250
|
+
*/
|
|
106
251
|
private _numberParserFocused?;
|
|
107
252
|
protected renderField(): TemplateResult;
|
|
108
253
|
protected update(changes: PropertyValues): void;
|