@wikicasa-dev/tailwind-plugins 0.0.1 → 0.0.3
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/package.json +1 -1
- package/plugins/buttonPlugin.ts +9 -6
- package/tailwind.config.js +75 -0
package/package.json
CHANGED
package/plugins/buttonPlugin.ts
CHANGED
|
@@ -88,7 +88,7 @@ export const buttonPlugin = plugin(({ addComponents, theme }) => {
|
|
|
88
88
|
},
|
|
89
89
|
{
|
|
90
90
|
mainColor: theme("colors.w-primary"),
|
|
91
|
-
}
|
|
91
|
+
},
|
|
92
92
|
),
|
|
93
93
|
".btn-light": createBtn(theme("screens.sm"), {
|
|
94
94
|
textColor: theme("colors.w-primary"),
|
|
@@ -108,7 +108,7 @@ export const buttonPlugin = plugin(({ addComponents, theme }) => {
|
|
|
108
108
|
{
|
|
109
109
|
mainColor: theme("colors.w-secondary"),
|
|
110
110
|
textColor: theme("colors.w-black"),
|
|
111
|
-
}
|
|
111
|
+
},
|
|
112
112
|
),
|
|
113
113
|
".btn-w-warning": createBtn(theme("screens.sm"), {
|
|
114
114
|
bgColor: theme("colors.w-warning"),
|
|
@@ -126,7 +126,7 @@ export const buttonPlugin = plugin(({ addComponents, theme }) => {
|
|
|
126
126
|
},
|
|
127
127
|
{
|
|
128
128
|
mainColor: theme("colors.w-danger"),
|
|
129
|
-
}
|
|
129
|
+
},
|
|
130
130
|
),
|
|
131
131
|
".btn-multi-selection, .btn-single-selection": {
|
|
132
132
|
"&[data-active='true']": {
|
|
@@ -236,11 +236,14 @@ type BtnOutlineVariantAttributes = {
|
|
|
236
236
|
const createBtn = (
|
|
237
237
|
smallBreakpoint: string,
|
|
238
238
|
btnProps: BtnAttributes,
|
|
239
|
-
btnOutlineProps?: BtnOutlineVariantAttributes
|
|
239
|
+
btnOutlineProps?: BtnOutlineVariantAttributes,
|
|
240
240
|
): any => {
|
|
241
241
|
const res = {
|
|
242
242
|
"--btn-bg-color": btnProps.bgColor,
|
|
243
243
|
"--btn-text-color": btnProps.textColor,
|
|
244
|
+
"&:disabled": {
|
|
245
|
+
"--btn-bg-color": btnProps.bgColor,
|
|
246
|
+
},
|
|
244
247
|
[`@media screen and (max-width: ${smallBreakpoint})`]: {
|
|
245
248
|
"&:hover": {
|
|
246
249
|
"--btn-bg-color": btnProps.hoverMobileBgColor ?? btnProps.bgColor,
|
|
@@ -277,7 +280,7 @@ const createBtn = (
|
|
|
277
280
|
? {
|
|
278
281
|
"&.btn-outline": createOutlineVariant(
|
|
279
282
|
btnOutlineProps,
|
|
280
|
-
smallBreakpoint
|
|
283
|
+
smallBreakpoint,
|
|
281
284
|
),
|
|
282
285
|
}
|
|
283
286
|
: {}),
|
|
@@ -287,7 +290,7 @@ const createBtn = (
|
|
|
287
290
|
|
|
288
291
|
const createOutlineVariant = (
|
|
289
292
|
props: BtnOutlineVariantAttributes,
|
|
290
|
-
smallBreakpoint: string
|
|
293
|
+
smallBreakpoint: string,
|
|
291
294
|
): any => {
|
|
292
295
|
const res = {
|
|
293
296
|
"--btn-border-color": props.mainColor ?? props.borderColor,
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/** @type {import("tailwindcss").Config} */
|
|
2
|
+
export default {
|
|
3
|
+
content: ["./src/**/*.{vue, ts}", "./lib/**/*.{vue, ts}"],
|
|
4
|
+
theme: {
|
|
5
|
+
//Bootstrap breakpoints
|
|
6
|
+
screens: {
|
|
7
|
+
sm: "576px",
|
|
8
|
+
md: "768px",
|
|
9
|
+
lg: "992px",
|
|
10
|
+
xl: "1200px",
|
|
11
|
+
"2xl": "1400px",
|
|
12
|
+
},
|
|
13
|
+
fontWeight: {
|
|
14
|
+
regular: 400,
|
|
15
|
+
medium: 500,
|
|
16
|
+
semibold: 600,
|
|
17
|
+
},
|
|
18
|
+
borderRadius: {
|
|
19
|
+
none: "0",
|
|
20
|
+
"3xs": "4px",
|
|
21
|
+
"2xs": "8px",
|
|
22
|
+
xs: "12px",
|
|
23
|
+
sm: "15px",
|
|
24
|
+
DEFAULT: "20px",
|
|
25
|
+
lg: "25px",
|
|
26
|
+
xl: "30px",
|
|
27
|
+
"2xl": "35px",
|
|
28
|
+
"3xl": "40px",
|
|
29
|
+
circle: "50%",
|
|
30
|
+
full: "9999px",
|
|
31
|
+
},
|
|
32
|
+
extend: {
|
|
33
|
+
colors: {
|
|
34
|
+
"w-primary": "#2B5DFF",
|
|
35
|
+
"w-secondary": "#B4C2F0",
|
|
36
|
+
"w-dark-primary": "#2A3761",
|
|
37
|
+
"w-lavender": "#E9EFFE",
|
|
38
|
+
"w-cultured": "#F4F7FF",
|
|
39
|
+
"w-carbon": "#3C474D",
|
|
40
|
+
"w-gray": "#6D7687",
|
|
41
|
+
"w-black": "#222222",
|
|
42
|
+
"w-warning": "#FFD167",
|
|
43
|
+
"w-danger": "#FA4F64",
|
|
44
|
+
},
|
|
45
|
+
fontSize: {
|
|
46
|
+
10: ["10px", "14px"],
|
|
47
|
+
12: ["12px", "16px"],
|
|
48
|
+
DEFAULT: ["14px", "18px"],
|
|
49
|
+
16: ["16px", "20px"],
|
|
50
|
+
18: ["18px", "22px"],
|
|
51
|
+
20: ["20px", "26px"],
|
|
52
|
+
22: ["22px", "28px"],
|
|
53
|
+
24: ["24px", "30px"],
|
|
54
|
+
26: ["26px", "32px"],
|
|
55
|
+
30: ["30px", "36px"],
|
|
56
|
+
},
|
|
57
|
+
spacing: {
|
|
58
|
+
"5px": "5px",
|
|
59
|
+
"10px": "10px",
|
|
60
|
+
"15px": "15px",
|
|
61
|
+
"20px": "20px",
|
|
62
|
+
"25px": "25px",
|
|
63
|
+
"30px": "30px",
|
|
64
|
+
"35px": "35px",
|
|
65
|
+
"40px": "40px",
|
|
66
|
+
},
|
|
67
|
+
aria: {
|
|
68
|
+
invalid: 'invalid="true"',
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
corePlugins: {
|
|
73
|
+
preflight: false,
|
|
74
|
+
},
|
|
75
|
+
};
|