@fluentui/web-components 3.0.0-beta.73 → 3.0.0-beta.74
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.
- package/CHANGELOG.md +11 -2
- package/dist/dts/text-input/text-input.d.ts +16 -6
- package/dist/esm/text-input/text-input.js +17 -9
- package/dist/esm/text-input/text-input.js.map +1 -1
- package/dist/web-components.d.ts +16 -6
- package/dist/web-components.js +17 -9
- package/dist/web-components.min.js +69 -69
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
# Change Log - @fluentui/web-components
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Fri, 06 Dec 2024 04:07:36 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [3.0.0-beta.74](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-beta.74)
|
|
8
|
+
|
|
9
|
+
Fri, 06 Dec 2024 04:07:36 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v3.0.0-beta.73..@fluentui/web-components_v3.0.0-beta.74)
|
|
11
|
+
|
|
12
|
+
### Changes
|
|
13
|
+
|
|
14
|
+
- add current-value attribute to text-input ([PR #33144](https://github.com/microsoft/fluentui/pull/33144) by 863023+radium-v@users.noreply.github.com)
|
|
15
|
+
|
|
7
16
|
## [3.0.0-beta.73](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-beta.73)
|
|
8
17
|
|
|
9
|
-
Thu, 07 Nov 2024 04:07:
|
|
18
|
+
Thu, 07 Nov 2024 04:07:40 GMT
|
|
10
19
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v3.0.0-beta.72..@fluentui/web-components_v3.0.0-beta.73)
|
|
11
20
|
|
|
12
21
|
### Changes
|
|
@@ -32,6 +32,22 @@ export declare class BaseTextInput extends FASTElement {
|
|
|
32
32
|
* HTML Attribute: `autofocus`
|
|
33
33
|
*/
|
|
34
34
|
autofocus: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* The current value of the input.
|
|
37
|
+
* @public
|
|
38
|
+
* @remarks
|
|
39
|
+
* HTML Attribute: `current-value`
|
|
40
|
+
*/
|
|
41
|
+
currentValue: string;
|
|
42
|
+
/**
|
|
43
|
+
* Tracks the current value of the input.
|
|
44
|
+
*
|
|
45
|
+
* @param prev - the previous value
|
|
46
|
+
* @param next - the next value
|
|
47
|
+
*
|
|
48
|
+
* @internal
|
|
49
|
+
*/
|
|
50
|
+
currentValueChanged(prev: string, next: string): void;
|
|
35
51
|
/**
|
|
36
52
|
* The default slotted content. This is the content that appears in the text field label.
|
|
37
53
|
*
|
|
@@ -203,12 +219,6 @@ export declare class BaseTextInput extends FASTElement {
|
|
|
203
219
|
* HTML Attribute: `type`
|
|
204
220
|
*/
|
|
205
221
|
type: TextInputType;
|
|
206
|
-
/**
|
|
207
|
-
* The current value of the input.
|
|
208
|
-
*
|
|
209
|
-
* @internal
|
|
210
|
-
*/
|
|
211
|
-
private _value;
|
|
212
222
|
/**
|
|
213
223
|
* A reference to the internal input element.
|
|
214
224
|
*
|
|
@@ -27,12 +27,6 @@ export class BaseTextInput extends FASTElement {
|
|
|
27
27
|
* HTML Attribute: `type`
|
|
28
28
|
*/
|
|
29
29
|
this.type = TextInputType.text;
|
|
30
|
-
/**
|
|
31
|
-
* The current value of the input.
|
|
32
|
-
*
|
|
33
|
-
* @internal
|
|
34
|
-
*/
|
|
35
|
-
this._value = this.initialValue;
|
|
36
30
|
/**
|
|
37
31
|
* Indicates that the value has been changed by the user.
|
|
38
32
|
*
|
|
@@ -46,6 +40,17 @@ export class BaseTextInput extends FASTElement {
|
|
|
46
40
|
*/
|
|
47
41
|
this.elementInternals = this.attachInternals();
|
|
48
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* Tracks the current value of the input.
|
|
45
|
+
*
|
|
46
|
+
* @param prev - the previous value
|
|
47
|
+
* @param next - the next value
|
|
48
|
+
*
|
|
49
|
+
* @internal
|
|
50
|
+
*/
|
|
51
|
+
currentValueChanged(prev, next) {
|
|
52
|
+
this.value = next;
|
|
53
|
+
}
|
|
49
54
|
/**
|
|
50
55
|
* Updates the control label visibility based on the presence of default slotted content.
|
|
51
56
|
*
|
|
@@ -115,12 +120,12 @@ export class BaseTextInput extends FASTElement {
|
|
|
115
120
|
*/
|
|
116
121
|
get value() {
|
|
117
122
|
Observable.track(this, 'value');
|
|
118
|
-
return this.
|
|
123
|
+
return this.currentValue;
|
|
119
124
|
}
|
|
120
125
|
set value(value) {
|
|
121
|
-
this.
|
|
126
|
+
this.currentValue = value;
|
|
122
127
|
if (this.$fastController.isConnected) {
|
|
123
|
-
this.control.value = value;
|
|
128
|
+
this.control.value = value !== null && value !== void 0 ? value : '';
|
|
124
129
|
this.setFormValue(value);
|
|
125
130
|
this.setValidity();
|
|
126
131
|
Observable.notify(this, 'value');
|
|
@@ -344,6 +349,9 @@ __decorate([
|
|
|
344
349
|
__decorate([
|
|
345
350
|
attr({ mode: 'boolean' })
|
|
346
351
|
], BaseTextInput.prototype, "autofocus", void 0);
|
|
352
|
+
__decorate([
|
|
353
|
+
attr({ attribute: 'current-value' })
|
|
354
|
+
], BaseTextInput.prototype, "currentValue", void 0);
|
|
347
355
|
__decorate([
|
|
348
356
|
observable
|
|
349
357
|
], BaseTextInput.prototype, "defaultSlottedNodes", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-input.js","sourceRoot":"","sources":["../../../src/text-input/text-input.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,uBAAuB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC7G,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAA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AAC,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;YACzG,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,EAAE;SAClC;KACF,CAAC;iDAC0B;AAUrB;IADN,IAAI;2CAC2C;AAezC;IADN,UAAU;mDAC4B;AAiTzC;;;;;GAKG;AACH,MAAM,OAAO,SAAU,SAAQ,aAAa;IAW1C;;;;OAIG;IACI,iBAAiB,CAAC,IAAqC,EAAE,IAAqC;QACnG,UAAU,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,EAAE,IAAI,EAAE,mBAAmB,CAAC,CAAC;IACrE,CAAC;IAYD;;;;OAIG;IACI,kBAAkB,CAAC,IAAsC,EAAE,IAAsC;QACtG,UAAU,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,EAAE,IAAI,EAAE,oBAAoB,CAAC,CAAC;IACtE,CAAC;CACF;AA7BQ;IADN,IAAI;6CACmC;AAmBjC;IADN,IAAI,CAAC,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;8CACM;AAqB5C,WAAW,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC"}
|
package/dist/web-components.d.ts
CHANGED
|
@@ -2484,6 +2484,22 @@ export declare class BaseTextInput extends FASTElement {
|
|
|
2484
2484
|
* HTML Attribute: `autofocus`
|
|
2485
2485
|
*/
|
|
2486
2486
|
autofocus: boolean;
|
|
2487
|
+
/**
|
|
2488
|
+
* The current value of the input.
|
|
2489
|
+
* @public
|
|
2490
|
+
* @remarks
|
|
2491
|
+
* HTML Attribute: `current-value`
|
|
2492
|
+
*/
|
|
2493
|
+
currentValue: string;
|
|
2494
|
+
/**
|
|
2495
|
+
* Tracks the current value of the input.
|
|
2496
|
+
*
|
|
2497
|
+
* @param prev - the previous value
|
|
2498
|
+
* @param next - the next value
|
|
2499
|
+
*
|
|
2500
|
+
* @internal
|
|
2501
|
+
*/
|
|
2502
|
+
currentValueChanged(prev: string, next: string): void;
|
|
2487
2503
|
/**
|
|
2488
2504
|
* The default slotted content. This is the content that appears in the text field label.
|
|
2489
2505
|
*
|
|
@@ -2655,12 +2671,6 @@ export declare class BaseTextInput extends FASTElement {
|
|
|
2655
2671
|
* HTML Attribute: `type`
|
|
2656
2672
|
*/
|
|
2657
2673
|
type: TextInputType;
|
|
2658
|
-
/**
|
|
2659
|
-
* The current value of the input.
|
|
2660
|
-
*
|
|
2661
|
-
* @internal
|
|
2662
|
-
*/
|
|
2663
|
-
private _value;
|
|
2664
2674
|
/**
|
|
2665
2675
|
* A reference to the internal input element.
|
|
2666
2676
|
*
|
package/dist/web-components.js
CHANGED
|
@@ -11751,12 +11751,6 @@ class BaseTextInput extends FASTElement {
|
|
|
11751
11751
|
constructor() {
|
|
11752
11752
|
super(...arguments);
|
|
11753
11753
|
this.type = TextInputType.text;
|
|
11754
|
-
/**
|
|
11755
|
-
* The current value of the input.
|
|
11756
|
-
*
|
|
11757
|
-
* @internal
|
|
11758
|
-
*/
|
|
11759
|
-
this._value = this.initialValue;
|
|
11760
11754
|
/**
|
|
11761
11755
|
* Indicates that the value has been changed by the user.
|
|
11762
11756
|
*
|
|
@@ -11770,6 +11764,17 @@ class BaseTextInput extends FASTElement {
|
|
|
11770
11764
|
*/
|
|
11771
11765
|
this.elementInternals = this.attachInternals();
|
|
11772
11766
|
}
|
|
11767
|
+
/**
|
|
11768
|
+
* Tracks the current value of the input.
|
|
11769
|
+
*
|
|
11770
|
+
* @param prev - the previous value
|
|
11771
|
+
* @param next - the next value
|
|
11772
|
+
*
|
|
11773
|
+
* @internal
|
|
11774
|
+
*/
|
|
11775
|
+
currentValueChanged(prev, next) {
|
|
11776
|
+
this.value = next;
|
|
11777
|
+
}
|
|
11773
11778
|
/**
|
|
11774
11779
|
* Updates the control label visibility based on the presence of default slotted content.
|
|
11775
11780
|
*
|
|
@@ -11839,12 +11844,12 @@ class BaseTextInput extends FASTElement {
|
|
|
11839
11844
|
*/
|
|
11840
11845
|
get value() {
|
|
11841
11846
|
Observable.track(this, "value");
|
|
11842
|
-
return this.
|
|
11847
|
+
return this.currentValue;
|
|
11843
11848
|
}
|
|
11844
11849
|
set value(value) {
|
|
11845
|
-
this.
|
|
11850
|
+
this.currentValue = value;
|
|
11846
11851
|
if (this.$fastController.isConnected) {
|
|
11847
|
-
this.control.value = value;
|
|
11852
|
+
this.control.value = value ?? "";
|
|
11848
11853
|
this.setFormValue(value);
|
|
11849
11854
|
this.setValidity();
|
|
11850
11855
|
Observable.notify(this, "value");
|
|
@@ -12064,6 +12069,9 @@ __decorateClass$3([attr], BaseTextInput.prototype, "autocomplete", 2);
|
|
|
12064
12069
|
__decorateClass$3([attr({
|
|
12065
12070
|
mode: "boolean"
|
|
12066
12071
|
})], BaseTextInput.prototype, "autofocus", 2);
|
|
12072
|
+
__decorateClass$3([attr({
|
|
12073
|
+
attribute: "current-value"
|
|
12074
|
+
})], BaseTextInput.prototype, "currentValue", 2);
|
|
12067
12075
|
__decorateClass$3([observable], BaseTextInput.prototype, "defaultSlottedNodes", 2);
|
|
12068
12076
|
__decorateClass$3([attr], BaseTextInput.prototype, "dirname", 2);
|
|
12069
12077
|
__decorateClass$3([attr({
|