chaiwind 1.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/README.md +46 -0
- package/chaiwind.js +133 -0
- package/package.json +13 -0
package/README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Chaiwind
|
|
2
|
+
|
|
3
|
+
A modern web project combining chai testing and Tailwind CSS.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- Fast development setup
|
|
8
|
+
- Tailwind CSS styling
|
|
9
|
+
- Chai testing framework
|
|
10
|
+
- Clean project structure
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm start
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Testing
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npm test
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Technologies
|
|
31
|
+
|
|
32
|
+
- **Tailwind CSS** - Utility-first CSS framework
|
|
33
|
+
- **Chai** - BDD assertion library
|
|
34
|
+
- **Node.js** - JavaScript runtime
|
|
35
|
+
|
|
36
|
+
## License
|
|
37
|
+
|
|
38
|
+
MIT
|
|
39
|
+
|
|
40
|
+
## Contributing
|
|
41
|
+
|
|
42
|
+
Pull requests welcome. For major changes, open an issue first.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
Feel free to customize this template with your project-specific details, commands, and additional sections as needed.
|
package/chaiwind.js
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
(function () {
|
|
2
|
+
const colors = {
|
|
3
|
+
// chaicode brand
|
|
4
|
+
chaicode: "#f97316",
|
|
5
|
+
"chaicode-dark": "#1a1a2e",
|
|
6
|
+
|
|
7
|
+
// hitesh sir
|
|
8
|
+
chai: "#c8843a",
|
|
9
|
+
adrak: "#d4a056",
|
|
10
|
+
masala: "#8b4513",
|
|
11
|
+
kulhad: "#b5651d",
|
|
12
|
+
|
|
13
|
+
// piyush sir
|
|
14
|
+
piyush: "#ec4899",
|
|
15
|
+
"piyush-light": "#f9a8d4",
|
|
16
|
+
"piyush-dark": "#be185d",
|
|
17
|
+
|
|
18
|
+
// akash sir - mac colors
|
|
19
|
+
"akash-mac-midnight": "#1d1d1f",
|
|
20
|
+
"akash-mac-spacegray": "#86868b",
|
|
21
|
+
"akash-mac-silver": "#e8e8ed",
|
|
22
|
+
"akash-mac-blue": "#0071e3",
|
|
23
|
+
"akash-mac-graphite": "#a1a1a6",
|
|
24
|
+
"akash-mac-gold": "#f5a623",
|
|
25
|
+
"akash-mac-purple": "#a855f7",
|
|
26
|
+
"akash-mac-green": "#34c759",
|
|
27
|
+
|
|
28
|
+
// basics
|
|
29
|
+
white: "#ffffff",
|
|
30
|
+
black: "#000000",
|
|
31
|
+
gray: "#6b7280",
|
|
32
|
+
red: "#ef4444",
|
|
33
|
+
green: "#22c55e",
|
|
34
|
+
blue: "#3b82f6",
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const spacing = {
|
|
38
|
+
0: "0px",
|
|
39
|
+
1: "4px",
|
|
40
|
+
2: "8px",
|
|
41
|
+
3: "12px",
|
|
42
|
+
4: "16px",
|
|
43
|
+
6: "24px",
|
|
44
|
+
8: "32px",
|
|
45
|
+
10: "40px",
|
|
46
|
+
12: "48px",
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const fontSizes = {
|
|
50
|
+
sm: "14px",
|
|
51
|
+
base: "16px",
|
|
52
|
+
lg: "20px",
|
|
53
|
+
xl: "24px",
|
|
54
|
+
"2xl": "32px",
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
const radii = {
|
|
58
|
+
sm: "4px",
|
|
59
|
+
md: "8px",
|
|
60
|
+
lg: "12px",
|
|
61
|
+
full: "9999px",
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
// ─── build ----------
|
|
65
|
+
|
|
66
|
+
const rules = [];
|
|
67
|
+
|
|
68
|
+
function add(selector, declarations) {
|
|
69
|
+
rules.push(`${selector} { ${declarations} }`);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// colors
|
|
73
|
+
for (const [name, value] of Object.entries(colors)) {
|
|
74
|
+
add(`.text-${name}`, `color: ${value};`);
|
|
75
|
+
add(`.bg-${name}`, `background-color: ${value};`);
|
|
76
|
+
add(`.border-${name}`, `border-color: ${value};`);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// spacing
|
|
80
|
+
for (const [key, value] of Object.entries(spacing)) {
|
|
81
|
+
add(`.p-${key}`, `padding: ${value};`);
|
|
82
|
+
add(`.px-${key}`, `padding-left: ${value}; padding-right: ${value};`);
|
|
83
|
+
add(`.py-${key}`, `padding-top: ${value}; padding-bottom: ${value};`);
|
|
84
|
+
add(`.m-${key}`, `margin: ${value};`);
|
|
85
|
+
add(`.mx-${key}`, `margin-left: ${value}; margin-right: ${value};`);
|
|
86
|
+
add(`.my-${key}`, `margin-top: ${value}; margin-bottom: ${value};`);
|
|
87
|
+
add(`.gap-${key}`, `gap: ${value};`);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// font sizes
|
|
91
|
+
for (const [key, value] of Object.entries(fontSizes)) {
|
|
92
|
+
add(`.text-${key}`, `font-size: ${value};`);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// border radius
|
|
96
|
+
for (const [key, value] of Object.entries(radii)) {
|
|
97
|
+
add(`.rounded-${key}`, `border-radius: ${value};`);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// static utilities
|
|
101
|
+
add(".flex", "display: flex;");
|
|
102
|
+
add(".flex-col", "flex-direction: column;");
|
|
103
|
+
add(".flex-row", "flex-direction: row;");
|
|
104
|
+
add(".items-center", "align-items: center;");
|
|
105
|
+
add(".justify-center", "justify-content: center;");
|
|
106
|
+
add(".justify-between", "justify-content: space-between;");
|
|
107
|
+
add(".w-full", "width: 100%;");
|
|
108
|
+
add(".h-full", "height: 100%;");
|
|
109
|
+
add(".hidden", "display: none;");
|
|
110
|
+
add(".block", "display: block;");
|
|
111
|
+
add(".inline-block", "display: inline-block;");
|
|
112
|
+
add(".text-center", "text-align: center;");
|
|
113
|
+
add(".font-bold", "font-weight: 700;");
|
|
114
|
+
add(".font-normal", "font-weight: 400;");
|
|
115
|
+
add(".border", "border-width: 1px; border-style: solid;");
|
|
116
|
+
add(".cursor-pointer", "cursor: pointer;");
|
|
117
|
+
add(".transition", "transition: all 150ms ease;");
|
|
118
|
+
add(".overflow-hidden", "overflow: hidden;");
|
|
119
|
+
add(".relative", "position: relative;");
|
|
120
|
+
add(".absolute", "position: absolute;");
|
|
121
|
+
|
|
122
|
+
// ─── inject -----
|
|
123
|
+
|
|
124
|
+
const style = document.createElement("style");
|
|
125
|
+
style.setAttribute("id", "chaiwind");
|
|
126
|
+
style.textContent = rules.join("\n");
|
|
127
|
+
document.head.appendChild(style);
|
|
128
|
+
|
|
129
|
+
console.log(
|
|
130
|
+
`%c☕ chaiwind ready — ${rules.length} classes`,
|
|
131
|
+
"color: #c8843a; font-weight: bold;",
|
|
132
|
+
);
|
|
133
|
+
})();
|
package/package.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "chaiwind",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Bounty Jitenge hum Hehe",
|
|
5
|
+
"main": "chaiwind.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
+
},
|
|
9
|
+
"keywords": ["css", "utility", "framework", "chaicode"],
|
|
10
|
+
"author": "anand",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"type": "commonjs"
|
|
13
|
+
}
|