@soybeanjs/ui 0.23.0 → 0.23.1-beta.1

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.
@@ -1 +1 @@
1
- import{themeSizes as e}from"../../constants/common.js";import t from"../dialog/dialog-provider.js";import n from"../progress/progress-provider.js";import r from"../toast/toast-provider.js";import{provideConfigProviderContext as i}from"./context.js";import a from"../icon/icon.js";import{createBlock as o,createCommentVNode as s,createTextVNode as c,createVNode as l,defineComponent as u,guardReactiveProps as d,h as f,mergeProps as p,normalizeProps as m,openBlock as h,renderSlot as g,toDisplayString as _,unref as v,watch as y,watchEffect as b,withCtx as x}from"vue";import{useOmitProps as S}from"@soybeanjs/headless/composables";import{useStorage as C}from"@vueuse/core";import{ConfigProvider as w}from"@soybeanjs/headless/config-provider";import{Primitive as T}from"@soybeanjs/headless/primitive";import{isClient as E,transformPropsToContext as D}from"@soybeanjs/headless/shared";import{createShadcnTheme as O}from"@soybeanjs/shadcn-theme";const k=u({name:`SConfigProvider`,__name:`config-provider`,props:{theme:{default:()=>({})},size:{default:`md`},iconify:{default:()=>({width:`1.25em`,height:`1.25em`})},progress:{},toast:{},customToast:{type:Boolean},dir:{},locale:{},nonce:{},tooltip:{},nuxt:{type:Boolean},iconRender:{},messages:{}},setup(u){let k=u,A=S(k,[`iconRender`,`theme`,`size`,`iconify`,`progress`,`toast`,`customToast`]),j=k.iconRender??(e=>f(a,{icon:e}));i({...D(k),iconRender:j});let{getCss:M}=O(k.theme),N=()=>M(k.theme,k.theme.radius),P=C(`__SoybeanUI_themeVars`,N());function F(t){if(!E)return;document.documentElement.classList.add(`size-${t}`);let n=e.filter(e=>e!==t).map(e=>`size-${e}`);document.documentElement.classList.remove(...n)}return y(()=>k.size,e=>{F(e)},{immediate:!0,flush:`sync`}),b(()=>{P.value=N()}),(e,i)=>(h(),o(v(w),p(v(A),{"icon-render":v(j)}),{default:x(()=>[l(v(T),{id:`__SoybeanUI_themeVars`,as:`style`},{default:x(()=>[c(_(v(P)),1)]),_:1}),g(e.$slots,`default`),k.customToast?s(`v-if`,!0):(h(),o(r,m(p({key:0},k.toast)),null,16)),l(t),l(n,m(d(k.progress)),null,16)]),_:3},16,[`icon-render`]))}});export{k as default};
1
+ import{themeSizeMap as e}from"../../theme/config.js";import"../../theme/index.js";import t from"../dialog/dialog-provider.js";import n from"../progress/progress-provider.js";import r from"../toast/toast-provider.js";import{provideConfigProviderContext as i}from"./context.js";import a from"./global.js";import o from"../icon/icon.js";import{createBlock as s,createCommentVNode as c,createTextVNode as l,createVNode as u,defineComponent as d,guardReactiveProps as f,h as p,mergeProps as m,normalizeProps as h,openBlock as g,renderSlot as _,toDisplayString as v,unref as y,watchEffect as b,withCtx as x}from"vue";import{useOmitProps as S}from"@soybeanjs/headless/composables";import{useStorage as C}from"@vueuse/core";import{ConfigProvider as w}from"@soybeanjs/headless/config-provider";import{Primitive as T}from"@soybeanjs/headless/primitive";import{isClient as E,transformPropsToContext as D}from"@soybeanjs/headless/shared";import{createShadcnTheme as O}from"@soybeanjs/shadcn-theme";const k=d({name:`SConfigProvider`,__name:`config-provider`,props:{theme:{default:()=>({})},size:{default:`md`},iconify:{default:()=>({width:`1.25em`,height:`1.25em`})},progress:{},toast:{},customToast:{type:Boolean},dir:{},locale:{},nonce:{},tooltip:{},nuxt:{type:Boolean},iconRender:{},messages:{}},setup(d){let k=d,A=S(k,[`iconRender`,`theme`,`size`,`iconify`,`progress`,`toast`,`customToast`]),j=k.iconRender??(e=>p(o,{icon:e}));i({...D(k),iconRender:j});let{getCss:M}=O(k.theme),N=()=>`${a}\n${M(k.theme,k.theme.radius)}`,P=C(`__SoybeanUI_themeVars`,N());return b(()=>{if(!E)return;let t=e[k.size??`md`];document.documentElement.style.fontSize=`${t}px`},{flush:`post`}),b(()=>{P.value=N()}),(e,i)=>(g(),s(y(w),m(y(A),{"icon-render":y(j)}),{default:x(()=>[u(y(T),{id:`__SoybeanUI_themeVars`,as:`style`},{default:x(()=>[l(v(y(P)),1)]),_:1}),_(e.$slots,`default`),k.customToast?c(`v-if`,!0):(g(),s(r,h(m({key:0},k.toast)),null,16)),u(t),u(n,h(f(k.progress)),null,16)]),_:3},16,[`icon-render`]))}});export{k as default};
@@ -0,0 +1,11 @@
1
+ var e=`* {
2
+ border-color: hsl(var(--border) / var(--border-alpha, 1));
3
+ }
4
+ body {
5
+ color: hsl(var(--foreground));
6
+ background: hsl(var(--background));
7
+ }
8
+ button {
9
+ background-color: transparent;
10
+ }
11
+ `;export{e as default};
@@ -4,8 +4,8 @@ import { PageTabsOptionData } from "@soybeanjs/headless/page-tabs";
4
4
  //#region src/components/page-tabs/page-tabs.vue.d.ts
