@keboola/design 4.4.0 → 5.1.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.1.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",
@@ -152,6 +166,7 @@
152
166
  "@testing-library/user-event": "^14.6.1",
153
167
  "@types/react": "^19.2.15",
154
168
  "@types/react-dom": "^19.2.3",
169
+ "@typescript/native": "npm:typescript@^7.0.2",
155
170
  "@vitejs/plugin-react": "^6.0.0",
156
171
  "@vitest/browser": "4.1.8",
157
172
  "@vitest/browser-playwright": "4.1.8",
@@ -164,16 +179,17 @@
164
179
  "react": "^19.2.7",
165
180
  "react-docgen-typescript": "^2.2.2",
166
181
  "react-dom": "^19.2.7",
182
+ "size-limit": "12.1.0",
167
183
  "storybook": "^10.2.19",
168
184
  "tailwindcss": "^3.4.17",
169
185
  "tsup": "^8.5.1",
170
186
  "tsx": "^4.19.4",
171
- "typescript": "^6.0.3",
187
+ "typescript": "npm:@typescript/typescript6@^6.0.2",
172
188
  "vite": "^8.0.16",
173
189
  "vitest": "^4.1.8",
174
- "@keboola/oxlint-config": "^2.0.1",
175
- "@keboola/tsconfig": "^0.1.2",
176
- "@keboola/postcss-config": "^0.1.1"
190
+ "@keboola/oxlint-config": "^5.0.0",
191
+ "@keboola/postcss-config": "^0.1.1",
192
+ "@keboola/tsconfig": "^0.2.0"
177
193
  },
178
194
  "peerDependencies": {
179
195
  "@testing-library/react": "^16.3.2",
@@ -197,12 +213,8 @@
197
213
  "@codemirror/legacy-modes": "^6.5.3",
198
214
  "@codemirror/lint": "^6.9.7",
199
215
  "@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",
216
+ "@codemirror/state": "^6.7.1",
217
+ "@codemirror/view": "^6.43.6",
206
218
  "@lexical/code": "^0.42.0",
207
219
  "@lexical/link": "^0.42.0",
208
220
  "@lexical/list": "^0.42.0",
@@ -236,8 +248,8 @@
236
248
  "@rjsf/validator-ajv8": "^6.5.2",
237
249
  "@tanstack/react-form": "^1.29.1",
238
250
  "@testing-library/jest-dom": "^6.8.0",
239
- "@uiw/codemirror-theme-github": "^4.25.2",
240
- "@uiw/react-codemirror": "^4.25.7",
251
+ "@uiw/codemirror-theme-github": "^4.25.10",
252
+ "@uiw/react-codemirror": "^4.25.10",
241
253
  "beautiful-mermaid": "^1.1.3",
242
254
  "boring-avatars": "^2.0.4",
243
255
  "class-variance-authority": "^0.7.1",
@@ -250,12 +262,19 @@
250
262
  "lucide-react": "^1.17.0",
251
263
  "mermaid": "^11.15.0",
252
264
  "node-diff3": "^3.2.0",
253
- "react-day-picker": "^9.13.0",
265
+ "react-day-picker": "^10.0.1",
254
266
  "react-dropzone": "^14.2.3",
255
- "react-resizable-panels": "^3.0.4",
267
+ "react-markdown": "^10.1.0",
268
+ "react-resizable-panels": "^4.12.1",
256
269
  "react-textarea-autosize": "^8.5.9",
270
+ "recharts": "^3.0.0",
271
+ "remark-gfm": "^4.0.0",
257
272
  "sonner": "^2.0.7",
258
- "tailwind-merge": "^2.6.0"
273
+ "tailwind-merge": "^2.6.0",
274
+ "@keboola/brand-registry": "^1.3.0",
275
+ "@keboola/codemirror-lang-sfsql": "^1.2.1",
276
+ "@keboola/tailwind-config": "^0.6.0",
277
+ "@keboola/codemirror-lang-sql": "^0.2.2"
259
278
  },
