@coinbase/cds-web 8.75.3 → 8.75.4
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
CHANGED
|
@@ -8,6 +8,12 @@ All notable changes to this project will be documented in this file.
|
|
|
8
8
|
|
|
9
9
|
<!-- template-start -->
|
|
10
10
|
|
|
11
|
+
## 8.75.4 (6/10/2026 PST)
|
|
12
|
+
|
|
13
|
+
#### 🐞 Fixes
|
|
14
|
+
|
|
15
|
+
- Fix: custom Switch sizes now center in the background track correctly.
|
|
16
|
+
|
|
11
17
|
## 8.75.3 ((5/22/2026, 09:31 AM PST))
|
|
12
18
|
|
|
13
19
|
This is an artificial version bump with no new change.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../src/controls/Switch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAUjE,OAAO,EAAW,KAAK,gBAAgB,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../src/controls/Switch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAUjE,OAAO,EAAW,KAAK,gBAAgB,EAAE,MAAM,WAAW,CAAC;AA+B3D,MAAM,MAAM,eAAe,GAAG,gBAAgB,CAAC,MAAM,CAAC,GAAG;IACvD;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,eAAe,CAAC;AAwF1C,eAAO,MAAM,MAAM;;;;;;;;;;;IA9FjB;;OAEG;mBACY,SAAS,CAAC,KAAK;2CA2FS,CAAC"}
|
package/esm/controls/Switch.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
@layer cds{.trackCss-t1fng8qd{width:var(--controlSize-switchWidth);height:var(--controlSize-switchHeight);-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;padding:1px;-webkit-transition: border-color, background-color 0.2s linear;transition: border-color, background-color 0.2s linear;}.trackCss-t1fng8qd[data-filled='true']{-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end;}
|
|
2
|
-
.thumbCss-t1l9xlcf{width:var(--controlSize-switchThumbSize);height:var(--controlSize-switchThumbSize);border:0.5px solid var(--color-bgLine);position:absolute;top:
|
|
2
|
+
.thumbCss-t1l9xlcf{width:var(--controlSize-switchThumbSize);height:var(--controlSize-switchThumbSize);border:0.5px solid var(--color-bgLine);position:absolute;top:calc((var(--controlSize-switchHeight) - var(--controlSize-switchThumbSize)) / 2);left:calc((var(--controlSize-switchHeight) - var(--controlSize-switchThumbSize)) / 2);}}
|
package/esm/controls/Switch.js
CHANGED
|
@@ -21,7 +21,9 @@ const thumbCss = "thumbCss-t1l9xlcf";
|
|
|
21
21
|
const MotionBox = motion(Box);
|
|
22
22
|
const thumbMotionVariants = {
|
|
23
23
|
checked: {
|
|
24
|
-
|
|
24
|
+
// Travel = trackWidth - 2*inset - thumbSize, which simplifies to
|
|
25
|
+
// trackWidth - trackHeight when the thumb is centered with equal insets.
|
|
26
|
+
x: "calc(var(--controlSize-switchWidth) - var(--controlSize-switchHeight))"
|
|
25
27
|
},
|
|
26
28
|
unchecked: {
|
|
27
29
|
x: 0
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinbase/cds-web",
|
|
3
|
-
"version": "8.75.
|
|
3
|
+
"version": "8.75.4",
|
|
4
4
|
"description": "Coinbase Design System - Web",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -207,7 +207,7 @@
|
|
|
207
207
|
"react-dom": "^18.3.1"
|
|
208
208
|
},
|
|
209
209
|
"dependencies": {
|
|
210
|
-
"@coinbase/cds-common": "^8.75.
|
|
210
|
+
"@coinbase/cds-common": "^8.75.4",
|
|
211
211
|
"@coinbase/cds-icons": "^5.16.0",
|
|
212
212
|
"@coinbase/cds-illustrations": "^4.40.1",
|
|
213
213
|
"@coinbase/cds-lottie-files": "^3.3.4",
|