@esportsplus/ui 0.9.7 → 0.9.9
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/build/components/card/scss/index.scss +1 -1
- package/build/components/counter/scss/index.scss +1 -1
- package/package.json +1 -1
- package/src/components/card/scss/index.scss +1 -1
- package/src/components/card/scss/variables.scss +1 -0
- package/vite.config.reorg..ts +91 -0
- package/vite.config.ts +5 -6
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.card{--background:var(--background-default);--border-color:var(--border-color-default);--border-radius:var(--border-radius-400);--box-shadow:var(--box-shadow-default);--box-shadow-active:var(--box-shadow-300);--box-shadow-default:none;--box-shadow-hover:var(--box-shadow-300);--box-shadow-pressed:none;--padding-horizontal:0px;--padding-vertical:0px;--width:auto}.card.--active{--background:var(--background-active);--border-color:var(--border-color-active);--box-shadow:var(--box-shadow-active)}.card:not(.--active):hover{--background:var(--background-hover);--border-color:var(--border-color-hover);--box-shadow:var(--box-shadow-hover)}.card:not(.--active):active{--background:var(--background-pressed);--border-color:var(--border-color-pressed);--box-shadow:var(--box-shadow-pressed)}.card{background:var(--background);border-radius:var(--border-radius);padding:var(--padding-vertical)var(--padding-horizontal);transition:background var(--transition-duration)ease-in-out,border-color var(--transition-duration)ease-in-out,box-shadow var(--transition-duration)ease-in-out,max-height var(--transition-duration)ease-in-out;width:var(--width);position:relative}.card:after{border-radius:inherit;box-shadow:var(--box-shadow);content:"";pointer-events:none;transition:box-shadow var(--transition-duration)ease-in-out,opacity var(--transition-duration)ease-in-out;z-index
|
|
1
|
+
.card{--background:var(--background-default);--border-color:var(--border-color-default);--border-radius:var(--border-radius-400);--box-shadow:var(--box-shadow-default);--box-shadow-active:var(--box-shadow-300);--box-shadow-default:none;--box-shadow-hover:var(--box-shadow-300);--box-shadow-pressed:none;--padding-horizontal:0px;--padding-vertical:0px;--width:auto}.card.--active{--background:var(--background-active);--border-color:var(--border-color-active);--box-shadow:var(--box-shadow-active)}.card:not(.--active):hover{--background:var(--background-hover);--border-color:var(--border-color-hover);--box-shadow:var(--box-shadow-hover)}.card:not(.--active):active{--background:var(--background-pressed);--border-color:var(--border-color-pressed);--box-shadow:var(--box-shadow-pressed)}.card{background:var(--background);border-radius:var(--border-radius);padding:var(--padding-vertical)var(--padding-horizontal);transition:background var(--transition-duration)ease-in-out,border-color var(--transition-duration)ease-in-out,box-shadow var(--transition-duration)ease-in-out,max-height var(--transition-duration)ease-in-out;width:var(--width);position:relative}.card:after{border-radius:inherit;box-shadow:var(--box-shadow);content:"";pointer-events:none;transition:box-shadow var(--transition-duration)ease-in-out,opacity var(--transition-duration)ease-in-out;z-index:-1;position:absolute;inset:0}.card--flat:after{display:none}
|
|
2
2
|
/*$vite$:1*/
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.counter{--font-size:clamp(2rem,4vw + 1rem,8rem);--line-height:calc(var(--font-size)*1.5);--mask-size:.24;--timing-function:var(--timing-bounce-out);--transition-duration:2s}.counter-character{--font-weight:var(--font-weight-400);--scale:1}.counter-character--fraction,.counter-character--symbol{--opacity:.8}.counter-character--fraction{--font-weight:var(--font-weight-300);--scale:.75}.counter-character--symbol:first-child{--scale:.8}.counter{transform-style:flat;place-items:center;gap:2px;transition:transform .5s 2s;display:flex}.counter-character,.counter-character-track span{background:linear-gradient(#fafafa 50%,#737373) fixed
|
|
1
|
+
.counter{--font-size:clamp(2rem,4vw + 1rem,8rem);--line-height:calc(var(--font-size)*1.5);--mask-size:.24;--timing-function:var(--timing-bounce-out);--transition-duration:2s}.counter-character{--font-weight:var(--font-weight-400);--scale:1}.counter-character--fraction,.counter-character--symbol{--opacity:.8}.counter-character--fraction{--font-weight:var(--font-weight-300);--scale:.75}.counter-character--symbol:first-child{--scale:.8}.counter{transform-style:flat;place-items:center;gap:2px;transition:transform .5s 2s;display:flex}.counter-character,.counter-character-track span{color:#0000;transform-style:flat;background:linear-gradient(#fafafa 50%,#737373) fixed;-webkit-background-clip:text;background-clip:text}.counter-character{font-size:var(--font-size);font-variant:tabular-nums;font-weight:var(--font-weight);height:1lh;line-height:var(--line-height);-webkit-mask:linear-gradient(transparent,white calc(1lh*var(--mask-size))calc(100% - 1lh*var(--mask-size)),transparent);-webkit-mask:linear-gradient(transparent,white calc(1lh*var(--mask-size))calc(100% - 1lh*var(--mask-size)),transparent);mask:linear-gradient(transparent,white calc(1lh*var(--mask-size))calc(100% - 1lh*var(--mask-size)),transparent);transform-style:flat;display:grid;overflow:hidden}.counter-character--fraction{font-size:calc(var(--font-size)*var(--scale));font-weight:var(--font-weight-300);opacity:var(--opacity);height:var(--line-height);overflow:visible}.counter-character--fraction .counter-character-track span{padding:calc((var(--line-height) - var(--font-size))*.2)0;flex-direction:column;align-items:end;display:flex}.counter-character--symbol{font-size:calc(var(--font-size)*var(--scale));opacity:var(--opacity);margin-right:.1ch}.counter-character-track{translate:0 calc((var(--value) + 1)*var(--line-height)*-1);transition:translate var(--transition-duration)var(--timing-function);display:grid}.counter-character-track span{transform-style:flat;height:1lh}
|
|
2
2
|
/*$vite$:1*/
|
package/package.json
CHANGED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { build, defineConfig, PluginOption } from 'vite';
|
|
2
|
+
import autoprefixer from 'autoprefixer';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export default (): PluginOption => {
|
|
6
|
+
let key = 'VITE_REORGANIZE_SCSS_ORDER',
|
|
7
|
+
outDir = '',
|
|
8
|
+
replacing,
|
|
9
|
+
scss = new Set<string>();
|
|
10
|
+
|
|
11
|
+
return {
|
|
12
|
+
configResolved(config) {
|
|
13
|
+
outDir = config.build.outDir;
|
|
14
|
+
},
|
|
15
|
+
async closeBundle() {
|
|
16
|
+
if (process.env[key]) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
process.env[key] = '1';
|
|
21
|
+
|
|
22
|
+
let normalize: string | undefined = undefined,
|
|
23
|
+
sorted: string[] = [];
|
|
24
|
+
|
|
25
|
+
for (let file of scss) {
|
|
26
|
+
if (file.indexOf('@esportsplus/ui/build/components/normalize') !== -1) {
|
|
27
|
+
normalize = file;
|
|
28
|
+
}
|
|
29
|
+
else if (file.indexOf('@esportsplus/ui/build/css-utilities/') !== -1) {
|
|
30
|
+
sorted.unshift(file);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
sorted.push(file);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
if (normalize) {
|
|
38
|
+
sorted.unshift(normalize);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
await build(
|
|
42
|
+
defineConfig({
|
|
43
|
+
build: {
|
|
44
|
+
cssMinify: 'lightningcss',
|
|
45
|
+
outDir,
|
|
46
|
+
rollupOptions: {
|
|
47
|
+
input: sorted,
|
|
48
|
+
output: {
|
|
49
|
+
assetFileNames: ({ originalFileNames: [filename] }) => {
|
|
50
|
+
if (filename && filename.endsWith('.css')) {
|
|
51
|
+
return replacing;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return '[name].[ext]';
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
css: {
|
|
60
|
+
postcss: {
|
|
61
|
+
plugins: [
|
|
62
|
+
autoprefixer()
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
transformer: 'lightningcss'
|
|
66
|
+
},
|
|
67
|
+
})
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
delete process.env[key];
|
|
71
|
+
},
|
|
72
|
+
generateBundle(_, bundle) {
|
|
73
|
+
if (process.env[key]) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
for (let key in bundle) {
|
|
78
|
+
if (key.endsWith('.css')) {
|
|
79
|
+
replacing = key;
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
load(id) {
|
|
85
|
+
if (id.endsWith('.scss')) {
|
|
86
|
+
scss.add(id);
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
name: '@esportsplus/ui'
|
|
90
|
+
};
|
|
91
|
+
};
|
package/vite.config.ts
CHANGED
|
@@ -6,10 +6,9 @@ import autoprefixer from 'autoprefixer';
|
|
|
6
6
|
export default defineConfig({
|
|
7
7
|
build: {
|
|
8
8
|
cssMinify: 'lightningcss',
|
|
9
|
+
outDir: 'build',
|
|
9
10
|
rollupOptions: {
|
|
10
|
-
input:
|
|
11
|
-
glob.sync('./src/{components,css-utilities,fonts}/*/scss/index.scss').map(file => [file, file])
|
|
12
|
-
),
|
|
11
|
+
input: glob.sync('./src/{components,css-utilities,fonts}/*/scss/index.scss'),
|
|
13
12
|
output: {
|
|
14
13
|
assetFileNames: ({ originalFileNames: [filename] }) => {
|
|
15
14
|
if (filename) {
|
|
@@ -19,14 +18,14 @@ export default defineConfig({
|
|
|
19
18
|
return '[name].[ext]';
|
|
20
19
|
}
|
|
21
20
|
}
|
|
22
|
-
}
|
|
23
|
-
outDir: 'build',
|
|
21
|
+
}
|
|
24
22
|
},
|
|
25
23
|
css: {
|
|
26
24
|
postcss: {
|
|
27
25
|
plugins: [
|
|
28
26
|
autoprefixer()
|
|
29
27
|
]
|
|
30
|
-
}
|
|
28
|
+
},
|
|
29
|
+
transformer: 'lightningcss'
|
|
31
30
|
},
|
|
32
31
|
});
|