@beeq/tailwindcss 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 +125 -0
- package/index.cjs.d.ts +2 -0
- package/index.cjs.default.js +1 -0
- package/index.cjs.js +1196 -0
- package/index.cjs.mjs +2 -0
- package/index.esm.js +1510 -0
- package/package.json +29 -0
- package/src/helpers/blend-color.d.ts +10 -0
- package/src/helpers/index.d.ts +1 -0
- package/src/index.d.ts +363 -0
- package/src/theme/colors/base.d.ts +200 -0
- package/src/theme/colors/declarative.d.ts +77 -0
- package/src/theme/colors/index.d.ts +3 -0
- package/src/theme/colors/primitive.d.ts +212 -0
- package/src/theme/default/dark.d.ts +54 -0
- package/src/theme/default/index.d.ts +3 -0
- package/src/theme/default/light.d.ts +54 -0
- package/src/theme/default/root.d.ts +89 -0
- package/src/theme/endava/dark.d.ts +55 -0
- package/src/theme/endava/index.d.ts +3 -0
- package/src/theme/endava/light.d.ts +55 -0
- package/src/theme/endava/root.d.ts +48 -0
- package/src/theme/index.d.ts +5 -0
- package/src/theme/reset.d.ts +2 -0
- package/src/theme/typography/default.d.ts +2 -0
- package/src/theme/typography/index.d.ts +1 -0
package/README.md
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# BEEQ TailwindCSS Preset
|
|
2
|
+
|
|
3
|
+
BEEQ TailwindCSS is a preset that adds BEEQ's opinionated TailwindCSS configuration to your application.
|
|
4
|
+
|
|
5
|
+
## Prerequisites ๐งฐ
|
|
6
|
+
|
|
7
|
+
Before starting to use BEEQ TailwindCSS, you need to have installed:
|
|
8
|
+
|
|
9
|
+
- [TailwindCSS](https://tailwindcss.com/docs/installation)
|
|
10
|
+
|
|
11
|
+
Make sure that Tailwind CSS directives are added to your main CSS file:
|
|
12
|
+
|
|
13
|
+
```css
|
|
14
|
+
@tailwind base;
|
|
15
|
+
@tailwind components;
|
|
16
|
+
@tailwind utilities;
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Installation ๐ฆ
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm i -D @bee-q/tailwindcss
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Usage ๐
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
const beeqPreset = require('@bee-q/tailwindcss');
|
|
29
|
+
|
|
30
|
+
module.exports = {
|
|
31
|
+
content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"],
|
|
32
|
+
presets: [beeqPreset],
|
|
33
|
+
...
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
or with TypeScript:
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
import { default as beeqPreset } from '@bee-q/tailwindcss';
|
|
41
|
+
|
|
42
|
+
export default {
|
|
43
|
+
content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"],
|
|
44
|
+
presets: [beeqPreset],
|
|
45
|
+
...
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## CSS reset ๐งน
|
|
50
|
+
|
|
51
|
+
The preset includes a CSS reset that removes all the default browser styles. If you want to use your own reset, you can add your own CSS reset code to the `@base` layer of TailwindCSS:
|
|
52
|
+
|
|
53
|
+
```css
|
|
54
|
+
@tailwind base;
|
|
55
|
+
@layer base {
|
|
56
|
+
/* Your CSS reset code */
|
|
57
|
+
}
|
|
58
|
+
@tailwind components;
|
|
59
|
+
@tailwind utilities;
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Fonts ๐
|
|
63
|
+
|
|
64
|
+
The preset does not include the fonts by default, but you can add them in your CSS entry file or use your own custom fonts:
|
|
65
|
+
|
|
66
|
+
```css
|
|
67
|
+
/* BEEQ Outfit font */
|
|
68
|
+
@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@100;300;400;600;700&display=swap");
|
|
69
|
+
/* ENDAVA Roboto */
|
|
70
|
+
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700&display=swap');
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Typography ๐
|
|
74
|
+
|
|
75
|
+
The preset includes a typography plugin that adds a set of default typography styles to your application. It is not enabled by default, so you need to add it to your `tailwind.config.js` file:
|
|
76
|
+
|
|
77
|
+
```js
|
|
78
|
+
const beeqPreset = require('@bee-q/tailwindcss');
|
|
79
|
+
const { TYPOGRAPHY_DEFAULT } = require('@bee-q/tailwindcss');
|
|
80
|
+
|
|
81
|
+
module.exports = {
|
|
82
|
+
content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"],
|
|
83
|
+
presets: [require('@bee-q/tailwindcss')],
|
|
84
|
+
...
|
|
85
|
+
plugins: [
|
|
86
|
+
plugin(function ({ addBase }) {
|
|
87
|
+
// Use the default typography styles
|
|
88
|
+
addBase({ ...TYPOGRAPHY_DEFAULT });
|
|
89
|
+
}),
|
|
90
|
+
],
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
or via TypeScript:
|
|
95
|
+
|
|
96
|
+
```ts
|
|
97
|
+
import plugin from "tailwindcss/plugin";
|
|
98
|
+
import { default as beeqPreset, TYPOGRAPHY_DEFAULT } from "@bee-q/tailwindcss";
|
|
99
|
+
import type { Config } from "tailwindcss";
|
|
100
|
+
|
|
101
|
+
export default {
|
|
102
|
+
content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"],
|
|
103
|
+
presets: [beeqPreset],
|
|
104
|
+
theme: {},
|
|
105
|
+
plugins: [
|
|
106
|
+
plugin(function ({ addBase }) {
|
|
107
|
+
// Use the default typography styles
|
|
108
|
+
addBase({ ...TYPOGRAPHY_DEFAULT });
|
|
109
|
+
}),
|
|
110
|
+
],
|
|
111
|
+
corePlugins: {
|
|
112
|
+
preflight: false,
|
|
113
|
+
},
|
|
114
|
+
} satisfies Config;
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
> Note: you can always override this styles by adding your own CSS code to the `@base` layer of TailwindCSS.
|
|
118
|
+
|
|
119
|
+
## Complete example
|
|
120
|
+
|
|
121
|
+
[CodeSandbox](https://codesandbox.io/p/sandbox/beeq-tailwind-css-preset-swrtfk?file=%2Ftailwind.config.ts)
|
|
122
|
+
|
|
123
|
+
## Documentation ๐
|
|
124
|
+
|
|
125
|
+
Your can find more details about TailwindCSS presets in [the official documentation](https://tailwindcss.com/docs/presets).
|
package/index.cjs.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
exports._default = require('./index.cjs.js').default;
|