5
5
  declare const __VLS_export: <T extends PageTabsOptionData = PageTabsOptionData>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
6
6
  props: import("vue").PublicProps & __VLS_PrettifyLocal<PageTabsProps<T> & {
7
- onContextmenu?: ((tab: T) => any) | undefined;
8
7
  onClose?: ((tab: T) => any) | undefined;
8
+ onContextmenu?: ((tab: T) => any) | undefined;
9
9
  onClick?: ((tab: T) => any) | undefined;
10
10
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
11
11
  "onUpdate:items"?: ((items: T[]) => any) | undefined;
@@ -12,13 +12,13 @@ type __VLS_Slots = {} & {
12
12
  default?: (props: typeof __VLS_8) => any;
13
13
  };
14
14
  declare const __VLS_base: import("vue").DefineComponent<SplitterPanelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
15
- resize: (size: number, prevSize: number | undefined) => any;
16
15
  collapse: () => any;
17
16
  expand: () => any;
17
+ resize: (size: number, prevSize: number | undefined) => any;
18
18
  }, string, import("vue").PublicProps, Readonly<SplitterPanelProps> & Readonly<{
19
- onResize?: ((size: number, prevSize: number | undefined) => any) | undefined;
20
19
  onCollapse?: (() => any) | undefined;
21
20
  onExpand?: (() => any) | undefined;
21
+ onResize?: ((size: number, prevSize: number | undefined) => any) | undefined;
22
22
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
23
23
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
24
24
  declare const _default: typeof __VLS_export;
@@ -402,9 +402,9 @@ declare const __VLS_export: import("vue").DefineComponent<{
402
402
  onDragging?: ((_value: boolean) => any) | undefined;
403
403
  }>, {
404
404
  class: import("@soybeanjs/headless").ClassValue;
405
- tabindex: number;
406
405
  asChild: boolean;
407
406
  as: string | Function | Record<string, any>;
407
+ tabindex: number;
408
408
  disabled: boolean;
409
409
  withHandle: boolean;
410
410
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1 +1 @@
1
- import{toggleVariants as e}from"../../styles/toggle.js";import{computed as t,createBlock as n,defineComponent as r,guardReactiveProps as i,mergeProps as a,normalizeProps as o,openBlock as s,renderSlot as c,unref as l,withCtx as u}from"vue";import{useOmitProps as d}from"@soybeanjs/headless/composables";import{Toggle as f}from"@soybeanjs/headless/toggle";const p=r({name:`SToggle`,__name:`toggle`,props:{class:{type:[Boolean,null,String,Object,Array]},color:{},size:{},variant:{},shape:{},defaultValue:{type:Boolean},modelValue:{type:Boolean,default:void 0},type:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},emits:[`update:modelValue`],setup(r,{emit:p}){let m=r,h=p,g=d(m,[`class`,`color`,`variant`,`size`,`shape`]),_=t(()=>e({color:m.color,variant:m.variant,size:m.size,shape:m.shape}));return(e,t)=>(s(),n(l(f),a(l(g),{class:_.value,"onUpdate:modelValue":t[0]||=e=>h(`update:modelValue`,e)}),{default:u(t=>[c(e.$slots,`default`,o(i(t)))]),_:3},16,[`class`]))}});export{p as default};
1
+ import{toggleVariants as e}from"../../styles/toggle.js";import{computed as t,createBlock as n,defineComponent as r,guardReactiveProps as i,mergeProps as a,normalizeProps as o,openBlock as s,renderSlot as c,unref as l,withCtx as u}from"vue";import{useOmitProps as d}from"@soybeanjs/headless/composables";import{Toggle as f}from"@soybeanjs/headless/toggle";const p=r({name:`SToggle`,__name:`toggle`,props:{class:{type:[Boolean,null,String,Object,Array]},color:{},size:{},variant:{},shape:{},defaultValue:{type:Boolean},modelValue:{type:Boolean,default:void 0},type:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},emits:[`update:modelValue`],setup(r,{emit:p}){let m=r,h=p,g=d(m,[`class`,`color`,`variant`,`size`,`shape`]),_=t(()=>e({color:m.color,variant:m.variant,size:m.size,shape:m.shape},m.class));return(e,t)=>(s(),n(l(f),a(l(g),{class:_.value,"onUpdate:modelValue":t[0]||=e=>h(`update:modelValue`,e)}),{default:u(t=>[c(e.$slots,`default`,o(i(t)))]),_:3},16,[`class`]))}});export{p as default};
@@ -1 +1 @@
1
- import{scv as e}from"@soybeanjs/cva";const t=e({slots:{root:``,item:`border-b`,header:`flex`,content:[`overflow-hidden transition will-change-auto`,`data-[state=open]:animate-accordion-down data-[state=closed]:animate-accordion-up`],description:`m-0`,trigger:[`flex-1 flex items-center justify-start font-medium transition-all-200 bg-transparent`,`outline-none focus-visible:ring-3 focus-visible:ring-offset-background focus-visible:ring-primary/30`,`hover:underline [&[data-state=open]>.trigger-icon]:rotate-180`],triggerLeadingIcon:`shrink-0`,triggerIcon:`trigger-icon ms-auto shrink-0 text-muted-foreground transition-transform-200`},variants:{size:{xs:{root:`text-2xs`,description:`pb-3`,trigger:`py-3 gap-2.5`},sm:{root:`text-xs`,description:`pb-3.5`,trigger:`py-3.5 gap-3`},md:{root:`text-sm`,description:`pb-4`,trigger:`py-4 gap-3.5`},lg:{root:`text-base`,description:`pb-4.5`,trigger:`py-4.5 gap-4`},xl:{root:`text-lg`,description:`pb-5`,trigger:`py-5 gap-4.5`},"2xl":{root:`text-2xl`,description:`pb-6`,trigger:`py-6 gap-5`}}},defaultVariants:{size:`md`}});export{t as accordionVariants};
1
+ import{scv as e}from"@soybeanjs/cva";const t=e({slots:{root:``,item:`border-b`,header:`flex`,content:[`overflow-hidden transition will-change-auto`,`data-[state=open]:animate-collapsible-down data-[state=closed]:animate-collapsible-up`],description:`m-0`,trigger:[`flex-1 flex items-center justify-start font-medium transition-all-200 bg-transparent`,`outline-none focus-visible:ring-3 focus-visible:ring-offset-background focus-visible:ring-primary/30`,`hover:underline [&[data-state=open]>.trigger-icon]:rotate-180`],triggerLeadingIcon:`shrink-0`,triggerIcon:`trigger-icon ms-auto shrink-0 text-muted-foreground transition-transform-200`},variants:{size:{xs:{root:`text-2xs`,description:`pb-3`,trigger:`py-3 gap-2.5`},sm:{root:`text-xs`,description:`pb-3.5`,trigger:`py-3.5 gap-3`},md:{root:`text-sm`,description:`pb-4`,trigger:`py-4 gap-3.5`},lg:{root:`text-base`,description:`pb-4.5`,trigger:`py-4.5 gap-4`},xl:{root:`text-lg`,description:`pb-5`,trigger:`py-5 gap-4.5`},"2xl":{root:`text-2xl`,description:`pb-6`,trigger:`py-6 gap-5`}}},defaultVariants:{size:`md`}});export{t as accordionVariants};
@@ -1 +1 @@
1
- import{scv as e}from"@soybeanjs/cva";const t=e({slots:{root:``,trigger:``,content:[`overflow-hidden transition will-change-auto`,`data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down`]},variants:{size:{xs:{root:`text-2xs`},sm:{root:`text-xs`},md:{root:`text-sm`},lg:{root:`text-base`},xl:{root:`text-lg`},"2xl":{root:`text-xl`}}}});export{t as collapsibleVariants};
1
+ import{scv as e}from"@soybeanjs/cva";const t=e({slots:{root:``,trigger:``,content:[`overflow-hidden transition will-change-auto`,`data-[state=open]:animate-collapsible-down data-[state=closed]:animate-collapsible-up`]},variants:{size:{xs:{root:`text-2xs`},sm:{root:`text-xs`},md:{root:`text-sm`},lg:{root:`text-base`},xl:{root:`text-lg`},"2xl":{root:`text-xl`}}}});export{t as collapsibleVariants};
@@ -1,7 +1,7 @@
1
1
  import { VariantProps } from "@soybeanjs/cva";
2
2
 
3
3
  //#region src/styles/pagination.d.ts
4
- declare const paginationVariants: import("@soybeanjs/cva").SCVResult<"list" | "next" | "first" | "last" | "ellipsis" | "root" | "prev" | "listItem", NoInfer<{
4
+ declare const paginationVariants: import("@soybeanjs/cva").SCVResult<"list" | "next" | "root" | "first" | "last" | "ellipsis" | "prev" | "listItem", NoInfer<{
5
5
  size: {
6
6
  xs: {
7
7
  list: "gap-0.75 text-2xs";
@@ -1,7 +1,7 @@
1
1
  import { VariantProps } from "@soybeanjs/cva";
2
2
 
3
3
  //#region src/styles/switch.d.ts
4
- declare const switchVariants: import("@soybeanjs/cva").SCVResult<"root" | "thumb" | "control", NoInfer<{
4
+ declare const switchVariants: import("@soybeanjs/cva").SCVResult<"root" | "control" | "thumb", NoInfer<{
5
5
  color: {
6
6
  primary: {
7
7
  control: "data-[state=checked]:bg-primary focus-visible:ring-primary/30";
@@ -1,7 +1,7 @@
1
1
  import { VariantProps } from "@soybeanjs/cva";
2
2
 
3
3
  //#region src/styles/table.d.ts
4
- declare const tableVariants: import("@soybeanjs/cva").SCVResult<"header" | "content" | "footer" | "fixed" | "scroll" | "body" | "head" | "cell" | "row" | "root" | "resizeHandle" | "selection" | "sortTrigger" | "filterInput" | "treeCell" | "treeToggle" | "treeTogglePlaceholder" | "filterTrigger" | "filterPopup" | "filterSearch" | "filterOptions" | "filterOption" | "filterOptionLabel" | "filterFooter" | "filterCount" | "filterAction" | "filterEmpty" | "radioIndicator" | "radioRoot", NoInfer<{
4
+ declare const tableVariants: import("@soybeanjs/cva").SCVResult<"header" | "content" | "footer" | "fixed" | "root" | "resizeHandle" | "body" | "head" | "scroll" | "cell" | "row" | "sortTrigger" | "filterInput" | "treeCell" | "treeToggle" | "treeTogglePlaceholder" | "selection" | "filterTrigger" | "filterPopup" | "filterSearch" | "filterOptions" | "filterOption" | "filterOptionLabel" | "filterFooter" | "filterCount" | "filterAction" | "filterEmpty" | "radioIndicator" | "radioRoot", NoInfer<{
5
5
  size: {
6
6
  xs: {
7
7
  root: "text-2xs";
@@ -68,8 +68,8 @@ declare const tabsVariants: import("@soybeanjs/cva").SCVResult<"list" | "content
68
68
  };
69
69
  };
70
70
  }>, {
71
- fill?: "auto" | "full" | undefined;
72
71
  size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | undefined;
72
+ fill?: "auto" | "full" | undefined;
73
73
  shape?: "rounded" | "square" | undefined;
74
74
  orientation?: "horizontal" | "vertical" | undefined;
75
75
  enableIndicator?: boolean | undefined;
@@ -1 +1 @@
1
- import{scv as e}from"@soybeanjs/cva";const t=e({slots:{root:`group flex-1 flex flex-col w-full h-full overflow-auto data-[state=collapsed]:w-[--soybean-tree-menu-collapsed-width] transition-[width,height]-200 ease-out`,groupRoot:`group-data-[state=collapsed]:mb-0`,group:`flex flex-col m-0 p-0 list-none`,groupLabel:`flex items-center text-foreground/70 group-data-[state=collapsed]:size-0 group-data-[state=collapsed]:p-0 group-data-[state=collapsed]:opacity-0 group-data-[state=collapsed]:overflow-hidden transition-[height,padding,opacity]-200`,item:`relative m-0 p-0 group-data-[state=collapsed]:hover:bg-sidebar-accent group-data-[state=collapsed]:hover:rounded-sm`,button:[`group/button relative flex items-center w-full rounded-sm outline-none cursor-pointer select-none group-data-[state=collapsed]:overflow-hidden`,`data-[active=true]:bg-primary/10 data-[active=true]:text-primary`,`data-[active=false]:hover:bg-sidebar-accent data-[active=false]:focus:bg-sidebar-accent`,`data-[child-active]:text-primary`,`data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`],collapsibleRoot:``,collapsibleTrigger:``,collapsibleContent:[`overflow-hidden transition will-change-auto`,`data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down`],collapsibleIcon:`shrink-0 ms-auto text-muted-foreground transition-transform-200 group-data-[state=open]/button:rotate-90 group-data-[child-active]/button:text-primary`,sub:`flex flex-col m-0 list-none ms-[--soybean-tree-menu-indent] border-s border-sidebar-border border-solid`,itemLabel:`truncate`,itemLinkIcon:`shrink-0 self-start text-muted-foreground rtl:rotate-270`,itemBadge:``,itemTag:`shrink-0 ms-auto inline-flex items-center rounded-sm bg-accent/15 text-accent-foreground`,itemAction:[`absolute end-0 top-1/2 -translate-y-1/2 z-2 inline-flex items-center justify-center rounded-sm text-muted-foreground outline-none transition-colors`,`focus-visible:bg-sidebar-accent focus-visible:text-foreground focus-visible:ring-3 focus-visible:ring-accent-foreground/20`,`disabled:pointer-events-none disabled:opacity-50`],itemAbsolute:`absolute inset-0 z-1 cursor-pointer`},variants:{size:{xs:{root:`gap-0.875 p-1.5 text-2xs`,groupRoot:`mb-0.875`,groupLabel:`h-6 gap-1 px-1.5 py-1 text-3xs`,group:`gap-0.875`,button:`gap-1.5 h-6 px-1.5 py-1 group-data-[state=collapsed]:w-6`,sub:`gap-0.875 ps-1.5 pt-0.875`,subButton:`gap-1.5 h-6 px-1.5 py-1 group-data-[state=collapsed]:w-6`,itemLinkIcon:`size-2 -ms-1`,itemTag:`min-h-3.5 px-1 text-4xs`,itemAction:`end-1 size-4 text-2xs`},sm:{root:`gap-1 p-1.75 text-xs`,groupRoot:`mb-1`,groupLabel:`h-7 gap-1.5 px-1.75 py-1 text-2xs`,group:`gap-1`,button:`gap-1.75 h-7 px-1.75 py-1 group-data-[state=collapsed]:w-7`,sub:`gap-1 ps-1.75 pt-1`,subButton:`gap-1.75 h-7 px-1.75 py-1 group-data-[state=collapsed]:w-7`,itemLinkIcon:`size-2.5 -ms-1.5`,itemTag:`min-h-4 px-1.25 text-3xs`,itemAction:`end-1.25 size-4.5 text-xs`},md:{root:`gap-1.25 p-2 text-sm`,groupRoot:`mb-1.25`,groupLabel:`h-8 gap-2 px-2 py-1.5 text-xs`,group:`gap-1.25`,button:`gap-2 h-8 px-2 py-1.5 group-data-[state=collapsed]:w-8`,sub:`gap-1.25 ps-2 pt-1.25`,subButton:`gap-2 h-8 px-2 py-1.5 group-data-[state=collapsed]:w-8`,itemLinkIcon:`size-3 -ms-2`,itemTag:`min-h-4.5 px-1.5 text-2xs`,itemAction:`end-1.5 size-5 text-sm`},lg:{root:`gap-1.5 p-2.25 text-base`,groupRoot:`mb-1.5`,groupLabel:`h-9 gap-2.5 px-2.25 py-1.5 text-sm`,group:`gap-1.5`,button:`gap-2.25 h-9 px-2.25 py-1.5 group-data-[state=collapsed]:w-9`,sub:`gap-1.5 ps-2.25 pt-1.5`,subButton:`gap-2.25 h-9 px-2.25 py-1.5 group-data-[state=collapsed]:w-9`,itemLinkIcon:`size-3.5 -ms-2.5`,itemTag:`min-h-5 px-1.75 text-xs`,itemAction:`end-1.75 size-5.5 text-base`},xl:{root:`gap-2 p-2.5 text-lg`,groupRoot:`mb-2`,groupLabel:`h-10 gap-3 px-2.5 py-2 text-base`,group:`gap-2`,button:`gap-2.5 h-10 px-2.5 py-2 group-data-[state=collapsed]:w-10`,sub:`gap-2 ps-2.5 pt-2`,subButton:`gap-2.5 h-10 px-2.5 py-2 group-data-[state=collapsed]:w-10`,itemLinkIcon:`size-4 -ms-3`,itemTag:`min-h-5.5 px-2 text-sm`,itemAction:`end-2 size-6 text-lg`},"2xl":{root:`gap-2.5 p-3 text-xl`,groupRoot:`mb-2.5`,groupLabel:`h-12 gap-3.5 px-3 py-2.5 text-lg`,group:`gap-2.5`,button:`gap-3 h-12 px-3 py-2.5 group-data-[state=collapsed]:w-12`,sub:`gap-2.5 ps-3 pt-2.5`,subButton:`gap-3 h-12 px-3 py-2.5 group-data-[state=collapsed]:w-12`,itemLinkIcon:`size-5 -ms-4`,itemTag:`min-h-6 px-2.5 text-base`,itemAction:`end-2.5 size-7 text-xl`}}},defaultVariants:{size:`md`}});export{t as treeMenuVariants};
1
+ import{scv as e}from"@soybeanjs/cva";const t=e({slots:{root:`group flex-1 flex flex-col w-full h-full overflow-auto data-[state=collapsed]:w-[--soybean-tree-menu-collapsed-width] transition-[width,height]-200 ease-out`,groupRoot:`group-data-[state=collapsed]:mb-0`,group:`flex flex-col m-0 p-0 list-none`,groupLabel:`flex items-center text-foreground/70 group-data-[state=collapsed]:size-0 group-data-[state=collapsed]:p-0 group-data-[state=collapsed]:opacity-0 group-data-[state=collapsed]:overflow-hidden transition-[height,padding,opacity]-200`,item:`relative m-0 p-0 group-data-[state=collapsed]:hover:bg-sidebar-accent group-data-[state=collapsed]:hover:rounded-sm`,button:[`group/button relative flex items-center w-full rounded-sm outline-none cursor-pointer select-none group-data-[state=collapsed]:overflow-hidden`,`data-[active=true]:bg-primary/10 data-[active=true]:text-primary`,`data-[active=false]:hover:bg-sidebar-accent data-[active=false]:focus:bg-sidebar-accent`,`data-[child-active]:text-primary`,`data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`],collapsibleRoot:``,collapsibleTrigger:``,collapsibleContent:[`overflow-hidden transition will-change-auto`,`data-[state=open]:animate-collapsible-down data-[state=closed]:animate-collapsible-up`],collapsibleIcon:`shrink-0 ms-auto text-muted-foreground transition-transform-200 group-data-[state=open]/button:rotate-90 group-data-[child-active]/button:text-primary`,sub:`flex flex-col m-0 list-none ms-[--soybean-tree-menu-indent] border-s border-sidebar-border border-solid`,itemLabel:`truncate`,itemLinkIcon:`shrink-0 self-start text-muted-foreground rtl:rotate-270`,itemBadge:``,itemTag:`shrink-0 ms-auto inline-flex items-center rounded-sm bg-accent/15 text-accent-foreground`,itemAction:[`absolute end-0 top-1/2 -translate-y-1/2 z-2 inline-flex items-center justify-center rounded-sm text-muted-foreground outline-none transition-colors`,`focus-visible:bg-sidebar-accent focus-visible:text-foreground focus-visible:ring-3 focus-visible:ring-accent-foreground/20`,`disabled:pointer-events-none disabled:opacity-50`],itemAbsolute:`absolute inset-0 z-1 cursor-pointer`},variants:{size:{xs:{root:`gap-0.875 p-1.5 text-2xs`,groupRoot:`mb-0.875`,groupLabel:`h-6 gap-1 px-1.5 py-1 text-3xs`,group:`gap-0.875`,button:`gap-1.5 h-6 px-1.5 py-1 group-data-[state=collapsed]:w-6`,sub:`gap-0.875 ps-1.5 pt-0.875`,subButton:`gap-1.5 h-6 px-1.5 py-1 group-data-[state=collapsed]:w-6`,itemLinkIcon:`size-2 -ms-1`,itemTag:`min-h-3.5 px-1 text-4xs`,itemAction:`end-1 size-4 text-2xs`},sm:{root:`gap-1 p-1.75 text-xs`,groupRoot:`mb-1`,groupLabel:`h-7 gap-1.5 px-1.75 py-1 text-2xs`,group:`gap-1`,button:`gap-1.75 h-7 px-1.75 py-1 group-data-[state=collapsed]:w-7`,sub:`gap-1 ps-1.75 pt-1`,subButton:`gap-1.75 h-7 px-1.75 py-1 group-data-[state=collapsed]:w-7`,itemLinkIcon:`size-2.5 -ms-1.5`,itemTag:`min-h-4 px-1.25 text-3xs`,itemAction:`end-1.25 size-4.5 text-xs`},md:{root:`gap-1.25 p-2 text-sm`,groupRoot:`mb-1.25`,groupLabel:`h-8 gap-2 px-2 py-1.5 text-xs`,group:`gap-1.25`,button:`gap-2 h-8 px-2 py-1.5 group-data-[state=collapsed]:w-8`,sub:`gap-1.25 ps-2 pt-1.25`,subButton:`gap-2 h-8 px-2 py-1.5 group-data-[state=collapsed]:w-8`,itemLinkIcon:`size-3 -ms-2`,itemTag:`min-h-4.5 px-1.5 text-2xs`,itemAction:`end-1.5 size-5 text-sm`},lg:{root:`gap-1.5 p-2.25 text-base`,groupRoot:`mb-1.5`,groupLabel:`h-9 gap-2.5 px-2.25 py-1.5 text-sm`,group:`gap-1.5`,button:`gap-2.25 h-9 px-2.25 py-1.5 group-data-[state=collapsed]:w-9`,sub:`gap-1.5 ps-2.25 pt-1.5`,subButton:`gap-2.25 h-9 px-2.25 py-1.5 group-data-[state=collapsed]:w-9`,itemLinkIcon:`size-3.5 -ms-2.5`,itemTag:`min-h-5 px-1.75 text-xs`,itemAction:`end-1.75 size-5.5 text-base`},xl:{root:`gap-2 p-2.5 text-lg`,groupRoot:`mb-2`,groupLabel:`h-10 gap-3 px-2.5 py-2 text-base`,group:`gap-2`,button:`gap-2.5 h-10 px-2.5 py-2 group-data-[state=collapsed]:w-10`,sub:`gap-2 ps-2.5 pt-2`,subButton:`gap-2.5 h-10 px-2.5 py-2 group-data-[state=collapsed]:w-10`,itemLinkIcon:`size-4 -ms-3`,itemTag:`min-h-5.5 px-2 text-sm`,itemAction:`end-2 size-6 text-lg`},"2xl":{root:`gap-2.5 p-3 text-xl`,groupRoot:`mb-2.5`,groupLabel:`h-12 gap-3.5 px-3 py-2.5 text-lg`,group:`gap-2.5`,button:`gap-3 h-12 px-3 py-2.5 group-data-[state=collapsed]:w-12`,sub:`gap-2.5 ps-3 pt-2.5`,subButton:`gap-3 h-12 px-3 py-2.5 group-data-[state=collapsed]:w-12`,itemLinkIcon:`size-5 -ms-4`,itemTag:`min-h-6 px-2.5 text-base`,itemAction:`end-2.5 size-7 text-xl`}}},defaultVariants:{size:`md`}});export{t as treeMenuVariants};
package/dist/styles.css CHANGED
@@ -6,45 +6,6 @@
6
6
  .data-\[motion\^\=to-\]\:animate-out[data-motion^=to-],
7
7
  .data-\[state\=closed\]\:animate-out[data-state=closed],
8
8
  .data-\[state\=hidden\]\:animate-out[data-state=hidden]{animation:una-out;animation-name:una-out;animation-duration:150ms;--una-exit-opacity:initial;--una-exit-scale:initial;--una-exit-rotate:initial;--una-exit-translate-x:initial;--una-exit-translate-y:initial;}
9
- /* layer: preflights */
10
- *,::before,::after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / 0.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: ;}::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / 0.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: ;}
11
-
12
- * {
13
- border-color: hsl(var(--border) / var(--border-alpha, 1));
14
- }
15
-
16
- button {
17
- background-color: transparent;
18
- }
19
-
20
- body {
21
- color: hsl(var(--foreground));
22
- background: hsl(var(--background));
23
- }
24
-
25
- html.size-xs {
26
- font-size: 12px;
27
- }
28
- html.size-sm {
29
- font-size: 14px;
30
- }
31
- html.size-md {
32
- font-size: 16px;
33
- }
34
- html.size-lg {
35
- font-size: 18px;
36
- }
37
- html.size-xl {
38
- font-size: 20px;
39
- }
40
- html.size-2xl {
41
- font-size: 24px;
42
- }
43
-
44
- @keyframes shadcn-down { from{ height: 0 } to { height: var(--soybean-accordion-content-height)} }
45
- @keyframes shadcn-up { from{ height: var(--soybean-accordion-content-height)} to { height: 0 } }
46
- @keyframes shadcn-collapsible-down { from{ height: 0 } to { height: var(--soybean-collapsible-content-height)} }
47
- @keyframes shadcn-collapsible-up { from{ height: var(--soybean-collapsible-content-height)} to { height: 0 } }
48
9
  /* layer: shortcuts */
49
10
  .container{width:100%;}
50
11
  @media (min-width: 640px){
@@ -387,7 +348,6 @@
387
348
  .block,
388
349
  .group:hover .group-hover\:block{display:block;}
389
350
  .inline-block{display:inline-block;}
390
- .contents{display:contents;}
391
351
  .hidden{display:none;}
392
352
  .aspect-square{aspect-ratio:1/1;}
393
353
  .\[\&_svg\:not\(\[class\*\=size-\]\)\]\:size-4 svg:not([class*=size-]),
@@ -544,7 +504,6 @@
544
504
  .max-h-60{max-height:15rem;}
545
505
  .max-h-65{max-height:16.25rem;}
546
506
  .max-h-70{max-height:17.5rem;}
547
- .max-h-72{max-height:18rem;}
548
507
  .max-h-75{max-height:18.75rem;}
549
508
  .max-h-80{max-height:20rem;}
550
509
  .max-h-90{max-height:22.5rem;}
@@ -607,7 +566,6 @@
607
566
  .w-\[--soybean-tabs-indicator-size\]{width:var(--soybean-tabs-indicator-size);}
608
567
  .w-\[calc\(var\(--soybean-sidebar-width\)\+var\(--soybean-layout-spacing\)\)\]{width:calc(var(--soybean-sidebar-width) + var(--soybean-layout-spacing));}
609
568
  .w-0\.5{width:0.125rem;}
610
- .w-0\.75{width:0.1875rem;}
611
569
  .w-100{width:25rem;}
612
570
  .w-11{width:2.75rem;}
613
571
  .w-110{width:27.5rem;}
@@ -669,7 +627,6 @@
669
627
  .flex-shrink-0,
670
628
  .group[data-orientation=horizontal] .group-data-\[orientation\=horizontal\]\:shrink-0,
671
629
  .shrink-0{flex-shrink:0;}
672
- .flex-shrink{flex-shrink:1;}
673
630
  .flex-grow,
674
631
  .grow{flex-grow:1;}
675
632
  .grow-0{flex-grow:0;}
@@ -741,8 +698,12 @@
741
698
  .transform-gpu{transform:translate3d(var(--un-translate-x), var(--un-translate-y), var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotateZ(var(--un-rotate-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z));}
742
699
  @keyframes una-in{from{opacity:var(--una-enter-opacity,1);transform:translate3d(var(--una-enter-translate-x,0),var(--una-enter-translate-y,0),0) scale3d(var(--una-enter-scale,1),var(--una-enter-scale,1),var(--una-enter-scale,1)) rotate(var(--una-enter-rotate,0))}}
743
700
  @keyframes una-out{to{opacity:var(--una-exit-opacity,1);transform:translate3d(var(--una-exit-translate-x,0),var(--una-exit-translate-y,0),0) scale3d(var(--una-exit-scale,1),var(--una-exit-scale,1),var(--una-exit-scale,1)) rotate(var(--una-exit-rotate,0))}}
701
+ @keyframes collapsible-down{from{ height: 0 } to { height: var(--soybean-collapsible-content-height)}}
702
+ @keyframes collapsible-up{from{ height: var(--soybean-collapsible-content-height)} to { height: 0 }}
744
703
  @keyframes pulse{0%, 100% {opacity:1} 50% {opacity:.5}}
745
704
  .animate-pulse{animation:pulse 2s cubic-bezier(0.4,0,.6,1) infinite;}
705
+ .data-\[state\=closed\]\:animate-collapsible-up[data-state=closed]{animation:collapsible-up 200ms ease-out 1;}
706
+ .data-\[state\=open\]\:animate-collapsible-down[data-state=open]{animation:collapsible-down 200ms ease-out 1;}
746
707
  .cursor-default,
747
708
  .data-\[disabled\]\:cursor-default[data-disabled],
748
709
  .data-\[readonly\]\:cursor-default[data-readonly]{cursor:default;}
@@ -1061,7 +1022,6 @@
1061
1022
  .data-\[state\=active\]\:bg-info\/10[data-state=active]{background-color:hsl(var(--info) / 0.1) /* hsl(var(--info)) */;}
1062
1023
  .bg-muted{--un-bg-opacity:1;background-color:hsl(var(--muted) / var(--un-bg-opacity)) /* hsl(var(--muted)) */;}
1063
1024
  .bg-muted-foreground{--un-bg-opacity:1;background-color:hsl(var(--muted-foreground) / var(--un-bg-opacity)) /* hsl(var(--muted-foreground)) */;}
1064
- .bg-muted-foreground\/70{background-color:hsl(var(--muted-foreground) / 0.7) /* hsl(var(--muted-foreground)) */;}
1065
1025
  .bg-popover{--un-bg-opacity:1;background-color:hsl(var(--popover) / var(--un-bg-opacity)) /* hsl(var(--popover)) */;}
1066
1026
  .bg-primary\/10,
1067
1027
  .data-\[active\=true\]\:bg-primary\/10[data-active=true],
@@ -1247,8 +1207,6 @@
1247
1207
  .px-1\.5{padding-left:0.375rem;padding-right:0.375rem;}
1248
1208
  .data-\[segment\=timeZoneName\]\:px-2[data-segment=timeZoneName],
1249
1209
  .px-2{padding-left:0.5rem;padding-right:0.5rem;}
1250
- .px,
1251
- .px-4{padding-left:1rem;padding-right:1rem;}
1252
1210
  .px-0\.625{padding-left:0.15625rem;padding-right:0.15625rem;}
1253
1211
  .px-0\.875{padding-left:0.21875rem;padding-right:0.21875rem;}
1254
1212
  .px-1\.125{padding-left:0.28125rem;padding-right:0.28125rem;}
@@ -1260,6 +1218,7 @@
1260
1218
  .px-2\.875{padding-left:0.71875rem;padding-right:0.71875rem;}
1261
1219
  .px-3{padding-left:0.75rem;padding-right:0.75rem;}
1262
1220
  .px-3\.5{padding-left:0.875rem;padding-right:0.875rem;}
1221
+ .px-4{padding-left:1rem;padding-right:1rem;}
1263
1222
  .px-4\.5{padding-left:1.125rem;padding-right:1.125rem;}
1264
1223
  .px-5{padding-left:1.25rem;padding-right:1.25rem;}
1265
1224
  .px-6{padding-left:1.5rem;padding-right:1.5rem;}
@@ -1648,7 +1607,6 @@
1648
1607
  .focus-within\:ring-offset-background:focus-within{--un-ring-offset-opacity:1;--un-ring-offset-color:hsl(var(--background) / var(--un-ring-offset-opacity)) /* hsl(var(--background)) */;}
1649
1608
  .focus\:ring-offset-background:focus{--un-ring-offset-opacity:1;--un-ring-offset-color:hsl(var(--background) / var(--un-ring-offset-opacity)) /* hsl(var(--background)) */;}
1650
1609
  .focus-visible\:ring-offset-background:focus-visible{--un-ring-offset-opacity:1;--un-ring-offset-color:hsl(var(--background) / var(--un-ring-offset-opacity)) /* hsl(var(--background)) */;}
1651
- .filter{filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia);}
1652
1610
  .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}
1653
1611
  .transition-\[border-color\,box-shadow\,transform\]{transition-property:border-color,box-shadow,transform;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}
1654
1612
  .transition-\[box-shadow\,background-color\]{transition-property:box-shadow,background-color;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}
@@ -1720,10 +1678,6 @@
1720
1678
  .data-\[state\=closed\]\:slide-out-to-bottom[data-state=closed]{--una-exit-translate-y:100%;}
1721
1679
  .data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--una-exit-translate-x:-50%;}
1722
1680
  .data-\[state\=closed\]\:slide-out-to-top[data-state=closed]{--una-exit-translate-y:-100%;}
1723
- .data-\[state\=open\]\:animate-accordion-down[data-state=open]{animation:shadcn-down 0.2s ease-out;}
1724
- .data-\[state\=closed\]\:animate-accordion-up[data-state=closed]{animation:shadcn-up 0.2s ease-out;}
1725
- .data-\[state\=open\]\:animate-collapsible-down[data-state=open]{animation:shadcn-collapsible-down 0.2s ease-out;}
1726
- .data-\[state\=closed\]\:animate-collapsible-up[data-state=closed]{animation:shadcn-collapsible-up 0.2s ease-out;}
1727
1681
  @supports (overflow:clip){
1728
1682
  .supports-\[overflow\:clip\]\:overflow-clip{overflow:clip;}
1729
1683
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soybeanjs/ui",
3
- "version": "0.23.0",
3
+ "version": "0.23.1-beta.1",
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": {
@@ -52,13 +52,13 @@
52
52
  "fuse.js": "^7.3.0",
53
53
  "valibot": "^1.4.0",
54
54
  "zod": "^4.4.3",
55
- "@soybeanjs/headless": "^0.23.0"
55
+ "@soybeanjs/headless": "^0.23.1-beta.1"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@soybeanjs/cli": "^1.7.2",
59
59
  "@soybeanjs/eslint-config-vue": "^0.0.2",
60
60
  "@soybeanjs/unocss-preset": "^0.2.0",
61
- "@soybeanjs/unocss-shadcn": "^0.4.0",
61
+ "@soybeanjs/unocss-shadcn": "^0.5.0",
62
62
  "@types/node": "^25.9.0",
63
63
  "@unocss/cli": "^66.6.8",
64
64
  "@vitejs/plugin-vue": "^6.0.7",
@@ -100,7 +100,7 @@
100
100
  },
101
101
  "scripts": {
102
102
  "build": "pnpm build:headless && pnpm build:ui && pnpm build:css && pnpm sui skills",
103
- "build:css": "unocss build",
103
+ "build:css": "unocss 'src/styles/**/*.ts' -o dist/styles.css --preflights false",
104
104
  "build:docs": "pnpm --filter @soybeanjs/ui-docs build",
105
105
  "build:headless": "pnpm --filter @soybeanjs/headless build",
106
106
  "build:play": "vite build",
@@ -115,7 +115,7 @@
115
115
  "preview:docs": "pnpm --filter @soybeanjs/ui-docs preview",
116
116
  "publish-pkg": "pnpm publish -r --access public",
117
117
  "release": "soy release -e 'pnpm release-execute'",
118
- "release-execute": "pnpm sui skills && pnpm sui changelog && pnpm sui changelog-translate",
118
+ "release-execute": "pnpm soy changelog && pnpm sui skills && pnpm sui changelog && pnpm sui changelog-translate",
119
119
  "sui": "tsx scripts/cli.ts",
120
120
  "test": "vitest run",
121
121
  "test:coverage": "vitest run --coverage",
@@ -1 +0,0 @@
1
- const e=[`xs`,`sm`,`md`,`lg`,`xl`,`2xl`];export{e as themeSizes};