@fluentui/web-components 3.0.0-beta.110 → 3.0.0-beta.111
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/custom-elements.json +55 -130
- package/dist/esm/button/button.base.d.ts +3 -10
- package/dist/esm/button/button.base.js +20 -10
- package/dist/esm/button/button.base.js.map +1 -1
- package/dist/esm/button/button.template.js +0 -1
- package/dist/esm/button/button.template.js.map +1 -1
- package/dist/esm/checkbox/checkbox.base.js +11 -0
- package/dist/esm/checkbox/checkbox.base.js.map +1 -1
- package/dist/esm/checkbox/checkbox.template.js +0 -1
- package/dist/esm/checkbox/checkbox.template.js.map +1 -1
- package/dist/esm/radio/radio.d.ts +0 -1
- package/dist/esm/radio/radio.js +0 -7
- package/dist/esm/radio/radio.js.map +1 -1
- package/dist/esm/radio-group/radio-group.js +2 -2
- package/dist/esm/radio-group/radio-group.js.map +1 -1
- package/dist/web-components.d.ts +2 -10
- package/dist/web-components.js +18 -17
- package/dist/web-components.min.js +96 -96
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
# Change Log - @fluentui/web-components
|
|
2
2
|
|
|
3
|
-
This log was last generated on Tue,
|
|
3
|
+
This log was last generated on Tue, 01 Jul 2025 04:08:16 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [3.0.0-beta.111](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-beta.111)
|
|
8
|
+
|
|
9
|
+
Tue, 01 Jul 2025 04:08:16 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v3.0.0-beta.110..@fluentui/web-components_v3.0.0-beta.111)
|
|
11
|
+
|
|
12
|
+
### Changes
|
|
13
|
+
|
|
14
|
+
- refactor: move tabindex logic into JS class ([PR #34741](https://github.com/microsoft/fluentui/pull/34741) by machi@microsoft.com)
|
|
15
|
+
|
|
7
16
|
## [3.0.0-beta.110](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-beta.110)
|
|
8
17
|
|
|
9
|
-
Tue, 24 Jun 2025 04:06:
|
|
18
|
+
Tue, 24 Jun 2025 04:06:55 GMT
|
|
10
19
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v3.0.0-beta.109..@fluentui/web-components_v3.0.0-beta.110)
|
|
11
20
|
|
|
12
21
|
### Changes
|
package/custom-elements.json
CHANGED
|
@@ -9622,11 +9622,17 @@
|
|
|
9622
9622
|
"kind": "field",
|
|
9623
9623
|
"name": "disabled",
|
|
9624
9624
|
"type": {
|
|
9625
|
-
"text": "boolean
|
|
9625
|
+
"text": "boolean"
|
|
9626
9626
|
},
|
|
9627
|
+
"default": "false",
|
|
9627
9628
|
"description": "Sets the element's disabled state.",
|
|
9628
9629
|
"privacy": "public"
|
|
9629
9630
|
},
|
|
9631
|
+
{
|
|
9632
|
+
"kind": "method",
|
|
9633
|
+
"name": "disabledChanged",
|
|
9634
|
+
"privacy": "protected"
|
|
9635
|
+
},
|
|
9630
9636
|
{
|
|
9631
9637
|
"kind": "field",
|
|
9632
9638
|
"name": "disabledFocusable",
|
|
@@ -9637,16 +9643,6 @@
|
|
|
9637
9643
|
"default": "false",
|
|
9638
9644
|
"description": "Indicates that the button is focusable while disabled."
|
|
9639
9645
|
},
|
|
9640
|
-
{
|
|
9641
|
-
"kind": "field",
|
|
9642
|
-
"name": "tabIndex",
|
|
9643
|
-
"type": {
|
|
9644
|
-
"text": "number"
|
|
9645
|
-
},
|
|
9646
|
-
"privacy": "public",
|
|
9647
|
-
"default": "0",
|
|
9648
|
-
"description": "Sets that the button tabindex attribute"
|
|
9649
|
-
},
|
|
9650
9646
|
{
|
|
9651
9647
|
"kind": "field",
|
|
9652
9648
|
"name": "form",
|
|
@@ -9824,8 +9820,9 @@
|
|
|
9824
9820
|
},
|
|
9825
9821
|
{
|
|
9826
9822
|
"type": {
|
|
9827
|
-
"text": "boolean
|
|
9823
|
+
"text": "boolean"
|
|
9828
9824
|
},
|
|
9825
|
+
"default": "false",
|
|
9829
9826
|
"description": "Sets the element's disabled state.",
|
|
9830
9827
|
"fieldName": "disabled"
|
|
9831
9828
|
},
|
|
@@ -9838,15 +9835,6 @@
|
|
|
9838
9835
|
"description": "Indicates that the button is focusable while disabled.",
|
|
9839
9836
|
"fieldName": "disabledFocusable"
|
|
9840
9837
|
},
|
|
9841
|
-
{
|
|
9842
|
-
"name": "tabindex",
|
|
9843
|
-
"type": {
|
|
9844
|
-
"text": "number"
|
|
9845
|
-
},
|
|
9846
|
-
"default": "0",
|
|
9847
|
-
"description": "Sets that the button tabindex attribute",
|
|
9848
|
-
"fieldName": "tabIndex"
|
|
9849
|
-
},
|
|
9850
9838
|
{
|
|
9851
9839
|
"name": "formaction",
|
|
9852
9840
|
"type": {
|
|
@@ -10019,8 +10007,9 @@
|
|
|
10019
10007
|
"kind": "field",
|
|
10020
10008
|
"name": "disabled",
|
|
10021
10009
|
"type": {
|
|
10022
|
-
"text": "boolean
|
|
10010
|
+
"text": "boolean"
|
|
10023
10011
|
},
|
|
10012
|
+
"default": "false",
|
|
10024
10013
|
"description": "Sets the element's disabled state.",
|
|
10025
10014
|
"privacy": "public",
|
|
10026
10015
|
"inheritedFrom": {
|
|
@@ -10029,14 +10018,9 @@
|
|
|
10029
10018
|
}
|
|
10030
10019
|
},
|
|
10031
10020
|
{
|
|
10032
|
-
"kind": "
|
|
10033
|
-
"name": "
|
|
10034
|
-
"
|
|
10035
|
-
"text": "boolean"
|
|
10036
|
-
},
|
|
10037
|
-
"privacy": "public",
|
|
10038
|
-
"default": "false",
|
|
10039
|
-
"description": "Indicates that the button is focusable while disabled.",
|
|
10021
|
+
"kind": "method",
|
|
10022
|
+
"name": "disabledChanged",
|
|
10023
|
+
"privacy": "protected",
|
|
10040
10024
|
"inheritedFrom": {
|
|
10041
10025
|
"name": "BaseButton",
|
|
10042
10026
|
"module": "src/button/button.base.ts"
|
|
@@ -10044,13 +10028,13 @@
|
|
|
10044
10028
|
},
|
|
10045
10029
|
{
|
|
10046
10030
|
"kind": "field",
|
|
10047
|
-
"name": "
|
|
10031
|
+
"name": "disabledFocusable",
|
|
10048
10032
|
"type": {
|
|
10049
|
-
"text": "
|
|
10033
|
+
"text": "boolean"
|
|
10050
10034
|
},
|
|
10051
10035
|
"privacy": "public",
|
|
10052
|
-
"default": "
|
|
10053
|
-
"description": "
|
|
10036
|
+
"default": "false",
|
|
10037
|
+
"description": "Indicates that the button is focusable while disabled.",
|
|
10054
10038
|
"inheritedFrom": {
|
|
10055
10039
|
"name": "BaseButton",
|
|
10056
10040
|
"module": "src/button/button.base.ts"
|
|
@@ -10290,8 +10274,9 @@
|
|
|
10290
10274
|
"attributes": [
|
|
10291
10275
|
{
|
|
10292
10276
|
"type": {
|
|
10293
|
-
"text": "boolean
|
|
10277
|
+
"text": "boolean"
|
|
10294
10278
|
},
|
|
10279
|
+
"default": "false",
|
|
10295
10280
|
"description": "Indicates the button should be focused when the page is loaded.",
|
|
10296
10281
|
"fieldName": "autofocus",
|
|
10297
10282
|
"inheritedFrom": {
|
|
@@ -10312,19 +10297,6 @@
|
|
|
10312
10297
|
"module": "src/button/button.base.ts"
|
|
10313
10298
|
}
|
|
10314
10299
|
},
|
|
10315
|
-
{
|
|
10316
|
-
"name": "tabindex",
|
|
10317
|
-
"type": {
|
|
10318
|
-
"text": "number"
|
|
10319
|
-
},
|
|
10320
|
-
"default": "0",
|
|
10321
|
-
"description": "Sets that the button tabindex attribute",
|
|
10322
|
-
"fieldName": "tabIndex",
|
|
10323
|
-
"inheritedFrom": {
|
|
10324
|
-
"name": "BaseButton",
|
|
10325
|
-
"module": "src/button/button.base.ts"
|
|
10326
|
-
}
|
|
10327
|
-
},
|
|
10328
10300
|
{
|
|
10329
10301
|
"name": "formaction",
|
|
10330
10302
|
"type": {
|
|
@@ -12789,8 +12761,9 @@
|
|
|
12789
12761
|
},
|
|
12790
12762
|
{
|
|
12791
12763
|
"type": {
|
|
12792
|
-
"text": "boolean
|
|
12764
|
+
"text": "boolean"
|
|
12793
12765
|
},
|
|
12766
|
+
"default": "false",
|
|
12794
12767
|
"description": "Indicates the button should be focused when the page is loaded.",
|
|
12795
12768
|
"fieldName": "autofocus",
|
|
12796
12769
|
"inheritedFrom": {
|
|
@@ -12811,19 +12784,6 @@
|
|
|
12811
12784
|
"module": "src/button/button.base.ts"
|
|
12812
12785
|
}
|
|
12813
12786
|
},
|
|
12814
|
-
{
|
|
12815
|
-
"name": "tabindex",
|
|
12816
|
-
"type": {
|
|
12817
|
-
"text": "number"
|
|
12818
|
-
},
|
|
12819
|
-
"default": "0",
|
|
12820
|
-
"description": "Sets that the button tabindex attribute",
|
|
12821
|
-
"fieldName": "tabIndex",
|
|
12822
|
-
"inheritedFrom": {
|
|
12823
|
-
"name": "BaseButton",
|
|
12824
|
-
"module": "src/button/button.base.ts"
|
|
12825
|
-
}
|
|
12826
|
-
},
|
|
12827
12787
|
{
|
|
12828
12788
|
"name": "formaction",
|
|
12829
12789
|
"type": {
|
|
@@ -13020,8 +12980,9 @@
|
|
|
13020
12980
|
"kind": "field",
|
|
13021
12981
|
"name": "disabled",
|
|
13022
12982
|
"type": {
|
|
13023
|
-
"text": "boolean
|
|
12983
|
+
"text": "boolean"
|
|
13024
12984
|
},
|
|
12985
|
+
"default": "false",
|
|
13025
12986
|
"description": "Sets the element's disabled state.",
|
|
13026
12987
|
"privacy": "public",
|
|
13027
12988
|
"inheritedFrom": {
|
|
@@ -13030,14 +12991,9 @@
|
|
|
13030
12991
|
}
|
|
13031
12992
|
},
|
|
13032
12993
|
{
|
|
13033
|
-
"kind": "
|
|
13034
|
-
"name": "
|
|
13035
|
-
"
|
|
13036
|
-
"text": "boolean"
|
|
13037
|
-
},
|
|
13038
|
-
"privacy": "public",
|
|
13039
|
-
"default": "false",
|
|
13040
|
-
"description": "Indicates that the button is focusable while disabled.",
|
|
12994
|
+
"kind": "method",
|
|
12995
|
+
"name": "disabledChanged",
|
|
12996
|
+
"privacy": "protected",
|
|
13041
12997
|
"inheritedFrom": {
|
|
13042
12998
|
"name": "BaseButton",
|
|
13043
12999
|
"module": "src/button/button.base.ts"
|
|
@@ -13045,13 +13001,13 @@
|
|
|
13045
13001
|
},
|
|
13046
13002
|
{
|
|
13047
13003
|
"kind": "field",
|
|
13048
|
-
"name": "
|
|
13004
|
+
"name": "disabledFocusable",
|
|
13049
13005
|
"type": {
|
|
13050
|
-
"text": "
|
|
13006
|
+
"text": "boolean"
|
|
13051
13007
|
},
|
|
13052
13008
|
"privacy": "public",
|
|
13053
|
-
"default": "
|
|
13054
|
-
"description": "
|
|
13009
|
+
"default": "false",
|
|
13010
|
+
"description": "Indicates that the button is focusable while disabled.",
|
|
13055
13011
|
"inheritedFrom": {
|
|
13056
13012
|
"name": "BaseButton",
|
|
13057
13013
|
"module": "src/button/button.base.ts"
|
|
@@ -16869,8 +16825,9 @@
|
|
|
16869
16825
|
},
|
|
16870
16826
|
{
|
|
16871
16827
|
"type": {
|
|
16872
|
-
"text": "boolean
|
|
16828
|
+
"text": "boolean"
|
|
16873
16829
|
},
|
|
16830
|
+
"default": "false",
|
|
16874
16831
|
"description": "Indicates the button should be focused when the page is loaded.",
|
|
16875
16832
|
"fieldName": "autofocus",
|
|
16876
16833
|
"inheritedFrom": {
|
|
@@ -16891,19 +16848,6 @@
|
|
|
16891
16848
|
"module": "src/button/button.base.ts"
|
|
16892
16849
|
}
|
|
16893
16850
|
},
|
|
16894
|
-
{
|
|
16895
|
-
"name": "tabindex",
|
|
16896
|
-
"type": {
|
|
16897
|
-
"text": "number"
|
|
16898
|
-
},
|
|
16899
|
-
"default": "0",
|
|
16900
|
-
"description": "Sets that the button tabindex attribute",
|
|
16901
|
-
"fieldName": "tabIndex",
|
|
16902
|
-
"inheritedFrom": {
|
|
16903
|
-
"name": "BaseButton",
|
|
16904
|
-
"module": "src/button/button.base.ts"
|
|
16905
|
-
}
|
|
16906
|
-
},
|
|
16907
16851
|
{
|
|
16908
16852
|
"name": "formaction",
|
|
16909
16853
|
"type": {
|
|
@@ -17100,8 +17044,9 @@
|
|
|
17100
17044
|
"kind": "field",
|
|
17101
17045
|
"name": "disabled",
|
|
17102
17046
|
"type": {
|
|
17103
|
-
"text": "boolean
|
|
17047
|
+
"text": "boolean"
|
|
17104
17048
|
},
|
|
17049
|
+
"default": "false",
|
|
17105
17050
|
"description": "Sets the element's disabled state.",
|
|
17106
17051
|
"privacy": "public",
|
|
17107
17052
|
"inheritedFrom": {
|
|
@@ -17110,14 +17055,9 @@
|
|
|
17110
17055
|
}
|
|
17111
17056
|
},
|
|
17112
17057
|
{
|
|
17113
|
-
"kind": "
|
|
17114
|
-
"name": "
|
|
17115
|
-
"
|
|
17116
|
-
"text": "boolean"
|
|
17117
|
-
},
|
|
17118
|
-
"privacy": "public",
|
|
17119
|
-
"default": "false",
|
|
17120
|
-
"description": "Indicates that the button is focusable while disabled.",
|
|
17058
|
+
"kind": "method",
|
|
17059
|
+
"name": "disabledChanged",
|
|
17060
|
+
"privacy": "protected",
|
|
17121
17061
|
"inheritedFrom": {
|
|
17122
17062
|
"name": "BaseButton",
|
|
17123
17063
|
"module": "src/button/button.base.ts"
|
|
@@ -17125,13 +17065,13 @@
|
|
|
17125
17065
|
},
|
|
17126
17066
|
{
|
|
17127
17067
|
"kind": "field",
|
|
17128
|
-
"name": "
|
|
17068
|
+
"name": "disabledFocusable",
|
|
17129
17069
|
"type": {
|
|
17130
|
-
"text": "
|
|
17070
|
+
"text": "boolean"
|
|
17131
17071
|
},
|
|
17132
17072
|
"privacy": "public",
|
|
17133
|
-
"default": "
|
|
17134
|
-
"description": "
|
|
17073
|
+
"default": "false",
|
|
17074
|
+
"description": "Indicates that the button is focusable while disabled.",
|
|
17135
17075
|
"inheritedFrom": {
|
|
17136
17076
|
"name": "BaseButton",
|
|
17137
17077
|
"module": "src/button/button.base.ts"
|
|
@@ -25781,8 +25721,9 @@
|
|
|
25781
25721
|
"kind": "field",
|
|
25782
25722
|
"name": "disabled",
|
|
25783
25723
|
"type": {
|
|
25784
|
-
"text": "boolean
|
|
25724
|
+
"text": "boolean"
|
|
25785
25725
|
},
|
|
25726
|
+
"default": "false",
|
|
25786
25727
|
"description": "Sets the element's disabled state.",
|
|
25787
25728
|
"privacy": "public",
|
|
25788
25729
|
"inheritedFrom": {
|
|
@@ -25791,14 +25732,9 @@
|
|
|
25791
25732
|
}
|
|
25792
25733
|
},
|
|
25793
25734
|
{
|
|
25794
|
-
"kind": "
|
|
25795
|
-
"name": "
|
|
25796
|
-
"
|
|
25797
|
-
"text": "boolean"
|
|
25798
|
-
},
|
|
25799
|
-
"privacy": "public",
|
|
25800
|
-
"default": "false",
|
|
25801
|
-
"description": "Indicates that the button is focusable while disabled.",
|
|
25735
|
+
"kind": "method",
|
|
25736
|
+
"name": "disabledChanged",
|
|
25737
|
+
"privacy": "protected",
|
|
25802
25738
|
"inheritedFrom": {
|
|
25803
25739
|
"name": "BaseButton",
|
|
25804
25740
|
"module": "src/button/button.base.ts"
|
|
@@ -25806,13 +25742,13 @@
|
|
|
25806
25742
|
},
|
|
25807
25743
|
{
|
|
25808
25744
|
"kind": "field",
|
|
25809
|
-
"name": "
|
|
25745
|
+
"name": "disabledFocusable",
|
|
25810
25746
|
"type": {
|
|
25811
|
-
"text": "
|
|
25747
|
+
"text": "boolean"
|
|
25812
25748
|
},
|
|
25813
25749
|
"privacy": "public",
|
|
25814
|
-
"default": "
|
|
25815
|
-
"description": "
|
|
25750
|
+
"default": "false",
|
|
25751
|
+
"description": "Indicates that the button is focusable while disabled.",
|
|
25816
25752
|
"inheritedFrom": {
|
|
25817
25753
|
"name": "BaseButton",
|
|
25818
25754
|
"module": "src/button/button.base.ts"
|
|
@@ -26037,8 +25973,9 @@
|
|
|
26037
25973
|
"attributes": [
|
|
26038
25974
|
{
|
|
26039
25975
|
"type": {
|
|
26040
|
-
"text": "boolean
|
|
25976
|
+
"text": "boolean"
|
|
26041
25977
|
},
|
|
25978
|
+
"default": "false",
|
|
26042
25979
|
"description": "Indicates the pressed state of the control.",
|
|
26043
25980
|
"fieldName": "pressed",
|
|
26044
25981
|
"inheritedFrom": {
|
|
@@ -26048,8 +25985,9 @@
|
|
|
26048
25985
|
},
|
|
26049
25986
|
{
|
|
26050
25987
|
"type": {
|
|
26051
|
-
"text": "boolean
|
|
25988
|
+
"text": "boolean"
|
|
26052
25989
|
},
|
|
25990
|
+
"default": "false",
|
|
26053
25991
|
"description": "Indicates the pressed state of the control.",
|
|
26054
25992
|
"fieldName": "pressed",
|
|
26055
25993
|
"inheritedFrom": {
|
|
@@ -26119,19 +26057,6 @@
|
|
|
26119
26057
|
"module": "src/button/button.base.ts"
|
|
26120
26058
|
}
|
|
26121
26059
|
},
|
|
26122
|
-
{
|
|
26123
|
-
"name": "tabindex",
|
|
26124
|
-
"type": {
|
|
26125
|
-
"text": "number"
|
|
26126
|
-
},
|
|
26127
|
-
"default": "0",
|
|
26128
|
-
"description": "Sets that the button tabindex attribute",
|
|
26129
|
-
"fieldName": "tabIndex",
|
|
26130
|
-
"inheritedFrom": {
|
|
26131
|
-
"name": "BaseButton",
|
|
26132
|
-
"module": "src/button/button.base.ts"
|
|
26133
|
-
}
|
|
26134
|
-
},
|
|
26135
26060
|
{
|
|
26136
26061
|
"name": "formaction",
|
|
26137
26062
|
"type": {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FASTElement } from '@microsoft/fast-element';
|
|
2
|
-
import { ButtonFormTarget, ButtonType } from './button.options.js';
|
|
2
|
+
import { type ButtonFormTarget, ButtonType } from './button.options.js';
|
|
3
3
|
/**
|
|
4
4
|
* A Button Custom HTML Element.
|
|
5
5
|
* Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button | `<button>`} element.
|
|
@@ -35,7 +35,8 @@ export declare class BaseButton extends FASTElement {
|
|
|
35
35
|
* @remarks
|
|
36
36
|
* HTML Attribute: `disabled`
|
|
37
37
|
*/
|
|
38
|
-
disabled
|
|
38
|
+
disabled: boolean;
|
|
39
|
+
protected disabledChanged(): void;
|
|
39
40
|
/**
|
|
40
41
|
* Indicates that the button is focusable while disabled.
|
|
41
42
|
*
|
|
@@ -44,14 +45,6 @@ export declare class BaseButton extends FASTElement {
|
|
|
44
45
|
* HTML Attribute: `disabled-focusable`
|
|
45
46
|
*/
|
|
46
47
|
disabledFocusable: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* Sets that the button tabindex attribute
|
|
49
|
-
*
|
|
50
|
-
* @public
|
|
51
|
-
* @remarks
|
|
52
|
-
* HTML Attribute: `tabindex`
|
|
53
|
-
*/
|
|
54
|
-
tabIndex: number;
|
|
55
48
|
/**
|
|
56
49
|
* Sets the element's internal disabled state when the element is focusable while disabled.
|
|
57
50
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import { attr, FASTElement,
|
|
2
|
+
import { attr, FASTElement, observable } from '@microsoft/fast-element';
|
|
3
3
|
import { keyEnter, keySpace } from '@microsoft/fast-web-utilities';
|
|
4
4
|
import { ButtonType } from './button.options.js';
|
|
5
5
|
/**
|
|
@@ -14,6 +14,18 @@ import { ButtonType } from './button.options.js';
|
|
|
14
14
|
* @public
|
|
15
15
|
*/
|
|
16
16
|
export class BaseButton extends FASTElement {
|
|
17
|
+
disabledChanged() {
|
|
18
|
+
if (this.disabled) {
|
|
19
|
+
this.removeAttribute('tabindex');
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
// If author sets tabindex to a non-positive value, the component should
|
|
23
|
+
// respect it, otherwise set it to 0 to avoid the anti-pattern of setting
|
|
24
|
+
// tabindex to a positive number. See details:
|
|
25
|
+
// https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/tabindex
|
|
26
|
+
this.tabIndex = Number(this.getAttribute('tabindex') ?? 0) < 0 ? -1 : 0;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
17
29
|
/**
|
|
18
30
|
* Sets the element's internal disabled state when the element is focusable while disabled.
|
|
19
31
|
*
|
|
@@ -83,21 +95,22 @@ export class BaseButton extends FASTElement {
|
|
|
83
95
|
constructor() {
|
|
84
96
|
super();
|
|
85
97
|
/**
|
|
86
|
-
*
|
|
98
|
+
* Sets the element's disabled state.
|
|
99
|
+
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#disabled | `disabled`} attribute
|
|
87
100
|
*
|
|
88
101
|
* @public
|
|
89
102
|
* @remarks
|
|
90
|
-
* HTML Attribute: `disabled
|
|
103
|
+
* HTML Attribute: `disabled`
|
|
91
104
|
*/
|
|
92
|
-
this.
|
|
105
|
+
this.disabled = false;
|
|
93
106
|
/**
|
|
94
|
-
*
|
|
107
|
+
* Indicates that the button is focusable while disabled.
|
|
95
108
|
*
|
|
96
109
|
* @public
|
|
97
110
|
* @remarks
|
|
98
|
-
* HTML Attribute: `
|
|
111
|
+
* HTML Attribute: `disabled-focusable`
|
|
99
112
|
*/
|
|
100
|
-
this.
|
|
113
|
+
this.disabledFocusable = false;
|
|
101
114
|
/**
|
|
102
115
|
* The internal {@link https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
|
|
103
116
|
*
|
|
@@ -250,9 +263,6 @@ __decorate([
|
|
|
250
263
|
__decorate([
|
|
251
264
|
attr({ attribute: 'disabled-focusable', mode: 'boolean' })
|
|
252
265
|
], BaseButton.prototype, "disabledFocusable", void 0);
|
|
253
|
-
__decorate([
|
|
254
|
-
attr({ attribute: 'tabindex', mode: 'fromView', converter: nullableNumberConverter })
|
|
255
|
-
], BaseButton.prototype, "tabIndex", void 0);
|
|
256
266
|
__decorate([
|
|
257
267
|
attr({ attribute: 'formaction' })
|
|
258
268
|
], BaseButton.prototype, "formAction", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.base.js","sourceRoot":"","sources":["../../../src/button/button.base.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"button.base.js","sourceRoot":"","sources":["../../../src/button/button.base.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAyB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAExE;;;;;;;;;;GAUG;AACH,MAAM,OAAO,UAAW,SAAQ,WAAW;IA+B/B,eAAe;QACvB,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;QACnC,CAAC;aAAM,CAAC;YACN,wEAAwE;YACxE,yEAAyE;YACzE,8CAA8C;YAC9C,yFAAyF;YACzF,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1E,CAAC;IACH,CAAC;IAYD;;;;;;OAMG;IACI,wBAAwB,CAAC,QAAiB,EAAE,IAAa;QAC9D,IAAI,IAAI,CAAC,eAAe,CAAC,WAAW,EAAE,CAAC;YACrC,IAAI,CAAC,gBAAgB,CAAC,YAAY,GAAG,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;QACnD,CAAC;IACH,CAAC;IASD;;;;OAIG;IACH,IAAW,IAAI;QACb,OAAO,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC;IACpC,CAAC;IAaD;;;;;OAKG;aACa,mBAAc,GAAG,IAAI,AAAP,CAAQ;IAuEtC;;;;OAIG;IACH,IAAW,MAAM;QACf,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,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;IADN,IAAI,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;iDACE;AAWvB;IADN,IAAI,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;+CACP;AAWrB;IADN,IAAI,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;8CACP;AAWpB;IADN,IAAI,CAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;kDACvB;AAyBzB;IADN,IAAI,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;8CACG;AAoB9B;IADN,IAAI;wCACgB;AAWd;IADN,IAAI;wCACoB;AA0BlB;IADN,IAAI;yCACiB"}
|
|
@@ -8,7 +8,6 @@ import { endSlotTemplate, startSlotTemplate } from '../patterns/index.js';
|
|
|
8
8
|
export function buttonTemplate(options = {}) {
|
|
9
9
|
return html `
|
|
10
10
|
<template
|
|
11
|
-
tabindex="${x => (x.disabled ? null : x.tabIndex ?? 0)}"
|
|
12
11
|
@click="${(x, c) => x.clickHandler(c.event)}"
|
|
13
12
|
@keypress="${(x, c) => x.keypressHandler(c.event)}"
|
|
14
13
|
>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.template.js","sourceRoot":"","sources":["../../../src/button/button.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,IAAI,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAI1E;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAmB,UAAyB,EAAE;IAC1E,OAAO,IAAI,CAAG;;
|
|
1
|
+
{"version":3,"file":"button.template.js","sourceRoot":"","sources":["../../../src/button/button.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,IAAI,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAI1E;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAmB,UAAyB,EAAE;IAC1E,OAAO,IAAI,CAAG;;gBAEA,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,KAAmB,CAAC;mBAC5C,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,KAAsB,CAAC;;QAEhE,iBAAiB,CAAC,OAAO,CAAC;;gBAElB,OAAO,CAAC,uBAAuB,CAAC;;QAExC,eAAe,CAAC,OAAO,CAAC;;GAE7B,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAgC,cAAc,EAAE,CAAC"}
|
|
@@ -73,6 +73,16 @@ export class BaseCheckbox extends FASTElement {
|
|
|
73
73
|
* @internal
|
|
74
74
|
*/
|
|
75
75
|
disabledChanged(prev, next) {
|
|
76
|
+
if (this.disabled) {
|
|
77
|
+
this.removeAttribute('tabindex');
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
// If author sets tabindex to a non-positive value, the component should
|
|
81
|
+
// respect it, otherwise set it to 0 to avoid the anti-pattern of setting
|
|
82
|
+
// tabindex to a positive number. See details:
|
|
83
|
+
// https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/tabindex
|
|
84
|
+
this.tabIndex = Number(this.getAttribute('tabindex') ?? 0) < 0 ? -1 : 0;
|
|
85
|
+
}
|
|
76
86
|
this.elementInternals.ariaDisabled = this.disabled ? 'true' : 'false';
|
|
77
87
|
toggleState(this.elementInternals, 'disabled', this.disabled);
|
|
78
88
|
}
|
|
@@ -235,6 +245,7 @@ export class BaseCheckbox extends FASTElement {
|
|
|
235
245
|
}
|
|
236
246
|
connectedCallback() {
|
|
237
247
|
super.connectedCallback();
|
|
248
|
+
this.disabled = !!this.disabledAttribute;
|
|
238
249
|
this.setAriaChecked();
|
|
239
250
|
this.setValidity();
|
|
240
251
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.base.js","sourceRoot":"","sources":["../../../src/checkbox/checkbox.base.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACpF,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAE5D;;;;GAIG;AACH,MAAM,OAAO,YAAa,SAAQ,WAAW;IAA7C;;
|
|
1
|
+
{"version":3,"file":"checkbox.base.js","sourceRoot":"","sources":["../../../src/checkbox/checkbox.base.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACpF,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAE5D;;;;GAIG;AACH,MAAM,OAAO,YAAa,SAAQ,WAAW;IAA7C;;QAiHE;;;;;;WAMG;QAEI,iBAAY,GAAW,IAAI,CAAC;QAanC;;;;;;WAMG;QACK,oBAAe,GAAY,KAAK,CAAC;QA2CzC;;;;WAIG;QACK,iBAAY,GAAY,KAAK,CAAC;QAatC;;;;WAIG;QACI,qBAAgB,GAAqB,IAAI,CAAC,eAAe,EAAE,CAAC;QAmBnE;;;;WAIG;QACK,+BAA0B,GAAW,EAAE,CAAC;QAsChD;;;;WAIG;QACK,WAAM,GAAW,IAAI,CAAC,YAAY,CAAC;IA6M7C,CAAC;IAndC;;;;OAIG;IACH,IAAW,OAAO;QAChB,UAAU,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;QAClC,OAAO,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED,IAAW,OAAO,CAAC,IAAa;QAC9B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACrB,IAAI,CAAC,YAAY,CAAC,IAAI,CA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AE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;oDAChB;AAuBzB;IADN,IAAI,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;kDACZ;AA8B5B;IADN,IAAI;0CACgB;AAUrB;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;8CACP"}
|
|
@@ -22,7 +22,6 @@ const indeterminateIndicator = html.partial(/* html */ `
|
|
|
22
22
|
export function checkboxTemplate(options = {}) {
|
|
23
23
|
return html `
|
|
24
24
|
<template
|
|
25
|
-
tabindex="${x => (!x.disabled ? 0 : void 0)}"
|
|
26
25
|
@click="${(x, c) => x.clickHandler(c.event)}"
|
|
27
26
|
@input="${(x, c) => x.inputHandler(c.event)}"
|
|
28
27
|
@keydown="${(x, c) => x.keydownHandler(c.event)}"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.template.js","sourceRoot":"","sources":["../../../src/checkbox/checkbox.template.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAIjE,MAAM,gBAAgB,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC;;;;;;;;;;;CAWhD,CAAC,CAAC;AAEH,MAAM,sBAAsB,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC;;CAEtD,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAqB,UAA2B,EAAE;IAChF,OAAO,IAAI,CAAG;;
|
|
1
|
+
{"version":3,"file":"checkbox.template.js","sourceRoot":"","sources":["../../../src/checkbox/checkbox.template.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAIjE,MAAM,gBAAgB,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC;;;;;;;;;;;CAWhD,CAAC,CAAC;AAEH,MAAM,sBAAsB,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC;;CAEtD,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAqB,UAA2B,EAAE;IAChF,OAAO,IAAI,CAAG;;gBAEA,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,KAAmB,CAAC;gBAC/C,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,KAAmB,CAAC;kBAC7C,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,KAAsB,CAAC;gBACtD,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,KAAsB,CAAC;;uCAE3B,iBAAiB,CAAC,OAAO,CAAC,gBAAgB,CAAC;6CACrC,iBAAiB,CAAC,OAAO,CAAC,sBAAsB,CAAC;;GAE3F,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAkC,gBAAgB,CAAC;IACtE,gBAAgB;IAChB,sBAAsB;CACvB,CAAC,CAAC"}
|
|
@@ -12,7 +12,6 @@ import { BaseCheckbox } from '../checkbox/checkbox.base.js';
|
|
|
12
12
|
* @public
|
|
13
13
|
*/
|
|
14
14
|
export declare class Radio extends BaseCheckbox {
|
|
15
|
-
connectedCallback(): void;
|
|
16
15
|
constructor();
|
|
17
16
|
/**
|
|
18
17
|
* Toggles the disabled state when the user changes the `disabled` property.
|
package/dist/esm/radio/radio.js
CHANGED
|
@@ -12,10 +12,6 @@ import { BaseCheckbox } from '../checkbox/checkbox.base.js';
|
|
|
12
12
|
* @public
|
|
13
13
|
*/
|
|
14
14
|
export class Radio extends BaseCheckbox {
|
|
15
|
-
connectedCallback() {
|
|
16
|
-
super.connectedCallback();
|
|
17
|
-
this.tabIndex = this.disabled ? -1 : 0;
|
|
18
|
-
}
|
|
19
15
|
constructor() {
|
|
20
16
|
super();
|
|
21
17
|
this.elementInternals.role = 'radio';
|
|
@@ -30,9 +26,6 @@ export class Radio extends BaseCheckbox {
|
|
|
30
26
|
*/
|
|
31
27
|
disabledChanged(prev, next) {
|
|
32
28
|
super.disabledChanged(prev, next);
|
|
33
|
-
if (next) {
|
|
34
|
-
this.tabIndex = -1;
|
|
35
|
-
}
|
|
36
29
|
this.$emit('disabled', next, { bubbles: true });
|
|
37
30
|
}
|
|
38
31
|
/**
|