aliascss 1.3.5 → 1.3.7

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.
@@ -2,7 +2,9 @@ import getPropertyAndValue from "./returnPropertyAndValue.js";
2
2
  import { customStaticClassNames } from "./static/customStaticClassNames.js";
3
3
  import media, { createRegexForMedia } from "./prefix/responsive.js";
4
4
  import { customColors } from './static/customColors.js';
5
- import { customColorsRadix } from './static/customColorsRadix.js';
5
+ import { customColorsRa } from './static/customColorsRA.js';
6
+ // import {customColors as customColors2} from './static/customColors2.js'
7
+ import { customColorsRadixUi } from './static/customColorsRadix.js';
6
8
  import extractPrefix from './prefix/extractPrefix.js';
7
9
  import extractMediaPrefix from './prefix/extractMediaPrefix.js';
8
10
  import { createCompilerObj, extractProperty } from "./utils/createCompilerObj.js";
@@ -18,7 +20,7 @@ export const compiler = {
18
20
  // cache will cache propertyAndValue
19
21
  cache: { propertyAndValue: Object.assign({}, customStaticClassNames) },
20
22
  // custom:{...{colors:{...customColors,...customColors2,...customColorsRadix}}},
21
- custom: Object.assign({ colors: Object.assign(Object.assign({}, customColors), customColorsRadix) }),
23
+ custom: Object.assign({ colors: Object.assign(Object.assign(Object.assign({}, customColors), customColorsRadixUi), customColorsRa) }),
22
24
  mediaSelector: Object.assign({}, media.target),
23
25
  mediaTest: null,
24
26
  staticClassNames: Object.assign(Object.assign({}, staticClassNamesAlias), staticClassNamesWithAlias),
@@ -0,0 +1,3 @@
1
+ export declare const customColorsRa: {
2
+ [key: string]: string;
3
+ };
@@ -0,0 +1,82 @@
1
+ const colorBase = {
2
+ 'brandRA': 'var(--brandColor,oklch(1 .25049 284.23))',
3
+ 'grayRA': 'var(--grayColor,oklch(0.5 0 0))',
4
+ 'redRA': 'var(--redColor,oklch(0.6 .181447 27.0726))',
5
+ 'orangeRA': 'var(--orangeColor,oklch(0.7 .150492 54))',
6
+ 'yellowRA': 'var(--yellowColor,oklch(0.8 .128516 73.8032))',
7
+ 'turquoiseRA': 'var(--turquoiseColor,oklch(0.5 .081146 205.114))',
8
+ 'cyanRA': 'var(--cyanColor,oklch(0.4 .142107 243.926))',
9
+ 'greenRA': 'var(--greenColor,oklch(0.5 .121276 155.372))',
10
+ 'blueRA': 'var(--blueColor,oklch(0.5 .22049 266.315))',
11
+ 'indigoRA': 'var(--indigoColor,oklch(1 .25049 284.23))',
12
+ 'purpleRA': 'var(--purpleColor,oklch(0.7 .223324 302))',
13
+ 'pinkRA': 'var(--pinkColor,oklch(0.6 .177717 347.813))'
14
+ };
15
+ const chroma = {
16
+ /* lower chroma at low lightness levels */
17
+ '100': 'calc(l * c * 0.5)',
18
+ '200': 'calc(l * c * 0.6)',
19
+ '300': 'calc(l * c * 0.7)',
20
+ '400': 'calc(l * c * 0.8)',
21
+ '500': 'calc(l * c * 0.9)',
22
+ '600': 'c',
23
+ '700': 'c',
24
+ '800': 'c',
25
+ '900': 'c',
26
+ '1000': 'c',
27
+ '1100': 'c',
28
+ '1200': 'c',
29
+ '1300': 'c',
30
+ '1400': 'c',
31
+ '1500': 'c',
32
+ '1600': 'c',
33
+ };
34
+ const lightness = {
35
+ '100': '98.1187%',
36
+ '200': '95.2045%',
37
+ '300': '91.1434%',
38
+ '400': '85.1751%',
39
+ '500': '79.1773%',
40
+ '600': '72.3297%',
41
+ '700': '67.0121%',
42
+ '800': '62.3039%',
43
+ '900': '57.9699%',
44
+ '1000': '51.9076%',
45
+ '1100': '46.9058%',
46
+ '1200': '41.0821%',
47
+ '1300': '35.3616%',
48
+ '1400': '29.6725%',
49
+ '1500': '24.5366%',
50
+ '1600': '16.6959%',
51
+ };
52
+ const lightnessDark = {
53
+ '100': '29.6725%',
54
+ '200': '35.3616%',
55
+ '300': '41.0821%',
56
+ '400': '46.9058%',
57
+ '500': '51.9076%',
58
+ '600': '57.9699%',
59
+ '700': '56.1347%',
60
+ '800': '59.2866%',
61
+ '900': '62.3039%',
62
+ '1000': '67.0121%',
63
+ '1100': '72.3297%',
64
+ '1200': '79.1773%',
65
+ '1300': '85.1751%',
66
+ '1400': '91.1434%',
67
+ '1500': '95.2045%',
68
+ '1600': '100%',
69
+ };
70
+ const colors = () => {
71
+ const collection = {};
72
+ const scales = ['100', '200', '300', '400', '500', '600', '700', '800', '900', '1000', '1100', '1200', '1300', '1400', '1500', '1600'];
73
+ for (const [color, value] of Object.entries(colorBase)) {
74
+ for (const scale of scales) {
75
+ collection[`${color}${scale}`] = `oklch(from ${value} ${lightness[scale]} ${chroma[scale]} h)`;
76
+ collection[`${color}Dark${scale}`] = `oklch(from ${value} ${lightnessDark[scale]} ${chroma[scale]} h)`;
77
+ collection[`${color}Theme${scale}`] = `light-dark(oklch(from ${value} ${lightness[scale]} ${chroma[scale]} h),oklch(from ${value} ${lightnessDark[scale]} ${chroma[scale]} h))`;
78
+ }
79
+ }
80
+ return collection;
81
+ };
82
+ export const customColorsRa = colors();