@spectrum-web-components/button 0.19.6 → 0.19.8-react.54

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.
@@ -4,7 +4,7 @@
4
4
  "modules": [
5
5
  {
6
6
  "kind": "javascript-module",
7
- "path": "sp-button.js",
7
+ "path": "sp-button.ts",
8
8
  "declarations": [],
9
9
  "exports": [
10
10
  {
@@ -19,7 +19,7 @@
19
19
  },
20
20
  {
21
21
  "kind": "javascript-module",
22
- "path": "sp-clear-button.js",
22
+ "path": "sp-clear-button.ts",
23
23
  "declarations": [],
24
24
  "exports": [
25
25
  {
@@ -34,7 +34,7 @@
34
34
  },
35
35
  {
36
36
  "kind": "javascript-module",
37
- "path": "sp-close-button.js",
37
+ "path": "sp-close-button.ts",
38
38
  "declarations": [],
39
39
  "exports": [
40
40
  {
@@ -49,7 +49,7 @@
49
49
  },
50
50
  {
51
51
  "kind": "javascript-module",
52
- "path": "src/Button.js",
52
+ "path": "src/Button.ts",
53
53
  "declarations": [
54
54
  {
55
55
  "kind": "variable",
@@ -121,7 +121,7 @@
121
121
  "privacy": "protected",
122
122
  "inheritedFrom": {
123
123
  "name": "ButtonBase",
124
- "module": "src/ButtonBase.js"
124
+ "module": "src/ButtonBase.ts"
125
125
  }
126
126
  },
127
127
  {
@@ -136,7 +136,7 @@
136
136
  "reflects": true,
137
137
  "inheritedFrom": {
138
138
  "name": "ButtonBase",
139
- "module": "src/ButtonBase.js"
139
+ "module": "src/ButtonBase.ts"
140
140
  }
141
141
  },
142
142
  {
@@ -150,7 +150,7 @@
150
150
  "attribute": "type",
151
151
  "inheritedFrom": {
152
152
  "name": "ButtonBase",
153
- "module": "src/ButtonBase.js"
153
+ "module": "src/ButtonBase.ts"
154
154
  }
155
155
  },
156
156
  {
@@ -162,7 +162,7 @@
162
162
  "privacy": "protected",
163
163
  "inheritedFrom": {
164
164
  "name": "ButtonBase",
165
- "module": "src/ButtonBase.js"
165
+ "module": "src/ButtonBase.ts"
166
166
  }
167
167
  },
168
168
  {
@@ -174,7 +174,7 @@
174
174
  "privacy": "private",
175
175
  "inheritedFrom": {
176
176
  "name": "ButtonBase",
177
- "module": "src/ButtonBase.js"
177
+ "module": "src/ButtonBase.ts"
178
178
  }
179
179
  },
180
180
  {
@@ -186,7 +186,7 @@
186
186
  "privacy": "public",
187
187
  "inheritedFrom": {
188
188
  "name": "ButtonBase",
189
- "module": "src/ButtonBase.js"
189
+ "module": "src/ButtonBase.ts"
190
190
  }
191
191
  },
192
192
  {
@@ -198,7 +198,7 @@
198
198
  "privacy": "protected",
199
199
  "inheritedFrom": {
200
200
  "name": "ButtonBase",
201
- "module": "src/ButtonBase.js"
201
+ "module": "src/ButtonBase.ts"
202
202
  }
203
203
  },
204
204
  {
@@ -212,7 +212,7 @@
212
212
  },
213
213
  "inheritedFrom": {
214
214
  "name": "ButtonBase",
215
- "module": "src/ButtonBase.js"
215
+ "module": "src/ButtonBase.ts"
216
216
  }
217
217
  },
218
218
  {
@@ -234,7 +234,7 @@
234
234
  ],
235
235
  "inheritedFrom": {
236
236
  "name": "ButtonBase",
237
- "module": "src/ButtonBase.js"
237
+ "module": "src/ButtonBase.ts"
238
238
  }
239
239
  },
240
240
  {
@@ -248,7 +248,7 @@
248
248
  },
249
249
  "inheritedFrom": {
250
250
  "name": "ButtonBase",
251
- "module": "src/ButtonBase.js"
251
+ "module": "src/ButtonBase.ts"
252
252
  }
253
253
  },
254
254
  {
@@ -262,7 +262,7 @@
262
262
  },
263
263
  "inheritedFrom": {
264
264
  "name": "ButtonBase",
265
- "module": "src/ButtonBase.js"
265
+ "module": "src/ButtonBase.ts"
266
266
  }
267
267
  },
268
268
  {
@@ -276,7 +276,7 @@
276
276
  },
277
277
  "inheritedFrom": {
278
278
  "name": "ButtonBase",
279
- "module": "src/ButtonBase.js"
279
+ "module": "src/ButtonBase.ts"
280
280
  }
281
281
  },
282
282
  {
@@ -290,7 +290,7 @@
290
290
  },
291
291
  "inheritedFrom": {
292
292
  "name": "ButtonBase",
293
- "module": "src/ButtonBase.js"
293
+ "module": "src/ButtonBase.ts"
294
294
  }
295
295
  },
296
296
  {
@@ -312,7 +312,7 @@
312
312
  ],
313
313
  "inheritedFrom": {
314
314
  "name": "ButtonBase",
315
- "module": "src/ButtonBase.js"
315
+ "module": "src/ButtonBase.ts"
316
316
  }
317
317
  },
318
318
  {
@@ -334,7 +334,7 @@
334
334
  ],
335
335
  "inheritedFrom": {
336
336
  "name": "ButtonBase",
337
- "module": "src/ButtonBase.js"
337
+ "module": "src/ButtonBase.ts"
338
338
  }
339
339
  },
340
340
  {
@@ -356,7 +356,7 @@
356
356
  ],
357
357
  "inheritedFrom": {
358
358
  "name": "ButtonBase",
359
- "module": "src/ButtonBase.js"
359
+ "module": "src/ButtonBase.ts"
360
360
  }
361
361
  },
362
362
  {
@@ -370,7 +370,7 @@
370
370
  },
371
371
  "inheritedFrom": {
372
372
  "name": "ButtonBase",
373
- "module": "src/ButtonBase.js"
373
+ "module": "src/ButtonBase.ts"
374
374
  }
375
375
  },
376
376
  {
@@ -384,7 +384,7 @@
384
384
  },
385
385
  "inheritedFrom": {
386
386
  "name": "ButtonBase",
387
- "module": "src/ButtonBase.js"
387
+ "module": "src/ButtonBase.ts"
388
388
  }
389
389
  },
390
390
  {
@@ -398,7 +398,7 @@
398
398
  },
399
399
  "inheritedFrom": {
400
400
  "name": "ButtonBase",
401
- "module": "src/ButtonBase.js"
401
+ "module": "src/ButtonBase.ts"
402
402
  }
403
403
  }
404
404
  ],
@@ -470,7 +470,7 @@
470
470
  "name": "VALID_VARIANTS",
