@soybeanjs/ui 0.11.0 → 0.11.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.
@@ -1 +1 @@
1
- import{mergeSlotVariants as e}from"../../theme/shared.js";import{provideSizeContext as t}from"../../theme/context.js";import"../../theme/index.js";import{dialogVariants as n}from"../dialog/variants.js";import r from"../icon/icon.js";import{computed as i,createBlock as a,createCommentVNode as o,createTextVNode as s,createVNode as c,defineComponent as l,guardReactiveProps as u,mergeProps as d,normalizeClass as f,normalizeProps as p,openBlock as m,renderSlot as h,toDisplayString as g,toHandlers as _,unref as v,useSlots as y,withCtx as b}from"vue";import{useForwardListeners as x,useOmitProps as S}from"@soybeanjs/headless/composables";import{AlertDialogContent as C,AlertDialogDescription as w,AlertDialogFooter as T,AlertDialogHeader as E,AlertDialogOverlay as D,AlertDialogPortal as O,AlertDialogRoot as k,AlertDialogTitle as A,AlertDialogTrigger as j,provideAlertDialogUi as M}from"@soybeanjs/headless";const N=l({name:`SAlertDialog`,__name:`alert-dialog`,props:{type:{},showIcon:{type:Boolean,default:!0},size:{},ui:{},title:{},description:{},triggerProps:{},contentProps:{},headerProps:{},footerProps:{},titleProps:{},descriptionProps:{},overlayProps:{},portalProps:{},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1}},emits:[`update:open`],setup(l,{emit:N}){let P=l,F=S(P,[`size`,`ui`,`type`,`title`,`description`,`triggerProps`,`contentProps`,`headerProps`,`footerProps`,`titleProps`,`descriptionProps`,`overlayProps`,`portalProps`]),I=N,L=y(),R=x(I),z=i(()=>e(n({size:P.size}),P.ui)),B={destructive:{icon:`lucide:circle-x`,class:`text-destructive`},success:{icon:`lucide:circle-check`,class:`text-success`},warning:{icon:`lucide:circle-alert`,class:`text-warning`},info:{icon:`lucide:info`,class:`text-info`}},V=i(()=>P.type?B[P.type]:null);return M(z),t(()=>P.size),(e,t)=>(m(),a(v(k),d(v(F),{"onUpdate:open":t[0]||=e=>I(`update:open`,e)}),{default:b(t=>[c(v(j),d(l.triggerProps,{size:l.size,"as-child":``}),{default:b(()=>[h(e.$slots,`trigger`)]),_:3},16,[`size`]),c(v(O),p(u(l.portalProps)),{default:b(()=>[c(v(D),p(u(l.overlayProps)),null,16),c(v(C),d(l.contentProps,_(v(R))),{default:b(()=>[c(v(E),p(u(l.headerProps)),{default:b(()=>[c(v(A),p(u(l.titleProps)),{default:b(()=>[l.showIcon&&V.value?(m(),a(r,{key:0,icon:V.value.icon,class:f(V.value.class)},null,8,[`icon`,`class`])):o(`v-if`,!0),h(e.$slots,`title`,p(u(t)),()=>[s(g(l.title),1)])]),_:2},1040),v(L).description||l.description?(m(),a(v(w),p(d({key:0},l.descriptionProps)),{default:b(()=>[h(e.$slots,`description`,p(u(t)),()=>[s(g(l.description),1)])]),_:2},1040)):o(`v-if`,!0)]),_:2},1040),h(e.$slots,`default`,p(u(t))),v(L).footer?(m(),a(v(T),p(d({key:0},l.footerProps)),{default:b(()=>[h(e.$slots,`footer`,p(u(t)))]),_:2},1040)):o(`v-if`,!0)]),_:2},1040)]),_:2},1040)]),_:3},16))}});export{N as default};
1
+ import{mergeSlotVariants as e}from"../../theme/shared.js";import{provideSizeContext as t}from"../../theme/context.js";import"../../theme/index.js";import{dialogVariants as n}from"../dialog/variants.js";import r from"../icon/icon.js";import{computed as i,createBlock as a,createCommentVNode as o,createTextVNode as s,createVNode as c,defineComponent as l,guardReactiveProps as u,mergeProps as d,normalizeClass as f,normalizeProps as p,openBlock as m,renderSlot as h,toDisplayString as g,toHandlers as _,unref as v,useSlots as y,withCtx as b}from"vue";import{useForwardListeners as x,useOmitProps as S}from"@soybeanjs/headless/composables";import{AlertDialogContent as C,AlertDialogDescription as w,AlertDialogFooter as T,AlertDialogHeader as E,AlertDialogOverlay as D,AlertDialogPortal as O,AlertDialogRoot as k,AlertDialogTitle as A,AlertDialogTrigger as j,provideAlertDialogUi as M}from"@soybeanjs/headless";const N=l({name:`SAlertDialog`,__name:`alert-dialog`,props:{type:{},showIcon:{type:Boolean,default:!0},class:{},size:{},ui:{},title:{},description:{},triggerProps:{},contentProps:{},headerProps:{},footerProps:{},titleProps:{},descriptionProps:{},overlayProps:{},portalProps:{},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1}},emits:[`update:open`],setup(l,{emit:N}){let P=l,F=S(P,[`size`,`ui`,`type`,`title`,`description`,`triggerProps`,`contentProps`,`headerProps`,`footerProps`,`titleProps`,`descriptionProps`,`overlayProps`,`portalProps`]),I=N,L=y(),R=x(I),z=i(()=>e(n({size:P.size}),P.ui)),B={destructive:{icon:`lucide:circle-x`,class:`text-destructive`},success:{icon:`lucide:circle-check`,class:`text-success`},warning:{icon:`lucide:circle-alert`,class:`text-warning`},info:{icon:`lucide:info`,class:`text-info`}},V=i(()=>P.type?B[P.type]:null);return M(z),t(()=>P.size),(e,t)=>(m(),a(v(k),d(v(F),{"onUpdate:open":t[0]||=e=>I(`update:open`,e)}),{default:b(t=>[c(v(j),d(l.triggerProps,{size:l.size,"as-child":``}),{default:b(()=>[h(e.$slots,`trigger`)]),_:3},16,[`size`]),c(v(O),p(u(l.portalProps)),{default:b(()=>[c(v(D),p(u(l.overlayProps)),null,16),c(v(C),d(l.contentProps,_(v(R))),{default:b(()=>[c(v(E),p(u(l.headerProps)),{default:b(()=>[c(v(A),p(u(l.titleProps)),{default:b(()=>[l.showIcon&&V.value?(m(),a(r,{key:0,icon:V.value.icon,class:f(V.value.class)},null,8,[`icon`,`class`])):o(`v-if`,!0),h(e.$slots,`title`,p(u(t)),()=>[s(g(l.title),1)])]),_:2},1040),v(L).description||l.description?(m(),a(v(w),p(d({key:0},l.descriptionProps)),{default:b(()=>[h(e.$slots,`description`,p(u(t)),()=>[s(g(l.description),1)])]),_:2},1040)):o(`v-if`,!0)]),_:2},1040),h(e.$slots,`default`,p(u(t))),v(L).footer?(m(),a(v(T),p(d({key:0},l.footerProps)),{default:b(()=>[h(e.$slots,`footer`,p(u(t)))]),_:2},1040)):o(`v-if`,!0)]),_:2},1040)]),_:2},1040)]),_:3},16))}});export{N as default};
@@ -8,8 +8,8 @@ declare const __VLS_export: <T extends CommandBaseOptionData = CommandBaseOption
8
8
  props: vue.PublicProps & __VLS_PrettifyLocal<CommandProps<T> & {
9
9
  onSelect?: ((event: _soybeanjs_headless0.SelectEvent<string>) => any) | undefined;
10
10
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
11
- onHighlight?: ((payload?: _soybeanjs_headless_composables0.CollectionItemData<_soybeanjs_headless0.ListboxCollectionItemData> | undefined) => any) | undefined;
12
11
  onEntryFocus?: ((event: CustomEvent<any>) => any) | undefined;
12
+ onHighlight?: ((payload?: _soybeanjs_headless_composables0.CollectionItemData<_soybeanjs_headless0.ListboxCollectionItemData> | undefined) => any) | undefined;
13
13
  onLeave?: ((event: Event) => any) | undefined;
14
14
  "onUpdate:searchTerm"?: ((value: string) => any) | undefined;
15
15
  }> & (typeof globalThis extends {
@@ -38,7 +38,7 @@ declare const __VLS_export: <T extends CommandBaseOptionData = CommandBaseOption
38
38
  } & {
39
39
  bottom?: (props: {}) => any;
40
40
  };
41
- emit: ((evt: "select", event: _soybeanjs_headless0.SelectEvent<string>) => void) & ((evt: "update:modelValue", value: string) => void) & ((evt: "highlight", payload?: _soybeanjs_headless_composables0.CollectionItemData<_soybeanjs_headless0.ListboxCollectionItemData> | undefined) => void) & ((evt: "entryFocus", event: CustomEvent<any>) => void) & ((evt: "leave", event: Event) => void) & ((evt: "update:searchTerm", value: string) => void);
41
+ emit: ((evt: "select", event: _soybeanjs_headless0.SelectEvent<string>) => void) & ((evt: "update:modelValue", value: string) => void) & ((evt: "entryFocus", event: CustomEvent<any>) => void) & ((evt: "highlight", payload?: _soybeanjs_headless_composables0.CollectionItemData<_soybeanjs_headless0.ListboxCollectionItemData> | undefined) => void) & ((evt: "leave", event: Event) => void) & ((evt: "update:searchTerm", value: string) => void);
42
42
  }>) => vue.VNode & {
43
43
  __ctx?: Awaited<typeof __VLS_setup>;
44
44
  };
