@soybeanjs/ui 0.0.1-beta.3 → 0.0.2-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/accordion/accordion.js +1 -0
- package/dist/components/accordion/accordion.vue.d.ts +48 -0
- package/dist/components/accordion/index.d.ts +4 -0
- package/dist/components/accordion/types.d.ts +32 -0
- package/dist/components/alert/alert.js +1 -0
- package/dist/components/alert/alert.vue.d.ts +34 -0
- package/dist/components/alert/index.d.ts +5 -0
- package/dist/components/alert/types.d.ts +26 -0
- package/dist/components/alert-dialog/alert-dialog-action.js +1 -0
- package/dist/components/alert-dialog/alert-dialog-action.vue.d.ts +22 -0
- package/dist/components/alert-dialog/alert-dialog-cancel.js +1 -0
- package/dist/components/alert-dialog/alert-dialog-cancel.vue.d.ts +25 -0
- package/dist/components/alert-dialog/alert-dialog.js +1 -0
- package/dist/components/alert-dialog/alert-dialog.vue.d.ts +45 -0
- package/dist/components/alert-dialog/index.d.ts +6 -0
- package/dist/components/alert-dialog/types.d.ts +30 -0
- package/dist/components/arrow/index.d.ts +2 -0
- package/dist/components/arrow/index.js +1 -0
- package/dist/components/aspect-ratio/index.d.ts +2 -0
- package/dist/components/aspect-ratio/index.js +1 -0
- package/dist/components/avatar/avatar.js +1 -0
- package/dist/components/avatar/avatar.vue.d.ts +27 -0
- package/dist/components/avatar/index.d.ts +4 -0
- package/dist/components/avatar/types.d.ts +15 -0
- package/dist/components/badge/badge.js +1 -0
- package/dist/components/badge/badge.vue.d.ts +26 -0
- package/dist/components/badge/index.d.ts +5 -0
- package/dist/components/badge/types.d.ts +17 -0
- package/dist/components/breadcrumb/breadcrumb.js +1 -0
- package/dist/components/breadcrumb/breadcrumb.vue.d.ts +49 -0
- package/dist/components/breadcrumb/index.d.ts +4 -0
- package/dist/components/breadcrumb/index.js +1 -0
- package/dist/components/breadcrumb/shared.js +1 -0
- package/dist/components/breadcrumb/types.d.ts +51 -0
- package/dist/components/button/button-group.js +1 -0
- package/dist/components/button/button-group.vue.d.ts +22 -0
- package/dist/components/button/button-icon.js +1 -0
- package/dist/components/button/button-icon.vue.d.ts +16 -0
- package/dist/components/button/button-link.js +1 -0
- package/dist/components/button/button-link.vue.d.ts +28 -0
- package/dist/components/button/button-loading.js +1 -0
- package/dist/components/button/button-loading.vue.d.ts +32 -0
- package/dist/components/button/button.js +1 -0
- package/dist/components/button/button.vue.d.ts +26 -0
- package/dist/components/button/context.js +1 -0
- package/dist/components/button/index.d.ts +7 -0
- package/dist/components/button/types.d.ts +80 -0
- package/dist/components/card/card.js +1 -0
- package/dist/components/card/card.vue.d.ts +28 -0
- package/dist/components/card/index.d.ts +4 -0
- package/dist/components/card/types.d.ts +37 -0
- package/dist/components/checkbox/checkbox-card-group.js +1 -0
- package/dist/components/checkbox/checkbox-card-group.vue.d.ts +20 -0
- package/dist/components/checkbox/checkbox-card.js +1 -0
- package/dist/components/checkbox/checkbox-card.vue.d.ts +29 -0
- package/dist/components/checkbox/checkbox-group.js +1 -0
- package/dist/components/checkbox/checkbox-group.vue.d.ts +20 -0
- package/dist/components/checkbox/checkbox.js +1 -0
- package/dist/components/checkbox/checkbox.vue.d.ts +34 -0
- package/dist/components/checkbox/index.d.ts +7 -0
- package/dist/components/checkbox/types.d.ts +53 -0
- package/dist/components/collapsible/collapsible.js +1 -0
- package/dist/components/collapsible/collapsible.vue.d.ts +28 -0
- package/dist/components/collapsible/index.d.ts +4 -0
- package/dist/components/collapsible/index.js +1 -0
- package/dist/components/collapsible/types.d.ts +12 -0
- package/dist/components/command/command-group-option.js +1 -0
- package/dist/components/command/command-option.js +1 -0
- package/dist/components/command/command-single-option.js +1 -0
- package/dist/components/command/command.js +1 -0
- package/dist/components/command/command.vue.d.ts +44 -0
- package/dist/components/command/context.js +1 -0
- package/dist/components/command/index.d.ts +2 -0
- package/dist/components/command/shared.js +1 -0
- package/dist/components/command/types.d.ts +94 -0
- package/dist/components/config-provider/config-provider.js +1 -0
- package/dist/components/config-provider/config-provider.vue.d.ts +26 -0
- package/dist/components/config-provider/context.d.ts +6 -0
- package/dist/components/config-provider/context.js +1 -0
- package/dist/components/config-provider/index.d.ts +3 -0
- package/dist/components/config-provider/shared.js +1 -0
- package/dist/components/config-provider/types.d.ts +29 -0
- package/dist/components/context-menu/context-menu-checkbox.js +1 -0
- package/dist/components/context-menu/context-menu-checkbox.vue.d.ts +37 -0
- package/dist/components/context-menu/context-menu-radio.js +1 -0
- package/dist/components/context-menu/context-menu-radio.vue.d.ts +37 -0
- package/dist/components/context-menu/context-menu-wrapper.js +1 -0
- package/dist/components/context-menu/context-menu-wrapper.vue.d.ts +41 -0
- package/dist/components/context-menu/context-menu.js +1 -0
- package/dist/components/context-menu/context-menu.vue.d.ts +37 -0
- package/dist/components/context-menu/index.d.ts +7 -0
- package/dist/components/context-menu/types.d.ts +25 -0
- package/dist/components/dialog/dialog-close.js +1 -0
- package/dist/components/dialog/dialog-close.vue.d.ts +18 -0
- package/dist/components/dialog/dialog-pure.js +1 -0
- package/dist/components/dialog/dialog-pure.vue.d.ts +47 -0
- package/dist/components/dialog/dialog.js +1 -0
- package/dist/components/dialog/dialog.vue.d.ts +62 -0
- package/dist/components/dialog/index.d.ts +6 -0
- package/dist/components/dialog/types.d.ts +35 -0
- package/dist/components/drawer/drawer-close.js +1 -0
- package/dist/components/drawer/drawer-close.vue.d.ts +18 -0
- package/dist/components/drawer/drawer.js +1 -0
- package/dist/components/drawer/drawer.vue.d.ts +63 -0
- package/dist/components/drawer/index.d.ts +3 -0
- package/dist/components/drawer/types.d.ts +16 -0
- package/dist/components/dropdown-menu/dropdown-menu-checkbox.js +1 -0
- package/dist/components/dropdown-menu/dropdown-menu-checkbox.vue.d.ts +37 -0
- package/dist/components/dropdown-menu/dropdown-menu-radio.js +1 -0
- package/dist/components/dropdown-menu/dropdown-menu-radio.vue.d.ts +37 -0
- package/dist/components/dropdown-menu/dropdown-menu-wrapper.js +1 -0
- package/dist/components/dropdown-menu/dropdown-menu-wrapper.vue.d.ts +42 -0
- package/dist/components/dropdown-menu/dropdown-menu.js +1 -0
- package/dist/components/dropdown-menu/dropdown-menu.vue.d.ts +37 -0
- package/dist/components/dropdown-menu/index.d.ts +7 -0
- package/dist/components/dropdown-menu/types.d.ts +25 -0
- package/dist/components/form/context.js +1 -0
- package/dist/components/form/form-field-array.js +1 -0
- package/dist/components/form/form-field-array.vue.d.ts +71 -0
- package/dist/components/form/form-field.js +1 -0
- package/dist/components/form/form-field.vue.d.ts +27 -0
- package/dist/components/form/form.js +1 -0
- package/dist/components/form/form.vue.d.ts +18 -0
- package/dist/components/form/index.d.ts +6 -0
- package/dist/components/form/types.d.ts +36 -0
- package/dist/components/icon/icon.js +1 -0
- package/dist/components/icon/icon.vue.d.ts +12 -0
- package/dist/components/icon/index.d.ts +2 -0
- package/dist/components/icon/types.d.ts +10 -0
- package/dist/components/input/index.d.ts +4 -0
- package/dist/components/input/input.js +1 -0
- package/dist/components/input/input.vue.d.ts +24 -0
- package/dist/components/input/types.d.ts +26 -0
- package/dist/components/kbd/index.d.ts +3 -0
- package/dist/components/kbd/kbd.js +1 -0
- package/dist/components/kbd/kbd.vue.d.ts +10 -0
- package/dist/components/kbd/types.d.ts +12 -0
- package/dist/components/label/index.d.ts +2 -0
- package/dist/components/label/label.js +1 -0
- package/dist/components/label/label.vue.d.ts +18 -0
- package/dist/components/label/types.d.ts +10 -0
- package/dist/components/layout/index.d.ts +5 -0
- package/dist/components/layout/layout-trigger.js +1 -0
- package/dist/components/layout/layout-trigger.vue.d.ts +18 -0
- package/dist/components/layout/layout.js +1 -0
- package/dist/components/layout/layout.vue.d.ts +35 -0
- package/dist/components/layout/types.d.ts +19 -0
- package/dist/components/link/index.d.ts +2 -0
- package/dist/components/link/link.js +1 -0
- package/dist/components/link/link.vue.d.ts +26 -0
- package/dist/components/link/types.d.ts +2 -0
- package/dist/components/list/index.d.ts +5 -0
- package/dist/components/list/list-item.js +1 -0
- package/dist/components/list/list-item.vue.d.ts +26 -0
- package/dist/components/list/list.js +1 -0
- package/dist/components/list/list.vue.d.ts +18 -0
- package/dist/components/list/types.d.ts +18 -0
- package/dist/components/menu/context.js +1 -0
- package/dist/components/menu/index.d.ts +7 -0
- package/dist/components/menu/menu-checkbox-options.js +1 -0
- package/dist/components/menu/menu-checkbox-options.vue.d.ts +26 -0
- package/dist/components/menu/menu-item-slot.js +1 -0
- package/dist/components/menu/menu-option.js +1 -0
- package/dist/components/menu/menu-option.vue.d.ts +46 -0
- package/dist/components/menu/menu-options.js +1 -0
- package/dist/components/menu/menu-options.vue.d.ts +46 -0
- package/dist/components/menu/menu-radio-options.js +1 -0
- package/dist/components/menu/menu-radio-options.vue.d.ts +26 -0
- package/dist/components/menu/shared.js +1 -0
- package/dist/components/menu/types.d.ts +92 -0
- package/dist/components/navigation-menu/context.js +1 -0
- package/dist/components/navigation-menu/index.d.ts +4 -0
- package/dist/components/navigation-menu/navigation-menu-item-slot.js +1 -0
- package/dist/components/navigation-menu/navigation-menu-option.js +1 -0
- package/dist/components/navigation-menu/navigation-menu-sub-option.js +1 -0
- package/dist/components/navigation-menu/navigation-menu.js +1 -0
- package/dist/components/navigation-menu/navigation-menu.vue.d.ts +55 -0
- package/dist/components/navigation-menu/shared.js +1 -0
- package/dist/components/navigation-menu/types.d.ts +62 -0
- package/dist/components/number-input/index.d.ts +2 -0
- package/dist/components/number-input/number-input.js +1 -0
- package/dist/components/number-input/number-input.vue.d.ts +28 -0
- package/dist/components/number-input/types.d.ts +29 -0
- package/dist/components/pagination/index.d.ts +4 -0
- package/dist/components/pagination/pagination.js +1 -0
- package/dist/components/pagination/pagination.vue.d.ts +32 -0
- package/dist/components/pagination/types.d.ts +37 -0
- package/dist/components/password/index.d.ts +2 -0
- package/dist/components/password/password.js +1 -0
- package/dist/components/password/password.vue.d.ts +33 -0
- package/dist/components/password/types.d.ts +30 -0
- package/dist/components/popover/index.d.ts +4 -0
- package/dist/components/popover/popover.js +1 -0
- package/dist/components/popover/popover.vue.d.ts +43 -0
- package/dist/components/popover/types.d.ts +19 -0
- package/dist/components/radio-group/index.d.ts +7 -0
- package/dist/components/radio-group/radio-card-group.js +1 -0
- package/dist/components/radio-group/radio-card-group.vue.d.ts +20 -0
- package/dist/components/radio-group/radio-card.js +1 -0
- package/dist/components/radio-group/radio-card.vue.d.ts +22 -0
- package/dist/components/radio-group/radio-group.js +1 -0
- package/dist/components/radio-group/radio-group.vue.d.ts +20 -0
- package/dist/components/radio-group/radio.js +1 -0
- package/dist/components/radio-group/radio.vue.d.ts +18 -0
- package/dist/components/radio-group/types.d.ts +47 -0
- package/dist/components/segment/index.d.ts +2 -0
- package/dist/components/segment/segment.js +1 -0
- package/dist/components/segment/segment.vue.d.ts +24 -0
- package/dist/components/segment/types.d.ts +26 -0
- package/dist/components/select/index.d.ts +4 -0
- package/dist/components/select/select-group-option.js +1 -0
- package/dist/components/select/select-option.js +1 -0
- package/dist/components/select/select-single-option.js +1 -0
- package/dist/components/select/select.js +1 -0
- package/dist/components/select/select.vue.d.ts +52 -0
- package/dist/components/select/shared.js +1 -0
- package/dist/components/select/types.d.ts +74 -0
- package/dist/components/separator/index.d.ts +4 -0
- package/dist/components/separator/separator.js +1 -0
- package/dist/components/separator/separator.vue.d.ts +11 -0
- package/dist/components/separator/types.d.ts +16 -0
- package/dist/components/switch/index.d.ts +5 -0
- package/dist/components/switch/switch.js +1 -0
- package/dist/components/switch/switch.vue.d.ts +645 -0
- package/dist/components/switch/types.d.ts +17 -0
- package/dist/components/tabs/index.d.ts +4 -0
- package/dist/components/tabs/tabs.js +1 -0
- package/dist/components/tabs/tabs.vue.d.ts +28 -0
- package/dist/components/tabs/types.d.ts +27 -0
- package/dist/components/tag/index.d.ts +3 -0
- package/dist/components/tag/tag.js +1 -0
- package/dist/components/tag/tag.vue.d.ts +32 -0
- package/dist/components/tag/types.d.ts +16 -0
- package/dist/components/textarea/index.d.ts +5 -0
- package/dist/components/textarea/textarea.js +1 -0
- package/dist/components/textarea/textarea.vue.d.ts +27 -0
- package/dist/components/textarea/types.d.ts +36 -0
- package/dist/components/tooltip/index.d.ts +4 -0
- package/dist/components/tooltip/tooltip.js +1 -0
- package/dist/components/tooltip/tooltip.vue.d.ts +33 -0
- package/dist/components/tooltip/types.d.ts +19 -0
- package/dist/components/tree/index.d.ts +5 -0
- package/dist/components/tree/index.js +1 -0
- package/dist/components/tree/tree-virtualizer.js +1 -0
- package/dist/components/tree/tree-virtualizer.vue.d.ts +31 -0
- package/dist/components/tree/tree.js +1 -0
- package/dist/components/tree/tree.vue.d.ts +32 -0
- package/dist/components/tree/types.d.ts +10 -0
- package/dist/components/tree-menu/context.js +1 -0
- package/dist/components/tree-menu/index.d.ts +3 -0
- package/dist/components/tree-menu/shared.js +1 -0
- package/dist/components/tree-menu/tree-menu-item-wrapper.js +1 -0
- package/dist/components/tree-menu/tree-menu-item-wrapper.vue.d.ts +17 -0
- package/dist/components/tree-menu/tree-menu-item.js +1 -0
- package/dist/components/tree-menu/tree-menu.js +1 -0
- package/dist/components/tree-menu/tree-menu.vue.d.ts +44 -0
- package/dist/components/tree-menu/types.d.ts +80 -0
- package/dist/components/virtualizer/index.d.ts +4 -0
- package/dist/components/virtualizer/index.js +1 -0
- package/dist/components/virtualizer/types.d.ts +9 -0
- package/dist/components/virtualizer/virtualizer.js +1 -0
- package/dist/components/virtualizer/virtualizer.vue.d.ts +24 -0
- package/dist/constants/components.d.ts +49 -0
- package/dist/constants/components.js +1 -0
- package/dist/index.d.ts +169 -6003
- package/dist/index.js +1 -1
- package/dist/nuxt/index.d.ts +10 -0
- package/dist/nuxt/index.js +1 -0
- package/dist/resolver/index.d.ts +6 -0
- package/dist/resolver/index.js +1 -0
- package/dist/styles.css +1395 -0
- package/dist/theme/config.js +1 -0
- package/dist/theme/context.d.ts +1 -0
- package/dist/theme/context.js +1 -0
- package/dist/theme/index.d.ts +3 -0
- package/dist/theme/merge.d.ts +1 -0
- package/dist/theme/merge.js +1 -0
- package/dist/theme/shared.js +1 -0
- package/dist/theme/types.d.ts +5 -0
- package/dist/variants/accordion.js +1 -0
- package/dist/variants/alert.d.ts +300 -0
- package/dist/variants/alert.js +1 -0
- package/dist/variants/avatar.js +1 -0
- package/dist/variants/badge.d.ts +201 -0
- package/dist/variants/badge.js +1 -0
- package/dist/variants/breadcrumb.js +1 -0
- package/dist/variants/button.d.ts +146 -0
- package/dist/variants/button.js +1 -0
- package/dist/variants/card.js +1 -0
- package/dist/variants/checkbox.d.ts +252 -0
- package/dist/variants/checkbox.js +1 -0
- package/dist/variants/collapsible.js +1 -0
- package/dist/variants/command.js +1 -0
- package/dist/variants/dialog.js +1 -0
- package/dist/variants/drawer.js +1 -0
- package/dist/variants/form.js +1 -0
- package/dist/variants/input.js +1 -0
- package/dist/variants/kbd.d.ts +51 -0
- package/dist/variants/kbd.js +1 -0
- package/dist/variants/label.js +1 -0
- package/dist/variants/layout.js +1 -0
- package/dist/variants/link.js +1 -0
- package/dist/variants/list.js +1 -0
- package/dist/variants/menu.js +1 -0
- package/dist/variants/navigation-menu.js +1 -0
- package/dist/variants/number-input.js +1 -0
- package/dist/variants/pagination.d.ts +232 -0
- package/dist/variants/pagination.js +1 -0
- package/dist/variants/popover.js +1 -0
- package/dist/variants/radio-group.d.ts +276 -0
- package/dist/variants/radio-group.js +1 -0
- package/dist/variants/select.js +1 -0
- package/dist/variants/separator.d.ts +177 -0
- package/dist/variants/separator.js +1 -0
- package/dist/variants/switch.d.ts +210 -0
- package/dist/variants/switch.js +1 -0
- package/dist/variants/tabs.d.ts +229 -0
- package/dist/variants/tabs.js +1 -0
- package/dist/variants/tag.d.ts +103 -0
- package/dist/variants/tag.js +1 -0
- package/dist/variants/textarea.d.ts +183 -0
- package/dist/variants/textarea.js +1 -0
- package/dist/variants/tooltip.js +1 -0
- package/dist/variants/tree-menu.js +1 -0
- package/package.json +27 -14
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{mergeSlotVariants as e}from"../../theme/shared.js";import{provideSizeContext as t}from"../../theme/context.js";import n from"../button/button-icon.js";import{dialogVariants as r}from"../../variants/dialog.js";import{drawerContentVariants as i,drawerScrollableVariants as a}from"../../variants/drawer.js";import{computed as o,createBlock as s,createCommentVNode as c,createElementVNode as l,createTextVNode as u,createVNode as d,defineComponent as f,guardReactiveProps as p,mergeProps as m,normalizeClass as h,normalizeProps as g,openBlock as _,renderSlot as v,toDisplayString as y,toHandlers as b,unref as x,useSlots as S,withCtx as C}from"vue";import{useForwardListeners as w,useOmitProps as T}from"@soybeanjs/headless/composables";import{DialogClose as E,DialogContent as D,DialogDescription as O,DialogFooter as k,DialogHeader as A,DialogOverlay as j,DialogPortal as M,DialogRoot as N,DialogTitle as P,DialogTrigger as F,provideDialogThemeContext as I}from"@soybeanjs/headless";var L=f({name:`SDrawer`,__name:`drawer`,props:{side:{},scrollable:{type:Boolean,default:!0},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(f,{emit:L}){let R=f,z=T(R,[`size`,`ui`,`side`,`title`,`description`,`closable`,`triggerProps`,`contentProps`,`headerProps`,`footerProps`,`titleProps`,`descriptionProps`,`overlayProps`,`portalProps`]),B=L,V=S(),H=w(B),U=o(()=>{let t=r({size:R.size}),n=i({size:R.size,side:R.side});t.content=()=>n;let o=()=>a({scrollable:R.scrollable});return e({...t,scrollable:o},R.ui)});return I({ui:U}),t(()=>R.size),(e,t)=>(_(),s(x(N),m(x(z),{"onUpdate:open":t[0]||=e=>B(`update:open`,e)}),{default:C(t=>[d(x(F),m(f.triggerProps,{size:f.size,"as-child":``}),{default:C(()=>[v(e.$slots,`trigger`)]),_:3},16,[`size`]),d(x(M),g(p(f.portalProps)),{default:C(()=>[d(x(j),g(p(f.overlayProps)),null,16),d(x(D),m(f.contentProps,b(x(H))),{default:C(()=>[d(x(A),g(p(f.headerProps)),{default:C(()=>[d(x(P),g(p(f.titleProps)),{default:C(()=>[v(e.$slots,`title`,g(p(t)),()=>[u(y(f.title),1)])]),_:2},1040),x(V).description||f.description?(_(),s(x(O),g(m({key:0},f.descriptionProps)),{default:C(()=>[v(e.$slots,`description`,g(p(t)),()=>[u(y(f.description),1)])]),_:2},1040)):c(`v-if`,!0),f.closable?(_(),s(x(E),{key:1,class:h(U.value.closable),"as-child":``},{default:C(()=>[v(e.$slots,`close`,{},()=>[d(n,{size:f.size,icon:`lucide:x`},null,8,[`size`])])]),_:3},8,[`class`])):c(`v-if`,!0)]),_:2},1040),l(`div`,{class:h(U.value.scrollable)},[v(e.$slots,`default`,g(p(t)))],2),x(V).footer?(_(),s(x(k),g(m({key:0},f.footerProps)),{default:C(()=>[v(e.$slots,`footer`,g(p(t)))]),_:2},1040)):c(`v-if`,!0)]),_:2},1040)]),_:2},1040)]),_:3},16))}});export{L as default};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { DrawerProps } from "./types.js";
|
|
2
|
+
import * as vue235 from "vue";
|
|
3
|
+
import * as _soybeanjs_headless124 from "@soybeanjs/headless";
|
|
4
|
+
|
|
5
|
+
//#region src/components/drawer/drawer.vue.d.ts
|
|
6
|
+
declare var __VLS_15: {}, __VLS_42: {
|
|
7
|
+
open: boolean | undefined;
|
|
8
|
+
close: () => void;
|
|
9
|
+
}, __VLS_49: {
|
|
10
|
+
open: boolean | undefined;
|
|
11
|
+
close: () => void;
|
|
12
|
+
}, __VLS_56: {}, __VLS_62: {
|
|
13
|
+
open: boolean | undefined;
|
|
14
|
+
close: () => void;
|
|
15
|
+
}, __VLS_69: {
|
|
16
|
+
open: boolean | undefined;
|
|
17
|
+
close: () => void;
|
|
18
|
+
};
|
|
19
|
+
type __VLS_Slots = {} & {
|
|
20
|
+
trigger?: (props: typeof __VLS_15) => any;
|
|
21
|
+
} & {
|
|
22
|
+
title?: (props: typeof __VLS_42) => any;
|
|
23
|
+
} & {
|
|
24
|
+
description?: (props: typeof __VLS_49) => any;
|
|
25
|
+
} & {
|
|
26
|
+
close?: (props: typeof __VLS_56) => any;
|
|
27
|
+
} & {
|
|
28
|
+
default?: (props: typeof __VLS_62) => any;
|
|
29
|
+
} & {
|
|
30
|
+
footer?: (props: typeof __VLS_69) => any;
|
|
31
|
+
};
|
|
32
|
+
declare const __VLS_base: vue235.DefineComponent<DrawerProps, {}, {}, {}, {}, vue235.ComponentOptionsMixin, vue235.ComponentOptionsMixin, {
|
|
33
|
+
"update:open": (value: boolean) => any;
|
|
34
|
+
escapeKeyDown: (event: KeyboardEvent) => any;
|
|
35
|
+
pointerDownOutside: (event: _soybeanjs_headless124.PointerDownOutsideEvent) => any;
|
|
36
|
+
focusOutside: (event: _soybeanjs_headless124.FocusOutsideEvent) => any;
|
|
37
|
+
interactOutside: (event: _soybeanjs_headless124.PointerDownOutsideEvent | _soybeanjs_headless124.FocusOutsideEvent) => any;
|
|
38
|
+
openAutoFocus: (event: Event) => any;
|
|
39
|
+
closeAutoFocus: (event: Event) => any;
|
|
40
|
+
}, string, vue235.PublicProps, Readonly<DrawerProps> & Readonly<{
|
|
41
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
42
|
+
onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
|
|
43
|
+
onPointerDownOutside?: ((event: _soybeanjs_headless124.PointerDownOutsideEvent) => any) | undefined;
|
|
44
|
+
onFocusOutside?: ((event: _soybeanjs_headless124.FocusOutsideEvent) => any) | undefined;
|
|
45
|
+
onInteractOutside?: ((event: _soybeanjs_headless124.PointerDownOutsideEvent | _soybeanjs_headless124.FocusOutsideEvent) => any) | undefined;
|
|
46
|
+
onOpenAutoFocus?: ((event: Event) => any) | undefined;
|
|
47
|
+
onCloseAutoFocus?: ((event: Event) => any) | undefined;
|
|
48
|
+
}>, {
|
|
49
|
+
defaultOpen: boolean;
|
|
50
|
+
open: boolean;
|
|
51
|
+
closable: boolean;
|
|
52
|
+
scrollable: boolean;
|
|
53
|
+
modal: boolean;
|
|
54
|
+
}, {}, {}, {}, string, vue235.ComponentProvideOptions, false, {}, any>;
|
|
55
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
56
|
+
declare const _default: typeof __VLS_export;
|
|
57
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
58
|
+
new (): {
|
|
59
|
+
$slots: S;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
//#endregion
|
|
63
|
+
export { _default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DialogEmits, DialogProps } from "../dialog/types.js";
|
|
2
|
+
import { Side } from "@soybeanjs/headless";
|
|
3
|
+
|
|
4
|
+
//#region src/components/drawer/types.d.ts
|
|
5
|
+
interface DrawerProps extends DialogProps {
|
|
6
|
+
side?: Side;
|
|
7
|
+
/**
|
|
8
|
+
* If true, the content will be scrollable when the root has height and content is taller than the root
|
|
9
|
+
*
|
|
10
|
+
* @default true
|
|
11
|
+
*/
|
|
12
|
+
scrollable?: boolean;
|
|
13
|
+
}
|
|
14
|
+
type DrawerEmits = DialogEmits;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { DrawerEmits, DrawerProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"../menu/menu-checkbox-options.js";import t from"./dropdown-menu-wrapper.js";import{computed as n,createBlock as r,createSlots as i,createVNode as a,defineComponent as o,guardReactiveProps as s,mergeProps as c,normalizeProps as l,openBlock as u,renderList as d,renderSlot as f,toHandlers as p,unref as m,useSlots as h,withCtx as g}from"vue";import{useForwardListeners as _,useOmitProps as v,usePickProps as y}from"@soybeanjs/headless/composables";var b=o({name:`SDropdownMenuCheckbox`,__name:`dropdown-menu-checkbox`,props:{size:{},ui:{},disabled:{type:Boolean},showArrow:{type:Boolean},triggerProps:{},portalProps:{},contentProps:{},arrowProps:{},trigger:{},delayDuration:{},skipDelayDuration:{},dir:{},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean},modal:{type:Boolean,default:!0},items:{},groupLabelProps:{},checkboxItemProps:{},indicatorProps:{},shortcutProps:{},separatorProps:{},modelValue:{default:void 0},defaultValue:{default:()=>[]},asChild:{type:Boolean},as:{}},emits:[`update:open`,`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`,`entryFocus`,`update:modelValue`,`select`],setup(o,{emit:b}){let x=o,S=b,C=h(),w=[`defaultOpen`,`open`,`dir`,`modal`,`trigger`,`delayDuration`,`skipDelayDuration`,`size`,`ui`,`disabled`,`showArrow`,`triggerProps`,`portalProps`,`contentProps`,`arrowProps`],T=y(x,w),E=v(x,w),D=_(S),O=n(()=>Object.keys(C).filter(e=>e!==`trigger`));return(n,h)=>(u(),r(t,c(m(T),p(m(D))),{trigger:g(()=>[f(n.$slots,`trigger`)]),default:g(()=>[a(e,c(m(E),{"portal-props":o.portalProps},p(m(D))),i({_:2},[d(O.value,e=>({name:e,fn:g(t=>[f(n.$slots,e,l(s(t)))])}))]),1040,[`portal-props`])]),_:3},16))}});export{b as default};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { MenuCheckboxOptionData } from "../menu/types.js";
|
|
2
|
+
import { DropdownMenuCheckboxProps } from "./types.js";
|
|
3
|
+
import * as vue245 from "vue";
|
|
4
|
+
import * as _soybeanjs_headless132 from "@soybeanjs/headless";
|
|
5
|
+
import { DefinedValue } from "@soybeanjs/headless";
|
|
6
|
+
|
|
7
|
+
//#region src/components/dropdown-menu/dropdown-menu-checkbox.vue.d.ts
|
|
8
|
+
declare const __VLS_export: <T extends DefinedValue = DefinedValue, S extends MenuCheckboxOptionData<T> = MenuCheckboxOptionData<T>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
9
|
+
props: __VLS_PrettifyLocal<DropdownMenuCheckboxProps<T, S> & {
|
|
10
|
+
onSelect?: ((item: S, event: Event) => any) | undefined;
|
|
11
|
+
"onUpdate:modelValue"?: ((value: T[]) => any) | undefined;
|
|
12
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
13
|
+
onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
|
|
14
|
+
onPointerDownOutside?: ((event: _soybeanjs_headless132.PointerDownOutsideEvent) => any) | undefined;
|
|
15
|
+
onFocusOutside?: ((event: _soybeanjs_headless132.FocusOutsideEvent) => any) | undefined;
|
|
16
|
+
onInteractOutside?: ((event: _soybeanjs_headless132.PointerDownOutsideEvent | _soybeanjs_headless132.FocusOutsideEvent) => any) | undefined;
|
|
17
|
+
onOpenAutoFocus?: ((event: Event) => any) | undefined;
|
|
18
|
+
onCloseAutoFocus?: ((event: Event) => any) | undefined;
|
|
19
|
+
onEntryFocus?: ((event: Event) => any) | undefined;
|
|
20
|
+
}> & vue245.PublicProps;
|
|
21
|
+
expose: (exposed: {}) => void;
|
|
22
|
+
attrs: any;
|
|
23
|
+
slots: {
|
|
24
|
+
trigger: () => any;
|
|
25
|
+
item: (props: S) => any;
|
|
26
|
+
'item-leading': (props: S) => any;
|
|
27
|
+
'item-trailing': (props: S) => any;
|
|
28
|
+
'item-indicator-icon': (props: S) => any;
|
|
29
|
+
};
|
|
30
|
+
emit: ((evt: "select", item: S, event: Event) => void) & ((evt: "update:modelValue", value: T[]) => void) & ((evt: "update:open", value: boolean) => void) & ((evt: "escapeKeyDown", event: KeyboardEvent) => void) & ((evt: "pointerDownOutside", event: _soybeanjs_headless132.PointerDownOutsideEvent) => void) & ((evt: "focusOutside", event: _soybeanjs_headless132.FocusOutsideEvent) => void) & ((evt: "interactOutside", event: _soybeanjs_headless132.PointerDownOutsideEvent | _soybeanjs_headless132.FocusOutsideEvent) => void) & ((evt: "openAutoFocus", event: Event) => void) & ((evt: "closeAutoFocus", event: Event) => void) & ((evt: "entryFocus", event: Event) => void);
|
|
31
|
+
}>) => vue245.VNode & {
|
|
32
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
33
|
+
};
|
|
34
|
+
declare const _default: typeof __VLS_export;
|
|
35
|
+
type __VLS_PrettifyLocal<T> = { [K in keyof T as K]: T[K] } & {};
|
|
36
|
+
//#endregion
|
|
37
|
+
export { _default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"../menu/menu-radio-options.js";import t from"./dropdown-menu-wrapper.js";import{computed as n,createBlock as r,createSlots as i,createVNode as a,defineComponent as o,guardReactiveProps as s,mergeProps as c,normalizeProps as l,openBlock as u,renderList as d,renderSlot as f,toHandlers as p,unref as m,useSlots as h,withCtx as g}from"vue";import{useForwardListeners as _,useOmitProps as v,usePickProps as y}from"@soybeanjs/headless/composables";var b=o({name:`SDropdownMenuRadio`,__name:`dropdown-menu-radio`,props:{size:{},ui:{},disabled:{type:Boolean},showArrow:{type:Boolean},triggerProps:{},portalProps:{},contentProps:{},arrowProps:{},trigger:{},delayDuration:{},skipDelayDuration:{},dir:{},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean},modal:{type:Boolean,default:!0},items:{},groupLabelProps:{},radioItemProps:{},indicatorProps:{},shortcutProps:{},separatorProps:{},modelValue:{default:void 0},defaultValue:{},asChild:{type:Boolean},as:{}},emits:[`update:open`,`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`,`entryFocus`,`update:modelValue`,`select`],setup(o,{emit:b}){let x=o,S=b,C=h(),w=[`defaultOpen`,`open`,`dir`,`modal`,`trigger`,`delayDuration`,`skipDelayDuration`,`size`,`ui`,`disabled`,`showArrow`,`triggerProps`,`portalProps`,`contentProps`,`arrowProps`],T=y(x,w),E=v(x,w),D=_(S),O=n(()=>Object.keys(C).filter(e=>e!==`trigger`));return(n,h)=>(u(),r(t,c(m(T),p(m(D))),{trigger:g(()=>[f(n.$slots,`trigger`)]),default:g(()=>[a(e,c(m(E),{"portal-props":o.portalProps},p(m(D))),i({_:2},[d(O.value,e=>({name:e,fn:g(t=>[f(n.$slots,e,l(s(t)))])}))]),1040,[`portal-props`])]),_:3},16))}});export{b as default};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { MenuRadioOptionData } from "../menu/types.js";
|
|
2
|
+
import { DropdownMenuRadioProps } from "./types.js";
|
|
3
|
+
import * as vue247 from "vue";
|
|
4
|
+
import * as _soybeanjs_headless140 from "@soybeanjs/headless";
|
|
5
|
+
import { AcceptableBooleanValue } from "@soybeanjs/headless";
|
|
6
|
+
|
|
7
|
+
//#region src/components/dropdown-menu/dropdown-menu-radio.vue.d.ts
|
|
8
|
+
declare const __VLS_export: <T extends AcceptableBooleanValue = AcceptableBooleanValue, S extends MenuRadioOptionData<T> = MenuRadioOptionData<T>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
9
|
+
props: __VLS_PrettifyLocal<DropdownMenuRadioProps<T, S> & {
|
|
10
|
+
onSelect?: ((item: S, event: Event) => any) | undefined;
|
|
11
|
+
"onUpdate:modelValue"?: ((payload: NonNullable<T>) => any) | undefined;
|
|
12
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
13
|
+
onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
|
|
14
|
+
onPointerDownOutside?: ((event: _soybeanjs_headless140.PointerDownOutsideEvent) => any) | undefined;
|
|
15
|
+
onFocusOutside?: ((event: _soybeanjs_headless140.FocusOutsideEvent) => any) | undefined;
|
|
16
|
+
onInteractOutside?: ((event: _soybeanjs_headless140.PointerDownOutsideEvent | _soybeanjs_headless140.FocusOutsideEvent) => any) | undefined;
|
|
17
|
+
onOpenAutoFocus?: ((event: Event) => any) | undefined;
|
|
18
|
+
onCloseAutoFocus?: ((event: Event) => any) | undefined;
|
|
19
|
+
onEntryFocus?: ((event: Event) => any) | undefined;
|
|
20
|
+
}> & vue247.PublicProps;
|
|
21
|
+
expose: (exposed: {}) => void;
|
|
22
|
+
attrs: any;
|
|
23
|
+
slots: {
|
|
24
|
+
trigger: () => any;
|
|
25
|
+
item: (props: S) => any;
|
|
26
|
+
'item-leading': (props: S) => any;
|
|
27
|
+
'item-trailing': (props: S) => any;
|
|
28
|
+
'item-indicator-icon': (props: S) => any;
|
|
29
|
+
};
|
|
30
|
+
emit: ((evt: "select", item: S, event: Event) => void) & ((evt: "update:modelValue", payload: NonNullable<T>) => void) & ((evt: "update:open", value: boolean) => void) & ((evt: "escapeKeyDown", event: KeyboardEvent) => void) & ((evt: "pointerDownOutside", event: _soybeanjs_headless140.PointerDownOutsideEvent) => void) & ((evt: "focusOutside", event: _soybeanjs_headless140.FocusOutsideEvent) => void) & ((evt: "interactOutside", event: _soybeanjs_headless140.PointerDownOutsideEvent | _soybeanjs_headless140.FocusOutsideEvent) => void) & ((evt: "openAutoFocus", event: Event) => void) & ((evt: "closeAutoFocus", event: Event) => void) & ((evt: "entryFocus", event: Event) => void);
|
|
31
|
+
}>) => vue247.VNode & {
|
|
32
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
33
|
+
};
|
|
34
|
+
declare const _default: typeof __VLS_export;
|
|
35
|
+
type __VLS_PrettifyLocal<T> = { [K in keyof T as K]: T[K] } & {};
|
|
36
|
+
//#endregion
|
|
37
|
+
export { _default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{mergeSlotVariants as e}from"../../theme/shared.js";import{provideMenuExtraThemeContext as t}from"../menu/context.js";import{menuVariants as n}from"../../variants/menu.js";import{computed as r,createBlock as i,createCommentVNode as a,createVNode as o,defineComponent as s,guardReactiveProps as c,mergeProps as l,normalizeProps as u,openBlock as d,renderSlot as f,toHandlers as p,unref as m,withCtx as h}from"vue";import{useForwardListeners as g,useOmitProps as _}from"@soybeanjs/headless/composables";import{DropdownMenuArrow as v,DropdownMenuContent as y,DropdownMenuPortal as b,DropdownMenuRoot as x,DropdownMenuTrigger as S,provideMenuThemeContext as C}from"@soybeanjs/headless";var w=s({name:`SDropdownMenuWrapper`,__name:`dropdown-menu-wrapper`,props:{size:{},ui:{},disabled:{type:Boolean},showArrow:{type:Boolean},triggerProps:{},portalProps:{},contentProps:{},arrowProps:{},trigger:{},delayDuration:{},skipDelayDuration:{},dir:{},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean},modal:{type:Boolean,default:!0}},emits:[`update:open`,`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`,`entryFocus`],setup(s,{emit:w}){let T=s,E=w,D=_(T,[`size`,`ui`,`disabled`,`showArrow`,`triggerProps`,`portalProps`,`contentProps`,`arrowProps`]),O=g(E),k=r(()=>e(n({size:T.size}),T.ui));return C({ui:k}),t({ui:k}),(e,t)=>(d(),i(m(x),l(m(D),{"onUpdate:open":t[0]||=e=>E(`update:open`,e)}),{default:h(()=>[o(m(S),l(s.triggerProps,{"as-child":``,disabled:s.disabled}),{default:h(()=>[f(e.$slots,`trigger`)]),_:3},16,[`disabled`]),o(m(b),u(c(s.portalProps)),{default:h(()=>[o(m(y),l(s.contentProps,p(m(O))),{default:h(()=>[f(e.$slots,`default`),s.showArrow?(d(),i(m(v),u(l({key:0},s.arrowProps)),null,16)):a(`v-if`,!0)]),_:3},16)]),_:3},16)]),_:3},16))}});export{w as default};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { DropdownMenuWrapperProps } from "./types.js";
|
|
2
|
+
import * as vue249 from "vue";
|
|
3
|
+
import * as _soybeanjs_headless148 from "@soybeanjs/headless";
|
|
4
|
+
|
|
5
|
+
//#region src/components/dropdown-menu/dropdown-menu-wrapper.vue.d.ts
|
|
6
|
+
declare var __VLS_15: {}, __VLS_27: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
trigger?: (props: typeof __VLS_15) => any;
|
|
9
|
+
} & {
|
|
10
|
+
default?: (props: typeof __VLS_27) => any;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_base: vue249.DefineComponent<DropdownMenuWrapperProps, {}, {}, {}, {}, vue249.ComponentOptionsMixin, vue249.ComponentOptionsMixin, {
|
|
13
|
+
"update:open": (value: boolean) => any;
|
|
14
|
+
escapeKeyDown: (event: KeyboardEvent) => any;
|
|
15
|
+
pointerDownOutside: (event: _soybeanjs_headless148.PointerDownOutsideEvent) => any;
|
|
16
|
+
focusOutside: (event: _soybeanjs_headless148.FocusOutsideEvent) => any;
|
|
17
|
+
interactOutside: (event: _soybeanjs_headless148.PointerDownOutsideEvent | _soybeanjs_headless148.FocusOutsideEvent) => any;
|
|
18
|
+
openAutoFocus: (event: Event) => any;
|
|
19
|
+
closeAutoFocus: (event: Event) => any;
|
|
20
|
+
entryFocus: (event: Event) => any;
|
|
21
|
+
}, string, vue249.PublicProps, Readonly<DropdownMenuWrapperProps> & Readonly<{
|
|
22
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
23
|
+
onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
|
|
24
|
+
onPointerDownOutside?: ((event: _soybeanjs_headless148.PointerDownOutsideEvent) => any) | undefined;
|
|
25
|
+
onFocusOutside?: ((event: _soybeanjs_headless148.FocusOutsideEvent) => any) | undefined;
|
|
26
|
+
onInteractOutside?: ((event: _soybeanjs_headless148.PointerDownOutsideEvent | _soybeanjs_headless148.FocusOutsideEvent) => any) | undefined;
|
|
27
|
+
onOpenAutoFocus?: ((event: Event) => any) | undefined;
|
|
28
|
+
onCloseAutoFocus?: ((event: Event) => any) | undefined;
|
|
29
|
+
onEntryFocus?: ((event: Event) => any) | undefined;
|
|
30
|
+
}>, {
|
|
31
|
+
open: boolean;
|
|
32
|
+
modal: boolean;
|
|
33
|
+
}, {}, {}, {}, string, vue249.ComponentProvideOptions, false, {}, any>;
|
|
34
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
35
|
+
declare const _default: typeof __VLS_export;
|
|
36
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
37
|
+
new (): {
|
|
38
|
+
$slots: S;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
//#endregion
|
|
42
|
+
export { _default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"../menu/menu-options.js";import t from"./dropdown-menu-wrapper.js";import{computed as n,createBlock as r,createSlots as i,createVNode as a,defineComponent as o,guardReactiveProps as s,mergeProps as c,normalizeProps as l,openBlock as u,renderList as d,renderSlot as f,toHandlers as p,unref as m,useSlots as h,withCtx as g}from"vue";import{useForwardListeners as _,useOmitProps as v,usePickProps as y}from"@soybeanjs/headless/composables";var b=o({name:`SDropdownMenu`,__name:`dropdown-menu`,props:{size:{},ui:{},disabled:{type:Boolean},showArrow:{type:Boolean},triggerProps:{},portalProps:{},contentProps:{},arrowProps:{},trigger:{},delayDuration:{},skipDelayDuration:{},dir:{},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean},modal:{type:Boolean,default:!0},items:{},itemProps:{},groupProps:{},groupLabelProps:{},subProps:{},subTriggerProps:{},subContentProps:{},separatorProps:{},shortcutProps:{}},emits:[`update:open`,`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`,`entryFocus`,`select`],setup(o,{emit:b}){let x=o,S=b,C=h(),w=[`defaultOpen`,`open`,`dir`,`modal`,`trigger`,`delayDuration`,`skipDelayDuration`,`size`,`ui`,`disabled`,`showArrow`,`triggerProps`,`portalProps`,`contentProps`,`arrowProps`],T=y(x,w),E=v(x,w),D=_(S),O=n(()=>Object.keys(C).filter(e=>e!==`trigger`));return(n,h)=>(u(),r(t,c(m(T),p(m(D))),{trigger:g(()=>[f(n.$slots,`trigger`)]),default:g(()=>[a(e,c(m(E),{"portal-props":o.portalProps},p(m(D))),i({_:2},[d(O.value,e=>({name:e,fn:g(t=>[f(n.$slots,e,l(s(t)))])}))]),1040,[`portal-props`])]),_:3},16))}});export{b as default};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { MenuOptionData } from "../menu/types.js";
|
|
2
|
+
import { DropdownMenuProps } from "./types.js";
|
|
3
|
+
import * as vue233 from "vue";
|
|
4
|
+
import * as _soybeanjs_headless116 from "@soybeanjs/headless";
|
|
5
|
+
import { DefinedValue } from "@soybeanjs/headless";
|
|
6
|
+
|
|
7
|
+
//#region src/components/dropdown-menu/dropdown-menu.vue.d.ts
|
|
8
|
+
declare const __VLS_export: <T extends DefinedValue = DefinedValue, S extends MenuOptionData<T> = MenuOptionData<T>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
9
|
+
props: __VLS_PrettifyLocal<DropdownMenuProps<T, S> & {
|
|
10
|
+
onSelect?: ((item: S, event: Event) => any) | undefined;
|
|
11
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
12
|
+
onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
|
|
13
|
+
onPointerDownOutside?: ((event: _soybeanjs_headless116.PointerDownOutsideEvent) => any) | undefined;
|
|
14
|
+
onFocusOutside?: ((event: _soybeanjs_headless116.FocusOutsideEvent) => any) | undefined;
|
|
15
|
+
onInteractOutside?: ((event: _soybeanjs_headless116.PointerDownOutsideEvent | _soybeanjs_headless116.FocusOutsideEvent) => any) | undefined;
|
|
16
|
+
onOpenAutoFocus?: ((event: Event) => any) | undefined;
|
|
17
|
+
onCloseAutoFocus?: ((event: Event) => any) | undefined;
|
|
18
|
+
onEntryFocus?: ((event: Event) => any) | undefined;
|
|
19
|
+
}> & vue233.PublicProps;
|
|
20
|
+
expose: (exposed: {}) => void;
|
|
21
|
+
attrs: any;
|
|
22
|
+
slots: {
|
|
23
|
+
trigger: () => any;
|
|
24
|
+
item: (props: MenuOptionData<T>) => any;
|
|
25
|
+
'item-leading': (props: MenuOptionData<T>) => any;
|
|
26
|
+
'item-trailing': (props: MenuOptionData<T>) => any;
|
|
27
|
+
'item-trigger': (props: MenuOptionData<T>) => any;
|
|
28
|
+
'item-trigger-icon': (props: MenuOptionData<T>) => any;
|
|
29
|
+
};
|
|
30
|
+
emit: ((evt: "select", item: S, event: Event) => void) & ((evt: "update:open", value: boolean) => void) & ((evt: "escapeKeyDown", event: KeyboardEvent) => void) & ((evt: "pointerDownOutside", event: _soybeanjs_headless116.PointerDownOutsideEvent) => void) & ((evt: "focusOutside", event: _soybeanjs_headless116.FocusOutsideEvent) => void) & ((evt: "interactOutside", event: _soybeanjs_headless116.PointerDownOutsideEvent | _soybeanjs_headless116.FocusOutsideEvent) => void) & ((evt: "openAutoFocus", event: Event) => void) & ((evt: "closeAutoFocus", event: Event) => void) & ((evt: "entryFocus", event: Event) => void);
|
|
31
|
+
}>) => vue233.VNode & {
|
|
32
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
33
|
+
};
|
|
34
|
+
declare const _default: typeof __VLS_export;
|
|
35
|
+
type __VLS_PrettifyLocal<T> = { [K in keyof T as K]: T[K] } & {};
|
|
36
|
+
//#endregion
|
|
37
|
+
export { _default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DropdownMenuCheckboxEmits, DropdownMenuCheckboxProps, DropdownMenuEmits, DropdownMenuProps, DropdownMenuRadioEmits, DropdownMenuRadioProps, DropdownMenuWrapperEmits, DropdownMenuWrapperProps } from "./types.js";
|
|
2
|
+
import { _default } from "./dropdown-menu.vue.js";
|
|
3
|
+
import { _default as _default$1 } from "./dropdown-menu-checkbox.vue.js";
|
|
4
|
+
import { _default as _default$2 } from "./dropdown-menu-radio.vue.js";
|
|
5
|
+
import { _default as _default$3 } from "./dropdown-menu-wrapper.vue.js";
|
|
6
|
+
import { DropdownMenuAnchorProps, DropdownMenuArrowProps, DropdownMenuCheckboxGroupEmits, DropdownMenuCheckboxGroupProps, DropdownMenuCheckboxItemEmits, DropdownMenuCheckboxItemProps, DropdownMenuContentEmits, DropdownMenuContentProps, DropdownMenuGroupLabelProps, DropdownMenuGroupProps, DropdownMenuItemEmits, DropdownMenuItemIndicatorProps, DropdownMenuItemProps, DropdownMenuPortalProps, DropdownMenuRadioGroupEmits, DropdownMenuRadioGroupProps, DropdownMenuRadioItemEmits, DropdownMenuRadioItemProps, DropdownMenuRootEmits, DropdownMenuRootProps, DropdownMenuSeparatorProps, DropdownMenuSubContentEmits, DropdownMenuSubContentProps, DropdownMenuSubEmits, DropdownMenuSubProps, DropdownMenuSubTriggerProps, DropdownMenuTriggerProps, DropdownMenuTriggerType } from "@soybeanjs/headless/dropdown-menu";
|
|
7
|
+
export { type DropdownMenuAnchorProps, type DropdownMenuArrowProps, type DropdownMenuCheckboxGroupEmits, type DropdownMenuCheckboxGroupProps, type DropdownMenuCheckboxItemEmits, type DropdownMenuCheckboxItemProps, type DropdownMenuContentEmits, type DropdownMenuContentProps, type DropdownMenuGroupLabelProps, type DropdownMenuGroupProps, type DropdownMenuItemEmits, type DropdownMenuItemIndicatorProps, type DropdownMenuItemProps, type DropdownMenuPortalProps, type DropdownMenuRadioGroupEmits, type DropdownMenuRadioGroupProps, type DropdownMenuRadioItemEmits, type DropdownMenuRadioItemProps, type DropdownMenuRootEmits, type DropdownMenuRootProps, type DropdownMenuSeparatorProps, type DropdownMenuSubContentEmits, type DropdownMenuSubContentProps, type DropdownMenuSubEmits, type DropdownMenuSubProps, type DropdownMenuSubTriggerProps, type DropdownMenuTriggerProps, type DropdownMenuTriggerType };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ThemeSize } from "../../theme/types.js";
|
|
2
|
+
import "../../theme/index.js";
|
|
3
|
+
import { MenuCheckboxOptionData, MenuCheckboxOptionsEmits, MenuCheckboxOptionsProps, MenuExtendedUi, MenuOptionData, MenuOptionsEmits, MenuOptionsProps, MenuRadioOptionData, MenuRadioOptionsEmits, MenuRadioOptionsProps } from "../menu/types.js";
|
|
4
|
+
import { AcceptableBooleanValue, DefinedValue, DropdownMenuArrowProps, DropdownMenuContentEmits, DropdownMenuContentProps, DropdownMenuPortalProps, DropdownMenuRootEmits, DropdownMenuRootProps, DropdownMenuTriggerProps } from "@soybeanjs/headless";
|
|
5
|
+
|
|
6
|
+
//#region src/components/dropdown-menu/types.d.ts
|
|
7
|
+
interface DropdownMenuWrapperProps extends DropdownMenuRootProps {
|
|
8
|
+
size?: ThemeSize;
|
|
9
|
+
ui?: Partial<MenuExtendedUi>;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
showArrow?: boolean;
|
|
12
|
+
triggerProps?: DropdownMenuTriggerProps;
|
|
13
|
+
portalProps?: DropdownMenuPortalProps;
|
|
14
|
+
contentProps?: DropdownMenuContentProps;
|
|
15
|
+
arrowProps?: DropdownMenuArrowProps;
|
|
16
|
+
}
|
|
17
|
+
type DropdownMenuWrapperEmits = DropdownMenuRootEmits & DropdownMenuContentEmits;
|
|
18
|
+
interface DropdownMenuProps<T extends DefinedValue = DefinedValue, S extends MenuOptionData<T> = MenuOptionData<T>> extends DropdownMenuWrapperProps, MenuOptionsProps<T, S> {}
|
|
19
|
+
type DropdownMenuEmits<T extends MenuOptionData = MenuOptionData> = DropdownMenuWrapperEmits & MenuOptionsEmits<T>;
|
|
20
|
+
interface DropdownMenuCheckboxProps<T extends DefinedValue = DefinedValue, S extends MenuCheckboxOptionData<T> = MenuCheckboxOptionData<T>> extends DropdownMenuWrapperProps, MenuCheckboxOptionsProps<T, S> {}
|
|
21
|
+
type DropdownMenuCheckboxEmits<T extends DefinedValue = DefinedValue, S extends MenuCheckboxOptionData<T> = MenuCheckboxOptionData<T>> = DropdownMenuWrapperEmits & MenuCheckboxOptionsEmits<T, S>;
|
|
22
|
+
interface DropdownMenuRadioProps<T extends AcceptableBooleanValue = AcceptableBooleanValue, S extends MenuRadioOptionData<T> = MenuRadioOptionData<T>> extends DropdownMenuWrapperProps, MenuRadioOptionsProps<T, S> {}
|
|
23
|
+
type DropdownMenuRadioEmits<T extends AcceptableBooleanValue = AcceptableBooleanValue, S extends MenuRadioOptionData<T> = MenuRadioOptionData<T>> = DropdownMenuWrapperEmits & MenuRadioOptionsEmits<T, S>;
|
|
24
|
+
//#endregion
|
|
25
|
+
export { DropdownMenuCheckboxEmits, DropdownMenuCheckboxProps, DropdownMenuEmits, DropdownMenuProps, DropdownMenuRadioEmits, DropdownMenuRadioProps, DropdownMenuWrapperEmits, DropdownMenuWrapperProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useContext as e}from"@soybeanjs/headless/composables";const[t,n]=e(`Form`,e=>e);export{t as provideFormContext,n as useFormContext};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{mergeSlotVariants as e}from"../../theme/shared.js";import{formVariants as t}from"../../variants/form.js";import{useFormContext as n}from"./context.js";import{computed as r,createBlock as i,createCommentVNode as a,createTextVNode as o,defineComponent as s,guardReactiveProps as c,mergeProps as l,normalizeProps as u,openBlock as d,renderSlot as f,toDisplayString as p,unref as m,useSlots as h,withCtx as g,withDirectives as _}from"vue";import{useOmitProps as v}from"@soybeanjs/headless/composables";import{FormDescription as y,FormError as b,FormFieldArray as x,FormLabel as S,provideFormThemeContext as C}from"@soybeanjs/headless";import{useField as w}from"@soybeanjs/headless/forms";import{vAutoAnimate as T}from"@formkit/auto-animate";var E=s({name:`SFormFieldArray`,__name:`form-field-array`,props:{size:{},ui:{},label:{},description:{},labelProps:{},descriptionProps:{},errorProps:{},name:{}},setup(s){let E=s,D=h(),O=v(E,[`size`,`ui`,`label`,`description`,`labelProps`,`descriptionProps`,`errorProps`]),k=n(`FormFieldArray`),{error:A}=w(()=>E.name),j=r(()=>typeof A.value==`string`),M=r(()=>E.size??k.size.value);C({ui:r(()=>e(t({size:M.value,error:!!A.value}),{...k.ui.value,...E.ui}))});let N=r(()=>({...k.labelProps.value,...E.labelProps})),P=r(()=>({...k.descriptionProps.value,...E.descriptionProps})),F=r(()=>({...k.errorProps.value,...E.errorProps}));return(e,t)=>_((d(),i(m(x),u(c(m(O))),{default:g(t=>[m(D).label||s.label?(d(),i(m(S),u(l({key:0},N.value)),{default:g(()=>[f(e.$slots,`label`,u(c(t)),()=>[o(p(s.label),1)])]),_:2},1040)):a(`v-if`,!0),f(e.$slots,`default`,u(c(t))),m(D).description||s.description?(d(),i(m(y),u(l({key:1},P.value)),{default:g(()=>[f(e.$slots,`description`,u(c(t)),()=>[o(p(s.description),1)])]),_:2},1040)):a(`v-if`,!0),j.value?(d(),i(m(b),u(l({key:2},F.value)),{default:g(()=>[o(p(m(A)),1)]),_:1},16)):a(`v-if`,!0)]),_:3},16)),[[m(T)]])}});export{E as default};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { FormFieldArrayProps } from "./types.js";
|
|
2
|
+
import * as vue264 from "vue";
|
|
3
|
+
import * as _soybeanjs_headless_forms0 from "@soybeanjs/headless/forms";
|
|
4
|
+
|
|
5
|
+
//#region src/components/form/form-field-array.vue.d.ts
|
|
6
|
+
declare var __VLS_12: {
|
|
7
|
+
fields: _soybeanjs_headless_forms0.FormFieldEntry<unknown>[];
|
|
8
|
+
dirty: boolean;
|
|
9
|
+
error: string | string[] | _soybeanjs_headless_forms0.FormErrors<any> | undefined;
|
|
10
|
+
touched: boolean | undefined;
|
|
11
|
+
formFieldId: string;
|
|
12
|
+
formDescriptionId: string;
|
|
13
|
+
formErrorId: string;
|
|
14
|
+
append: (value: unknown) => void;
|
|
15
|
+
prepend: (value: unknown) => void;
|
|
16
|
+
swap: (indexA: number, indexB: number) => void;
|
|
17
|
+
remove: (index?: number) => void;
|
|
18
|
+
move: (from: number, to: number) => void;
|
|
19
|
+
insert: (index: number, value: unknown) => void;
|
|
20
|
+
update: (index: number, value: unknown) => void;
|
|
21
|
+
replace: ($values: unknown[]) => void;
|
|
22
|
+
}, __VLS_14: {
|
|
23
|
+
fields: _soybeanjs_headless_forms0.FormFieldEntry<unknown>[];
|
|
24
|
+
dirty: boolean;
|
|
25
|
+
error: string | string[] | _soybeanjs_headless_forms0.FormErrors<any> | undefined;
|
|
26
|
+
touched: boolean | undefined;
|
|
27
|
+
formFieldId: string;
|
|
28
|
+
formDescriptionId: string;
|
|
29
|
+
formErrorId: string;
|
|
30
|
+
append: (value: unknown) => void;
|
|
31
|
+
prepend: (value: unknown) => void;
|
|
32
|
+
swap: (indexA: number, indexB: number) => void;
|
|
33
|
+
remove: (index?: number) => void;
|
|
34
|
+
move: (from: number, to: number) => void;
|
|
35
|
+
insert: (index: number, value: unknown) => void;
|
|
36
|
+
update: (index: number, value: unknown) => void;
|
|
37
|
+
replace: ($values: unknown[]) => void;
|
|
38
|
+
}, __VLS_21: {
|
|
39
|
+
fields: _soybeanjs_headless_forms0.FormFieldEntry<unknown>[];
|
|
40
|
+
dirty: boolean;
|
|
41
|
+
error: string | string[] | _soybeanjs_headless_forms0.FormErrors<any> | undefined;
|
|
42
|
+
touched: boolean | undefined;
|
|
43
|
+
formFieldId: string;
|
|
44
|
+
formDescriptionId: string;
|
|
45
|
+
formErrorId: string;
|
|
46
|
+
append: (value: unknown) => void;
|
|
47
|
+
prepend: (value: unknown) => void;
|
|
48
|
+
swap: (indexA: number, indexB: number) => void;
|
|
49
|
+
remove: (index?: number) => void;
|
|
50
|
+
move: (from: number, to: number) => void;
|
|
51
|
+
insert: (index: number, value: unknown) => void;
|
|
52
|
+
update: (index: number, value: unknown) => void;
|
|
53
|
+
replace: ($values: unknown[]) => void;
|
|
54
|
+
};
|
|
55
|
+
type __VLS_Slots = {} & {
|
|
56
|
+
label?: (props: typeof __VLS_12) => any;
|
|
57
|
+
} & {
|
|
58
|
+
default?: (props: typeof __VLS_14) => any;
|
|
59
|
+
} & {
|
|
60
|
+
description?: (props: typeof __VLS_21) => any;
|
|
61
|
+
};
|
|
62
|
+
declare const __VLS_base: vue264.DefineComponent<FormFieldArrayProps, {}, {}, {}, {}, vue264.ComponentOptionsMixin, vue264.ComponentOptionsMixin, {}, string, vue264.PublicProps, Readonly<FormFieldArrayProps> & Readonly<{}>, {}, {}, {}, {}, string, vue264.ComponentProvideOptions, false, {}, any>;
|
|
63
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
64
|
+
declare const _default: typeof __VLS_export;
|
|
65
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
66
|
+
new (): {
|
|
67
|
+
$slots: S;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
//#endregion
|
|
71
|
+
export { _default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{mergeSlotVariants as e}from"../../theme/shared.js";import{formVariants as t}from"../../variants/form.js";import{useFormContext as n}from"./context.js";import{computed as r,createBlock as i,createCommentVNode as a,createTextVNode as o,createVNode as s,defineComponent as c,guardReactiveProps as l,mergeProps as u,normalizeProps as d,openBlock as f,renderSlot as p,toDisplayString as m,unref as h,useSlots as g,withCtx as _,withDirectives as v}from"vue";import{useOmitProps as y}from"@soybeanjs/headless/composables";import{FormDescription as b,FormError as x,FormField as S,FormLabel as C,Slot as w,provideFormThemeContext as T}from"@soybeanjs/headless";import{useField as E}from"@soybeanjs/headless/forms";import{vAutoAnimate as D}from"@formkit/auto-animate";var O=c({name:`SFormField`,__name:`form-field`,props:{size:{},ui:{},label:{},description:{},labelProps:{},descriptionProps:{},errorProps:{},name:{}},setup(c){let O=c,k=g(),A=y(O,[`size`,`ui`,`label`,`description`,`labelProps`,`descriptionProps`,`errorProps`]),j=n(`FormField`),{error:M}=E(()=>O.name),N=r(()=>O.size??j.size.value);T({ui:r(()=>e(t({size:N.value,error:!!M.value}),{...j.ui.value,...O.ui}))});let P=r(()=>({...j.labelProps.value,...O.labelProps})),F=r(()=>({...j.descriptionProps.value,...O.descriptionProps})),I=r(()=>({...j.errorProps.value,...O.errorProps}));return(e,t)=>v((f(),i(h(S),d(l(h(A))),{default:_(({modelValue:t,updateModelValue:n,attrs:r,dirty:l,touched:g,ariaDescribedBy:v,ariaInvalid:y})=>[h(k).label||c.label?(f(),i(h(C),d(u({key:0},P.value)),{default:_(()=>[p(e.$slots,`label`,{},()=>[o(m(c.label),1)])]),_:3},16)):a(`v-if`,!0),s(h(w),{size:N.value,"model-value":t,"aria-described-by":v,"aria-invalid":y,"onUpdate:modelValue":n,onChange:r.onChange,onInput:r.onInput,onBlur:r.onBlur},{default:_(()=>[p(e.$slots,`default`,{dirty:l,error:h(M),touched:g})]),_:2},1032,[`size`,`model-value`,`aria-described-by`,`aria-invalid`,`onUpdate:modelValue`,`onChange`,`onInput`,`onBlur`]),h(k).description||c.description?(f(),i(h(b),d(u({key:1},F.value)),{default:_(()=>[p(e.$slots,`description`,{},()=>[o(m(c.description),1)])]),_:3},16)):a(`v-if`,!0),h(M)?(f(),i(h(x),d(u({key:2},I.value)),{default:_(()=>[o(m(h(M)),1)]),_:1},16)):a(`v-if`,!0)]),_:3},16)),[[h(D)]])}});export{O as default};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { FormFieldProps } from "./types.js";
|
|
2
|
+
import * as vue259 from "vue";
|
|
3
|
+
import * as _soybeanjs_headless_forms0 from "@soybeanjs/headless/forms";
|
|
4
|
+
|
|
5
|
+
//#region src/components/form/form-field.vue.d.ts
|
|
6
|
+
declare var __VLS_12: {}, __VLS_25: {
|
|
7
|
+
dirty: boolean;
|
|
8
|
+
error: string | string[] | _soybeanjs_headless_forms0.FormErrors<any> | undefined;
|
|
9
|
+
touched: boolean | undefined;
|
|
10
|
+
}, __VLS_32: {};
|
|
11
|
+
type __VLS_Slots = {} & {
|
|
12
|
+
label?: (props: typeof __VLS_12) => any;
|
|
13
|
+
} & {
|
|
14
|
+
default?: (props: typeof __VLS_25) => any;
|
|
15
|
+
} & {
|
|
16
|
+
description?: (props: typeof __VLS_32) => any;
|
|
17
|
+
};
|
|
18
|
+
declare const __VLS_base: vue259.DefineComponent<FormFieldProps, {}, {}, {}, {}, vue259.ComponentOptionsMixin, vue259.ComponentOptionsMixin, {}, string, vue259.PublicProps, Readonly<FormFieldProps> & Readonly<{}>, {}, {}, {}, {}, string, vue259.ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { _default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{cn as e}from"../../theme/merge.js";import{formVariants as t}from"../../variants/form.js";import{provideFormContext as n}from"./context.js";import{computed as r,createElementBlock as i,defineComponent as a,normalizeClass as o,openBlock as s,renderSlot as c}from"vue";import{transformPropsToContext as l}from"@soybeanjs/headless/shared";var u=a({name:`SForm`,__name:`form`,props:{size:{},ui:{},fieldProps:{},fieldArrayProps:{},labelProps:{},descriptionProps:{},errorProps:{}},setup(a){let u=a,d=r(()=>{let{form:n}=t({size:u.size});return e(n(),u.class)});return n(l(u)),(e,t)=>(s(),i(`form`,{class:o(d.value)},[c(e.$slots,`default`)],2))}});export{u as default};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FormProps } from "./types.js";
|
|
2
|
+
import * as vue254 from "vue";
|
|
3
|
+
|
|
4
|
+
//#region src/components/form/form.vue.d.ts
|
|
5
|
+
declare var __VLS_1: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
default?: (props: typeof __VLS_1) => any;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_base: vue254.DefineComponent<FormProps, {}, {}, {}, {}, vue254.ComponentOptionsMixin, vue254.ComponentOptionsMixin, {}, string, vue254.PublicProps, Readonly<FormProps> & Readonly<{}>, {}, {}, {}, {}, string, vue254.ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
18
|
+
export { _default };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FormContextParams, FormFieldArrayProps, FormFieldProps, FormProps } from "./types.js";
|
|
2
|
+
import { _default } from "./form.vue.js";
|
|
3
|
+
import { _default as _default$1 } from "./form-field.vue.js";
|
|
4
|
+
import { _default as _default$2 } from "./form-field-array.vue.js";
|
|
5
|
+
import { FormDescriptionProps, FormErrorProps, FormLabelProps } from "@soybeanjs/headless/form";
|
|
6
|
+
export { type FormDescriptionProps, type FormErrorProps, type FormLabelProps };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ThemeSize } from "../../theme/types.js";
|
|
2
|
+
import "../../theme/index.js";
|
|
3
|
+
import { FormHTMLAttributes } from "vue";
|
|
4
|
+
import { FormDescriptionProps, FormErrorProps, FormFieldArrayProps, FormFieldProps, FormFieldUi, FormLabelProps, PropsToContext } from "@soybeanjs/headless";
|
|
5
|
+
|
|
6
|
+
//#region src/components/form/types.d.ts
|
|
7
|
+
interface FormFieldProps$1 extends FormFieldProps {
|
|
8
|
+
size?: ThemeSize;
|
|
9
|
+
ui?: Partial<FormFieldUi>;
|
|
10
|
+
label?: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
labelProps?: FormLabelProps;
|
|
13
|
+
descriptionProps?: FormDescriptionProps;
|
|
14
|
+
errorProps?: FormErrorProps;
|
|
15
|
+
}
|
|
16
|
+
interface FormFieldArrayProps$1 extends FormFieldArrayProps {
|
|
17
|
+
size?: ThemeSize;
|
|
18
|
+
ui?: Partial<FormFieldUi>;
|
|
19
|
+
label?: string;
|
|
20
|
+
description?: string;
|
|
21
|
+
labelProps?: FormLabelProps;
|
|
22
|
+
descriptionProps?: FormDescriptionProps;
|
|
23
|
+
errorProps?: FormErrorProps;
|
|
24
|
+
}
|
|
25
|
+
interface FormProps extends /** @vue-ignore */FormHTMLAttributes {
|
|
26
|
+
size?: ThemeSize;
|
|
27
|
+
ui?: Partial<FormFieldUi>;
|
|
28
|
+
fieldProps?: FormFieldProps$1;
|
|
29
|
+
fieldArrayProps?: FormFieldArrayProps$1;
|
|
30
|
+
labelProps?: FormLabelProps;
|
|
31
|
+
descriptionProps?: FormDescriptionProps;
|
|
32
|
+
errorProps?: FormErrorProps;
|
|
33
|
+
}
|
|
34
|
+
interface FormContextParams extends PropsToContext<FormProps> {}
|
|
35
|
+
//#endregion
|
|
36
|
+
export { FormContextParams, FormFieldArrayProps$1 as FormFieldArrayProps, FormFieldProps$1 as FormFieldProps, FormProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useConfigProvider as e}from"../config-provider/context.js";import{computed as t,createBlock as n,defineComponent as r,mergeProps as i,normalizeStyle as a,openBlock as o,resolveDynamicComponent as s,unref as c}from"vue";import{Icon as l}from"@iconify/vue";var u=r({name:`SIcon`,__name:`icon`,props:{icon:{},ssr:{type:Boolean},customise:{},id:{},style:{},title:{},mode:{},color:{},flip:{},horizontalFlip:{type:Boolean},verticalFlip:{type:Boolean},rotate:{},hFlip:{type:Boolean},vFlip:{type:Boolean},width:{default:`1.25em`},height:{default:`1.25em`},inline:{type:Boolean},ariaHidden:{type:Boolean}},setup(r){let u=r,d=e(),f=t(()=>{let{width:e,height:t}=u,n=d?.iconify?.value||{};return{width:e||n.width,height:t||n.height}}),p=t(()=>({...u,...f.value}));function m(e){return typeof e==`string`||typeof e==`object`&&`body`in e}return(e,t)=>m(r.icon)?(o(),n(c(l),i({key:0},p.value,{icon:r.icon,style:{"flex-shrink":`0`}}),null,16,[`icon`])):(o(),n(s(r.icon),{key:1,style:a([{"flex-shrink":`0`},{width:f.value.width,height:f.value.height}])},null,8,[`style`]))}});export{u as default};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IconProps as IconProps$1 } from "./types.js";
|
|
2
|
+
import * as vue269 from "vue";
|
|
3
|
+
import * as _iconify_vue0 from "@iconify/vue";
|
|
4
|
+
|
|
5
|
+
//#region src/components/icon/icon.vue.d.ts
|
|
6
|
+
declare const __VLS_export: vue269.DefineComponent<IconProps$1, {}, {}, {}, {}, vue269.ComponentOptionsMixin, vue269.ComponentOptionsMixin, {}, string, vue269.PublicProps, Readonly<IconProps$1> & Readonly<{}>, {
|
|
7
|
+
height: _iconify_vue0.IconifyIconSize;
|
|
8
|
+
width: _iconify_vue0.IconifyIconSize;
|
|
9
|
+
}, {}, {}, {}, string, vue269.ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { _default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Component, VNode } from "vue";
|
|
2
|
+
import { IconProps, IconifyIcon } from "@iconify/vue";
|
|
3
|
+
|
|
4
|
+
//#region src/components/icon/types.d.ts
|
|
5
|
+
type IconValue = VNode | Component | string | IconifyIcon;
|
|
6
|
+
interface IconProps$1 extends Omit<IconProps, 'icon'> {
|
|
7
|
+
icon: IconValue;
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { IconProps$1 as IconProps, IconValue };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{mergeSlotVariants as e}from"../../theme/shared.js";import t from"../icon/icon.js";import{inputVariants as n}from"../../variants/input.js";import{computed as r,createBlock as i,createCommentVNode as a,createVNode as o,defineComponent as s,mergeProps as c,normalizeClass as l,openBlock as u,renderSlot as d,unref as f,withCtx as p}from"vue";import{useForwardElement as m,useOmitProps as h}from"@soybeanjs/headless/composables";import{InputControl as g,InputRoot as _,provideInputThemeContext as v}from"@soybeanjs/headless";var y=s({name:`SInput`,__name:`input`,props:{size:{},ui:{},clearable:{type:Boolean},inputRef:{type:Function},controlProps:{},defaultValue:{},modelValue:{},id:{},autofocus:{type:Boolean},disabled:{type:Boolean},maxlength:{},minlength:{},pattern:{},placeholder:{},readonly:{type:Boolean},name:{},required:{type:Boolean}},emits:[`update:modelValue`],setup(s,{emit:y}){let b=s,x=y,[S,C]=m(e=>b.inputRef?.(e)),w=h(b,[`inputRef`,`size`,`ui`,`controlProps`,`clearable`]),T=r(()=>e(n({size:b.size}),b.ui));return v({ui:T}),(e,n)=>(u(),i(f(_),c(f(w),{"onUpdate:modelValue":n[0]||=e=>x(`update:modelValue`,e)}),{default:p(({clear:n})=>[d(e.$slots,`leading`),o(f(g),c(s.controlProps,{ref:f(C)}),null,16),s.clearable?(u(),i(t,{key:0,icon:`lucide:x`,class:l(T.value.clearable),onClick:n},null,8,[`class`,`onClick`])):a(`v-if`,!0),d(e.$slots,`trailing`)]),_:3},16))}});export{y as default};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { InputProps } from "./types.js";
|
|
2
|
+
import * as vue274 from "vue";
|
|
3
|
+
|
|
4
|
+
//#region src/components/input/input.vue.d.ts
|
|
5
|
+
declare var __VLS_10: {}, __VLS_24: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
leading?: (props: typeof __VLS_10) => any;
|
|
8
|
+
} & {
|
|
9
|
+
trailing?: (props: typeof __VLS_24) => any;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_base: vue274.DefineComponent<InputProps, {}, {}, {}, {}, vue274.ComponentOptionsMixin, vue274.ComponentOptionsMixin, {
|
|
12
|
+
"update:modelValue": (value: string) => any;
|
|
13
|
+
}, string, vue274.PublicProps, Readonly<InputProps> & Readonly<{
|
|
14
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
15
|
+
}>, {}, {}, {}, {}, string, vue274.ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
17
|
+
declare const _default: typeof __VLS_export;
|
|
18
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
//#endregion
|
|
24
|
+
export { _default };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ThemeSize } from "../../theme/types.js";
|
|
2
|
+
import "../../theme/index.js";
|
|
3
|
+
import { ClassValue, InputControlProps, InputRootEmits, InputRootProps, InputUi } from "@soybeanjs/headless";
|
|
4
|
+
|
|
5
|
+
//#region src/components/input/types.d.ts
|
|
6
|
+
type InputExtraThemeSlot = 'clearable';
|
|
7
|
+
type InputExtendedUi = InputUi & Record<InputExtraThemeSlot, ClassValue>;
|
|
8
|
+
interface InputProps extends InputRootProps {
|
|
9
|
+
size?: ThemeSize;
|
|
10
|
+
ui?: Partial<InputExtendedUi>;
|
|
11
|
+
/** Whether to show the clear icon */
|
|
12
|
+
clearable?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* The function to set the input element.
|
|
15
|
+
*
|
|
16
|
+
* @param el - The input element.
|
|
17
|
+
*/
|
|
18
|
+
inputRef?: (el: HTMLInputElement) => void;
|
|
19
|
+
/**
|
|
20
|
+
* The props of the input extra props.
|
|
21
|
+
*/
|
|
22
|
+
controlProps?: InputControlProps;
|
|
23
|
+
}
|
|
24
|
+
type InputEmits = InputRootEmits;
|
|
25
|
+
//#endregion
|
|
26
|
+
export { InputEmits, InputProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{kbdVariants as e}from"../../variants/kbd.js";import{computed as t,createBlock as n,defineComponent as r,mergeProps as i,openBlock as a,unref as o}from"vue";import{useOmitProps as s}from"@soybeanjs/headless/composables";import{Kbd as c}from"@soybeanjs/headless";var l=r({name:`SKbd`,__name:`kbd`,props:{size:{},variant:{},value:{},symbolize:{type:Boolean,default:!0}},setup(r){let l=r,u=s(l,[`class`,`size`,`variant`]),d=t(()=>e({size:l.size,variant:l.variant}));return(e,t)=>(a(),n(o(c),i(o(u),{class:d.value}),null,16,[`class`]))}});export{l as default};
|