471
471
  "declaration": {
472
472
  "name": "VALID_VARIANTS",
473
- "module": "src/Button.js"
473
+ "module": "src/Button.ts"
474
474
  }
475
475
  },
476
476
  {
@@ -478,14 +478,14 @@
478
478
  "name": "Button",
479
479
  "declaration": {
480
480
  "name": "Button",
481
- "module": "src/Button.js"
481
+ "module": "src/Button.ts"
482
482
  }
483
483
  }
484
484
  ]
485
485
  },
486
486
  {
487
487
  "kind": "javascript-module",
488
- "path": "src/ButtonBase.js",
488
+ "path": "src/ButtonBase.ts",
489
489
  "declarations": [
490
490
  {
491
491
  "kind": "class",
@@ -760,14 +760,14 @@
760
760
  "name": "ButtonBase",
761
761
  "declaration": {
762
762
  "name": "ButtonBase",
763
- "module": "src/ButtonBase.js"
763
+ "module": "src/ButtonBase.ts"
764
764
  }
765
765
  }
766
766
  ]
767
767
  },
768
768
  {
769
769
  "kind": "javascript-module",
770
- "path": "src/ClearButton.js",
770
+ "path": "src/ClearButton.ts",
771
771
  "declarations": [
772
772
  {
773
773
  "kind": "class",
@@ -805,7 +805,7 @@
805
805
  "privacy": "protected",
806
806
  "inheritedFrom": {
807
807
  "name": "ButtonBase",
808
- "module": "src/ButtonBase.js"
808
+ "module": "src/ButtonBase.ts"
809
809
  }
810
810
  },
811
811
  {
@@ -817,7 +817,7 @@
817
817
  "privacy": "protected",
818
818
  "inheritedFrom": {
819
819
  "name": "ButtonBase",
820
- "module": "src/ButtonBase.js"
820
+ "module": "src/ButtonBase.ts"
821
821
  }
822
822
  },
823
823
  {
@@ -832,7 +832,7 @@
832
832
  "reflects": true,
833
833
  "inheritedFrom": {
834
834
  "name": "ButtonBase",
835
- "module": "src/ButtonBase.js"
835
+ "module": "src/ButtonBase.ts"
836
836
  }
837
837
  },
838
838
  {
@@ -846,7 +846,7 @@
846
846
  "attribute": "type",
847
847
  "inheritedFrom": {
848
848
  "name": "ButtonBase",
849
- "module": "src/ButtonBase.js"
849
+ "module": "src/ButtonBase.ts"
850
850
  }
851
851
  },
852
852
  {
@@ -858,7 +858,7 @@
858
858
  "privacy": "protected",
859
859
  "inheritedFrom": {
860
860
  "name": "ButtonBase",
861
- "module": "src/ButtonBase.js"
861
+ "module": "src/ButtonBase.ts"
862
862
  }
863
863
  },
864
864
  {
@@ -870,7 +870,7 @@
870
870
  "privacy": "private",
871
871
  "inheritedFrom": {
872
872
  "name": "ButtonBase",
873
- "module": "src/ButtonBase.js"
873
+ "module": "src/ButtonBase.ts"
874
874
  }
875
875
  },
876
876
  {
@@ -882,7 +882,7 @@
882
882
  "privacy": "public",
883
883
  "inheritedFrom": {
884
884
  "name": "ButtonBase",
885
- "module": "src/ButtonBase.js"
885
+ "module": "src/ButtonBase.ts"
886
886
  }
887
887
  },
888
888
  {
@@ -896,7 +896,7 @@
896
896
  },
897
897
  "inheritedFrom": {
898
898
  "name": "ButtonBase",
899
- "module": "src/ButtonBase.js"
899
+ "module": "src/ButtonBase.ts"
900
900
  }
901
901
  },
902
902
  {
@@ -918,7 +918,7 @@
918
918
  ],
919
919
  "inheritedFrom": {
920
920
  "name": "ButtonBase",
921
- "module": "src/ButtonBase.js"
921
+ "module": "src/ButtonBase.ts"
922
922
  }
923
923
  },
924
924
  {
@@ -932,7 +932,7 @@
932
932
  },
933
933
  "inheritedFrom": {
934
934
  "name": "ButtonBase",
935
- "module": "src/ButtonBase.js"
935
+ "module": "src/ButtonBase.ts"
936
936
  }
937
937
  },
938
938
  {
@@ -946,7 +946,7 @@
946
946
  },
947
947
  "inheritedFrom": {
948
948
  "name": "ButtonBase",
949
- "module": "src/ButtonBase.js"
949
+ "module": "src/ButtonBase.ts"
950
950
  }
951
951
  },
952
952
  {
@@ -960,7 +960,7 @@
960
960
  },
961
961
  "inheritedFrom": {
962
962
  "name": "ButtonBase",
963
- "module": "src/ButtonBase.js"
963
+ "module": "src/ButtonBase.ts"
964
964
  }
965
965
  },
966
966
  {
@@ -974,7 +974,7 @@
974
974
  },
975
975
  "inheritedFrom": {
976
976
  "name": "ButtonBase",
977
- "module": "src/ButtonBase.js"
977
+ "module": "src/ButtonBase.ts"
978
978
  }
979
979
  },
980
980
  {
@@ -996,7 +996,7 @@
996
996
  ],
997
997
  "inheritedFrom": {
998
998
  "name": "ButtonBase",
999
- "module": "src/ButtonBase.js"
999
+ "module": "src/ButtonBase.ts"
1000
1000
  }
1001
1001
  },
1002
1002
  {
@@ -1018,7 +1018,7 @@
1018
1018
  ],
1019
1019
  "inheritedFrom": {
1020
1020
  "name": "ButtonBase",
1021
- "module": "src/ButtonBase.js"
1021
+ "module": "src/ButtonBase.ts"
1022
1022
  }
1023
1023
  },
1024
1024
  {
@@ -1040,7 +1040,7 @@
1040
1040
  ],
1041
1041
  "inheritedFrom": {
1042
1042
  "name": "ButtonBase",
1043
- "module": "src/ButtonBase.js"
1043
+ "module": "src/ButtonBase.ts"
1044
1044
  }
1045
1045
  },
1046
1046
  {
@@ -1054,7 +1054,7 @@
1054
1054
  },
1055
1055
  "inheritedFrom": {
1056
1056
  "name": "ButtonBase",
1057
- "module": "src/ButtonBase.js"
1057
+ "module": "src/ButtonBase.ts"
1058
1058
  }
1059
1059
  },
1060
1060
  {
@@ -1068,7 +1068,7 @@
1068
1068
  },
1069
1069
  "inheritedFrom": {
1070
1070
  "name": "ButtonBase",
1071
- "module": "src/ButtonBase.js"
1071
+ "module": "src/ButtonBase.ts"
1072
1072
  }
1073
1073
  },
1074
1074
  {
@@ -1082,7 +1082,7 @@
1082
1082
  },