@@ -1 +1 @@
1
- import{mergeSlotVariants as e}from"../../theme/shared.js";import{provideSizeContext as t}from"../../theme/context.js";import"../../theme/index.js";import{dialogVariants as n}from"./variants.js";import r from"../button/button-icon.js";import{computed as i,createBlock as a,createCommentVNode as o,createVNode as s,defineComponent as c,guardReactiveProps as l,mergeProps as u,normalizeClass as d,normalizeProps as f,openBlock as p,renderSlot as m,toHandlers as h,unref as g,withCtx as _}from"vue";import{useForwardListeners as v,useOmitProps as y}from"@soybeanjs/headless/composables";import{DialogClose as b,DialogContent as x,DialogOverlay as S,DialogPortal as C,DialogRoot as w,DialogTrigger as T,provideDialogUi as E}from"@soybeanjs/headless";const D=c({name:`SDialogPure`,__name:`dialog-pure`,props:{size:{},ui:{},closable:{type:Boolean,default:!0},triggerProps:{},contentProps:{},overlayProps:{},portalProps:{},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},modal:{type:Boolean,default:!0}},emits:[`update:open`,`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(c,{emit:D}){let O=c,k=y(O,[`size`,`ui`,`closable`,`triggerProps`,`contentProps`,`overlayProps`,`portalProps`]),A=D,j=v(A),M=i(()=>e(n({size:O.size,pure:!0}),O.ui));return E(M),t(()=>O.size),(e,t)=>(p(),a(g(w),u(g(k),{"onUpdate:open":t[0]||=e=>A(`update:open`,e)}),{default:_(t=>[s(g(T),u(c.triggerProps,{size:c.size,"as-child":``}),{default:_(()=>[m(e.$slots,`trigger`)]),_:3},16,[`size`]),s(g(C),f(l(c.portalProps)),{default:_(()=>[s(g(S),f(l(c.overlayProps)),null,16),s(g(x),u(c.contentProps,h(g(j))),{default:_(()=>[m(e.$slots,`default`,f(l(t))),c.closable?(p(),a(g(b),{key:0,class:d(M.value.closable),"as-child":``},{default:_(()=>[m(e.$slots,`close`,{},()=>[s(r,{size:c.size,icon:`lucide:x`},null,8,[`size`])])]),_:3},8,[`class`])):o(`v-if`,!0)]),_:2},1040)]),_:2},1040)]),_:3},16))}});export{D as default};
1
+ import{mergeSlotVariants as e}from"../../theme/shared.js";import{provideSizeContext as t}from"../../theme/context.js";import"../../theme/index.js";import{dialogVariants as n}from"./variants.js";import r from"../button/button-icon.js";import{computed as i,createBlock as a,createCommentVNode as o,createVNode as s,defineComponent as c,guardReactiveProps as l,mergeProps as u,normalizeClass as d,normalizeProps as f,openBlock as p,renderSlot as m,toHandlers as h,unref as g,withCtx as _}from"vue";import{useForwardListeners as v,useOmitProps as y}from"@soybeanjs/headless/composables";import{DialogClose as b,DialogContent as x,DialogOverlay as S,DialogPortal as C,DialogRoot as w,DialogTrigger as T,provideDialogUi as E}from"@soybeanjs/headless";const D=c({name:`SDialogPure`,__name:`dialog-pure`,props:{class:{},size:{},ui:{},closable:{type:Boolean,default:!0},triggerProps:{},contentProps:{},overlayProps:{},portalProps:{},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},modal:{type:Boolean,default:!0}},emits:[`update:open`,`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(c,{emit:D}){let O=c,k=y(O,[`class`,`size`,`ui`,`closable`,`triggerProps`,`contentProps`,`overlayProps`,`portalProps`]),A=D,j=v(A),M=i(()=>e(n({size:O.size,pure:!0}),O.ui,{content:O.class}));return E(M),t(()=>O.size),(e,t)=>(p(),a(g(w),u(g(k),{"onUpdate:open":t[0]||=e=>A(`update:open`,e)}),{default:_(t=>[s(g(T),u(c.triggerProps,{size:c.size,"as-child":``}),{default:_(()=>[m(e.$slots,`trigger`)]),_:3},16,[`size`]),s(g(C),f(l(c.portalProps)),{default:_(()=>[s(g(S),f(l(c.overlayProps)),null,16),s(g(x),u(c.contentProps,h(g(j))),{default:_(()=>[m(e.$slots,`default`,f(l(t))),c.closable?(p(),a(g(b),{key:0,class:d(M.value.closable),"as-child":``},{default:_(()=>[m(e.$slots,`close`,{},()=>[s(r,{size:c.size,icon:`lucide:x`},null,8,[`size`])])]),_:3},8,[`class`])):o(`v-if`,!0)]),_:2},1040)]),_:2},1040)]),_:3},16))}});export{D as default};
@@ -31,9 +31,9 @@ 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;
34
35
  closable: boolean;
