beathers 5.1.0 → 5.1.1
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/dist/css/beathers.min.css +1 -1
- package/dist/css/beathers.min.css.map +1 -1
- package/dist/scripts/cli.js +4 -1
- package/package.json +13 -13
- package/readme.md +217 -217
- package/src/scss/_variables.scss +305 -305
- package/src/scss/beathers.min.scss +1 -1
- package/src/scss/functions/_colors.scss +232 -232
- package/src/scss/functions/_mediaQueries.scss +128 -128
- package/src/scss/functions/_others.scss +83 -83
- package/src/scss/functions/_typographic.scss +125 -125
- package/src/scss/functions/_validations.scss +256 -256
- package/src/scss/settings/_defaults.scss +251 -251
- package/src/scss/settings/_index.scss +68 -68
- package/src/scss/settings/_resets.scss +103 -103
- package/src/scss/style/_colors.scss +139 -139
- package/src/scss/style/_grid.scss +92 -92
- package/src/scss/style/_shaping.scss +372 -372
- package/src/scss/style/_typographic.scss +304 -304
package/dist/scripts/cli.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
/* eslint-disable no-console */
|
|
3
3
|
import fs from 'fs-extra';
|
|
4
4
|
import path from 'path';
|
|
5
|
+
import { fileURLToPath } from 'node:url';
|
|
5
6
|
import { BuildTheme } from './BuildTheme.js';
|
|
6
7
|
import { ReadDefaultValues } from './ReadDefaultValues.js';
|
|
7
8
|
const commands = {
|
|
@@ -45,7 +46,9 @@ function showVersion() {
|
|
|
45
46
|
}
|
|
46
47
|
}
|
|
47
48
|
async function getDefaultValues() {
|
|
48
|
-
const
|
|
49
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
50
|
+
const __dirname = path.dirname(__filename);
|
|
51
|
+
const projectRoot = path.resolve(__dirname, '..', '..');
|
|
49
52
|
return (await ReadDefaultValues([
|
|
50
53
|
path.join(projectRoot, 'src', 'scss', 'settings', '_defaults.scss'),
|
|
51
54
|
path.join(projectRoot, 'src', 'scss', 'settings', '_configs.scss'),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "beathers",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Beather is a lightweight SCSS library that serves as a comprehensive design system for your projects. It offers a structured and consistent approach to manage colors, fonts, and other design related variables, making it easier to maintain a cohesive visual identity across your application.",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -8,16 +8,6 @@
|
|
|
8
8
|
"bin": {
|
|
9
9
|
"beathers": "dist/scripts/cli.js"
|
|
10
10
|
},
|
|
11
|
-
"scripts": {
|
|
12
|
-
"watch": "nodemon --watch src/scss/ --ext scss --exec \"npm-run-all build:expanded\"",
|
|
13
|
-
"build:compressed": "sass --style compressed --source-map --embed-sources --no-error-css src/scss/:dist/css/",
|
|
14
|
-
"build:expanded": "sass --style expanded --source-map --embed-sources --no-error-css src/scss/:dist/css/",
|
|
15
|
-
"build:user-configs": "tsx src/scripts/BuildTheme.ts",
|
|
16
|
-
"prepublish": "rimraf dist && tsc && pnpm build:compressed",
|
|
17
|
-
"lint": "eslint . && stylelint \"**/*.scss\"",
|
|
18
|
-
"format:check": "prettier --check --ignore-path .gitignore .",
|
|
19
|
-
"format:fix": "prettier --write --ignore-path .gitignore . && pnpm lint"
|
|
20
|
-
},
|
|
21
11
|
"keywords": [
|
|
22
12
|
"design-system",
|
|
23
13
|
"scss-library",
|
|
@@ -76,5 +66,15 @@
|
|
|
76
66
|
"src/scss/**/*.scss",
|
|
77
67
|
"public/images/logo.png",
|
|
78
68
|
"readme.md"
|
|
79
|
-
]
|
|
80
|
-
|
|
69
|
+
],
|
|
70
|
+
"scripts": {
|
|
71
|
+
"watch": "nodemon --watch src/scss/ --ext scss --exec \"npm-run-all build:expanded\"",
|
|
72
|
+
"build:compressed": "sass --style compressed --source-map --embed-sources --no-error-css src/scss/:dist/css/",
|
|
73
|
+
"build:expanded": "sass --style expanded --source-map --embed-sources --no-error-css src/scss/:dist/css/",
|
|
74
|
+
"build:user-configs": "tsx src/scripts/BuildTheme.ts",
|
|
75
|
+
"prepublish": "rimraf dist && tsc && pnpm build:compressed",
|
|
76
|
+
"lint": "eslint . && stylelint \"**/*.scss\"",
|
|
77
|
+
"format:check": "prettier --check --ignore-path .gitignore .",
|
|
78
|
+
"format:fix": "prettier --write --ignore-path .gitignore . && pnpm lint"
|
|
79
|
+
}
|
|
80
|
+
}
|
package/readme.md
CHANGED
|
@@ -1,217 +1,217 @@
|
|
|
1
|
-
<div align="center">
|
|
2
|
-
<img src="https://raw.githubusercontent.com/BhoenixStudio/Beathers/main/public/images/logo.png" alt="Beathers logo" width="700" height="312">
|
|
3
|
-
<p align="center">The Perfect Fusion of Strength and Featherlight Agility</p>
|
|
4
|
-
</div>
|
|
5
|
-
|
|
6
|
-
[](https://www.npmjs.com/package/beathers)
|
|
7
|
-
[](https://opensource.org/licenses/MIT)
|
|
8
|
-
|
|
9
|
-
Beathers is a lightweight, powerful SCSS library designed to accelerate your web development workflow. **Everything is fully customizable** through a simple configuration file, allowing you to tailor every aspect to match your brand and requirements. It offers a comprehensive suite of SCSS mixins, variables, and utility classes, enabling you to build responsive, visually appealing web applications with complete design control.
|
|
10
|
-
|
|
11
|
-
## Get Started
|
|
12
|
-
|
|
13
|
-
### Installation
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
npm install beathers
|
|
17
|
-
# or
|
|
18
|
-
yarn add beathers
|
|
19
|
-
# or
|
|
20
|
-
pnpm add beathers
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
### Create Configuration File
|
|
24
|
-
|
|
25
|
-
Use the interactive CLI to create your theme configuration:
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
beathers init
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
This will prompt you to:
|
|
32
|
-
|
|
33
|
-
- Choose your configuration file format (JSON, JS, or TypeScript)
|
|
34
|
-
- Set up initial theme values like colors and typography
|
|
35
|
-
- Configure which features to enable/disable
|
|
36
|
-
|
|
37
|
-
### Build Your Theme
|
|
38
|
-
|
|
39
|
-
Generate your custom CSS from the configuration:
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
beathers build
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
### Import in Your Project
|
|
46
|
-
|
|
47
|
-
**CSS Import (Recommended):**
|
|
48
|
-
|
|
49
|
-
```css
|
|
50
|
-
/* Import the compiled CSS */
|
|
51
|
-
@import 'node_modules/beathers/dist/css/beathers.min.css';
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
**SCSS Import:**
|
|
55
|
-
|
|
56
|
-
```scss
|
|
57
|
-
// Import the entire library
|
|
58
|
-
@import 'node_modules/beathers/src/scss/beathers.min.scss';
|
|
59
|
-
|
|
60
|
-
// Or import specific modules
|
|
61
|
-
@import 'node_modules/beathers/src/scss/functions/colors';
|
|
62
|
-
@import 'node_modules/beathers/src/scss/style/grid';
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
**JavaScript/Framework Import:**
|
|
66
|
-
|
|
67
|
-
```javascript
|
|
68
|
-
// Next.js, React, Vue, Angular
|
|
69
|
-
import 'beathers/dist/css/beathers.min.css'
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
### Example Configuration
|
|
73
|
-
|
|
74
|
-
```json
|
|
75
|
-
{
|
|
76
|
-
"colors": {
|
|
77
|
-
"primary": { "light": "#007bff", "dark": "#0056b3" },
|
|
78
|
-
"success": { "light": "#28a745", "dark": "#20c997" }
|
|
79
|
-
},
|
|
80
|
-
"typography": {
|
|
81
|
-
"defaultFontFamilies": ["Inter", "system-ui", "sans-serif"]
|
|
82
|
-
},
|
|
83
|
-
"settings": {
|
|
84
|
-
"axisDivisions": 12,
|
|
85
|
-
"breakpoints": {
|
|
86
|
-
"sm": "640px",
|
|
87
|
-
"md": "768px",
|
|
88
|
-
"lg": "1024px"
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
## Configuration
|
|
95
|
-
|
|
96
|
-
Beathers uses a configuration file to customize your theme. All options are optional and have sensible defaults.
|
|
97
|
-
|
|
98
|
-
### Configuration File Options
|
|
99
|
-
|
|
100
|
-
You can create one of these files in your project root:
|
|
101
|
-
|
|
102
|
-
- `beathers.configs.json` - JSON format
|
|
103
|
-
- `beathers.configs.js` - JavaScript format
|
|
104
|
-
- `beathers.configs.ts` - TypeScript format (with type safety)
|
|
105
|
-
|
|
106
|
-
### Key Configuration Sections
|
|
107
|
-
|
|
108
|
-
| Section | Description | Purpose |
|
|
109
|
-
| -------------- | -------------------------------------------------- | --------------------------------------------------- |
|
|
110
|
-
| **colors** | Define your color palette with light/dark variants | Brand colors, state colors (success, warning, etc.) |
|
|
111
|
-
| **typography** | Configure fonts, sizes, and text settings | Font families, weights, sizes, and formatting |
|
|
112
|
-
| **settings** | Layout and spacing configuration | Grid system, breakpoints, spacing values |
|
|
113
|
-
| **roles** | Enable/disable specific features | Control which utilities are generated |
|
|
114
|
-
|
|
115
|
-
### Common Configuration Properties
|
|
116
|
-
|
|
117
|
-
| Property | Type | Example |
|
|
118
|
-
| ------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
119
|
-
| **COLORS** |
|
|
120
|
-
| `color` <br /> Color variants (as json) | "color": { light: `#${string}$`, dark: `#${string}$` } | "primary": {"light": "#007bff", "dark": "#0056b3"} |
|
|
121
|
-
| **TYPOGRAPHY** |
|
|
122
|
-
| `defaultFontFamilies` <br /> Fallback fonts (as array) | `string[]` | ["system-ui", "sans-serif"] |
|
|
123
|
-
| `fontMainPath` <br /> Your fonts path | `string` | "/fonts/" |
|
|
124
|
-
| `fontFormat` <br /> Your fonts format | `string` | "woff2" |
|
|
125
|
-
| `fontWeights` <br /> Your fonts weights (as array) | `thin`,`extra-light`,`light`,`regular`,<br />`medium`,`semibold`,`bold`,`extra-bold`,`black` | ["regular", "medium", "bold"] |
|
|
126
|
-
| `fontStyles` <br /> Your fonts styles (as array) | `normal`,`italic`,`oblique` | ["normal"] |
|
|
127
|
-
| `fontSizes` <br /> Your fonts sizes (as json) | Record<`string`, `${number}px` `${number}rem` `${number}em`> | subtitle1: "16px" <br /> (Azvailable: h1, h2, h3, h4, h5, h6, subtitle1, subtitle2, button, body1, body2, caption, overline) <br /> (Note: You can add/remove) |
|
|
128
|
-
| `textTruncate` <br /> Text truncation | `number` | 3 |
|
|
129
|
-
| `fonts` <br /> Custom font definitions <br /> (Local/External) (as json) | {weights: same as `weights`, styles: same as `styles`, <br /> variants: {"fontName" :{title: `string`, unicode?: `string`, format?: `woff`, isLocal?: `boolean`, url?: `https://${string}`, `http://${string}`}}} | {variants: {"font1" :{title: "roboto"}}} |
|
|
130
|
-
| **SETTINGS** |
|
|
131
|
-
| `axisDivisions` <br /> Grid system divisions | `number` | 12 |
|
|
132
|
-
| `opacities` <br /> Available opacity values <br /> min: 0 - max: 100 (as array) | `number[]` | [10, 20] |
|
|
133
|
-
| `blurValues` <br /> Blur effect values (as array) | `number[]` | [2, 4, 8, 16, 32] |
|
|
134
|
-
| `insetValues` <br /> Inset values (as array) | `number[]` | [0, 5] |
|
|
135
|
-
| `bordersValue` <br /> Default border width (as array) | `number[]` | [1, 2] |
|
|
136
|
-
| `radiuses` <br /> Border radius values (as array) | `number[]` | [5,10,15] |
|
|
137
|
-
| `breakpoints` <br /> Responsive breakpoints (as json) | Record<(`sm` , `md` , `lg` , `xl` , `xxl`), `${number}px` `${number}rem` `${number}em`> | {"sm": "640px", "md": "768px"} |
|
|
138
|
-
| `wrappers` <br /> Container widths (as json) | Record<(`sm` , `md` , `lg` , `xl` , `xxl`), { width: `${number}px` `${number}rem` `${number}em`; padding?: `${number}px` `${number}rem` `${number}em`}> | {"sm": {"width": "540px", "padding":"15px"}} |
|
|
139
|
-
| `guttersValues` <br /> Spacing values (as json) | Record<(`auto`, `number`), `${number}px` `${number}rem` `${number}em`> | {"auto": "1rem", 1: "0.25rem"} |
|
|
140
|
-
| **ROLES** |
|
|
141
|
-
| `useMediaQueries` <br /> Enable responsive utilities | `boolean` | `true` |
|
|
142
|
-
| `useIcons` <br /> Include icon styles | `boolean` | `true` |
|
|
143
|
-
| `useFontFamilies` <br /> Include font family utilities | `boolean` | `true` |
|
|
144
|
-
| `useFontSizes` <br /> Include font size utilities | `boolean` | `true` |
|
|
145
|
-
| `useFontShapes` <br /> Include font style utilities | `boolean` | `true` |
|
|
146
|
-
| `useTextAligns` <br /> Include text alignment utilities | `boolean` | `true` |
|
|
147
|
-
| `useTextTruncate` <br /> Include text truncation utilities | `boolean` | `true` |
|
|
148
|
-
| `useColors` <br /> Include color utilities | `boolean` | `true` |
|
|
149
|
-
| `useColorsOpacities` <br /> Include color opacity utilities | `boolean` | `true` |
|
|
150
|
-
| `useColorsLightMode` <br /> Include light mode colors | `boolean` | `true` |
|
|
151
|
-
| `useColorsDarkMode` <br /> Include dark mode colors | `boolean` | `true` |
|
|
152
|
-
| `useCurrentColors` <br /> Include currentColor utilities | `boolean` | `true` |
|
|
153
|
-
| `useRootColors` <br /> Include CSS custom properties | `boolean` | `true` |
|
|
154
|
-
| `useGrid` <br /> Include grid system | `boolean` | `true` |
|
|
155
|
-
| `useFlex` <br /> Include flexbox utilities | `boolean` | `true` |
|
|
156
|
-
| `useTransitions` <br /> Include transition utilities | `boolean` | `true` |
|
|
157
|
-
| `useWrappers` <br /> Include container utilities | `boolean` | `true` |
|
|
158
|
-
| `useShadows` <br /> Include shadow utilities | `boolean` | `true` |
|
|
159
|
-
| `useDisplays` <br /> Include display utilities | `boolean` | `true` |
|
|
160
|
-
| `useOverflows` <br /> Include overflow utilities | `boolean` | `true` |
|
|
161
|
-
| `useOpacities` <br /> Include opacity utilities | `boolean` | `true` |
|
|
162
|
-
| `useBlur` <br /> Include blur utilities | `boolean` | `true` |
|
|
163
|
-
| `useObjectFits` <br /> Include object-fit utilities | `boolean` | `true` |
|
|
164
|
-
| `usePositions` <br /> Include positioning utilities | `boolean` | `true` |
|
|
165
|
-
| `useInsets` <br /> Include inset utilities | `boolean` | `true` |
|
|
166
|
-
| `useSizes` <br /> Include sizing utilities | `boolean` | `true` |
|
|
167
|
-
| `useGutters` <br /> Include spacing utilities | `boolean` | `true` |
|
|
168
|
-
| `useBorders` <br /> Include border utilities | `boolean` | `true` |
|
|
169
|
-
| `useTextBorders` <br /> Include text border utilities | `boolean` | `true` |
|
|
170
|
-
| `useRadius` <br /> Include border radius utilities | `boolean` | `true` |
|
|
171
|
-
|
|
172
|
-
### TypeScript Configuration Example
|
|
173
|
-
|
|
174
|
-
```typescript
|
|
175
|
-
// beathers.configs.ts
|
|
176
|
-
import { Theme } from 'beathers'
|
|
177
|
-
|
|
178
|
-
export default {
|
|
179
|
-
colors: {
|
|
180
|
-
primary: { light: '#007bff', dark: '#0056b3' },
|
|
181
|
-
secondary: { light: '#6c757d', dark: '#495057' },
|
|
182
|
-
success: { light: '#28a745', dark: '#20c997' },
|
|
183
|
-
},
|
|
184
|
-
typography: {
|
|
185
|
-
defaultFontFamilies: ['Inter', 'system-ui', 'sans-serif'],
|
|
186
|
-
fontSizes: {
|
|
187
|
-
xs: '12px',
|
|
188
|
-
sm: '14px',
|
|
189
|
-
base: '16px',
|
|
190
|
-
lg: '18px',
|
|
191
|
-
xl: '20px',
|
|
192
|
-
},
|
|
193
|
-
},
|
|
194
|
-
settings: {
|
|
195
|
-
axisDivisions: 12,
|
|
196
|
-
breakpoints: {
|
|
197
|
-
sm: '640px',
|
|
198
|
-
md: '768px',
|
|
199
|
-
lg: '1024px',
|
|
200
|
-
xl: '1280px',
|
|
201
|
-
xxl: '1536px',
|
|
202
|
-
},
|
|
203
|
-
},
|
|
204
|
-
roles: {
|
|
205
|
-
useIcons: false,
|
|
206
|
-
useBlur: false,
|
|
207
|
-
},
|
|
208
|
-
} satisfies Theme
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
## Contact & Support
|
|
212
|
-
|
|
213
|
-
[](https://bhoenixstudio.com/beathers)
|
|
214
|
-
|
|
215
|
-
[](https://bhoenixstudio.com/beathers)
|
|
216
|
-
|
|
217
|
-
[](mailto:contact@bhoenixstudio.com)
|
|
1
|
+
<div align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/BhoenixStudio/Beathers/main/public/images/logo.png" alt="Beathers logo" width="700" height="312">
|
|
3
|
+
<p align="center">The Perfect Fusion of Strength and Featherlight Agility</p>
|
|
4
|
+
</div>
|
|
5
|
+
|
|
6
|
+
[](https://www.npmjs.com/package/beathers)
|
|
7
|
+
[](https://opensource.org/licenses/MIT)
|
|
8
|
+
|
|
9
|
+
Beathers is a lightweight, powerful SCSS library designed to accelerate your web development workflow. **Everything is fully customizable** through a simple configuration file, allowing you to tailor every aspect to match your brand and requirements. It offers a comprehensive suite of SCSS mixins, variables, and utility classes, enabling you to build responsive, visually appealing web applications with complete design control.
|
|
10
|
+
|
|
11
|
+
## Get Started
|
|
12
|
+
|
|
13
|
+
### Installation
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install beathers
|
|
17
|
+
# or
|
|
18
|
+
yarn add beathers
|
|
19
|
+
# or
|
|
20
|
+
pnpm add beathers
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Create Configuration File
|
|
24
|
+
|
|
25
|
+
Use the interactive CLI to create your theme configuration:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npx beathers init
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
This will prompt you to:
|
|
32
|
+
|
|
33
|
+
- Choose your configuration file format (JSON, JS, or TypeScript)
|
|
34
|
+
- Set up initial theme values like colors and typography
|
|
35
|
+
- Configure which features to enable/disable
|
|
36
|
+
|
|
37
|
+
### Build Your Theme
|
|
38
|
+
|
|
39
|
+
Generate your custom CSS from the configuration:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npx beathers build
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Import in Your Project
|
|
46
|
+
|
|
47
|
+
**CSS Import (Recommended):**
|
|
48
|
+
|
|
49
|
+
```css
|
|
50
|
+
/* Import the compiled CSS */
|
|
51
|
+
@import 'node_modules/beathers/dist/css/beathers.min.css';
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
**SCSS Import:**
|
|
55
|
+
|
|
56
|
+
```scss
|
|
57
|
+
// Import the entire library
|
|
58
|
+
@import 'node_modules/beathers/src/scss/beathers.min.scss';
|
|
59
|
+
|
|
60
|
+
// Or import specific modules
|
|
61
|
+
@import 'node_modules/beathers/src/scss/functions/colors';
|
|
62
|
+
@import 'node_modules/beathers/src/scss/style/grid';
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
**JavaScript/Framework Import:**
|
|
66
|
+
|
|
67
|
+
```javascript
|
|
68
|
+
// Next.js, React, Vue, Angular
|
|
69
|
+
import 'beathers/dist/css/beathers.min.css'
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Example Configuration
|
|
73
|
+
|
|
74
|
+
```json
|
|
75
|
+
{
|
|
76
|
+
"colors": {
|
|
77
|
+
"primary": { "light": "#007bff", "dark": "#0056b3" },
|
|
78
|
+
"success": { "light": "#28a745", "dark": "#20c997" }
|
|
79
|
+
},
|
|
80
|
+
"typography": {
|
|
81
|
+
"defaultFontFamilies": ["Inter", "system-ui", "sans-serif"]
|
|
82
|
+
},
|
|
83
|
+
"settings": {
|
|
84
|
+
"axisDivisions": 12,
|
|
85
|
+
"breakpoints": {
|
|
86
|
+
"sm": "640px",
|
|
87
|
+
"md": "768px",
|
|
88
|
+
"lg": "1024px"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Configuration
|
|
95
|
+
|
|
96
|
+
Beathers uses a configuration file to customize your theme. All options are optional and have sensible defaults.
|
|
97
|
+
|
|
98
|
+
### Configuration File Options
|
|
99
|
+
|
|
100
|
+
You can create one of these files in your project root:
|
|
101
|
+
|
|
102
|
+
- `beathers.configs.json` - JSON format
|
|
103
|
+
- `beathers.configs.js` - JavaScript format
|
|
104
|
+
- `beathers.configs.ts` - TypeScript format (with type safety)
|
|
105
|
+
|
|
106
|
+
### Key Configuration Sections
|
|
107
|
+
|
|
108
|
+
| Section | Description | Purpose |
|
|
109
|
+
| -------------- | -------------------------------------------------- | --------------------------------------------------- |
|
|
110
|
+
| **colors** | Define your color palette with light/dark variants | Brand colors, state colors (success, warning, etc.) |
|
|
111
|
+
| **typography** | Configure fonts, sizes, and text settings | Font families, weights, sizes, and formatting |
|
|
112
|
+
| **settings** | Layout and spacing configuration | Grid system, breakpoints, spacing values |
|
|
113
|
+
| **roles** | Enable/disable specific features | Control which utilities are generated |
|
|
114
|
+
|
|
115
|
+
### Common Configuration Properties
|
|
116
|
+
|
|
117
|
+
| Property | Type | Example |
|
|
118
|
+
| ------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
119
|
+
| **COLORS** |
|
|
120
|
+
| `color` <br /> Color variants (as json) | "color": { light: `#${string}$`, dark: `#${string}$` } | "primary": {"light": "#007bff", "dark": "#0056b3"} |
|
|
121
|
+
| **TYPOGRAPHY** |
|
|
122
|
+
| `defaultFontFamilies` <br /> Fallback fonts (as array) | `string[]` | ["system-ui", "sans-serif"] |
|
|
123
|
+
| `fontMainPath` <br /> Your fonts path | `string` | "/fonts/" |
|
|
124
|
+
| `fontFormat` <br /> Your fonts format | `string` | "woff2" |
|
|
125
|
+
| `fontWeights` <br /> Your fonts weights (as array) | `thin`,`extra-light`,`light`,`regular`,<br />`medium`,`semibold`,`bold`,`extra-bold`,`black` | ["regular", "medium", "bold"] |
|
|
126
|
+
| `fontStyles` <br /> Your fonts styles (as array) | `normal`,`italic`,`oblique` | ["normal"] |
|
|
127
|
+
| `fontSizes` <br /> Your fonts sizes (as json) | Record<`string`, `${number}px` `${number}rem` `${number}em`> | subtitle1: "16px" <br /> (Azvailable: h1, h2, h3, h4, h5, h6, subtitle1, subtitle2, button, body1, body2, caption, overline) <br /> (Note: You can add/remove) |
|
|
128
|
+
| `textTruncate` <br /> Text truncation | `number` | 3 |
|
|
129
|
+
| `fonts` <br /> Custom font definitions <br /> (Local/External) (as json) | {weights: same as `weights`, styles: same as `styles`, <br /> variants: {"fontName" :{title: `string`, unicode?: `string`, format?: `woff`, isLocal?: `boolean`, url?: `https://${string}`, `http://${string}`}}} | {variants: {"font1" :{title: "roboto"}}} |
|
|
130
|
+
| **SETTINGS** |
|
|
131
|
+
| `axisDivisions` <br /> Grid system divisions | `number` | 12 |
|
|
132
|
+
| `opacities` <br /> Available opacity values <br /> min: 0 - max: 100 (as array) | `number[]` | [10, 20] |
|
|
133
|
+
| `blurValues` <br /> Blur effect values (as array) | `number[]` | [2, 4, 8, 16, 32] |
|
|
134
|
+
| `insetValues` <br /> Inset values (as array) | `number[]` | [0, 5] |
|
|
135
|
+
| `bordersValue` <br /> Default border width (as array) | `number[]` | [1, 2] |
|
|
136
|
+
| `radiuses` <br /> Border radius values (as array) | `number[]` | [5,10,15] |
|
|
137
|
+
| `breakpoints` <br /> Responsive breakpoints (as json) | Record<(`sm` , `md` , `lg` , `xl` , `xxl`), `${number}px` `${number}rem` `${number}em`> | {"sm": "640px", "md": "768px"} |
|
|
138
|
+
| `wrappers` <br /> Container widths (as json) | Record<(`sm` , `md` , `lg` , `xl` , `xxl`), { width: `${number}px` `${number}rem` `${number}em`; padding?: `${number}px` `${number}rem` `${number}em`}> | {"sm": {"width": "540px", "padding":"15px"}} |
|
|
139
|
+
| `guttersValues` <br /> Spacing values (as json) | Record<(`auto`, `number`), `${number}px` `${number}rem` `${number}em`> | {"auto": "1rem", 1: "0.25rem"} |
|
|
140
|
+
| **ROLES** |
|
|
141
|
+
| `useMediaQueries` <br /> Enable responsive utilities | `boolean` | `true` |
|
|
142
|
+
| `useIcons` <br /> Include icon styles | `boolean` | `true` |
|
|
143
|
+
| `useFontFamilies` <br /> Include font family utilities | `boolean` | `true` |
|
|
144
|
+
| `useFontSizes` <br /> Include font size utilities | `boolean` | `true` |
|
|
145
|
+
| `useFontShapes` <br /> Include font style utilities | `boolean` | `true` |
|
|
146
|
+
| `useTextAligns` <br /> Include text alignment utilities | `boolean` | `true` |
|
|
147
|
+
| `useTextTruncate` <br /> Include text truncation utilities | `boolean` | `true` |
|
|
148
|
+
| `useColors` <br /> Include color utilities | `boolean` | `true` |
|
|
149
|
+
| `useColorsOpacities` <br /> Include color opacity utilities | `boolean` | `true` |
|
|
150
|
+
| `useColorsLightMode` <br /> Include light mode colors | `boolean` | `true` |
|
|
151
|
+
| `useColorsDarkMode` <br /> Include dark mode colors | `boolean` | `true` |
|
|
152
|
+
| `useCurrentColors` <br /> Include currentColor utilities | `boolean` | `true` |
|
|
153
|
+
| `useRootColors` <br /> Include CSS custom properties | `boolean` | `true` |
|
|
154
|
+
| `useGrid` <br /> Include grid system | `boolean` | `true` |
|
|
155
|
+
| `useFlex` <br /> Include flexbox utilities | `boolean` | `true` |
|
|
156
|
+
| `useTransitions` <br /> Include transition utilities | `boolean` | `true` |
|
|
157
|
+
| `useWrappers` <br /> Include container utilities | `boolean` | `true` |
|
|
158
|
+
| `useShadows` <br /> Include shadow utilities | `boolean` | `true` |
|
|
159
|
+
| `useDisplays` <br /> Include display utilities | `boolean` | `true` |
|
|
160
|
+
| `useOverflows` <br /> Include overflow utilities | `boolean` | `true` |
|
|
161
|
+
| `useOpacities` <br /> Include opacity utilities | `boolean` | `true` |
|
|
162
|
+
| `useBlur` <br /> Include blur utilities | `boolean` | `true` |
|
|
163
|
+
| `useObjectFits` <br /> Include object-fit utilities | `boolean` | `true` |
|
|
164
|
+
| `usePositions` <br /> Include positioning utilities | `boolean` | `true` |
|
|
165
|
+
| `useInsets` <br /> Include inset utilities | `boolean` | `true` |
|
|
166
|
+
| `useSizes` <br /> Include sizing utilities | `boolean` | `true` |
|
|
167
|
+
| `useGutters` <br /> Include spacing utilities | `boolean` | `true` |
|
|
168
|
+
| `useBorders` <br /> Include border utilities | `boolean` | `true` |
|
|
169
|
+
| `useTextBorders` <br /> Include text border utilities | `boolean` | `true` |
|
|
170
|
+
| `useRadius` <br /> Include border radius utilities | `boolean` | `true` |
|
|
171
|
+
|
|
172
|
+
### TypeScript Configuration Example
|
|
173
|
+
|
|
174
|
+
```typescript
|
|
175
|
+
// beathers.configs.ts
|
|
176
|
+
import { Theme } from 'beathers'
|
|
177
|
+
|
|
178
|
+
export default {
|
|
179
|
+
colors: {
|
|
180
|
+
primary: { light: '#007bff', dark: '#0056b3' },
|
|
181
|
+
secondary: { light: '#6c757d', dark: '#495057' },
|
|
182
|
+
success: { light: '#28a745', dark: '#20c997' },
|
|
183
|
+
},
|
|
184
|
+
typography: {
|
|
185
|
+
defaultFontFamilies: ['Inter', 'system-ui', 'sans-serif'],
|
|
186
|
+
fontSizes: {
|
|
187
|
+
xs: '12px',
|
|
188
|
+
sm: '14px',
|
|
189
|
+
base: '16px',
|
|
190
|
+
lg: '18px',
|
|
191
|
+
xl: '20px',
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
settings: {
|
|
195
|
+
axisDivisions: 12,
|
|
196
|
+
breakpoints: {
|
|
197
|
+
sm: '640px',
|
|
198
|
+
md: '768px',
|
|
199
|
+
lg: '1024px',
|
|
200
|
+
xl: '1280px',
|
|
201
|
+
xxl: '1536px',
|
|
202
|
+
},
|
|
203
|
+
},
|
|
204
|
+
roles: {
|
|
205
|
+
useIcons: false,
|
|
206
|
+
useBlur: false,
|
|
207
|
+
},
|
|
208
|
+
} satisfies Theme
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
## Contact & Support
|
|
212
|
+
|
|
213
|
+
[](https://bhoenixstudio.com/beathers)
|
|
214
|
+
|
|
215
|
+
[](https://bhoenixstudio.com/beathers)
|
|
216
|
+
|
|
217
|
+
[](mailto:contact@bhoenixstudio.com)
|