1083
1083
  "inheritedFrom": {
1084
1084
  "name": "ButtonBase",
1085
- "module": "src/ButtonBase.js"
1085
+ "module": "src/ButtonBase.ts"
1086
1086
  }
1087
1087
  }
1088
1088
  ],
@@ -1141,14 +1141,14 @@
1141
1141
  "name": "ClearButton",
1142
1142
  "declaration": {
1143
1143
  "name": "ClearButton",
1144
- "module": "src/ClearButton.js"
1144
+ "module": "src/ClearButton.ts"
1145
1145
  }
1146
1146
  }
1147
1147
  ]
1148
1148
  },
1149
1149
  {
1150
1150
  "kind": "javascript-module",
1151
- "path": "src/CloseButton.js",
1151
+ "path": "src/CloseButton.ts",
1152
1152
  "declarations": [
1153
1153
  {
1154
1154
  "kind": "class",
@@ -1186,7 +1186,7 @@
1186
1186
  "privacy": "protected",
1187
1187
  "inheritedFrom": {
1188
1188
  "name": "ButtonBase",
1189
- "module": "src/ButtonBase.js"
1189
+ "module": "src/ButtonBase.ts"
1190
1190
  }
1191
1191
  },
1192
1192
  {
@@ -1198,7 +1198,7 @@
1198
1198
  "privacy": "protected",
1199
1199
  "inheritedFrom": {
1200
1200
  "name": "ButtonBase",
1201
- "module": "src/ButtonBase.js"
1201
+ "module": "src/ButtonBase.ts"
1202
1202
  }
1203
1203
  },
1204
1204
  {
@@ -1213,7 +1213,7 @@
1213
1213
  "reflects": true,
1214
1214
  "inheritedFrom": {
1215
1215
  "name": "ButtonBase",
1216
- "module": "src/ButtonBase.js"
1216
+ "module": "src/ButtonBase.ts"
1217
1217
  }
1218
1218
  },
1219
1219
  {
@@ -1227,7 +1227,7 @@
1227
1227
  "attribute": "type",
1228
1228
  "inheritedFrom": {
1229
1229
  "name": "ButtonBase",
1230
- "module": "src/ButtonBase.js"
1230
+ "module": "src/ButtonBase.ts"
1231
1231
  }
1232
1232
  },
1233
1233
  {
@@ -1239,7 +1239,7 @@
1239
1239
  "privacy": "protected",
1240
1240
  "inheritedFrom": {
1241
1241
  "name": "ButtonBase",
1242
- "module": "src/ButtonBase.js"
1242
+ "module": "src/ButtonBase.ts"
1243
1243
  }
1244
1244
  },
1245
1245
  {
@@ -1251,7 +1251,7 @@
1251
1251
  "privacy": "private",
1252
1252
  "inheritedFrom": {
1253
1253
  "name": "ButtonBase",
1254
- "module": "src/ButtonBase.js"
1254
+ "module": "src/ButtonBase.ts"
1255
1255
  }
1256
1256
  },
1257
1257
  {
@@ -1263,7 +1263,7 @@
1263
1263
  "privacy": "public",
1264
1264
  "inheritedFrom": {
1265
1265
  "name": "ButtonBase",
1266
- "module": "src/ButtonBase.js"
1266
+ "module": "src/ButtonBase.ts"
1267
1267
  }
1268
1268
  },
1269
1269
  {
@@ -1277,7 +1277,7 @@
1277
1277
  },
1278
1278
  "inheritedFrom": {
1279
1279
  "name": "ButtonBase",
1280
- "module": "src/ButtonBase.js"
1280
+ "module": "src/ButtonBase.ts"
1281
1281
  }
1282
1282
  },
1283
1283
  {
@@ -1299,7 +1299,7 @@
1299
1299
  ],
1300
1300
  "inheritedFrom": {
1301
1301
  "name": "ButtonBase",
1302
- "module": "src/ButtonBase.js"
1302
+ "module": "src/ButtonBase.ts"
1303
1303
  }
1304
1304
  },
1305
1305
  {
@@ -1313,7 +1313,7 @@
1313
1313
  },
1314
1314
  "inheritedFrom": {
1315
1315
  "name": "ButtonBase",
1316
- "module": "src/ButtonBase.js"
1316
+ "module": "src/ButtonBase.ts"
1317
1317
  }
1318
1318
  },
1319
1319
  {
@@ -1327,7 +1327,7 @@
1327
1327
  },
1328
1328
  "inheritedFrom": {
1329
1329
  "name": "ButtonBase",
1330
- "module": "src/ButtonBase.js"
1330
+ "module": "src/ButtonBase.ts"
1331
1331
  }
1332
1332
  },
1333
1333
  {
@@ -1341,7 +1341,7 @@
1341
1341
  },
1342
1342
  "inheritedFrom": {
1343
1343
  "name": "ButtonBase",
1344
- "module": "src/ButtonBase.js"
1344
+ "module": "src/ButtonBase.ts"
1345
1345
  }
1346
1346
  },
1347
1347
  {
@@ -1355,7 +1355,7 @@
1355
1355
  },
1356
1356
  "inheritedFrom": {
1357
1357
  "name": "ButtonBase",
1358
- "module": "src/ButtonBase.js"
1358
+ "module": "src/ButtonBase.ts"
1359
1359
  }
1360
1360
  },
1361
1361
  {
@@ -1377,7 +1377,7 @@
1377
1377
  ],
1378
1378
  "inheritedFrom": {
1379
1379
  "name": "ButtonBase",
1380
- "module": "src/ButtonBase.js"
1380
+ "module": "src/ButtonBase.ts"
1381
1381
  }
1382
1382
  },
1383
1383
  {
@@ -1399,7 +1399,7 @@
1399
1399
  ],
1400
1400
  "inheritedFrom": {
1401
1401
  "name": "ButtonBase",
1402
- "module": "src/ButtonBase.js"
1402
+ "module": "src/ButtonBase.ts"
1403
1403
  }
1404
1404
  },
1405
1405
  {
@@ -1421,7 +1421,7 @@
1421
1421
  ],
1422
1422
  "inheritedFrom": {
1423
1423
  "name": "ButtonBase",
1424
- "module": "src/ButtonBase.js"
1424
+ "module": "src/ButtonBase.ts"
1425
1425
  }
1426
1426
  },
1427
1427
  {
@@ -1435,7 +1435,7 @@
1435
1435
  },
1436
1436
  "inheritedFrom": {
1437
1437
  "name": "ButtonBase",
1438
- "module": "src/ButtonBase.js"
1438
+ "module": "src/ButtonBase.ts"
1439
1439
  }
1440
1440
  },
1441
1441
  {
@@ -1449,7 +1449,7 @@
1449
1449
  },
1450
1450
  "inheritedFrom": {
1451
1451
  "name": "ButtonBase",
1452
- "module": "src/ButtonBase.js"
1452
+ "module": "src/ButtonBase.ts"
1453
1453
  }
1454
1454
  },
1455
1455
  {
@@ -1463,7 +1463,7 @@
1463
1463
  },
