@fabio.caffarello/react-design-system 2.1.0 → 3.0.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/dist/index.cjs +83 -83
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2735 -2670
- package/dist/index.js.map +1 -1
- package/dist/react-design-system.css +1 -1
- package/dist/server/index.cjs +26 -26
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.js +432 -394
- package/dist/server/index.js.map +1 -1
- package/dist/ui/tokens/colors/brand.d.ts +22 -0
- package/dist/ui/tokens/colors/index.d.ts +5 -4
- package/dist/ui/tokens/colors/primitives.d.ts +2 -2
- package/dist/ui/tokens/colors/semantic.d.ts +2 -2
- package/dist/ui/tokens/colors/types.d.ts +11 -4
- package/dist/ui/tokens/colors/utils.d.ts +2 -2
- package/dist/ui/tokens/index.d.ts +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Brand Primitive Palettes — TS mirror of src/styles/primitives/brand.css
|
|
3
|
+
*
|
|
4
|
+
* Brand-primary: institutional navy from brasil-a-vera globals.css.
|
|
5
|
+
* Brand-secondary: OKLCH-derived from ADR-024 brasil-a-vera purple
|
|
6
|
+
* (reproducible via scripts/derive-brand-secondary.mjs).
|
|
7
|
+
*
|
|
8
|
+
* Distinct from PRIMITIVE_COLORS Tailwind tones (indigo/pink/cyan/...)
|
|
9
|
+
* which stay honest to their official Tailwind v4 values. Semantic tokens
|
|
10
|
+
* point at these brand palettes, not at Tailwind tones.
|
|
11
|
+
*
|
|
12
|
+
* @brand brasil-a-vera (default, overridable)
|
|
13
|
+
*/
|
|
14
|
+
import type { ColorPalette } from "./types";
|
|
15
|
+
/**
|
|
16
|
+
* Brand Primary — institutional navy
|
|
17
|
+
*/
|
|
18
|
+
export declare const BRAND_PRIMARY: ColorPalette;
|
|
19
|
+
/**
|
|
20
|
+
* Brand Secondary — ADR-024 purple, OKLCH-derived (hue 295)
|
|
21
|
+
*/
|
|
22
|
+
export declare const BRAND_SECONDARY: ColorPalette;
|
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Design System - Color Tokens Index
|
|
3
3
|
*
|
|
4
4
|
* Central export for all color-related tokens and utilities.
|
|
5
5
|
*
|
|
6
|
-
* @brand
|
|
6
|
+
* @brand brasil-a-vera (default, overridable)
|
|
7
7
|
* @version 1.0.0
|
|
8
8
|
*/
|
|
9
9
|
export type { ColorScale, PrimitiveColorName, SemanticColorName, TextColorName, BgColorName, BorderColorName, StateColorName, ThemeMode, ThemeVariant, ColorToken, ColorPalette, SemanticColor, SemanticColorPalette, PrimitiveColors, ThemeColors, GetColorOptions, GetColorClassOptions, } from "./types";
|
|
10
10
|
export { COLOR_SCALES } from "./types";
|
|
11
|
+
export { BRAND_PRIMARY, BRAND_SECONDARY } from "./brand";
|
|
11
12
|
export { INDIGO, VIOLET, CYAN, SLATE, GRAY, EMERALD, GREEN, AMBER, YELLOW, ORANGE, ROSE, RED, SKY, BLUE, FUCHSIA, PINK, PURPLE, TEAL, LIME, PRIMITIVE_COLORS, getPrimitiveColor, getPrimitiveColorPalette, } from "./primitives";
|
|
12
13
|
export { SEMANTIC_COLORS, SEMANTIC_COLORS_LIGHT, SEMANTIC_COLORS_DARK, getSemanticColor, getSemanticColorRole, } from "./semantic";
|
|
13
14
|
export { getColor, getSemanticColorValue, getColorClass, getSemanticColorClass, getHoverColorClass, getFocusColorClass, getFocusRingClass, withOpacity, isLightColor, getContrastColor, blendColors, lighten, darken, } from "./utils";
|
|
14
15
|
export declare const BRAND_COLORS: {
|
|
15
16
|
readonly primary: {
|
|
16
|
-
readonly name: "
|
|
17
|
+
readonly name: "brand-primary";
|
|
17
18
|
readonly light: 400;
|
|
18
19
|
readonly default: 500;
|
|
19
20
|
readonly dark: 600;
|
|
20
21
|
};
|
|
21
22
|
readonly secondary: {
|
|
22
|
-
readonly name: "
|
|
23
|
+
readonly name: "brand-secondary";
|
|
23
24
|
readonly light: 400;
|
|
24
25
|
readonly default: 500;
|
|
25
26
|
readonly dark: 600;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Design System - Primitive Color Tokens
|
|
3
3
|
*
|
|
4
4
|
* Complete color palettes with all shades (50-950).
|
|
5
5
|
* These match the CSS variables defined in primitives/colors.css
|
|
6
6
|
*
|
|
7
|
-
* @brand
|
|
7
|
+
* @brand brasil-a-vera (default, overridable)
|
|
8
8
|
* @version 1.0.0
|
|
9
9
|
*/
|
|
10
10
|
import type { ColorPalette, ColorToken, ColorScale, PrimitiveColorName, PrimitiveColors } from "./types";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Design System - Semantic Color Tokens
|
|
3
3
|
*
|
|
4
4
|
* Semantic colors that reference primitive palettes.
|
|
5
5
|
* These are the colors you should use in components.
|
|
6
6
|
*
|
|
7
|
-
* @brand
|
|
7
|
+
* @brand brasil-a-vera (default, overridable)
|
|
8
8
|
* @version 1.0.0
|
|
9
9
|
*/
|
|
10
10
|
import type { SemanticColor, SemanticColorName, SemanticColorPalette, ColorToken } from "./types";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Design System - Color Token Types
|
|
3
3
|
*
|
|
4
4
|
* TypeScript types for the color system.
|
|
5
5
|
*
|
|
6
|
-
* @brand
|
|
6
|
+
* @brand brasil-a-vera (default, overridable)
|
|
7
7
|
* @version 1.0.0
|
|
8
8
|
*/
|
|
9
9
|
/**
|
|
@@ -17,8 +17,15 @@ export type ColorScale = 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 90
|
|
|
17
17
|
export declare const COLOR_SCALES: ColorScale[];
|
|
18
18
|
/**
|
|
19
19
|
* Primitive color names (raw color palettes)
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
*
|
|
21
|
+
* Two families coexist:
|
|
22
|
+
* - Tailwind tones (indigo, violet, ..., lime) — honest to Tailwind v4 HEX.
|
|
23
|
+
* - Brand primitives (brand-primary, brand-secondary) — the design system's
|
|
24
|
+
* own scales, declared in src/styles/primitives/brand.css and mirrored
|
|
25
|
+
* in src/ui/tokens/colors/brand.ts. These are the reskin surface;
|
|
26
|
+
* semantic tokens reference them, not Tailwind tones.
|
|
27
|
+
*/
|
|
28
|
+
export type PrimitiveColorName = "brand-primary" | "brand-secondary" | "indigo" | "violet" | "cyan" | "slate" | "gray" | "emerald" | "green" | "amber" | "yellow" | "orange" | "rose" | "red" | "sky" | "blue" | "fuchsia" | "pink" | "purple" | "teal" | "lime";
|
|
22
29
|
/**
|
|
23
30
|
* Semantic color names (meaningful colors)
|
|
24
31
|
*/
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Design System - Color Utilities
|
|
3
3
|
*
|
|
4
4
|
* Helper functions for working with colors.
|
|
5
5
|
*
|
|
6
|
-
* @brand
|
|
6
|
+
* @brand brasil-a-vera (default, overridable)
|
|
7
7
|
* @version 1.0.0
|
|
8
8
|
*/
|
|
9
9
|
import type { ColorToken, ColorScale, PrimitiveColorName, SemanticColorName, GetColorOptions, GetColorClassOptions } from "./types";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fabio.caffarello/react-design-system",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "3.0.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -111,6 +111,7 @@
|
|
|
111
111
|
"@vitest/coverage-v8": "^4.1.8",
|
|
112
112
|
"autoprefixer": "^10.4.21",
|
|
113
113
|
"baseline-browser-mapping": "^2.10.32",
|
|
114
|
+
"culori": "^4.0.2",
|
|
114
115
|
"dependency-cruiser": "^17.3.6",
|
|
115
116
|
"eslint": "^10.4.1",
|
|
116
117
|
"eslint-plugin-react-hooks": "^5.2.0",
|