@kingsy/headlessui-vue 1.7.23-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +36 -0
- package/dist/components/combobox/combobox.d.ts +323 -0
- package/dist/components/combobox/combobox.js +1 -0
- package/dist/components/description/description.d.ts +32 -0
- package/dist/components/description/description.js +1 -0
- package/dist/components/dialog/dialog.d.ts +202 -0
- package/dist/components/dialog/dialog.js +1 -0
- package/dist/components/disclosure/disclosure.d.ts +105 -0
- package/dist/components/disclosure/disclosure.js +1 -0
- package/dist/components/focus-trap/focus-trap.d.ts +151 -0
- package/dist/components/focus-trap/focus-trap.js +1 -0
- package/dist/components/label/label.d.ts +41 -0
- package/dist/components/label/label.js +1 -0
- package/dist/components/listbox/listbox.d.ts +229 -0
- package/dist/components/listbox/listbox.js +1 -0
- package/dist/components/menu/menu.d.ts +131 -0
- package/dist/components/menu/menu.js +1 -0
- package/dist/components/popover/popover.d.ts +151 -0
- package/dist/components/popover/popover.js +1 -0
- package/dist/components/portal/portal.d.ts +45 -0
- package/dist/components/portal/portal.js +1 -0
- package/dist/components/radio-group/radio-group.d.ts +184 -0
- package/dist/components/radio-group/radio-group.js +1 -0
- package/dist/components/switch/switch.d.ts +166 -0
- package/dist/components/switch/switch.js +1 -0
- package/dist/components/tabs/tabs.d.ts +177 -0
- package/dist/components/tabs/tabs.js +1 -0
- package/dist/components/transitions/transition.d.ts +234 -0
- package/dist/components/transitions/transition.js +1 -0
- package/dist/components/transitions/utils/transition.d.ts +5 -0
- package/dist/components/transitions/utils/transition.js +1 -0
- package/dist/headlessui.dev.cjs +8042 -0
- package/dist/headlessui.esm.js +1 -0
- package/dist/headlessui.esm.js.map +7 -0
- package/dist/headlessui.prod.cjs +7 -0
- package/dist/hooks/__mocks__/use-id.d.ts +1 -0
- package/dist/hooks/document-overflow/adjust-scrollbar-padding.d.ts +2 -0
- package/dist/hooks/document-overflow/adjust-scrollbar-padding.js +1 -0
- package/dist/hooks/document-overflow/handle-ios-locking.d.ts +6 -0
- package/dist/hooks/document-overflow/handle-ios-locking.js +1 -0
- package/dist/hooks/document-overflow/overflow-store.d.ts +19 -0
- package/dist/hooks/document-overflow/overflow-store.js +1 -0
- package/dist/hooks/document-overflow/prevent-scroll.d.ts +2 -0
- package/dist/hooks/document-overflow/prevent-scroll.js +1 -0
- package/dist/hooks/document-overflow/use-document-overflow.d.ts +3 -0
- package/dist/hooks/document-overflow/use-document-overflow.js +1 -0
- package/dist/hooks/use-controllable.d.ts +2 -0
- package/dist/hooks/use-controllable.js +1 -0
- package/dist/hooks/use-disposables.d.ts +25 -0
- package/dist/hooks/use-disposables.js +1 -0
- package/dist/hooks/use-document-event.d.ts +2 -0
- package/dist/hooks/use-document-event.js +1 -0
- package/dist/hooks/use-event-listener.d.ts +1 -0
- package/dist/hooks/use-event-listener.js +1 -0
- package/dist/hooks/use-frame-debounce.d.ts +8 -0
- package/dist/hooks/use-frame-debounce.js +1 -0
- package/dist/hooks/use-id.d.ts +1 -0
- package/dist/hooks/use-id.js +1 -0
- package/dist/hooks/use-inert.d.ts +2 -0
- package/dist/hooks/use-inert.js +1 -0
- package/dist/hooks/use-outside-click.d.ts +6 -0
- package/dist/hooks/use-outside-click.js +1 -0
- package/dist/hooks/use-resolve-button-type.d.ts +5 -0
- package/dist/hooks/use-resolve-button-type.js +1 -0
- package/dist/hooks/use-root-containers.d.ts +19 -0
- package/dist/hooks/use-root-containers.js +1 -0
- package/dist/hooks/use-store.d.ts +2 -0
- package/dist/hooks/use-store.js +1 -0
- package/dist/hooks/use-tab-direction.d.ts +5 -0
- package/dist/hooks/use-tab-direction.js +1 -0
- package/dist/hooks/use-text-value.d.ts +2 -0
- package/dist/hooks/use-text-value.js +1 -0
- package/dist/hooks/use-tracked-pointer.d.ts +4 -0
- package/dist/hooks/use-tracked-pointer.js +1 -0
- package/dist/hooks/use-tree-walker.d.ts +9 -0
- package/dist/hooks/use-tree-walker.js +1 -0
- package/dist/hooks/use-window-event.d.ts +2 -0
- package/dist/hooks/use-window-event.js +1 -0
- package/dist/index.cjs +7 -0
- package/dist/index.d.cts +12 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +1 -0
- package/dist/internal/dom-containers.d.ts +1 -0
- package/dist/internal/dom-containers.js +1 -0
- package/dist/internal/focus-sentinel.d.ts +13 -0
- package/dist/internal/focus-sentinel.js +1 -0
- package/dist/internal/hidden.d.ts +32 -0
- package/dist/internal/hidden.js +1 -0
- package/dist/internal/open-closed.d.ts +10 -0
- package/dist/internal/open-closed.js +1 -0
- package/dist/internal/portal-force-root.d.ts +27 -0
- package/dist/internal/portal-force-root.js +1 -0
- package/dist/internal/stack-context.d.ts +14 -0
- package/dist/internal/stack-context.js +1 -0
- package/dist/keyboard.d.ts +16 -0
- package/dist/keyboard.js +1 -0
- package/dist/mouse.d.ts +4 -0
- package/dist/mouse.js +1 -0
- package/dist/utils/active-element-history.d.ts +1 -0
- package/dist/utils/active-element-history.js +1 -0
- package/dist/utils/calculate-active-index.d.ts +25 -0
- package/dist/utils/calculate-active-index.js +1 -0
- package/dist/utils/disposables.d.ts +12 -0
- package/dist/utils/disposables.js +1 -0
- package/dist/utils/document-ready.d.ts +1 -0
- package/dist/utils/document-ready.js +1 -0
- package/dist/utils/dom.d.ts +4 -0
- package/dist/utils/dom.js +1 -0
- package/dist/utils/env.d.ts +13 -0
- package/dist/utils/env.js +1 -0
- package/dist/utils/focus-management.d.ts +38 -0
- package/dist/utils/focus-management.js +1 -0
- package/dist/utils/form.d.ts +4 -0
- package/dist/utils/form.js +1 -0
- package/dist/utils/get-text-value.d.ts +1 -0
- package/dist/utils/get-text-value.js +1 -0
- package/dist/utils/match.d.ts +1 -0
- package/dist/utils/match.js +1 -0
- package/dist/utils/micro-task.d.ts +1 -0
- package/dist/utils/micro-task.js +1 -0
- package/dist/utils/once.d.ts +1 -0
- package/dist/utils/once.js +1 -0
- package/dist/utils/owner.d.ts +2 -0
- package/dist/utils/owner.js +1 -0
- package/dist/utils/pipeline.d.ts +4 -0
- package/dist/utils/pipeline.js +1 -0
- package/dist/utils/platform.d.ts +3 -0
- package/dist/utils/platform.js +1 -0
- package/dist/utils/render.d.ts +39 -0
- package/dist/utils/render.js +4 -0
- package/dist/utils/resolve-prop-value.d.ts +1 -0
- package/dist/utils/resolve-prop-value.js +1 -0
- package/dist/utils/store.d.ts +11 -0
- package/dist/utils/store.js +1 -0
- package/package.json +55 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './components/combobox/combobox';
|
|
2
|
+
export * from './components/dialog/dialog';
|
|
3
|
+
export * from './components/disclosure/disclosure';
|
|
4
|
+
export * from './components/focus-trap/focus-trap';
|
|
5
|
+
export * from './components/listbox/listbox';
|
|
6
|
+
export * from './components/menu/menu';
|
|
7
|
+
export * from './components/popover/popover';
|
|
8
|
+
export { Portal, PortalGroup } from './components/portal/portal';
|
|
9
|
+
export * from './components/radio-group/radio-group';
|
|
10
|
+
export * from './components/switch/switch';
|
|
11
|
+
export * from './components/tabs/tabs';
|
|
12
|
+
export * from './components/transitions/transition';
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './components/combobox/combobox.js';
|
|
2
|
+
export * from './components/dialog/dialog.js';
|
|
3
|
+
export * from './components/disclosure/disclosure.js';
|
|
4
|
+
export * from './components/focus-trap/focus-trap.js';
|
|
5
|
+
export * from './components/listbox/listbox.js';
|
|
6
|
+
export * from './components/menu/menu.js';
|
|
7
|
+
export * from './components/popover/popover.js';
|
|
8
|
+
export { Portal, PortalGroup } from './components/portal/portal.js';
|
|
9
|
+
export * from './components/radio-group/radio-group.js';
|
|
10
|
+
export * from './components/switch/switch.js';
|
|
11
|
+
export * from './components/tabs/tabs.js';
|
|
12
|
+
export * from './components/transitions/transition.js';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from'./components/combobox/combobox.js';export*from'./components/dialog/dialog.js';export*from'./components/disclosure/disclosure.js';export*from'./components/focus-trap/focus-trap.js';export*from'./components/listbox/listbox.js';export*from'./components/menu/menu.js';export*from'./components/popover/popover.js';import{Portal as l,PortalGroup as P}from'./components/portal/portal.js';export*from'./components/radio-group/radio-group.js';export*from'./components/switch/switch.js';export*from'./components/tabs/tabs.js';export*from'./components/transitions/transition.js';export{l as Portal,P as PortalGroup};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function contains(containers: Set<HTMLElement>, element: HTMLElement): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function r(e,n){for(let t of e)if(t.contains(n))return!0;return!1}export{r as contains};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare let FocusSentinel: import("vue").DefineComponent<{
|
|
2
|
+
onFocus: {
|
|
3
|
+
type: FunctionConstructor;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
}> | null, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
9
|
+
onFocus: {
|
|
10
|
+
type: FunctionConstructor;
|
|
11
|
+
required: true;
|
|
12
|
+
};
|
|
13
|
+
}>>, {}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as i,h as m,ref as f}from"vue";import{Features as l,Hidden as F}from'./hidden.js';let d=i({props:{onFocus:{type:Function,required:!0}},setup(t){let n=f(!0);return()=>n.value?m(F,{as:"button",type:"button",features:l.Focusable,onFocus(o){o.preventDefault();let e,a=50;function r(){var u;if(a--<=0){e&&cancelAnimationFrame(e);return}if((u=t.onFocus)!=null&&u.call(t)){n.value=!1,cancelAnimationFrame(e);return}e=requestAnimationFrame(r)}e=requestAnimationFrame(r)}}):null}});export{d as FocusSentinel};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
export declare enum Features {
|
|
3
|
+
None = 1,
|
|
4
|
+
Focusable = 2,
|
|
5
|
+
Hidden = 4
|
|
6
|
+
}
|
|
7
|
+
export declare let Hidden: import("vue").DefineComponent<{
|
|
8
|
+
as: {
|
|
9
|
+
type: (ObjectConstructor | StringConstructor)[];
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
features: {
|
|
13
|
+
type: PropType<Features>;
|
|
14
|
+
default: Features;
|
|
15
|
+
};
|
|
16
|
+
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
17
|
+
[key: string]: any;
|
|
18
|
+
}> | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
19
|
+
[key: string]: any;
|
|
20
|
+
}>[] | null, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
21
|
+
as: {
|
|
22
|
+
type: (ObjectConstructor | StringConstructor)[];
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
features: {
|
|
26
|
+
type: PropType<Features>;
|
|
27
|
+
default: Features;
|
|
28
|
+
};
|
|
29
|
+
}>>, {
|
|
30
|
+
features: Features;
|
|
31
|
+
as: string | Record<string, any>;
|
|
32
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as a}from"vue";import{render as p}from'../utils/render.js';var u=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(u||{});let f=a({name:"Hidden",props:{as:{type:[Object,String],default:"div"},features:{type:Number,default:1}},setup(t,{slots:n,attrs:i}){return()=>{var r;let{features:e,...d}=t,o={"aria-hidden":(e&2)===2?!0:(r=d["aria-hidden"])!=null?r:void 0,hidden:(e&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(e&4)===4&&(e&2)!==2&&{display:"none"}}};return p({ourProps:o,theirProps:d,slot:{},attrs:i,slots:n,name:"Hidden"})}}});export{u as Features,f as Hidden};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
export declare enum State {
|
|
3
|
+
Open = 1,
|
|
4
|
+
Closed = 2,
|
|
5
|
+
Closing = 4,
|
|
6
|
+
Opening = 8
|
|
7
|
+
}
|
|
8
|
+
export declare function hasOpenClosed(): boolean;
|
|
9
|
+
export declare function useOpenClosed(): Ref<State> | null;
|
|
10
|
+
export declare function useOpenClosedProvider(value: Ref<State>): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{inject as p,provide as r}from"vue";let n=Symbol("Context");var i=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(i||{});function s(){return l()!==null}function l(){return p(n,null)}function t(o){r(n,o)}export{i as State,s as hasOpenClosed,l as useOpenClosed,t as useOpenClosedProvider};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export declare function usePortalRoot(): Boolean;
|
|
2
|
+
export declare let ForcePortalRoot: import("vue").DefineComponent<{
|
|
3
|
+
as: {
|
|
4
|
+
type: (ObjectConstructor | StringConstructor)[];
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
force: {
|
|
8
|
+
type: BooleanConstructor;
|
|
9
|
+
default: boolean;
|
|
10
|
+
};
|
|
11
|
+
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
}> | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}>[] | null, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
16
|
+
as: {
|
|
17
|
+
type: (ObjectConstructor | StringConstructor)[];
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
force: {
|
|
21
|
+
type: BooleanConstructor;
|
|
22
|
+
default: boolean;
|
|
23
|
+
};
|
|
24
|
+
}>>, {
|
|
25
|
+
as: string | Record<string, any>;
|
|
26
|
+
force: boolean;
|
|
27
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as l,inject as a,provide as c}from"vue";import{render as p}from'../utils/render.js';let e=Symbol("ForcePortalRootContext");function s(){return a(e,!1)}let u=l({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup(o,{slots:t,attrs:r}){return c(e,o.force),()=>{let{force:f,...n}=o;return p({theirProps:n,ourProps:{},slot:{},slots:t,attrs:r,name:"ForcePortalRoot"})}}});export{u as ForcePortalRoot,s as usePortalRoot};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
type OnUpdate = (message: StackMessage, type: string, element: Ref<HTMLElement | null>) => void;
|
|
3
|
+
export declare enum StackMessage {
|
|
4
|
+
Add = 0,
|
|
5
|
+
Remove = 1
|
|
6
|
+
}
|
|
7
|
+
export declare function useStackContext(): OnUpdate;
|
|
8
|
+
export declare function useStackProvider({ type, enabled, element, onUpdate, }: {
|
|
9
|
+
type: string;
|
|
10
|
+
enabled: Ref<boolean | undefined>;
|
|
11
|
+
element: Ref<HTMLElement | null>;
|
|
12
|
+
onUpdate?: OnUpdate;
|
|
13
|
+
}): void;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{inject as f,onMounted as m,onUnmounted as l,provide as c,watch as p}from"vue";let u=Symbol("StackContext");var s=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(s||{});function y(){return f(u,()=>{})}function R({type:o,enabled:r,element:e,onUpdate:i}){let a=y();function t(...n){i==null||i(...n),a(...n)}m(()=>{p(r,(n,d)=>{n?t(0,o,e):d===!0&&t(1,o,e)},{immediate:!0,flush:"sync"})}),l(()=>{r.value&&t(1,o,e)}),c(u,t)}export{s as StackMessage,y as useStackContext,R as useStackProvider};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare enum Keys {
|
|
2
|
+
Space = " ",
|
|
3
|
+
Enter = "Enter",
|
|
4
|
+
Escape = "Escape",
|
|
5
|
+
Backspace = "Backspace",
|
|
6
|
+
Delete = "Delete",
|
|
7
|
+
ArrowLeft = "ArrowLeft",
|
|
8
|
+
ArrowUp = "ArrowUp",
|
|
9
|
+
ArrowRight = "ArrowRight",
|
|
10
|
+
ArrowDown = "ArrowDown",
|
|
11
|
+
Home = "Home",
|
|
12
|
+
End = "End",
|
|
13
|
+
PageUp = "PageUp",
|
|
14
|
+
PageDown = "PageDown",
|
|
15
|
+
Tab = "Tab"
|
|
16
|
+
}
|
package/dist/keyboard.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var o=(r=>(r.Space=" ",r.Enter="Enter",r.Escape="Escape",r.Backspace="Backspace",r.Delete="Delete",r.ArrowLeft="ArrowLeft",r.ArrowUp="ArrowUp",r.ArrowRight="ArrowRight",r.ArrowDown="ArrowDown",r.Home="Home",r.End="End",r.PageUp="PageUp",r.PageDown="PageDown",r.Tab="Tab",r))(o||{});export{o as Keys};
|
package/dist/mouse.d.ts
ADDED
package/dist/mouse.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var g=(f=>(f[f.Left=0]="Left",f[f.Right=2]="Right",f))(g||{});export{g as MouseButton};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare let history: HTMLElement[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{onDocumentReady as d}from'./document-ready.js';import{focusableSelector as u}from'./focus-management.js';let r=[];d(()=>{function e(t){if(!(t.target instanceof HTMLElement)||t.target===document.body||r[0]===t.target)return;let n=t.target;n=n.closest(u),r.unshift(n!=null?n:t.target),r=r.filter(o=>o!=null&&o.isConnected),r.splice(10)}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});export{r as history};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare enum Focus {
|
|
2
|
+
/** Focus the first non-disabled item. */
|
|
3
|
+
First = 0,
|
|
4
|
+
/** Focus the previous non-disabled item. */
|
|
5
|
+
Previous = 1,
|
|
6
|
+
/** Focus the next non-disabled item. */
|
|
7
|
+
Next = 2,
|
|
8
|
+
/** Focus the last non-disabled item. */
|
|
9
|
+
Last = 3,
|
|
10
|
+
/** Focus a specific item based on the `id` of the item. */
|
|
11
|
+
Specific = 4,
|
|
12
|
+
/** Focus no items at all. */
|
|
13
|
+
Nothing = 5
|
|
14
|
+
}
|
|
15
|
+
export declare function calculateActiveIndex<TItem>(action: {
|
|
16
|
+
focus: Focus.Specific;
|
|
17
|
+
id: string;
|
|
18
|
+
} | {
|
|
19
|
+
focus: Exclude<Focus, Focus.Specific>;
|
|
20
|
+
}, resolvers: {
|
|
21
|
+
resolveItems(): TItem[];
|
|
22
|
+
resolveActiveIndex(): number | null;
|
|
23
|
+
resolveId(item: TItem, index: number, items: TItem[]): string;
|
|
24
|
+
resolveDisabled(item: TItem, index: number, items: TItem[]): boolean;
|
|
25
|
+
}): number | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function u(l){throw new Error("Unexpected object: "+l)}var c=(i=>(i[i.First=0]="First",i[i.Previous=1]="Previous",i[i.Next=2]="Next",i[i.Last=3]="Last",i[i.Specific=4]="Specific",i[i.Nothing=5]="Nothing",i))(c||{});function f(l,n){let t=n.resolveItems();if(t.length<=0)return null;let r=n.resolveActiveIndex(),s=r!=null?r:-1;switch(l.focus){case 0:{for(let e=0;e<t.length;++e)if(!n.resolveDisabled(t[e],e,t))return e;return r}case 1:{s===-1&&(s=t.length);for(let e=s-1;e>=0;--e)if(!n.resolveDisabled(t[e],e,t))return e;return r}case 2:{for(let e=s+1;e<t.length;++e)if(!n.resolveDisabled(t[e],e,t))return e;return r}case 3:{for(let e=t.length-1;e>=0;--e)if(!n.resolveDisabled(t[e],e,t))return e;return r}case 4:{for(let e=0;e<t.length;++e)if(n.resolveId(t[e],e,t)===l.id)return e;return r}case 5:return null;default:u(l)}}export{c as Focus,f as calculateActiveIndex};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type Disposables = ReturnType<typeof disposables>;
|
|
2
|
+
export declare function disposables(): {
|
|
3
|
+
addEventListener<TEventName extends keyof WindowEventMap>(element: HTMLElement | Window | Document, name: TEventName, listener: (event: WindowEventMap[TEventName]) => any, options?: boolean | AddEventListenerOptions): () => void;
|
|
4
|
+
requestAnimationFrame(callback: FrameRequestCallback): void;
|
|
5
|
+
nextFrame(callback: FrameRequestCallback): void;
|
|
6
|
+
setTimeout(callback: (...args: any[]) => void, ms?: number | undefined, ...args: any[]): void;
|
|
7
|
+
microTask(cb: () => void): () => void;
|
|
8
|
+
style(node: HTMLElement, property: string, value: string): () => void;
|
|
9
|
+
group(cb: (d: typeof this) => void): () => void;
|
|
10
|
+
add(cb: () => void): () => void;
|
|
11
|
+
dispose(): void;
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{microTask as n}from'./micro-task.js';function o(){let a=[],s={addEventListener(e,t,r,i){return e.addEventListener(t,r,i),s.add(()=>e.removeEventListener(t,r,i))},requestAnimationFrame(...e){let t=requestAnimationFrame(...e);s.add(()=>cancelAnimationFrame(t))},nextFrame(...e){s.requestAnimationFrame(()=>{s.requestAnimationFrame(...e)})},setTimeout(...e){let t=setTimeout(...e);s.add(()=>clearTimeout(t))},microTask(...e){let t={current:!0};return n(()=>{t.current&&e[0]()}),s.add(()=>{t.current=!1})},style(e,t,r){let i=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:r}),this.add(()=>{Object.assign(e.style,{[t]:i})})},group(e){let t=o();return e(t),this.add(()=>t.dispose())},add(e){return a.push(e),()=>{let t=a.indexOf(e);if(t>=0)for(let r of a.splice(t,1))r()}},dispose(){for(let e of a.splice(0))e()}};return s}export{o as disposables};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function onDocumentReady(cb: () => void): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function t(n){function e(){document.readyState!=="loading"&&(n(),document.removeEventListener("DOMContentLoaded",e))}typeof window!="undefined"&&typeof document!="undefined"&&(document.addEventListener("DOMContentLoaded",e),e())}export{t as onDocumentReady};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ComponentPublicInstance, Ref } from 'vue';
|
|
2
|
+
type AsElement<T extends HTMLElement | ComponentPublicInstance> = (T extends HTMLElement ? T : HTMLElement) | null;
|
|
3
|
+
export declare function dom<T extends HTMLElement | ComponentPublicInstance>(ref?: Ref<T | null>): AsElement<T> | null;
|
|
4
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function t(e){var l;if(e==null||e.value==null)return null;let n=(l=e.value.$el)!=null?l:e.value;return n instanceof Node?n:null}export{t as dom};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type RenderEnv = 'client' | 'server';
|
|
2
|
+
declare class Env {
|
|
3
|
+
current: RenderEnv;
|
|
4
|
+
currentId: number;
|
|
5
|
+
set(env: RenderEnv): void;
|
|
6
|
+
reset(): void;
|
|
7
|
+
nextId(): number;
|
|
8
|
+
get isServer(): boolean;
|
|
9
|
+
get isClient(): boolean;
|
|
10
|
+
private detect;
|
|
11
|
+
}
|
|
12
|
+
export declare let env: Env;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var i=Object.defineProperty;var d=(t,e,r)=>e in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var n=(t,e,r)=>(d(t,typeof e!="symbol"?e+"":e,r),r);class s{constructor(){n(this,"current",this.detect());n(this,"currentId",0)}set(e){this.current!==e&&(this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window=="undefined"||typeof document=="undefined"?"server":"client"}}let c=new s;export{c as env};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export declare let focusableSelector: string;
|
|
2
|
+
export declare enum Focus {
|
|
3
|
+
/** Focus the first non-disabled element */
|
|
4
|
+
First = 1,
|
|
5
|
+
/** Focus the previous non-disabled element */
|
|
6
|
+
Previous = 2,
|
|
7
|
+
/** Focus the next non-disabled element */
|
|
8
|
+
Next = 4,
|
|
9
|
+
/** Focus the last non-disabled element */
|
|
10
|
+
Last = 8,
|
|
11
|
+
/** Wrap tab around */
|
|
12
|
+
WrapAround = 16,
|
|
13
|
+
/** Prevent scrolling the focusable elements into view */
|
|
14
|
+
NoScroll = 32
|
|
15
|
+
}
|
|
16
|
+
export declare enum FocusResult {
|
|
17
|
+
Error = 0,
|
|
18
|
+
Overflow = 1,
|
|
19
|
+
Success = 2,
|
|
20
|
+
Underflow = 3
|
|
21
|
+
}
|
|
22
|
+
export declare function getFocusableElements(container?: HTMLElement | null): HTMLElement[];
|
|
23
|
+
export declare enum FocusableMode {
|
|
24
|
+
/** The element itself must be focusable. */
|
|
25
|
+
Strict = 0,
|
|
26
|
+
/** The element should be inside of a focusable element. */
|
|
27
|
+
Loose = 1
|
|
28
|
+
}
|
|
29
|
+
export declare function isFocusableElement(element: HTMLElement, mode?: FocusableMode): boolean;
|
|
30
|
+
export declare function restoreFocusIfNecessary(element: HTMLElement | null): void;
|
|
31
|
+
export declare function focusElement(element: HTMLElement | null): void;
|
|
32
|
+
export declare function sortByDomNode<T>(nodes: T[], resolveKey?: (item: T) => HTMLElement | null): T[];
|
|
33
|
+
export declare function focusFrom(current: HTMLElement | null, focus: Focus): FocusResult;
|
|
34
|
+
export declare function focusIn(container: HTMLElement | HTMLElement[], focus: Focus, { sorted, relativeTo, skipElements, }?: Partial<{
|
|
35
|
+
sorted: boolean;
|
|
36
|
+
relativeTo: HTMLElement | null;
|
|
37
|
+
skipElements: HTMLElement[];
|
|
38
|
+
}>): FocusResult;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{nextTick as b}from"vue";import{match as M}from'./match.js';import{getOwnerDocument as f}from'./owner.js';let c=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var N=(n=>(n[n.First=1]="First",n[n.Previous=2]="Previous",n[n.Next=4]="Next",n[n.Last=8]="Last",n[n.WrapAround=16]="WrapAround",n[n.NoScroll=32]="NoScroll",n))(N||{}),T=(o=>(o[o.Error=0]="Error",o[o.Overflow=1]="Overflow",o[o.Success=2]="Success",o[o.Underflow=3]="Underflow",o))(T||{}),F=(t=>(t[t.Previous=-1]="Previous",t[t.Next=1]="Next",t))(F||{});function E(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(c)).sort((r,t)=>Math.sign((r.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}var h=(t=>(t[t.Strict=0]="Strict",t[t.Loose=1]="Loose",t))(h||{});function w(e,r=0){var t;return e===((t=f(e))==null?void 0:t.body)?!1:M(r,{[0](){return e.matches(c)},[1](){let l=e;for(;l!==null;){if(l.matches(c))return!0;l=l.parentElement}return!1}})}function _(e){let r=f(e);b(()=>{r&&!w(r.activeElement,0)&&S(e)})}var y=(t=>(t[t.Keyboard=0]="Keyboard",t[t.Mouse=1]="Mouse",t))(y||{});typeof window!="undefined"&&typeof document!="undefined"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function S(e){e==null||e.focus({preventScroll:!0})}let H=["textarea","input"].join(",");function I(e){var r,t;return(t=(r=e==null?void 0:e.matches)==null?void 0:r.call(e,H))!=null?t:!1}function O(e,r=t=>t){return e.slice().sort((t,l)=>{let o=r(t),i=r(l);if(o===null||i===null)return 0;let n=o.compareDocumentPosition(i);return n&Node.DOCUMENT_POSITION_FOLLOWING?-1:n&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function v(e,r){return P(E(),r,{relativeTo:e})}function P(e,r,{sorted:t=!0,relativeTo:l=null,skipElements:o=[]}={}){var m;let i=(m=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e==null?void 0:e.ownerDocument)!=null?m:document,n=Array.isArray(e)?t?O(e):e:E(e);o.length>0&&n.length>1&&(n=n.filter(s=>!o.includes(s))),l=l!=null?l:i.activeElement;let x=(()=>{if(r&5)return 1;if(r&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),p=(()=>{if(r&1)return 0;if(r&2)return Math.max(0,n.indexOf(l))-1;if(r&4)return Math.max(0,n.indexOf(l))+1;if(r&8)return n.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),L=r&32?{preventScroll:!0}:{},a=0,d=n.length,u;do{if(a>=d||a+d<=0)return 0;let s=p+a;if(r&16)s=(s+d)%d;else{if(s<0)return 3;if(s>=d)return 1}u=n[s],u==null||u.focus(L),a+=x}while(u!==i.activeElement);return r&6&&I(u)&&u.select(),2}export{N as Focus,T as FocusResult,h as FocusableMode,S as focusElement,v as focusFrom,P as focusIn,c as focusableSelector,E as getFocusableElements,w as isFocusableElement,_ as restoreFocusIfNecessary,O as sortByDomNode};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(i={},s=null,t=[]){for(let[r,n]of Object.entries(i))o(t,f(s,r),n);return t}function f(i,s){return i?i+"["+s+"]":s}function o(i,s,t){if(Array.isArray(t))for(let[r,n]of t.entries())o(i,f(s,r.toString()),n);else t instanceof Date?i.push([s,t.toISOString()]):typeof t=="boolean"?i.push([s,t?"1":"0"]):typeof t=="string"?i.push([s,t]):typeof t=="number"?i.push([s,`${t}`]):t==null?i.push([s,""]):e(t,s,i)}function p(i){var t,r;let s=(t=i==null?void 0:i.form)!=null?t:i.closest("form");if(s){for(let n of s.elements)if(n!==i&&(n.tagName==="INPUT"&&n.type==="submit"||n.tagName==="BUTTON"&&n.type==="submit"||n.nodeName==="INPUT"&&n.type==="image")){n.click();return}(r=s.requestSubmit)==null||r.call(s)}}export{p as attemptSubmit,e as objectToFormEntries};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getTextValue(element: HTMLElement): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let a=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function o(e){var r,i;let n=(r=e.innerText)!=null?r:"",t=e.cloneNode(!0);if(!(t instanceof HTMLElement))return n;let u=!1;for(let f of t.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))f.remove(),u=!0;let l=u?(i=t.innerText)!=null?i:"":n;return a.test(l)&&(l=l.replace(a,"")),l}function g(e){let n=e.getAttribute("aria-label");if(typeof n=="string")return n.trim();let t=e.getAttribute("aria-labelledby");if(t){let u=t.split(" ").map(l=>{let r=document.getElementById(l);if(r){let i=r.getAttribute("aria-label");return typeof i=="string"?i.trim():o(r).trim()}return null}).filter(Boolean);if(u.length>0)return u.join(", ")}return o(e).trim()}export{g as getTextValue};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function match<TValue extends string | number = string, TReturnValue = unknown>(value: TValue, lookup: Record<TValue, TReturnValue | ((...args: any[]) => TReturnValue)>, ...args: any[]): TReturnValue;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function u(r,n,...a){if(r in n){let e=n[r];return typeof e=="function"?e(...a):e}let t=new Error(`Tried to handle "${r}" but there is no handler defined. Only defined handlers are: ${Object.keys(n).map(e=>`"${e}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,u),t}export{u as match};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function microTask(cb: () => void): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function t(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(o=>setTimeout(()=>{throw o}))}export{t as microTask};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function once<T>(cb: (...args: T[]) => void): (...args: T[]) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function l(r){let e={called:!1};return(...t)=>{if(!e.called)return e.called=!0,r(...t)}}export{l as once};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{dom as u}from'./dom.js';import{env as o}from'./env.js';function m(n){var r,e;return o.isServer?null:n?"ownerDocument"in n?n.ownerDocument:"value"in n?(e=(r=u(n))==null?void 0:r.ownerDocument)!=null?e:document:null:document}export{m as getOwnerDocument};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function q(t){return(e,i)=>{let n=0;function p(){let r=t[n++];r?r(e,p):i&&i(e)}p()}}export{q as pipeline};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function t(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function i(){return/Android/gi.test(window.navigator.userAgent)}function n(){return t()||i()}export{i as isAndroid,t as isIOS,n as isMobile};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type Slots, type VNode } from 'vue';
|
|
2
|
+
export declare enum Features {
|
|
3
|
+
/** No features at all */
|
|
4
|
+
None = 0,
|
|
5
|
+
/**
|
|
6
|
+
* When used, this will allow us to use one of the render strategies.
|
|
7
|
+
*
|
|
8
|
+
* **The render strategies are:**
|
|
9
|
+
* - **Unmount** _(Will unmount the component.)_
|
|
10
|
+
* - **Hidden** _(Will hide the component using the [hidden] attribute.)_
|
|
11
|
+
*/
|
|
12
|
+
RenderStrategy = 1,
|
|
13
|
+
/**
|
|
14
|
+
* When used, this will allow the user of our component to be in control. This can be used when
|
|
15
|
+
* you want to transition based on some state.
|
|
16
|
+
*/
|
|
17
|
+
Static = 2
|
|
18
|
+
}
|
|
19
|
+
export declare enum RenderStrategy {
|
|
20
|
+
Unmount = 0,
|
|
21
|
+
Hidden = 1
|
|
22
|
+
}
|
|
23
|
+
export declare function render({ visible, features, ourProps, theirProps, ...main }: {
|
|
24
|
+
ourProps: Record<string, any>;
|
|
25
|
+
theirProps: Record<string, any>;
|
|
26
|
+
slot: Record<string, any>;
|
|
27
|
+
attrs: Record<string, any>;
|
|
28
|
+
slots: Slots;
|
|
29
|
+
name: string;
|
|
30
|
+
} & {
|
|
31
|
+
features?: Features;
|
|
32
|
+
visible?: boolean;
|
|
33
|
+
}): VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
34
|
+
[key: string]: any;
|
|
35
|
+
}> | VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
36
|
+
[key: string]: any;
|
|
37
|
+
}>[] | null;
|
|
38
|
+
export declare function compact<T extends Record<any, any>>(object: T): {} & T;
|
|
39
|
+
export declare function omit<T extends Record<any, any>, Keys extends keyof T>(object: T, keysToOmit?: readonly Keys[]): Omit<T, Keys>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{cloneVNode as O,Fragment as x,h as k}from"vue";import{match as w}from'./match.js';var N=(o=>(o[o.None=0]="None",o[o.RenderStrategy=1]="RenderStrategy",o[o.Static=2]="Static",o))(N||{}),S=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(S||{});function A({visible:r=!0,features:t=0,ourProps:e,theirProps:o,...i}){var a;let n=j(o,e),l=Object.assign(i,{props:n});if(r||t&2&&n.static)return y(l);if(t&1){let d=(a=n.unmount)==null||a?0:1;return w(d,{[0](){return null},[1](){return y({...i,props:{...n,hidden:!0,style:{display:"none"}}})}})}return y(l)}function y({props:r,attrs:t,slots:e,slot:o,name:i}){var m,h;let{as:n,...l}=T(r,["unmount","static"]),a=(m=e.default)==null?void 0:m.call(e,o),d={};if(o){let u=!1,c=[];for(let[p,f]of Object.entries(o))typeof f=="boolean"&&(u=!0),f===!0&&c.push(p);u&&(d["data-headlessui-state"]=c.join(" "))}if(n==="template"){if(a=b(a!=null?a:[]),Object.keys(l).length>0||Object.keys(t).length>0){let[u,...c]=a!=null?a:[];if(!v(u)||c.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${i} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(l).concat(Object.keys(t)).map(s=>s.trim()).filter((s,g,R)=>R.indexOf(s)===g).sort((s,g)=>s.localeCompare(g)).map(s=>` - ${s}`).join(`
|
|
2
|
+
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".',"Render a single element as the child so that we can forward the props onto that element."].map(s=>` - ${s}`).join(`
|
|
3
|
+
`)].join(`
|
|
4
|
+
`));let p=j((h=u.props)!=null?h:{},l,d),f=O(u,p,!0);for(let s in p)s.startsWith("on")&&(f.props||(f.props={}),f.props[s]=p[s]);return f}return Array.isArray(a)&&a.length===1?a[0]:a}return k(n,Object.assign({},l,d),{default:()=>a})}function b(r){return r.flatMap(t=>t.type===x?b(t.children):[t])}function j(...r){var o;if(r.length===0)return{};if(r.length===1)return r[0];let t={},e={};for(let i of r)for(let n in i)n.startsWith("on")&&typeof i[n]=="function"?((o=e[n])!=null||(e[n]=[]),e[n].push(i[n])):t[n]=i[n];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(e).map(i=>[i,void 0])));for(let i in e)Object.assign(t,{[i](n,...l){let a=e[i];for(let d of a){if(n instanceof Event&&n.defaultPrevented)return;d(n,...l)}}});return t}function E(r){let t=Object.assign({},r);for(let e in t)t[e]===void 0&&delete t[e];return t}function T(r,t=[]){let e=Object.assign({},r);for(let o of t)o in e&&delete e[o];return e}function v(r){return r==null?!1:typeof r.type=="string"||typeof r.type=="object"||typeof r.type=="function"}export{N as Features,S as RenderStrategy,E as compact,T as omit,A as render};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function resolvePropValue<TProperty, TBag>(property: TProperty, bag: TBag): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function u(e,n){if(e!==void 0)return typeof e=="function"?e(n):e}export{u as resolvePropValue};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type ChangeFn = () => void;
|
|
2
|
+
type UnsubscribeFn = () => void;
|
|
3
|
+
type ActionFn<T> = (this: T, ...args: any[]) => T | void;
|
|
4
|
+
type StoreActions<Key extends string, T> = Record<Key, ActionFn<T>>;
|
|
5
|
+
export interface Store<T, ActionKey extends string> {
|
|
6
|
+
getSnapshot(): T;
|
|
7
|
+
subscribe(onChange: ChangeFn): UnsubscribeFn;
|
|
8
|
+
dispatch(action: ActionKey, ...args: any[]): void;
|
|
9
|
+
}
|
|
10
|
+
export declare function createStore<T, ActionKey extends string>(initial: () => T, actions: StoreActions<ActionKey, T>): Store<T, ActionKey>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a(o,r){let t=o(),n=new Set;return{getSnapshot(){return t},subscribe(e){return n.add(e),()=>n.delete(e)},dispatch(e,...s){let i=r[e].call(t,...s);i&&(t=i,n.forEach(c=>c()))}}}export{a as createStore};
|
package/package.json
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@kingsy/headlessui-vue",
|
|
3
|
+
"version": "1.7.23-alpha.0",
|
|
4
|
+
"description": "A set of completely unstyled, fully accessible UI components for Vue 3, designed to integrate beautifully with Tailwind CSS.",
|
|
5
|
+
"main": "dist/index.cjs",
|
|
6
|
+
"typings": "dist/index.d.ts",
|
|
7
|
+
"module": "dist/headlessui.esm.js",
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"files": [
|
|
10
|
+
"README.md",
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"exports": {
|
|
14
|
+
"types": {
|
|
15
|
+
"import": "./dist/index.d.ts",
|
|
16
|
+
"require": "./dist/index.d.cts"
|
|
17
|
+
},
|
|
18
|
+
"import": "./dist/headlessui.esm.js",
|
|
19
|
+
"require": "./dist/index.cjs"
|
|
20
|
+
},
|
|
21
|
+
"type": "module",
|
|
22
|
+
"sideEffects": false,
|
|
23
|
+
"engines": {
|
|
24
|
+
"node": ">=10"
|
|
25
|
+
},
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "git+https://github.com/tailwindlabs/headlessui.git",
|
|
29
|
+
"directory": "packages/@headlessui-vue"
|
|
30
|
+
},
|
|
31
|
+
"publishConfig": {
|
|
32
|
+
"access": "public"
|
|
33
|
+
},
|
|
34
|
+
"scripts": {
|
|
35
|
+
"prepublishOnly": "npm run build",
|
|
36
|
+
"build": "../../scripts/build.sh --external:vue",
|
|
37
|
+
"watch": "../../scripts/watch.sh --external:vue",
|
|
38
|
+
"test": "../../scripts/test.sh",
|
|
39
|
+
"lint": "../../scripts/lint.sh",
|
|
40
|
+
"lint-types": "npm run attw -P --workspaces --if-present",
|
|
41
|
+
"playground": "npm run dev --workspace=playground-vue",
|
|
42
|
+
"clean": "rimraf ./dist"
|
|
43
|
+
},
|
|
44
|
+
"peerDependencies": {
|
|
45
|
+
"vue": "^3.2.0"
|
|
46
|
+
},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@testing-library/vue": "8.0.0",
|
|
49
|
+
"@vue/test-utils": "^2.4.1",
|
|
50
|
+
"vue": "3.2.37"
|
|
51
|
+
},
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"@tanstack/vue-virtual": "3.13.6"
|
|
54
|
+
}
|
|
55
|
+
}
|