@keboola/design 4.4.0 → 5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keboola/design",
3
- "version": "4.4.0",
3
+ "version": "5.0.0",
4
4
  "description": "Keboola UI platform design system — shadcn-aligned React primitives, Keboola-branded blocks, and the form bindings built on TanStack Form.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -12,6 +12,9 @@
12
12
  "types": "./dist/index.d.ts",
13
13
  "typesVersions": {
14
14
  "*": {
15
+ "charts": [
16
+ "./dist/charts.d.ts"
17
+ ],
15
18
  "mermaid": [
16
19
  "./dist/mermaid.d.ts"
17
20
  ],
@@ -45,6 +48,16 @@
45
48
  },
46
49
  "./styles": "./src/styles.css",
47
50
  "./styles/compiled": "./dist/styles.css",
51
+ "./charts": {
52
+ "import": {
53
+ "types": "./dist/charts.d.ts",
54
+ "default": "./dist/charts.js"
55
+ },
56
+ "require": {
57
+ "types": "./dist/charts.d.cts",
58
+ "default": "./dist/charts.cjs"
59
+ }
60
+ },
48
61
  "./mermaid": {
49
62
  "import": {
50
63
  "types": "./dist/mermaid.d.ts",
@@ -141,6 +154,7 @@
141
154
  "@arethetypeswrong/cli": "^0.18.2",
142
155
  "@google/design.md": "0.2.0",
143
156
  "@playwright/test": "1.60.0",
157
+ "@size-limit/file": "12.1.0",
144
158
  "@storybook/addon-a11y": "10.2.19",
145
159
  "@storybook/addon-docs": "^10.2.19",
146
160
  "@storybook/addon-links": "^10.2.19",
@@ -164,6 +178,7 @@
164
178
  "react": "^19.2.7",
165
179
  "react-docgen-typescript": "^2.2.2",
166
180
  "react-dom": "^19.2.7",
181
+ "size-limit": "12.1.0",
167
182
  "storybook": "^10.2.19",
168
183
  "tailwindcss": "^3.4.17",
169
184
  "tsup": "^8.5.1",
@@ -171,9 +186,9 @@
171
186
  "typescript": "^6.0.3",
172
187
  "vite": "^8.0.16",
173
188
  "vitest": "^4.1.8",
174
- "@keboola/oxlint-config": "^2.0.1",
175
- "@keboola/tsconfig": "^0.1.2",
176
- "@keboola/postcss-config": "^0.1.1"
189
+ "@keboola/oxlint-config": "^4.0.0",
190
+ "@keboola/postcss-config": "^0.1.1",
191
+ "@keboola/tsconfig": "^0.1.2"
177
192
  },
178
193
  "peerDependencies": {
179
194
  "@testing-library/react": "^16.3.2",
@@ -197,12 +212,8 @@
197
212
  "@codemirror/legacy-modes": "^6.5.3",
198
213
  "@codemirror/lint": "^6.9.7",
199
214
  "@codemirror/merge": "^6.12.2",
200
- "@codemirror/state": "^6.7.0",
201
- "@codemirror/view": "^6.43.4",
202
- "@keboola/brand-registry": "^1.1.0",
203
- "@keboola/codemirror-lang-sfsql": "^1.2.1",
204
- "@keboola/codemirror-lang-sql": "^0.2.1",
205
- "@keboola/tailwind-config": "^0.3.0",
215
+ "@codemirror/state": "^6.7.1",
216
+ "@codemirror/view": "^6.43.6",
206
217
  "@lexical/code": "^0.42.0",
207
218
  "@lexical/link": "^0.42.0",
208
219
  "@lexical/list": "^0.42.0",
@@ -236,8 +247,8 @@
236
247
  "@rjsf/validator-ajv8": "^6.5.2",
237
248
  "@tanstack/react-form": "^1.29.1",
238
249
  "@testing-library/jest-dom": "^6.8.0",
239
- "@uiw/codemirror-theme-github": "^4.25.2",
240
- "@uiw/react-codemirror": "^4.25.7",
250
+ "@uiw/codemirror-theme-github": "^4.25.10",
251
+ "@uiw/react-codemirror": "^4.25.10",
241
252
  "beautiful-mermaid": "^1.1.3",
242
253
  "boring-avatars": "^2.0.4",
243
254
  "class-variance-authority": "^0.7.1",
@@ -250,12 +261,19 @@
250
261
  "lucide-react": "^1.17.0",
251
262
  "mermaid": "^11.15.0",
252
263
  "node-diff3": "^3.2.0",
253
- "react-day-picker": "^9.13.0",
264
+ "react-day-picker": "^10.0.1",
254
265
  "react-dropzone": "^14.2.3",
255
- "react-resizable-panels": "^3.0.4",
266
+ "react-markdown": "^10.1.0",
267
+ "react-resizable-panels": "^4.12.1",
256
268
  "react-textarea-autosize": "^8.5.9",
269
+ "recharts": "^3.0.0",
270
+ "remark-gfm": "^4.0.0",
257
271
  "sonner": "^2.0.7",
258
- "tailwind-merge": "^2.6.0"
272
+ "tailwind-merge": "^2.6.0",
273
+ "@keboola/brand-registry": "^1.3.0",
274
+ "@keboola/codemirror-lang-sfsql": "^1.2.1",
275
+ "@keboola/codemirror-lang-sql": "^0.2.2",
276
+ "@keboola/tailwind-config": "^0.5.0"
259
277
  },
260
278
  "scripts": {
261
279
  "dev": "storybook dev -p 6006",
@@ -277,7 +295,8 @@
277
295
  "lint:format": "oxfmt --check",
278
296
  "lint:oxlint": "oxlint . --quiet",
279
297
  "lint:design": "designmd lint DESIGN.md",
280
- "ci-checks": "pnpm check:api",
298
+ "ci-checks": "pnpm check:api && pnpm size",
299
+ "size": "size-limit",
281
300
  "generate:api": "tsx scripts/generate-component-api.ts",
282
301
  "check:api": "tsx scripts/generate-component-api.ts --check",
283
302
  "type-check": "tsc"
package/src/styles.css CHANGED
@@ -40,7 +40,8 @@
40
40
  /* Border / Input / Ring */
41
41
  --color-border: 229 231 235; /* #e5e7eb */
42
42
  --color-input: 203 213 225; /* #cbd5e1 */
43
- --color-ring: 31 143 255; /* #1f8fff — focus ring (brand blue) */
43
+ --color-ring: var(--color-primary); /* follows brand primary (default #1f8fff) */
44
+ --color-ring-offset: 255 255 255; /* #ffffff — focus-ring offset gap */
44
45
 
45
46
  /* Chart — categorical palette (brand-derived, mutually distinct). */
46
47
  --color-chart-1: 31 143 255; /* #1f8fff */
@@ -49,14 +50,14 @@
49
50
  --color-chart-4: 245 147 0; /* #f59300 */
50
51
  --color-chart-5: 237 94 223; /* #ed5edf */
51
52
 
52
- /* Status — categorical (meaning-encoding), tunable per color scheme. */
53
+ /* Status — themeable semantic tokens; defaults ship AA-legible as text/icon on their own tint. */
53
54
  --color-destructive: 220 38 38; /* #dc2626 */
54
55
  --color-destructive-foreground: 255 255 255; /* #ffffff */
55
- --color-success: 31 157 97; /* #1f9d61 */
56
+ --color-success: 24 122 76; /* #187a4c — AA-legible (≥4.5:1) as text/icon on its tint */
56
57
  --color-success-foreground: 255 255 255; /* #ffffff */
57
- --color-warning: 245 147 0; /* #f59300 */
58
- --color-warning-foreground: 82 49 0; /* #523100 — dark text for legibility on amber */
59
- --color-info: 31 143 255; /* #1f8fff */
58
+ --color-warning: 138 82 16; /* #8a5210 — AA-legible as text/icon on its tint */
59
+ --color-warning-foreground: 255 255 255; /* #ffffff — token is now dark, so solid fills take white text */
60
+ --color-info: 22 104 196; /* #1668c4 — AA-legible as text/icon on its tint (decoupled from brand blue) */
60
61
  --color-info-foreground: 255 255 255; /* #ffffff */
61
62
 
62
63
  /* Muted */
@@ -66,12 +67,67 @@
66
67
  /* Sidebar */
67
68
  --color-sidebar: 255 255 255; /* #ffffff */
68
69
  --color-sidebar-foreground: 30 41 59; /* #1e293b */
69
- --color-sidebar-primary: 31 143 255; /* #1f8fff */
70
+ --color-sidebar-primary: var(--color-primary); /* follows brand primary (default #1f8fff) */
70
71
  --color-sidebar-primary-foreground: 255 255 255; /* #ffffff */
71
72
  --color-sidebar-accent: 219 234 254; /* #dbeafe */
72
73
  --color-sidebar-accent-foreground: 30 41 59; /* #1e293b */
73
74
  --color-sidebar-border: 229 231 235; /* #e5e7eb */
74
- --color-sidebar-ring: 31 143 255; /* #1f8fff */
75
+ --color-sidebar-ring: var(--color-primary); /* follows brand primary (default #1f8fff) */
76
+
77
+ --radius-md: 0.375rem;
78
+ --radius-lg: 0.5rem;
79
+ --radius-sm: 0.25rem;
80
+
81
+ /* Elevation — a brand overrides via `theme.shadows`; defaults match the stock
82
+ Tailwind shadow scale so unset brands render identically. `lift` is a
83
+ stronger hover/raised shadow. */
84
+ --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
85
+ --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
86
+ --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
87
+ --shadow-lift: 0 10px 30px -12px rgb(0 0 0 / 0.28), 0 2px 6px rgb(0 0 0 / 0.06);
88
+ /* Raised-surface elevation for Card / Search. The light value is a pale
89
+ blue-gray tuned for white backgrounds; the dark scheme overrides it below
90
+ with a black shadow so it doesn't read as a light halo on dark surfaces. */
91
+ --shadow-raised: 0 2px 6px 0 rgb(100 135 153 / 0.13);
92
+
93
+ /* Typography pairing — display + mono faces; a brand overrides via
94
+ `theme.typography.fontDisplay` / `fontMono`. Display defaults to the body
95
+ face (`--font-sans`), then the canonical Inter stack, so unset brands keep
96
+ a single typeface (not a generic `sans-serif`). */
97
+ --font-display: var(
98
+ --font-sans,
99
+ 'Inter',
100
+ system-ui,
101
+ -apple-system,
102
+ 'Segoe UI',
103
+ Roboto,
104
+ 'Helvetica Neue',
105
+ Arial,
106
+ 'Noto Sans',
107
+ 'Liberation Sans',
108
+ sans-serif,
109
+ 'Apple Color Emoji',
110
+ 'Segoe UI Emoji',
111
+ 'Segoe UI Symbol',
112
+ 'Noto Color Emoji'
113
+ );
114
+ --font-mono:
115
+ 'SFMono-Regular', 'Menlo', 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New', monospace;
116
+
117
+ /* Density — semantic spacing a brand can shift via `theme.spacing`. */
118
+ --space-gutter: 1.5rem;
119
+ --space-inset: 1.5rem;
120
+
121
+ /* Motion — brand overrides via `theme.motion`. */
122
+ --motion-duration: 200ms;
123
+ --motion-easing: cubic-bezier(0.2, 0.7, 0.2, 1);
124
+
125
+ /* Brand gradient — defaults to a primary→accent sweep; override via `theme.gradient`. */
126
+ --gradient-brand: linear-gradient(
127
+ 135deg,
128
+ rgb(var(--color-primary)),
129
+ rgb(var(--color-accent, var(--color-primary)))
130
+ );
75
131
  }
76
132
 
77
133
  /* Dark mode (Graphite) — Keboola-blue accent, not reachable until the theme toggle ships. */
@@ -101,7 +157,8 @@
101
157
  /* Border / Input / Ring */
102
158
  --color-border: 52 53 62; /* #34353e */
103
159
  --color-input: 60 61 71; /* #3c3d47 */
104
- --color-ring: 31 143 255; /* #1f8fff — focus ring (brand blue) */
160
+ --color-ring: var(--color-primary); /* follows brand primary (default #1f8fff) */
161
+ --color-ring-offset: 19 19 23; /* #131317 — focus-ring offset gap (dark background) */
105
162
 
106
163
  /* Chart — categorical palette (brand-derived, lightened for dark surfaces). */
107
164
  --color-chart-1: 92 173 255; /* #5cadff */
@@ -110,7 +167,7 @@
110
167
  --color-chart-4: 255 190 92; /* #ffbe5c */
111
168
  --color-chart-5: 242 140 232; /* #f28ce8 */
112
169
 
113
- /* Status — categorical (meaning-encoding), tuned for dark surfaces. */
170
+ /* Status — themeable semantic tokens, tuned lighter for dark surfaces. */
114
171
  --color-destructive: 229 72 77; /* #e5484d */
115
172
  --color-destructive-foreground: 255 255 255; /* #ffffff */
116
173
  --color-success: 62 207 127; /* #3ecf7f */
@@ -127,31 +184,16 @@
127
184
  /* Sidebar */
128
185
  --color-sidebar: 14 14 18; /* #0e0e12 */
129
186
  --color-sidebar-foreground: 229 230 236; /* #e5e6ec */
130
- --color-sidebar-primary: 31 143 255; /* #1f8fff */
187
+ --color-sidebar-primary: var(--color-primary); /* follows brand primary (default #1f8fff) */
131
188
  --color-sidebar-primary-foreground: 255 255 255; /* #ffffff */
132
189
  --color-sidebar-accent: 38 38 45; /* #26262d */
133
190
  --color-sidebar-accent-foreground: 229 230 236; /* #e5e6ec */
134
191
  --color-sidebar-border: 48 49 57; /* #303139 */
135
- --color-sidebar-ring: 31 143 255; /* #1f8fff */
136
- }
192
+ --color-sidebar-ring: var(--color-primary); /* follows brand primary (default #1f8fff) */
137
193
 
138
- /* Alert variant tints are categorical light fills (e.g. error-100) that don't
139
- flip via the semantic tokens above, so they need dark-mode equivalents. Scoped
140
- to the alert group class — NOT bare [data-variant], which Toast/Badge/Button/
141
- Select also set. `[data-theme='dark']` never activates for keboola-legacy
142
- (light-only), so this is inert for kbc-ui. Pairs with AlertRoot's
143
- brand-driven `tw-text-foreground` text (argo brands) so both bg and text flip. */
144
- [data-theme='dark'] [class~='tw-group/alert'][data-variant='error'] {
145
- background-color: rgb(51 22 25); /* #331619 */
146
- }
147
- [data-theme='dark'] [class~='tw-group/alert'][data-variant='warning'] {
148
- background-color: rgb(51 36 15); /* #33240f */
149
- }
150
- [data-theme='dark'] [class~='tw-group/alert'][data-variant='success'] {
151
- background-color: rgb(20 42 28); /* #142a1c */
152
- }
153
- [data-theme='dark'] [class~='tw-group/alert'][data-variant='info'] {
154
- background-color: rgb(21 37 53); /* #152535 */
194
+ /* Raised-surface elevation — black shadow instead of the light-tuned pale
195
+ blue-gray, which reads as a halo around Card / Search on dark surfaces. */
196
+ --shadow-raised: 0 2px 6px 0 rgb(0 0 0 / 0.4);
155
197
  }
156
198
 
157
199
  @layer base {