aliascss 1.1.17 → 1.1.19

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.
@@ -4,7 +4,7 @@ export default function transition(data) {
4
4
  .replace(/^-/, '')
5
5
  .split(/__/)
6
6
  .forEach((e) => {
7
- const m = e.match(/^([a-z-]+)([0-9]+[d]?[0-9]*[m]?[s])([\w-_]*)/);
7
+ const m = e.match(/^([a-z-]+)([0-9]+[d|/.]?[0-9]*[m]?[s])([\w-_]*)/);
8
8
  if (!m)
9
9
  return;
10
10
  const tf = m[3].replace(/^-/, '');
@@ -230,6 +230,22 @@ export function initialize(configFile) {
230
230
  init["--file"] = true;
231
231
  }
232
232
  }
233
+ // Adding Custom color, length etc
234
+ if (configFile.hasOwnProperty('custom') && typeof configFile.custom === 'object') {
235
+ Object.keys(configFile.custom).forEach((key) => {
236
+ init.statementMaker.addCustom(key, configFile.custom[key]);
237
+ });
238
+ }
239
+ // Extend custom class name define {'border-color-native":'border-color: skyBlue',}
240
+ if (configFile.hasOwnProperty('prebuild')) {
241
+ init.statementMaker.prebuild(configFile.prebuild);
242
+ }
243
+ // Ignore these class name
244
+ if (configFile.hasOwnProperty('ignore')) {
245
+ if (Array.isArray(configFile.ignore)) {
246
+ configFile.ignore.forEach((each) => init.config.ignore.push(each.trim()));
247
+ }
248
+ }
233
249
  // --module
234
250
  if (configFile.hasOwnProperty('--module') && configFile.hasOwnProperty('importModuleAs')) {
235
251
  init["--module"] = true;
@@ -286,22 +302,6 @@ export function initialize(configFile) {
286
302
  if (init.customGroupStatement)
287
303
  writeStatementToFile(init.output, init.customGroupStatement, 'config.group');
288
304
  }
289
- // Adding Custom color, length etc
290
- if (configFile.hasOwnProperty('custom') && typeof configFile.custom === 'object') {
291
- Object.keys(configFile.custom).forEach((key) => {
292
- init.statementMaker.addCustom(key, configFile.custom[key]);
293
- });
294
- }
295
- // Extend custom class name define {'border-color-native":'border-color: skyBlue',}
296
- if (configFile.hasOwnProperty('prebuild')) {
297
- init.statementMaker.prebuild(configFile.prebuild);
298
- }
299
- // Ignore these class name
300
- if (configFile.hasOwnProperty('ignore')) {
301
- if (Array.isArray(configFile.ignore)) {
302
- configFile.ignore.forEach((each) => init.config.ignore.push(each.trim()));
303
- }
304
- }
305
305
  }
306
306
  // ----------------WATCH-------------------------------
307
307
  export function watch(config) {
@@ -0,0 +1,13 @@
1
+ declare const _default: {
2
+ 'x-section': string;
3
+ 'x-row': string;
4
+ 'x-col': string;
5
+ 'x-container': string;
6
+ 'x-box': string;
7
+ 'x-card': string;
8
+ 'x-divider-text': string;
9
+ 'x-divider': string;
10
+ 'x-button': string;
11
+ 'x-tooltip': string;
12
+ };
13
+ export default _default;
@@ -0,0 +1,68 @@
1
+ export default {
2
+ 'x-section': `p--section-padding:40px bgc--section-bg:transparent [class~=section-spacious]--section-padding:80px
3
+ [class~=section-colored]--section-bg:f0f4f8`,
4
+ 'x-row': `df fww g-16px m--8px __all-margin-8px __all-flex-1 [class~=row-no-wrap]-fwn [class~=row-center]-jcc`,
5
+ 'x-col': `df fww g-16px m--8px __all-margin-8px __all-flex-1 [class~=col-no-wrap]-fwn [class~=col-center]-jcc
6
+ [class~=col-1][flex-0-0-8.33%]
7
+ [class~=col-2][flex-0-0-16.66%]
8
+ [class~=col-3][flex-0-0-25%]
9
+ [class~=col-4][flex-0-0-33.33%]
10
+ [class~=col-5][flex-0-0-41.66%]
11
+ [class~=col-6][flex-0-0-50%]
12
+ [class~=col-7][flex-0-0-58.33%]
13
+ [class~=col-8][flex-0-0-66.66%]
14
+ [class~=col-9][flex-0-0-75%]
15
+ [class~=col-10][flex-0-0-83.33%]
16
+ [class~=col-full][flex-grow:1]`,
17
+ 'x-container': `width-100p xw--container-width:1200px margin-0-auto p--container-padding:16px
18
+ [class~=container-fluid][--container-width:100%]
19
+ [class~=container-narrow][--container-width:800px]`,
20
+ 'x-box': `bgc--box-bg:ffffff p--box-padding:16px br--box-border-radius:8px border--box-border:1px-solid-e0e0e0
21
+ [class~=box-shadow]-bxs-0px-2px-8px-0000000000d1`,
22
+ 'x-card': `bgc--card-bg:ffffff padding--card-padding:24px br--card-border-radius:12px bxs--card-shadow:0px-4px-12px-0000000000d1
23
+ --hover-transform-translateY--4px --hover-bxs-0-8px-24px-0000000000d15
24
+ transition-transform-0.3s-ease__box-shadow-0.3s-ease
25
+ [class~=card-dark][--card-bg:1a1a1a,--card-shadow:0px-4px-12px-0000000000d3,color--card-color:ffffff]`,
26
+ 'x-divider-text': `[df,aic,g12px]
27
+ --before[df,cont,bgc--divider-color:gray,flex-1,h--divider-width:1px]
28
+ --after[df,cont,bgc--divider-color:gray,flex-1,h--divider-width:1px]
29
+ `,
30
+ 'x-divider': `border-top-width--divider-width:1px
31
+ border-top-color--divider-color:gray
32
+ border-top-style--divider-style:solid bsbb db`,
33
+ 'x-button': `dib aic jcc cp tdn tn-all-0d3s
34
+ c--button-color:ffffff
35
+ p--button-padding:8px-16px
36
+ fs--button-font-size:16px
37
+ br--button-border-radius:4px
38
+ b--button-border:2px-solid--border-color
39
+ --border-color:transparent
40
+ bg--button-bg:gray-600
41
+ --hover-opacity-0d9
42
+ --hover-transform-translateY--1px
43
+ --active-transform-translateY-0px
44
+
45
+ [class~=button-primary][--button-bg:primary600,--button-soft-bg:primary100,--button-color:ffffff]
46
+ [class~=button-success][--button-bg:success600,--button-soft-bg:success100,--button-color:ffffff]
47
+ [class~=button-error][--button-bg:error600,--button-soft-bg:error100,--button-color:ffffff]
48
+ [class~=button-warning][--button-bg:warning600,--button-soft-bg:warning100,--button-color:ffffff]
49
+
50
+ [disabled]-bg-cccccc
51
+ [disabled]-color-666666
52
+ [disabled]-opacity-0.7
53
+ [disabled]-cursor-not-allowed
54
+
55
+ [class~=button-small][--button-padding:6px-12px,--button-font-size:14px]
56
+ [class~=button-large][--button-padding:12px-24px,--button-font-size:18px]
57
+ [class~=button-outline][bg-transparent,--button-color:--button-bg:gray-600,--border-color:--button-color,--hover-bg--button-color:gray-600,--hover-color-ffffff]
58
+ [class~=button-text][bgc-transparent,--button-border:none,--hover-bg--button-soft-bg:gray100,--button-color:--button-bg:gray600,--button-padding:4px-8px]`,
59
+ 'x-tooltip': `df pr p-8px-12px bgc--tooltip-color b-1px-s-gray100 shadow-lg text-xs c-fff br-8px fw5 dif jcc aic --tooltip-color:gray600
60
+ --bf-pa --bf-cont --bf-w-12px --bf-h-12px --bf-bgc-inherit --bf-shadow-lg --bf-tf-r-45deg
61
+ --bf-l--4px
62
+ [class~=tooltip-up]--bf-t--4px
63
+ [class~=tooltip-up]--bf-l--calc-midpoint
64
+ [class~=tooltip-left]--bf-r--4px
65
+ [class~=tooltip-left]--bf-l-initial
66
+ [class~=tooltip-down]--bf-btm--4px
67
+ [class~=tooltip-down]--bf-l--calc-midpoint --calc-midpoint:calc(50%-6px)`,
68
+ };
@@ -6,25 +6,63 @@ bool = false) {
6
6
  }
7
7
  // case CSS define var
8
8
  if (className.startsWith('--') && className.includes(':')) {
9
- const value = className.slice(className.indexOf(':')).replace(':', '');
9
+ let value = className.slice(className.indexOf(':')).replace(':', '');
10
10
  const property = className.replace(value, '').replace(':', '');
11
+ const possiblePropsName = property.slice(property.lastIndexOf('-') + 1);
12
+ let compiler = null;
13
+ if (cssPropertiesWithAlias.hasOwnProperty(possiblePropsName) && cssPropertiesWithAlias[possiblePropsName].hasOwnProperty('compiler') && typeof cssPropertiesWithAlias[possiblePropsName].compiler === 'function') {
14
+ compiler = cssPropertiesWithAlias[possiblePropsName].compiler;
15
+ }
16
+ // case 1: CSS Variable inside css variable
17
+ if (/^calc/.test(value)) {
18
+ return bool ? [property, value.replace(/([-+/*])([\d]|var\(|calc\()/g, ' $1 $2')] : property + ":" + value.replace(/([-+/*])([\d]|var\(|calc\()/g, ' $1 $2');
19
+ }
20
+ // case 2: CSS variable in side css variable
11
21
  if (/^--[a-zA-Z]/.test(value)) {
22
+ if (value.includes(':')) {
23
+ let val = value.slice(value.indexOf(':')).replace(':', '');
24
+ const cssVar = value.replace(val, '').replace(':', '');
25
+ if (compiler && typeof compiler === 'function') {
26
+ const v = compiler(val, custom);
27
+ val = v ? v : val;
28
+ }
29
+ return bool ? [property, "var(" + cssVar + ',' + val + ')'] : property + ": var(" + cssVar + ',' + val + ')';
30
+ }
12
31
  return bool ? [property, "var(" + value + ')'] : property + ": var(" + value + ')';
13
32
  }
14
33
  else {
15
- // check for string and color
16
- if (/color$/.test(property)) {
17
- console.log(cssPropertiesWithAlias.color);
18
- const v = cssPropertiesWithAlias.color.compiler ? cssPropertiesWithAlias.color.compiler(value, custom) : value;
19
- return bool ? [property, v] : property + ":" + v;
20
- }
21
- else if (/text$/.test(property)) {
34
+ // If has text in end
35
+ if (/text$/.test(property)) {
22
36
  const v = '"' + value.replace(/([_]?)[_]/g, '$1 ').replace(/_[\s]/g, '_') + '"';
23
37
  return bool ? [property, v] : property + ":" + v;
24
38
  }
25
- return bool ? [property, value.replace(/[-]([-]?[\w])/g, ' $1').replace(/([\d])d([\d])/g, '$1.$2').replace(/([\d])p[\s]/g, "$1% ").replace(/([\d])p$/, "$1%").replace(/[\s]by[\s]/g, ' / ').replace(/auto flow/g, 'auto-flow')]
26
- :
27
- property + ":" + value.replace(/[-]([-]?[\w])/g, ' $1').replace(/([\d])d([\d])/g, '$1.$2').replace(/([\d])p[\s]/g, "$1% ").replace(/([\d])p$/, "$1%").replace(/[\s]by[\s]/g, ' / ').replace(/auto flow/g, 'auto-flow');
39
+ // Rest
40
+ if (compiler && typeof compiler === 'function') {
41
+ const v = compiler(value, custom);
42
+ value = v ?
43
+ v
44
+ :
45
+ value.replace(/[-]([-]?[\w])/g, ' $1').replace(/([\d])d([\d])/g, '$1.$2').replace(/([\d])p[\s]/g, "$1% ").replace(/([\d])p$/, "$1%").replace(/[\s]by[\s]/g, ' / ')
46
+ .replace(/auto flow/g, 'auto-flow')
47
+ .replace(/__/g, " ")
48
+ .replace(/[\s](mix|cmyk|set|gradient|bezier|content|shadow|rotate|dark|conic|linear|radial)/g, '-$1');
49
+ }
50
+ else {
51
+ value = value.replace(/[-]([-]?[\w])/g, ' $1').replace(/([\d])d([\d])/g, '$1.$2').replace(/([\d])p[\s]/g, "$1% ").replace(/([\d])p$/, "$1%").replace(/[\s]by[\s]/g, ' / ')
52
+ .replace(/auto flow/g, 'auto-flow')
53
+ .replace(/__/g, " ")
54
+ .replace(/[\s](mix|cmyk|set|gradient|bezier|content|shadow|rotate|dark|conic|linear|radial)/g, '-$1');
55
+ }
56
+ return bool ? [property, value] : property + ":" + value;
57
+ // return bool?[property,value.replace(/[-]([-]?[\w])/g,' $1').replace(/([\d])d([\d])/g,'$1.$2').replace(/([\d])p[\s]/g,"$1% ").replace(/([\d])p$/,"$1%").replace(/[\s]by[\s]/g,' / ')
58
+ // .replace(/auto flow/g,'auto-flow').replace(/__/g," ")
59
+ // .replace(/[\s](mix|cmyk|set|gradient|bezier|content|shadow|rotate|dark|conic|linear|radial)/g,'-$1')
60
+ // ]
61
+ // :
62
+ // property+":"+value.replace(/[-]([-]?[\w])/g,' $1').replace(/([\d])d([\d])/g,'$1.$2').replace(/([\d])p[\s]/g,"$1% ").replace(/([\d])p$/,"$1%").replace(/[\s]by[\s]/g,' / ')
63
+ // .replace(/auto flow/g,'auto-flow')
64
+ // .replace(/__/g," ")
65
+ // .replace(/[\s](mix|cmyk|set|gradient|bezier|content|shadow|rotate|dark|conic|linear|radial)/g,'-$1');
28
66
  }
29
67
  }
30
68
  const [property, propertyKey] = extractProperty(className, cssPropertiesWithAlias);
@@ -44,12 +82,40 @@ bool = false) {
44
82
  if (/--var--/.test(className)) {
45
83
  const splits = className.split(/--var--/);
46
84
  if (cssPropertiesWithAlias.hasOwnProperty(splits[0])) {
85
+ if (splits[1].includes(':')) {
86
+ let value = splits[1].slice(splits[1].indexOf(':')).replace(':', '');
87
+ const cssVar = splits[1].replace(value, '').replace(':', '');
88
+ if (/^calc\(/.test(value)) {
89
+ return bool ? [prop, "var(--" + cssVar + ',' + value.replace(/([-+/*])([\d]|var\(|calc\()/g, ' $1 $2') + ')'] : prop + ": var(--" + cssVar + ',' + value.replace(/([-+/*])([\d]|var\(|calc\()/g, ' $1 $2') + ')';
90
+ }
91
+ if (property.hasOwnProperty('compiler') && typeof property.compiler === 'function') {
92
+ const val = property.compiler(value, custom);
93
+ value = val ? val : value;
94
+ }
95
+ return bool ? [prop, "var(--" + cssVar + ',' + value + ')'] : prop + ": var(--" + cssVar + ',' + value + ')';
96
+ }
47
97
  return bool ? [prop, "var(--" + splits[1] + ')'] : prop + ": var(--" + splits[1] + ')';
48
98
  }
49
99
  }
50
- // case 3: CSS variable without --var keyword
51
100
  const valuePortion = className.replace(propertyKey, '');
101
+ // case 3: calc function
102
+ if (/^--calc\(/.test(valuePortion)) {
103
+ return bool ? [prop, valuePortion.replace(/^--/, '').replace(/([-+/*])([\d]|var\(|calc\()/g, ' $1 $2')] : prop + ":" + valuePortion.replace(/^--/, '').replace(/([-+/*])([\d]|var\(|calc\()/g, ' $1 $2');
104
+ }
105
+ // case 4: CSS variable without --var keyword
52
106
  if (/^--[a-zA-Z]/.test(valuePortion)) {
107
+ if (valuePortion.includes(':')) {
108
+ let value = valuePortion.slice(valuePortion.indexOf(':')).replace(':', '');
109
+ const cssVar = valuePortion.replace(value, '').replace(':', '');
110
+ if (/^calc\(/.test(value)) {
111
+ return bool ? [prop, "var(" + cssVar + ',' + value.replace(/([-+/*])([\d]|var\(|calc\()/g, ' $1 $2') + ')'] : prop + ": var(" + cssVar + ',' + value.replace(/([-+/*])([\d]|var\(|calc\()/g, ' $1 $2') + ')';
112
+ }
113
+ if (property.hasOwnProperty('compiler') && typeof property.compiler === 'function') {
114
+ const val = property.compiler(value, custom);
115
+ value = val ? val : value;
116
+ }
117
+ return bool ? [prop, "var(" + cssVar + ',' + value + ')'] : prop + ": var(" + cssVar + ',' + value + ')';
118
+ }
53
119
  return bool ? [prop, "var(" + valuePortion + ')'] : prop + ": var(" + valuePortion + ')';
54
120
  }
55
121
  if (property.hasOwnProperty('compiler') && typeof property.compiler === 'function') {
@@ -61,16 +127,18 @@ bool = false) {
61
127
  return bool ? [prop, val] : prop + ":" + val;
62
128
  }
63
129
  else {
64
- console.log(`${className}: '${propertyKey}' unable to compile value:${className.replace(propertyKey, '')}`);
65
- return bool ? [null, null] : null;
130
+ console.log(`${className}: '${propertyKey}' unable to compile value:${className.replace(propertyKey, '')} returning value as it is`);
131
+ return bool ? [prop, valuePortion.replace(/^-/, '') + ` /* ***Warning:Might not be Valid value *** */`] : prop + ":" + valuePortion.replace(/^-/, '') + ` /* ***Warning:Might not be Valid value *** */`;
66
132
  }
67
133
  }
68
134
  else {
69
- console.log("No Compiler found for:" + className);
135
+ console.log("No Compiler found for:" + className + " invalidating static className definition, add compiler function to get as it is value.");
136
+ // Saving Static Value
137
+ // return bool?[prop,valuePortion.replace(/^-/,'')+` /* ***Warning:Might not be Valid value *** */`]:prop+":"+valuePortion.replace(/^-/,'')+` /* ***Warning:Might not be Valid value *** */`;
70
138
  }
71
139
  }
72
140
  else {
73
- console.log(`${className}: is not valid AliasCSS class name`);
141
+ console.log(`${className}: is not valid AliasCSS class name, property definition not found`);
74
142
  }
75
143
  return bool ? [null, null] : null;
76
144
  }
@@ -10,6 +10,7 @@ import config from "./config.js";
10
10
  import cssProps from "./css-properties-all.js";
11
11
  import { staticClassNamesAlias } from "./static/staticClassNamesAlias.js";
12
12
  import postcss from "postcss";
13
+ import { splitByCommaOutsideParens } from "./utils/helper.js";
13
14
  const [staticClassNamesWithAlias, cssPropsWithAlias] = createCompilerObj(cssProps, config.globalValues);
14
15
  export const compiler = {
15
16
  // cache will cache propertyAndValue
@@ -47,12 +48,13 @@ export const compiler = {
47
48
  // check for [group-acss,]
48
49
  const matchGroupCSS = className.match(/\[([^[]*)\]$/);
49
50
  if (matchGroupCSS) {
50
- const asString = matchGroupCSS[1]
51
- .split(',')
51
+ const asString = splitByCommaOutsideParens(matchGroupCSS[1])
52
+ // .split(',')
52
53
  .map(e => (className.replace(matchGroupCSS[0], '') + "-").replace(/--$/, '-') + e.replace(/^--/, '-'))
53
54
  .join(' ');
54
- return this.group(asString, className);
55
+ return this.group(asString, as ? as : className);
55
56
  }
57
+ //
56
58
  let beforeClassNameSelector = '';
57
59
  if (this.prefix && !className.match(new RegExp('^' + this.prefix + "[-]"))) {
58
60
  return null;
@@ -0,0 +1 @@
1
+ export declare function splitByCommaOutsideParens(str: string): string[];
@@ -0,0 +1,27 @@
1
+ export function splitByCommaOutsideParens(str) {
2
+ const result = [];
3
+ let current = '';
4
+ let depth = 0;
5
+ for (let i = 0; i < str.length; i++) {
6
+ const char = str[i];
7
+ if (char === '(') {
8
+ depth++;
9
+ current += char;
10
+ }
11
+ else if (char === ')') {
12
+ depth = Math.max(0, depth - 1);
13
+ current += char;
14
+ }
15
+ else if (char === ',' && depth === 0) {
16
+ result.push(current.trim());
17
+ current = '';
18
+ }
19
+ else {
20
+ current += char;
21
+ }
22
+ }
23
+ if (current.length > 0) {
24
+ result.push(current.trim());
25
+ }
26
+ return result;
27
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aliascss",
3
- "version": "1.1.17",
3
+ "version": "1.1.19",
4
4
  "description": "AliasCSS is a CSS post processor.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -32,6 +32,7 @@
32
32
  "ts-node": "^10.9.2",
33
33
  "tslint": "^6.1.3",
34
34
  "tslint-config-prettier": "^1.18.0",
35
+ "vite": "^6.3.5",
35
36
  "webpack": "^5.88.2",
36
37
  "webpack-cli": "^5.1.4"
37
38
  },
@@ -57,7 +58,7 @@
57
58
  "fast-glob": "^3.3.1",
58
59
  "postcss": "^8.4.39",
59
60
  "postcss-discard-duplicates": "^7.0.0",
60
- "postcss-safe-parser": "^7.0.0"
61
+ "postcss-safe-parser": "^7.0.0"
61
62
  },
62
63
  "homepage": "https://github.com/Rodolopho/aliascss#readme"
63
64
  }
@@ -0,0 +1,86 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>UI-Development</title>
7
+
8
+ </head>
9
+ <body>
10
+ <!-- Base button -->
11
+ <button class="button"
12
+ class-button="dib aic jcc cp tdn tn-all-0d3s
13
+ c--button-color:ffffff
14
+ p--button-padding:8px-16px
15
+ fs--button-font-size:16px
16
+ br--button-border-radius:4px
17
+ b--button-border:2px-solid--border-color
18
+ --border-color:transparent
19
+ bg--button-bg:gray-600
20
+ --hover-opacity-0d9
21
+ --hover-transform-translateY--1px
22
+ --active-transform-translateY-0px
23
+
24
+ [class~=button-primary][--button-bg:primary600,--button-soft-bg:primary100,--button-color:ffffff]
25
+ [class~=button-success][--button-bg:success600,--button-soft-bg:success100,--button-color:ffffff]
26
+ [class~=button-error][--button-bg:error600,--button-soft-bg:error100,--button-color:ffffff]
27
+ [class~=button-warning][--button-bg:warning600,--button-soft-bg:warning100,--button-color:ffffff]
28
+
29
+
30
+ [disabled]-bg-cccccc
31
+ [disabled]-color-666666
32
+ [disabled]-opacity-0.7
33
+ [disabled]-cursor-not-allowed
34
+
35
+ [class~=button-small][--button-padding:6px-12px,--button-font-size:14px]
36
+ [class~=button-large][--button-padding:12px-24px,--button-font-size:18px]
37
+ [class~=button-outline][bg-transparent,--button-color:--button-bg:gray-600,--border-color:--button-color,--hover-bg--button-color:gray-600,--hover-color-ffffff]
38
+ [class~=button-text][bgc-transparent,--button-border:none,--hover-bg--button-soft-bg:gray100,--button-color:--button-bg:gray600,--button-padding:4px-8px]">Base
39
+ Button</button>
40
+ <button class="button button-small button-primary">Small Button</button>
41
+ <button class="button button-small button-primary filter-inverse">Small Button</button>
42
+ <button class="button button-small bgc-indigo600">Small Button</button>
43
+ <button class="button button-small button-warning">Small Button</button>
44
+ <button class="button button-small button-success">Small Button</button>
45
+ <button class="button button-small button-error">Small Button</button>
46
+
47
+
48
+ <span class="divider-text text-lg fwb " class-divider-text="[df,aic,g12px]
49
+ --before[df,cont,bgc--divider-color:gray,flex-1,h--divider-width:1px]
50
+ --after[df,cont,bgc--divider-color:gray,flex-1,h--divider-width:1px]" class-divider="border-top-width--divider-width:1px
51
+ border-top-color--divider-color:gray
52
+ border-top-style--divider-style:solid bsbb db
53
+ ">Divider</span>
54
+
55
+
56
+
57
+ <button class="button button-large aspect-ratio-1-by-1 "><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor"
58
+ stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-soup-icon lucide-soup">
59
+ <path d="M12 21a9 9 0 0 0 9-9H3a9 9 0 0 0 9 9Z" />
60
+ <path d="M7 21h10" />
61
+ <path d="M19.5 12 22 6" />
62
+ <path d="M16.25 3c.27.1.8.53.75 1.36-.06.83-.93 1.2-1 2.02-.05.78.34 1.24.73 1.62" />
63
+ <path d="M11.25 3c.27.1.8.53.74 1.36-.05.83-.93 1.2-.98 2.02-.06.78.33 1.24.72 1.62" />
64
+ <path d="M6.25 3c.27.1.8.53.75 1.36-.06.83-.93 1.2-1 2.02-.05.78.34 1.24.74 1.62" />
65
+ </svg></button>
66
+ <button class="button button-outline br-50px-i">Outline Button</button>
67
+ <br/>
68
+ <button class="button button-outline">outline Button</button>
69
+ <button class="button button-outline button-primary">outline Button</button>
70
+ <button class="button button-outline button-error">outline Button</button>
71
+ <button class="button button-outline c-indigo600 --border-color:indigo600-i"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor"
72
+ stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-soup-icon lucide-soup">
73
+ <path d="M12 21a9 9 0 0 0 9-9H3a9 9 0 0 0 9 9Z" />
74
+ <path d="M7 21h10" />
75
+ <path d="M19.5 12 22 6" />
76
+ <path d="M16.25 3c.27.1.8.53.75 1.36-.06.83-.93 1.2-1 2.02-.05.78.34 1.24.73 1.62" />
77
+ <path d="M11.25 3c.27.1.8.53.74 1.36-.05.83-.93 1.2-.98 2.02-.06.78.33 1.24.72 1.62" />
78
+ <path d="M6.25 3c.27.1.8.53.75 1.36-.06.83-.93 1.2-1 2.02-.05.78.34 1.24.74 1.62" />
79
+ </svg></button>
80
+
81
+ </body>
82
+
83
+ <script src="/js/aliascss.js"></script>
84
+
85
+
86
+ </html>
@@ -0,0 +1,153 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>Modern UI Components</title>
8
+ <style>
9
+ /* Global reset and base styles */
10
+ * {
11
+ margin: 0;
12
+ padding: 0;
13
+ box-sizing: border-box;
14
+ }
15
+
16
+ body {
17
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
18
+ padding: 20px;
19
+ background-color: #f5f5f5;
20
+ display: flex;
21
+ flex-direction: column;
22
+ gap: 40px;
23
+ }
24
+
25
+
26
+
27
+ /* Utility for demo content */
28
+ h2,
29
+ h3,
30
+ p {
31
+ margin-bottom: 16px;
32
+ }
33
+
34
+
35
+ </style>
36
+ </head>
37
+
38
+ <body class="[class~=demo-content]-fs-16px [class~=demo-content]-lh-1.6">
39
+ <!-- Card Component Demo -->
40
+ <section class="section" class-section="p--section-padding:40px bgc--section-bg:transparent [class~=section-spacious]--section-padding:80px [class~=section-colored]--section-bg:f0f4f8
41
+ ">
42
+ <h2>Card Component</h2>
43
+ 'x-section':`p--section-padding:40px bgc--section-bg:transparent [class~=section-spacious]--section-padding:80px
44
+ [class~=section-colored]--section-bg:f0f4f8`,
45
+ 'x-row':`df fww g-16px m--8px __all-margin-8px __all-flex-1 [class~=row-no-wrap]-fwn [class~=row-center]-jcc`,
46
+ 'x-container':`width-100p xw--container-width:1200px margin-0-auto p--container-padding:16px
47
+ [class~=container-fluid][--container-width:100%]
48
+ [class~=container-narrow][--container-width:800px]`,
49
+ 'x-box':`bgc--box-bg:ffffff p--box-padding:16px br--box-border-radius:8px border--box-border:1px-solid-e0e0e0
50
+ [class~=box-shadow]-bxs-0px-2px-8px-0000000000d1`,
51
+ 'x-card':`bgc--card-bg:ffffff padding--card-padding:24px br--card-border-radius:12px bxs--card-shadow:0px-4px-12px-0000000000d1
52
+ --hover-transform-translateY--4px --hover-bxs-0-8px-24px-0000000000d15
53
+ transition-transform-0.3s-ease__box-shadow-0.3s-ease
54
+ [class~=card-dark][--card-bg:1a1a1a,--card-shadow:0px-4px-12px-0000000000d3,color--card-color:ffffff]`,
55
+
56
+ <div class="row" class-row="df fww g-16px m--8px __all-margin-8px __all-flex-1 [class~=row-no-wrap]-fwn [class~=row-center]-jcc">
57
+ <div class="card" class-card="bgc--card-bg:ffffff padding--card-padding:24px br--card-border-radius:12px bxs--card-shadow:0px-4px-12px-0000000000d1
58
+ --hover-transform-translateY--4px --hover-bxs-0-8px-24px-0000000000d15 transition-transform-0.3s-ease__box-shadow-0.3s-ease
59
+ [class~=card-dark][--card-bg:1a1a1a,--card-shadow:0px-4px-12px-0000000000d3,color--card-color:ffffff]
60
+
61
+ ">
62
+ <h3>Default Card</h3>
63
+ <p class="demo-content">This is a standard card with hover effects and shadow.</p>
64
+ </div>
65
+
66
+ <div class="card card-dark">
67
+ <h3>Dark Card</h3>
68
+ <p class="demo-content">Dark theme with white text.</p>
69
+ </div>
70
+ </div>
71
+ </section>
72
+
73
+ <!-- Container Component Demo -->
74
+ <section class="section section-colored">
75
+ <h2>Container Component</h2>
76
+ <div class="container" class-container="width-100p xw--container-width:1200px margin-0-auto p--container-padding:16px [class~=container-fluid][--container-width:100%]
77
+ [class~=container-narrow][--container-width:800px]">
78
+ <div class="box" class-box="bgc--box-bg:ffffff p--box-padding:16px br--box-border-radius:8px border--box-border:1px-solid-e0e0e0 [class~=box-shadow]-bxs-0px-2px-8px-0000000000d1
79
+ ">
80
+ <h3>Default Container</h3>
81
+ <p class="demo-content">Centered container with a max-width of 1200px.</p>
82
+ </div>
83
+ </div>
84
+ <div class="container container-narrow">
85
+ <div class="box">
86
+ <h3>Narrow Container</h3>
87
+ <p class="demo-content">Narrow container with a max-width of 800px.</p>
88
+ </div>
89
+ </div>
90
+ <div class="container container-fluid">
91
+ <div class="box">
92
+ <h3>Fluid Container</h3>
93
+ <p class="demo-content">Full-width container with padding.</p>
94
+ </div>
95
+ </div>
96
+ </section>
97
+
98
+ <!-- Row Component Demo -->
99
+ <section class="section">
100
+ <h2>Row Component</h2>
101
+ <div class="row">
102
+ <div class="box">Box 1</div>
103
+ <div class="box">Box 2</div>
104
+ <div class="box">Box 3</div>
105
+ </div>
106
+ <div class="row row-no-wrap">
107
+ <div class="box">No-Wrap Box 1</div>
108
+ <div class="box">No-Wrap Box 2</div>
109
+ </div>
110
+ <div class="row row-center">
111
+ <div class="box">Centered Box</div>
112
+ </div>
113
+ </section>
114
+
115
+ <!-- Box Component Demo -->
116
+ <section class="section section-spacious">
117
+ <h2>Box Component</h2>
118
+ <div class="row">
119
+ <div class="box">
120
+ <h3>Default Box</h3>
121
+ <p class="demo-content">Simple box with border.</p>
122
+ </div>
123
+ <div class="box box-shadow">
124
+ <h3>Shadow Box</h3>
125
+ <p class="demo-content">Box with a subtle shadow effect.</p>
126
+ </div>
127
+ <div class="box bn bgc-transparent">
128
+ <h3>Minimal Box</h3>
129
+ <p class="demo-content">No border or background.</p>
130
+ </div>
131
+ </div>
132
+ </section>
133
+
134
+ <!-- Section Component Demo -->
135
+ <section class="section section-colored">
136
+ <h2>Section Component</h2>
137
+ <div class="section">
138
+ <h3>Default Section</h3>
139
+ <p class="demo-content">Standard section with padding.</p>
140
+ </div>
141
+ <div class="section section-spacious">
142
+ <h3>Spacious Section</h3>
143
+ <p class="demo-content">More padding for a spacious feel.</p>
144
+ </div>
145
+ <div class="section section-colored">
146
+ <h3>Colored Section</h3>
147
+ <p class="demo-content">Section with a light background color.</p>
148
+ </div>
149
+ </section>
150
+ </body>
151
+ <script src="/js/aliascss.js"></script>
152
+
153
+ </html>