1464
1464
  "inheritedFrom": {
1465
1465
  "name": "ButtonBase",
1466
- "module": "src/ButtonBase.js"
1466
+ "module": "src/ButtonBase.ts"
1467
1467
  }
1468
1468
  }
1469
1469
  ],
@@ -1522,14 +1522,14 @@
1522
1522
  "name": "CloseButton",
1523
1523
  "declaration": {
1524
1524
  "name": "CloseButton",
1525
- "module": "src/CloseButton.js"
1525
+ "module": "src/CloseButton.ts"
1526
1526
  }
1527
1527
  }
1528
1528
  ]
1529
1529
  },
1530
1530
  {
1531
1531
  "kind": "javascript-module",
1532
- "path": "src/StyledButton.js",
1532
+ "path": "src/StyledButton.ts",
1533
1533
  "declarations": [
1534
1534
  {
1535
1535
  "kind": "class",
@@ -1545,7 +1545,7 @@
1545
1545
  "privacy": "protected",
1546
1546
  "inheritedFrom": {
1547
1547
  "name": "ButtonBase",
1548
- "module": "src/ButtonBase.js"
1548
+ "module": "src/ButtonBase.ts"
1549
1549
  }
1550
1550
  },
1551
1551
  {
@@ -1560,7 +1560,7 @@
1560
1560
  "reflects": true,
1561
1561
  "inheritedFrom": {
1562
1562
  "name": "ButtonBase",
1563
- "module": "src/ButtonBase.js"
1563
+ "module": "src/ButtonBase.ts"
1564
1564
  }
1565
1565
  },
1566
1566
  {
@@ -1574,7 +1574,7 @@
1574
1574
  "attribute": "type",
1575
1575
  "inheritedFrom": {
1576
1576
  "name": "ButtonBase",
1577
- "module": "src/ButtonBase.js"
1577
+ "module": "src/ButtonBase.ts"
1578
1578
  }
1579
1579
  },
1580
1580
  {
@@ -1586,7 +1586,7 @@
1586
1586
  "privacy": "protected",
1587
1587
  "inheritedFrom": {
1588
1588
  "name": "ButtonBase",
1589
- "module": "src/ButtonBase.js"
1589
+ "module": "src/ButtonBase.ts"
1590
1590
  }
1591
1591
  },
1592
1592
  {
@@ -1598,7 +1598,7 @@
1598
1598
  "privacy": "private",
1599
1599
  "inheritedFrom": {
1600
1600
  "name": "ButtonBase",
1601
- "module": "src/ButtonBase.js"
1601
+ "module": "src/ButtonBase.ts"
1602
1602
  }
1603
1603
  },
1604
1604
  {
@@ -1610,7 +1610,7 @@
1610
1610
  "privacy": "public",
1611
1611
  "inheritedFrom": {
1612
1612
  "name": "ButtonBase",
1613
- "module": "src/ButtonBase.js"
1613
+ "module": "src/ButtonBase.ts"
1614
1614
  }
1615
1615
  },
1616
1616
  {
@@ -1622,7 +1622,7 @@
1622
1622
  "privacy": "protected",
1623
1623
  "inheritedFrom": {
1624
1624
  "name": "ButtonBase",
1625
- "module": "src/ButtonBase.js"
1625
+ "module": "src/ButtonBase.ts"
1626
1626
  }
1627
1627
  },
1628
1628
  {
@@ -1636,7 +1636,7 @@
1636
1636
  },
1637
1637
  "inheritedFrom": {
1638
1638
  "name": "ButtonBase",
1639
- "module": "src/ButtonBase.js"
1639
+ "module": "src/ButtonBase.ts"
1640
1640
  }
1641
1641
  },
1642
1642
  {
@@ -1658,7 +1658,7 @@
1658
1658
  ],
1659
1659
  "inheritedFrom": {
1660
1660
  "name": "ButtonBase",
1661
- "module": "src/ButtonBase.js"
1661
+ "module": "src/ButtonBase.ts"
1662
1662
  }
1663
1663
  },
1664
1664
  {
@@ -1672,7 +1672,7 @@
1672
1672
  },
1673
1673
  "inheritedFrom": {
1674
1674
  "name": "ButtonBase",
1675
- "module": "src/ButtonBase.js"
1675
+ "module": "src/ButtonBase.ts"
1676
1676
  }
1677
1677
  },
1678
1678
  {
@@ -1686,7 +1686,7 @@
1686
1686
  },
1687
1687
  "inheritedFrom": {
1688
1688
  "name": "ButtonBase",
1689
- "module": "src/ButtonBase.js"
1689
+ "module": "src/ButtonBase.ts"
1690
1690
  }
1691
1691
  },
1692
1692
  {
@@ -1700,7 +1700,7 @@
1700
1700
  },
1701
1701
  "inheritedFrom": {
1702
1702
  "name": "ButtonBase",
1703
- "module": "src/ButtonBase.js"
1703
+ "module": "src/ButtonBase.ts"
1704
1704
  }
1705
1705
  },
1706
1706
  {
@@ -1714,7 +1714,7 @@
1714
1714
  },
1715
1715
  "inheritedFrom": {
1716
1716
  "name": "ButtonBase",
1717
- "module": "src/ButtonBase.js"
1717
+ "module": "src/ButtonBase.ts"
1718
1718
  }
1719
1719
  },
1720
1720
  {
@@ -1736,7 +1736,7 @@
1736
1736
  ],
1737
1737
  "inheritedFrom": {
1738
1738
  "name": "ButtonBase",
1739
- "module": "src/ButtonBase.js"
1739
+ "module": "src/ButtonBase.ts"
1740
1740
  }
1741
1741
  },
1742
1742
  {
@@ -1758,7 +1758,7 @@
1758
1758
  ],
1759
1759
  "inheritedFrom": {
1760
1760
  "name": "ButtonBase",
1761
- "module": "src/ButtonBase.js"
1761
+ "module": "src/ButtonBase.ts"
1762
1762
  }
1763
1763
  },
1764
1764
  {
@@ -1780,7 +1780,7 @@
1780
1780
  ],
1781
1781
  "inheritedFrom": {
1782
1782
  "name": "ButtonBase",
1783
- "module": "src/ButtonBase.js"
1783
+ "module": "src/ButtonBase.ts"
1784
1784
  }
1785
1785
  },
1786
1786
  {
@@ -1794,7 +1794,7 @@
1794
1794
  },
1795
1795
  "inheritedFrom": {
1796
1796
  "name": "ButtonBase",
1797
- "module": "src/ButtonBase.js"
1797
+ "module": "src/ButtonBase.ts"
1798
1798
  }
1799
1799
  },
1800
1800
  {
@@ -1808,7 +1808,7 @@
1808
1808
  },
1809
1809
  "inheritedFrom": {
1810
1810
  "name": "ButtonBase",
1811
- "module": "src/ButtonBase.js"
1811
+ "module": "src/ButtonBase.ts"
1812
1812
  }
1813
1813
  },
1814
1814
  {
@@ -1822,7 +1822,7 @@
1822
1822
  },
