origam 2.26.0 → 2.26.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
|
@@ -18,6 +18,13 @@ This project follows [Semantic Versioning](https://semver.org).
|
|
|
18
18
|
|
|
19
19
|
## [Unreleased]
|
|
20
20
|
|
|
21
|
+
## [2.26.1] - 2026-10-14
|
|
22
|
+
|
|
23
|
+
### Fixed — `warnLegacyColor` : dev uniquement, et plus d'avertissement pour `var()` / `color-mix()` (#1099)
|
|
24
|
+
|
|
25
|
+
- L'avertissement « received a raw color » est desormais garde par `import.meta.env?.DEV` (meme garde que `warnUnsupportedProp`) : il ne sort plus en production et la chaine disparait d'un bundle de production (`.output` marketing : 0 occurrence).
|
|
26
|
+
- `bgColor="var(--brand)"` / `color="color-mix(...)"` ne sont plus traites comme une couleur brute : ce sont le chemin de migration recommande. Le rendu est inchange (canal custom / style inline). `#fff`, `rgb()` etc. avertissent toujours en dev, une fois par valeur.
|
|
27
|
+
|
|
21
28
|
## [2.26.0] - 2026-10-14
|
|
22
29
|
|
|
23
30
|
### Changed — `OrigamCard`, `OrigamExpansionPanel(Content)`, `OrigamDataTableRows` : le skeleton suit l'anatomie du conteneur (#1073 lot 2b, #1081, #1076)
|
|
@@ -408,7 +408,9 @@ function tokenForegroundForIntent(intent) {
|
|
|
408
408
|
}
|
|
409
409
|
const _warnedColorKeys = /* @__PURE__ */new Set();
|
|
410
410
|
function warnLegacyColor(kind, value) {
|
|
411
|
+
if (!process.env?.DEV) return;
|
|
411
412
|
if (typeof console === "undefined") return;
|
|
413
|
+
if (/^\s*(?:var|color-mix)\(/i.test(value)) return;
|
|
412
414
|
const key = `${kind}::${value}`;
|
|
413
415
|
if (_warnedColorKeys.has(key)) return;
|
|
414
416
|
_warnedColorKeys.add(key);
|
|
@@ -470,6 +470,13 @@ export declare function tokenForegroundForIntent(intent: TIntent): string;
|
|
|
470
470
|
* Warn (once per prop / value) that the consumer passed a raw CSS color
|
|
471
471
|
* to a prop where the design system expects a `TIntent`. Raw color
|
|
472
472
|
* support is deprecated and will be removed in v3.0.0.
|
|
473
|
+
*
|
|
474
|
+
* @description
|
|
475
|
+
* Dev-only (`import.meta.env.DEV`, same gate as `warnUnsupportedProp`), so
|
|
476
|
+
* the message is tree-shaken from production bundles. `var(--x)` and
|
|
477
|
+
* `color-mix(...)` are NOT raw colors: they are the migration path the DS
|
|
478
|
+
* recommends (token reference / derived from tokens) and are rendered
|
|
479
|
+
* through the custom-value channel without any warning.
|
|
473
480
|
********************************************************/
|
|
474
481
|
export declare function warnLegacyColor(kind: 'color' | 'bgColor', value: string): void;
|
|
475
482
|
/*********************************************************
|
|
@@ -314,7 +314,9 @@ export function tokenForegroundForIntent(intent) {
|
|
|
314
314
|
}
|
|
315
315
|
const _warnedColorKeys = /* @__PURE__ */ new Set();
|
|
316
316
|
export function warnLegacyColor(kind, value) {
|
|
317
|
+
if (!import.meta.env?.DEV) return;
|
|
317
318
|
if (typeof console === "undefined") return;
|
|
319
|
+
if (/^\s*(?:var|color-mix)\(/i.test(value)) return;
|
|
318
320
|
const key = `${kind}::${value}`;
|
|
319
321
|
if (_warnedColorKeys.has(key)) return;
|
|
320
322
|
_warnedColorKeys.add(key);
|