260
279
  "scripts": {
261
280
  "dev": "storybook dev -p 6006",
@@ -277,7 +296,8 @@
277
296
  "lint:format": "oxfmt --check",
278
297
  "lint:oxlint": "oxlint . --quiet",
279
298
  "lint:design": "designmd lint DESIGN.md",
280
- "ci-checks": "pnpm check:api",
299
+ "ci-checks": "pnpm check:api && pnpm size",
300
+ "size": "size-limit",
281
301
  "generate:api": "tsx scripts/generate-component-api.ts",
282
302
  "check:api": "tsx scripts/generate-component-api.ts --check",
283
303
  "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,29 +50,89 @@
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 */
63
64
  --color-muted: 241 245 249; /* #f1f5f9 */
64
65
  --color-muted-foreground: 100 116 139; /* #64748b */
65
66
 
67
+ /* Skeleton placeholder fill — a touch darker than `muted` so the loading
68
+ block stays perceptible on white cards / off-white background (muted is
69
+ too close to both), and the shimmer highlight reads against it. */
70
+ --color-skeleton: 219 225 235; /* #dbe1eb */
71
+
66
72
  /* Sidebar */
67
73
  --color-sidebar: 255 255 255; /* #ffffff */
68
74
  --color-sidebar-foreground: 30 41 59; /* #1e293b */
69
- --color-sidebar-primary: 31 143 255; /* #1f8fff */
75
+ --color-sidebar-primary: var(--color-primary); /* follows brand primary (default #1f8fff) */
70
76
  --color-sidebar-primary-foreground: 255 255 255; /* #ffffff */
71
77
  --color-sidebar-accent: 219 234 254; /* #dbeafe */
72
78
  --color-sidebar-accent-foreground: 30 41 59; /* #1e293b */
73
79
  --color-sidebar-border: 229 231 235; /* #e5e7eb */
74
- --color-sidebar-ring: 31 143 255; /* #1f8fff */
80
+ --color-sidebar-ring: var(--color-primary); /* follows brand primary (default #1f8fff) */
81
+
82
+ --radius-md: 0.375rem;
83
+ --radius-lg: 0.5rem;
84
+ --radius-sm: 0.25rem;
85
+
86
+ /* Elevation — a brand overrides via `theme.shadows`; defaults match the stock
87
+ Tailwind shadow scale so unset brands render identically. `lift` is a
88
+ stronger hover/raised shadow. */
89
+ --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
90
+ --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
91
+ --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
92
+ --shadow-lift: 0 10px 30px -12px rgb(0 0 0 / 0.28), 0 2px 6px rgb(0 0 0 / 0.06);
93
+ /* Raised-surface elevation for Card / Search. The light value is a pale
94
+ blue-gray tuned for white backgrounds; the dark scheme overrides it below
95
+ with a black shadow so it doesn't read as a light halo on dark surfaces. */
96
+ --shadow-raised: 0 2px 6px 0 rgb(100 135 153 / 0.13);
97
+
98
+ /* Typography pairing — display + mono faces; a brand overrides via
99
+ `theme.typography.fontDisplay` / `fontMono`. Display defaults to the body
100
+ face (`--font-sans`), then the canonical Inter stack, so unset brands keep
101
+ a single typeface (not a generic `sans-serif`). */
102
+ --font-display: var(
103
+ --font-sans,
104
+ 'Inter',
105
+ system-ui,
106
+ -apple-system,
107
+ 'Segoe UI',
108
+ Roboto,
109
+ 'Helvetica Neue',
110
+ Arial,
111
+ 'Noto Sans',
112
+ 'Liberation Sans',
113
+ sans-serif,
114
+ 'Apple Color Emoji',
115
+ 'Segoe UI Emoji',
116
+ 'Segoe UI Symbol',
117
+ 'Noto Color Emoji'
118
+ );
119
+ --font-mono:
120
+ 'SFMono-Regular', 'Menlo', 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New', monospace;
121
+
122
+ /* Density — semantic spacing a brand can shift via `theme.spacing`. */
123
+ --space-gutter: 1.5rem;
124
+ --space-inset: 1.5rem;
125
+
126
+ /* Motion — brand overrides via `theme.motion`. */
127
+ --motion-duration: 200ms;
128
+ --motion-easing: cubic-bezier(0.2, 0.7, 0.2, 1);
129
+
130
+ /* Brand gradient — defaults to a primary→accent sweep; override via `theme.gradient`. */
131
+ --gradient-brand: linear-gradient(
132
+ 135deg,
133
+ rgb(var(--color-primary)),
134
+ rgb(var(--color-accent, var(--color-primary)))
135
+ );
75
136
  }
