@spectrum-css/button
Advanced tools
Comparing version 13.1.1 to 13.1.2
230
CHANGELOG.md
# Change Log | ||
## 13.1.2 | ||
### Patch Changes | ||
- [#3045](https://github.com/adobe/spectrum-css/pull/3045) [`5d6e03f`](https://github.com/adobe/spectrum-css/commit/5d6e03f30891f9171f1a600b06d534ee85719277) Thanks [@castastrophe](https://github.com/castastrophe)! - Improve changeset suggestions by using exports instead of files in component packages | ||
- Updated dependencies [[`5d6e03f`](https://github.com/adobe/spectrum-css/commit/5d6e03f30891f9171f1a600b06d534ee85719277)]: | ||
- @spectrum-css/progresscircle@3.1.3 | ||
- @spectrum-css/icon@7.1.3 | ||
## 13.1.1 | ||
@@ -34,3 +44,5 @@ | ||
<a name="13.0.0"></a> | ||
#13.0.0 | ||
## 13.0.0 | ||
🗓 | ||
@@ -58,3 +70,5 @@ 2024-04-18 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@12.0.2...@spectrum-css/button@13.0.0) | ||
<a name="12.0.2"></a> | ||
##12.0.2 | ||
## 12.0.2 | ||
🗓 | ||
@@ -66,3 +80,5 @@ 2024-03-07 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@12.0.1...@spectrum-css/button@12.0.2) | ||
<a name="12.0.1"></a> | ||
##12.0.1 | ||
## 12.0.1 | ||
🗓 | ||
@@ -74,3 +90,5 @@ 2024-02-26 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@12.0.0...@spectrum-css/button@12.0.1) | ||
<a name="12.0.0"></a> | ||
#12.0.0 | ||
## 12.0.0 | ||
🗓 | ||
@@ -123,3 +141,5 @@ 2024-02-20 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@11.3.1...@spectrum-css/button@12.0.0) | ||
<a name="11.3.1"></a> | ||
##11.3.1 | ||
## 11.3.1 | ||
🗓 | ||
@@ -131,3 +151,5 @@ 2024-02-16 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@11.3.0...@spectrum-css/button@11.3.1) | ||
<a name="11.3.0"></a> | ||
#11.3.0 | ||
## 11.3.0 | ||
🗓 | ||
@@ -141,3 +163,5 @@ 2024-02-15 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@11.2.1...@spectrum-css/button@11.3.0) | ||
<a name="11.2.1"></a> | ||
##11.2.1 | ||
## 11.2.1 | ||
🗓 | ||
@@ -149,3 +173,5 @@ 2024-02-06 | ||
<a name="11.2.0"></a> | ||
#11.2.0 | ||
## 11.2.0 | ||
🗓 | ||
@@ -157,3 +183,5 @@ 2024-02-05 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@11.1.0...@spectrum-css/button@11.2.0) | ||
<a name="11.1.0"></a> | ||
#11.1.0 | ||
## 11.1.0 | ||
🗓 | ||
@@ -171,3 +199,5 @@ 2024-01-29 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@11.0.19...@spectrum-css/button@11.1.0) | ||
<a name="11.0.19"></a> | ||
##11.0.19 | ||
## 11.0.19 | ||
🗓 | ||
@@ -179,3 +209,5 @@ 2024-01-16 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@11.0.18...@spectrum-css/button@11.0.19) | ||
<a name="11.0.18"></a> | ||
##11.0.18 | ||
## 11.0.18 | ||
🗓 | ||
@@ -187,3 +219,5 @@ 2023-12-12 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@11.0.17...@spectrum-css/button@11.0.18) | ||
<a name="11.0.17"></a> | ||
##11.0.17 | ||
## 11.0.17 | ||
🗓 | ||
@@ -195,3 +229,5 @@ 2023-12-04 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@11.0.16...@spectrum-css/button@11.0.17) | ||
<a name="11.0.16"></a> | ||
##11.0.16 | ||
## 11.0.16 | ||
🗓 | ||
@@ -203,3 +239,5 @@ 2023-11-15 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@11.0.14...@spectrum-css/button@11.0.16) | ||
<a name="11.0.15"></a> | ||
##11.0.15 | ||
## 11.0.15 | ||
🗓 | ||
@@ -211,3 +249,5 @@ 2023-11-13 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@11.0.14...@spectrum-css/button@11.0.15) | ||
<a name="11.0.14"></a> | ||
##11.0.14 | ||
## 11.0.14 | ||
🗓 | ||
@@ -219,3 +259,5 @@ 2023-11-09 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@11.0.13...@spectrum-css/button@11.0.14) | ||
<a name="11.0.13"></a> | ||
##11.0.13 | ||
## 11.0.13 | ||
🗓 | ||
@@ -227,3 +269,5 @@ 2023-10-13 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@11.0.12...@spectrum-css/button@11.0.13) | ||
<a name="11.0.12"></a> | ||
##11.0.12 | ||
## 11.0.12 | ||
🗓 | ||
@@ -235,3 +279,5 @@ 2023-09-26 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@11.0.11...@spectrum-css/button@11.0.12) | ||
<a name="11.0.11"></a> | ||
##11.0.11 | ||
## 11.0.11 | ||
🗓 | ||
@@ -243,3 +289,5 @@ 2023-09-18 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@11.0.10...@spectrum-css/button@11.0.11) | ||
<a name="11.0.10"></a> | ||
##11.0.10 | ||
## 11.0.10 | ||
🗓 | ||
@@ -251,3 +299,5 @@ 2023-09-14 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@11.0.9...@spectrum-css/button@11.0.10) | ||
<a name="11.0.9"></a> | ||
##11.0.9 | ||
## 11.0.9 | ||
🗓 | ||
@@ -259,3 +309,5 @@ 2023-09-13 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@11.0.8...@spectrum-css/button@11.0.9) | ||
<a name="11.0.8"></a> | ||
##11.0.8 | ||
## 11.0.8 | ||
🗓 | ||
@@ -267,3 +319,5 @@ 2023-09-07 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@11.0.7...@spectrum-css/button@11.0.8) | ||
<a name="11.0.7"></a> | ||
##11.0.7 | ||
## 11.0.7 | ||
🗓 | ||
@@ -275,3 +329,5 @@ 2023-09-01 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@11.0.6...@spectrum-css/button@11.0.7) | ||
<a name="11.0.6"></a> | ||
##11.0.6 | ||
## 11.0.6 | ||
🗓 | ||
@@ -283,3 +339,5 @@ 2023-08-31 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@11.0.5...@spectrum-css/button@11.0.6) | ||
<a name="11.0.5"></a> | ||
##11.0.5 | ||
## 11.0.5 | ||
🗓 | ||
@@ -291,3 +349,5 @@ 2023-08-31 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@11.0.4...@spectrum-css/button@11.0.5) | ||
<a name="11.0.4"></a> | ||
##11.0.4 | ||
## 11.0.4 | ||
🗓 | ||
@@ -301,3 +361,5 @@ 2023-08-29 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@11.0.3...@spectrum-css/button@11.0.4) | ||
<a name="11.0.3"></a> | ||
##11.0.3 | ||
## 11.0.3 | ||
🗓 | ||
@@ -309,3 +371,5 @@ 2023-08-22 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@11.0.2...@spectrum-css/button@11.0.3) | ||
<a name="11.0.2"></a> | ||
##11.0.2 | ||
## 11.0.2 | ||
🗓 | ||
@@ -317,3 +381,5 @@ 2023-08-22 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@11.0.0...@spectrum-css/button@11.0.2) | ||
<a name="11.0.1"></a> | ||
##11.0.1 | ||
## 11.0.1 | ||
🗓 | ||
@@ -325,3 +391,5 @@ 2023-08-18 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@11.0.0...@spectrum-css/button@11.0.1) | ||
<a name="11.0.0"></a> | ||
#11.0.0 | ||
## 11.0.0 | ||
🗓 | ||
@@ -339,3 +407,5 @@ 2023-08-16 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@10.1.14...@spectrum-css/button@11.0.0) | ||
<a name="10.1.14"></a> | ||
##10.1.14 | ||
## 10.1.14 | ||
🗓 | ||
@@ -347,3 +417,5 @@ 2023-08-10 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@10.1.13...@spectrum-css/button@10.1.14) | ||
<a name="10.1.13"></a> | ||
##10.1.13 | ||
## 10.1.13 | ||
🗓 | ||
@@ -355,3 +427,5 @@ 2023-08-07 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@10.1.12...@spectrum-css/button@10.1.13) | ||
<a name="10.1.12"></a> | ||
##10.1.12 | ||
## 10.1.12 | ||
🗓 | ||
@@ -363,3 +437,5 @@ 2023-08-03 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@10.1.11...@spectrum-css/button@10.1.12) | ||
<a name="10.1.11"></a> | ||
##10.1.11 | ||
## 10.1.11 | ||
🗓 | ||
@@ -371,3 +447,5 @@ 2023-07-24 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@10.1.10...@spectrum-css/button@10.1.11) | ||
<a name="10.1.10"></a> | ||
##10.1.10 | ||
## 10.1.10 | ||
🗓 | ||
@@ -379,3 +457,5 @@ 2023-07-17 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@10.1.9...@spectrum-css/button@10.1.10) | ||
<a name="10.1.9"></a> | ||
##10.1.9 | ||
## 10.1.9 | ||
🗓 | ||
@@ -389,3 +469,5 @@ 2023-07-14 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@10.1.8...@spectrum-css/button@10.1.9) | ||
<a name="10.1.8"></a> | ||
##10.1.8 | ||
## 10.1.8 | ||
🗓 | ||
@@ -397,3 +479,5 @@ 2023-07-11 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@10.1.7...@spectrum-css/button@10.1.8) | ||
<a name="10.1.7"></a> | ||
##10.1.7 | ||
## 10.1.7 | ||
🗓 | ||
@@ -405,3 +489,5 @@ 2023-06-29 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@10.1.6...@spectrum-css/button@10.1.7) | ||
<a name="10.1.6"></a> | ||
##10.1.6 | ||
## 10.1.6 | ||
🗓 | ||
@@ -413,3 +499,5 @@ 2023-06-21 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@10.1.5...@spectrum-css/button@10.1.6) | ||
<a name="10.1.5"></a> | ||
##10.1.5 | ||
## 10.1.5 | ||
🗓 | ||
@@ -421,3 +509,5 @@ 2023-06-15 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@10.1.4...@spectrum-css/button@10.1.5) | ||
<a name="10.1.4"></a> | ||
##10.1.4 | ||
## 10.1.4 | ||
🗓 | ||
@@ -431,3 +521,5 @@ 2023-06-12 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@10.1.3...@spectrum-css/button@10.1.4) | ||
<a name="10.1.3"></a> | ||
##10.1.3 | ||
## 10.1.3 | ||
🗓 | ||
@@ -439,3 +531,5 @@ 2023-06-02 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@10.1.2...@spectrum-css/button@10.1.3) | ||
<a name="10.1.2"></a> | ||
##10.1.2 | ||
## 10.1.2 | ||
🗓 | ||
@@ -456,3 +550,3 @@ 2023-06-01 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@10.1.1...@spectrum-css/button@10.1.2) | ||
# 10.1.0 | ||
## 10.1.0 | ||
@@ -555,3 +649,3 @@ 🗓 2023-05-22 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@10.0.11...@spectrum-css/button@10.1.0) | ||
# 10.0.0 | ||
## 10.0.0 | ||
@@ -627,3 +721,3 @@ 🗓 2023-04-25 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@9.1.6...@spectrum-css/button@10.0.0) | ||
# 9.1.0 | ||
## 9.1.0 | ||
@@ -750,3 +844,3 @@ 🗓 2023-04-10 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@9.0.14...@spectrum-css/button@9.1.0) | ||
# 9.0.0 | ||
## 9.0.0 | ||
@@ -763,3 +857,3 @@ 🗓 2023-02-01 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@8.0.0...@spectrum-css/button@9.0.0) | ||
# 8.0.0 | ||
## 8.0.0 | ||
@@ -776,3 +870,3 @@ 🗓 2023-02-01 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@6.0.21...@spectrum-css/button@8.0.0) | ||
# 7.0.0 | ||
## 7.0.0 | ||
@@ -789,3 +883,3 @@ 🗓 2023-01-31 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@7.0.0-beta.6...@spectrum-css/button@7.0.0) | ||
# 7.0.0-beta.5 | ||
## 7.0.0-beta.5 | ||
@@ -977,3 +1071,3 @@ 🗓 2023-01-26 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@6.0.20...@spectrum-css/button@7.0.0-beta.5) | ||
# 6.0.0 | ||
## 6.0.0 | ||
@@ -1001,3 +1095,3 @@ 🗓 2022-01-05 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@4.1.4...@spectrum-css/button@6.0.0) | ||
# 5.0.0 | ||
## 5.0.0 | ||
@@ -1012,3 +1106,3 @@ 🗓 2022-01-05 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@5.0.0-beta.0...@spectrum-css/button@5.0.0) | ||
# 5.0.0-beta.0 | ||
## 5.0.0-beta.0 | ||
@@ -1066,3 +1160,3 @@ 🗓 2021-12-14 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@4.1.4...@spectrum-css/button@5.0.0-beta.0) | ||
# 4.1.0 | ||
## 4.1.0 | ||
@@ -1094,3 +1188,3 @@ 🗓 2021-11-08 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@4.0.0-alpha.2...@spectrum-css/button@4.1.0) | ||
# 4.0.0 | ||
## 4.0.0 | ||
@@ -1106,3 +1200,3 @@ 🗓 2021-09-29 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@4.0.0-alpha.2...@spectrum-css/button@4.0.0) | ||
# 4.0.0-alpha.2 | ||
## 4.0.0-alpha.2 | ||
@@ -1115,3 +1209,3 @@ 🗓 2021-08-16 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@4.0.0-alpha.1...@spectrum-css/button@4.0.0-alpha.2) | ||
# 4.0.0-alpha.1 | ||
## 4.0.0-alpha.1 | ||
@@ -1127,3 +1221,3 @@ 🗓 2021-06-17 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@4.0.0-alpha.0...@spectrum-css/button@4.0.0-alpha.1) | ||
# 4.0.0-alpha.0 | ||
## 4.0.0-alpha.0 | ||
@@ -1170,3 +1264,3 @@ 🗓 2021-05-12 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@3.0.3-alpha.0...@spectrum-css/button@4.0.0-alpha.0) | ||
# 3.0.0 | ||
## 3.0.0 | ||
@@ -1179,3 +1273,3 @@ 🗓 2021-02-02 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@3.0.0-beta.6...@spectrum-css/button@3.0.0) | ||
# 3.0.0-beta.6 | ||
## 3.0.0-beta.6 | ||
@@ -1210,3 +1304,3 @@ 🗓 2020-12-04 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@3.0.0-beta.5...@spectrum-css/button@3.0.0-beta.6) | ||
# 3.0.0-beta.5 | ||
## 3.0.0-beta.5 | ||
@@ -1219,3 +1313,3 @@ 🗓 2020-10-20 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@3.0.0-beta.4...@spectrum-css/button@3.0.0-beta.5) | ||
# 3.0.0-beta.4 | ||
## 3.0.0-beta.4 | ||
@@ -1235,3 +1329,3 @@ 🗓 2020-09-23 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@3.0.0-beta.3...@spectrum-css/button@3.0.0-beta.4) | ||
# 3.0.0-beta.3 | ||
## 3.0.0-beta.3 | ||
@@ -1246,3 +1340,3 @@ 🗓 2020-06-19 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@3.0.0-beta.2...@spectrum-css/button@3.0.0-beta.3) | ||
# 3.0.0-beta.2 | ||
## 3.0.0-beta.2 | ||
@@ -1271,3 +1365,3 @@ 🗓 2020-05-14 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@3.0.0-beta.1...@spectrum-css/button@3.0.0-beta.2) | ||
# 3.0.0-beta.1 | ||
## 3.0.0-beta.1 | ||
@@ -1280,3 +1374,3 @@ 🗓 2020-03-12 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@3.0.0-beta.0...@spectrum-css/button@3.0.0-beta.1) | ||
# 3.0.0-beta.0 | ||
## 3.0.0-beta.0 | ||
@@ -1291,3 +1385,3 @@ 🗓 2020-03-09 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@2.2.0...@spectrum-css/button@3.0.0-beta.0) | ||
# 2.2.0 | ||
## 2.2.0 | ||
@@ -1302,3 +1396,3 @@ 🗓 2020-03-06 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@2.1.0...@spectrum-css/button@2.2.0) | ||
# 2.1.0 | ||
## 2.1.0 | ||
@@ -1341,3 +1435,3 @@ 🗓 2020-02-10 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/button@2.0.3...@spectrum-css/button@2.1.0) | ||
# 2.0.0 | ||
## 2.0.0 | ||
@@ -1344,0 +1438,0 @@ 🗓 2019-10-08 |
{ | ||
"name": "@spectrum-css/button", | ||
"version": "13.1.1", | ||
"version": "13.1.2", | ||
"description": "The Spectrum CSS button component", | ||
@@ -16,3 +16,12 @@ "license": "Apache-2.0", | ||
}, | ||
"main": "dist/index.css", | ||
"exports": { | ||
".": "./dist/index.css", | ||
"./CHANGELOG.md": "./CHANGELOG.md", | ||
"./index-*.css": "./dist/index-*.css", | ||
"./index.css": "./dist/index.css", | ||
"./metadata.json": "./metadata/metadata.json", | ||
"./metadata/*": "./metadata/*", | ||
"./package.json": "./package.json", | ||
"./stories/*": "./stories/*" | ||
}, | ||
"files": [ | ||
@@ -22,5 +31,6 @@ "dist/*", | ||
"package.json", | ||
"stories/template.js", | ||
"metadata/mods.md" | ||
"stories/*", | ||
"metadata/*" | ||
], | ||
"main": "dist/index.css", | ||
"peerDependencies": { | ||
@@ -27,0 +37,0 @@ "@spectrum-css/icon": ">=7", |
@@ -1,2 +0,4 @@ | ||
import { useArgs } from "@storybook/preview-api"; | ||
import { Template as Icon } from "@spectrum-css/icon/stories/template.js"; | ||
import { getRandomId } from "@spectrum-css/preview/decorators"; | ||
import { Template as ProgressCircle } from "@spectrum-css/progresscircle/stories/template.js"; | ||
import { html } from "lit"; | ||
@@ -7,9 +9,4 @@ import { classMap } from "lit/directives/class-map.js"; | ||
import { when } from "lit/directives/when.js"; | ||
import { capitalize } from "lodash-es"; | ||
import { capitalize, lowerCase } from "lodash-es"; | ||
import { Template as Icon } from "@spectrum-css/icon/stories/template.js"; | ||
import { Template as ProgressCircle } from "@spectrum-css/progresscircle/stories/template.js"; | ||
import "../index.css"; | ||
@@ -19,3 +16,3 @@ | ||
rootClass = "spectrum-Button", | ||
id, | ||
id = getRandomId("button"), | ||
testId, | ||
@@ -40,15 +37,5 @@ customClasses = [], | ||
ariaControls, | ||
...globals | ||
}) => { | ||
const { express } = globals; | ||
try { | ||
if (express) import(/* webpackPrefetch: true */ "../themes/express.css"); | ||
else import(/* webpackPrefetch: true */ "../themes/spectrum.css"); | ||
} | ||
catch (e) { | ||
console.warn(e); | ||
} | ||
} = {}, context = {}) => { | ||
const { updateArgs } = context; | ||
const [, updateArgs] = useArgs(); | ||
return html` | ||
@@ -60,18 +47,22 @@ <button | ||
[`${rootClass}--${variant}`]: typeof variant !== "undefined", | ||
[`${rootClass}--size${size?.toUpperCase()}`]: typeof size !== "undefined", | ||
[`${rootClass}--static${capitalize(lowerCase(staticColor))}`]: typeof staticColor !== "undefined", | ||
[`${rootClass}--size${size?.toUpperCase()}`]: | ||
typeof size !== "undefined", | ||
[`${rootClass}--static${capitalize(staticColor)}`]: | ||
typeof staticColor !== "undefined", | ||
[`${rootClass}--iconOnly`]: hideLabel, | ||
["is-pending"]: isPending, | ||
["is-disabled"]: isDisabled, | ||
["is-hover"]: isHovered, | ||
["is-focus-visible"]: isFocused, | ||
["is-active"]: isActive, | ||
["is-hover"]: isHovered, | ||
["is-focus-visible"]: isFocused, | ||
["is-active"]: isActive, | ||
...customClasses.reduce((a, c) => ({ ...a, [c]: true }), {}), | ||
})} | ||
id=${ifDefined(id)} | ||
style=${ifDefined(styleMap(customStyles))} | ||
style=${styleMap(customStyles)} | ||
?disabled=${isDisabled} | ||
@click=${onclick ?? function() { | ||
@click=${onclick ?? | ||
function () { | ||
// Toggle the is-pending state on-click | ||
updateArgs({ isPending: true }); | ||
setTimeout(() => { | ||
@@ -81,2 +72,8 @@ updateArgs({ isPending: false }); | ||
}} | ||
@focusin=${function() { | ||
updateArgs({ isFocused: true }); | ||
}} | ||
@focusout=${function() { | ||
updateArgs({ isFocused: false }); | ||
}} | ||
aria-label=${ifDefined(hideLabel ? iconName : undefined)} | ||
@@ -87,16 +84,25 @@ aria-expanded=${ifDefined(ariaExpanded?.toString())} | ||
> | ||
${when(iconName && !iconAfterLabel, () => Icon({ ...globals, iconName, size }))} | ||
${when(label && !hideLabel, | ||
${when(iconName && !iconAfterLabel, () => | ||
Icon({ iconName, size }, context) | ||
)} | ||
${when( | ||
label && !hideLabel, | ||
() => html`<span class=${`${rootClass}-label`}>${label}</span>` | ||
)} | ||
${when(iconName && iconAfterLabel, () => Icon({ ...globals, iconName, size }))} | ||
${when(isPending, () => ProgressCircle({ | ||
...globals, | ||
size: "s", | ||
testId: "progress-circle", | ||
staticColor, | ||
isIndeterminate: true, | ||
}))} | ||
${when(iconName && iconAfterLabel, () => | ||
Icon({ iconName, size }, context) | ||
)} | ||
${when(isPending, () => | ||
ProgressCircle( | ||
{ | ||
size: "s", | ||
testId: "progress-circle", | ||
staticColor, | ||
isIndeterminate: true, | ||
}, | ||
context | ||
) | ||
)} | ||
</button> | ||
`; | ||
}; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
552590
20
4646