@fabio.caffarello/react-design-system 4.3.0 → 4.5.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.
@@ -1,12 +1,15 @@
1
1
  import type { HTMLAttributes, ReactNode } from "react";
2
2
  /**
3
- * Semantic tone for a {@link DataBadge}. Mirrors the `Badge` vocabulary
4
- * (role, not tone) so the soft-wash color treatment is shared and already
5
- * AA-verified. Map a consumer's tone names onto these roles:
6
- * `default neutral`, `destructive error`, `brand primary`,
7
- * `accent info` (or `secondary`).
3
+ * Semantic tone for a {@link DataBadge}. The status/brand members mirror the
4
+ * `Badge` vocabulary (role, not tone) so the soft-wash treatment is shared
5
+ * and already AA-verified; `dataviz` adds a CATEGORICAL member (a
6
+ * reddish-purple wash for "category / analytical" data, the badge-facing
7
+ * counterpart to the chart palette) that is intentionally NOT a status.
8
+ * Map a consumer's tone names onto these roles: `default → neutral`,
9
+ * `destructive → error`, `brand → primary`, `accent → dataviz` (the
10
+ * data-viz purple — RDS `accent` is cyan, so the category tone is `dataviz`).
8
11
  */
9
- export type DataBadgeTone = "neutral" | "success" | "warning" | "error" | "info" | "primary" | "secondary";
12
+ export type DataBadgeTone = "neutral" | "success" | "warning" | "error" | "info" | "primary" | "secondary" | "dataviz";
10
13
  export type DataBadgeSize = "sm" | "md";
11
14
  export interface DataBadgeProps extends HTMLAttributes<HTMLSpanElement> {
12
15
  /** Primary datum — the value the badge is about (e.g. "L2", "Aprovada"). */
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.3.0",
4
+ "version": "4.5.0",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -32,7 +32,9 @@
32
32
  "import": "./dist/granular/index.js"
33
33
  },
34
34
  "./styles": "./dist/react-design-system.css",
35
- "./styles.css": "./dist/react-design-system.css"
35
+ "./styles.css": "./dist/react-design-system.css",
36
+ "./theme": "./dist/tokens.css",
37
+ "./theme.css": "./dist/tokens.css"
36
38
  },
37
39
  "files": [
38
40
  "dist",
@@ -43,8 +45,8 @@
43
45
  "access": "public"
44
46
  },
45
47
  "scripts": {
46
- "build": "npx tsc --project tsconfig.app.json --declaration --emitDeclarationOnly --outDir dist && vite build && vite build --config vite.config.server.ts && vite build --config vite.config.hooks.ts && vite build --config vite.config.granular.ts && npm run build:validate",
47
- "build:validate": "tsx scripts/validate-build-exports.ts && node scripts/validate-use-client-in-dist.mjs && node scripts/validate-server-entry.mjs",
48
+ "build": "npx tsc --project tsconfig.app.json --declaration --emitDeclarationOnly --outDir dist && vite build && vite build --config vite.config.server.ts && vite build --config vite.config.hooks.ts && vite build --config vite.config.granular.ts && node scripts/build-tokens-css.mjs && npm run build:validate",
49
+ "build:validate": "tsx scripts/validate-build-exports.ts && node scripts/validate-use-client-in-dist.mjs && node scripts/validate-server-entry.mjs && node scripts/validate-theme-export.mjs",
48
50
  "lint": "eslint .",
49
51
  "typecheck": "tsc --build --force tsconfig.json",
50
52
  "storybook": "storybook dev -p 6006",
@@ -101,14 +103,14 @@
101
103
  "@commitlint/config-conventional": "^21.0.2",
102
104
  "@eslint/js": "^10.0.1",
103
105
  "@playwright/test": "^1.60.0",
104
- "@storybook/addon-a11y": "^10.4.2",
106
+ "@storybook/addon-a11y": "^10.4.6",
105
107
  "@storybook/addon-coverage": "^3.0.1",
106
108
  "@storybook/addon-designs": "^11.1.3",
107
- "@storybook/addon-docs": "^10.4.2",
109
+ "@storybook/addon-docs": "^10.4.6",
108
110
  "@storybook/addon-measure": "^9.0.8",
109
111
  "@storybook/addon-outline": "^9.0.8",
110
- "@storybook/addon-vitest": "^10.4.2",
111
- "@storybook/react-vite": "^10.4.2",
112
+ "@storybook/addon-vitest": "^10.4.6",
113
+ "@storybook/react-vite": "^10.4.6",
112
114
  "@storybook/test": "^8.6.15",
113
115
  "@tailwindcss/vite": "^4.3.0",
114
116
  "@testing-library/dom": "^10.4.1",
@@ -125,10 +127,10 @@
125
127
  "baseline-browser-mapping": "^2.10.37",
126
128
  "culori": "^4.0.2",
127
129
  "dependency-cruiser": "^17.3.6",
128
- "eslint": "^10.4.1",
130
+ "eslint": "^10.5.0",
129
131
  "eslint-plugin-react-hooks": "^5.2.0",
130
- "eslint-plugin-react-refresh": "^0.4.22",
131
- "eslint-plugin-storybook": "^10.4.2",
132
+ "eslint-plugin-react-refresh": "^0.5.3",
133
+ "eslint-plugin-storybook": "^10.4.6",
132
134
  "globals": "^16.4.0",
133
135
  "husky": "^9.1.7",
134
136
  "jsdom": "^29.1.1",
@@ -137,15 +139,15 @@
137
139
  "madge": "^8.0.0",
138
140
  "plop": "^4.0.5",
139
141
  "postcss": "^8.5.6",
140
- "prettier": "^3.8.3",
142
+ "prettier": "^3.8.4",
141
143
  "react-hook-form": "^7.79.0",
142
144
  "remark-gfm": "^4.0.1",
143
- "storybook": "^10.4.2",
145
+ "storybook": "^10.4.6",
144
146
  "storybook-addon-performance": "^0.17.3",
145
147
  "tailwindcss": "^4.3.0",
146
148
  "tsx": "^4.22.4",
147
149
  "typescript": "~6.0.3",
148
- "typescript-eslint": "^8.60.1",
150
+ "typescript-eslint": "^8.61.1",
149
151
  "vite": "^7.1.7",
150
152
  "vite-tsconfig-paths": "^6.1.1",
151
153
  "vitest": "^4.1.8"