76
137
 
77
138
  /* Dark mode (Graphite) — Keboola-blue accent, not reachable until the theme toggle ships. */
@@ -101,7 +162,8 @@
101
162
  /* Border / Input / Ring */
102
163
  --color-border: 52 53 62; /* #34353e */
103
164
  --color-input: 60 61 71; /* #3c3d47 */
104
- --color-ring: 31 143 255; /* #1f8fff — focus ring (brand blue) */
165
+ --color-ring: var(--color-primary); /* follows brand primary (default #1f8fff) */
166
+ --color-ring-offset: 19 19 23; /* #131317 — focus-ring offset gap (dark background) */
105
167
 
106
168
  /* Chart — categorical palette (brand-derived, lightened for dark surfaces). */
107
169
  --color-chart-1: 92 173 255; /* #5cadff */
@@ -110,7 +172,7 @@
110
172
  --color-chart-4: 255 190 92; /* #ffbe5c */
111
173
  --color-chart-5: 242 140 232; /* #f28ce8 */
112
174
 
113
- /* Status — categorical (meaning-encoding), tuned for dark surfaces. */
175
+ /* Status — themeable semantic tokens, tuned lighter for dark surfaces. */
114
176
  --color-destructive: 229 72 77; /* #e5484d */
115
177
  --color-destructive-foreground: 255 255 255; /* #ffffff */
116
178
  --color-success: 62 207 127; /* #3ecf7f */
@@ -124,34 +186,23 @@
124
186
  --color-muted: 38 38 45; /* #26262d */
125
187
  --color-muted-foreground: 141 144 153; /* #8d9099 */
126
188
 
189
+ /* Skeleton — lighter than `muted` so it stays visible on both the dark
190
+ background and the (lighter) card surface. */
191
+ --color-skeleton: 52 53 62; /* #34353e */
192
+
127
193
  /* Sidebar */
128
194
  --color-sidebar: 14 14 18; /* #0e0e12 */
129
195
  --color-sidebar-foreground: 229 230 236; /* #e5e6ec */
130
- --color-sidebar-primary: 31 143 255; /* #1f8fff */
196
+ --color-sidebar-primary: var(--color-primary); /* follows brand primary (default #1f8fff) */
131
197
  --color-sidebar-primary-foreground: 255 255 255; /* #ffffff */
132
198
  --color-sidebar-accent: 38 38 45; /* #26262d */
133
199
  --color-sidebar-accent-foreground: 229 230 236; /* #e5e6ec */
134
200
  --color-sidebar-border: 48 49 57; /* #303139 */
135
- --color-sidebar-ring: 31 143 255; /* #1f8fff */
136
- }
201
+ --color-sidebar-ring: var(--color-primary); /* follows brand primary (default #1f8fff) */
137
202
 
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 */
203
+ /* Raised-surface elevation — black shadow instead of the light-tuned pale
204
+ blue-gray, which reads as a halo around Card / Search on dark surfaces. */
205
+ --shadow-raised: 0 2px 6px 0 rgb(0 0 0 / 0.4);
155
206
  }
156
207
 
157
208
  @layer base {