@keboola/design 3.2.3 → 4.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": "3.2.3",
3
+ "version": "4.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",
@@ -18,6 +18,9 @@
18
18
  "markdown-editor": [
19
19
  "./dist/markdown-editor.d.ts"
20
20
  ],
21
+ "editors": [
22
+ "./dist/editors.d.ts"
23
+ ],
21
24
  "icons": [
22
25
  "./dist/icons.d.ts"
23
26
  ],
@@ -59,6 +62,16 @@
59
62
  "default": "./dist/markdown-editor.cjs"
60
63
  }
61
64
  },
65
+ "./editors": {
66
+ "import": {
67
+ "types": "./dist/editors.d.ts",
68
+ "default": "./dist/editors.js"
69
+ },
70
+ "require": {
71
+ "types": "./dist/editors.d.cts",
72
+ "default": "./dist/editors.cjs"
73
+ }
74
+ },
62
75
  "./icons": {
63
76
  "import": {
64
77
  "types": "./dist/icons.d.ts",
@@ -108,41 +121,12 @@
108
121
  "shadcn",
109
122
  "components"
110
123
  ],
111
- "scripts": {
112
- "dev": "storybook dev -p 6006",
113
- "build-storybook": "storybook build",
114
- "transit": "yarn build",
115
- "build": "yarn build:js && yarn build:css",
116
- "build:js": "tsup",
117
- "build:css": "tailwindcss --postcss -c tailwind.config.js -i src/styles.css -o dist/styles.css --minify",
118
- "build:check": "attw --pack . --exclude-entrypoints ./styles ./styles/compiled",
119
- "prepublishOnly": "yarn build && yarn build:check",
120
- "test": "vitest run --config vite.config.ts --passWithNoTests --reporter=dot",
121
- "test:stories": "vitest run --config vitest.config.ts",
122
- "test:stories:coverage": "vitest run --config vitest.config.ts --coverage",
123
- "test:visual": "playwright test -c playwright.visual.config.ts",
124
- "test:visual:update": "playwright test -c playwright.visual.config.ts --update-snapshots",
125
- "lint": "yarn lint:format && yarn lint:oxlint && yarn lint:design",
126
- "lint:fix": "oxlint --fix . && oxfmt",
127
- "knip:check": "yarn --cwd ../.. exec knip --workspace packages/design",
128
- "knip:fix": "yarn --cwd ../.. exec knip --workspace packages/design --fix-type types,exports,files",
129
- "lint:format": "oxfmt --check",
130
- "lint:oxlint": "oxlint . --quiet",
131
- "lint:design": "designmd lint DESIGN.md",
132
- "ci-checks": "yarn check:api",
133
- "generate:api": "tsx scripts/generate-component-api.ts",
134
- "check:api": "tsx scripts/generate-component-api.ts --check",
135
- "type-check": "tsc"
136
- },
137
124
  "engines": {
138
125
  "node": "24.x"
139
126
  },
140
127
  "devDependencies": {
141
128
  "@arethetypeswrong/cli": "^0.18.2",
142
129
  "@google/design.md": "0.2.0",
143
- "@keboola/oxlint-config": "workspace:^",
144
- "@keboola/postcss-config": "workspace:^",
145
- "@keboola/tsconfig": "workspace:^",
146
130
  "@playwright/test": "1.60.0",
147
131
  "@storybook/addon-a11y": "10.2.19",
148
132
  "@storybook/addon-docs": "^10.2.19",
@@ -161,16 +145,19 @@
161
145
  "oxfmt": "^0.44.0",
162
146
  "oxlint": "^1.56.0",
163
147
  "playwright": "1.60.0",
164
- "react": "^19.2.6",
148
+ "react": "^19.2.7",
165
149
  "react-docgen-typescript": "^2.2.2",
166
- "react-dom": "^19.2.6",
150
+ "react-dom": "^19.2.7",
167
151
  "storybook": "^10.2.19",
168
152
  "tailwindcss": "^3.4.17",
169
153
  "tsup": "^8.5.1",
170
154
  "tsx": "^4.19.4",
171
155
  "typescript": "^6.0.3",
172
156
  "vite": "^8.0.16",
173
- "vitest": "^4.1.8"
157
+ "vitest": "^4.1.8",
158
+ "@keboola/postcss-config": "^0.1.1",
159
+ "@keboola/oxlint-config": "^1.0.0",
160
+ "@keboola/tsconfig": "^0.1.2"
174
161
  },
175
162
  "peerDependencies": {
176
163
  "@testing-library/react": "^16.3.2",
@@ -249,5 +236,30 @@
249
236
  "react-textarea-autosize": "^8.5.9",
250
237
  "sonner": "^2.0.7",
251
238
  "tailwind-merge": "^2.6.0"
239
+ },
240
+ "scripts": {
241
+ "dev": "storybook dev -p 6006",
242
+ "build-storybook": "storybook build",
243
+ "transit": "pnpm build",
244
+ "build": "pnpm build:js && pnpm build:css",
245
+ "build:js": "tsup",
246
+ "build:css": "tailwindcss --postcss -c tailwind.config.js -i src/styles.css -o dist/styles.css --minify",
247
+ "build:check": "attw --pack . --exclude-entrypoints ./styles ./styles/compiled",
248
+ "test": "vitest run --config vite.config.ts --passWithNoTests --reporter=dot",
249
+ "test:stories": "vitest run --config vitest.config.ts",
250
+ "test:stories:coverage": "vitest run --config vitest.config.ts --coverage",
251
+ "test:visual": "playwright test -c playwright.visual.config.ts",
252
+ "test:visual:update": "playwright test -c playwright.visual.config.ts --update-snapshots",
253
+ "lint": "pnpm lint:format && pnpm lint:oxlint && pnpm lint:design",
254
+ "lint:fix": "oxlint --fix . && oxfmt",
255
+ "knip:check": "pnpm --dir ../.. exec knip --workspace packages/design",
256
+ "knip:fix": "pnpm --dir ../.. exec knip --workspace packages/design --fix-type types,exports,files",
257
+ "lint:format": "oxfmt --check",
258
+ "lint:oxlint": "oxlint . --quiet",
259
+ "lint:design": "designmd lint DESIGN.md",
260
+ "ci-checks": "pnpm check:api",
261
+ "generate:api": "tsx scripts/generate-component-api.ts",
262
+ "check:api": "tsx scripts/generate-component-api.ts --check",
263
+ "type-check": "tsc"
252
264
  }
253
- }
265
+ }
package/src/styles.css CHANGED
@@ -97,6 +97,25 @@
97
97
  --color-sidebar-ring: 31 143 255; /* #1f8fff */