1823
1823
  "inheritedFrom": {
1824
1824
  "name": "ButtonBase",
1825
- "module": "src/ButtonBase.js"
1825
+ "module": "src/ButtonBase.ts"
1826
1826
  }
1827
1827
  }
1828
1828
  ],
@@ -1864,7 +1864,7 @@
1864
1864
  "name": "StyledButton",
1865
1865
  "declaration": {
1866
1866
  "name": "StyledButton",
1867
- "module": "src/StyledButton.js"
1867
+ "module": "src/StyledButton.ts"
1868
1868
  }
1869
1869
  }
1870
1870
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-web-components/button",
3
- "version": "0.19.6",
3
+ "version": "0.19.8-react.54+c59ca07be",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -82,15 +82,15 @@
82
82
  "lit-html"
83
83
  ],
84
84
  "dependencies": {
85
- "@spectrum-web-components/base": "^0.7.1",
86
- "@spectrum-web-components/clear-button": "^0.2.1",
87
- "@spectrum-web-components/close-button": "^0.3.4",
88
- "@spectrum-web-components/icon": "^0.12.3",
89
- "@spectrum-web-components/icons-ui": "^0.9.3",
90
- "@spectrum-web-components/shared": "^0.15.2"
85
+ "@spectrum-web-components/base": "^0.7.3-react.54+c59ca07be",
86
+ "@spectrum-web-components/clear-button": "^0.2.3-react.54+c59ca07be",
87
+ "@spectrum-web-components/close-button": "^0.3.6-react.54+c59ca07be",
88
+ "@spectrum-web-components/icon": "^0.12.5-react.54+c59ca07be",
89
+ "@spectrum-web-components/icons-ui": "^0.9.5-react.54+c59ca07be",
90
+ "@spectrum-web-components/shared": "^0.15.4-react.54+c59ca07be"
91
91
  },
92
92
  "devDependencies": {
93
- "@spectrum-css/button": "^6.0.13"
93
+ "@spectrum-css/button": "^6.0.14"
94
94
  },
95
95
  "types": "./src/index.d.ts",
96
96
  "customElements": "custom-elements.json",
@@ -98,5 +98,5 @@
98
98
  "./sp-*.js",
99
99
  "./**/*.dev.js"
100
100
  ],
101
- "gitHead": "8bd87724e91e23df83dbf63a434bbbe10b8daaa6"
101
+ "gitHead": "c59ca07bef1633dd16241d4be7d87b037ce7ddbf"
102
102
  }
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["Button.ts"],
4
4
  "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n PropertyValues,\n SizedMixin,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport { StyledButton } from './StyledButton.dev.js'\nimport buttonStyles from './button.css.js';\n\nexport type DeprecatedButtonVariants = 'cta' | 'overBackground';\nexport type ButtonStatics = 'white' | 'black';\nexport type ButtonVariants =\n | 'accent'\n | 'primary'\n | 'secondary'\n | 'negative'\n | ButtonStatics\n | DeprecatedButtonVariants;\nexport const VALID_VARIANTS = [\n 'accent',\n 'primary',\n 'secondary',\n 'negative',\n 'white',\n 'black',\n];\n\nexport type ButtonTreatments = 'fill' | 'outline';\n\n/**\n * @element sp-button\n *\n * @slot - text label of the Button\n * @slot icon - The icon to use for Button\n */\nexport class Button extends SizedMixin(StyledButton) {\n public static override get styles(): CSSResultArray {\n return [...super.styles, buttonStyles];\n }\n\n /**\n * The visual variant to apply to this button.\n */\n @property()\n public get variant(): ButtonVariants {\n return this._variant;\n }\n public set variant(variant: ButtonVariants) {\n if (variant === this.variant) return;\n\n this.requestUpdate('variant', this.variant);\n switch (variant) {\n case 'cta':\n this._variant = 'accent';\n break;\n case 'overBackground':\n this._variant = 'white';\n this.treatment = 'outline';\n break;\n default:\n if (!VALID_VARIANTS.includes(variant)) {\n this._variant = 'accent';\n } else {\n this._variant = variant;\n }\n break;\n }\n this.setAttribute('variant', this.variant);\n }\n private _variant: ButtonVariants = 'accent';\n\n /**\n * The visual variant to apply to this button.\n */\n @property({ reflect: true })\n public treatment: ButtonTreatments = 'fill';\n\n /**\n * Style this button to be less obvious\n */\n @property({ type: Boolean })\n public set quiet(quiet: boolean) {\n this.treatment = quiet ? 'outline' : 'fill';\n }\n\n protected override firstUpdated(changes: PropertyValues<this>): void {\n super.firstUpdated(changes);\n if (!this.hasAttribute('variant')) {\n this.setAttribute('variant', this.variant);\n }\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;AAYA;AAAA,EAGI;AAAA,OACG;AACP,SAAS,gBAAgB;AACzB,SAAS,oBAAoB;AAC7B,OAAO,kBAAkB;AAWlB,aAAM,iBAAiB;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACJ;AAUO,aAAM,eAAe,WAAW,YAAY,EAAE;AAAA,EAA9C;AAAA;AAkCH,SAAQ,WAA2B;AAMnC,SAAO,YAA8B;AAAA;AAAA,EAvCrC,WAA2B,SAAyB;AAChD,WAAO,CAAC,GAAG,MAAM,QAAQ,YAAY;AAAA,EACzC;AAAA,EAMA,IAAW,UAA0B;AACjC,WAAO,KAAK;AAAA,EAChB;AAAA,EACA,IAAW,QAAQ,SAAyB;AACxC,QAAI,YAAY,KAAK;AAAS;AAE9B,SAAK,cAAc,WAAW,KAAK,OAAO;AAC1C,YAAQ;AAAA,WACC;AACD,aAAK,WAAW;AAChB;AAAA,WACC;AACD,aAAK,WAAW;AAChB,aAAK,YAAY;AACjB;AAAA;AAEA,YAAI,CAAC,eAAe,SAAS,OAAO,GAAG;AACnC,eAAK,WAAW;AAAA,QACpB,OAAO;AACH,eAAK,WAAW;AAAA,QACpB;AACA;AAAA;AAER,SAAK,aAAa,WAAW,KAAK,OAAO;AAAA,EAC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ACA,SAAK,aAAa,WAAW,KAAK,OAAO;AAAA,EAC7C;AAAA,EAaA,IAAW,MAAM,OAAgB;AAC7B,SAAK,YAAY,QAAQ,YAAY;AAAA,EACzC;AAAA,EAEmB,aAAa,SAAqC;AACjE,UAAM,aAAa,OAAO;AAC1B,QAAI,CAAC,KAAK,aAAa,SAAS,GAAG;AAC/B,WAAK,aAAa,WAAW,KAAK,OAAO;AAAA,IAC7C;AAAA,EACJ;AACJ;AA/Ce;AAAA,EADV,SAAS;AAAA,GARD,OASE;AA+BJ;AAAA,EADN,SAAS,EAAE,SAAS,KAAK,CAAC;AAAA,GAvClB,OAwCF;AAMI;AAAA,EADV,SAAS,EAAE,MAAM,QAAQ,CAAC;AAAA,GA7ClB,OA8CE;",