35
36
  open: boolean;
36
- modal: boolean;
37
37
  defaultOpen: boolean;
38
38
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
39
39
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1 +1 @@
1
- import{mergeSlotVariants as e}from"../../theme/shared.js";import{provideSizeContext as t}from"../../theme/context.js";import"../../theme/index.js";import{dialogVariants as n}from"./variants.js";import r from"../button/button-icon.js";import{computed as i,createBlock as a,createCommentVNode as o,createTextVNode as s,createVNode as c,defineComponent as l,guardReactiveProps as u,mergeProps as d,normalizeClass as f,normalizeProps as p,openBlock as m,renderSlot as h,toDisplayString as g,toHandlers as _,unref as v,useSlots as y,withCtx as b}from"vue";import{useForwardListeners as x,useOmitProps as S}from"@soybeanjs/headless/composables";import{DialogClose as C,DialogContent as w,DialogDescription as T,DialogFooter as E,DialogHeader as D,DialogOverlay as O,DialogPortal as k,DialogRoot as A,DialogTitle as j,DialogTrigger as M,provideDialogUi as N}from"@soybeanjs/headless";const P=l({name:`SDialog`,__name:`dialog`,props:{size:{},ui:{},title:{},description:{},closable:{type:Boolean,default:!0},triggerProps:{},contentProps:{},headerProps:{},footerProps:{},titleProps:{},descriptionProps:{},overlayProps:{},portalProps:{},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},modal:{type:Boolean,default:!0}},emits:[`update:open`,`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(l,{emit:P}){let F=l,I=S(F,[`size`,`ui`,`title`,`description`,`closable`,`triggerProps`,`contentProps`,`headerProps`,`footerProps`,`titleProps`,`descriptionProps`,`overlayProps`,`portalProps`]),L=P,R=y(),z=x(L),B=i(()=>e(n({size:F.size}),F.ui));return N(B),t(()=>F.size),(e,t)=>(m(),a(v(A),d(v(I),{"onUpdate:open":t[0]||=e=>L(`update:open`,e)}),{default:b(t=>[c(v(M),d(l.triggerProps,{size:l.size,"as-child":``}),{default:b(()=>[h(e.$slots,`trigger`)]),_:3},16,[`size`]),c(v(k),p(u(l.portalProps)),{default:b(()=>[c(v(O),p(u(l.overlayProps)),null,16),c(v(w),d(l.contentProps,_(v(z))),{default:b(()=>[c(v(D),p(u(l.headerProps)),{default:b(()=>[c(v(j),p(u(l.titleProps)),{default:b(()=>[h(e.$slots,`title`,p(u(t)),()=>[s(g(l.title),1)])]),_:2},1040),v(R).description||l.description?(m(),a(v(T),p(d({key:0},l.descriptionProps)),{default:b(()=>[h(e.$slots,`description`,p(u(t)),()=>[s(g(l.description),1)])]),_:2},1040)):o(`v-if`,!0),l.closable?(m(),a(v(C),{key:1,class:f(B.value.closable),"as-child":``},{default:b(()=>[h(e.$slots,`close`,{},()=>[c(r,{size:l.size,icon:`lucide:x`},null,8,[`size`])])]),_:3},8,[`class`])):o(`v-if`,!0)]),_:2},1040),h(e.$slots,`default`,p(u(t))),v(R).footer?(m(),a(v(E),p(d({key:0},l.footerProps)),{default:b(()=>[h(e.$slots,`footer`,p(u(t)))]),_:2},1040)):o(`v-if`,!0)]),_:2},1040)]),_:2},1040)]),_:3},16))}});export{P as default};
1
+ import{mergeSlotVariants as e}from"../../theme/shared.js";import{provideSizeContext as t}from"../../theme/context.js";import"../../theme/index.js";import{dialogVariants as n}from"./variants.js";import r from"../button/button-icon.js";import{computed as i,createBlock as a,createCommentVNode as o,createTextVNode as s,createVNode as c,defineComponent as l,guardReactiveProps as u,mergeProps as d,normalizeClass as f,normalizeProps as p,openBlock as m,renderSlot as h,toDisplayString as g,toHandlers as _,unref as v,useSlots as y,withCtx as b}from"vue";import{useForwardListeners as x,useOmitProps as S}from"@soybeanjs/headless/composables";import{DialogClose as C,DialogContent as w,DialogDescription as T,DialogFooter as E,DialogHeader as D,DialogOverlay as O,DialogPortal as k,DialogRoot as A,DialogTitle as j,DialogTrigger as M,provideDialogUi as N}from"@soybeanjs/headless";const P=l({name:`SDialog`,__name:`dialog`,props:{class:{},size:{},ui:{},title:{},description:{},closable:{type:Boolean,default:!0},triggerProps:{},contentProps:{},headerProps:{},footerProps:{},titleProps:{},descriptionProps:{},overlayProps:{},portalProps:{},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},modal:{type:Boolean,default:!0}},emits:[`update:open`,`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(l,{emit:P}){let F=l,I=S(F,[`class`,`size`,`ui`,`title`,`description`,`closable`,`triggerProps`,`contentProps`,`headerProps`,`footerProps`,`titleProps`,`descriptionProps`,`overlayProps`,`portalProps`]),L=P,R=y(),z=x(L),B=i(()=>e(n({size:F.size}),F.ui,{content:F.class}));return N(B),t(()=>F.size),(e,t)=>(m(),a(v(A),d(v(I),{"onUpdate:open":t[0]||=e=>L(`update:open`,e)}),{default:b(t=>[c(v(M),d(l.triggerProps,{size:l.size,"as-child":``}),{default:b(()=>[h(e.$slots,`trigger`)]),_:3},16,[`size`]),c(v(k),p(u(l.portalProps)),{default:b(()=>[c(v(O),p(u(l.overlayProps)),null,16),c(v(w),d(l.contentProps,_(v(z))),{default:b(()=>[c(v(D),p(u(l.headerProps)),{default:b(()=>[c(v(j),p(u(l.titleProps)),{default:b(()=>[h(e.$slots,`title`,p(u(t)),()=>[s(g(l.title),1)])]),_:2},1040),v(R).description||l.description?(m(),a(v(T),p(d({key:0},l.descriptionProps)),{default:b(()=>[h(e.$slots,`description`,p(u(t)),()=>[s(g(l.description),1)])]),_:2},1040)):o(`v-if`,!0),l.closable?(m(),a(v(C),{key:1,class:f(B.value.closable),"as-child":``},{default:b(()=>[h(e.$slots,`close`,{},()=>[c(r,{size:l.size,icon:`lucide:x`},null,8,[`size`])])]),_:3},8,[`class`])):o(`v-if`,!0)]),_:2},1040),h(e.$slots,`default`,p(u(t))),v(R).footer?(m(),a(v(E),p(d({key:0},l.footerProps)),{default:b(()=>[h(e.$slots,`footer`,p(u(t)))]),_:2},1040)):o(`v-if`,!0)]),_:2},1040)]),_:2},1040)]),_:3},16))}});export{P as default};
@@ -46,9 +46,9 @@ 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;
49
50
  closable: boolean;
