@szum-tech/design-system 1.1.5 → 1.1.6

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/README.md CHANGED
@@ -52,7 +52,7 @@ module.exports = {
52
52
  extend: {}
53
53
  },
54
54
  plugins: [],
55
- presets: [require("@szum-tech/design-system/tailwind-preset")]
55
+ presets: [require("@szum-tech/design-system/tailwindcss/main-preset")]
56
56
  };
57
57
  ```
58
58
 
@@ -61,7 +61,7 @@ module.exports = {
61
61
  > Import CSS file from `@szum-tech/design-system/theme` with colors palette for dark and light theme and default styles (see file with [theme styles](https://github.com/JanSzewczyk/design-system/blob/main/src/theme/global.css))
62
62
 
63
63
  ```css
64
- @import "@szum-tech/design-system/theme/global.css";
64
+ @import "@szum-tech/design-system/tailwindcss/global.css";
65
65
 
66
66
  @tailwind base;
67
67
  @tailwind components;
package/dist/index.js CHANGED
@@ -12,7 +12,7 @@ var React2__default = /*#__PURE__*/_interopDefaultLegacy(React2);
12
12
  // src/components/index.tsx
13
13
  function Button() {
14
14
  return /* @__PURE__ */ jsxRuntime.jsx("button", {
15
- className: "rounded-lg border border-red-800 bg-red-300 p-4",
15
+ className: "scroll rounded-lg border border-red-800 bg-red-300 p-4",
16
16
  children: "button"
17
17
  });
18
18
  }
package/dist/index.mjs CHANGED
@@ -4,7 +4,7 @@ import React2 from 'react';
4
4
  // src/components/index.tsx
5
5
  function Button() {
6
6
  return /* @__PURE__ */ jsx("button", {
7
- className: "rounded-lg border border-red-800 bg-red-300 p-4",
7
+ className: "scroll rounded-lg border border-red-800 bg-red-300 p-4",
8
8
  children: "button"
9
9
  });
10
10
  }
package/package.json CHANGED
@@ -50,8 +50,7 @@
50
50
  },
51
51
  "files": [
52
52
  "dist/**",
53
- "tailwind-preset.js",
54
- "theme/**"
53
+ "tailwindcss/**"
55
54
  ],
56
55
  "homepage": "https://github.com/JanSzewczyk/design-system#readme",
57
56
  "keywords": [
@@ -83,17 +82,16 @@
83
82
  "clean": "rm -rf node_modules && rm -rf dist",
84
83
  "dev": "concurrently \"npm run dev:css\" \"npm run dev:build\"",
85
84
  "dev:build": "tsup src/index.tsx --format esm,cjs --watch --dts --external react",
86
- "dev:css": "tailwindcss -w -i ./src/theme/global.css -o ./src/styles/default.css",
87
- "postbuild": "cpy './theme' '../' --cwd='src'",
85
+ "dev:css": "tailwindcss -w -i tailwindcss/global.css -o src/styles/default.css",
88
86
  "storybook": "start-storybook -p 6006",
89
87
  "semantic-release": "semantic-release",
90
88
  "build:storybook": "build-storybook",
91
89
  "build:storybook:docs": "build-storybook --docs",
92
- "prebuild:storybook": "tailwindcss -i ./src/theme/global.css -o ./src/styles/default.css"
90
+ "prebuild:storybook": "tailwindcss -i tailwindcss/global.css -o src/styles/default.css"
93
91
  },
94
92
  "sideEffects": false,
95
93
  "types": "./dist/index.d.ts",
96
- "version": "1.1.5",
94
+ "version": "1.1.6",
97
95
  "peerDependencies": {
98
96
  "react": "^18.2.0",
99
97
  "tailwind-scrollbar": "^2.0.1",
@@ -121,12 +121,6 @@
121
121
  }
122
122
 
123
123
  body {
124
- @apply app-scroll bg-gray-900 font-sans text-typography-primary antialiased;
125
- }
126
- }
127
-
128
- @layer components {
129
- .app-scroll {
130
- @apply scrollbar scrollbar-thin scrollbar-thumb-gray-600/100 hover:scrollbar-thumb-gray-600/80;
124
+ @apply scroll bg-gray-900 font-sans text-typography-primary antialiased;
131
125
  }
132
126
  }
@@ -87,5 +87,5 @@ module.exports = {
87
87
  }
88
88
  }
89
89
  },
90
- plugins: [require("tailwind-scrollbar")]
90
+ plugins: [require("tailwind-scrollbar"), require("./plugins/components")]
91
91
  };
@@ -0,0 +1,10 @@
1
+ const plugin = require("tailwindcss/plugin");
2
+
3
+ module.exports = plugin(function ({ addComponents }) {
4
+ addComponents({
5
+ ".scroll": {
6
+ "@apply scrollbar scrollbar-thin scrollbar-thumb-gray-600/100 hover:scrollbar-thumb-gray-600/80":
7
+ {}
8
+ }
9
+ });
10
+ });