6
6
  "names": []
7
7
  }
package/src/Button.js.map CHANGED
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["Button.ts"],
4
4
  "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n CSSResultArray,\n PropertyValues,\n SizedMixin,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport { StyledButton } from './StyledButton.js';\nimport buttonStyles from './button.css.js';\n\nexport type DeprecatedButtonVariants = 'cta' | 'overBackground';\nexport type ButtonStatics = 'white' | 'black';\nexport type ButtonVariants =\n | 'accent'\n | 'primary'\n | 'secondary'\n | 'negative'\n | ButtonStatics\n | DeprecatedButtonVariants;\nexport const VALID_VARIANTS = [\n 'accent',\n 'primary',\n 'secondary',\n 'negative',\n 'white',\n 'black',\n];\n\nexport type ButtonTreatments = 'fill' | 'outline';\n\n/**\n * @element sp-button\n *\n * @slot - text label of the Button\n * @slot icon - The icon to use for Button\n */\nexport class Button extends SizedMixin(StyledButton) {\n public static override get styles(): CSSResultArray {\n return [...super.styles, buttonStyles];\n }\n\n /**\n * The visual variant to apply to this button.\n */\n @property()\n public get variant(): ButtonVariants {\n return this._variant;\n }\n public set variant(variant: ButtonVariants) {\n if (variant === this.variant) return;\n\n this.requestUpdate('variant', this.variant);\n switch (variant) {\n case 'cta':\n this._variant = 'accent';\n break;\n case 'overBackground':\n this._variant = 'white';\n this.treatment = 'outline';\n break;\n default:\n if (!VALID_VARIANTS.includes(variant)) {\n this._variant = 'accent';\n } else {\n this._variant = variant;\n }\n break;\n }\n this.setAttribute('variant', this.variant);\n }\n private _variant: ButtonVariants = 'accent';\n\n /**\n * The visual variant to apply to this button.\n */\n @property({ reflect: true })\n public treatment: ButtonTreatments = 'fill';\n\n /**\n * Style this button to be less obvious\n */\n @property({ type: Boolean })\n public set quiet(quiet: boolean) {\n this.treatment = quiet ? 'outline' : 'fill';\n }\n\n protected override firstUpdated(changes: PropertyValues<this>): void {\n super.firstUpdated(changes);\n if (!this.hasAttribute('variant')) {\n this.setAttribute('variant', this.variant);\n }\n }\n}\n"],
5
- "mappings": "qNAYA,OAGI,cAAAA,MACG,gCACP,OAAS,YAAAC,MAAgB,kDACzB,OAAS,gBAAAC,MAAoB,oBAC7B,OAAOC,MAAkB,kBAWlB,aAAM,eAAiB,CAC1B,SACA,UACA,YACA,WACA,QACA,OACJ,EAUO,aAAM,eAAeH,EAAWE,CAAY,CAAE,CAA9C,kCAkCH,KAAQ,SAA2B,SAMnC,KAAO,UAA8B,OAvCrC,WAA2B,QAAyB,CAChD,MAAO,CAAC,GAAG,MAAM,OAAQC,CAAY,CACzC,CAMA,IAAW,SAA0B,CACjC,OAAO,KAAK,QAChB,CACA,IAAW,QAAQC,EAAyB,CACxC,GAAIA,IAAY,KAAK,QAGrB,QADA,KA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R,CACA,KAAK,aAAa,UAAW,KAAK,OAAO,EAC7C,CAaA,IAAW,MAAMC,EAAgB,CAC7B,KAAK,UAAYA,EAAQ,UAAY,MACzC,CAEmB,aAAaC,EAAqC,CACjE,MAAM,aAAaA,CAAO,EACrB,KAAK,aAAa,SAAS,GAC5B,KAAK,aAAa,UAAW,KAAK,OAAO,CAEjD,CACJ,CA/CeC,EAAA,CADVN,EAAS,GARD,OASE,uBA+BJM,EAAA,CADNN,EAAS,CAAE,QAAS,EAAK,CAAC,GAvClB,OAwCF,yBAMIM,EAAA,CADVN,EAAS,CAAE,KAAM,OAAQ,CAAC,GA7ClB,OA8CE",
6
6
  "names": ["SizedMixin", "property", "StyledButton", "buttonStyles", "variant", "quiet", "changes", "__decorateClass"]
