Skip to content

Commit 34870ba

Browse files
committed
Reapply TailwindCSS v4 migration (revert of f76013a)
Reverts the temporary revert commit f76013a, restoring the TailwindCSS v4 (CSS-first) migration originally merged via PR #470. The revert was a release-window hold so EditorInput 1.8.1 could ship on Tailwind v3; that release is out, so the v4 migration (v2.0.0) is back on staging. Conflict resolutions: version bumped to 2.0.0 in package.json, package-lock.json, version.json, and README install refs; changelog keeps the 1.8.1 entry with the 2.0.0 entry restored on top.
1 parent 787c892 commit 34870ba

63 files changed

Lines changed: 1159 additions & 814 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 337 additions & 248 deletions
Large diffs are not rendered by default.

changelog.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
Version 2.0.0 - 11th August, 2026
2+
- New: Migrated to TailwindCSS v4 (CSS-first) — the theme now ships as `@bsf/force-ui/theme.css` and the `withTW()` helper is deprecated; see the README migration guide for consumer upgrade steps (breaking).
3+
14
Version 1.8.1 - 11th August, 2026
25
- Improvement: Organism - Editor Input: Added optional `triggerRegex` prop that overrides the built-in mention-suggestion matcher, so consumers can allow the trigger without a leading blank space (e.g. directly after a double quote inside JSON string values). The custom regex must expose the same capture groups as the built-in matcher: 1 = leading boundary, 2 = replaceable string (trigger + query), 3 = query string used to filter options. When omitted, the existing trigger-based matcher is used unchanged.
36
- Fix: Atom - Select: In `multiple` mode the dropdown now stays open while selecting or deselecting options, closing only on Escape or outside click.

package-lock.json

