@coinbase/cds-web 8.16.0 → 8.16.1

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.16.1 (10/9/2025 PST)
12
+
13
+ #### 🐞 Fixes
14
+
15
+ - Update createThemeCssVars to use String.prototype.replace instead of replaceAll. [[#90](https://github.com/coinbase/cds/pull/90)]
16
+
11
17
  ## 8.16.0 (10/8/2025 PST)
12
18
 
13
19
  #### 🚀 Updates
@@ -1 +1 @@
1
- {"version":3,"file":"createThemeCssVars.d.ts","sourceRoot":"","sources":["../../src/core/createThemeCssVars.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,KAAK,EAAE,MAAM,SAAS,CAAC;AAEvD,8FAA8F;AAC9F,eAAO,MAAM,kBAAkB,GAAI,OAAO,OAAO,CAAC,KAAK,CAAC,4BAiCvD,CAAC"}
1
+ {"version":3,"file":"createThemeCssVars.d.ts","sourceRoot":"","sources":["../../src/core/createThemeCssVars.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,KAAK,EAAE,MAAM,SAAS,CAAC;AAIvD,8FAA8F;AAC9F,eAAO,MAAM,kBAAkB,GAAI,OAAO,OAAO,CAAC,KAAK,CAAC,4BAiCvD,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { styleVarPrefixes } from './theme';
2
+ const periodsRegex = /\./g;
2
3
 
3
4
  /** Takes a theme object and formats its keys as CSS variables to be used in inline styles. */
4
5
  export const createThemeCssVars = theme => {
@@ -23,7 +24,7 @@ export const createThemeCssVars = theme => {
23
24
  if (value === undefined) continue;
24
25
 
25
26
  // Create CSS variable name, replacing periods with underscores
26
- const cssVarName = "".concat(cssVarPrefix).concat(varName).replaceAll('.', '_');
27
+ const cssVarName = "".concat(cssVarPrefix).concat(varName).replace(periodsRegex, '_');
27
28
 
28
29
  // Format value (add px to numbers)
29
30
  themeCss[cssVarName] = typeof value !== 'number' ? value : value + 'px';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coinbase/cds-web",
3
- "version": "8.16.0",
3
+ "version": "8.16.1",
4
4
  "description": "Coinbase Design System - Web",
5
5
  "repository": {
6
6
  "type": "git",
@@ -147,7 +147,7 @@
147
147
  "react-dom": "^18.3.1"
148
148
  },
149
149
  "dependencies": {
150
- "@coinbase/cds-common": "^8.16.0",
150
+ "@coinbase/cds-common": "^8.16.1",
151
151
  "@coinbase/cds-icons": "^5.4.2",
152
152
  "@coinbase/cds-illustrations": "^4.23.1",
153
153
  "@coinbase/cds-lottie-files": "^3.3.2",