7
7
  }
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["ButtonBase.ts"],
4
4
  "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n html,\n PropertyValues,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport {\n property,\n query,\n} from '@spectrum-web-components/base/src/decorators.js';\nimport { LikeAnchor } from '@spectrum-web-components/shared/src/like-anchor.js';\nimport { Focusable } from '@spectrum-web-components/shared/src/focusable.js';\nimport {\n ObserveSlotPresence,\n ObserveSlotText,\n} from '@spectrum-web-components/shared';\n\n/**\n * @slot - text content to be displayed in the Button element\n * @slot icon - icon element(s) to display at the start of the button\n */\nexport class ButtonBase extends LikeAnchor(\n ObserveSlotText(ObserveSlotPresence(Focusable, '[slot=\"icon\"]'))\n) {\n protected get hasIcon(): boolean {\n return this.slotContentIsPresent;\n }\n\n @property({ type: Boolean, reflect: true })\n public active = false;\n\n @property({ type: String })\n public type: 'button' | 'submit' | 'reset' = 'button';\n\n protected get hasLabel(): boolean {\n return this.slotHasContent;\n }\n\n @query('.anchor')\n private anchorElement!: HTMLButtonElement;\n\n public override get focusElement(): HTMLElement {\n return this;\n }\n\n protected get buttonContent(): TemplateResult[] {\n const content = [\n html`\n <div id=\"label\" ?hidden=${!this.hasLabel}>\n <slot\n id=\"slot\"\n @slotchange=${this.manageTextObservedSlot}\n ></slot>\n </div>\n `,\n ];\n if (this.hasIcon) {\n content.unshift(html`\n <slot name=\"icon\" ?icon-only=${!this.hasLabel}></slot>\n `);\n }\n return content;\n }\n\n constructor() {\n super();\n this.proxyFocus = this.proxyFocus.bind(this);\n\n this.addEventListener('click', this.handleClickCapture, {\n capture: true,\n });\n }\n\n public override click(): void {\n if (this.disabled) {\n return;\n }\n\n if (this.shouldProxyClick()) {\n return;\n }\n\n super.click();\n }\n\n private handleClickCapture(event: Event): void | boolean {\n if (this.disabled) {\n event.preventDefault();\n event.stopImmediatePropagation();\n event.stopPropagation();\n return false;\n }\n }\n\n private proxyFocus(): void {\n this.focus();\n }\n\n private shouldProxyClick(): boolean {\n let handled = false;\n if (this.anchorElement) {\n this.anchorElement.click();\n handled = true;\n } else if (this.type !== 'button') {\n const proxy = document.createElement('button');\n proxy.type = this.type;\n this.insertAdjacentElement('afterend', proxy);\n proxy.click();\n proxy.remove();\n handled = true;\n }\n return handled;\n }\n\n public override renderAnchor(): TemplateResult {\n return html`\n ${this.buttonContent}\n ${super.renderAnchor({\n id: 'button',\n ariaHidden: true,\n className: 'button anchor hidden',\n })}\n `;\n }\n\n protected renderButton(): TemplateResult {\n return html`\n ${this.buttonContent}\n `;\n }\n\n protected override render(): TemplateResult {\n return this.href && this.href.length > 0\n ? this.renderAnchor()\n : this.renderButton();\n }\n\n protected handleKeydown(event: KeyboardEvent): void {\n const { code } = event;\n switch (code) {\n case 'Space':\n event.preventDefault();\n if (typeof this.href === 'undefined') {\n this.addEventListener('keyup', this.handleKeyup);\n this.active = true;\n }\n break;\n default:\n break;\n }\n }\n\n private handleKeypress(event: KeyboardEvent): void {\n const { code } = event;\n switch (code) {\n case 'Enter':\n case 'NumpadEnter':\n this.click();\n break;\n default:\n break;\n }\n }\n\n protected handleKeyup(event: KeyboardEvent): void {\n const { code } = event;\n switch (code) {\n case 'Space':\n this.removeEventListener('keyup', this.handleKeyup);\n this.active = false;\n this.click();\n break;\n default:\n break;\n }\n }\n\n private handleRemoveActive(): void {\n this.active = false;\n }\n\n private handlePointerdown(): void {\n this.active = true;\n }\n\n private manageAnchor(): void {\n if (this.href && this.href.length > 0) {\n if (this.getAttribute('role') === 'button') {\n this.setAttribute('role', 'link');\n }\n this.removeEventListener('click', this.shouldProxyClick);\n } else {\n if (\n !this.hasAttribute('role') ||\n this.getAttribute('role') === 'link'\n ) {\n this.setAttribute('role', 'button');\n }\n this.addEventListener('click', this.shouldProxyClick);\n }\n }\n\n protected override firstUpdated(changed: PropertyValues): void {\n super.firstUpdated(changed);\n if (!this.hasAttribute('tabindex')) {\n this.tabIndex = 0;\n }\n this.manageAnchor();\n this.addEventListener('keydown', this.handleKeydown);\n this.addEventListener('keypress', this.handleKeypress);\n this.addEventListener('pointerdown', this.handlePointerdown);\n }\n\n protected override updated(changed: PropertyValues): void {\n super.updated(changed);\n if (changed.has('href')) {\n this.manageAnchor();\n }\n if (changed.has('label')) {\n this.setAttribute('aria-label', this.label || '');\n }\n if (changed.has('active')) {\n if (this.active) {\n this.addEventListener('focusout', this.handleRemoveActive);\n this.addEventListener('pointerup', this.handleRemoveActive);\n this.addEventListener('pointercancel', this.handleRemoveActive);\n this.addEventListener('pointerleave', this.handleRemoveActive);\n } else {\n this.removeEventListener('focusout', this.handleRemoveActive);\n this.removeEventListener('pointerup', this.handleRemoveActive);\n this.removeEventListener(\n 'pointercancel',\n this.handleRemoveActive\n );\n this.removeEventListener(\n 'pointerleave',\n this.handleRemoveActive\n );\n }\n }\n if (this.anchorElement) {\n this.anchorElement.addEventListener('focus', this.proxyFocus);\n this.anchorElement.tabIndex = -1;\n }\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;AAYA;AAAA,EACI;AAAA,OAGG;AACP;AAAA,EACI;AAAA,EACA;AAAA,OACG;AACP,SAAS,kBAAkB;AAC3B,SAAS,iBAAiB;AAC1B;AAAA,EACI;AAAA,EACA;AAAA,OACG;AAMA,aAAM,mBAAmB;AAAA,EAC5B,gBAAgB,oBAAoB,WAAW,eAAe,CAAC;AACnE,EAAE;AAAA,EAyCE,cAAc;AACV,UAAM;AApCV,SAAO,SAAS;AAGhB,SAAO,OAAsC;AAkCzC,SAAK,aAAa,KAAK,WAAW,KAAK,IAAI;AAE3C,SAAK,iBAAiB,SAAS,KAAK,oBAAoB;AAAA,MACpD,SAAS;AAAA,IACb,CAAC;AAAA,EACL;AAAA,EA/CA,IAAc,UAAmB;AAC7B,WAAO,KAAK;AAAA,EAChB;AAAA,EAQA,IAAc,WAAoB;AAC9B,WAAO,KAAK;AAAA,EAChB;AAAA,EAKA,IAAoB,eAA4B;AAC5C,WAAO;AAAA,EACX;AAAA,EAEA,IAAc,gBAAkC;AAC5C,UAAM,UAAU;AAAA,MACZ;AAAA,0CAC8B,CAAC,KAAK;AAAA;AAAA;AAAA,sCAGV,KAAK;AAAA;AAAA;AAAA;AAAA,IAInC;AACA,QAAI,KAAK,SAAS;AACd,cAAQ,QAAQ;AAAA,+CACmB,CAAC,KAAK;AAAA,aACxC;AAAA,IACL;AACA,WAAO;AAAA,EACX;AAAA,EAWgB,QAAc;AAC1B,QAAI,KAAK,UAAU;AACf;AAAA,IACJ;AAEA,QAAI,KAAK,iBAAiB,GAAG;AACzB;AAAA,IACJ;AAEA,UAAM,MAAM;AAAA,EAChB;AAAA,EAEQ,mBAAmB,OAA8B;AACrD,QAAI,KAAK,UAAU;AACf,YAAM,eAAe;AACrB,YAAM,yBAAyB;AA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@@
2
2
  "version": 3,
3
3
  "sources": ["ButtonBase.ts"],
