@soybeanjs/ui 0.10.5 → 0.11.0

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.
@@ -33,8 +33,8 @@ declare const __VLS_base: vue.DefineComponent<DialogPureProps, {}, {}, {}, {}, v
33
33
  }>, {
34
34
  closable: boolean;
35
35
  open: boolean;
36
- defaultOpen: boolean;
37
36
  modal: boolean;
37
+ defaultOpen: 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;
@@ -48,8 +48,8 @@ declare const __VLS_base: vue.DefineComponent<DialogProps, {}, {}, {}, {}, vue.C
48
48
  }>, {
49
49
  closable: boolean;
50
50
  open: boolean;
51
- defaultOpen: boolean;
52
51
  modal: boolean;
52
+ defaultOpen: 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;
@@ -48,8 +48,8 @@ declare const __VLS_base: vue.DefineComponent<DrawerProps, {}, {}, {}, {}, vue.C
48
48
  }>, {
49
49
  closable: boolean;
50
50
  open: boolean;
51
- defaultOpen: boolean;
52
51
  modal: boolean;
52
+ defaultOpen: 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;
@@ -1 +1 @@
1
- import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import t from"../icon/icon.js";import{paginationVariants as n}from"./variants.js";import{Fragment as r,computed as i,createBlock as a,createCommentVNode as o,createElementBlock as s,createVNode as c,defineComponent as l,guardReactiveProps as u,mergeProps as d,normalizeProps as f,openBlock as p,renderList as m,renderSlot as h,unref as g,withCtx as _}from"vue";import{useOmitProps as v}from"@soybeanjs/headless/composables";import{PaginationEllipsis as y,PaginationFirst as b,PaginationLast as x,PaginationList as S,PaginationListItem as C,PaginationNext as w,PaginationPrev as T,PaginationRoot as E,providePaginationUi as D}from"@soybeanjs/headless";const O=l({name:`SPagination`,__name:`pagination`,props:{class:{},ui:{},size:{},variant:{},shape:{},actionAsSelected:{type:Boolean},showFirstOrLast:{type:Boolean,default:!0},listProps:{},listItemProps:{},ellipsisProps:{},firstProps:{},prevProps:{},nextProps:{},lastProps:{},page:{},defaultPage:{},itemsPerPage:{},total:{},siblingCount:{},disabled:{type:Boolean},showEdges:{type:Boolean}},emits:[`update:page`],setup(l,{emit:O}){let k=l,A=O,j=v(k,[`class`,`ui`,`size`,`variant`,`shape`,`actionAsSelected`,`showFirstOrLast`,`listProps`,`listItemProps`,`ellipsisProps`,`firstProps`,`prevProps`,`nextProps`,`lastProps`]),M=i(()=>k.actionAsSelected?``:void 0);return D(i(()=>{let t=n({size:k.size,variant:k.variant,shape:k.shape,actionAsSelected:k.actionAsSelected}),{button:r,navigationButton:i}=t;return e({...t,listItem:r,first:i,prev:i,next:i,last:i},k.ui,{root:k.class})})),(e,n)=>(p(),a(g(E),d(g(j),{"onUpdate:page":n[0]||=e=>A(`update:page`,e)}),{default:_(()=>[c(g(S),f(u(k.listProps)),{default:_(({items:n})=>[l.showFirstOrLast?(p(),a(g(b),d({key:0},k.firstProps,{"data-selected":M.value}),{default:_(()=>[h(e.$slots,`first`,{},()=>[c(t,{icon:`lucide:chevrons-left`})])]),_:3},16,[`data-selected`])):o(`v-if`,!0),c(g(T),d(k.prevProps,{"data-selected":M.value}),{default:_(()=>[h(e.$slots,`prev`,{},()=>[c(t,{icon:`lucide:chevron-left`})])]),_:3},16,[`data-selected`]),(p(!0),s(r,null,m(n,n=>(p(),s(r,{key:n},[n.type===`page`?(p(),a(g(C),d({key:0,ref_for:!0},k.listItemProps,{value:n.value}),null,16,[`value`])):n.type===`ellipsis`?(p(),a(g(y),d({key:1,ref_for:!0},k.ellipsisProps),{default:_(()=>[h(e.$slots,`ellipsis`,{},()=>[c(t,{icon:`lucide:ellipsis`})])]),_:3},16)):o(`v-if`,!0)],64))),128)),c(g(w),d(k.nextProps,{"data-selected":M.value}),{default:_(()=>[h(e.$slots,`next`,{},()=>[c(t,{icon:`lucide:chevron-right`})])]),_:3},16,[`data-selected`]),l.showFirstOrLast?(p(),a(g(x),d({key:1},k.lastProps,{"data-selected":M.value}),{default:_(()=>[h(e.$slots,`last`,{},()=>[c(t,{icon:`lucide:chevrons-right`})])]),_:3},16,[`data-selected`])):o(`v-if`,!0)]),_:3},16)]),_:3},16))}});export{O as default};
1
+ import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import t from"../icon/icon.js";import{paginationVariants as n}from"./variants.js";import{Fragment as r,computed as i,createBlock as a,createCommentVNode as o,createElementBlock as s,createVNode as c,defineComponent as l,guardReactiveProps as u,mergeProps as d,normalizeProps as f,openBlock as p,renderList as m,renderSlot as h,unref as g,withCtx as _}from"vue";import{useOmitProps as v}from"@soybeanjs/headless/composables";import{PaginationEllipsis as y,PaginationFirst as b,PaginationLast as x,PaginationList as S,PaginationListItem as C,PaginationNext as w,PaginationPrev as T,PaginationRoot as E,providePaginationUi as D}from"@soybeanjs/headless";const O=l({name:`SPagination`,__name:`pagination`,props:{class:{},ui:{},size:{},variant:{},shape:{},actionAsSelected:{type:Boolean},showFirstOrLast:{type:Boolean,default:!0},listProps:{},listItemProps:{},ellipsisProps:{},firstProps:{},prevProps:{},nextProps:{},lastProps:{},page:{},defaultPage:{},pageSize:{},defaultPageSize:{},total:{},siblingCount:{},disabled:{type:Boolean},showEdges:{type:Boolean}},emits:[`update:page`,`update:pageSize`],setup(l,{emit:O}){let k=l,A=O,j=v(k,[`class`,`ui`,`size`,`variant`,`shape`,`actionAsSelected`,`showFirstOrLast`,`listProps`,`listItemProps`,`ellipsisProps`,`firstProps`,`prevProps`,`nextProps`,`lastProps`]),M=i(()=>k.actionAsSelected?``:void 0);return D(i(()=>{let t=n({size:k.size,variant:k.variant,shape:k.shape,actionAsSelected:k.actionAsSelected}),{button:r,navigationButton:i}=t;return e({...t,listItem:r,first:i,prev:i,next:i,last:i},k.ui,{root:k.class})})),(e,n)=>(p(),a(g(E),d(g(j),{"onUpdate:page":n[0]||=e=>A(`update:page`,e),"onUpdate:pageSize":n[1]||=e=>A(`update:pageSize`,e)}),{default:_(()=>[c(g(S),f(u(k.listProps)),{default:_(({items:n})=>[l.showFirstOrLast?(p(),a(g(b),d({key:0},k.firstProps,{"data-selected":M.value}),{default:_(()=>[h(e.$slots,`first`,{},()=>[c(t,{icon:`lucide:chevrons-left`})])]),_:3},16,[`data-selected`])):o(`v-if`,!0),c(g(T),d(k.prevProps,{"data-selected":M.value}),{default:_(()=>[h(e.$slots,`prev`,{},()=>[c(t,{icon:`lucide:chevron-left`})])]),_:3},16,[`data-selected`]),(p(!0),s(r,null,m(n,n=>(p(),s(r,{key:n},[n.type===`page`?(p(),a(g(C),d({key:0,ref_for:!0},k.listItemProps,{value:n.value}),null,16,[`value`])):n.type===`ellipsis`?(p(),a(g(y),d({key:1,ref_for:!0},k.ellipsisProps),{default:_(()=>[h(e.$slots,`ellipsis`,{},()=>[c(t,{icon:`lucide:ellipsis`})])]),_:3},16)):o(`v-if`,!0)],64))),128)),c(g(w),d(k.nextProps,{"data-selected":M.value}),{default:_(()=>[h(e.$slots,`next`,{},()=>[c(t,{icon:`lucide:chevron-right`})])]),_:3},16,[`data-selected`]),l.showFirstOrLast?(p(),a(g(x),d({key:1},k.lastProps,{"data-selected":M.value}),{default:_(()=>[h(e.$slots,`last`,{},()=>[c(t,{icon:`lucide:chevrons-right`})])]),_:3},16,[`data-selected`])):o(`v-if`,!0)]),_:3},16)]),_:3},16))}});export{O as default};
@@ -2,22 +2,24 @@ import { PaginationProps } from "./types.js";
2
2
  import * as vue from "vue";
3
3
 
4
4
  //#region src/components/pagination/pagination.vue.d.ts
5
- declare var __VLS_22: {}, __VLS_35: {}, __VLS_53: {}, __VLS_66: {}, __VLS_79: {};
5
+ declare var __VLS_23: {}, __VLS_36: {}, __VLS_54: {}, __VLS_67: {}, __VLS_80: {};
6
6
  type __VLS_Slots = {} & {
7
- first?: (props: typeof __VLS_22) => any;
7
+ first?: (props: typeof __VLS_23) => any;
8
8
  } & {
9
- prev?: (props: typeof __VLS_35) => any;
9
+ prev?: (props: typeof __VLS_36) => any;
10
10
  } & {
11
- ellipsis?: (props: typeof __VLS_53) => any;
11
+ ellipsis?: (props: typeof __VLS_54) => any;
12
12
  } & {
13
- next?: (props: typeof __VLS_66) => any;
13
+ next?: (props: typeof __VLS_67) => any;
14
14
  } & {
15
- last?: (props: typeof __VLS_79) => any;
15
+ last?: (props: typeof __VLS_80) => any;
16
16
  };
17
17
  declare const __VLS_base: vue.DefineComponent<PaginationProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
18
18
  "update:page": (value: number) => any;
19
+ "update:pageSize": (value: number) => any;
19
20
  }, string, vue.PublicProps, Readonly<PaginationProps> & Readonly<{
20
21
  "onUpdate:page"?: ((value: number) => any) | undefined;
22
+ "onUpdate:pageSize"?: ((value: number) => any) | undefined;
21
23
  }>, {
22
24
  showFirstOrLast: boolean;
23
25
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
@@ -1 +1 @@
1
- import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import t from"../button/button-icon.js";import n from"../checkbox/checkbox.js";import{tableVariants as r}from"./variants.js";import i from"./table-radio.js";import{getTableRowValueByDataIndex as a}from"./shared.js";import{Fragment as o,computed as s,createBlock as c,createCommentVNode as l,createElementBlock as u,createTextVNode as d,createVNode as f,defineComponent as p,guardReactiveProps as m,mergeProps as h,normalizeClass as g,normalizeProps as _,openBlock as v,renderList as y,renderSlot as b,toDisplayString as x,unref as S,useSlots as C,withCtx as w}from"vue";import{useControllableState as T,useSelection as E}from"@soybeanjs/headless/composables";import{TableBody as D,TableCell as O,TableContent as k,TableFooter as A,TableHead as j,TableHeader as M,TableRoot as N,TableRow as P,provideTableUi as F}from"@soybeanjs/headless";const I=p({name:`STable`,__name:`table`,props:{class:{},ui:{},size:{},columns:{},data:{},rowKey:{type:Function},bordered:{type:[Boolean,String]},striped:{type:Boolean},defaultExpanded:{},expanded:{},defaultExpandAll:{type:Boolean},contentProps:{},headerProps:{},bodyProps:{},footerProps:{},headProps:{},rowProps:{},cellProps:{},defaultSelected:{},selected:{},multiple:{}},emits:[`update:expanded`,`update:selected`],setup(p,{emit:I}){let L=p,R=I,z=C(),B=s(()=>e(r({size:L.size,bordered:L.bordered,striped:L.striped}),L.ui,{root:L.class})),V=T(()=>L.expanded,e=>{R(`update:expanded`,e??[])},H());function H(){return L.defaultExpandAll?L.data.map(e=>L.rowKey(e)):L.defaultExpanded??[]}let U=e=>{V.value.indexOf(e)>=0?V.value=V.value.filter(t=>t!==e):V.value=[...V.value,e]},{modelValue:W,onModelValueChange:G,setModelValue:K,resetModelValue:q,isMultiple:J,isValueSelected:Y}=E(s(()=>({modelValue:L.selected,defaultValue:L.defaultSelected,multiple:L.multiple})),e=>{R(`update:selected`,e)}),X=s(()=>!Array.isArray(W.value)||W.value.length===0?!1:W.value.length===L.data.length?!0:`indeterminate`),Z=e=>{Array.isArray(W.value)&&(e===!0?K(L.data.map(e=>L.rowKey(e))):q())},Q=s(()=>L.columns.filter(e=>!e.hidden)),$=s(()=>L.columns.some(e=>e.type===`expand`));return F(B),(e,r)=>(v(),c(S(N),null,{default:w(()=>[f(S(k),_(m(p.contentProps)),{default:w(()=>[f(S(M),_(m(p.headerProps)),{default:w(()=>[f(S(P),_(m(p.rowProps)),{default:w(()=>[(v(!0),u(o,null,y(Q.value,t=>(v(),u(o,null,[t.dataIndex?(v(),c(S(j),h({key:0,ref_for:!0},p.headProps,{key:t.dataIndex,align:t.align??`left`,style:{width:t.width}}),{default:w(()=>[b(e.$slots,`header-${t.dataIndex}`,{column:t},()=>[d(x(t.title),1)])]),_:2},1040,[`align`,`style`])):t.type?(v(),c(S(j),h({key:1,ref_for:!0},p.headProps,{key:`__${t.type}`,align:t.align??`center`,style:{width:t.width}}),{default:w(()=>[b(e.$slots,`header-${t.type}`,{column:t,multiple:S(J)},()=>[t.type===`index`?(v(),u(o,{key:0},[d(x(t.title??`#`),1)],64)):l(`v-if`,!0),t.type===`selection`?(v(),u(o,{key:1},[S(J)?(v(),c(n,{key:0,"model-value":X.value,class:g(B.value.selection),"onUpdate:modelValue":Z},null,8,[`model-value`,`class`])):l(`v-if`,!0)],64)):l(`v-if`,!0),t.type===`expand`?(v(),u(o,{key:2},[d(x(t.title),1)],64)):l(`v-if`,!0)])]),_:2},1040,[`align`,`style`])):l(`v-if`,!0)],64))),256))]),_:3},16)]),_:3},16),f(S(D),_(m(p.bodyProps)),{default:w(()=>[(v(!0),u(o,null,y(p.data,(r,s)=>(v(),u(o,{key:p.rowKey(r)},[f(S(P),h({ref_for:!0},p.rowProps,{"data-row":``}),{default:w(()=>[(v(!0),u(o,null,y(Q.value,f=>(v(),u(o,null,[f.dataIndex?(v(),c(S(O),h({key:0,ref_for:!0},p.cellProps,{key:f.dataIndex,align:f.align??`left`,style:{width:f.width}}),{default:w(()=>[b(e.$slots,f.dataIndex,{index:s,column:f,row:r,value:S(a)(r,f.dataIndex)},()=>[d(x(S(a)(r,f.dataIndex)),1)])]),_:2},1040,[`align`,`style`])):f.type?(v(),c(S(O),h({key:1,ref_for:!0},p.cellProps,{key:`__${f.type}`,align:f.align??`center`,style:{width:f.width}}),{default:w(()=>[f.type===`index`?b(e.$slots,`index`,{key:0,index:s,column:f,row:r},()=>[d(x(s+1),1)]):l(`v-if`,!0),f.type===`selection`?b(e.$slots,`selection`,{key:1,index:s,column:f,row:r,multiple:S(J)},()=>[S(J)?(v(),c(n,{key:0,class:g(B.value.selection),"model-value":S(Y)(p.rowKey(r)),"onUpdate:modelValue":e=>S(G)(p.rowKey(r))},null,8,[`class`,`model-value`,`onUpdate:modelValue`])):(v(),c(i,{key:1,size:p.size,checked:S(Y)(p.rowKey(r)),onClick:e=>S(G)(p.rowKey(r))},null,8,[`size`,`checked`,`onClick`]))]):l(`v-if`,!0),f.type===`expand`?b(e.$slots,`expand`,{key:2,index:s,column:f,row:r,expanded:S(V).includes(p.rowKey(r)),toggleExpand:()=>U(p.rowKey(r))},()=>[S(V).includes(p.rowKey(r))?(v(),c(t,{key:0,icon:`lucide:chevron-down`,onClick:e=>U(p.rowKey(r))},null,8,[`onClick`])):(v(),c(t,{key:1,icon:`lucide:chevron-right`,onClick:e=>U(p.rowKey(r))},null,8,[`onClick`]))]):l(`v-if`,!0)]),_:2},1040,[`align`,`style`])):l(`v-if`,!0)],64))),256))]),_:2},1040),$.value&&S(V).includes(p.rowKey(r))?(v(),c(S(P),h({key:0,ref_for:!0},p.rowProps,{"data-expanded-row":``}),{default:w(()=>[f(S(O),h({ref_for:!0},p.cellProps,{colspan:Q.value.length}),{default:w(()=>[b(e.$slots,`expanded-row`,{index:s,row:r})]),_:2},1040,[`colspan`])]),_:2},1040)):l(`v-if`,!0)],64))),128))]),_:3},16),z.footer?(v(),c(S(A),_(h({key:0},p.footerProps)),{default:w(()=>[b(e.$slots,`footer`,{columnSize:Q.value.length})]),_:3},16)):l(`v-if`,!0)]),_:3},16)]),_:3}))}});export{I as default};
1
+ import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import t from"../button/button-icon.js";import n from"../checkbox/checkbox.js";import{tableVariants as r}from"./variants.js";import i from"./table-radio.js";import{getTableRowValueByDataIndex as a}from"./shared.js";import{Fragment as o,computed as s,createBlock as c,createCommentVNode as l,createElementBlock as u,createTextVNode as d,createVNode as f,defineComponent as p,guardReactiveProps as m,mergeProps as h,normalizeClass as g,normalizeProps as _,openBlock as v,renderList as y,renderSlot as b,toDisplayString as x,unref as S,useSlots as C,withCtx as w}from"vue";import{useControllableState as T,useSelection as E}from"@soybeanjs/headless/composables";import{TableBody as D,TableCell as O,TableContent as k,TableFooter as A,TableHead as j,TableHeader as M,TableRoot as N,TableRow as P,provideTableUi as F}from"@soybeanjs/headless";const I=p({name:`STable`,__name:`table`,props:{class:{},ui:{},size:{},columns:{},data:{},rowKey:{},bordered:{type:[Boolean,String]},striped:{type:Boolean},defaultExpanded:{},expanded:{},defaultExpandAll:{type:Boolean},contentProps:{},headerProps:{},bodyProps:{},footerProps:{},headProps:{},rowProps:{},cellProps:{},defaultSelected:{},selected:{},multiple:{default:!0}},emits:[`update:expanded`,`update:selected`],setup(p,{emit:I}){let L=p,R=I,z=C(),B=s(()=>e(r({size:L.size,bordered:L.bordered,striped:L.striped}),L.ui,{root:L.class})),V=T(()=>L.expanded,e=>{R(`update:expanded`,e??[])},H());function H(){return L.defaultExpandAll?L.data.map(e=>L.rowKey(e)):L.defaultExpanded??[]}let U=e=>{V.value.indexOf(e)>=0?V.value=V.value.filter(t=>t!==e):V.value=[...V.value,e]},{modelValue:W,onModelValueChange:G,setModelValue:K,resetModelValue:q,isMultiple:J,isValueSelected:Y}=E(s(()=>({modelValue:L.selected,defaultValue:L.defaultSelected,multiple:L.multiple})),e=>{R(`update:selected`,e)}),X=s(()=>!Array.isArray(W.value)||W.value.length===0?!1:W.value.length===L.data.length?!0:`indeterminate`),Z=e=>{Array.isArray(W.value)&&(e===!0?K(L.data.map(e=>L.rowKey(e))):q())},Q=s(()=>L.columns.filter(e=>!e.hidden)),$=s(()=>L.columns.some(e=>e.type===`expand`));return F(B),(e,r)=>(v(),c(S(N),null,{default:w(()=>[f(S(k),_(m(p.contentProps)),{default:w(()=>[f(S(M),_(m(p.headerProps)),{default:w(()=>[f(S(P),_(m(p.rowProps)),{default:w(()=>[(v(!0),u(o,null,y(Q.value,t=>(v(),u(o,null,[t.dataIndex?(v(),c(S(j),h({key:0,ref_for:!0},p.headProps,{key:t.dataIndex,align:t.align??`left`,style:{width:t.width}}),{default:w(()=>[b(e.$slots,`header-${t.dataIndex}`,{column:t},()=>[d(x(t.title),1)])]),_:2},1040,[`align`,`style`])):t.type?(v(),c(S(j),h({key:1,ref_for:!0},p.headProps,{key:`__${t.type}`,align:t.align??`center`,style:{width:t.width}}),{default:w(()=>[b(e.$slots,`header-${t.type}`,{column:t,multiple:S(J)},()=>[t.type===`index`?(v(),u(o,{key:0},[d(x(t.title??`#`),1)],64)):l(`v-if`,!0),t.type===`selection`?(v(),u(o,{key:1},[S(J)?(v(),c(n,{key:0,"model-value":X.value,class:g(B.value.selection),"onUpdate:modelValue":Z},null,8,[`model-value`,`class`])):l(`v-if`,!0)],64)):l(`v-if`,!0),t.type===`expand`?(v(),u(o,{key:2},[d(x(t.title),1)],64)):l(`v-if`,!0)])]),_:2},1040,[`align`,`style`])):l(`v-if`,!0)],64))),256))]),_:3},16)]),_:3},16),f(S(D),_(m(p.bodyProps)),{default:w(()=>[(v(!0),u(o,null,y(p.data,(r,s)=>(v(),u(o,{key:p.rowKey(r)},[f(S(P),h({ref_for:!0},p.rowProps,{"data-row":``}),{default:w(()=>[(v(!0),u(o,null,y(Q.value,f=>(v(),u(o,null,[f.dataIndex?(v(),c(S(O),h({key:0,ref_for:!0},p.cellProps,{key:f.dataIndex,align:f.align??`left`,style:{width:f.width}}),{default:w(()=>[b(e.$slots,f.dataIndex,{index:s,column:f,row:r,value:S(a)(r,f.dataIndex)},()=>[d(x(S(a)(r,f.dataIndex)),1)])]),_:2},1040,[`align`,`style`])):f.type?(v(),c(S(O),h({key:1,ref_for:!0},p.cellProps,{key:`__${f.type}`,align:f.align??`center`,style:{width:f.width}}),{default:w(()=>[f.type===`index`?b(e.$slots,`index`,{key:0,index:s,column:f,row:r},()=>[d(x(s+1),1)]):l(`v-if`,!0),f.type===`selection`?b(e.$slots,`selection`,{key:1,index:s,column:f,row:r,multiple:S(J)},()=>[S(J)?(v(),c(n,{key:0,class:g(B.value.selection),"model-value":S(Y)(p.rowKey(r)),"onUpdate:modelValue":e=>S(G)(p.rowKey(r))},null,8,[`class`,`model-value`,`onUpdate:modelValue`])):(v(),c(i,{key:1,size:p.size,checked:S(Y)(p.rowKey(r)),onClick:e=>S(G)(p.rowKey(r))},null,8,[`size`,`checked`,`onClick`]))]):l(`v-if`,!0),f.type===`expand`?b(e.$slots,`expand`,{key:2,index:s,column:f,row:r,expanded:S(V).includes(p.rowKey(r)),toggleExpand:()=>U(p.rowKey(r))},()=>[S(V).includes(p.rowKey(r))?(v(),c(t,{key:0,icon:`lucide:chevron-down`,onClick:e=>U(p.rowKey(r))},null,8,[`onClick`])):(v(),c(t,{key:1,icon:`lucide:chevron-right`,onClick:e=>U(p.rowKey(r))},null,8,[`onClick`]))]):l(`v-if`,!0)]),_:2},1040,[`align`,`style`])):l(`v-if`,!0)],64))),256))]),_:2},1040),$.value&&S(V).includes(p.rowKey(r))?(v(),c(S(P),h({key:0,ref_for:!0},p.rowProps,{"data-expanded-row":``}),{default:w(()=>[f(S(O),h({ref_for:!0},p.cellProps,{colspan:Q.value.length}),{default:w(()=>[b(e.$slots,`expanded-row`,{index:s,row:r})]),_:2},1040,[`colspan`])]),_:2},1040)):l(`v-if`,!0)],64))),128))]),_:3},16),z.footer?(v(),c(S(A),_(h({key:0},p.footerProps)),{default:w(()=>[b(e.$slots,`footer`,{columnSize:Q.value.length})]),_:3},16)):l(`v-if`,!0)]),_:3},16)]),_:3}))}});export{I as default};
@@ -1 +1 @@
1
- import{tv as e}from"tailwind-variants";const t=e({slots:{root:`relative overflow-auto`,content:`w-full`,header:`sticky top-0 left-0 bg-accent`,body:``,footer:`bg-accent font-medium`,row:`data-[row]:hover:bg-accent transition-colors`,head:`text-foreground font-medium whitespace-nowrap`,cell:`whitespace-nowrap`,selection:`text-foreground`,radioRoot:[`peer relative shrink-0 rounded-full border border-solid shadow cursor-pointer`,`border-primary focus-visible:ring-primary/30`,`focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50`],radioIndicator:`absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 size-1/2 bg-primary rounded-full`},variants:{size:{xs:{root:`text-2xs`,caption:`py-2`,head:`h-8 px-1.5`,cell:`p-1.5`,radioRoot:`w-3 h-3`},sm:{root:`text-xs`,caption:`py-2.5`,head:`h-9 px-1.75`,cell:`p-1.75`,radioRoot:`w-3.5 h-3.5`},md:{root:`text-sm`,caption:`py-3`,head:`h-10 px-2`,cell:`p-2`,radioRoot:`w-4 h-4`},lg:{root:`text-base`,caption:`py-3.5`,head:`h-12 px-2.5`,cell:`p-2.5`,radioRoot:`w-4.5 h-4.5`},xl:{root:`text-lg`,caption:`py-4`,head:`h-14 px-3`,cell:`p-3`,radioRoot:`w-5 h-5`},"2xl":{root:`text-xl`,caption:`py-4.5`,head:`h-16 px-3.5`,cell:`p-3.5`,radioRoot:`w-6 h-6`}},bordered:{all:{content:`border border-border border-collapse`,head:`border border-border`,cell:`border border-border`},true:{header:`[&_tr]:border`,body:`[&_tr]:border-x`,footer:`[&>tr]:border-x border-t`,row:`border-b`},false:{header:`[&_tr]:border-b`,body:`[&_tr:last-child]:border-0`,footer:`[&>tr]:last:border-b-0 border-t`,row:`border-b`}},striped:{true:{row:`data-[row]:even:bg-accent`}}},defaultVariants:{size:`md`,bordered:!1,striped:!1}});export{t as tableVariants};
1
+ import{tv as e}from"tailwind-variants";const t=e({slots:{root:`relative overflow-auto`,content:`w-full`,header:`sticky top-0 left-0 z-10 bg-accent`,body:``,footer:`bg-accent font-medium`,row:`data-[row]:hover:bg-accent transition-colors`,head:`text-foreground font-medium whitespace-nowrap`,cell:`whitespace-nowrap`,selection:`text-foreground`,radioRoot:[`peer relative shrink-0 rounded-full border border-solid shadow cursor-pointer`,`border-primary focus-visible:ring-primary/30`,`focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50`],radioIndicator:`absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 size-1/2 bg-primary rounded-full`},variants:{size:{xs:{root:`text-2xs`,caption:`py-2`,head:`h-8 px-1.5`,cell:`p-1.5`,radioRoot:`w-3 h-3`},sm:{root:`text-xs`,caption:`py-2.5`,head:`h-9 px-1.75`,cell:`p-1.75`,radioRoot:`w-3.5 h-3.5`},md:{root:`text-sm`,caption:`py-3`,head:`h-10 px-2`,cell:`p-2`,radioRoot:`w-4 h-4`},lg:{root:`text-base`,caption:`py-3.5`,head:`h-12 px-2.5`,cell:`p-2.5`,radioRoot:`w-4.5 h-4.5`},xl:{root:`text-lg`,caption:`py-4`,head:`h-14 px-3`,cell:`p-3`,radioRoot:`w-5 h-5`},"2xl":{root:`text-xl`,caption:`py-4.5`,head:`h-16 px-3.5`,cell:`p-3.5`,radioRoot:`w-6 h-6`}},bordered:{all:{content:`border border-border border-collapse`,head:`border border-border`,cell:`border border-border`},true:{header:`[&_tr]:border`,body:`[&_tr]:border-x`,footer:`[&>tr]:border-x border-t`,row:`border-b`},false:{header:`[&_tr]:border-b`,body:`[&_tr:last-child]:border-0`,footer:`[&>tr]:last:border-b-0 border-t`,row:`border-b`}},striped:{true:{row:`data-[row]:even:bg-accent`}}},defaultVariants:{size:`md`,bordered:!1,striped:!1}});export{t as tableVariants};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soybeanjs/ui",
3
- "version": "0.10.5",
3
+ "version": "0.11.0",
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,7 +54,7 @@
54
54
  "tailwind-variants": "^3.2.2",
55
55
  "valibot": "^1.2.0",
56
56
  "zod": "^4.3.6",
57
- "@soybeanjs/headless": "^0.10.5"
57
+ "@soybeanjs/headless": "^0.11.0"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@soybeanjs/cli": "^1.6.1",