50
51
  open: boolean;
51
- modal: boolean;
52
52
  defaultOpen: boolean;
53
53
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
54
54
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1,12 +1,16 @@
1
1
  import { ThemeColor, ThemeSize } from "../../theme/types.js";
2
2
  import { VNode } from "vue";
3
- import { DialogContentEmits, DialogContentProps, DialogDescriptionProps, DialogFooterProps, DialogHeaderProps, DialogOverlayProps, DialogPortalProps, DialogRootEmits, DialogRootProps, DialogTitleProps, DialogTriggerProps, DialogUiSlot, MaybePromise, UiClass } from "@soybeanjs/headless";
3
+ import { ClassValue, DialogContentEmits, DialogContentProps, DialogDescriptionProps, DialogFooterProps, DialogHeaderProps, DialogOverlayProps, DialogPortalProps, DialogRootEmits, DialogRootProps, DialogTitleProps, DialogTriggerProps, DialogUiSlot, MaybePromise, UiClass } from "@soybeanjs/headless";
4
4
 
5
5
  //#region src/components/dialog/types.d.ts
6
6
  type DialogExtraUiSlot = 'closable';
7
7
  type DialogExtendedUiSlot = DialogUiSlot | DialogExtraUiSlot;
8
8
  type DialogExtendedUi = UiClass<DialogExtendedUiSlot>;
