@keboola/design 4.3.2 → 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.3.2",
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
  ],
@@ -24,6 +27,9 @@
24
27
  "icons": [
25
28
  "./dist/icons.d.ts"
26
29
  ],
30
+ "rjsf": [
31
+ "./dist/rjsf.d.ts"
32
+ ],
27
33
  "testing": [
28
34
  "./dist/testing.d.ts"
29
35
  ]
@@ -42,6 +48,16 @@
42
48
  },
43
49
  "./styles": "./src/styles.css",
44
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
+ },
45
61
  "./mermaid": {
46
62
  "import": {
47
63
  "types": "./dist/mermaid.d.ts",
@@ -82,6 +98,16 @@
82
98
  "default": "./dist/icons.cjs"
83
99
  }
84
100
  },
101
+ "./rjsf": {
102
+ "import": {
103
+ "types": "./dist/rjsf.d.ts",
104
+ "default": "./dist/rjsf.js"
105
+ },
106
+ "require": {
107
+ "types": "./dist/rjsf.d.cts",
108
+ "default": "./dist/rjsf.cjs"
109
+ }
110
+ },
85
111
  "./testing": {
86
112
  "import": {
87
113
  "types": "./dist/testing.d.ts",
@@ -128,6 +154,7 @@
128
154
  "@arethetypeswrong/cli": "^0.18.2",
129
155
  "@google/design.md": "0.2.0",
130
156
  "@playwright/test": "1.60.0",
157
+ "@size-limit/file": "12.1.0",
131
158
  "@storybook/addon-a11y": "10.2.19",
132
159
  "@storybook/addon-docs": "^10.2.19",
133
160
  "@storybook/addon-links": "^10.2.19",
@@ -144,13 +171,14 @@
144
171
  "@vitest/browser-playwright": "4.1.8",
145
172
  "@vitest/coverage-istanbul": "4.1.8",
146
173
  "eslint-plugin-storybook": "^10.3.5",
147
- "oxfmt": "^0.44.0",
148
- "oxlint": "^1.56.0",
174
+ "oxfmt": "^0.57.0",
175
+ "oxlint": "^1.72.0",
149
176
  "playwright": "1.60.0",
150
177
  "postcss-import": "^15.1.0",
151
178
  "react": "^19.2.7",
152
179
  "react-docgen-typescript": "^2.2.2",
153
180
  "react-dom": "^19.2.7",
181
+ "size-limit": "12.1.0",
154
182
  "storybook": "^10.2.19",
155
183
  "tailwindcss": "^3.4.17",
156
184
  "tsup": "^8.5.1",
@@ -158,8 +186,8 @@
158
186
  "typescript": "^6.0.3",
159
187
  "vite": "^8.0.16",
160
188
  "vitest": "^4.1.8",
189
+ "@keboola/oxlint-config": "^4.0.0",
161
190
  "@keboola/postcss-config": "^0.1.1",
162
- "@keboola/oxlint-config": "^2.0.0",
163
191
  "@keboola/tsconfig": "^0.1.2"
164
192
  },
165
193
  "peerDependencies": {
@@ -184,12 +212,8 @@
184
212
  "@codemirror/legacy-modes": "^6.5.3",
185
213
  "@codemirror/lint": "^6.9.7",
186
214
  "@codemirror/merge": "^6.12.2",
187
- "@codemirror/state": "^6.7.0",
188
- "@codemirror/view": "^6.43.4",
189
- "@keboola/brand-registry": "^1.1.0",
190
- "@keboola/codemirror-lang-sfsql": "^1.2.1",
191
- "@keboola/codemirror-lang-sql": "^0.2.1",
192
- "@keboola/tailwind-config": "^0.3.0",
215
+ "@codemirror/state": "^6.7.1",
216
+ "@codemirror/view": "^6.43.6",
193
217
  "@lexical/code": "^0.42.0",
194
218
  "@lexical/link": "^0.42.0",
195
219
  "@lexical/list": "^0.42.0",
@@ -218,10 +242,13 @@
218
242
  "@radix-ui/react-toggle": "^1.1.12",
219
243
  "@radix-ui/react-toggle-group": "^1.1.13",
220
244
  "@radix-ui/react-tooltip": "^1.2.10",
245
+ "@rjsf/core": "^6.4.1",
246
+ "@rjsf/utils": "^6.4.1",
247
+ "@rjsf/validator-ajv8": "^6.5.2",
221
248
  "@tanstack/react-form": "^1.29.1",
222
249
  "@testing-library/jest-dom": "^6.8.0",
223
- "@uiw/codemirror-theme-github": "^4.25.2",
224
- "@uiw/react-codemirror": "^4.25.7",
250
+ "@uiw/codemirror-theme-github": "^4.25.10",
251
+ "@uiw/react-codemirror": "^4.25.10",
225
252
  "beautiful-mermaid": "^1.1.3",
226
253
  "boring-avatars": "^2.0.4",
227
254
  "class-variance-authority": "^0.7.1",
@@ -234,12 +261,19 @@
234
261
  "lucide-react": "^1.17.0",
235
262
  "mermaid": "^11.15.0",
236
263
  "node-diff3": "^3.2.0",
237
- "react-day-picker": "^9.13.0",
264
+ "react-day-picker": "^10.0.1",
238
265
  "react-dropzone": "^14.2.3",
239
- "react-resizable-panels": "^3.0.4",
266
+ "react-markdown": "^10.1.0",
267
+ "react-resizable-panels": "^4.12.1",
240
268
  "react-textarea-autosize": "^8.5.9",
269
+ "recharts": "^3.0.0",
270
+ "remark-gfm": "^4.0.0",
241
271
  "sonner": "^2.0.7",
242
- "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"
243
277
  },
244
278
  "scripts": {
245
279
  "dev": "storybook dev -p 6006",
@@ -261,7 +295,8 @@
261
295
  "lint:format": "oxfmt --check",
262
296
  "lint:oxlint": "oxlint . --quiet",
263
297
  "lint:design": "designmd lint DESIGN.md",
264
- "ci-checks": "pnpm check:api",
298
+ "ci-checks": "pnpm check:api && pnpm size",
299
+ "size": "size-limit",
265
300
  "generate:api": "tsx scripts/generate-component-api.ts",
266
301
  "check:api": "tsx scripts/generate-component-api.ts --check",
267
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 {