@mediaradar/design-components 0.57.0 → 0.59.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mediaradar/design-components",
3
- "version": "0.57.0",
3
+ "version": "0.59.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
@@ -32,7 +32,7 @@
32
32
  "check:arbitrary-values": "node scripts/check-arbitrary-values.mjs",
33
33
  "check:colors": "node scripts/check-colors.mjs",
34
34
  "check:sentence-case": "node scripts/check-sentence-case.mjs",
35
- "test": "node --test test/cn.test.mjs test/jsdom.test.mjs test/advertiser-quick-filter.test.mjs test/search-bar-ad-codes.test.mjs test/search-bar-scope.test.mjs test/filter-drawer.test.mjs test/date-format.test.mjs test/card-filter-props.test.mjs test/common-props.test.mjs test/date-range-a11y.test.mjs test/focus-ring.test.mjs test/dates.test.mjs"
35
+ "test": "node --test test/cn.test.mjs test/jsdom.test.mjs test/advertiser-quick-filter.test.mjs test/search-bar-ad-codes.test.mjs test/search-bar-scope.test.mjs test/filter-drawer.test.mjs test/date-format.test.mjs test/card-filter-props.test.mjs test/common-props.test.mjs test/date-range-a11y.test.mjs test/focus-ring.test.mjs test/dates.test.mjs test/numbers.test.mjs"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "@mediaradar/design-tokens": ">=3.9.0",
@@ -19,7 +19,9 @@ const CANDIDATE_RE = /^(?:[a-z][a-zA-Z0-9]*:)*[a-z][a-zA-Z0-9]*-(?:\[[^\]\s"'<>]
19
19
  // Class-shaped strings in the bundle confirmed by real runs not to be
20
20
  // classes: HTML attribute names, popper placement values, a package name,
21
21
  // a locale tag, an SVG attribute value, an event name.
22
- const KNOWN_NON_CLASS_RE = /^(aria|data)-/;
22
+ // Language codes ("en-GB", "fr-CA") are strings the number and date
23
+ // formatters key on, never classes.
24
+ const KNOWN_NON_CLASS_RE = /^(aria|data)-|^[a-z]{2}-[A-Z]{2}$/;
23
25
  const KNOWN_NON_CLASS_EXACT = new Set([
24
26
  // Not classes, but they look exactly like them and ship in the bundle as
25
27
  // plain strings, so the scanner picks them up and then reports them missing