98
98
  }
99
99
 
100
+ /* Alert variant tints are categorical light fills (e.g. error-100) that don't
101
+ flip via the semantic tokens above, so they need dark-mode equivalents. Scoped
102
+ to the alert group class — NOT bare [data-variant], which Toast/Badge/Button/
103
+ Select also set. `[data-theme='dark']` never activates for keboola-legacy
104
+ (light-only), so this is inert for kbc-ui. Pairs with AlertRoot's
105
+ `data-[argo=true]:tw-text-foreground` text so both bg and text flip. */
106
+ [data-theme='dark'] [class~='tw-group/alert'][data-variant='error'] {
107
+ background-color: rgb(51 22 25); /* #331619 */
108
+ }
109
+ [data-theme='dark'] [class~='tw-group/alert'][data-variant='warning'] {
110
+ background-color: rgb(51 36 15); /* #33240f */
111
+ }
112
+ [data-theme='dark'] [class~='tw-group/alert'][data-variant='success'] {
113
+ background-color: rgb(20 42 28); /* #142a1c */
114
+ }
115
+ [data-theme='dark'] [class~='tw-group/alert'][data-variant='info'] {
116
+ background-color: rgb(21 37 53); /* #152535 */
117
+ }
118
+
100
119
  @layer base {
101
120
  @font-face {
102
121
  font-family: 'Inter';