Lines changed: 356 additions & 384 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@bsf/force-ui",
3-
"version": "1.8.1",
3+
"version": "2.0.0",
44
"description": "Library of components for the BSF project",
55
"main": "./dist/force-ui.cjs.js",
66
"module": "./dist/force-ui.es.js",
@@ -28,6 +28,7 @@
2828
"import": "./dist/withTW.es.js",
2929
"require": "./dist/withTW.cjs.js"
3030
},
31+
"./theme.css": "./dist/theme.css",
3132
"./dist/*": "./dist/*"
3233
},
3334
"scripts": {
@@ -86,8 +87,7 @@
8687
"react-day-picker": "^9.1.3",
8788
"recharts": "^2.13.0",
8889
"styled-components": "^6.1.12",
89-
"tailwind-merge": "^2.4.0",
90-
"tailwindcss-scoped-preflight": "^3.4.3"
90+
"tailwind-merge": "^3.5.0"
9191
},
9292
"devDependencies": {
9393
"@chromatic-com/storybook": "^5.0.2",
@@ -103,7 +103,7 @@
103103
"@storybook/react": "^10.3.3",
104104
"@storybook/react-vite": "^10.3.3",
105105
"@storybook/test-runner": "^0.24.3",
106-
"@tailwindcss/container-queries": "^0.1.1",
106+
"@tailwindcss/postcss": "^4.3.2",
107107
"@types/lodash": "^4.17.13",
108108
"@types/node": "^22.7.6",
109109
"@types/react": "^18.3.10",
@@ -115,7 +115,6 @@
115115
"@wordpress/eslint-plugin": "^20.3.0",
116116
"@wordpress/prettier-config": "^4.4.0",
117117
"@wordpress/stylelint-config": "^23.2.0",
118-
"autoprefixer": "^10.4.19",
119118
"axe-playwright": "^2.0.3",
120119
"chromatic": "^11.7.1",
121120
"cross-env": "^7.0.3",
@@ -137,7 +136,7 @@
137136
"storybook": "^10.3.3",
138137
"storybook-addon-paddings": "^6.0.2",
139138
"stylelint": "^16.8.2",
140-
"tailwindcss": "^3.4.10",
139+
"tailwindcss": "^4.3.2",
141140
"typescript": "5.4.2",
142141
"typescript-eslint": "^8.7.0",
143142
"vite": "^5.4.21",

postcss.config.cjs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
module.exports = {
22
plugins: {
3-
tailwindcss: {},
4-
autoprefixer: {},
3+
'@tailwindcss/postcss': {},
54
},
65
}

src/components/alert/alert.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ const Alert = ( {
107107
<div className="absolute right-4 top-4 [&_svg]:size-5">
108108
<button
109109
className={ cn(
110-
'bg-transparent m-0 p-0 border-none focus:outline-none focus-visible:ring-2 focus-visible:ring-toggle-on focus-visible:ring-offset-2 active:outline-none cursor-pointer rounded',
110+
'bg-transparent m-0 p-0 border-none focus:outline-hidden focus-visible:ring-2 focus-visible:ring-toggle-on focus-visible:ring-offset-2 active:outline-hidden cursor-pointer rounded-sm',
111111
closeIconClassNames[ theme ] ??
112112
closeIconClassNames.light
113113
) }
@@ -156,7 +156,7 @@ const Alert = ( {
156156
{ typeof onClose === 'function' && (
157157
<button
158158
className={ cn(
159-
'self-start bg-transparent m-0 border-none p-0.5 focus:outline-none focus-visible:ring-2 focus-visible:ring-toggle-on focus-visible:ring-offset-2 active:outline-none cursor-pointer size-5 rounded',
159+
'self-start bg-transparent m-0 border-none p-0.5 focus:outline-hidden focus-visible:ring-2 focus-visible:ring-toggle-on focus-visible:ring-offset-2 active:outline-hidden cursor-pointer size-5 rounded-sm',
160160
closeIconClassNames[ theme ] ??
161161
closeIconClassNames.light
162162
) }

src/components/area-chart/area-chart.stories.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ export const AreaChartCard1: Story1 = ( args ) => (
308308
<Container
309309
containerType="grid"
310310
gap="xs"
311-
className="p-4 bg-background-primary rounded-lg shadow-sm"
311+
className="p-4 bg-background-primary rounded-lg shadow-xs"
312312
{ ...args }
313313
>
314314
<Container.Item className="p-1 space-y-2">
@@ -371,7 +371,7 @@ export const AreaChartCard2: Story1 = ( args ) => (
371371
<Container
372372
containerType="grid"
373373
gap="xs"
374-
className="p-4 bg-background-primary rounded-lg shadow-sm"
374+
className="p-4 bg-background-primary rounded-lg shadow-xs"
375375
{ ...args }
376376
>
377377
<Container.Item className="p-1 space-y-2">

src/components/area-chart/chart-legend-content.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const ChartLegendContent = React.forwardRef<
4646
<div key={ item.value } className="flex items-center gap-1.5">
4747
{ ! hideIcon && (
4848
<div
49-
className="size-2 shrink-0 rounded-sm"
49+
className="size-2 shrink-0 rounded-xs"
5050
style={ {
5151
backgroundColor: item.color,
5252
} }

src/components/bar-chart/bar-chart.stories.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ export const BarChartCard1: Story1 = ( args ) => (
250250
<Container
251251
containerType="grid"
252252
gap="xs"
253-
className="p-4 bg-background-primary rounded-lg shadow-sm"
253+
className="p-4 bg-background-primary rounded-lg shadow-xs"
254254
{ ...args }
255255
>
256256
<Container.Item className="p-1 space-y-2">
@@ -312,7 +312,7 @@ export const BarChartCard2: Story1 = ( args ) => (
312312
<Container
313313
containerType="grid"
314314
gap="xs"
315-
className="p-4 bg-background-primary rounded-lg shadow-sm"
315+
className="p-4 bg-background-primary rounded-lg shadow-xs"
316316
{ ...args }
317317
>
318318
<Container.Item className="p-1 space-y-2">
@@ -377,7 +377,7 @@ export const BarChartCard3: Story1 = ( args ) => (
377377
<Container
378378
containerType="grid"
379379
gap="xs"
380-
className="p-4 bg-background-primary rounded-lg shadow-sm"
380+
className="p-4 bg-background-primary rounded-lg shadow-xs"
381381
{ ...args }
382382
>
383383
<Container.Item className="p-1 space-y-2">
@@ -443,7 +443,7 @@ export const BarChartCard4: Story1 = ( args ) => (
443443
<Container
444444
containerType="grid"
445445
gap="xs"
446-
className="p-4 bg-background-primary rounded-lg shadow-sm"
446+
className="p-4 bg-background-primary rounded-lg shadow-xs"
447447
{ ...args }
448448
>
449449
<Container.Item className="p-1 space-y-2">
@@ -508,7 +508,7 @@ export const AreaChartCard5: Story1 = ( args ) => (
508508
<Container
509509
containerType="grid"
510510
gap="xs"
511-
className="p-4 bg-background-primary rounded-lg shadow-sm"
511+
className="p-4 bg-background-primary rounded-lg shadow-xs"
512512
{ ...args }
513513
>
514514
<Container.Item className="p-1 space-y-2">

src/components/bar-chart/chart-legend-content.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const ChartLegendContent = React.forwardRef<
4646
<div key={ item.value } className="flex items-center gap-1.5">
4747
{ ! hideIcon && (
4848
<div
49-
className="size-2 shrink-0 rounded-sm"
49+
className="size-2 shrink-0 rounded-xs"
5050
style={ {
5151
backgroundColor: item.color,
5252
} }

0 commit comments

Comments
 (0)