4
4
  "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport {\n html,\n PropertyValues,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport {\n property,\n query,\n} from '@spectrum-web-components/base/src/decorators.js';\nimport { LikeAnchor } from '@spectrum-web-components/shared/src/like-anchor.js';\nimport { Focusable } from '@spectrum-web-components/shared/src/focusable.js';\nimport {\n ObserveSlotPresence,\n ObserveSlotText,\n} from '@spectrum-web-components/shared';\n\n/**\n * @slot - text content to be displayed in the Button element\n * @slot icon - icon element(s) to display at the start of the button\n */\nexport class ButtonBase extends LikeAnchor(\n ObserveSlotText(ObserveSlotPresence(Focusable, '[slot=\"icon\"]'))\n) {\n protected get hasIcon(): boolean {\n return this.slotContentIsPresent;\n }\n\n @property({ type: Boolean, reflect: true })\n public active = false;\n\n @property({ type: String })\n public type: 'button' | 'submit' | 'reset' = 'button';\n\n protected get hasLabel(): boolean {\n return this.slotHasContent;\n }\n\n @query('.anchor')\n private anchorElement!: HTMLButtonElement;\n\n public override get focusElement(): HTMLElement {\n return this;\n }\n\n protected get buttonContent(): TemplateResult[] {\n const content = [\n html`\n <div id=\"label\" ?hidden=${!this.hasLabel}>\n <slot\n id=\"slot\"\n @slotchange=${this.manageTextObservedSlot}\n ></slot>\n </div>\n `,\n ];\n if (this.hasIcon) {\n content.unshift(html`\n <slot name=\"icon\" ?icon-only=${!this.hasLabel}></slot>\n `);\n }\n return content;\n }\n\n constructor() {\n super();\n this.proxyFocus = this.proxyFocus.bind(this);\n\n this.addEventListener('click', this.handleClickCapture, {\n capture: true,\n });\n }\n\n public override click(): void {\n if (this.disabled) {\n return;\n }\n\n if (this.shouldProxyClick()) {\n return;\n }\n\n super.click();\n }\n\n private handleClickCapture(event: Event): void | boolean {\n if (this.disabled) {\n event.preventDefault();\n event.stopImmediatePropagation();\n event.stopPropagation();\n return false;\n }\n }\n\n private proxyFocus(): void {\n this.focus();\n }\n\n private shouldProxyClick(): boolean {\n let handled = false;\n if (this.anchorElement) {\n this.anchorElement.click();\n handled = true;\n } else if (this.type !== 'button') {\n const proxy = document.createElement('button');\n proxy.type = this.type;\n this.insertAdjacentElement('afterend', proxy);\n proxy.click();\n proxy.remove();\n handled = true;\n }\n return handled;\n }\n\n public override renderAnchor(): TemplateResult {\n return html`\n ${this.buttonContent}\n ${super.renderAnchor({\n id: 'button',\n ariaHidden: true,\n className: 'button anchor hidden',\n })}\n `;\n }\n\n protected renderButton(): TemplateResult {\n return html`\n ${this.buttonContent}\n `;\n }\n\n protected override render(): TemplateResult {\n return this.href && this.href.length > 0\n ? this.renderAnchor()\n : this.renderButton();\n }\n\n protected handleKeydown(event: KeyboardEvent): void {\n const { code } = event;\n switch (code) {\n case 'Space':\n event.preventDefault();\n if (typeof this.href === 'undefined') {\n this.addEventListener('keyup', this.handleKeyup);\n this.active = true;\n }\n break;\n default:\n break;\n }\n }\n\n private handleKeypress(event: KeyboardEvent): void {\n const { code } = event;\n switch (code) {\n case 'Enter':\n case 'NumpadEnter':\n this.click();\n break;\n default:\n break;\n }\n }\n\n protected handleKeyup(event: KeyboardEvent): void {\n const { code } = event;\n switch (code) {\n case 'Space':\n this.removeEventListener('keyup', this.handleKeyup);\n this.active = false;\n this.click();\n break;\n default:\n break;\n }\n }\n\n private handleRemoveActive(): void {\n this.active = false;\n }\n\n private handlePointerdown(): void {\n this.active = true;\n }\n\n private manageAnchor(): void {\n if (this.href && this.href.length > 0) {\n if (this.getAttribute('role') === 'button') {\n this.setAttribute('role', 'link');\n }\n this.removeEventListener('click', this.shouldProxyClick);\n } else {\n if (\n !this.hasAttribute('role') ||\n this.getAttribute('role') === 'link'\n ) {\n this.setAttribute('role', 'button');\n }\n this.addEventListener('click', this.shouldProxyClick);\n }\n }\n\n protected override firstUpdated(changed: PropertyValues): void {\n super.firstUpdated(changed);\n if (!this.hasAttribute('tabindex')) {\n this.tabIndex = 0;\n }\n this.manageAnchor();\n this.addEventListener('keydown', this.handleKeydown);\n this.addEventListener('keypress', this.handleKeypress);\n this.addEventListener('pointerdown', this.handlePointerdown);\n }\n\n protected override updated(changed: PropertyValues): void {\n super.updated(changed);\n if (changed.has('href')) {\n this.manageAnchor();\n }\n if (changed.has('label')) {\n this.setAttribute('aria-label', this.label || '');\n }\n if (changed.has('active')) {\n if (this.active) {\n this.addEventListener('focusout', this.handleRemoveActive);\n this.addEventListener('pointerup', this.handleRemoveActive);\n this.addEventListener('pointercancel', this.handleRemoveActive);\n this.addEventListener('pointerleave', this.handleRemoveActive);\n } else {\n this.removeEventListener('focusout', this.handleRemoveActive);\n this.removeEventListener('pointerup', this.handleRemoveActive);\n this.removeEventListener(\n 'pointercancel',\n this.handleRemoveActive\n );\n this.removeEventListener(\n 'pointerleave',\n this.handleRemoveActive\n );\n }\n }\n if (this.anchorElement) {\n this.anchorElement.addEventListener('focus', this.proxyFocus);\n this.anchorElement.tabIndex = -1;\n }\n }\n}\n"],
5
- "mappings": "qNAYA,OACI,QAAAA,MAGG,gCACP,OACI,YAAAC,EACA,SAAAC,MACG,kDACP,OAAS,cAAAC,MAAkB,qDAC3B,OAAS,aAAAC,MAAiB,mDAC1B,OACI,uBAAAC,EACA,mBAAAC,MACG,kCAMA,aAAM,mBAAmBH,EAC5BG,EAAgBD,EAAoBD,EAAW,eAAe,CAAC,CACnE,CAAE,CAyCE,aAAc,CACV,MAAM,EApCV,KAAO,OAAS,GAGhB,KAAO,KAAsC,SAkCzC,KAAK,WAAa,KAAK,WAAW,KAAK,IAAI,EAE3C,KAAK,iBAAiB,QA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AkB,EAC9D,KAAK,iBAAiB,eAAgB,KAAK,kBAAkB,IAE7D,KAAK,oBAAoB,WAAY,KAAK,kBAAkB,EAC5D,KAAK,oBAAoB,YAAa,KAAK,kBAAkB,EAC7D,KAAK,oBACD,gBACA,KAAK,kBACT,EACA,KAAK,oBACD,eACA,KAAK,kBACT,IAGJ,KAAK,gBACL,KAAK,cAAc,iBAAiB,QAAS,KAAK,UAAU,EAC5D,KAAK,cAAc,SAAW,GAEtC,CACJ,CAxNWC,EAAA,CADNZ,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GAPjC,WAQF,sBAGAY,EAAA,CADNZ,EAAS,CAAE,KAAM,MAAO,CAAC,GAVjB,WAWF,oBAOCY,EAAA,CADPX,EAAM,SAAS,GAjBP,WAkBD",
6
6
  "names": ["html", "property", "query", "LikeAnchor", "Focusable", "ObserveSlotPresence", "ObserveSlotText", "content", "event", "handled", "proxy", "code", "changed", "__decorateClass"]
7
7
  }