Skip to content

Commit 979dfc6

Browse files
authored
Merge pull request #929 from gadget-inc/tailwind4
use tailwind 4 for auto/shadcn
2 parents 1920a1c + 170ad4c commit 979dfc6

File tree

63 files changed

+3317
-2904
lines changed

Some content is hidden

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

63 files changed

+3317
-2904
lines changed

.eslintignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ node_modules
22
.eslintrc.js
33
jest.config.js
44
tmp
5-
packages/*/dist
5+
packages/*/dist
6+
packages/react/auto

packages/react-bigcommerce/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@gadgetinc/react-bigcommerce",
3-
"version": "0.5.3",
3+
"version": "0.6.0",
44
"files": [
55
"README.md",
66
"dist/**/*"
@@ -27,7 +27,7 @@
2727
"prerelease": "gitpkg publish"
2828
},
2929
"dependencies": {
30-
"@gadgetinc/react": "^0.23.4"
30+
"@gadgetinc/react": "^0.24.0"
3131
},
3232
"devDependencies": {
3333
"@gadgetinc/core": "workspace:*",

packages/react-chatgpt-apps/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@gadgetinc/react-chatgpt-apps",
3-
"version": "0.2.3",
3+
"version": "0.3.0",
44
"files": [
55
"README.md",
66
"dist/**/*"
@@ -27,7 +27,7 @@
2727
"prerelease": "gitpkg publish"
2828
},
2929
"dependencies": {
30-
"@gadgetinc/react": "^0.23.4"
30+
"@gadgetinc/react": "^0.24.0"
3131
},
3232
"devDependencies": {
3333
"@gadgetinc/react": "workspace:*",

packages/react-shopify-app-bridge/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@gadgetinc/react-shopify-app-bridge",
3-
"version": "0.20.3",
3+
"version": "0.21.0",
44
"files": [
55
"README.md",
66
"dist/**/*"
@@ -27,7 +27,7 @@
2727
"prerelease": "gitpkg publish"
2828
},
2929
"dependencies": {
30-
"@gadgetinc/react": "^0.23.4",
30+
"@gadgetinc/react": "^0.24.0",
3131
"crypto-js": "^4.2.0",
3232
"tslib": "^2.6.2"
3333
},

packages/react/.storybook/preview.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/** @type { import('@storybook/react').Preview } */
22
import "@shopify/polaris/build/esm/styles.css";
3-
import "../globals.css"; // adjust path to your Tailwind CSS file
3+
import "../spec/shadcn-tailwind.css";
44

55
const preview = {
66
parameters: {

packages/react/cypress/component/auto/form/AutoFormDateTimePicker.cy.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ describeForEachAutoAdapter("AutoFormDateTimePicker", ({ name, adapter: { AutoFor
106106
if (name === SUITE_NAMES.SHADCN) {
107107
cy.get("#test-date").contains("YYYY-MM-DD");
108108
cy.get("#test-date").click();
109-
cy.get("button").contains(`${new Date().getFullYear()}`);
109+
cy.get(".rdp-caption_label").contains(`${new Date().getFullYear()}`);
110110
}
111111
}
112112
);
@@ -367,8 +367,6 @@ describeForEachAutoAdapter("AutoFormDateTimePicker", ({ name, adapter: { AutoFor
367367
cy.get(`[aria-label='Thursday March 4 2021']`).should("have.attr", "aria-pressed", "true");
368368
}
369369

370-
cy.get("#test-date").click();
371-
372370
if (name === SUITE_NAMES.SHADCN) {
373371
cy.get(`[aria-label='Thursday, March 4th, 2021']`).click();
374372
cy.get(`[aria-label='Thursday, March 4th, 2021, selected']`).should("exist");
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
@tailwind base;
2-
@tailwind components;
3-
@tailwind utilities;
1+
@import "tailwindcss";

packages/react/globals.css

Lines changed: 0 additions & 59 deletions
This file was deleted.

packages/react/package.json

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@gadgetinc/react",
3-
"version": "0.23.4",
3+
"version": "0.24.0",
44
"files": [
55
"README.md",
66
"dist/**/*",
@@ -17,6 +17,17 @@
1717
"require": "./dist/cjs/index.js",
1818
"default": "./dist/esm/index.js"
1919
},
20+
"./auto/shadcn.css": {
21+
"import": {
22+
"types": "./dist/esm/auto/shadcn/index.css.d.ts",
23+
"default": "./dist/esm/auto/shadcn/index.css"
24+
},
25+
"require": {
26+
"types": "./dist/cjs/auto/shadcn/index.css.d.cts",
27+
"default": "./dist/cjs/auto/shadcn/index.css.cjs"
28+
},
29+
"default": "./dist/esm/auto/shadcn/index.css"
30+
},
2031
"./auto/polaris": {
2132
"import": "./dist/esm/auto/polaris/index.js",
2233
"require": "./dist/cjs/auto/polaris/index.js",
@@ -25,7 +36,8 @@
2536
"./auto/shadcn": {
2637
"import": "./dist/esm/auto/shadcn/index.js",
2738
"require": "./dist/cjs/auto/shadcn/index.js",
28-
"default": "./dist/esm/auto/shadcn/index.js"
39+
"default": "./dist/esm/auto/shadcn/index.js",
40+
"style": "./dist/esm/auto/shadcn/index.css"
2941
}
3042
},
3143
"source": "src/index.ts",
@@ -38,7 +50,7 @@
3850
"clean": "rimraf dist/ auto/ *.tsbuildinfo **/*.tsbuildinfo cypress/*.tsbuildinfo",
3951
"build": "pnpm clean && pnpm setup-build && tsc -b tsconfig.cjs.json tsconfig.esm.json && pnpm copy",
4052
"setup-build": "mkdir -p dist/cjs dist/esm auto/polaris auto/shadcn && echo '{\"type\": \"commonjs\"}' > dist/cjs/package.json && echo '{\"main\": \"../../dist/cjs/auto/polaris/index.js\"}' > auto/polaris/package.json && echo '{\"main\": \"../../dist/cjs/auto/shadcn/index.js\"}' > auto/shadcn/package.json && echo '{\"type\": \"module\"}' > dist/esm/package.json",
41-
"copy": "copyfiles -u 1 src/**/*.css dist/esm && copyfiles -u 1 src/**/*.css dist/cjs",
53+
"copy": "copyfiles -u 1 src/**/*.css dist/esm && copyfiles -u 1 src/**/*.css dist/cjs && copyfiles -u 1 src/**/*.css.d.ts dist/esm && copyfiles -u 1 src/**/*.css.cjs dist/cjs && copyfiles -u 1 src/**/*.css.d.cts dist/cjs && cp src/auto/shadcn/index.css auto/shadcn.css && cp src/auto/shadcn/index.css.d.ts auto/shadcn.css.d.ts",
4254
"watch": "tsc -b tsconfig.esm.json --watch --preserveWatchOutput",
4355
"gql-gen": "graphql-codegen",
4456
"prepublishOnly": "pnpm build",
@@ -98,6 +110,7 @@
98110
"@storybook/react": "^8.6.14",
99111
"@storybook/react-vite": "^8.6.14",
100112
"@storybook/test": "^8.6.14",
113+
"@tailwindcss/postcss": "^4.1.7",
101114
"@tanstack/react-table": "^8.20.6",
102115
"@testing-library/jest-dom": "^6.8.0",
103116
"@testing-library/react": "^16.3.0",
@@ -110,7 +123,6 @@
110123
"@types/react-dom": "^19.1.1",
111124
"@types/setup-polly-jest": "^0.5.5",
112125
"@types/tmp": "^0.2.6",
113-
"autoprefixer": "^10.4.20",
114126
"class-variance-authority": "^0.7.1",
115127
"clsx": "^2.1.1",
116128
"cmdk": "^1.0.4",
@@ -133,9 +145,9 @@
133145
"setup-polly-jest": "^0.11.0",
134146
"sonner": "^2.0.1",
135147
"storybook": "^8.6.14",
136-
"tailwind-merge": "^2.6.0",
137-
"tailwindcss": "^3.4.17",
138-
"tailwindcss-animate": "^1.0.7",
148+
"tailwind-merge": "^3.4.0",
149+
"tailwindcss": "^4.1.7",
150+
"tw-animate-css": "^1.4.0",
139151
"tmp": "^0.2.3",
140152
"wonka": "^6.3.2"
141153
},

packages/react/postcss.config.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
export default {
22
plugins: {
3-
tailwindcss: {},
4-
autoprefixer: {},
3+
"@tailwindcss/postcss": {},
54
},
65
};

0 commit comments

Comments
 (0)