vueless 0.0.136 → 0.0.138
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/preset.tailwind/index.js +1 -1
- package/ui.button/configs/default.config.js +89 -91
- package/ui.button/index.vue +1 -1
- package/web-types.json +2 -2
package/package.json
CHANGED
package/preset.tailwind/index.js
CHANGED
|
@@ -26,7 +26,7 @@ export function vuelessPreset() {
|
|
|
26
26
|
const devSafelist = [
|
|
27
27
|
{
|
|
28
28
|
pattern: /(border|bg|text|ring)-(.*)-((50|[1-9]00|950)?)$/,
|
|
29
|
-
variants: ["hover", "focus", "focus-within", "active"],
|
|
29
|
+
variants: ["hover", "focus", "focus-within", "active", "disabled"],
|
|
30
30
|
},
|
|
31
31
|
];
|
|
32
32
|
|
|
@@ -2,43 +2,45 @@ export default /*tw*/ {
|
|
|
2
2
|
button: {
|
|
3
3
|
base: `
|
|
4
4
|
flex items-center justify-center
|
|
5
|
-
text-base font-medium
|
|
5
|
+
text-base font-medium outline-none
|
|
6
|
+
border border-solid rounded-lg
|
|
6
7
|
transition duration-100 ease-in-out
|
|
7
|
-
focus:ring-4 focus:ring-
|
|
8
|
+
focus:ring-opacity-20 focus:ring-4 focus:ring-{color}-700 focus:outline-none
|
|
9
|
+
disabled:ring-0 disabled:cursor-no-drop
|
|
8
10
|
`,
|
|
9
11
|
variants: {
|
|
10
12
|
size: {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
"2xs": "px-3 py-1 text-2xs leading-tight gap-1",
|
|
14
|
+
xs: "px-4 py-1.5 text-xs leading-tight gap-1.5",
|
|
15
|
+
sm: "px-5 py-2.5 text-sm leading-tight gap-1.5",
|
|
16
|
+
md: "px-6 py-3.5 text-base leading-tight gap-2",
|
|
17
|
+
lg: "px-7 py-4 text-lg leading-tight gap-2.5",
|
|
18
|
+
xl: "px-8 py-5 text-xl leading-tight gap-2.5",
|
|
15
19
|
},
|
|
16
20
|
variant: {
|
|
17
21
|
primary: `
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
text-white
|
|
23
|
+
bg-{color}-600 border-{color}-600
|
|
24
|
+
hover:bg-{color}-700 hover:border-{color}-700
|
|
25
|
+
focus:bg-{color}-700 focus:border-{color}-700
|
|
26
|
+
active:bg-{color}-800 active:border-{color}-800
|
|
27
|
+
disabled:bg-{color}-300 disabled:border-{color}-300 disabled:text-white
|
|
28
|
+
`,
|
|
25
29
|
secondary: `
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
focus:text-{color}-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
active:border-{color}-500 active:text-{color}-500
|
|
33
|
-
active:border-opacity-70 active:text-opacity-70`,
|
|
30
|
+
text-{color}-600 border-{color}-600
|
|
31
|
+
hover:text-{color}-700 hover:border-{color}-700
|
|
32
|
+
focus:text-{color}-700 focus:border-{color}-700
|
|
33
|
+
active:text-{color}-800 active:border-{color}-800
|
|
34
|
+
disabled:text-{color}-300 disabled:border-{color}-300
|
|
35
|
+
`,
|
|
34
36
|
thirdary: `
|
|
35
|
-
border
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
border-transparent
|
|
38
|
+
text-{color}-600
|
|
39
|
+
hover:text-{color}-700 hover:bg-{color}-700 hover:bg-opacity-10
|
|
40
|
+
focus:text-{color}-700 focus:bg-{color}-700 focus:bg-opacity-10
|
|
41
|
+
active:text-{color}-800 active:bg-{color}-800 active:bg-opacity-15
|
|
42
|
+
disabled:text-{color}-300
|
|
43
|
+
`,
|
|
42
44
|
},
|
|
43
45
|
loading: {
|
|
44
46
|
true: "pointer-events-none",
|
|
@@ -49,107 +51,93 @@ export default /*tw*/ {
|
|
|
49
51
|
block: {
|
|
50
52
|
true: "w-full",
|
|
51
53
|
},
|
|
54
|
+
color: {
|
|
55
|
+
grayscale: "focus:ring-gray-800 disabled:text-gray-400",
|
|
56
|
+
white: "focus:ring-gray-800 disabled:text-gray-400",
|
|
57
|
+
},
|
|
52
58
|
},
|
|
53
59
|
compoundVariants: [
|
|
54
|
-
{
|
|
55
|
-
disabled: true,
|
|
56
|
-
variant: "primary",
|
|
57
|
-
class: `
|
|
58
|
-
border-opacity-0 bg-opacity-40 cursor-no-drop text-white
|
|
59
|
-
hover:bg-opacity-40
|
|
60
|
-
focus:bg-opacity-40 focus:ring-0
|
|
61
|
-
active:bg-opacity-40 active:ring-0
|
|
62
|
-
`,
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
disabled: true,
|
|
66
|
-
variant: "secondary",
|
|
67
|
-
class: `
|
|
68
|
-
text-opacity-40 border-opacity-40 cursor-no-drop
|
|
69
|
-
hover:text-opacity-40 hover:border-opacity-40
|
|
70
|
-
focus:text-opacity-40 focus:border-opacity-40 focus:ring-0
|
|
71
|
-
active:text-opacity-40 active:border-opacity-40 active:ring-0
|
|
72
|
-
`,
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
disabled: true,
|
|
76
|
-
variant: "thirdary",
|
|
77
|
-
class: `
|
|
78
|
-
bg-opacity-5 text-opacity-40 ring-opacity-0 cursor-no-drop
|
|
79
|
-
hover:bg-opacity-5 hover:text-opacity-40
|
|
80
|
-
focus:ring-0 focus:bg-opacity-5 focus:text-opacity-40
|
|
81
|
-
active:bg-opacity-5 active:ring-0 active:text-opacity-40
|
|
82
|
-
`,
|
|
83
|
-
},
|
|
84
60
|
{
|
|
85
61
|
color: "grayscale",
|
|
86
62
|
variant: "primary",
|
|
87
63
|
class: `
|
|
88
|
-
|
|
89
|
-
hover:
|
|
90
|
-
focus:
|
|
91
|
-
active:
|
|
64
|
+
bg-gray-900 border-gray-900
|
|
65
|
+
hover:bg-gray-800 hover:border-gray-800
|
|
66
|
+
focus:bg-gray-800 focus:border-gray-800
|
|
67
|
+
active:bg-gray-700 active:border-gray-700
|
|
68
|
+
disabled:bg-gray-400 disabled:border-gray-400 disabled:text-white
|
|
69
|
+
`,
|
|
92
70
|
},
|
|
93
71
|
{
|
|
94
72
|
color: "grayscale",
|
|
95
73
|
variant: "secondary",
|
|
96
74
|
class: `
|
|
97
75
|
text-gray-900 border-gray-900
|
|
98
|
-
hover:
|
|
99
|
-
focus:
|
|
100
|
-
active:
|
|
76
|
+
hover:text-gray-800 hover:border-gray-800
|
|
77
|
+
focus:text-gray-800 focus:border-gray-800
|
|
78
|
+
active:text-gray-700 active:border-gray-700
|
|
79
|
+
disabled:border-gray-400
|
|
80
|
+
`,
|
|
101
81
|
},
|
|
102
82
|
{
|
|
103
83
|
color: "grayscale",
|
|
104
84
|
variant: "thirdary",
|
|
105
85
|
class: `
|
|
106
86
|
text-gray-900
|
|
107
|
-
focus:text-gray-800 focus:bg-gray-800 focus:ring-gray-800
|
|
108
87
|
hover:text-gray-800 hover:bg-gray-800
|
|
109
|
-
|
|
88
|
+
focus:text-gray-800 focus:bg-gray-800
|
|
89
|
+
active:text-gray-700 active:bg-gray-700
|
|
90
|
+
disabled:bg-transparent
|
|
91
|
+
`,
|
|
110
92
|
},
|
|
111
93
|
{
|
|
112
94
|
color: "white",
|
|
113
95
|
variant: "primary",
|
|
114
96
|
class: `
|
|
115
|
-
border-white bg-white
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
active:border-
|
|
97
|
+
text-gray-900 border-white bg-white
|
|
98
|
+
hover:text-gray-800 hover:border-gray-50 hover:bg-gray-50
|
|
99
|
+
focus:text-gray-800 focus:border-gray-50 focus:bg-gray-50
|
|
100
|
+
active:text-gray-700 active:border-gray-100 active:bg-gray-100
|
|
101
|
+
`,
|
|
119
102
|
},
|
|
120
103
|
{
|
|
121
104
|
color: "white",
|
|
122
105
|
variant: "secondary",
|
|
123
106
|
class: `
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
active:border-
|
|
107
|
+
text-gray-900 border-gray-200
|
|
108
|
+
hover:text-gray-800 hover:border-gray-300
|
|
109
|
+
focus:text-gray-800 focus:border-gray-300
|
|
110
|
+
active:text-gray-700 active:border-gray-400
|
|
111
|
+
`,
|
|
128
112
|
},
|
|
129
113
|
{
|
|
130
114
|
color: "white",
|
|
131
115
|
variant: "thirdary",
|
|
132
116
|
class: `
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
active:bg-white
|
|
117
|
+
text-gray-900
|
|
118
|
+
hover:text-gray-800 hover:bg-white
|
|
119
|
+
focus:text-gray-800 focus:bg-white
|
|
120
|
+
active:text-gray-700 active:bg-white
|
|
121
|
+
disabled:bg-transparent
|
|
122
|
+
`,
|
|
137
123
|
},
|
|
138
|
-
{ filled: true, variant: "thirdary", class: "bg-{color}-
|
|
139
|
-
{ filled: true, variant: "thirdary", color: "
|
|
140
|
-
{ filled: true, variant: "thirdary", color: "
|
|
124
|
+
{ filled: true, variant: "thirdary", class: "bg-{color}-700 bg-opacity-10" },
|
|
125
|
+
{ filled: true, variant: "thirdary", color: "grayscale", class: "bg-gray-800 bg-opacity-10" },
|
|
126
|
+
{ filled: true, variant: "thirdary", color: "white", class: "bg-gray-50" },
|
|
141
127
|
{ square: true, size: "xs", class: "p-1" },
|
|
142
|
-
{ square: true, size: "
|
|
143
|
-
{ square: true, size: "
|
|
144
|
-
{ square: true, size: "
|
|
128
|
+
{ square: true, size: "xs", class: "p-1.5" },
|
|
129
|
+
{ square: true, size: "sm", class: "p-2.5" },
|
|
130
|
+
{ square: true, size: "md", class: "p-3.5" },
|
|
131
|
+
{ square: true, size: "lg", class: "p-4" },
|
|
132
|
+
{ square: true, size: "lg", class: "p-5" },
|
|
145
133
|
],
|
|
146
134
|
},
|
|
147
|
-
text: "whitespace-nowrap
|
|
135
|
+
text: "whitespace-nowrap",
|
|
148
136
|
defaultVariants: {
|
|
149
137
|
color: "brand",
|
|
150
138
|
variant: "primary",
|
|
151
|
-
size: "md",
|
|
152
139
|
tag: "button",
|
|
140
|
+
size: "md",
|
|
153
141
|
pill: false,
|
|
154
142
|
block: false,
|
|
155
143
|
square: false,
|
|
@@ -158,9 +146,19 @@ export default /*tw*/ {
|
|
|
158
146
|
disabled: false,
|
|
159
147
|
},
|
|
160
148
|
safelist: (colors) => [
|
|
161
|
-
{ pattern: `border-(${colors})-
|
|
162
|
-
{ pattern: `
|
|
163
|
-
{ pattern: `
|
|
164
|
-
{ pattern: `
|
|
149
|
+
{ pattern: `border-(${colors})-600` },
|
|
150
|
+
{ pattern: `border-(${colors})-700`, variants: ["hover", "focus"] },
|
|
151
|
+
{ pattern: `border-(${colors})-800`, variants: ["active"] },
|
|
152
|
+
{ pattern: `border-(${colors})-300`, variants: ["disabled"] },
|
|
153
|
+
{ pattern: `bg-(${colors})-600` },
|
|
154
|
+
{ pattern: `bg-(${colors})-700`, variants: ["hover", "focus"] },
|
|
155
|
+
{ pattern: `bg-(${colors})-800`, variants: ["active"] },
|
|
156
|
+
{ pattern: `bg-(${colors})-300`, variants: ["disabled"] },
|
|
157
|
+
{ pattern: `text-(${colors})-600` },
|
|
158
|
+
{ pattern: `text-(${colors})-700`, variants: ["hover", "focus"] },
|
|
159
|
+
{ pattern: `text-(${colors})-800`, variants: ["active"] },
|
|
160
|
+
{ pattern: `text-(${colors})-300`, variants: ["disabled"] },
|
|
161
|
+
{ pattern: `ring-(${colors})-700`, variants: ["focus"] },
|
|
162
|
+
{ pattern: `ring-(${colors})-800`, variants: ["active"] },
|
|
165
163
|
],
|
|
166
164
|
};
|
package/ui.button/index.vue
CHANGED
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"framework": "vue",
|
|
3
3
|
"name": "vueless",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.138",
|
|
5
5
|
"contributions": {
|
|
6
6
|
"html": {
|
|
7
7
|
"description-markup": "markdown",
|
|
@@ -576,7 +576,7 @@
|
|
|
576
576
|
"description": "Button size.",
|
|
577
577
|
"value": {
|
|
578
578
|
"kind": "expression",
|
|
579
|
-
"type": "'xs' | 'sm' | 'md' | 'lg'"
|
|
579
|
+
"type": "'2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl'"
|
|
580
580
|
},
|
|
581
581
|
"default": "md"
|
|
582
582
|
},
|