aliascss 1.2.4 → 1.2.5

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/lib/prebuild.js CHANGED
@@ -190,37 +190,37 @@ export default {
190
190
  [transform-tx-100p,r0,t0,zi-1]--as-x-screen-right `
191
191
  },
192
192
  // Box-and-button
193
- 'x-section': {
194
- type: 'statement',
195
- statement: `w--x-section-width:100p p--x-section-padding:20px [class~=x-section-spacious]--x-section-padding:80px height--x-section-height:auto`,
196
- },
197
- 'x-container': {
198
- type: 'statement',
199
- statement: `width-100p mla mra pl--x-container-padding:15px pl--x-container-padding:15px bsbb xw--x-container-width:initial
200
- [class~=x-container-fluid][--x-container-width:100%,m-0-auto]
201
- [class~=x-container-narrow][--x-container-width:800px]`,
202
- },
203
- 'x-row': {
204
- type: 'statement',
205
- statement: `df fww g-16px m--8px __all-margin-8px i__all-flex-1 [class~=x-row-no-wrap]-fwn [class~=x-row-center]-jcc`,
206
- },
207
- 'x-col': {
208
- type: 'statement',
209
- statement: `df fww g-16px m--8px __all-margin-8px i__all-flex-1 [class~=x-col-no-wrap]-fwn [class~=x-col-center]-jcc
210
- [class~=x-col-full][flex-grow:1]`,
211
- },
212
- 'x-box': {
213
- type: 'statement',
214
- statement: `bgc--x-box-bg:ffffff p--x-box-padding:16px br--x-box-border-radius:8px border--x-box-border:1px-solid-e0e0e0
215
- [class~=x-box-shadow]-bxs-0px-2px-8px-0000000000d1`,
216
- },
217
- 'x-card': {
218
- type: 'statement',
219
- statement: `bgc--x-card-bg:ffffff padding--x-card-padding:24px br--x-card-border-radius:12px bxs--x-card-shadow:0px-4px-12px-0000000000d1
220
- [class~=x-card-interactive][--hover-transform-translateY--4px,--hover-bxs-0-8px-24px-0000000000d15]
221
- transition-transform-0.3s-ease__box-shadow-0.3s-ease
222
- [class~=x-card-dark][--x-card-bg:1a1a1a,--x-card-shadow:0px-4px-12px-0000000000d3,color--x-card-color:ffffff]`,
223
- },
193
+ // 'x-section':{
194
+ // type:'statement',
195
+ // statement:`w--x-section-width:100p p--x-section-padding:20px [class~=x-section-spacious]--x-section-padding:80px height--x-section-height:auto`,
196
+ // },
197
+ // 'x-container':{
198
+ // type:'statement',
199
+ // statement:`width-100p mla mra pl--x-container-padding:15px pl--x-container-padding:15px bsbb xw--x-container-width:initial
200
+ // [class~=x-container-fluid][--x-container-width:100%,m-0-auto]
201
+ // [class~=x-container-narrow][--x-container-width:800px]`,
202
+ // },
203
+ // 'x-row':{
204
+ // type:'statement',
205
+ // statement:`df fww g-16px m--8px __all-margin-8px i__all-flex-1 [class~=x-row-no-wrap]-fwn [class~=x-row-center]-jcc`,
206
+ // },
207
+ // 'x-col':{
208
+ // type:'statement',
209
+ // statement:`df fww g-16px m--8px __all-margin-8px i__all-flex-1 [class~=x-col-no-wrap]-fwn [class~=x-col-center]-jcc
210
+ // [class~=x-col-full][flex-grow:1]`,
211
+ // },
212
+ // 'x-box':{
213
+ // type:'statement',
214
+ // statement:`bgc--x-box-bg:ffffff p--x-box-padding:16px br--x-box-border-radius:8px border--x-box-border:1px-solid-e0e0e0
215
+ // [class~=x-box-shadow]-bxs-0px-2px-8px-0000000000d1`,
216
+ // },
217
+ // 'x-card':{
218
+ // type:'statement',
219
+ // statement:`bgc--x-card-bg:ffffff padding--x-card-padding:24px br--x-card-border-radius:12px bxs--x-card-shadow:0px-4px-12px-0000000000d1
220
+ // [class~=x-card-interactive][--hover-transform-translateY--4px,--hover-bxs-0-8px-24px-0000000000d15]
221
+ // transition-transform-0.3s-ease__box-shadow-0.3s-ease
222
+ // [class~=x-card-dark][--x-card-bg:1a1a1a,--x-card-shadow:0px-4px-12px-0000000000d3,color--x-card-color:ffffff]`,
223
+ // },
224
224
  'x-divider-text': {
225
225
  type: 'statement',
226
226
  statement: `[df,aic,g12px]
@@ -236,36 +236,41 @@ export default {
236
236
  },
237
237
  'x-button': {
238
238
  type: 'statement',
239
- statement: `dib aic jcc cp tdn tn-all-0d3s
240
- c--x-button-color:ffffff
241
- p--x-button-padding:8px-16px
242
- fs--x-button-font-size:16px
243
- br--x-button-border-radius:4px
244
- b--x-button-border:2px-solid--border-color
245
- --x-button-border-color:transparent
246
- bg--x-button-bg:gray-600
247
- --hover-opacity-0d9
248
- --hover-transform-translateY--1px
249
- --active-transform-translateY-0px
250
-
251
- [class~=x-button-primary][--x-button-bg:primary600,--x-button-soft-bg:primary100,--x-button-color:ffffff]
252
- [class~=x-button-success][--x-button-bg:success600,--x-button-soft-bg:success100,--x-button-color:ffffff]
253
- [class~=x-button-error][--x-button-bg:error600,--x-button-soft-bg:error100,--x-button-color:ffffff]
254
- [class~=x-button-warning][--x-button-bg:warning600,--x-button-soft-bg:warning100,--x-button-color:ffffff]
255
-
256
- [disabled]-bg-cccccc
257
- [disabled]-color-666666
258
- [disabled]-opacity-0.7
259
- [disabled]-cursor-not-allowed
260
-
261
- [class~=x-button-sm][--x-button-padding:6px-12px,--x-button-font-size:14px]
262
- [class~=x-button-lg][--x-button-padding:12px-24px,--x-button-font-size:18px]
263
- [class~=x-button-outline][bg-transparent,--x-button-color:--x-button-bg:gray-600,--border-color:--x-button-color,--hover-bg--x-button-color:gray-600,--hover-color-ffffff]
264
- [class~=x-button-text][bgc-transparent,--x-button-border:none,--hover-bg--x-button-soft-bg:gray100,--x-button-color:--x-button-bg:gray600,--x-button-padding:4px-8px]`,
239
+ statement: `@base-all-unset @base[-bsbb,usn,dif,aic,jcc,fw5,--ring-width:2px,tac,flex-shrink-0]
240
+ @base-[class~=x-button-size-xs][br-4px,p-0px-8px,fs-12px,h-24px,lh-16px,g-4px]
241
+ @base-[class~=x-button-size-sm][br-4px,p-0px-12px,fs-14px,h-32px,lh-20px,g-8px]
242
+ @base-[br-4px,p-0px-15px,fs-15px,lh-1,fw5,h-35px]
243
+ @base-[class~=x-button-size-md][br-4px,p-0px-15px,fs-15px,lh-1,fw5,h-35px]
244
+ @base-[class~=x-button-size-lg][br-6px,p-0px-16px,fs-16px,h-40px,lh-24px,g-12px]
245
+ @base-[class~=x-button-size-xl][br-6px,p-0px-24px,fs-18px,h-48px,lh-26px,g-14px]
246
+ [disabled][pen,bgc-gray-300,c-gray-400]
247
+ @base-[bgc-gray-600,c-gray-50,--ho-bgc-gray-700,--fo-ring-gray-300]
248
+ @base-[class~=x-button-success][bgc-success-600,c-success-100,--ho-bgc-success-700,--fo-ring-success-300]
249
+ @base-[class~=x-button-error][bgc-error-600,c-error-100,--ho-bgc-error-700,--fo-ring-error-300]
250
+ @base-[class~=x-button-warning][bgc-warning-600,c-warning-100,--ho-bgc-warning-700,--fo-ring-warning-300]
251
+ @base-[class~=x-button-primary][bgc-primary-600,c-primary-100,--ho-bgc-primary-700,--fo-ring-primary-300]
252
+ `
253
+ },
254
+ 'x-input': {
255
+ type: 'statement',
256
+ statement: `@base-all-unset @base-[bsbb,w-100p,df,aic,jcfs,fw4,--ring-width:1px,flex-1-0-auto]
257
+ @base-[br-6px,p-0px-14px,fs-16px,h-40px,lh-24px,g-12px]
258
+ @base-[class~=x-input-size-sm][br-4px,p-0px-10px,fs-15px,h-35px,lh-1,g-8px]
259
+ @base-[class~=x-input-size-xs][br-4px,p-0px-8px,fs-12px,h-26px,lh-1,g-4px]
260
+ @base-[class~=x-input-size-md][br-6px,p-0px-14px,fs-16px,h-40px,lh-24px,g-12px]
261
+ @base-[class~=x-input-size-lg][br-6px,p-0px-18px,fs-18px,h-48px,lh-26px,g-14px]
262
+ [disabled][pen,bgc-gray-300,c-gray-400,bn]
263
+ @base-[b-1px-s-gray-400,c-gray-600,--ho-c-gray-700,--fo-ring-gray-200]
264
+ @base-[class~=x-input-size-md][b-1px-s-gray-400,c-gray-600,--ho-c-gray-700,--fo-ring-gray-200]
265
+
266
+ @base-[class~=x-input-success][b-1px-s-success-600,--fo-ring-success-200]
267
+ @base-[class~=x-input-error][b-1px-s-error-600,--fo-ring-error-200]
268
+ @base-[class~=x-input-warning][b-1px-s-warning-600,--fo-ring-warning-200]
269
+ @base-[class~=x-input-primary][b-1px-s-primary-600,--fo-ring-primary-200] `
265
270
  },
266
271
  'x-arrow': {
267
272
  type: 'statement',
268
- statement: `[bss,bc--x-arrow-color:black,bw-0px-3px-3px-0,dib,p-3px] [class~=x-arrow-left]-tf-r-135deg [class~=x-arrow-up]-tf-r--135deg [class~=x-arrow-right]-tf-r--45deg [class~=x-arrow-down]-tf-r-45deg`,
273
+ statement: `[bss,bc--x-arrow-color:black,brw--x-arrow-width:3px,bbw--x-arrow-width:3px,dib,p-3px] [class~=x-arrow-left]-tf-r-135deg [class~=x-arrow-up]-tf-r--135deg [class~=x-arrow-right]-tf-r--45deg [class~=x-arrow-down]-tf-r-45deg`,
269
274
  },
270
275
  // CSS entities
271
276
  'x-currency-dollar': { type: 'statement', statement: '--bf-cont_0024'
@@ -278,57 +283,11 @@ export default {
278
283
  },
279
284
  'x-currency-yen': { type: 'statement', statement: '--bf-cont_00A5'
280
285
  },
281
- 'x-currency-latin-f': { type: 'statement', statement: '--bf-cont_0192' /* Florin */
282
- },
283
- 'x-currency-armenian-dram': { type: 'statement', statement: '--bf-cont_058F'
284
- },
285
- 'x-currency-afghani': { type: 'statement', statement: '--bf-cont_060B'
286
- },
287
- 'x-currency-bengali-mark': { type: 'statement', statement: '--bf-cont_09F2'
288
- },
289
- 'x-currency-bengali-sign': { type: 'statement', statement: '--bf-cont_09F3'
290
- },
291
- 'x-currency-gujarati-sign': { type: 'statement', statement: '--bf-cont_0AF1'
292
- },
293
- 'x-currency-tamil-sign': { type: 'statement', statement: '--bf-cont_0BF9'
294
- },
295
- 'x-currency-thai-baht': { type: 'statement', statement: '--bf-cont_0E3F'
296
- },
297
- 'x-currency-khmer-riel': { type: 'statement', statement: '--bf-cont_17DB',
298
- },
299
- 'x-currency-rial': { type: 'statement', statement: '--bf-cont_FDFC'
300
- },
301
- 'x-currency-wancho-ngun': { type: 'statement', statement: '--bf-cont_1E2FF',
302
- },
303
286
  'x-currency-euro-currency': { type: 'statement', statement: '--bf-cont_20A0', /* Historical ECU */
304
287
  },
305
288
  'x-currency-euro': { type: 'statement', statement: '--bf-cont_20AC',
306
289
  },
307
- 'x-currency-franc': { type: 'statement', statement: '--bf-cont_20A3',
308
- },
309
- 'x-currency-lira': { type: 'statement', statement: '--bf-cont_20A4',
310
- },
311
- 'x-currency-naira': { type: 'statement', statement: '--bf-cont_20A6',
312
- },
313
- 'x-currency-rupee': { type: 'statement', statement: '--bf-cont_20B9',
314
- },
315
- 'x-currency-peso': { type: 'statement', statement: '--bf-cont_20B1',
316
- },
317
- 'x-currency-shekel': { type: 'statement', statement: '--bf-cont_20AA',
318
- },
319
- 'x-currency-won': { type: 'statement', statement: '--bf-cont_20A9',
320
- },
321
- 'x-currency-tugrik': { type: 'statement', statement: '--bf-cont_20AE',
322
- },
323
- 'x-currency-drachma': { type: 'statement', statement: '--bf-cont_20AF',
324
- },
325
- 'x-currency-kip': { type: 'statement', statement: '--bf-cont_20AD',
326
- },
327
- 'x-currency-guarani': { type: 'statement', statement: '--bf-cont_20B2',
328
- },
329
- 'x-currency-hryvnia': { type: 'statement', statement: '--bf-cont_20B4',
330
- },
331
- 'x-currency-cedi': { type: 'statement', statement: '--bf-cont_20B5', },
290
+ 'x-currency-rupee': { type: 'statement', statement: '--bf-cont_20B9', },
332
291
  'x-symbol-copy-right': { type: 'statement', statement: '--bf-cont_00A9', },
333
292
  'x-symbol-registered': { type: 'statement', statement: '--bf-cont_00AE', },
334
293
  'x-symbol-divide': { type: 'statement', statement: '--bf-cont_00Ff7', },
@@ -344,7 +303,7 @@ export default {
344
303
  'x-menu': {
345
304
  type: 'statement',
346
305
  statement: `pr x-menu-rounded cp
347
- w-35px h-30px bg-lg-transparent_0px_12d5px-currentColor_12d5px_17d5px-transparent_17d5px_35px
306
+ w-35px h-30px bg-lg-transparent_0px_12d5px-currentColor_12d5px_17d5px-transparent_17d5px_35px
348
307
  tn-all-0d5s [class~=x-menu-open]-bg-none
349
308
  [x-menu-open]-bg-none
350
309
  --af[pa,t0,h-5px,w-35px,bgc-currentColor,cont]
@@ -428,20 +387,14 @@ export default {
428
387
  [background-color-warning-600,dark-background-color-warning-600]--as-bg-warning-solid
429
388
  [background-color-success-100,dark-background-color-success-600]--as-bg-success-primary
430
389
  [background-color-success-600,dark-background-color-success-600]--as-bg-success-solid
431
-
432
-
433
-
434
-
435
-
436
-
437
390
  `,
438
391
  },
439
392
  'x-acss-vars-dark': {
440
393
  type: 'statement',
441
394
  statement: `
442
- --text-primary:--gray-50
443
- --text-secondary:--gray-200
444
- --text-disabled:--gray-400
445
- `,
395
+ --text-primary:--gray-50
396
+ --text-secondary:--gray-200
397
+ --text-disabled:--gray-400
398
+ `,
446
399
  },
447
400
  };
@@ -3,7 +3,16 @@ const media = {
3
3
  test: new RegExp("^(" + "print|xs|sm|md|lg|xl|xxl|-xs|-sm|-md|-lg|-xl|-xxl|-2xl" + ")(?=[-|_])"),
4
4
  target: {
5
5
  print: '@media print',
6
+ '@hover': '@media screen and (hover: hover)',
6
7
  '@print': '@media print',
8
+ '@landscape': '@media (orientation: landscape)',
9
+ '@portrait': '@media (orientation: portrait)',
10
+ '@container-xs': '@container (max-width : 576px)',
11
+ '@container-sm': '@container (min-width : 576px)',
12
+ '@container-md': '@container (min-width : 768px)',
13
+ '@container-lg': '@container (min-width : 992px)',
14
+ '@container-xl': '@container (min-width : 1200px)',
15
+ '@container-2xl': '@container (min-width : 1408px)',
7
16
  xs: '@media (max-width : 576px)',
8
17
  '@xs': '@media (max-width : 576px)',
9
18
  sm: '@media (min-width : 576px)',
@@ -14,8 +23,8 @@ const media = {
14
23
  '@lg': '@media (min-width : 992px)',
15
24
  xl: '@media (min-width : 1200px)',
16
25
  '@xl': '@media (min-width : 1200px)',
17
- xxl: '@media (min-width : 1408px)',
18
- '@xxl': '@media (min-width : 1408px)',
26
+ // xxl: '@media (min-width : 1408px)',
27
+ '@2xl': '@media (min-width : 1408px)',
19
28
  '2xl': '@media (min-width : 1408px)',
20
29
  '-xs': '@media (min-width : 576px)',
21
30
  '-@xs': '@media (min-width : 576px)',
@@ -27,8 +36,8 @@ const media = {
27
36
  '-lg': '@media (max-width : 992px)',
28
37
  '-@xl': '@media (max-width : 1200px)',
29
38
  '-xl': '@media (max-width : 1200px)',
30
- '-@xxl': '@media (max-width : 1408px)',
31
- '-xxl': '@media (max-width : 1408px)',
39
+ // '-@xxl': '@media (max-width : 1408px)',
40
+ // '-xxl': '@media (max-width : 1408px)',
32
41
  '-@2xl': '@media (max-width : 1408px)',
33
42
  '-2xl': '@media (max-width : 1408px)',
34
43
  'dark': '@media (prefers-color-scheme: dark)',
@@ -108,8 +108,8 @@ bool = false) {
108
108
  }
109
109
  const valuePortion = className.replace(propertyKey, '');
110
110
  // case 3: calc function
111
- if (/^--calc\(/.test(valuePortion)) {
112
- return bool ? [prop, valuePortion.replace(/^--/, '').replace(/([-+/*])([\d]|var\(|calc\()/g, ' $1 $2')] : prop + ":" + valuePortion.replace(/^--/, '').replace(/([-+/*])([\d]|var\(|calc\()/g, ' $1 $2');
111
+ if (/^-calc\(/.test(valuePortion)) {
112
+ return bool ? [prop, valuePortion.replace(/^-/, '').replace(/([-+/*])([\d]|var\(|calc\()/g, ' $1 $2')] : prop + ":" + valuePortion.replace(/^-/, '').replace(/([-+/*])([\d]|var\(|calc\()/g, ' $1 $2');
113
113
  }
114
114
  // case 4: CSS variable without --var keyword
115
115
  if (/^--[a-zA-Z]/.test(valuePortion)) {
@@ -3,6 +3,7 @@ import { customStaticClassNames } from "./static/customStaticClassNames.js";
3
3
  import media, { createRegexForMedia } from "./prefix/responsive.js";
4
4
  import { customColors } from './static/customColors.js';
5
5
  import { customColors as customColors2 } from './static/customColors2.js';
6
+ import { customColorsRadix } from './static/customColorsRadix.js';
6
7
  import extractPrefix from './prefix/extractPrefix.js';
7
8
  import extractMediaPrefix from './prefix/extractMediaPrefix.js';
8
9
  import { createCompilerObj, extractProperty } from "./utils/createCompilerObj.js";
@@ -17,7 +18,7 @@ const [staticClassNamesWithAlias, cssPropsWithAlias] = createCompilerObj(cssProp
17
18
  export const compiler = {
18
19
  // cache will cache propertyAndValue
19
20
  cache: { propertyAndValue: Object.assign({}, customStaticClassNames) },
20
- custom: Object.assign({ colors: Object.assign(Object.assign({}, customColors), customColors2) }),
21
+ custom: Object.assign({ colors: Object.assign(Object.assign(Object.assign({}, customColors), customColors2), customColorsRadix) }),
21
22
  mediaSelector: Object.assign({}, media.target),
22
23
  mediaTest: null,
23
24
  staticClassNames: Object.assign(Object.assign({}, staticClassNamesAlias), staticClassNamesWithAlias),