aliascss 1.3.0 → 1.3.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/dist/aliascss.js +1 -1
- package/docc.md +259 -0
- package/docs/PseudoSelector.js +141 -0
- package/docs/colors-tokens.js +3771 -0
- package/docs/mediaSelector.js +49 -0
- package/docs/staticClassNames.js +15731 -0
- package/docs/utilitiesClassName.js +204 -0
- package/lib/compilers/color.js +22 -4
- package/lib/css-properties-all.js +7 -1
- package/lib/prefix/PseudoPrefix-old.d.ts +7 -0
- package/lib/prefix/PseudoPrefix-old.js +145 -0
- package/lib/prefix/PseudoPrefixNew.js +4 -0
- package/lib/prefix/pseudoSelector.js +1 -1
- package/lib/returnPropertyAndValue.js +1 -1
- package/lib/returnStatement.js +3 -0
- package/lib/static/customColorsRadix.js +1 -1
- package/lib/static/customStaticClassNames.js +8 -8
- package/lib/utils/helper.d.ts +7 -0
- package/lib/utils/helper.js +35 -0
- package/package.json +1 -1
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
export const customStaticClassNames = {
|
|
2
|
+
// ----------------------Border-Radius
|
|
3
|
+
'x-lorem': `content:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."`,
|
|
4
|
+
'x-lorem-2': `content:"Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?"`,
|
|
5
|
+
'x-lorem-3': `content:"At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat."`,
|
|
6
|
+
'x-lorem-4': `content:"The quick brown fox jumps over the lazy dog"`,
|
|
7
|
+
"x-radius-none": 'border-radius:var(--x-radius-none,0px)',
|
|
8
|
+
"x-radius-xxs": 'border-radius:var(--x-radius-xxs,2px)',
|
|
9
|
+
"x-radius-xs": 'border-radius:var(--x-radius-xs,4px)',
|
|
10
|
+
"x-radius-sm": 'border-radius:var(--x-radius-sm,6px)',
|
|
11
|
+
"x-radius-md": 'border-radius:var(--x-radius-md,8px)',
|
|
12
|
+
"x-radius-lg": 'border-radius:var(--x-radius-lg,10px)',
|
|
13
|
+
"x-radius-xl": 'border-radius:var(--x-radius-xl,12px)',
|
|
14
|
+
"x-radius-2xl": 'border-radius:var(--x-radius-2xl,16px)',
|
|
15
|
+
"x-radius-3xl": 'border-radius:var(--x-radius-3xl,20px)',
|
|
16
|
+
"x-radius-4xl": 'border-radius:var(--x-radius-4xl,24px)',
|
|
17
|
+
"x-radius-full": 'border-radius:var(--x-radius-full,9999px)',
|
|
18
|
+
// -------- end
|
|
19
|
+
// --Padding/Spacing
|
|
20
|
+
"x-padding-none": 'padding:var(--x-padding-none,0px)',
|
|
21
|
+
"x-padding-xxs": 'padding:var(--x-padding-xxs,2px)',
|
|
22
|
+
"x-padding-xs": 'padding:var(--x-padding-xs,4px)',
|
|
23
|
+
"x-padding-sm": 'padding:var(--x-padding-sm,6px)',
|
|
24
|
+
"x-padding-md": 'padding:var(--x-padding-md,8px)',
|
|
25
|
+
"x-padding-lg": 'padding:var(--x-padding-lg,12px)',
|
|
26
|
+
"x-padding-xl": 'padding:var(--x-padding-xl,16px)',
|
|
27
|
+
"x-padding-2xl": 'padding:var(--x-padding-2xl,20px)',
|
|
28
|
+
"x-padding-3xl": 'padding:var(--x-padding-3xl,24px)',
|
|
29
|
+
"x-padding-4xl": 'padding:var(--x-padding-4xl,32px)',
|
|
30
|
+
"x-padding-5xl": 'padding:var(--x-padding-5xl,40px)',
|
|
31
|
+
"x-padding-6xl": 'padding:var(--x-padding-6xl,48px)',
|
|
32
|
+
"x-padding-7xl": 'padding:var(--x-padding-7xl,64px)',
|
|
33
|
+
"x-padding-8xl": 'padding:var(--x-padding-8xl,80px)',
|
|
34
|
+
"x-padding-9xl": 'padding:var(--x-padding-9xl,96px)',
|
|
35
|
+
"x-padding-10xl": 'padding:var(--x-padding-10xl,128px)',
|
|
36
|
+
"x-padding-11xl": 'padding:var(--x-padding-11xl,160px)',
|
|
37
|
+
"x-padding-mobile": 'padding:var(--x-padding-mobile,16px)',
|
|
38
|
+
"x-container-padding-mobile": 'padding:var(--x-container-padding-mobile,16px)',
|
|
39
|
+
"x-padding-desktop": 'padding:var(--x-padding-desktop,32px)',
|
|
40
|
+
"x-container-padding-desktop": 'padding:var(--x-container-padding-desktop,32px)',
|
|
41
|
+
"x-spacing-none": 'padding:var(--x-spacing-none,0px)',
|
|
42
|
+
"x-spacing-xxs": 'padding:var(--x-spacing-xxs,2px)',
|
|
43
|
+
"x-spacing-xs": 'padding:var(--x-spacing-xs,4px)',
|
|
44
|
+
"x-spacing-sm": 'padding:var(--x-spacing-sm,6px)',
|
|
45
|
+
"x-spacing-md": 'padding:var(--x-spacing-md,8px)',
|
|
46
|
+
"x-spacing-lg": 'padding:var(--x-spacing-lg,12px)',
|
|
47
|
+
"x-spacing-xl": 'padding:var(--x-spacing-xl,16px)',
|
|
48
|
+
"x-spacing-2xl": 'padding:var(--x-spacing-2xl,20px)',
|
|
49
|
+
"x-spacing-3xl": 'padding:var(--x-spacing-3xl,24px)',
|
|
50
|
+
"x-spacing-4xl": 'padding:var(--x-spacing-4xl,32px)',
|
|
51
|
+
"x-spacing-5xl": 'padding:var(--x-spacing-5xl,40px)',
|
|
52
|
+
"x-spacing-6xl": 'padding:var(--x-spacing-6xl,48px)',
|
|
53
|
+
"x-spacing-7xl": 'padding:var(--x-spacing-7xl,64px)',
|
|
54
|
+
"x-spacing-8xl": 'padding:var(--x-spacing-8xl,80px)',
|
|
55
|
+
"x-spacing-9xl": 'padding:var(--x-spacing-9xl,96px)',
|
|
56
|
+
"x-spacing-10xl": 'padding:var(--x-spacing-10xl,128px)',
|
|
57
|
+
"x-spacing-11xl": 'padding:var(--x-spacing-11xl,160px)',
|
|
58
|
+
// ---Width
|
|
59
|
+
"x-width-xxs": 'width:var(--x-width-xxs,320px)',
|
|
60
|
+
"x-width-xs": 'width:var(--x-width-xs,384px)',
|
|
61
|
+
"x-width-sm": 'width:var(--x-width-sm,480px)',
|
|
62
|
+
"x-width-md": 'width:var(--x-width-md,560px)',
|
|
63
|
+
"x-width-lg": 'width:var(--x-width-lg,640px)',
|
|
64
|
+
"x-width-xl": 'width:var(--x-width-xl,768px)',
|
|
65
|
+
"x-width-2xl": 'width:var(--x-width-2xl,1024px)',
|
|
66
|
+
"x-width-3xl": 'width:var(--x-width-3xl,1280px)',
|
|
67
|
+
"x-width-4xl": 'width:var(--x-width-4xl,1440px)',
|
|
68
|
+
"x-width-5xl": 'width:var(--x-width-5xl,1600px)',
|
|
69
|
+
"x-width-6xl": 'width:var(--x-width-6xl,1920px)',
|
|
70
|
+
"x-max-width-desktop": 'max-width:var(--x-max-width-desktop,1280px)',
|
|
71
|
+
"x-desktop-width-desktop": 'width:var(--x-desktop-width-desktop,1280px)',
|
|
72
|
+
"x-width-tablet": 'width:var(--x-width-tablet,768px)',
|
|
73
|
+
"x-max-width-tablet": 'max-width:var(--x-max-width-tablet,768px)',
|
|
74
|
+
"x-width-mobile": 'width:var(--x-width-mobile,375px)',
|
|
75
|
+
"x-max-width-mobile": 'max-width:var(--x-max-width-mobile,375px)',
|
|
76
|
+
"x-container-max-width-desktop": 'max-width:var(--x-container-max-width-desktop,1280px)',
|
|
77
|
+
"x-paragraph-max-width": 'max-width:var(--x-paragraph-max-width,720px)',
|
|
78
|
+
// ---old
|
|
79
|
+
'x-flex-center': 'display:flex; justify-content:center;align-items:center',
|
|
80
|
+
'x-inline-flex-center': 'display:inline-flex; justify-content:center;align-items:center',
|
|
81
|
+
'x-grid-center': 'display:grid; justify-content:center;align-content:center',
|
|
82
|
+
'x-inline-grid-center': 'display:inline-grid; justify-content:center;align-content:center',
|
|
83
|
+
'x-absolute-center': "position:absolute;margin:auto;top:0;left:0;right:0;bottom:0;",
|
|
84
|
+
'x-fixed-center': "position:fixed;margin:auto;top:0;left:0;right:0;bottom:0;",
|
|
85
|
+
'x-sr-only': 'position:absolute;overflow:hidden;clip-path:rect(0 0 0 0);height:1px;width:1px;margin:-1px;padding:0;border:0',
|
|
86
|
+
'x-display-2xl': 'font-size:72px ; line-height:90px ; letter-spacing:-0.02em',
|
|
87
|
+
// 'x-display-xxl': 'font-size:72px ; line-height:90px ; letter-spacing:-0.02em',
|
|
88
|
+
'x-display-xl': 'font-size: 60px; line-height: 72px; letter-spacing:-0.02em',
|
|
89
|
+
'x-display-lg': 'font-size:48px ; line-height: 60px; letter-spacing:-0.02em',
|
|
90
|
+
'x-display-md': 'font-size: 36px; line-height: 44px; letter-spacing:-0.02em',
|
|
91
|
+
'x-display-sm': 'font-size: 30px; line-height: 38px',
|
|
92
|
+
'x-display-xs': 'font-size: 24px; line-height: 32px',
|
|
93
|
+
'x-heading-2xl': 'font-size:72px ; line-height:90px ; letter-spacing:-0.02em',
|
|
94
|
+
// 'x-heading-xxl': 'font-size:72px ; line-height:90px ; letter-spacing:-0.02em',
|
|
95
|
+
'x-heading-xl': 'font-size: 60px; line-height: 72px; letter-spacing:-0.02em',
|
|
96
|
+
'x-heading-lg': 'font-size:48px ; line-height: 60px; letter-spacing:-0.02em',
|
|
97
|
+
'x-heading-md': 'font-size: 36px; line-height: 44px; letter-spacing:-0.02em',
|
|
98
|
+
'x-heading-sm': 'font-size: 30px; line-height: 38px',
|
|
99
|
+
'x-heading-xs': 'font-size: 24px; line-height: 32px',
|
|
100
|
+
'x-h-2xl': 'font-size:72px ; line-height:90px ; letter-spacing:-0.02em',
|
|
101
|
+
'x-h-xxl': 'font-size:72px ; line-height:90px ; letter-spacing:-0.02em',
|
|
102
|
+
'x-h-xl': 'font-size: 60px; line-height: 72px; letter-spacing:-0.02em',
|
|
103
|
+
'x-h-lg': 'font-size:48px ; line-height: 60px; letter-spacing:-0.02em',
|
|
104
|
+
'x-h-md': 'font-size: 36px; line-height: 44px; letter-spacing:-0.02em',
|
|
105
|
+
'x-h-sm': 'font-size: 30px; line-height: 38px',
|
|
106
|
+
'x-h-xs': 'font-size: 24px; line-height: 32px',
|
|
107
|
+
'x-text-xl': 'font-size:20px;line-height:30px',
|
|
108
|
+
'x-text-lg': 'font-size:18px;line-height:28px',
|
|
109
|
+
'x-text-md': 'font-size:16px;line-height:24px',
|
|
110
|
+
'x-text-sm': 'font-size:14px;line-height:20px',
|
|
111
|
+
'x-text-xs': 'font-size:12px;line-height:18px',
|
|
112
|
+
'x-t-xl': 'font-size:20px;line-height:30px',
|
|
113
|
+
'x-t-lg': 'font-size:18px;line-height:28px',
|
|
114
|
+
'x-t-md': 'font-size:16px;line-height:24px',
|
|
115
|
+
'x-t-sm': 'font-size:14px;line-height:20px',
|
|
116
|
+
'x-t-xs': 'font-size:12px;line-height:18px',
|
|
117
|
+
// 'x-button-xxl':
|
|
118
|
+
// 'display:inline-flex;justify-content:center;align-items:center;gap:8px;padding:16px 28px;border-radius:8px;box-sizing:border-box',
|
|
119
|
+
// 'x-button-2xl':
|
|
120
|
+
// 'display:inline-flex;justify-content:center;align-items:center;gap:8px;padding:16px 28px;border-radius:8px;box-sizing:border-box',
|
|
121
|
+
// 'x-button-xl':
|
|
122
|
+
// 'display:inline-flex;justify-content:center;align-items:center;gap:8px;padding:12px 20px;border-radius:8px;box-sizing:border-box',
|
|
123
|
+
// 'x-button-lg':
|
|
124
|
+
// 'display:inline-flex;justify-content:center;align-items:center;gap:8px;padding:10px 18px;border-radius:8px;box-sizing:border-box',
|
|
125
|
+
// 'x-button-md':
|
|
126
|
+
// 'display:inline-flex;justify-content:center;align-items:center;gap:8px;padding:10px 16px;border-radius:8px;box-sizing:border-box',
|
|
127
|
+
// 'x-button-sm':
|
|
128
|
+
// 'display:inline-flex;justify-content:center;align-items:center;gap:8px;padding:8px 14px;border-radius:8px;box-sizing:border-box',
|
|
129
|
+
// 'x-button-xs':
|
|
130
|
+
// 'display:inline-flex;justify-content:center;align-items:center;gap:8px;padding:8px 12px;border-radius:8px;box-sizing:border-box',
|
|
131
|
+
'x-shadow-3xl': 'box-shadow:var(--x-shadow-3xl, 0px 32px 64px -12px rgba(16, 24, 40, 0.14))',
|
|
132
|
+
// 'x-shadow-xxxl': 'box-shadow:var(--x-shadow-xxxl, 0px 32px 64px -12px rgba(16, 24, 40, 0.14))',
|
|
133
|
+
'x-shadow-2xl': 'box-shadow:var(--x-shadow-2xl, 0px 24px 48px -12px rgba(16, 24, 40, 0.18))',
|
|
134
|
+
// 'x-shadow-xxl': 'box-shadow:var(--x-shadow-xxl, 0px 24px 48px -12px rgba(16, 24, 40, 0.18))',
|
|
135
|
+
'x-shadow-xl': 'box-shadow:var(--x-shadow-xl, 0px 20px 24px -4px rgba(16, 24, 40, 0.08), 0px 8px 8px -4px rgba(16, 24, 40, 0.03))',
|
|
136
|
+
'x-shadow-lg': 'box-shadow:var(--x-shadow-lg, 0px 12px 16px -4px rgba(16, 24, 40, 0.08), 0px 4px 6px -2px rgba(16, 24, 40, 0.03))',
|
|
137
|
+
'x-shadow-md': 'box-shadow:var(--x-shadow-md, 0px 4px 8px -2px rgba(16, 24, 40, 0.1), 0px 2px 4px -2px rgba(16, 24, 40, 0.06))',
|
|
138
|
+
'x-shadow-sm': 'box-shadow:var(--x-shadow-sm, 0px 1px 3px rgba(16, 24, 40, 0.1), 0px 1px 2px rgba(16, 24, 40, 0.06))',
|
|
139
|
+
'x-shadow-xs': 'box-shadow:var(--x-shadow-xs, 0px 1px 2px rgba(16, 24, 40, 0.05))',
|
|
140
|
+
'x-ring-brand': 'box-shadow:var(--x-ring-brand, 0px 0px 0px 4px rgba(158, 119, 237, 0.24))',
|
|
141
|
+
'x-ring-gray': 'box-shadow:var(--x-ring-gray, 0px 0px 0px 4px rgba(152, 162, 179, 0.14))',
|
|
142
|
+
'x-ring-gray-secondary': 'box-shadow:var(--x-ring-gray-secondary, 0px 0px 0px 4px rgba(152, 162, 179, 0.20))',
|
|
143
|
+
'x-ring-error': 'box-shadow:var(--x-ring-error, 0px 0px 0px 4px rgba(240, 68, 56, 0.24))',
|
|
144
|
+
'x-ring-brand-shadow-xs': 'box-shadow:var(--x-ring-brand-shadow-xs, 0px 1px 2px 0px rgba(16, 24, 40, 0.05), 0px 0px 0px 4px rgba(158, 119, 237, 0.24))',
|
|
145
|
+
'x-ring-brand-shadow-sm': 'box-shadow:var(--x-ring-brand-shadow-sm, 0px 1px 3px 0px rgba(16, 24, 40, 0.10), 0px 1px 2px 0px rgba(16, 24, 40, 0.06), 0px 0px 0px 4px rgba(158, 119, 237, 0.24))',
|
|
146
|
+
'x-ring-brand-gray-xs': 'box-shadow:var(--x-ring-brand-gray-xs, 0px 1px 2px 0px rgba(16, 24, 40, 0.05), 0px 0px 0px 4px rgba(152, 162, 179, 0.14))',
|
|
147
|
+
'x-ring-brand-gray-sm': 'box-shadow:var(--x-ring-brand-gray-sm, 0px 1px 3px 0px rgba(16, 24, 40, 0.10), 0px 1px 2px 0px rgba(16, 24, 40, 0.06), 0px 0px 0px 4px rgba(152, 162, 179, 0.14))',
|
|
148
|
+
'x-ring-brand-error-xs': 'box-shadow:var(--x-ring-brand-error-xs, 0px 1px 2px 0px rgba(16, 24, 40, 0.05), 0px 0px 0px 4px rgba(240, 68, 56, 0.24))',
|
|
149
|
+
// Blur
|
|
150
|
+
'x-blur-sm': 'backdrop-filter: var(--x-blur-sm,blur(4px))',
|
|
151
|
+
'x-blur-md': 'backdrop-filter: var(--x-blur-md,blur(8px))',
|
|
152
|
+
'x-blur-lg': 'backdrop-filter: var(--x-blur-lg,blur(12px))',
|
|
153
|
+
'x-blur-xl': 'backdrop-filter: var(--x-blur-xl,blur(20px))',
|
|
154
|
+
'x-colorize-dark': 'background:#0f0f0f;color:#e3e3e3',
|
|
155
|
+
'x-colorize-light': 'background:#e3e3e3;color:rgba(0,0,0,0.8)',
|
|
156
|
+
'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%);',
|
|
157
|
+
'x-clip-message': 'clip-path: polygon(0% 0%,100% 0%,100% 80%,60% 80%,50% 100%,40% 80%,0% 80%);',
|
|
158
|
+
'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%);',
|
|
159
|
+
'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%)',
|
|
160
|
+
'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%);',
|
|
161
|
+
'flex-center': 'display:flex;align-items:center;justify-content:center',
|
|
162
|
+
'inline-flex-center': 'display:inline-flex;align-items:center;justify-content:center',
|
|
163
|
+
'absolute-center': 'position:absolute;top:0;right:0;left:0;bottom:0:margin:auto',
|
|
164
|
+
'sr-only': 'position:absolute;overflow:hidden;clip:rect(0 0 0 0);height:1px;width:1px;margin:-1px;padding:0;border:0',
|
|
165
|
+
'hidden': 'display:none',
|
|
166
|
+
'x-hidden': 'display:none',
|
|
167
|
+
'uppercase': 'text-transform: uppercase',
|
|
168
|
+
'x-uppercase': 'text-transform: uppercase',
|
|
169
|
+
'lowercase': 'text-transform: lowercase',
|
|
170
|
+
'x-lowercase': 'text-transform: lowercase',
|
|
171
|
+
'capitalize': 'text-transform: capitalize',
|
|
172
|
+
'x-capitalize': 'text-transform: capitalize',
|
|
173
|
+
'w-full': 'width:100%',
|
|
174
|
+
'x-w-full': 'width:100%',
|
|
175
|
+
'width-full': 'width:100%',
|
|
176
|
+
'x-width-full': 'width:100%',
|
|
177
|
+
'w-screen': 'width:100vw',
|
|
178
|
+
'x-w-screen': 'width:100vw',
|
|
179
|
+
'width-screen': 'width:100vw',
|
|
180
|
+
'x-width-screen': 'width:100vw',
|
|
181
|
+
'w-screen-d': 'width:100dvw',
|
|
182
|
+
'x-w-screen-d': 'width:100dvw',
|
|
183
|
+
'width-screen-d': 'width:100dvw',
|
|
184
|
+
'x-width-screen-d': 'width:100dvw',
|
|
185
|
+
'h-screen': 'width:100vh',
|
|
186
|
+
'x-h-screen': 'width:100vh',
|
|
187
|
+
'height-screen': 'width:100vh',
|
|
188
|
+
'x-height-screen': 'width:100vh',
|
|
189
|
+
'h-screen-d': 'width:100dvh',
|
|
190
|
+
'x-h-screen-d': 'width:100dvh',
|
|
191
|
+
'height-screen-d': 'width:100dvh',
|
|
192
|
+
'x-height-screen-d': 'width:100dvh',
|
|
193
|
+
'fixed': 'position:fixed',
|
|
194
|
+
'x-fixed': 'position:fixed',
|
|
195
|
+
'absolute': 'position:absolute',
|
|
196
|
+
'x-absolute': 'position:absolute',
|
|
197
|
+
'relative': 'position:relative',
|
|
198
|
+
'x-relative': 'position:relative',
|
|
199
|
+
'x-jusitfy-between': 'justify-content: space-between',
|
|
200
|
+
'x-flex': 'display:flex',
|
|
201
|
+
'x-flex-between': 'display:flex;align-items:center;justify-content:space-between',
|
|
202
|
+
'flex-between': 'display:flex;align-items:center;justify-content:space-between',
|
|
203
|
+
'x-items-center': 'align-items: center'
|
|
204
|
+
};
|
package/lib/compilers/color.js
CHANGED
|
@@ -47,15 +47,33 @@ export default function color(color, custom) {
|
|
|
47
47
|
.replace(/p/g, '%') +
|
|
48
48
|
')');
|
|
49
49
|
}
|
|
50
|
-
else if (/^(rgb|hsl|hsla|rgba)-/.test(color)) {
|
|
51
|
-
const match = color.match(/^(rgb|hsl|hsla|rgba)-/);
|
|
50
|
+
else if (/^(rgb|hsl|hsla|rgba|hwb|hwba|lab|oklab|lch|oklch)-/.test(color)) {
|
|
51
|
+
const match = color.match(/^(rgb|hsl|hsla|rgba|hwb|hwba|lab|oklab|lch|oklch)-/);
|
|
52
52
|
const colorFunc = match ? match[1] : '';
|
|
53
53
|
if (color.replace(colorFunc, '').match(/^--/))
|
|
54
54
|
return `${colorFunc}(var(${color.replace(colorFunc, '')}))`;
|
|
55
|
-
return `${colorFunc}(${color.replace(colorFunc, '').replace(/^-/, '').replace(/-/g, '
|
|
56
|
-
.replace(/p/g, '%')})
|
|
55
|
+
return replaceLast(`${colorFunc}(${color.replace(colorFunc, '').replace(/^-/, '').replace(/-/g, ' ').replace(/([0-9])d([0-9])/g, '$1.$2')
|
|
56
|
+
.replace(/p/g, '%')})`, 3, " ", " / ");
|
|
57
|
+
}
|
|
58
|
+
else if (/^p3-/.test(color)) {
|
|
59
|
+
if (color.replace(/p3/, '').match(/^--/))
|
|
60
|
+
return `color(display-p3 (var(${color.replace(/p3/, '')}))`;
|
|
61
|
+
return replaceLast(`color(display-p3 ${color.replace(/p3/, '').replace(/^-/, '').replace(/-/g, ' ').replace('d', '.')
|
|
62
|
+
.replace(/([0-9])p/g, '$1%')})`, 4, " ", " / ");
|
|
57
63
|
}
|
|
58
64
|
else {
|
|
59
65
|
return;
|
|
60
66
|
}
|
|
61
67
|
}
|
|
68
|
+
function replaceLast(str, occurs, target, replacement) {
|
|
69
|
+
var _a;
|
|
70
|
+
if (((_a = str.match(new RegExp(target, 'g'))) === null || _a === void 0 ? void 0 : _a.length) === occurs) {
|
|
71
|
+
const lastIndex = str.lastIndexOf(target);
|
|
72
|
+
if (lastIndex === -1)
|
|
73
|
+
return str;
|
|
74
|
+
return str.slice(0, lastIndex) + replacement + str.slice(lastIndex + target.length);
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
return str;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -786,7 +786,13 @@ const cssProps = {
|
|
|
786
786
|
alias: '',
|
|
787
787
|
type: 's',
|
|
788
788
|
// compiler:'',
|
|
789
|
-
values: ['auto:a', 'sRGB', '
|
|
789
|
+
values: ['auto:a', 'sRGB', 'linearRGB']
|
|
790
|
+
},
|
|
791
|
+
'color-interpolation-filters': {
|
|
792
|
+
alias: '',
|
|
793
|
+
type: 's',
|
|
794
|
+
// compiler:'',
|
|
795
|
+
values: ['auto:a', 'sRGB', 'linearRGB']
|
|
790
796
|
},
|
|
791
797
|
'color-scheme': {
|
|
792
798
|
alias: '',
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
export function createRegexForPseudo(prefix) {
|
|
2
|
+
const prefixAlias = Object.keys(prefix).reduce((previous, current) => previous + "|" + current);
|
|
3
|
+
return new RegExp("^(" + prefixAlias + ")(?=[-(|_])");
|
|
4
|
+
}
|
|
5
|
+
const prefix = {
|
|
6
|
+
'--active': ':active', // -a
|
|
7
|
+
'-a': ':active',
|
|
8
|
+
'-ac': ':active',
|
|
9
|
+
'--after-hover': '::after:hover',
|
|
10
|
+
'-afh': '::after:hover',
|
|
11
|
+
'--after': '::after', // -af
|
|
12
|
+
'-af': '::after', // -af
|
|
13
|
+
'--autofill': ':-webkit-autofill',
|
|
14
|
+
'-atf': ':-webkit-autofill',
|
|
15
|
+
'--any-link': ':any-link',
|
|
16
|
+
'-al': ':any-link',
|
|
17
|
+
'--backdrop': '::backdrop',
|
|
18
|
+
'-bd': '::backdrop',
|
|
19
|
+
'--blank': ':blank',
|
|
20
|
+
'-bl': ':blank',
|
|
21
|
+
'--before-hover': '::before:hover', // -bfh
|
|
22
|
+
'-bfh': '::before:hover', // -bfh
|
|
23
|
+
'--before': '::before', // -bf
|
|
24
|
+
'-bf': '::before', // -bf
|
|
25
|
+
'--checked': ':checked', // -ck
|
|
26
|
+
'-ch': ':checked', // -ck
|
|
27
|
+
'--current': ':current', // -ck
|
|
28
|
+
'-cur': ':current',
|
|
29
|
+
'--cue': '::cue',
|
|
30
|
+
'-cu': '::cue',
|
|
31
|
+
'--default': ':default', // -df
|
|
32
|
+
'-de': ':default', // -df
|
|
33
|
+
'--disabled': ':disabled', // -ds
|
|
34
|
+
'-di': ':disabled', // -ds
|
|
35
|
+
'--empty': ':empty', // -em
|
|
36
|
+
'-em': ':empty', // -em
|
|
37
|
+
'--enabled': ':enabled', // -en
|
|
38
|
+
'-en': ':enabled', // -en
|
|
39
|
+
'--file-selector-button': '::file-selector-button',
|
|
40
|
+
'-fsb': '::file-selector-button',
|
|
41
|
+
'--first-child': ':first-child', // -fc
|
|
42
|
+
'-fc': ':first-child',
|
|
43
|
+
'--first-letter': '::first-letter', // -f
|
|
44
|
+
'-fl': '::first-letter', // -fl
|
|
45
|
+
'--first-line': '::first-line', // -fln
|
|
46
|
+
'-fln': '::first-line', // -fln
|
|
47
|
+
'--first-of-type': ':first-of-type', // -fot
|
|
48
|
+
'-fot': ':first-of-type',
|
|
49
|
+
'--focus-within': ':focus-within', // -fo
|
|
50
|
+
'-fw': ':focus-within', // -fo
|
|
51
|
+
'--focus-visible': ':focus-visible', // -fo
|
|
52
|
+
'-fv': ':focus-visible', // -fo
|
|
53
|
+
'--focus': ':focus', // -fo
|
|
54
|
+
'-fo': ':focus', // -fo
|
|
55
|
+
'-f': ':focus', // -fo
|
|
56
|
+
'--fullscreen': ':fullscreen',
|
|
57
|
+
'-fs': ':fullscreen',
|
|
58
|
+
'--has': ':has', // --has
|
|
59
|
+
'-hs': ':has', // -hs
|
|
60
|
+
'--hover-after': ':hover::after', // -haf
|
|
61
|
+
'-haf': ':hover::after', // -haf
|
|
62
|
+
'--hover-before': ':hover::before', // -hbf
|
|
63
|
+
'-hbf': ':hover::before', // -hbf
|
|
64
|
+
'--hover-target': ':hover:target', // -htg
|
|
65
|
+
'-htg': ':hover:target', // -htg
|
|
66
|
+
'--hover': ':hover', // -h
|
|
67
|
+
'-h': ':hover', // -h
|
|
68
|
+
'-ho': ':hover', // -h
|
|
69
|
+
'--in-range': ':in-range', // -ir
|
|
70
|
+
'-ir': ':in-range', // -ir
|
|
71
|
+
'--indeterminate': ':indeterminate', // idt
|
|
72
|
+
'-ind': ':indeterminate', // idt
|
|
73
|
+
'--invalid': ':invalid', // -in
|
|
74
|
+
'-inv': ':invalid', // -in
|
|
75
|
+
'--is': ':is',
|
|
76
|
+
'-is': ':is',
|
|
77
|
+
'--lang': ':lang', // -ln
|
|
78
|
+
'-lan': ':lan', // -ln
|
|
79
|
+
'--last-child': ':last-child', // -lc
|
|
80
|
+
'-lc': ':last-child', // -lc
|
|
81
|
+
'--last-of-type': ':last-of-type', // -lot
|
|
82
|
+
'-lot': ':last-of-type', // -lot
|
|
83
|
+
'--link': ':link', // -l
|
|
84
|
+
'-ln': ':link', // -l
|
|
85
|
+
'-l': ':link', // -l
|
|
86
|
+
'--marker': '::marker',
|
|
87
|
+
'-m': '::marker',
|
|
88
|
+
'--not': ':not', // -n-
|
|
89
|
+
'-n': ':not', // -n-
|
|
90
|
+
'--nth-child': ':nth-child', // -nc2n
|
|
91
|
+
'-nc': ':nth-child', // -nc2n
|
|
92
|
+
'--nth-last-child': ':nth-last-child', // -nlc2n
|
|
93
|
+
'-nlc': ':nth-last-child', // -nlc2n
|
|
94
|
+
'--nth-last-of-type': ':nth-last-of-type', // -nlot2n
|
|
95
|
+
'-nlot': ':nth-last-of-type', // -nlot2n
|
|
96
|
+
'--nth-of-type': ':nth-of-type', // -not
|
|
97
|
+
'-not': ':nth-of-type', // -not
|
|
98
|
+
'--only-of-type': ':only-of-type', // -oot
|
|
99
|
+
'-oot': ':only-of-type', // -oot
|
|
100
|
+
'--only-child': ':only-child', // -oc
|
|
101
|
+
'-oc': ':only-child', // -oc
|
|
102
|
+
'--optional': ':optional', // -o
|
|
103
|
+
'-op': ':optional', // -o
|
|
104
|
+
'--out-of-range': ':out-of-range', // -oor
|
|
105
|
+
'-oor': ':out-of-range', // -oor
|
|
106
|
+
'--placeholder': '::placeholder', // -ph
|
|
107
|
+
'-ph': '::placeholder', // -ph
|
|
108
|
+
'--placeholder-shown': ':placeholder-shown', // -phs
|
|
109
|
+
'-phs': ':placeholder-shown', // -phs
|
|
110
|
+
'--popover-open': ':popover-open',
|
|
111
|
+
'-po': ':popover-open',
|
|
112
|
+
'--read-only': ':read-only', // -ro
|
|
113
|
+
'-ro': ':read-only', // -ro
|
|
114
|
+
'--read-write': ':read-write', // -rw
|
|
115
|
+
'-rw': ':read-write', // -rw
|
|
116
|
+
'--required': ':required', // -rq
|
|
117
|
+
'-rq': ':required', // -rq
|
|
118
|
+
'--root': ':root', // -rt
|
|
119
|
+
'-rt': ':root', // -rt
|
|
120
|
+
'--selection': '::selection', // -sl
|
|
121
|
+
'-s': '::selection', // -sl
|
|
122
|
+
'--spelling-error': '::spelling-error',
|
|
123
|
+
'-se': '::spelling-error',
|
|
124
|
+
'--scrollbar': '::-webkit-scrollbar',
|
|
125
|
+
'--webkit-scrollbar': '::-webkit-scrollbar',
|
|
126
|
+
'-sb': '::-webkit-scrollbar',
|
|
127
|
+
'--scrollbar-track': '::-webkit-scrollbar-track',
|
|
128
|
+
'--webkit-scrollbar-track': '::-webkit-scrollbar-track',
|
|
129
|
+
'-st': '::-webkit-scrollbar-track',
|
|
130
|
+
'--scrollbar-thumb': '::-webkit-scrollbar-thumb',
|
|
131
|
+
'--web-kit-scrollbar-thumb': '::-webkit-scrollbar-thumb',
|
|
132
|
+
'-stm': '::-webkit-scrollbar-thumb',
|
|
133
|
+
'--target': ':target', // -tg
|
|
134
|
+
'-tg': ':target', // -tg
|
|
135
|
+
'--user-invalid': ':user-invalid',
|
|
136
|
+
'-ui': ':user-invalid',
|
|
137
|
+
'--valid': ':valid', // -vl
|
|
138
|
+
'-va': ':valid', // -vl
|
|
139
|
+
'--visited': ':visited', // -vi
|
|
140
|
+
'-vi': ':visited', // -vi
|
|
141
|
+
'-v': ':visited', // -vi
|
|
142
|
+
'--where': ':where',
|
|
143
|
+
'-w': ':where'
|
|
144
|
+
};
|
|
145
|
+
export default prefix;
|
|
@@ -55,6 +55,8 @@ const prefix = {
|
|
|
55
55
|
'--f': ':focus', // -fo
|
|
56
56
|
'--fullscreen': ':fullscreen',
|
|
57
57
|
'--fs': ':fullscreen',
|
|
58
|
+
'--grammar-error': '::grammar-error',
|
|
59
|
+
'--ge': '::grammar-error',
|
|
58
60
|
'--has': ':has', // --has
|
|
59
61
|
'--hs': ':has', // -hs
|
|
60
62
|
'--hover-after': ':hover::after', // -haf
|
|
@@ -132,6 +134,8 @@ const prefix = {
|
|
|
132
134
|
'--stm': '::-webkit-scrollbar-thumb',
|
|
133
135
|
'--target': ':target', // -tg
|
|
134
136
|
'--tg': ':target', // -tg
|
|
137
|
+
'--target-text': '::target-text', // -tg
|
|
138
|
+
'--tt': '::target-text', // -tg
|
|
135
139
|
'--user-invalid': ':user-invalid',
|
|
136
140
|
'--ui': ':user-invalid',
|
|
137
141
|
'--valid': ':valid', // -vl
|
|
@@ -148,7 +148,7 @@ bool = false) {
|
|
|
148
148
|
}
|
|
149
149
|
else {
|
|
150
150
|
console.log(`${className}: '${propertyKey}' unable to compile value:${className.replace(propertyKey, '')} returning value as it is`);
|
|
151
|
-
return bool ? [prop, valuePortion.replace(/^-/, '') + ` /* ***Warning:Might not be Valid value *** */`] : prop + ":" + valuePortion.replace(/^-/, '') + ` /* ***Warning:Might not be Valid value *** */`;
|
|
151
|
+
return bool ? [prop, (valuePortion.replace(/^-/, '')) ? valuePortion.replace(/^-/, '') : 'initial' + ` /* ***Warning:Might not be Valid value *** */`] : prop + ":" + (valuePortion.replace(/^-/, '')) ? valuePortion.replace(/^-/, '') : 'initial' + ` /* ***Warning:Might not be Valid value *** */`;
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
else {
|
package/lib/returnStatement.js
CHANGED
|
@@ -262,6 +262,9 @@ export const compiler = {
|
|
|
262
262
|
addMedia(obj) {
|
|
263
263
|
this.mediaSelector = Object.assign(Object.assign({}, this.mediaSelector), obj);
|
|
264
264
|
},
|
|
265
|
+
addPseudo(obj) {
|
|
266
|
+
// this.mediaSelector={...this.mediaSelector,...obj}
|
|
267
|
+
},
|
|
265
268
|
// styleToAliascss(value:string,bool:boolean){
|
|
266
269
|
// let classValue='';
|
|
267
270
|
// let styleValue='';
|
|
@@ -3787,7 +3787,7 @@ export function getColorScale(colors) {
|
|
|
3787
3787
|
const colorSet = colors[colorSetKey];
|
|
3788
3788
|
for (const key in colorSet) {
|
|
3789
3789
|
if (colorSet.hasOwnProperty(key)) {
|
|
3790
|
-
colorScale[colorSetKey + key.replace('A', '')] = colorSet[key]
|
|
3790
|
+
colorScale[colorSetKey + key.replace('A', '')] = `var(--${colorSetKey + key.replace('A', '')},${colorSet[key]})`;
|
|
3791
3791
|
}
|
|
3792
3792
|
}
|
|
3793
3793
|
}
|
|
@@ -182,14 +182,14 @@ export const customStaticClassNames = {
|
|
|
182
182
|
'x-w-screen-d': 'width:100dvw',
|
|
183
183
|
'width-screen-d': 'width:100dvw',
|
|
184
184
|
'x-width-screen-d': 'width:100dvw',
|
|
185
|
-
'h-screen': '
|
|
186
|
-
'x-h-screen': '
|
|
187
|
-
'height-screen': '
|
|
188
|
-
'x-height-screen': '
|
|
189
|
-
'h-screen-d': '
|
|
190
|
-
'x-h-screen-d': '
|
|
191
|
-
'height-screen-d': '
|
|
192
|
-
'x-height-screen-d': '
|
|
185
|
+
'h-screen': 'height:100vh',
|
|
186
|
+
'x-h-screen': 'height:100vh',
|
|
187
|
+
'height-screen': 'height:100vh',
|
|
188
|
+
'x-height-screen': 'height:100vh',
|
|
189
|
+
'h-screen-d': 'height:100dvh',
|
|
190
|
+
'x-h-screen-d': 'height:100dvh',
|
|
191
|
+
'height-screen-d': 'height:100dvh',
|
|
192
|
+
'x-height-screen-d': 'height:100dvh',
|
|
193
193
|
'fixed': 'position:fixed',
|
|
194
194
|
'x-fixed': 'position:fixed',
|
|
195
195
|
'absolute': 'position:absolute',
|
package/lib/utils/helper.d.ts
CHANGED
|
@@ -4,3 +4,10 @@ export declare function cssVarWithDefault(valuePortion: string, compiler?: (a: s
|
|
|
4
4
|
[key: string]: string;
|
|
5
5
|
};
|
|
6
6
|
}) => any, custom?: {}): string | undefined;
|
|
7
|
+
export declare function stringToArray(str: string): string[];
|
|
8
|
+
export declare function objectToCSS(obj: {
|
|
9
|
+
[key: string]: string;
|
|
10
|
+
}, prefix?: string): string;
|
|
11
|
+
export declare function stylesToCSS(stylesObj: {
|
|
12
|
+
[key: string]: string;
|
|
13
|
+
}, selector: string): string;
|
package/lib/utils/helper.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// splitByCommaOutsideParens("(someValue,(nested,value),someValue)");
|
|
2
|
+
// Output: ["someValue", "(nested,value)", "someValue"]
|
|
1
3
|
export function splitByCommaOutsideParens(str) {
|
|
2
4
|
const result = [];
|
|
3
5
|
let current = '';
|
|
@@ -25,6 +27,10 @@ export function splitByCommaOutsideParens(str) {
|
|
|
25
27
|
}
|
|
26
28
|
return result;
|
|
27
29
|
}
|
|
30
|
+
// -----------------------------
|
|
31
|
+
// "--primary-color"=> "var(--primary-color)"
|
|
32
|
+
// "--primary-color:ff0000"=>"var(--primary-color, #ff0000)"
|
|
33
|
+
// "--gap:calc(1rem+var(--spacing))"=>"var(--gap, calc(1rem + var(--spacing)))"
|
|
28
34
|
export function cssVarWithDefault(valuePortion, compiler, custom = {}) {
|
|
29
35
|
if (/^--[a-zA-Z]/.test(valuePortion)) {
|
|
30
36
|
if (valuePortion.includes(':')) {
|
|
@@ -44,3 +50,32 @@ export function cssVarWithDefault(valuePortion, compiler, custom = {}) {
|
|
|
44
50
|
return `var(${valuePortion})`;
|
|
45
51
|
}
|
|
46
52
|
}
|
|
53
|
+
// ----------------------
|
|
54
|
+
// console.log(stringToArray("(apple, banana , cherry)"));
|
|
55
|
+
// Output: ["apple", "banana", "cherry"]
|
|
56
|
+
export function stringToArray(str) {
|
|
57
|
+
return str
|
|
58
|
+
.trim()
|
|
59
|
+
.slice(1, -1) // Remove outer parentheses
|
|
60
|
+
.split(',')
|
|
61
|
+
.map(item => item.trim()); // Split by comma and trim whitespace
|
|
62
|
+
}
|
|
63
|
+
// ---------------------------
|
|
64
|
+
// console.log(objectToCSS({'margin': '10px', 'padding': '5px'}));
|
|
65
|
+
// Output: "{margin:10px; padding:5px}"
|
|
66
|
+
export function objectToCSS(obj, prefix = '') {
|
|
67
|
+
return prefix + '{' +
|
|
68
|
+
Object.entries(obj)
|
|
69
|
+
.map(([key, value]) => `${key}:${value}`)
|
|
70
|
+
.join('; ') +
|
|
71
|
+
'}';
|
|
72
|
+
}
|
|
73
|
+
// ----------------------------
|
|
74
|
+
// console.log(stylesToCSS({'padding': '20px', 'background': 'blue'}, 'body'));
|
|
75
|
+
// Output: "body{padding:20px} body{background:blue}"
|
|
76
|
+
export function stylesToCSS(stylesObj, selector) {
|
|
77
|
+
const cssRules = Object.entries(stylesObj)
|
|
78
|
+
.map(([property, value]) => `${selector}{${property}:${value}}`)
|
|
79
|
+
.join(' ');
|
|
80
|
+
return cssRules;
|
|
81
|
+
}
|