9
9
  interface DialogProps extends DialogRootProps {
10
+ /**
11
+ * the content class of the dialog
12
+ */
13
+ class?: ClassValue;
10
14
  size?: ThemeSize;
11
15
  ui?: Partial<DialogExtendedUi>;
12
16
  title?: string;
@@ -23,6 +27,10 @@ interface DialogProps extends DialogRootProps {
23
27
  }
24
28
  type DialogEmits = DialogRootEmits & DialogContentEmits;
25
29
  interface DialogPureProps extends DialogRootProps {
30
+ /**
31
+ * the content class of the dialog
32
+ */
33
+ class?: ClassValue;
26
34
  size?: ThemeSize;
27
35
  ui?: Partial<DialogExtendedUi>;
28
36
  closable?: boolean;
@@ -1 +1 @@
1
- import{mergeSlotVariants as e}from"../../theme/shared.js";import{provideSizeContext as t}from"../../theme/context.js";import"../../theme/index.js";import{dialogVariants as n}from"../dialog/variants.js";import r from"../button/button-icon.js";import{drawerVariants as i}from"./variants.js";import{computed as a,createBlock as o,createCommentVNode as s,createElementVNode as c,createTextVNode as l,createVNode as u,defineComponent as d,guardReactiveProps as f,mergeProps as p,normalizeClass as m,normalizeProps as h,openBlock as g,renderSlot as _,toDisplayString as v,toHandlers as y,unref as b,useSlots as x,withCtx as S}from"vue";import{useForwardListeners as C,useOmitProps as w}from"@soybeanjs/headless/composables";import{DialogClose as T,DialogContent as E,DialogDescription as D,DialogFooter as O,DialogHeader as k,DialogOverlay as A,DialogPortal as j,DialogRoot as M,DialogTitle as N,DialogTrigger as P,provideDialogUi as F}from"@soybeanjs/headless";const I=d({name:`SDrawer`,__name:`drawer`,props:{side:{},ui:{},size:{},title:{},description:{},closable:{type:Boolean,default:!0},triggerProps:{},contentProps:{},headerProps:{},footerProps:{},titleProps:{},descriptionProps:{},overlayProps:{},portalProps:{},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},modal:{type:Boolean,default:!0}},emits:[`update:open`,`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(d,{emit:I}){let L=d,R=w(L,[`size`,`ui`,`side`,`title`,`description`,`closable`,`triggerProps`,`contentProps`,`headerProps`,`footerProps`,`titleProps`,`descriptionProps`,`overlayProps`,`portalProps`]),z=I,B=x(),V=C(z),H=a(()=>{let t=n({size:L.size}),r=i({size:L.size,side:L.side});return e({...t,...r},L.ui)});return F(H),t(()=>L.size),(e,t)=>(g(),o(b(M),p(b(R),{"onUpdate:open":t[0]||=e=>z(`update:open`,e)}),{default:S(t=>[u(b(P),p(d.triggerProps,{size:d.size,"as-child":``}),{default:S(()=>[_(e.$slots,`trigger`)]),_:3},16,[`size`]),u(b(j),h(f(d.portalProps)),{default:S(()=>[u(b(A),h(f(d.overlayProps)),null,16),u(b(E),p(d.contentProps,y(b(V))),{default:S(()=>[u(b(k),h(f(d.headerProps)),{default:S(()=>[u(b(N),h(f(d.titleProps)),{default:S(()=>[_(e.$slots,`title`,h(f(t)),()=>[l(v(d.title),1)])]),_:2},1040),b(B).description||d.description?(g(),o(b(D),h(p({key:0},d.descriptionProps)),{default:S(()=>[_(e.$slots,`description`,h(f(t)),()=>[l(v(d.description),1)])]),_:2},1040)):s(`v-if`,!0),d.closable?(g(),o(b(T),{key:1,class:m(H.value.closable),"as-child":``},{default:S(()=>[_(e.$slots,`close`,{},()=>[u(r,{size:d.size,icon:`lucide:x`},null,8,[`size`])])]),_:3},8,[`class`])):s(`v-if`,!0)]),_:2},1040),c(`div`,{class:m(H.value.main)},[_(e.$slots,`default`,h(f(t)))],2),b(B).footer?(g(),o(b(O),h(p({key:0},d.footerProps)),{default:S(()=>[_(e.$slots,`footer`,h(f(t)))]),_:2},1040)):s(`v-if`,!0)]),_:2},1040)]),_:2},1040)]),_:3},16))}});export{I as default};
1
+ import{mergeSlotVariants as e}from"../../theme/shared.js";import{provideSizeContext as t}from"../../theme/context.js";import"../../theme/index.js";import{dialogVariants as n}from"../dialog/variants.js";import r from"../button/button-icon.js";import{drawerVariants as i}from"./variants.js";import{computed as a,createBlock as o,createCommentVNode as s,createElementVNode as c,createTextVNode as l,createVNode as u,defineComponent as d,guardReactiveProps as f,mergeProps as p,normalizeClass as m,normalizeProps as h,openBlock as g,renderSlot as _,toDisplayString as v,toHandlers as y,unref as b,useSlots as x,withCtx as S}from"vue";import{useForwardListeners as C,useOmitProps as w}from"@soybeanjs/headless/composables";import{DialogClose as T,DialogContent as E,DialogDescription as D,DialogFooter as O,DialogHeader as k,DialogOverlay as A,DialogPortal as j,DialogRoot as M,DialogTitle as N,DialogTrigger as P,provideDialogUi as F}from"@soybeanjs/headless";const I=d({name:`SDrawer`,__name:`drawer`,props:{side:{},ui:{},class:{},size:{},title:{},description:{},closable:{type:Boolean,default:!0},triggerProps:{},contentProps:{},headerProps:{},footerProps:{},titleProps:{},descriptionProps:{},overlayProps:{},portalProps:{},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},modal:{type:Boolean,default:!0}},emits:[`update:open`,`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(d,{emit:I}){let L=d,R=w(L,[`size`,`ui`,`side`,`title`,`description`,`closable`,`triggerProps`,`contentProps`,`headerProps`,`footerProps`,`titleProps`,`descriptionProps`,`overlayProps`,`portalProps`]),z=I,B=x(),V=C(z),H=a(()=>{let t=n({size:L.size}),r=i({size:L.size,side:L.side});return e({...t,...r},L.ui)});return F(H),t(()=>L.size),(e,t)=>(g(),o(b(M),p(b(R),{"onUpdate:open":t[0]||=e=>z(`update:open`,e)}),{default:S(t=>[u(b(P),p(d.triggerProps,{size:d.size,"as-child":``}),{default:S(()=>[_(e.$slots,`trigger`)]),_:3},16,[`size`]),u(b(j),h(f(d.portalProps)),{default:S(()=>[u(b(A),h(f(d.overlayProps)),null,16),u(b(E),p(d.contentProps,y(b(V))),{default:S(()=>[u(b(k),h(f(d.headerProps)),{default:S(()=>[u(b(N),h(f(d.titleProps)),{default:S(()=>[_(e.$slots,`title`,h(f(t)),()=>[l(v(d.title),1)])]),_:2},1040),b(B).description||d.description?(g(),o(b(D),h(p({key:0},d.descriptionProps)),{default:S(()=>[_(e.$slots,`description`,h(f(t)),()=>[l(v(d.description),1)])]),_:2},1040)):s(`v-if`,!0),d.closable?(g(),o(b(T),{key:1,class:m(H.value.closable),"as-child":``},{default:S(()=>[_(e.$slots,`close`,{},()=>[u(r,{size:d.size,icon:`lucide:x`},null,8,[`size`])])]),_:3},8,[`class`])):s(`v-if`,!0)]),_:2},1040),c(`div`,{class:m(H.value.main)},[_(e.$slots,`default`,h(f(t)))],2),b(B).footer?(g(),o(b(O),h(p({key:0},d.footerProps)),{default:S(()=>[_(e.$slots,`footer`,h(f(t)))]),_:2},1040)):s(`v-if`,!0)]),_:2},1040)]),_:2},1040)]),_:3},16))}});export{I as default};
@@ -46,9 +46,9 @@ 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;
49
50
  closable: boolean;
50
51
  open: boolean;
51
- modal: boolean;
52
52
  defaultOpen: boolean;
53
53
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
54
54
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -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"../../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};
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:_(()=>[h(e.$slots,`leading`),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),h(e.$slots,`trailing`)]),_:3},16))}});export{O as default};
@@ -2,17 +2,21 @@ 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_23: {}, __VLS_36: {}, __VLS_54: {}, __VLS_67: {}, __VLS_80: {};
5
+ declare var __VLS_11: {}, __VLS_25: {}, __VLS_38: {}, __VLS_56: {}, __VLS_69: {}, __VLS_82: {}, __VLS_89: {};
6
6
  type __VLS_Slots = {} & {
7
- first?: (props: typeof __VLS_23) => any;
7
+ leading?: (props: typeof __VLS_11) => any;
8
8
  } & {
9
- prev?: (props: typeof __VLS_36) => any;
9
+ first?: (props: typeof __VLS_25) => any;
10
10
  } & {
11
- ellipsis?: (props: typeof __VLS_54) => any;
11
+ prev?: (props: typeof __VLS_38) => any;
12
12
  } & {
13
- next?: (props: typeof __VLS_67) => any;
13
+ ellipsis?: (props: typeof __VLS_56) => any;
14
14
  } & {
15
- last?: (props: typeof __VLS_80) => any;
15
+ next?: (props: typeof __VLS_69) => any;
16
+ } & {
17
+ last?: (props: typeof __VLS_82) => any;
18
+ } & {
19
+ trailing?: (props: typeof __VLS_89) => any;
16
20
  };
17
21
  declare const __VLS_base: vue.DefineComponent<PaginationProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
18
22
  "update:page": (value: number) => any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soybeanjs/ui",
3
- "version": "0.11.0",
3
+ "version": "0.11.2",
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.11.0"
57
+ "@soybeanjs/headless": "^0.11.2"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@soybeanjs/cli": "^1.6.1",