@soybeanjs/headless 0.15.2 → 0.15.4
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/anchor/anchor-root.vue.d.ts +1 -1
- package/dist/components/autocomplete/autocomplete-compact.vue.d.ts +2 -2
- package/dist/components/autocomplete/autocomplete-root.vue.d.ts +3 -3
- package/dist/components/backtop/backtop.vue.d.ts +1 -1
- package/dist/components/bottom-sheet/bottom-sheet-compact.js +1 -0
- package/dist/components/bottom-sheet/bottom-sheet-compact.vue.d.ts +15 -0
- package/dist/components/bottom-sheet/bottom-sheet-handle.js +1 -0
- package/dist/components/bottom-sheet/bottom-sheet-handle.vue.d.ts +20 -0
- package/dist/components/bottom-sheet/bottom-sheet-overlay.js +1 -0
- package/dist/components/bottom-sheet/bottom-sheet-overlay.vue.d.ts +7 -0
- package/dist/components/bottom-sheet/bottom-sheet-popup.js +1 -0
- package/dist/components/bottom-sheet/bottom-sheet-popup.vue.d.ts +17 -0
- package/dist/components/bottom-sheet/bottom-sheet-root-nested.js +1 -0
- package/dist/components/bottom-sheet/bottom-sheet-root-nested.vue.d.ts +83 -0
- package/dist/components/bottom-sheet/bottom-sheet-root.js +1 -0
- package/dist/components/bottom-sheet/bottom-sheet-root.vue.d.ts +15 -0
- package/dist/components/bottom-sheet/context.d.ts +9 -0
- package/dist/components/bottom-sheet/context.js +1 -0
- package/dist/components/bottom-sheet/index.d.ts +21 -0
- package/dist/components/bottom-sheet/index.js +1 -0
- package/dist/components/bottom-sheet/shared.js +1 -0
- package/dist/components/bottom-sheet/types.d.ts +56 -0
- package/dist/components/bottom-sheet/use-scale-background.js +1 -0
- package/dist/components/bottom-sheet/use-snap-points.js +1 -0
- package/dist/components/checkbox/checkbox-root.vue.d.ts +1 -1
- package/dist/components/color-area/color-area-root.vue.d.ts +2 -2
- package/dist/components/color-field/color-field-root.vue.d.ts +3 -3
- package/dist/components/color-picker/color-picker-root.vue.d.ts +2 -2
- package/dist/components/color-slider/color-slider-root.vue.d.ts +1 -1
- package/dist/components/combobox/combobox-compact.vue.d.ts +2 -2
- package/dist/components/combobox/combobox-root.vue.d.ts +2 -2
- package/dist/components/combobox/combobox-viewport.js +1 -9
- package/dist/components/combobox/combobox-viewport.vue.d.ts +2 -2
- package/dist/components/config-provider/config-provider.js +15 -1
- package/dist/components/config-provider/config-provider.vue.d.ts +1 -1
- package/dist/components/config-provider/context.js +1 -1
- package/dist/components/context-menu/context-menu-checkbox-compact.vue.d.ts +2 -2
- package/dist/components/context-menu/context-menu-compact.vue.d.ts +2 -2
- package/dist/components/context-menu/context-menu-content.vue.d.ts +2 -2
- package/dist/components/context-menu/context-menu-radio-compact.vue.d.ts +2 -2
- package/dist/components/context-menu/context-menu-wrapper-compact.vue.d.ts +2 -2
- package/dist/components/dialog/context.js +1 -1
- package/dist/components/dialog/dialog-compact.vue.d.ts +6 -6
- package/dist/components/dialog/dialog-overlay.js +1 -1
- package/dist/components/dialog/index.d.ts +2 -2
- package/dist/components/dialog/types.d.ts +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-checkbox-compact.vue.d.ts +2 -2
- package/dist/components/dropdown-menu/dropdown-menu-compact.vue.d.ts +2 -2
- package/dist/components/dropdown-menu/dropdown-menu-content.vue.d.ts +2 -2
- package/dist/components/dropdown-menu/dropdown-menu-radio-compact.vue.d.ts +2 -2
- package/dist/components/dropdown-menu/dropdown-menu-wrapper-compact.vue.d.ts +2 -2
- package/dist/components/editable/editable-root.vue.d.ts +2 -2
- package/dist/components/input-otp/input-otp-root.vue.d.ts +1 -1
- package/dist/components/link/link.vue.d.ts +1 -1
- package/dist/components/menu/menu-content.vue.d.ts +2 -2
- package/dist/components/menu/menu-option-compact.vue.d.ts +2 -2
- package/dist/components/menu/menu-options-compact.vue.d.ts +2 -2
- package/dist/components/menu/menu-sub-content.vue.d.ts +2 -2
- package/dist/components/menu/types.d.ts +1 -1
- package/dist/components/menubar/menubar-compact.vue.d.ts +2 -2
- package/dist/components/menubar/menubar-content.vue.d.ts +2 -2
- package/dist/components/menubar/menubar-sub-content.vue.d.ts +2 -2
- package/dist/components/page-tabs/page-tabs-item.vue.d.ts +2 -2
- package/dist/components/page-tabs/page-tabs-root.js +1 -12
- package/dist/components/scroll-area/scroll-area-viewport.js +1 -1
- package/dist/components/scroll-area/scroll-area-viewport.vue.d.ts +1 -4
- package/dist/components/select/select-viewport.js +1 -9
- package/dist/components/slider/slider-root.vue.d.ts +2 -2
- package/dist/components/splitter/splitter-group.vue.d.ts +1 -1
- package/dist/components/splitter/splitter-panel.vue.d.ts +2 -2
- package/dist/components/stepper/stepper-root.vue.d.ts +2 -2
- package/dist/components/table/index.d.ts +2 -2
- package/dist/components/table/table-compact.js +1 -1
- package/dist/components/table/types.d.ts +5 -1
- package/dist/components/toggle/toggle.vue.d.ts +2 -2
- package/dist/constants/components.d.ts +1 -0
- package/dist/constants/components.js +1 -1
- package/dist/index.d.ts +336 -328
- package/dist/index.js +1 -1
- package/dist/namespaced/index.d.ts +692 -666
- package/dist/namespaced/index.js +1 -1
- package/package.json +1 -1
|
@@ -24,8 +24,8 @@ declare const __VLS_base: _$vue.DefineComponent<AnchorRootProps, {}, {}, {}, {},
|
|
|
24
24
|
}>, {
|
|
25
25
|
orientation: DataOrientation;
|
|
26
26
|
modelValue: string;
|
|
27
|
-
bounds: number;
|
|
28
27
|
offsetTop: number;
|
|
28
|
+
bounds: number;
|
|
29
29
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
30
30
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
31
31
|
declare const _default: typeof __VLS_export;
|
|
@@ -6,15 +6,15 @@ declare const __VLS_export: <T extends AutocompleteSingleOptionData = Autocomple
|
|
|
6
6
|
props: _$vue.PublicProps & __VLS_PrettifyLocal<AutocompleteCompactProps<T> & {
|
|
7
7
|
onSelect?: ((item: T) => any) | undefined;
|
|
8
8
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
9
|
-
onHighlight?: ((payload?: AutocompleteHighlightPayload | undefined) => any) | undefined;
|
|
10
9
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
10
|
+
onHighlight?: ((payload?: AutocompleteHighlightPayload | undefined) => any) | undefined;
|
|
11
11
|
}> & (typeof globalThis extends {
|
|
12
12
|
__VLS_PROPS_FALLBACK: infer P;
|
|
13
13
|
} ? P : {});
|
|
14
14
|
expose: (exposed: {}) => void;
|
|
15
15
|
attrs: any;
|
|
16
16
|
slots: AutocompleteCompactSlots<T>;
|
|
17
|
-
emit: ((evt: "select", item: T) => void) & ((evt: "update:modelValue", value: string) => void) & ((evt: "
|
|
17
|
+
emit: ((evt: "select", item: T) => void) & ((evt: "update:modelValue", value: string) => void) & ((evt: "update:open", value: boolean) => void) & ((evt: "highlight", payload?: AutocompleteHighlightPayload | undefined) => void);
|
|
18
18
|
}>) => _$vue.VNode & {
|
|
19
19
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
20
20
|
};
|
|
@@ -10,17 +10,17 @@ type __VLS_Slots = {
|
|
|
10
10
|
};
|
|
11
11
|
declare const __VLS_base: _$vue.DefineComponent<AutocompleteRootProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
12
12
|
"update:modelValue": (value: string) => any;
|
|
13
|
-
highlight: (payload?: AutocompleteHighlightPayload | undefined) => any;
|
|
14
13
|
"update:open": (value: boolean) => any;
|
|
14
|
+
highlight: (payload?: AutocompleteHighlightPayload | undefined) => any;
|
|
15
15
|
}, string, _$vue.PublicProps, Readonly<AutocompleteRootProps> & Readonly<{
|
|
16
16
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
17
|
-
onHighlight?: ((payload?: AutocompleteHighlightPayload | undefined) => any) | undefined;
|
|
18
17
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
18
|
+
onHighlight?: ((payload?: AutocompleteHighlightPayload | undefined) => any) | undefined;
|
|
19
19
|
}>, {
|
|
20
|
-
highlightOnHover: boolean;
|
|
21
20
|
modelValue: string;
|
|
22
21
|
defaultOpen: boolean;
|
|
23
22
|
open: boolean;
|
|
23
|
+
highlightOnHover: boolean;
|
|
24
24
|
openOnFocus: boolean;
|
|
25
25
|
openOnClick: boolean;
|
|
26
26
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
@@ -19,8 +19,8 @@ declare const __VLS_base: _$vue.DefineComponent<BacktopProps, BacktopExposed, {}
|
|
|
19
19
|
}>, {
|
|
20
20
|
type: ButtonType;
|
|
21
21
|
as: AsTag | _$vue.Component;
|
|
22
|
-
visibilityHeight: number;
|
|
23
22
|
duration: number;
|
|
23
|
+
visibilityHeight: number;
|
|
24
24
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
25
25
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
26
26
|
declare const _default: typeof __VLS_export;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useForwardListeners as e}from"../../composables/use-forward-listeners.js";import{useOmitProps as t}from"../../composables/use-props.js";import"../../composables/index.js";import n from"../_icon/icon.js";import r from"../portal/portal.js";import i from"../dialog/dialog-close.js";import a from"../dialog/dialog-content.js";import o from"../dialog/dialog-description.js";import s from"../dialog/dialog-footer.js";import c from"../dialog/dialog-header.js";import l from"../dialog/dialog-title.js";import u from"../dialog/dialog-trigger.js";import d from"../dialog/dialog-cancel.js";import f from"../dialog/dialog-confirm.js";import"../dialog/index.js";import{useBottomSheetUi as p}from"./context.js";import m from"./bottom-sheet-root.js";import h from"./bottom-sheet-root-nested.js";import g from"./bottom-sheet-popup.js";import _ from"./bottom-sheet-overlay.js";import v from"./bottom-sheet-handle.js";import{computed as y,createBlock as b,createCommentVNode as x,createElementVNode as S,createTextVNode as C,createVNode as w,defineComponent as T,guardReactiveProps as E,mergeProps as D,normalizeClass as O,normalizeProps as k,openBlock as A,renderSlot as j,resolveDynamicComponent as M,toDisplayString as N,toHandlers as P,unref as F,useSlots as I,withCtx as L}from"vue";const R=T({name:`BottomSheetCompact`,__name:`bottom-sheet-compact`,props:{title:{},description:{},icon:{},showClose:{type:Boolean,default:!0},pure:{type:Boolean},showCancel:{type:[String,Boolean],default:`onlyWarning`},cancelText:{default:`Cancel`},showConfirm:{type:Boolean,default:!0},confirmText:{default:`Confirm`},triggerProps:{},overlayProps:{},portalProps:{},popupProps:{},headerProps:{},contentProps:{},footerProps:{},titleProps:{},descriptionProps:{},closeProps:{},cancelProps:{},confirmProps:{},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean},modal:{type:Boolean,default:!0},isAlert:{type:Boolean},alertType:{default:`default`},activeSnapPoint:{},closeThreshold:{},shouldScaleBackground:{type:Boolean,default:!0},setBackgroundColorOnScale:{type:Boolean,default:!0},scrollLockTimeout:{},fixed:{type:Boolean},dismissible:{type:Boolean,default:!0},nested:{type:Boolean},direction:{},noBodyStyles:{type:Boolean},handleOnly:{type:Boolean},preventScrollRestoration:{type:Boolean},snapPoints:{},fadeFromIndex:{},handleProps:{}},emits:[`update:open`,`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`,`confirm`,`cancel`,`drag`,`release`,`close`,`update:activeSnapPoint`],setup(T,{emit:R}){let z=T,B=t(z,[`title`,`description`,`icon`,`showClose`,`pure`,`showCancel`,`cancelText`,`showConfirm`,`confirmText`,`triggerProps`,`overlayProps`,`portalProps`,`popupProps`,`headerProps`,`contentProps`,`footerProps`,`titleProps`,`descriptionProps`,`closeProps`,`cancelProps`,`confirmProps`,`handleProps`]),V=R,H=I(),U=e(V),W=p(),G=y(()=>({...z.triggerProps,asChild:z.triggerProps?.asChild??!0})),K={default:null,info:`lucide:info`,warning:`lucide:circle-alert`,error:`lucide:circle-x`,success:`lucide:circle-check`},q=y(()=>z.icon?z.icon:z.isAlert&&z.alertType?K[z.alertType]:null),J=y(()=>z.showConfirm??z.isAlert),Y=y(()=>typeof z.showCancel==`boolean`?z.showCancel:z.isAlert===!0&&z.alertType===`warning`),X=y(()=>z.pure?!1:H.footer?!0:Y.value||J.value);return(e,t)=>(A(),b(M(T.nested?h:m),D(F(B),{"onUpdate:open":t[4]||(t[4]=e=>V(`update:open`,e))}),{default:L(p=>[w(F(u),k(E(G.value)),{default:L(()=>[j(e.$slots,`trigger`,k(E(p)))]),_:2},1040),w(r,k(E(T.portalProps)),{default:L(()=>[w(_,k(E(T.overlayProps)),null,16),w(g,D(T.popupProps,P(F(U))),{default:L(()=>[w(v,k(E(T.handleProps)),null,16),T.pure?x(`v-if`,!0):(A(),b(F(c),k(D({key:0},T.headerProps)),{default:L(()=>[w(F(l),k(E(T.titleProps)),{default:L(()=>[q.value?(A(),b(n,{key:0,icon:q.value,class:O(F(W).icon)},null,8,[`icon`,`class`])):x(`v-if`,!0),j(e.$slots,`title`,k(E(p)),()=>[S(`span`,null,N(T.title),1)])]),_:2},1040),H.description||T.description?(A(),b(F(o),k(D({key:0},T.descriptionProps)),{default:L(()=>[j(e.$slots,`description`,k(E(p)),()=>[C(N(T.description),1)])]),_:2},1040)):x(`v-if`,!0),!T.isAlert&&T.showClose?(A(),b(F(i),{key:1,onClose:t[0]||(t[0]=e=>V(`close`))},{default:L(()=>[j(e.$slots,`close`,k(E(p)))]),_:2},1024)):x(`v-if`,!0)]),_:2},1040)),w(F(a),k(E(T.contentProps)),{default:L(()=>[j(e.$slots,`default`,k(E(p)))]),_:2},1040),T.pure&&!T.isAlert&&T.showClose?(A(),b(F(i),{key:1,onClose:t[1]||(t[1]=e=>V(`close`))},{default:L(()=>[j(e.$slots,`close`,k(E(p)))]),_:2},1024)):x(`v-if`,!0),X.value?(A(),b(F(s),k(D({key:2},T.footerProps)),{default:L(()=>[j(e.$slots,`footer`,k(E(p)),()=>[Y.value?(A(),b(F(d),D({key:0},T.cancelProps,{onCancel:t[2]||(t[2]=e=>V(`cancel`,e))}),{default:L(()=>[j(e.$slots,`cancel`,k(E(p)),()=>[C(N(T.cancelText),1)])]),_:2},1040)):x(`v-if`,!0),J.value?(A(),b(F(f),D({key:1},T.confirmProps,{onConfirm:t[3]||(t[3]=e=>V(`confirm`,e))}),{default:L(()=>[j(e.$slots,`confirm`,k(E(p)),()=>[C(N(T.confirmText),1)])]),_:2},1040)):x(`v-if`,!0)])]),_:2},1040)):x(`v-if`,!0)]),_:2},1040)]),_:2},1040)]),_:3},16))}});export{R as default};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BottomSheetCompactSlots } from "./types.js";
|
|
2
|
+
import * as _$vue from "vue";
|
|
3
|
+
|
|
4
|
+
//#region src/components/bottom-sheet/bottom-sheet-compact.vue.d.ts
|
|
5
|
+
type __VLS_Slots = BottomSheetCompactSlots;
|
|
6
|
+
declare const __VLS_base: _$vue.DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, _$vue.PublicProps>;
|
|
7
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
10
|
+
new (): {
|
|
11
|
+
$slots: S;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
15
|
+
export { _default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useBottomSheetUi as e,useDrawerRootContext as t}from"./context.js";import{createElementBlock as n,createElementVNode as r,defineComponent as i,normalizeClass as a,openBlock as o,ref as s,renderSlot as c,unref as l}from"vue";const u=[`data-soybean-bottom-sheet-visible`],d={"data-soybean-handle-hit-area":``,"aria-hidden":`true`},f=i({name:`BottomSheetHandle`,__name:`bottom-sheet-handle`,props:{preventCycle:{type:Boolean,default:!1}},setup(i){let f=i,p=e(`handle`),{onPress:m,onDrag:h,setHandleRef:g,handleOnly:_,isOpen:v,snapPoints:y,activeSnapPoint:b,isDragging:x,dismissible:S,closeDrawer:C}=t(`DrawerHandle`),w=s(null),T=s(!1);function E(){if(T.value){k();return}window.setTimeout(()=>{D()},120)}function D(){if(x.value||f.preventCycle||T.value){k();return}if(k(),!y.value||y.value.length===0){S.value||C();return}let e=b.value===y.value[y.value.length-1];if(e&&S.value){C();return}let t=y.value.findIndex(e=>e===b.value);if(t===-1)return;let n=e?0:t+1;b.value=y.value[n]}function O(){w.value=window.setTimeout(()=>{T.value=!0},250)}function k(){w.value&&window.clearTimeout(w.value),T.value=!1}function A(e){_.value&&m(e),O()}function j(e){_.value&&h(e)}return(e,t)=>(o(),n(`div`,{ref:l(g),class:a(l(p)),"data-soybean-bottom-sheet-visible":l(v)?`true`:`false`,"data-soybean-handle":``,"aria-hidden":`true`,onClick:E,onPointercancel:k,onPointerdown:A,onPointermove:j},[r(`span`,d,[c(e.$slots,`default`)])],42,u))}});export{f as default};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BottomSheetHandleProps } from "./types.js";
|
|
2
|
+
import * as _$vue from "vue";
|
|
3
|
+
|
|
4
|
+
//#region src/components/bottom-sheet/bottom-sheet-handle.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: _$vue.DefineComponent<BottomSheetHandleProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<BottomSheetHandleProps> & Readonly<{}>, {
|
|
10
|
+
preventCycle: boolean;
|
|
11
|
+
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
//#endregion
|
|
20
|
+
export { _default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useDialogRootContext as e}from"../dialog/context.js";import t from"../dialog/dialog-overlay.js";import"../dialog/index.js";import{useDrawerRootContext as n}from"./context.js";import{createBlock as r,defineComponent as i,openBlock as a,unref as o,watchEffect as s}from"vue";const c=i({name:`BottomSheetOverlay`,__name:`bottom-sheet-overlay`,setup(i){let{overlayElement:c}=e(`BottomSheetOverlay`),{setOverlayRef:l,hasSnapPoints:u,isOpen:d,shouldFade:f}=n(`BottomSheetOverlay`);return s(()=>{c.value&&l(c.value)}),(e,n)=>(a(),r(o(t),{"data-soybean-overlay":``,"data-soybean-snap-points":o(d)&&o(u)?`true`:`false`,"data-soybean-snap-points-overlay":o(d)&&o(f)?`true`:`false`},null,8,[`data-soybean-snap-points`,`data-soybean-snap-points-overlay`]))}});export{c as default};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as _$vue from "vue";
|
|
2
|
+
|
|
3
|
+
//#region src/components/bottom-sheet/bottom-sheet-overlay.vue.d.ts
|
|
4
|
+
declare const __VLS_export: _$vue.DefineComponent<{}, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
|
|
5
|
+
declare const _default: typeof __VLS_export;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { _default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useDialogRootContext as e}from"../dialog/context.js";import t from"../dialog/dialog-popup.js";import"../dialog/index.js";import{useDrawerRootContext as n}from"./context.js";import{useScaleBackground as r}from"./use-scale-background.js";import{computed as i,createBlock as a,defineComponent as o,normalizeStyle as s,openBlock as c,ref as l,renderSlot as u,unref as d,watchEffect as f,withCtx as p}from"vue";const m=o({name:`BottomSheetPopup`,__name:`bottom-sheet-popup`,setup(o){let{isOpen:m,snapPointsOffset:h,hasSnapPoints:g,setDrawerRef:_,onPress:v,onDrag:y,onRelease:b,modal:x,emitOpenChange:S,dismissible:C,keyboardIsOpen:w,direction:T,handleOnly:E}=n(`BottomSheetPopup`),{popupElement:D}=e(`BottomSheetPopup`);r();let O=l(!1),k=i(()=>h.value&&h.value.length>0?`${h.value[0]}px`:`0`);function A(e){if(!x.value||e.defaultPrevented){e.preventDefault();return}w.value&&(w.value=!1),C.value?S(!1):e.preventDefault()}function j(e){E.value||v(e)}function M(e){E.value||y(e)}function N(e){C.value||e.preventDefault()}function P(e){e.preventDefault(),D.value?.focus({preventScroll:!0})}return f(()=>{D.value&&_(D.value),g.value&&window.requestAnimationFrame(()=>{O.value=!0})}),(e,n)=>(c(),a(d(t),{"data-soybean-bottom-sheet":``,"data-soybean-bottom-sheet-direction":d(T),"data-soybean-delayed-snap-points":O.value?`true`:`false`,"data-soybean-snap-points":d(m)&&d(g)?`true`:`false`,style:s({"--snap-point-height":k.value}),onPointerdown:j,onPointermove:M,onPointerup:d(b),onPointerDownOutside:A,onEscapeKeyDown:N,onOpenAutoFocus:P},{default:p(()=>[u(e.$slots,`default`)]),_:3},8,[`data-soybean-bottom-sheet-direction`,`data-soybean-delayed-snap-points`,`data-soybean-snap-points`,`style`,`onPointerup`]))}});export{m as default};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as _$vue from "vue";
|
|
2
|
+
|
|
3
|
+
//#region src/components/bottom-sheet/bottom-sheet-popup.vue.d.ts
|
|
4
|
+
declare var __VLS_15: {};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
default?: (props: typeof __VLS_15) => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_base: _$vue.DefineComponent<{}, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
|
|
9
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
12
|
+
new (): {
|
|
13
|
+
$slots: S;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
17
|
+
export { _default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useForwardListeners as e}from"../../composables/use-forward-listeners.js";import"../../composables/index.js";import{useDrawerRootContext as t}from"./context.js";import n from"./bottom-sheet-root.js";import{createBlock as r,defineComponent as i,guardReactiveProps as a,mergeProps as o,normalizeProps as s,openBlock as c,renderSlot as l,toHandlers as u,unref as d,withCtx as f}from"vue";const p=i({name:`BottomSheetRootNested`,__name:`bottom-sheet-root-nested`,props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean},isAlert:{type:Boolean},alertType:{},activeSnapPoint:{},closeThreshold:{},shouldScaleBackground:{type:Boolean},setBackgroundColorOnScale:{type:Boolean},scrollLockTimeout:{},fixed:{type:Boolean},dismissible:{type:Boolean},nested:{type:Boolean},direction:{},noBodyStyles:{type:Boolean},handleOnly:{type:Boolean},preventScrollRestoration:{type:Boolean},snapPoints:{},fadeFromIndex:{}},emits:[`update:open`,`drag`,`release`,`close`,`update:activeSnapPoint`],setup(i,{emit:p}){let m=i,h=e(p),{onNestedDrag:g,onNestedOpenChange:_,onNestedRelease:v}=t(`BottomSheetRootNested`);function y(){_(!1)}function b(e){g(e)}function x(e){e&&_(e)}return(e,t)=>(c(),r(n,o(m,{nested:``},u(d(h)),{onClose:y,onDrag:b,onRelease:d(v),"onUpdate:open":x}),{default:f(t=>[l(e.$slots,`default`,s(a(t)))]),_:3},16,[`onRelease`]))}});export{p as default};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { DialogRootProps } from "../dialog/types.js";
|
|
2
|
+
import { DrawerDirection, WithFadeFromProps, WithoutFadeFromProps } from "./types.js";
|
|
3
|
+
import * as _$vue from "vue";
|
|
4
|
+
|
|
5
|
+
//#region src/components/bottom-sheet/bottom-sheet-root-nested.vue.d.ts
|
|
6
|
+
declare var __VLS_13: any;
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
default?: (props: typeof __VLS_13) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: _$vue.DefineComponent<(DialogRootProps & {
|
|
11
|
+
activeSnapPoint?: number | string | null;
|
|
12
|
+
closeThreshold?: number;
|
|
13
|
+
shouldScaleBackground?: boolean;
|
|
14
|
+
setBackgroundColorOnScale?: boolean;
|
|
15
|
+
scrollLockTimeout?: number;
|
|
16
|
+
fixed?: boolean;
|
|
17
|
+
dismissible?: boolean;
|
|
18
|
+
nested?: boolean;
|
|
19
|
+
direction?: DrawerDirection;
|
|
20
|
+
noBodyStyles?: boolean;
|
|
21
|
+
handleOnly?: boolean;
|
|
22
|
+
preventScrollRestoration?: boolean;
|
|
23
|
+
} & WithFadeFromProps) | (DialogRootProps & {
|
|
24
|
+
activeSnapPoint?: number | string | null;
|
|
25
|
+
closeThreshold?: number;
|
|
26
|
+
shouldScaleBackground?: boolean;
|
|
27
|
+
setBackgroundColorOnScale?: boolean;
|
|
28
|
+
scrollLockTimeout?: number;
|
|
29
|
+
fixed?: boolean;
|
|
30
|
+
dismissible?: boolean;
|
|
31
|
+
nested?: boolean;
|
|
32
|
+
direction?: DrawerDirection;
|
|
33
|
+
noBodyStyles?: boolean;
|
|
34
|
+
handleOnly?: boolean;
|
|
35
|
+
preventScrollRestoration?: boolean;
|
|
36
|
+
} & WithoutFadeFromProps), {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
37
|
+
"update:open": (value: boolean) => any;
|
|
38
|
+
close: () => any;
|
|
39
|
+
drag: (percentageDragged: number) => any;
|
|
40
|
+
release: (open: boolean) => any;
|
|
41
|
+
"update:activeSnapPoint": (val: string | number | null) => any;
|
|
42
|
+
}, string, _$vue.PublicProps, Readonly<(DialogRootProps & {
|
|
43
|
+
activeSnapPoint?: number | string | null;
|
|
44
|
+
closeThreshold?: number;
|
|
45
|
+
shouldScaleBackground?: boolean;
|
|
46
|
+
setBackgroundColorOnScale?: boolean;
|
|
47
|
+
scrollLockTimeout?: number;
|
|
48
|
+
fixed?: boolean;
|
|
49
|
+
dismissible?: boolean;
|
|
50
|
+
nested?: boolean;
|
|
51
|
+
direction?: DrawerDirection;
|
|
52
|
+
noBodyStyles?: boolean;
|
|
53
|
+
handleOnly?: boolean;
|
|
54
|
+
preventScrollRestoration?: boolean;
|
|
55
|
+
} & WithFadeFromProps) | (DialogRootProps & {
|
|
56
|
+
activeSnapPoint?: number | string | null;
|
|
57
|
+
closeThreshold?: number;
|
|
58
|
+
shouldScaleBackground?: boolean;
|
|
59
|
+
setBackgroundColorOnScale?: boolean;
|
|
60
|
+
scrollLockTimeout?: number;
|
|
61
|
+
fixed?: boolean;
|
|
62
|
+
dismissible?: boolean;
|
|
63
|
+
nested?: boolean;
|
|
64
|
+
direction?: DrawerDirection;
|
|
65
|
+
noBodyStyles?: boolean;
|
|
66
|
+
handleOnly?: boolean;
|
|
67
|
+
preventScrollRestoration?: boolean;
|
|
68
|
+
} & WithoutFadeFromProps)> & Readonly<{
|
|
69
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
70
|
+
onClose?: (() => any) | undefined;
|
|
71
|
+
onDrag?: ((percentageDragged: number) => any) | undefined;
|
|
72
|
+
onRelease?: ((open: boolean) => any) | undefined;
|
|
73
|
+
"onUpdate:activeSnapPoint"?: ((val: string | number | null) => any) | undefined;
|
|
74
|
+
}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
75
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
76
|
+
declare const _default: typeof __VLS_export;
|
|
77
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
78
|
+
new (): {
|
|
79
|
+
$slots: S;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
//#endregion
|
|
83
|
+
export { _default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useControllableState as e}from"../../composables/use-controllable-state.js";import"../../composables/index.js";import t from"../dialog/dialog-root.js";import"../dialog/index.js";import{CLOSE_THRESHOLD as n}from"./shared.js";import{provideDrawerRootContext as r}from"./context.js";import{computed as i,createBlock as a,defineComponent as o,openBlock as s,renderSlot as c,toRefs as l,unref as u,withCtx as d}from"vue";const f=o({name:`BottomSheetRoot`,__name:`bottom-sheet-root`,props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:void 0},modal:{type:Boolean,default:!0},isAlert:{type:Boolean},alertType:{},activeSnapPoint:{default:void 0},closeThreshold:{default:n},shouldScaleBackground:{type:Boolean,default:void 0},setBackgroundColorOnScale:{type:Boolean,default:!0},scrollLockTimeout:{default:100},fixed:{type:Boolean,default:void 0},dismissible:{type:Boolean,default:!0},nested:{type:Boolean,default:!1},direction:{default:`bottom`},noBodyStyles:{type:Boolean},handleOnly:{type:Boolean,default:!1},preventScrollRestoration:{type:Boolean},snapPoints:{default:void 0},fadeFromIndex:{default:void 0}},emits:[`update:open`,`drag`,`release`,`close`,`update:activeSnapPoint`],setup(n,{emit:o}){let f=n,p=o,m=e(()=>f.open,e=>{p(`update:open`,e??!1)},f.defaultOpen),h=e(()=>f.activeSnapPoint,e=>{p(`update:activeSnapPoint`,e)},void 0),g=i(()=>f.fadeFromIndex??(f.snapPoints&&f.snapPoints.length-1)),_={emitDrag:e=>p(`drag`,e),emitRelease:e=>p(`release`,e),emitClose:()=>p(`close`),emitOpenChange:e=>{p(`update:open`,e)}},{closeDrawer:v,hasBeenOpened:y,modal:b,isOpen:x}=r({..._,...l(f),activeSnapPoint:h,fadeFromIndex:g,open:m});function S(e){if(f.open!==void 0){_.emitOpenChange(e);return}x.value=e,e?y.value=!0:v()}return(e,n)=>(s(),a(u(t),{open:u(x),modal:u(b),"onUpdate:open":S},{default:d(()=>[c(e.$slots,`default`,{open:u(x)})]),_:3},8,[`open`,`modal`]))}});export{f as default};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BottomSheetRootSlots } from "./types.js";
|
|
2
|
+
import * as _$vue from "vue";
|
|
3
|
+
|
|
4
|
+
//#region src/components/bottom-sheet/bottom-sheet-root.vue.d.ts
|
|
5
|
+
type __VLS_Slots = BottomSheetRootSlots;
|
|
6
|
+
declare const __VLS_base: _$vue.DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, _$vue.PublicProps>;
|
|
7
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
10
|
+
new (): {
|
|
11
|
+
$slots: S;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
15
|
+
export { _default };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { UiClass } from "../../types/common.js";
|
|
2
|
+
import { UseUiConsumer } from "../../composables/use-ui-context.js";
|
|
3
|
+
import { BottomSheetUiSlot } from "./types.js";
|
|
4
|
+
import * as _$vue from "vue";
|
|
5
|
+
|
|
6
|
+
//#region src/components/bottom-sheet/context.d.ts
|
|
7
|
+
declare const provideBottomSheetUi: (ui: _$vue.ComputedRef<Partial<UiClass<BottomSheetUiSlot>>>) => _$vue.ComputedRef<Partial<UiClass<BottomSheetUiSlot>>>, useBottomSheetUi: UseUiConsumer<BottomSheetUiSlot>;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { provideBottomSheetUi };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isClient as e}from"../../shared/env.js";import"../../shared/index.js";import{useContext as t}from"../../composables/use-context.js";import{useForwardElement as n}from"../../composables/use-forward-element.js";import{useUiContext as r}from"../../composables/use-ui-context.js";import"../../composables/index.js";import{provideDialogUi as i}from"../dialog/context.js";import{BOTTOM_SHEET_SCALE_SELECTOR as a,DRAG_CLASS as o,TRANSITIONS as s,dampenValue as ee,getTranslate as c,isVertical as l,reset as u,set as d}from"./shared.js";import{useSnapPoints as f}from"./use-snap-points.js";import{computed as p,ref as m,watch as h,watchEffect as te}from"vue";const[g,_]=t(`BottomSheetRoot`,e=>v(e));function v(t){let{emitDrag:r,emitRelease:i,emitClose:g,emitOpenChange:_,open:v,dismissible:y,nested:b,modal:ne,shouldScaleBackground:x,setBackgroundColorOnScale:S,scrollLockTimeout:C,closeThreshold:re,activeSnapPoint:w,fadeFromIndex:T,direction:E,noBodyStyles:ie,handleOnly:ae}=t,[D,O]=n(),[k,A]=n(),[j,M]=n(),N=m(v.value??!1),oe=m(!1),P=m(!1),F=m(!1),I=m(null),L=m(null),R=m(null),z=m(null),B=m(!1),V=m(null),H=m(0),U=m(!1),W=p(()=>k.value?.getBoundingClientRect().height||0),G=p(()=>t.snapPoints?.value??[]),K=p(()=>G&&(G.value?.length??0)>0),{activeSnapPointIndex:q,onRelease:se,snapPointsOffset:ce,onDrag:le,shouldFade:J,getPercentageDragged:ue}=f({snapPoints:G,activeSnapPoint:w,drawerRef:k,fadeFromIndex:T,overlayRef:D,onSnapPointChange:Y,direction:E});function Y(e,t){G.value&&e===t.length-1&&(I.value=new Date)}function X(){return(window.innerWidth-26)/window.innerWidth}function Z(e,t){if(!e)return!1;let n=e,r=window.getSelection()?.toString(),i=k.value?c(k.value,E.value):null,a=new Date;if(n.hasAttribute(`data-soybean-bottom-sheet-no-drag`)||n.closest(`[data-soybean-bottom-sheet-no-drag]`))return!1;if(E.value===`right`||E.value===`left`)return!0;if(I.value&&a.getTime()-I.value.getTime()<500)return!1;if(i!==null&&(E.value===`bottom`?i>0:i<0))return!0;if(r&&r.length>0)return!1;if(z.value&&a.getTime()-z.value.getTime()<C.value&&i===0||t)return z.value=a,!1;for(;n;){if(n.scrollHeight>n.clientHeight){if(n.scrollTop!==0)return z.value=new Date,!1;if(n.getAttribute(`role`)===`dialog`)return!0}n=n.parentNode}return!0}function de(e){!y.value&&!G.value||k.value&&!k.value.contains(e.target)||(P.value=!0,L.value=new Date,e.target.setPointerCapture(e.pointerId),H.value=l(E.value)?e.clientY:e.clientX)}function fe(e){if(!k.value||!P.value)return;let t=E.value===`bottom`||E.value===`right`?1:-1,n=(H.value-(l(E.value)?e.clientY:e.clientX))*t,i=n>0,s=G.value&&!y.value&&!i;if(s&&q.value===0)return;let c=Math.abs(n),u=document.querySelector(`[${a}]`),f=c/W.value,p=ue(c,i);if(p!==null&&(f=p),s&&f>=1||!B.value&&!Z(e.target,i))return;if(k?.value?.classList.add(o),B.value=!0,d(k.value,{transition:`none`}),d(D.value,{transition:`none`}),G.value&&le({draggedDistance:n}),i&&!G.value){let e=ee(n),r=Math.min(e*-1,0)*t;d(k.value,{transform:l(E.value)?`translate3d(0, ${r}px, 0)`:`translate3d(${r}px, 0, 0)`});return}let m=1-f;if((J.value||T.value&&q.value===T.value-1)&&(r(f),d(D.value,{opacity:`${m}`,transition:`none`},!0)),u&&D.value&&x.value){let e=Math.min(X()+f*(1-X()),1),t=8-f*8,n=Math.max(0,14-f*14);d(u,{borderRadius:`${t}px`,transform:l(E.value)?`scale(${e}) translate3d(0, ${n}px, 0)`:`scale(${e}) translate3d(${n}px, 0, 0)`,transition:`none`},!0)}if(!G.value){let e=c*t;d(k.value,{transform:l(E.value)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}}function Q(){if(!k.value)return;let e=document.querySelector(`[${a}]`),t=c(k.value,E.value);d(k.value,{transform:`translate3d(0, 0, 0)`,transition:`transform ${s.DURATION}s cubic-bezier(${s.EASE.join(`,`)})`}),d(D.value,{transition:`opacity ${s.DURATION}s cubic-bezier(${s.EASE.join(`,`)})`,opacity:`1`}),x.value&&t&&t>0&&N.value&&d(e,{borderRadius:`8px`,overflow:`hidden`,...l(E.value)?{transform:`scale(${X()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:`top`}:{transform:`scale(${X()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:`left`},transitionProperty:`transform, border-radius`,transitionDuration:`${s.DURATION}s`,transitionTimingFunction:`cubic-bezier(${s.EASE.join(`,`)})`},!0)}function $(e){k.value&&(g(),e||(N.value=!1),window.setTimeout(()=>{G.value&&(w.value=G.value[0])},s.DURATION*1e3))}te(()=>{if(!N.value&&x.value&&e){let e=setTimeout(()=>{u(document.body)},200);return()=>clearTimeout(e)}}),h(v,()=>{N.value=v.value,v.value||$()});function pe(e){if(!P.value||!k.value)return;k.value.classList.remove(o),B.value=!1,P.value=!1,R.value=new Date;let t=c(k.value,E.value);if(!Z(e.target,!1)||!t||Number.isNaN(t)||L.value===null)return;let n=R.value.getTime()-L.value.getTime(),r=H.value-(l(E.value)?e.clientY:e.clientX),a=Math.abs(r)/n;if(a>.05&&(F.value=!0,window.setTimeout(()=>{F.value=!1},200)),G.value){se({draggedDistance:r*(E.value===`bottom`||E.value===`right`?1:-1),closeDrawer:$,velocity:a,dismissible:y.value}),i(!0);return}if(E.value===`bottom`||E.value===`right`?r>0:r<0){Q(),i(!0);return}if(a>.4){$(),i(!1);return}if(t>=Math.min(k.value.getBoundingClientRect().height??0,window.innerHeight)*re.value){$(),i(!1);return}i(!0),Q()}h(N,e=>{e&&(I.value=new Date),_(e)},{immediate:!0});function me(e){let t=e?(window.innerWidth-16)/window.innerWidth:1,n=e?-16:0;V.value&&window.clearTimeout(V.value),d(k.value,{transition:`transform ${s.DURATION}s cubic-bezier(${s.EASE.join(`,`)})`,transform:`scale(${t}) translate3d(0, ${n}px, 0)`}),!e&&k.value&&(V.value=window.setTimeout(()=>{let e=c(k.value,E.value);d(k.value,{transition:`none`,transform:l(E.value)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})},500))}function he(e){if(e<0)return;let t=l(E.value)?window.innerHeight:window.innerWidth,n=(t-16)/t,r=n+e*(1-n),i=-16+e*16;d(k.value,{transform:l(E.value)?`scale(${r}) translate3d(0, ${i}px, 0)`:`scale(${r}) translate3d(${i}px, 0, 0)`,transition:`none`})}function ge(e){let t=l(E.value)?window.innerHeight:window.innerWidth,n=e?(t-16)/t:1,r=e?-16:0;e&&d(k.value,{transition:`transform ${s.DURATION}s cubic-bezier(${s.EASE.join(`,`)})`,transform:l(E.value)?`scale(${n}) translate3d(0, ${r}px, 0)`:`scale(${n}) translate3d(${r}px, 0, 0)`})}return{open:v,isOpen:N,modal:ne,keyboardIsOpen:U,hasBeenOpened:oe,drawerRef:k,setDrawerRef:A,drawerHeightRef:W,overlayRef:D,setOverlayRef:O,handleRef:j,setHandleRef:M,isDragging:P,dragStartTime:L,isAllowedToDrag:B,snapPoints:G,hasSnapPoints:K,activeSnapPoint:w,pointerStart:H,dismissible:y,snapPointsOffset:ce,direction:E,shouldFade:J,fadeFromIndex:T,shouldScaleBackground:x,setBackgroundColorOnScale:S,onPress:de,onDrag:fe,onRelease:pe,closeDrawer:$,onNestedDrag:he,onNestedRelease:ge,onNestedOpenChange:me,emitClose:g,emitDrag:r,emitRelease:i,emitOpenChange:_,nested:b,handleOnly:ae,noBodyStyles:ie}}const[y,b]=r(`BottomSheet`,e=>(i(e),e));export{y as provideBottomSheetUi,g as provideDrawerRootContext,b as useBottomSheetUi,_ as useDrawerRootContext};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { PortalProps } from "../portal/types.js";
|
|
2
|
+
import { _default as _default$11 } from "../portal/portal.vue.js";
|
|
3
|
+
import { DialogCancelEmits, DialogCancelProps, DialogCloseEmits, DialogCloseProps, DialogConfirmEmits, DialogConfirmProps, DialogContentProps, DialogDescriptionProps, DialogFooterProps, DialogHeaderProps, DialogOverlayProps, DialogPopupEmits, DialogPopupProps, DialogTitleProps, DialogTriggerProps } from "../dialog/types.js";
|
|
4
|
+
import { _default as _default$15 } from "../dialog/dialog-trigger.vue.js";
|
|
5
|
+
import { _default as _default$8 } from "../dialog/dialog-header.vue.js";
|
|
6
|
+
import { _default as _default$4 } from "../dialog/dialog-content.vue.js";
|
|
7
|
+
import { _default as _default$14 } from "../dialog/dialog-title.vue.js";
|
|
8
|
+
import { _default as _default$5 } from "../dialog/dialog-description.vue.js";
|
|
9
|
+
import { _default as _default$6 } from "../dialog/dialog-footer.vue.js";
|
|
10
|
+
import { _default as _default$1 } from "../dialog/dialog-close.vue.js";
|
|
11
|
+
import { _default } from "../dialog/dialog-cancel.vue.js";
|
|
12
|
+
import { _default as _default$3 } from "../dialog/dialog-confirm.vue.js";
|
|
13
|
+
import { BottomSheetCompactEmits, BottomSheetCompactProps, BottomSheetCompactSlots, BottomSheetRootEmits, BottomSheetRootProps, BottomSheetUi, BottomSheetUiSlot } from "./types.js";
|
|
14
|
+
import { _default as _default$2 } from "./bottom-sheet-compact.vue.js";
|
|
15
|
+
import { _default as _default$12 } from "./bottom-sheet-root.vue.js";
|
|
16
|
+
import { _default as _default$13 } from "./bottom-sheet-root-nested.vue.js";
|
|
17
|
+
import { _default as _default$10 } from "./bottom-sheet-popup.vue.js";
|
|
18
|
+
import { _default as _default$9 } from "./bottom-sheet-overlay.vue.js";
|
|
19
|
+
import { _default as _default$7 } from "./bottom-sheet-handle.vue.js";
|
|
20
|
+
import { provideBottomSheetUi } from "./context.js";
|
|
21
|
+
export { _default as BottomSheetCancel, type DialogCancelEmits as BottomSheetCancelEmits, type DialogCancelProps as BottomSheetCancelProps, _default$1 as BottomSheetClose, type DialogCloseEmits as BottomSheetCloseEmits, type DialogCloseProps as BottomSheetCloseProps, _default$2 as BottomSheetCompact, type BottomSheetCompactEmits, type BottomSheetCompactProps, type BottomSheetCompactSlots, _default$3 as BottomSheetConfirm, type DialogConfirmEmits as BottomSheetConfirmEmits, type DialogConfirmProps as BottomSheetConfirmProps, _default$4 as BottomSheetContent, type DialogContentProps as BottomSheetContentProps, _default$5 as BottomSheetDescription, type DialogDescriptionProps as BottomSheetDescriptionProps, _default$6 as BottomSheetFooter, type DialogFooterProps as BottomSheetFooterProps, _default$7 as BottomSheetHandle, _default$8 as BottomSheetHeader, type DialogHeaderProps as BottomSheetHeaderProps, _default$9 as BottomSheetOverlay, type DialogOverlayProps as BottomSheetOverlayProps, _default$10 as BottomSheetPopup, type DialogPopupEmits as BottomSheetPopupEmits, type DialogPopupProps as BottomSheetPopupProps, _default$11 as BottomSheetPortal, type PortalProps as BottomSheetPortalProps, _default$12 as BottomSheetRoot, type BottomSheetRootEmits, _default$13 as BottomSheetRootNested, type BottomSheetRootProps, _default$14 as BottomSheetTitle, type DialogTitleProps as BottomSheetTitleProps, _default$15 as BottomSheetTrigger, type DialogTriggerProps as BottomSheetTriggerProps, type BottomSheetUi, type BottomSheetUiSlot, provideBottomSheetUi };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"../portal/portal.js";import t from"../dialog/dialog-close.js";import n from"../dialog/dialog-content.js";import r from"../dialog/dialog-description.js";import i from"../dialog/dialog-footer.js";import a from"../dialog/dialog-header.js";import o from"../dialog/dialog-title.js";import s from"../dialog/dialog-trigger.js";import c from"../dialog/dialog-cancel.js";import l from"../dialog/dialog-confirm.js";import"../dialog/index.js";import{provideBottomSheetUi as u}from"./context.js";import d from"./bottom-sheet-root.js";import f from"./bottom-sheet-root-nested.js";import p from"./bottom-sheet-popup.js";import m from"./bottom-sheet-overlay.js";import h from"./bottom-sheet-handle.js";import g from"./bottom-sheet-compact.js";export{c as BottomSheetCancel,t as BottomSheetClose,g as BottomSheetCompact,l as BottomSheetConfirm,n as BottomSheetContent,r as BottomSheetDescription,i as BottomSheetFooter,h as BottomSheetHandle,a as BottomSheetHeader,m as BottomSheetOverlay,p as BottomSheetPopup,e as BottomSheetPortal,d as BottomSheetRoot,f as BottomSheetRootNested,o as BottomSheetTitle,s as BottomSheetTrigger,u as provideBottomSheetUi};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=.25,t=`soybean-bottom-sheet-dragging`,n=`data-soybean-bottom-sheet-no-drag`,r=`data-soybean-bottom-sheet-scale`,i={DURATION:.5,EASE:[.32,.72,0,1]},a=.4,o=new WeakMap;function s(e,t,n=!1){if(!e||!(e instanceof HTMLElement)||!t)return;let r={};Object.entries(t).forEach(([t,n])=>{if(t.startsWith(`--`)){e.style.setProperty(t,n);return}r[t]=e.style[t],e.style[t]=n}),!n&&o.set(e,r)}function c(e,t){if(!e||!(e instanceof HTMLElement))return;let n=o.get(e);n&&(t?e.style[t]=n[t]:Object.entries(n).forEach(([t,n])=>{e.style[t]=n}))}function l(e,t){let n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform,i=r?.match(/^matrix3d\((.+)\)$/);return i?Number.parseFloat(i[1].split(`, `)[d(t)?13:12]):(i=r?.match(/^matrix\((.+)\)$/),i?Number.parseFloat(i[1].split(`, `)[d(t)?5:4]):null)}function u(e){return 8*(Math.log(e+1)-2)}function d(e){return e===`top`||e===`bottom`}function f(e,t){if(!e)return()=>{};let n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function p(...e){return(...t)=>{for(let n of e)typeof n==`function`&&n(...t)}}export{r as BOTTOM_SHEET_SCALE_SELECTOR,e as CLOSE_THRESHOLD,t as DRAG_CLASS,n as NO_DRAG_ATTR,i as TRANSITIONS,a as VELOCITY_THRESHOLD,f as assignStyle,p as chain,u as dampenValue,l as getTranslate,d as isVertical,c as reset,s as set};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Side, UiClass } from "../../types/common.js";
|
|
2
|
+
import { DialogCompactEmits, DialogCompactProps, DialogCompactSlots, DialogRootEmits, DialogRootProps, DialogUiSlot } from "../dialog/types.js";
|
|
3
|
+
import { HTMLAttributes, Ref, ShallowRef } from "vue";
|
|
4
|
+
|
|
5
|
+
//#region src/components/bottom-sheet/types.d.ts
|
|
6
|
+
type DrawerDirection = Side;
|
|
7
|
+
interface WithFadeFromProps {
|
|
8
|
+
snapPoints: (number | string)[];
|
|
9
|
+
fadeFromIndex: number;
|
|
10
|
+
}
|
|
11
|
+
interface WithoutFadeFromProps {
|
|
12
|
+
snapPoints?: (number | string)[];
|
|
13
|
+
fadeFromIndex?: never;
|
|
14
|
+
}
|
|
15
|
+
type BottomSheetRootProps = DialogRootProps & {
|
|
16
|
+
activeSnapPoint?: number | string | null;
|
|
17
|
+
closeThreshold?: number;
|
|
18
|
+
shouldScaleBackground?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* When `false` we don't change body's background color when the drawer is open.
|
|
21
|
+
*
|
|
22
|
+
* @default true
|
|
23
|
+
*/
|
|
24
|
+
setBackgroundColorOnScale?: boolean;
|
|
25
|
+
scrollLockTimeout?: number;
|
|
26
|
+
fixed?: boolean;
|
|
27
|
+
dismissible?: boolean;
|
|
28
|
+
nested?: boolean;
|
|
29
|
+
direction?: DrawerDirection; /** When `true` the `body` doesn't get any styles assigned from Vaul */
|
|
30
|
+
noBodyStyles?: boolean;
|
|
31
|
+
handleOnly?: boolean;
|
|
32
|
+
preventScrollRestoration?: boolean;
|
|
33
|
+
} & (WithFadeFromProps | WithoutFadeFromProps);
|
|
34
|
+
type BottomSheetRootEmits = DialogRootEmits & {
|
|
35
|
+
drag: [percentageDragged: number];
|
|
36
|
+
release: [open: boolean];
|
|
37
|
+
close: [];
|
|
38
|
+
'update:activeSnapPoint': [val: string | number | null];
|
|
39
|
+
};
|
|
40
|
+
type BottomSheetRootSlots = {
|
|
41
|
+
default?: (props: {
|
|
42
|
+
open: boolean;
|
|
43
|
+
}) => any;
|
|
44
|
+
};
|
|
45
|
+
interface BottomSheetHandleProps extends /** @vue-ignore */HTMLAttributes {
|
|
46
|
+
preventCycle?: boolean;
|
|
47
|
+
}
|
|
48
|
+
type BottomSheetCompactProps = DialogCompactProps & BottomSheetRootProps & {
|
|
49
|
+
handleProps?: BottomSheetHandleProps;
|
|
50
|
+
};
|
|
51
|
+
type BottomSheetCompactEmits = Omit<DialogCompactEmits, 'close'> & BottomSheetRootEmits;
|
|
52
|
+
type BottomSheetCompactSlots = DialogCompactSlots;
|
|
53
|
+
type BottomSheetUiSlot = DialogUiSlot | 'handle';
|
|
54
|
+
type BottomSheetUi = UiClass<BottomSheetUiSlot>;
|
|
55
|
+
//#endregion
|
|
56
|
+
export { BottomSheetCompactEmits, BottomSheetCompactProps, BottomSheetCompactSlots, BottomSheetHandleProps, BottomSheetRootEmits, BottomSheetRootProps, BottomSheetRootSlots, BottomSheetUi, BottomSheetUiSlot, DrawerDirection, WithFadeFromProps, WithoutFadeFromProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isClient as e}from"../../shared/env.js";import"../../shared/index.js";import{BOTTOM_SHEET_SCALE_SELECTOR as t,TRANSITIONS as n,assignStyle as r,chain as i,isVertical as a}from"./shared.js";import{useDrawerRootContext as o}from"./context.js";import{ref as s,watchEffect as c}from"vue";const l=()=>()=>{};function u(){let{direction:u,isOpen:d,shouldScaleBackground:f,setBackgroundColorOnScale:p,noBodyStyles:m}=o(`DrawerScaleBackground`),h=s(null),g=s(e?document.body.style.backgroundColor:``);function _(){return e?(window.innerWidth-26)/window.innerWidth:1}c(o=>{if(e&&d.value&&f.value){h.value&&clearTimeout(h.value);let e=document.querySelector(`[${t}]`);if(!e)return;let s=i(p.value&&!m.value?r(document.body,{background:`black`}):l,r(e,{transformOrigin:a(u.value)?`top`:`left`,transitionProperty:`transform, border-radius`,transitionDuration:`${n.DURATION}s`,transitionTimingFunction:`cubic-bezier(${n.EASE.join(`,`)})`})),c=r(e,{borderRadius:`8px`,overflow:`hidden`,...a(u.value)?{transform:`scale(${_()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${_()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});o(()=>{s(),c(),h.value=window.setTimeout(()=>{g.value?document.body.style.background=g.value:document.body.style.removeProperty(`background`)},n.DURATION*1e3)})}},{flush:`pre`})}export{u as useScaleBackground};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{TRANSITIONS as e,isVertical as t,set as n}from"./shared.js";import{computed as r,nextTick as i,onBeforeUnmount as a,onMounted as o,ref as s,watch as c}from"vue";function l({activeSnapPoint:l,snapPoints:u,drawerRef:d,overlayRef:f,fadeFromIndex:p,onSnapPointChange:m,direction:h}){let g=s(typeof window<`u`?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);function _(){g.value={innerWidth:window.innerWidth,innerHeight:window.innerHeight}}o(()=>{typeof window<`u`&&window.addEventListener(`resize`,_)}),a(()=>{typeof window<`u`&&window.removeEventListener(`resize`,_)});let v=r(()=>(u.value&&l.value===u.value[u.value.length-1])??null),y=r(()=>u.value&&u.value.length>0&&(p?.value||p?.value===0)&&!Number.isNaN(p?.value)&&u.value[p?.value??-1]===l.value||!u.value),b=r(()=>u.value?.findIndex(e=>e===l.value)??null),x=r(()=>u.value?.map(e=>{let n=typeof e==`string`,r=0;if(n&&(r=Number.parseInt(e,10)),t(h.value)){let t=r;return n||(t=g.value?e*g.value.innerHeight:0),g.value?h.value===`bottom`?g.value.innerHeight-t:-g.value.innerHeight+t:t}let i=r;return n||(i=g.value?e*g.value.innerWidth:0),g.value?h.value===`right`?g.value.innerWidth-i:-g.value.innerWidth+i:i})??[]),S=r(()=>b.value===null?null:x.value?.[b.value]),C=r=>{let a=x.value?.findIndex(e=>e===r)??null;i(()=>{m(a,x.value),n(d.value,{transition:`transform ${e.DURATION}s cubic-bezier(${e.EASE.join(`,`)})`,transform:t(h.value)?`translate3d(0, ${r}px, 0)`:`translate3d(${r}px, 0, 0)`})}),x.value&&a!==x.value.length-1&&a!==p?.value?n(f.value,{transition:`opacity ${e.DURATION}s cubic-bezier(${e.EASE.join(`,`)})`,opacity:`0`}):n(f.value,{transition:`opacity ${e.DURATION}s cubic-bezier(${e.EASE.join(`,`)})`,opacity:`1`}),l.value=a===null?null:u.value?.[a]??null};c([l,x,u],()=>{if(l.value!==null&&l.value!==void 0){let e=u.value?.findIndex(e=>e===l.value)??-1;x.value&&e!==-1&&typeof x.value[e]==`number`&&C(x.value[e])}},{immediate:!0});function w(e,t,n,r){return e>2&&!t?(n?r():C(x.value[0]),!0):e>2&&t&&x&&u.value?(C(x.value[u.value.length-1]),!0):!1}function T(e){let{currentPosition:n,velocity:r,draggedDistance:i,isFirst:a,hasDraggedUp:o,dismissible:s,closeDrawer:c}=e,l=x.value?.reduce((e,t)=>Math.abs(t-n)<Math.abs(e-n)?t:e),d=t(h.value)?window.innerHeight:window.innerWidth;if(r>.4&&Math.abs(i)<d*.4){let e=o?1:-1;if(e>0&&v.value){C(x.value[(u.value?.length??0)-1]);return}if(a&&e<0&&s&&c(),b.value===null)return;C(x.value[b.value+e]);return}C(l)}function E({draggedDistance:t,closeDrawer:r,velocity:i,dismissible:a}){if(p===void 0)return;let o=h.value===`bottom`||h.value===`right`?(S.value??0)-t:(S.value??0)+t,s=b.value===(p.value??0)-1,c=b.value===0,l=t>0;s&&n(f.value,{transition:`opacity ${e.DURATION}s cubic-bezier(${e.EASE.join(`,`)})`}),!w(i,l,a,r)&&T({currentPosition:o,velocity:i,draggedDistance:t,isFirst:c,hasDraggedUp:l,dismissible:a,closeDrawer:r})}function D({draggedDistance:e}){if(S.value===null)return;let r=h.value===`bottom`||h.value===`right`?(S.value??0)-e:(S.value??0)+e;(h.value===`bottom`||h.value===`right`)&&r<x.value[x.value.length-1]||(h.value===`top`||h.value===`left`)&&r>x.value[x.value.length-1]||n(d.value,{transform:t(h.value)?`translate3d(0, ${r}px, 0)`:`translate3d(${r}px, 0, 0)`})}function O(e,t){if(!u||typeof b.value!=`number`||!x.value||p===void 0)return null;let n=b.value===(p.value??0)-1;if(b.value>=(p.value??0)&&t)return 0;if(n&&!t)return 1;if(!y.value&&!n)return null;let r=n?b.value+1:b.value-1,i=n?x.value[r]-x.value[r-1]:x.value[r+1]-x.value[r],a=e/Math.abs(i);return n?1-a:a}return{isLastSnapPoint:v,shouldFade:y,getPercentageDragged:O,activeSnapPointIndex:b,onRelease:E,onDrag:D,snapPointsOffset:x}}export{l as useSnapPoints};
|
|
@@ -15,8 +15,8 @@ declare const __VLS_base: _$vue.DefineComponent<CheckboxRootProps, {}, {}, {}, {
|
|
|
15
15
|
}, string, _$vue.PublicProps, Readonly<CheckboxRootProps> & Readonly<{
|
|
16
16
|
"onUpdate:modelValue"?: ((value: CheckedState | null) => any) | undefined;
|
|
17
17
|
}>, {
|
|
18
|
-
value: DefinedValue;
|
|
19
18
|
modelValue: CheckedState | null;
|
|
19
|
+
value: DefinedValue;
|
|
20
20
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
21
21
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
22
22
|
declare const _default: typeof __VLS_export;
|
|
@@ -21,9 +21,9 @@ declare const __VLS_base: _$vue.DefineComponent<ColorAreaRootProps, {}, {}, {},
|
|
|
21
21
|
}>, {
|
|
22
22
|
disabled: boolean;
|
|
23
23
|
format: ColorFormat;
|
|
24
|
-
modelValue: string | ColorValue;
|
|
25
|
-
defaultValue: string | ColorValue;
|
|
26
24
|
as: AsTag | _$vue.Component;
|
|
25
|
+
defaultValue: string | ColorValue;
|
|
26
|
+
modelValue: string | ColorValue;
|
|
27
27
|
colorSpace: ColorSpace;
|
|
28
28
|
xChannel: ColorAreaAxisChannel;
|
|
29
29
|
yChannel: ColorAreaAxisChannel;
|
|
@@ -17,13 +17,13 @@ declare const __VLS_base: _$vue.DefineComponent<ColorFieldRootProps, {}, {}, {},
|
|
|
17
17
|
}>, {
|
|
18
18
|
disabled: boolean;
|
|
19
19
|
format: ColorFormat;
|
|
20
|
+
as: AsTag | _$vue.Component;
|
|
20
21
|
step: number;
|
|
21
|
-
modelValue: string | ColorValue;
|
|
22
22
|
defaultValue: string | ColorValue;
|
|
23
|
+
modelValue: string | ColorValue;
|
|
23
24
|
readonly: boolean;
|
|
24
|
-
as: AsTag | _$vue.Component;
|
|
25
|
-
disableWheelChange: boolean;
|
|
26
25
|
colorSpace: ColorSpace;
|
|
26
|
+
disableWheelChange: boolean;
|
|
27
27
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
28
28
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
29
29
|
declare const _default: typeof __VLS_export;
|
|
@@ -25,9 +25,9 @@ declare const __VLS_base: _$vue.DefineComponent<ColorPickerRootProps, {}, {}, {}
|
|
|
25
25
|
}>, {
|
|
26
26
|
disabled: boolean;
|
|
27
27
|
format: ColorFormat;
|
|
28
|
-
modelValue: string | ColorValue;
|
|
29
|
-
defaultValue: string | ColorValue;
|
|
30
28
|
as: AsTag | _$vue.Component;
|
|
29
|
+
defaultValue: string | ColorValue;
|
|
30
|
+
modelValue: string | ColorValue;
|
|
31
31
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
32
32
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
33
33
|
declare const _default: typeof __VLS_export;
|
|
@@ -23,8 +23,8 @@ declare const __VLS_base: _$vue.DefineComponent<ColorSliderRootProps, {}, {}, {}
|
|
|
23
23
|
format: ColorFormat;
|
|
24
24
|
orientation: DataOrientation;
|
|
25
25
|
step: number;
|
|
26
|
-
modelValue: string | ColorValue;
|
|
27
26
|
defaultValue: string | ColorValue;
|
|
27
|
+
modelValue: string | ColorValue;
|
|
28
28
|
colorSpace: ColorSpace;
|
|
29
29
|
inverted: boolean;
|
|
30
30
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
@@ -9,11 +9,11 @@ declare const __VLS_export: <M extends boolean = false>(__VLS_props: NonNullable
|
|
|
9
9
|
props: _$vue.PublicProps & __VLS_PrettifyLocal<ComboboxCompactProps<M> & {
|
|
10
10
|
onSelect?: ((event: SelectEvent<string>) => any) | undefined;
|
|
11
11
|
"onUpdate:modelValue"?: ((value: M extends true ? string[] : string) => any) | undefined;
|
|
12
|
-
onHighlight?: ((payload?: CollectionItemData<ListboxCollectionItemData> | undefined) => any) | undefined;
|
|
13
12
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
14
13
|
onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
|
|
15
14
|
onPointerDownOutside?: ((event: PointerDownOutsideEvent) => any) | undefined;
|
|
16
15
|
onFocusOutside?: ((event: FocusOutsideEvent) => any) | undefined;
|
|
16
|
+
onHighlight?: ((payload?: CollectionItemData<ListboxCollectionItemData> | undefined) => any) | undefined;
|
|
17
17
|
onInteractOutside?: ((event: PointerDownOutsideEvent | FocusOutsideEvent) => any) | undefined;
|
|
18
18
|
onOpenAutoFocus?: ((event: Event) => any) | undefined;
|
|
19
19
|
onCloseAutoFocus?: ((event: Event) => any) | undefined;
|
|
@@ -24,7 +24,7 @@ declare const __VLS_export: <M extends boolean = false>(__VLS_props: NonNullable
|
|
|
24
24
|
expose: (exposed: {}) => void;
|
|
25
25
|
attrs: any;
|
|
26
26
|
slots: ComboboxCompactSlots<M>;
|
|
27
|
-
emit: ((evt: "select", event: SelectEvent<string>) => void) & ((evt: "update:modelValue", value: M extends true ? string[] : string) => void) & ((evt: "
|
|
27
|
+
emit: ((evt: "select", event: SelectEvent<string>) => void) & ((evt: "update:modelValue", value: M extends true ? string[] : string) => void) & ((evt: "update:open", value: boolean) => void) & ((evt: "escapeKeyDown", event: KeyboardEvent) => void) & ((evt: "pointerDownOutside", event: PointerDownOutsideEvent) => void) & ((evt: "focusOutside", event: FocusOutsideEvent) => void) & ((evt: "highlight", payload?: CollectionItemData<ListboxCollectionItemData> | undefined) => void) & ((evt: "interactOutside", event: PointerDownOutsideEvent | FocusOutsideEvent) => void) & ((evt: "openAutoFocus", event: Event) => void) & ((evt: "closeAutoFocus", event: Event) => void) & ((evt: "placed") => void);
|
|
28
28
|
}>) => _$vue.VNode & {
|
|
29
29
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
30
30
|
};
|
|
@@ -7,8 +7,8 @@ import * as _$vue from "vue";
|
|
|
7
7
|
declare const __VLS_export: <M extends boolean = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
8
8
|
props: _$vue.PublicProps & __VLS_PrettifyLocal<ComboboxRootProps<M> & {
|
|
9
9
|
"onUpdate:modelValue"?: ((value: M extends true ? string[] : string) => any) | undefined;
|
|
10
|
-
onHighlight?: ((payload?: CollectionItemData<ListboxCollectionItemData> | undefined) => any) | undefined;
|
|
11
10
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
11
|
+
onHighlight?: ((payload?: CollectionItemData<ListboxCollectionItemData> | undefined) => any) | undefined;
|
|
12
12
|
}> & (typeof globalThis extends {
|
|
13
13
|
__VLS_PROPS_FALLBACK: infer P;
|
|
14
14
|
} ? P : {});
|
|
@@ -30,7 +30,7 @@ declare const __VLS_export: <M extends boolean = false>(__VLS_props: NonNullable
|
|
|
30
30
|
modelValue: (M extends true ? string[] : string) | undefined;
|
|
31
31
|
}) => any;
|
|
32
32
|
};
|
|
33
|
-
emit: ((evt: "update:modelValue", value: M extends true ? string[] : string) => void) & ((evt: "
|
|
33
|
+
emit: ((evt: "update:modelValue", value: M extends true ? string[] : string) => void) & ((evt: "update:open", value: boolean) => void) & ((evt: "highlight", payload?: CollectionItemData<ListboxCollectionItemData> | undefined) => void);
|
|
34
34
|
}>) => _$vue.VNode & {
|
|
35
35
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
36
36
|
};
|
|
@@ -1,9 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
[data-soybean-combobox-viewport] {
|
|
3
|
-
scrollbar-width: none;
|
|
4
|
-
-ms-overflow-style: none;
|
|
5
|
-
-webkit-overflow-scrolling: touch;
|
|
6
|
-
}
|
|
7
|
-
[data-soybean-combobox-viewport]::-webkit-scrollbar {
|
|
8
|
-
display: none;
|
|
9
|
-
}`))]),_:1},8,[`nonce`])],64))}});export{h as default};
|
|
1
|
+
import e from"../listbox/listbox-content.js";import"../listbox/index.js";import{createBlock as t,defineComponent as n,openBlock as r,renderSlot as i,unref as a,withCtx as o}from"vue";const s=n({name:`ComboboxViewport`,__name:`combobox-viewport`,props:{nonce:{}},setup(n){return(n,s)=>(r(),t(a(e),{class:`soybean-headless-scrollbar-hidden`,"data-slot":`viewport`},{default:o(()=>[i(n.$slots,`default`)]),_:3}))}});export{s as default};
|
|
@@ -2,9 +2,9 @@ import { ComboboxViewportProps } from "./types.js";
|
|
|
2
2
|
import * as _$vue from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/combobox/combobox-viewport.vue.d.ts
|
|
5
|
-
declare var
|
|
5
|
+
declare var __VLS_8: {};
|
|
6
6
|
type __VLS_Slots = {} & {
|
|
7
|
-
default?: (props: typeof
|
|
7
|
+
default?: (props: typeof __VLS_8) => any;
|
|
8
8
|
};
|
|
9
9
|
declare const __VLS_base: _$vue.DefineComponent<ComboboxViewportProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<ComboboxViewportProps> & Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
10
10
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1 +1,15 @@
|
|
|
1
|
-
import{transformPropsToContext as e}from"../../shared/vue.js";import"../../shared/index.js";import{provideConfigProviderContext as t}from"./context.js";import{defineComponent as n,renderSlot as r,watchEffect as i}from"vue";import{useTextDirection as
|
|
1
|
+
import{transformPropsToContext as e}from"../../shared/vue.js";import"../../shared/index.js";import{provideConfigProviderContext as t}from"./context.js";import{defineComponent as n,renderSlot as r,watchEffect as i}from"vue";import{useStyleTag as a,useTextDirection as o}from"@vueuse/core";const s=n({name:`ConfigProvider`,__name:`config-provider`,props:{dir:{default:`ltr`},locale:{default:`en`},nonce:{default:void 0},tooltip:{},nuxt:{type:Boolean,default:!1},iconRender:{}},setup(n){let s=n;t({...e(s),iconRender:s.iconRender});let c=o({initialValue:s.dir});return a(`
|
|
2
|
+
.soybean-headless-scrollbar-hidden {
|
|
3
|
+
scrollbar-width: none;
|
|
4
|
+
-ms-overflow-style: none;
|
|
5
|
+
-webkit-overflow-scrolling: touch;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.soybean-headless-scrollbar-hidden::-webkit-scrollbar {
|
|
9
|
+
display: none;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.soybean-headless-overflow-y-hidden {
|
|
13
|
+
overflow-y: hidden;
|
|
14
|
+
}
|
|
15
|
+
`,{id:`__SoybeanHeadless_Styles`}),i(()=>{c.value!==s.dir&&(c.value=s.dir)}),(e,t)=>r(e.$slots,`default`)}});export{s as default};
|
|
@@ -10,8 +10,8 @@ type __VLS_Slots = {} & {
|
|
|
10
10
|
declare const __VLS_base: _$vue.DefineComponent<ConfigProviderProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<ConfigProviderProps> & Readonly<{}>, {
|
|
11
11
|
nuxt: boolean;
|
|
12
12
|
dir: Direction;
|
|
13
|
-
locale: string;
|
|
14
13
|
nonce: string;
|
|
14
|
+
locale: string;
|
|
15
15
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
16
16
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
17
17
|
declare const _default: typeof __VLS_export;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useContext as e}from"../../composables/use-context.js";import"../../composables/index.js";import{computed as t,toValue as n}from"vue";const[r,i]=e(`ConfigProvider`);function a(e){let r=i();return t(()=>n(e)||r?.dir?.value||`ltr`)}function o(e){let r=i();return t(()=>n(e)||r?.locale?.value||`en`)}
|
|
1
|
+
import{useContext as e}from"../../composables/use-context.js";import"../../composables/index.js";import{computed as t,toValue as n}from"vue";const[r,i]=e(`ConfigProvider`);function a(e){let r=i();return t(()=>n(e)||r?.dir?.value||`ltr`)}function o(e){let r=i();return t(()=>n(e)||r?.locale?.value||`en`)}export{r as provideConfigProviderContext,i as useConfigProvider,a as useDirection,o as useLocale};
|