aliascss 1.2.0 → 1.2.2
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/aliascss.config.js +14 -137
- package/custom-compilers.js +15 -1
- package/dist/aliascss.js +1 -1
- package/lib/config.d.ts +2 -0
- package/lib/config.js +20 -0
- package/lib/css-properties-all.js +120 -120
- package/lib/custom-css-compilers.d.ts +19 -0
- package/lib/custom-css-compilers.js +336 -0
- package/lib/prebuild-w3s.d.ts +4 -0
- package/lib/prebuild-w3s.js +4 -0
- package/lib/prebuild.d.ts +35 -2
- package/lib/prebuild.js +90 -55
- package/lib/returnStatement.js +13 -11
- package/lib/static/customStaticClassNames.js +178 -135
- package/package.json +3 -1
- package/ui-dev/app/index.bk +45 -0
- package/ui-dev/app/index.html +41 -0
- package/ui-dev/app/index.html.css +313 -0
- package/ui-dev/app/index.html.module.css +272 -0
- package/ui-dev/button.html +3 -2
- package/ui-dev/button.html.css +358 -0
- package/ui-dev/button.html.module.css +272 -0
- package/ui-dev/card-section-row-container-box-bk.html +154 -0
- package/ui-dev/card-section-row-container-box-bk.html.css +321 -0
- package/ui-dev/card-section-row-container-box-bk.html.module.css +272 -0
- package/ui-dev/card-section-row-container-box.html +40 -43
- package/ui-dev/card-section-row-container-box.html.css +346 -0
- package/ui-dev/card-section-row-container-box.html.module.css +272 -0
- package/ui-dev/index-preview-one.html +72 -0
- package/ui-dev/index-preview-one.html.css +293 -0
- package/ui-dev/index-preview-one.html.module.css +272 -0
- package/ui-dev/index-test.html +79 -0
- package/ui-dev/index-test.html.css +300 -0
- package/ui-dev/index-test.html.module.css +272 -0
- package/ui-dev/index.html +3 -2
- package/ui-dev/index.html.css +445 -0
- package/ui-dev/index.html.module.css +272 -0
- package/ui-dev/nav-red.html +1 -0
- package/ui-dev/nav-red.html.css +366 -0
- package/ui-dev/nav-red.html.module.css +272 -0
- package/ui-dev/navbar-demo.html +1 -0
- package/ui-dev/navbar-demo.html.css +368 -0
- package/ui-dev/navbar-demo.html.module.css +272 -0
- package/ui-dev/tooltip.html +1 -0
- package/ui-dev/tooltip.html.css +307 -0
- package/ui-dev/tooltip.html.module.css +272 -0
package/aliascss.config.js
CHANGED
|
@@ -2,7 +2,7 @@ import {getCompiler,main} from './lib/index.js'
|
|
|
2
2
|
import { compilers } from './custom-compilers.js';
|
|
3
3
|
import prebuild from './lib/prebuild.js';
|
|
4
4
|
const config={
|
|
5
|
-
input:['
|
|
5
|
+
input:['ui-dev/**/*.html','experiments/**/*.html'],
|
|
6
6
|
output:{
|
|
7
7
|
location:'demo/css/css/style/acss.css',
|
|
8
8
|
"--file":true
|
|
@@ -118,6 +118,11 @@ const config={
|
|
|
118
118
|
},
|
|
119
119
|
prebuild:{
|
|
120
120
|
'colorize-dark':'background:#0f0f0f;color:#e3e3e3',
|
|
121
|
+
'x-clip-menu':'clip-path: polygon(0% 10%,100% 10%,100% 20%,0% 20%,0% 45%,100% 45%,100% 55%,0% 55%,0% 80%,100% 80%,100% 90%,0% 90%);',
|
|
122
|
+
'x-clip-message':'clip-path: polygon(0% 0%,100% 0%,100% 80%,60% 80%,50% 100%,40% 80%,0% 80%);',
|
|
123
|
+
'x-clip-star':'clip-path: polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%);',
|
|
124
|
+
'x-clip-close': 'clip-path: polygon(20% 0%, 0% 20%, 30% 50%, 0% 80%, 20% 100%, 50% 70%, 80% 100%, 100% 80%, 70% 50%, 100% 20%, 80% 0%, 50% 30%)',
|
|
125
|
+
'x-clip-plus': 'clip-path: polygon(40% 0%,60% 0%,60% 40%,100% 40%,100% 60%,60% 60%,60% 100%,40% 100%,40% 60%,0% 60%,0% 40%,40% 40%);',
|
|
121
126
|
'colorize-light':'background:#e3e3e3;color:rgba(0,0,0,0.8)',
|
|
122
127
|
'flex-center':'display:flex;align-items:center;justify-content:center',
|
|
123
128
|
'absolute-center':'position:absolute;top:0;right:0;left:0;bottom:0:margin:auto',
|
|
@@ -125,145 +130,17 @@ const config={
|
|
|
125
130
|
},
|
|
126
131
|
group:{
|
|
127
132
|
...prebuild,
|
|
128
|
-
'card':"w-256px h-120px [class~=shadow]-bxs-0px-12px-24px-rgba-43-43-67-0d16 bgc-fff b-1px-s-gray-lightest br-16px --hover-bgc-primary-lightest --hover-b-1px-s-primary-hover --active[b-1px-s-primary,bgc-primary-light]",
|
|
129
|
-
|
|
130
|
-
'responsive':'xs-w-100p sm-w-540px md-w-720px lg-w-960px xl-w-1140px xxl-w-1320px',
|
|
131
|
-
'responsive-
|
|
132
|
-
'responsive-
|
|
133
|
-
'responsive-
|
|
134
|
-
'responsive-
|
|
135
|
-
'responsive-
|
|
136
|
-
'responsive-fluid':'xs-w-100p sm-w-100p md-w-100p lg-w-100p xl-100p xxl-100p',
|
|
133
|
+
'x-card':"w-256px h-120px [class~=shadow]-bxs-0px-12px-24px-rgba-43-43-67-0d16 bgc-fff b-1px-s-gray-lightest br-16px --hover-bgc-primary-lightest --hover-b-1px-s-primary-hover --active[b-1px-s-primary,bgc-primary-light]",
|
|
134
|
+
'x-responsive':'xs-w-100p sm-w-540px md-w-720px lg-w-960px xl-w-1140px xxl-w-1320px',
|
|
135
|
+
'x-responsive-sm':'xs-w-100p sm-w-540px md-w-720px lg-w-960px xl-w-1140px xxl-w-1320px',
|
|
136
|
+
'x-responsive-md':'xs-w-100p sm-w-100p md-w-720px lg-w-960px xl-w-1140px xxl-w-1320px',
|
|
137
|
+
'x-responsive-lg':'xs-w-100p sm-w-100p md-w-100p lg-w-960px xl-w-1140px xxl-w-1320px',
|
|
138
|
+
'x-responsive-xl':'xs-w-100p sm-w-100p md-w-100p lg-w-100p xl-w-1140px xxl-w-1320px',
|
|
139
|
+
'x-responsive-xll':'xs-w-100p sm-w-100p md-w-100p lg-w-100p xl-w-100p xxl-w-1320px',
|
|
140
|
+
'x-responsive-fluid':'xs-w-100p sm-w-100p md-w-100p lg-w-100p xl-100p xxl-100p',
|
|
137
141
|
},
|
|
138
142
|
statement:`.color{color:red}`,
|
|
139
143
|
ignore:['bgc-red']
|
|
140
144
|
}
|
|
141
145
|
export default config;
|
|
142
146
|
|
|
143
|
-
/* const xconfig= {
|
|
144
|
-
// input glob pattern or array of glob pattern
|
|
145
|
-
input:'public/*.html',
|
|
146
|
-
|
|
147
|
-
// Output css file , file must exist or should be created manully if file doesnot exist
|
|
148
|
-
output:{
|
|
149
|
-
// path to main/master css file which include every compiled css declaration for given input
|
|
150
|
-
location:'./public/css/acss.css',
|
|
151
|
-
"--file":true// output css file for each file
|
|
152
|
-
},
|
|
153
|
-
|
|
154
|
-
//---------------Below this are all optional -------------------------
|
|
155
|
-
// Customize media prefix selector
|
|
156
|
-
media:{
|
|
157
|
-
prefix:{
|
|
158
|
-
xs:'@media (max-width : 600px)'
|
|
159
|
-
}
|
|
160
|
-
},
|
|
161
|
-
// support for css Module
|
|
162
|
-
'--module':true,
|
|
163
|
-
|
|
164
|
-
// import module as i.e import x form 'page.module.css'
|
|
165
|
-
importModuleAs:'x',
|
|
166
|
-
|
|
167
|
-
// uncomment minify is true if you want main css file to be minified by cssnano
|
|
168
|
-
|
|
169
|
-
// minify:true,
|
|
170
|
-
|
|
171
|
-
// name of extractorFunction
|
|
172
|
-
extractorFunction:"x",
|
|
173
|
-
|
|
174
|
-
// prefix aliascss ac-bgc-red ac--hover-color-red
|
|
175
|
-
// prefix:'ac',
|
|
176
|
-
|
|
177
|
-
//Truncate the css file , you should let it true unless you know what your are doing
|
|
178
|
-
truncate:true,
|
|
179
|
-
|
|
180
|
-
//ADD Custom color Value
|
|
181
|
-
custom:{
|
|
182
|
-
colors:{
|
|
183
|
-
//custom name for color value must not have "-" or "_" to work perfectly.
|
|
184
|
-
'main':"rgb(12,23,45)",// now you can use bgc-main
|
|
185
|
-
'theme':'#c6c6c6'
|
|
186
|
-
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
},
|
|
190
|
-
// Create your own compiler
|
|
191
|
-
extend:{
|
|
192
|
-
'font-size':{
|
|
193
|
-
alias:'fs',
|
|
194
|
-
values:["2rem:xl"],
|
|
195
|
-
compiler:(value)=>{
|
|
196
|
-
return value;
|
|
197
|
-
}
|
|
198
|
-
},
|
|
199
|
-
'txt-color':{
|
|
200
|
-
proerty:'color',
|
|
201
|
-
extend:'color' // now you can use txt-color in place color
|
|
202
|
-
},
|
|
203
|
-
|
|
204
|
-
// Now you can use shadow as className property e.g shadow-xs
|
|
205
|
-
'shadow':{
|
|
206
|
-
property:'box-shadow',
|
|
207
|
-
compiler:(value)=>{
|
|
208
|
-
value=value.slice(1);
|
|
209
|
-
const values={
|
|
210
|
-
'3xl': ' 0px 32px 64px -12px var(--shadow-color)',
|
|
211
|
-
'xxxl': ' 0px 32px 64px -12px var(--shadow-color)',
|
|
212
|
-
'2xl': ' 0px 24px 48px -12px var(--shadow-color)',
|
|
213
|
-
'xxl': ' 0px 24px 48px -12px var(--shadow-color)',
|
|
214
|
-
'xl': ' 0px 20px 24px -4px var(--shadow-color)',
|
|
215
|
-
'lg': ' 0px 12px 16px -4px var(--shadow-color)',
|
|
216
|
-
'md': ' 0px 4px 8px -2px var(--shadow-color)',
|
|
217
|
-
'sm': ' 0px 1px 3px var(--shadow-color)',
|
|
218
|
-
'xs': ' 0px 1px 2px var(--shadow-color)',
|
|
219
|
-
};
|
|
220
|
-
if(values.hasOwnProperty(value)) return values[value];
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
}
|
|
224
|
-
},
|
|
225
|
-
// predefine className
|
|
226
|
-
prebuild:{
|
|
227
|
-
//section
|
|
228
|
-
'text-xl': 'font-size:20px;line-height:30px',
|
|
229
|
-
'text-lg': 'font-size:18px;line-height:28px',
|
|
230
|
-
'text-md': 'font-size:16px;line-height:24px',
|
|
231
|
-
'text-sm': 'font-size:14px;line-height:20px',
|
|
232
|
-
'text-xs': 'font-size:12px;line-height:18px',
|
|
233
|
-
|
|
234
|
-
'text-xl': 'font-size:20px;line-height:30px',
|
|
235
|
-
'text-lg': 'font-size:18px;line-height:28px',
|
|
236
|
-
'text-md': 'font-size:16px;line-height:24px',
|
|
237
|
-
'text-sm': 'font-size:14px;line-height:20px',
|
|
238
|
-
'text-xs': 'font-size:12px;line-height:18px',
|
|
239
|
-
|
|
240
|
-
'radius-xs':'border-radius:4px',
|
|
241
|
-
|
|
242
|
-
'flex-center':'display:flex;align-items:center;justify-content:center',
|
|
243
|
-
},
|
|
244
|
-
//Add some css statement in every compiled css file
|
|
245
|
-
statement:`
|
|
246
|
-
:root{
|
|
247
|
-
--bg-dark-color:rgba(111,111,111,1) ;
|
|
248
|
-
--bg-light-color:rgba(21,21,21,1) ;
|
|
249
|
-
--outline-color:blue;
|
|
250
|
-
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
body{
|
|
254
|
-
font-family:BlinkMacSystemFont , -apple-system , "Segoe UI" ;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
`,
|
|
258
|
-
|
|
259
|
-
// pre group valid Aliascss classNames in single className
|
|
260
|
-
group:{
|
|
261
|
-
'container':' df fdc bsbb aic flex-shrink-1 flex-grow-1 ',
|
|
262
|
-
'section':'flex-shrink0 bsbb',
|
|
263
|
-
|
|
264
|
-
},
|
|
265
|
-
// if some of the className collide with other CSS framework like bootstrap and tailwindcss
|
|
266
|
-
// You wanna tell aliascss to ignore it...
|
|
267
|
-
ignore:['fs12px', 'c-red','bgc-red'],// these classnames will be ignored
|
|
268
|
-
}
|
|
269
|
-
*/
|
package/custom-compilers.js
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
import {getCompiler} from './lib/index.js'
|
|
2
2
|
export const compilers={
|
|
3
|
-
|
|
3
|
+
'x-square':{
|
|
4
|
+
type:'group',
|
|
5
|
+
compiler:(value)=>{
|
|
6
|
+
const v=value.replace(/-([\d])/g,'$1');
|
|
7
|
+
return `width:calc(${v} + var(--x-square-grow,0px) - var(--x-square-shrink,0px)); flex-basis:calc(${v} + var(--x-square-grow,0px) - var(--x-square-shrink,0px)); flex-shrink:0;flex-grow:0;height:calc(${v} + var(--x-square-grow,0px) - var(--x-square-shrink,0px))`;
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
'x-circle':{
|
|
11
|
+
type:'group',
|
|
12
|
+
compiler:(value)=>{
|
|
13
|
+
const v=value.replace(/-([\d])/g,'$1');
|
|
14
|
+
return `width:calc(${v} + var(--x-circle-grow,0px) - var(--x-circle-shrink,0px)); height:calc(${v} + var(--x-circle-grow,0px) - var(--x-circle-shrink,0px)); border-radius:50%;`;
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
'x-box':{
|
|
4
18
|
type:'group',
|
|
5
19
|
compiler:(value)=>{
|
|
6
20
|
const property=['width','height','padding','margin'];
|