@soybeanjs/ui 0.5.7 → 0.5.8
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/components/dialog/dialog-pure.vue.d.ts +2 -2
- package/dist/components/dialog/dialog.vue.d.ts +2 -2
- package/dist/components/drawer/drawer.vue.d.ts +2 -2
- package/dist/components/dropdown-menu/dropdown-menu-wrapper.vue.d.ts +1 -1
- package/dist/components/layout/layout.js +1 -1
- package/dist/components/layout/layout.vue.d.ts +2 -0
- package/dist/components/layout/types.d.ts +17 -0
- package/dist/styles.css +4 -1
- package/dist/variants/layout.js +1 -1
- package/package.json +3 -3
|
@@ -31,10 +31,10 @@ declare const __VLS_base: vue.DefineComponent<DialogPureProps, {}, {}, {}, {}, v
|
|
|
31
31
|
onOpenAutoFocus?: ((event: Event) => any) | undefined;
|
|
32
32
|
onCloseAutoFocus?: ((event: Event) => any) | undefined;
|
|
33
33
|
}>, {
|
|
34
|
+
modal: boolean;
|
|
35
|
+
closable: boolean;
|
|
34
36
|
open: boolean;
|
|
35
37
|
defaultOpen: boolean;
|
|
36
|
-
closable: boolean;
|
|
37
|
-
modal: boolean;
|
|
38
38
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
39
39
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
40
40
|
declare const _default: typeof __VLS_export;
|
|
@@ -46,10 +46,10 @@ declare const __VLS_base: vue.DefineComponent<DialogProps, {}, {}, {}, {}, vue.C
|
|
|
46
46
|
onOpenAutoFocus?: ((event: Event) => any) | undefined;
|
|
47
47
|
onCloseAutoFocus?: ((event: Event) => any) | undefined;
|
|
48
48
|
}>, {
|
|
49
|
+
modal: boolean;
|
|
50
|
+
closable: boolean;
|
|
49
51
|
open: boolean;
|
|
50
52
|
defaultOpen: boolean;
|
|
51
|
-
closable: boolean;
|
|
52
|
-
modal: boolean;
|
|
53
53
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
54
54
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
55
55
|
declare const _default: typeof __VLS_export;
|
|
@@ -46,10 +46,10 @@ declare const __VLS_base: vue.DefineComponent<DrawerProps, {}, {}, {}, {}, vue.C
|
|
|
46
46
|
onOpenAutoFocus?: ((event: Event) => any) | undefined;
|
|
47
47
|
onCloseAutoFocus?: ((event: Event) => any) | undefined;
|
|
48
48
|
}>, {
|
|
49
|
+
modal: boolean;
|
|
50
|
+
closable: boolean;
|
|
49
51
|
open: boolean;
|
|
50
52
|
defaultOpen: boolean;
|
|
51
|
-
closable: boolean;
|
|
52
|
-
modal: boolean;
|
|
53
53
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
54
54
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
55
55
|
declare const _default: typeof __VLS_export;
|
|
@@ -28,8 +28,8 @@ declare const __VLS_base: vue.DefineComponent<DropdownMenuWrapperProps, {}, {},
|
|
|
28
28
|
onOpenAutoFocus?: ((event: Event) => any) | undefined;
|
|
29
29
|
onCloseAutoFocus?: ((event: Event) => any) | undefined;
|
|
30
30
|
}>, {
|
|
31
|
-
open: boolean;
|
|
32
31
|
modal: boolean;
|
|
32
|
+
open: boolean;
|
|
33
33
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
34
34
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
35
35
|
declare const _default: typeof __VLS_export;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mergeSlotVariants as e}from"../../theme/shared.js";import{themeSizeMap as t,themeSizeRatio as n}from"../../theme/config.js";import{provideSizeContext as r}from"../../theme/context.js";import"../../theme/index.js";import{drawerVariants as i}from"../../variants/drawer.js";import{layoutVariants as a}from"../../variants/layout.js";import{computed as o,createBlock as s,createVNode as c,defineComponent as l,guardReactiveProps as u,mergeProps as d,normalizeProps as f,openBlock as p,renderSlot as m,unref as h,withCtx as g}from"vue";import{useOmitProps as _}from"@soybeanjs/headless/composables";import{LayoutContent as v,LayoutFooter as y,LayoutHeader as b,LayoutMain as x,LayoutRail as S,LayoutRoot as C,LayoutSidebar as w,LayoutTab as T,provideLayoutUi as E}from"@soybeanjs/headless";const D=l({name:`SLayout`,__name:`layout`,props:{class:{},size:{default:`md`},ui:{},fullContent:{type:Boolean},sidebarProps:{},railProps:{},mainProps:{},headerProps:{},tabProps:{},contentProps:{},footerProps:{},mobileProps:{},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean},side:{},variant:{},collapsible:{},sidebarWidth:{},collapsedSidebarWidth:{},isMobile:{type:Boolean},mobileSidebarWidth:{},headerHeight:{},tabHeight:{},footerHeight:{},pxToRem:{}},emits:[`update:open`],setup(l,{emit:D}){let O=l,k=D,A=_(O,[`class`,`size`,`ui`,`pxToRem`,`sidebarProps`,`headerProps`,`mainProps`,`tabProps`,`footerProps`,`railProps`,`mobileProps`]),j=e=>O.pxToRem?O.pxToRem(e):e*n[O.size]/t.md;return E(o(()=>{let t=a({size:O.size,variant:O.variant,side:O.side,collapsible:O.collapsible,fullContent:O.fullContent}),n=i({size:O.size,side:O.side});return e({...t,mobileDrawer:n.content},O.ui,{root:O.class})})),r(()=>O.size),(e,t)=>(p(),s(h(C),d(h(A),{"px-to-rem":j,"onUpdate:open":t[0]||=e=>k(`update:open`,e)}),{default:g(t=>[c(h(w),f(u(l.sidebarProps)),{default:g(()=>[m(e.$slots,`sidebar`,f(u(t))),c(h(S),f(u(l.railProps)),null,16)]),_:2},1040),c(h(x),f(u(l.mainProps)),{default:g(()=>[c(h(b),f(u(l.headerProps)),{default:g(()=>[m(e.$slots,`header`)]),_:3},16),c(h(T),f(u(l.tabProps)),{default:g(()=>[m(e.$slots,`tab`)]),_:3},16),c(h(v),f(u(l.contentProps)),{default:g(()=>[m(e.$slots,`default`)]),_:3},16),c(h(y),f(u(l.footerProps)),{default:g(()=>[m(e.$slots,`footer`)]),_:3},16)]),_:3},16)]),_:3},16))}});export{D as default};
|
|
1
|
+
import{mergeSlotVariants as e}from"../../theme/shared.js";import{themeSizeMap as t,themeSizeRatio as n}from"../../theme/config.js";import{provideSizeContext as r}from"../../theme/context.js";import"../../theme/index.js";import{drawerVariants as i}from"../../variants/drawer.js";import{layoutVariants as a}from"../../variants/layout.js";import{computed as o,createBlock as s,createVNode as c,defineComponent as l,guardReactiveProps as u,mergeProps as d,normalizeProps as f,openBlock as p,renderSlot as m,unref as h,withCtx as g}from"vue";import{useOmitProps as _}from"@soybeanjs/headless/composables";import{LayoutContent as v,LayoutFooter as y,LayoutHeader as b,LayoutMain as x,LayoutRail as S,LayoutRoot as C,LayoutSidebar as w,LayoutTab as T,provideLayoutUi as E}from"@soybeanjs/headless";const D=l({name:`SLayout`,__name:`layout`,props:{class:{},size:{default:`md`},ui:{},fullContent:{type:Boolean},tabVisible:{type:Boolean,default:!0},footerVisible:{type:Boolean,default:!0},sidebarProps:{},railProps:{},mainProps:{},headerProps:{},tabProps:{},contentProps:{},footerProps:{},mobileProps:{},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean},side:{},variant:{},collapsible:{},sidebarWidth:{},collapsedSidebarWidth:{},isMobile:{type:Boolean},mobileSidebarWidth:{},headerHeight:{},tabHeight:{},footerHeight:{},pxToRem:{}},emits:[`update:open`],setup(l,{emit:D}){let O=l,k=D,A=_(O,[`class`,`size`,`ui`,`pxToRem`,`fullContent`,`tabVisible`,`footerVisible`,`sidebarProps`,`headerProps`,`mainProps`,`tabProps`,`footerProps`,`railProps`,`mobileProps`]),j=e=>O.pxToRem?O.pxToRem(e):e*n[O.size]/t.md;return E(o(()=>{let t=a({size:O.size,variant:O.variant,side:O.side,collapsible:O.collapsible,tabVisible:O.tabVisible,fullContent:O.fullContent}),n=i({size:O.size,side:O.side});return e({...t,mobileDrawer:n.content},O.ui,{root:O.class})})),r(()=>O.size),(e,t)=>(p(),s(h(C),d(h(A),{"px-to-rem":j,"onUpdate:open":t[0]||=e=>k(`update:open`,e)}),{default:g(t=>[c(h(w),f(u(l.sidebarProps)),{default:g(()=>[m(e.$slots,`sidebar`,f(u(t))),c(h(S),f(u(l.railProps)),null,16)]),_:2},1040),c(h(x),f(u(l.mainProps)),{default:g(()=>[c(h(b),f(u(l.headerProps)),{default:g(()=>[m(e.$slots,`header`)]),_:3},16),c(h(T),f(u(l.tabProps)),{default:g(()=>[m(e.$slots,`tab`)]),_:3},16),c(h(v),f(u(l.contentProps)),{default:g(()=>[m(e.$slots,`default`)]),_:3},16),c(h(y),f(u(l.footerProps)),{default:g(()=>[m(e.$slots,`footer`)]),_:3},16)]),_:3},16)]),_:3},16))}});export{D as default};
|
|
@@ -26,6 +26,8 @@ declare const __VLS_base: vue.DefineComponent<LayoutProps, {}, {}, {}, {}, vue.C
|
|
|
26
26
|
}>, {
|
|
27
27
|
size: ThemeSize;
|
|
28
28
|
open: boolean;
|
|
29
|
+
tabVisible: boolean;
|
|
30
|
+
footerVisible: boolean;
|
|
29
31
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
30
32
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
31
33
|
declare const _default: typeof __VLS_export;
|
|
@@ -7,7 +7,24 @@ interface LayoutProps extends LayoutRootProps {
|
|
|
7
7
|
class?: ClassValue;
|
|
8
8
|
size?: ThemeSize;
|
|
9
9
|
ui?: Partial<LayoutUi>;
|
|
10
|
+
/**
|
|
11
|
+
* whether the content takes the full height of the layout (include).
|
|
12
|
+
*
|
|
13
|
+
* @default false
|
|
14
|
+
*/
|
|
10
15
|
fullContent?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* whether to show the tab.
|
|
18
|
+
*
|
|
19
|
+
* @default true
|
|
20
|
+
*/
|
|
21
|
+
tabVisible?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* whether to show the footer.
|
|
24
|
+
*
|
|
25
|
+
* @default true
|
|
26
|
+
*/
|
|
27
|
+
footerVisible?: boolean;
|
|
11
28
|
sidebarProps?: LayoutSidebarProps;
|
|
12
29
|
railProps?: LayoutRailProps;
|
|
13
30
|
mainProps?: LayoutMainProps;
|
package/dist/styles.css
CHANGED
|
@@ -612,7 +612,8 @@
|
|
|
612
612
|
.break-words{overflow-wrap:break-word;}
|
|
613
613
|
.border,
|
|
614
614
|
.data-\[selected\]\:border[data-selected],
|
|
615
|
-
.group[data-variant=floating] .group-data-\[variant\=floating\]\:border
|
|
615
|
+
.group[data-variant=floating] .group-data-\[variant\=floating\]\:border,
|
|
616
|
+
.group[data-variant=inset] .group-data-\[variant\=inset\]\:border{border-width:1px;}
|
|
616
617
|
.border-0{border-width:0px;}
|
|
617
618
|
.border-1\.5{border-width:1.5px;}
|
|
618
619
|
.border-1\.75{border-width:1.75px;}
|
|
@@ -773,6 +774,7 @@
|
|
|
773
774
|
.data-\[state\=checked\]\:bg-secondary-foreground\/5[data-state=checked],
|
|
774
775
|
.data-\[state\=indeterminate\]\:bg-secondary-foreground\/5[data-state=indeterminate]{background-color:hsl(var(--secondary-foreground) / 0.05) /* hsl(var(--secondary-foreground)) */;}
|
|
775
776
|
.bg-secondary-foreground\/60{background-color:hsl(var(--secondary-foreground) / 0.6) /* hsl(var(--secondary-foreground)) */;}
|
|
777
|
+
.bg-sidebar{--un-bg-opacity:1;background-color:hsl(var(--sidebar) / var(--un-bg-opacity)) /* hsl(var(--sidebar)) */;}
|
|
776
778
|
.bg-success,
|
|
777
779
|
.data-\[state\=checked\]\:bg-success[data-state=checked],
|
|
778
780
|
.data-\[state\=indeterminate\]\:bg-success[data-state=indeterminate]{--un-bg-opacity:1;background-color:hsl(var(--success) / var(--un-bg-opacity)) /* hsl(var(--success)) */;}
|
|
@@ -817,6 +819,7 @@
|
|
|
817
819
|
.hover\:bg-primary\/80:hover{background-color:hsl(var(--primary) / 0.8) /* hsl(var(--primary)) */;}
|
|
818
820
|
.hover\:bg-secondary-foreground\/10:hover{background-color:hsl(var(--secondary-foreground) / 0.1) /* hsl(var(--secondary-foreground)) */;}
|
|
819
821
|
.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / 0.8) /* hsl(var(--secondary)) */;}
|
|
822
|
+
.hover\:bg-sidebar:hover{--un-bg-opacity:1;background-color:hsl(var(--sidebar) / var(--un-bg-opacity)) /* hsl(var(--sidebar)) */;}
|
|
820
823
|
.hover\:bg-success\/10:hover{background-color:hsl(var(--success) / 0.1) /* hsl(var(--success)) */;}
|
|
821
824
|
.hover\:bg-success\/80:hover{background-color:hsl(var(--success) / 0.8) /* hsl(var(--success)) */;}
|
|
822
825
|
.hover\:bg-warning\/10:hover{background-color:hsl(var(--warning) / 0.1) /* hsl(var(--warning)) */;}
|
package/dist/variants/layout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{tv as e}from"tailwind-variants";const t=e({slots:{root:`group relative flex w-full h-full data-[side=right]:flex-row-reverse`,sidebarRoot:`h-full hidden md:block`,sidebarWrapper:`absolute inset-y-0 z-10 hidden h-full w-[--soybean-sidebar-width] transition-[left,right,width,opacity] duration-200 ease-linear md:flex`,sidebar:[`flex flex-col w-full h-full bg-sidebar
|
|
1
|
+
import{tv as e}from"tailwind-variants";const t=e({slots:{root:`group relative flex w-full h-full data-[side=right]:flex-row-reverse`,sidebarRoot:`h-full hidden md:block`,sidebarWrapper:`absolute inset-y-0 z-10 hidden h-full w-[--soybean-sidebar-width] transition-[left,right,width,opacity] duration-200 ease-linear md:flex`,sidebar:[`flex flex-col w-full h-full bg-sidebar`,`group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-border group-data-[variant=floating]:border-solid group-data-[variant=floating]:shadow`],sidebarGapHandler:[`relative h-full w-[--soybean-sidebar-width] bg-transparent transition-width duration-200 ease-linear`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`],mobileDrawer:`w-[--soybean-sidebar-width] bg-sidebar p-0 [&>button]:hidden`,mobileOverlay:[`fixed inset-0 z-50 bg-black/80`,`data-[state=open]:animate-in data-[state=open]:fade-in-0`,`data-[state=closed]:animate-out data-[state=closed]:fade-out-0`],mobile:`flex flex-col w-full h-full`,rail:[`absolute inset-y-0 z-20 hidden w-[--soybean-layout-spacing] -translate-x-1/2 transition-all ease-linear sm:flex`,`after:absolute after:inset-y-0 after:left-1/2 after:content-empty after:w-[calc(var(--soybean-layout-spacing)/8)] hover:after:bg-sidebar-border`],trigger:``,main:`relative flex flex-1 flex-col items-stretch bg-background overflow-hidden group-data-[variant=inset]:border`,header:`relative flex items-center shrink-0 h-[--soybean-layout-header-height]`,tab:`shrink-0 h-[--soybean-layout-tab-height]`,content:`grow overflow-auto`,footer:`shrink-0 h-[--soybean-layout-footer-height]`},variants:{size:{xs:{root:`text-2xs [--soybean-layout-spacing:0.75rem]`},sm:{root:`text-xs [--soybean-layout-spacing:0.875rem]`},md:{root:`text-sm [--soybean-layout-spacing:1rem]`},lg:{root:`text-base [--soybean-layout-spacing:1.25rem]`},xl:{root:`text-lg [--soybean-layout-spacing:1.5rem]`},"2xl":{root:`text-xl [--soybean-layout-spacing:1.75rem]`}},variant:{sidebar:{sidebarGapHandler:`group-data-[collapsible=icon]:w-[--soybean-collapsed-sidebar-width]`,sidebarWrapper:`group-data-[collapsible=icon]:w-[--soybean-collapsed-sidebar-width] group-data-[side=left]:border-r group-data-[side=right]:border-l`},floating:{sidebarGapHandler:`w-[calc(var(--soybean-sidebar-width)+var(--soybean-layout-spacing))] group-data-[collapsible=icon]:w-[calc(var(--soybean-collapsed-sidebar-width)+var(--soybean-layout-spacing))]`,sidebarWrapper:`p-[calc(var(--soybean-layout-spacing)/2)] w-[calc(var(--soybean-sidebar-width)+var(--soybean-layout-spacing))] group-data-[collapsible=icon]:w-[calc(var(--soybean-collapsed-sidebar-width)+var(--soybean-layout-spacing))]`},inset:{root:`bg-sidebar-background`,sidebarGapHandler:`w-[calc(var(--soybean-sidebar-width)+var(--soybean-layout-spacing))] group-data-[collapsible=icon]:w-[calc(var(--soybean-collapsed-sidebar-width)+var(--soybean-layout-spacing))]`,sidebarWrapper:`p-[calc(var(--soybean-layout-spacing)/2)] w-[calc(var(--soybean-sidebar-width)+var(--soybean-layout-spacing))] group-data-[collapsible=icon]:w-[calc(var(--soybean-collapsed-sidebar-width)+var(--soybean-layout-spacing))]`,main:`md:m-[calc(var(--soybean-layout-spacing)/2)] md:ml-0 md:rounded-xl md:shadow`}},side:{left:{sidebarWrapper:`left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--soybean-sidebar-width)*-1)]`,rail:`cursor-w-resize group-data-[state=collapsed]:cursor-e-resize -right-[var(--soybean-layout-spacing)]`},right:{sidebarWrapper:`right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--soybean-sidebar-width)*-1)]`,rail:`cursor-e-resize group-data-[state=collapsed]:cursor-w-resize left-0`}},collapsible:{offcanvas:{sidebarWrapper:`group-data-[state=collapsed]:opacity-0`,rail:`translate-x-0 after:left-full hover:bg-sidebar`},icon:{}},tabVisible:{true:{content:``}},fullContent:{true:{tab:`fixed left-0 top-0 z-10 w-full`,content:`fixed inset-0 z-10`}}},compoundVariants:[{side:`left`,collapsible:`offcanvas`,class:{rail:`-right-[var(--soybean-layout-spacing)/2]`}},{side:`right`,collapsible:`offcanvas`,class:{rail:`-left-[var(--soybean-layout-spacing)/2]`}},{side:`left`,variant:`inset`,collapsible:`offcanvas`,class:{rail:`group-data-[state=collapsed]:right-0`}},{side:`right`,variant:`inset`,collapsible:`offcanvas`,class:{rail:`group-data-[state=collapsed]:left-0`}},{side:`left`,variant:`floating`,collapsible:`offcanvas`,class:{rail:`group-data-[state=collapsed]:right-[calc(var(--soybean-layout-spacing)/2)]`}},{side:`right`,variant:`floating`,collapsible:`offcanvas`,class:{rail:`group-data-[state=collapsed]:left-[calc(var(--soybean-layout-spacing)/2)]`}},{variant:`inset`,collapsible:`offcanvas`,class:{main:`md:group-data-[state=collapsed]:ml-[calc(var(--soybean-layout-spacing)/2)]`}},{tabVisible:!0,fullContent:!0,class:{content:`mt-[--soybean-layout-tab-height]`}}],defaultVariants:{variant:`sidebar`,side:`left`,collapsible:`icon`,tabVisible:!0}});export{t as layoutVariants};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soybeanjs/ui",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.8",
|
|
4
4
|
"description": "SoybeanUI is built on top of SoybeanHeadless, providing a collection of styled components for Vue 3.",
|
|
5
5
|
"homepage": "https://github.com/soybeanjs/soybean-ui",
|
|
6
6
|
"bugs": {
|
|
@@ -54,12 +54,12 @@
|
|
|
54
54
|
"tailwind-variants": "^3.2.2",
|
|
55
55
|
"valibot": "^1.2.0",
|
|
56
56
|
"zod": "^4.3.6",
|
|
57
|
-
"@soybeanjs/headless": "^0.5.
|
|
57
|
+
"@soybeanjs/headless": "^0.5.8"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@soybeanjs/cli": "^1.5.0",
|
|
61
61
|
"@soybeanjs/unocss-preset": "^0.2.0",
|
|
62
|
-
"@soybeanjs/unocss-shadcn": "^0.3.
|
|
62
|
+
"@soybeanjs/unocss-shadcn": "^0.3.4",
|
|
63
63
|
"@types/node": "^25.2.1",
|
|
64
64
|
"@unocss/cli": "^66.6.0",
|
|
65
65
|
"@vitest/coverage-v8": "^4.0.18",
|