tailwindcss-custom-colors 1.0.1 → 1.0.2
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/LICENSE +21 -0
- package/README.md +6 -8
- package/package.json +34 -30
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Quentin Juarez
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
## Installation
|
|
2
2
|
|
|
3
3
|
```bash
|
|
4
|
-
#
|
|
4
|
+
# With npm
|
|
5
5
|
npm i tailwindcss-custom-colors@latest
|
|
6
6
|
|
|
7
|
-
#
|
|
7
|
+
# With yarn
|
|
8
8
|
yarn add tailwindcss-custom-colors@latest
|
|
9
9
|
```
|
|
10
10
|
|
|
@@ -38,7 +38,7 @@ const extendedColors = generateConfig(colorNames, options);
|
|
|
38
38
|
#### The generateConfig function takes the following parameters:
|
|
39
39
|
|
|
40
40
|
- `colorNames`: An array of color names or a single color name.
|
|
41
|
-
- `options` (optional): An object of options that allows you to customize the generated colors. The available
|
|
41
|
+
- `options` (optional): An object of options that allows you to customize the generated colors. The available options are `suffixMultiplier` (default: `100`), which determines the suffix used to generate variables names (e.g `[1, 10, 100]`) and `variablePrefix` (default: `undefined`), which determines the prefix for the css variable name, none by default.
|
|
42
42
|
|
|
43
43
|
The function returns a config object for Tailwind CSS with the specified color names and their respective tints.
|
|
44
44
|
|
|
@@ -58,6 +58,8 @@ const variables = generateStyleVariables(colorParams, options);
|
|
|
58
58
|
|
|
59
59
|
Extend your tailwind config
|
|
60
60
|
|
|
61
|
+
_tailwind.config.js_
|
|
62
|
+
|
|
61
63
|
```js
|
|
62
64
|
/** @type {import('tailwindcss').Config} */
|
|
63
65
|
import { generateConfig } from "tailwindcss-custom-colors";
|
|
@@ -65,11 +67,7 @@ import { generateConfig } from "tailwindcss-custom-colors";
|
|
|
65
67
|
const extendedColors = generateConfig(["primary", "secondary"]);
|
|
66
68
|
|
|
67
69
|
module.exports = {
|
|
68
|
-
content: [
|
|
69
|
-
"./app/**/*.{js,ts,jsx,tsx}",
|
|
70
|
-
"./pages/**/*.{js,ts,jsx,tsx}",
|
|
71
|
-
"./components/**/*.{js,ts,jsx,tsx}",
|
|
72
|
-
],
|
|
70
|
+
content: ["./src/**/*.{index,vue,js,ts,jsx,tsx}"],
|
|
73
71
|
theme: {
|
|
74
72
|
extend: {
|
|
75
73
|
colors: extendedColors,
|
package/package.json
CHANGED
|
@@ -1,30 +1,34 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "tailwindcss-custom-colors",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Reactive color shades generator for TailwindCSS",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "tailwindcss-custom-colors",
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "Reactive color shades generator for TailwindCSS",
|
|
5
|
+
"author": "quentinjuarez",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/quentinjuarez/tailwindcss-custom-colors"
|
|
9
|
+
},
|
|
10
|
+
"main": "dist/index.js",
|
|
11
|
+
"files": [
|
|
12
|
+
"dist/**/*"
|
|
13
|
+
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"test": "jest",
|
|
16
|
+
"build": "tsc"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [
|
|
19
|
+
"tailwind",
|
|
20
|
+
"tailwindcss",
|
|
21
|
+
"colors",
|
|
22
|
+
"palette",
|
|
23
|
+
"shades",
|
|
24
|
+
"tints"
|
|
25
|
+
],
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@types/jest": "^29.5.3",
|
|
28
|
+
"@types/node": "^20.4.4",
|
|
29
|
+
"jest": "^29.6.1",
|
|
30
|
+
"ts-jest": "^29.1.1",
|
|
31
|
+
"typescript": "^5.1.6"
|
|
32
|
+
},
|
|
33
|
+
"license": "MIT"
|
|
34
|
+
}
|