@soybeanjs/unocss-shadcn 0.0.1 → 0.0.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/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +10 -10
package/dist/index.d.ts
CHANGED
|
@@ -105,7 +105,7 @@ declare function generateCSSVars(theme: PresetShadcnOptions, onlyOne?: boolean):
|
|
|
105
105
|
//#region src/index.d.ts
|
|
106
106
|
declare const builtinColors: ThemeConfigColor[];
|
|
107
107
|
declare const builtinColorMap: Record<ThemeConfigColor, string>;
|
|
108
|
-
declare const builtinRadiuses: readonly [0, 0.
|
|
108
|
+
declare const builtinRadiuses: readonly [0, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875, 1];
|
|
109
109
|
/**
|
|
110
110
|
* The UnoCSS preset of shadcn style.
|
|
111
111
|
*
|
package/dist/index.js
CHANGED
|
@@ -25,7 +25,7 @@ body {
|
|
|
25
25
|
height: 1.25em;
|
|
26
26
|
}
|
|
27
27
|
`}function d(e){let t=r.find(t=>t.name===e);if(!t)throw Error(`Unknown color: ${e}`);return{name:e,...t.cssVars}}function f(t){let n,r,i;return typeof t==`string`?(i=t,{light:n,dark:r}=d(t)):`base`in t?(i=t.base,{light:n,dark:r}=e(d(t.base),t)):(i=t.name,{light:n,dark:r}=t),{light:n,dark:r,name:i}}function p(){return{light:{success:`140 79% 45%`,"success-foreground":`0 0% 100%`,warning:`37 91% 55%`,"warning-foreground":`0 0% 100%`,info:`215 100% 54%`,"info-foreground":`0 0% 100%`,carbon:`240 4% 16%`,"carbon-foreground":`0 0% 98%`},dark:{success:`140 79% 45%`,"success-foreground":`0 0% 100%`,warning:`37 91% 55%`,"warning-foreground":`0 0% 100%`,info:`215 100% 54%`,"info-foreground":`0 0% 100%`,carbon:`220 14.3% 95.9%`,"carbon-foreground":`220.9 39.3% 11%`}}}function m(){return{light:{"sidebar-background":`0 0% 98%`,"sidebar-foreground":`240 5.3% 26.1%`,"sidebar-primary":`236.9 100% 69.61%`,"sidebar-primary-foreground":`0 0% 98%`,"sidebar-accent":`240 4.8% 95.9%`,"sidebar-accent-foreground":`240 5.9% 10%`,"sidebar-border":`220 13% 91%`,"sidebar-ring":`217.2 91.2% 59.8%`},dark:{"sidebar-background":`240 5.9% 10%`,"sidebar-foreground":`240 4.8% 95.9%`,"sidebar-primary":`236.9 100% 69.61%`,"sidebar-primary-foreground":`0 0% 100%`,"sidebar-accent":`240 3.7% 15.9%`,"sidebar-accent-foreground":`240 4.8% 95.9%`,"sidebar-border":`240 3.7% 15.9%`,"sidebar-ring":`217.2 91.2% 59.8%`}}}function h(e,t=!0){if(Array.isArray(e))return e.map(e=>h(e,!1)).join(`
|
|
28
|
-
`);let{color:n=`default`,radius:r=.5,darkSelector:i=`.dark`,feedbackColor:a=p(),sidebar:c=m()}=e,u=``;if(!n)r&&(u+=l(r));else{let{light:e,dark:l,name:d}=f(n),p=o({...e,...a.light,...c.light}),m=o({...l,...a.dark,...c.dark});u+=s(p,m,{radius:r,themeName:!t&&d,darkSelector:i})}return u}const g=r.map(e=>e.name),_=r.reduce((e,t)=>(e[t.name]=t.cssVars.light.primary,e),{}),v=[0,.
|
|
28
|
+
`);let{color:n=`default`,radius:r=.5,darkSelector:i=`.dark`,feedbackColor:a=p(),sidebar:c=m()}=e,u=``;if(!n)r&&(u+=l(r));else{let{light:e,dark:l,name:d}=f(n),p=o({...e,...a.light,...c.light}),m=o({...l,...a.dark,...c.dark});u+=s(p,m,{radius:r,themeName:!t&&d,darkSelector:i})}return u}const g=r.map(e=>e.name),_=r.reduce((e,t)=>(e[t.name]=t.cssVars.light.primary,e),{}),v=[0,.25,.375,.5,.625,.75,.875,1];function y(e={},t=!0){return{name:`unocss-preset-soybean-ui`,preflights:[{getCSS:()=>`
|
|
29
29
|
@keyframes shadcn-down { from{ height: 0 } to { height: var(--soybean-accordion-content-height)} }
|
|
30
30
|
@keyframes shadcn-up { from{ height: var(--soybean-accordion-content-height)} to { height: 0 } }
|
|
31
31
|
@keyframes shadcn-collapsible-down { from{ height: 0 } to { height: var(--soybean-collapsible-content-height)} }
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soybeanjs/unocss-shadcn",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.2",
|
|
5
5
|
"description": "unocss preset for Soybean UI",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Soybean",
|
|
@@ -34,19 +34,19 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@soybeanjs/color-palette": "^0.2.1",
|
|
37
|
-
"@unocss/core": "
|
|
38
|
-
"@unocss/preset-mini": "
|
|
37
|
+
"@unocss/core": "latest",
|
|
38
|
+
"@unocss/preset-mini": "latest",
|
|
39
39
|
"colord": "^2.9.3"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@soybeanjs/cli": "1.4.
|
|
43
|
-
"@soybeanjs/eslint-config": "1.7.
|
|
44
|
-
"@types/node": "
|
|
45
|
-
"eslint": "9.39.
|
|
46
|
-
"lint-staged": "16.2.
|
|
42
|
+
"@soybeanjs/cli": "1.4.4",
|
|
43
|
+
"@soybeanjs/eslint-config": "1.7.5",
|
|
44
|
+
"@types/node": "25.0.3",
|
|
45
|
+
"eslint": "9.39.2",
|
|
46
|
+
"lint-staged": "16.2.7",
|
|
47
47
|
"simple-git-hooks": "2.13.1",
|
|
48
|
-
"tsdown": "0.
|
|
49
|
-
"tsx": "4.
|
|
48
|
+
"tsdown": "0.18.4",
|
|
49
|
+
"tsx": "4.21.0",
|
|
50
50
|
"typescript": "5.9.3"
|
|
51
51
|
},
|
|
52
52
|
"simple-git-hooks": {
|