reka-ui 1.0.0-alpha.3 → 1.0.0-alpha.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/index.d.ts +31 -6
- package/dist/packages/core/src/Accordion/AccordionContent.vue.cjs +1 -1
- package/dist/packages/core/src/Accordion/AccordionContent.vue.js +14 -13
- package/dist/packages/core/src/Collapsible/CollapsibleContent.vue.cjs +1 -1
- package/dist/packages/core/src/Collapsible/CollapsibleContent.vue.js +34 -28
- package/dist/packages/core/src/Listbox/ListboxFilter.vue.cjs +1 -1
- package/dist/packages/core/src/Listbox/ListboxFilter.vue.js +13 -13
- package/dist/packages/core/src/Listbox/ListboxRoot.vue.cjs +1 -1
- package/dist/packages/core/src/Listbox/ListboxRoot.vue.js +36 -36
- package/dist/packages/core/src/Pagination/PaginationFirst.vue.cjs +1 -1
- package/dist/packages/core/src/Pagination/PaginationFirst.vue.js +17 -15
- package/dist/packages/core/src/Pagination/PaginationLast.vue.cjs +1 -1
- package/dist/packages/core/src/Pagination/PaginationLast.vue.js +17 -15
- package/dist/packages/core/src/Pagination/PaginationListItem.vue.cjs +1 -1
- package/dist/packages/core/src/Pagination/PaginationListItem.vue.js +17 -17
- package/dist/packages/core/src/Pagination/PaginationNext.vue.cjs +1 -1
- package/dist/packages/core/src/Pagination/PaginationNext.vue.js +16 -16
- package/dist/packages/core/src/Pagination/PaginationPrev.vue.cjs +1 -1
- package/dist/packages/core/src/Pagination/PaginationPrev.vue.js +17 -17
- package/dist/packages/core/src/Select/SelectArrow.vue.cjs +1 -1
- package/dist/packages/core/src/Select/SelectArrow.vue.js +9 -9
- package/dist/packages/core/src/Select/SelectItemText.vue.cjs +1 -1
- package/dist/packages/core/src/Select/SelectItemText.vue.js +18 -19
- package/dist/packages/core/src/Select/SelectRoot.vue.cjs +1 -1
- package/dist/packages/core/src/Select/SelectRoot.vue.js +58 -63
- package/dist/packages/core/src/Select/SelectRoot.vue2.cjs +1 -1
- package/dist/packages/core/src/Select/SelectRoot.vue2.js +4 -6
- package/dist/packages/core/src/Select/SelectValue.vue.cjs +1 -1
- package/dist/packages/core/src/Select/SelectValue.vue.js +25 -20
- package/dist/packages/core/src/TagsInput/TagsInputItem.vue.cjs +1 -1
- package/dist/packages/core/src/TagsInput/TagsInputItem.vue.js +13 -13
- package/dist/packages/core/src/TagsInput/TagsInputRoot.vue.cjs +1 -1
- package/dist/packages/core/src/TagsInput/TagsInputRoot.vue.js +65 -61
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2560,7 +2560,11 @@ export declare interface CheckboxRootProps extends PrimitiveProps, FormFieldProp
|
|
|
2560
2560
|
|
|
2561
2561
|
declare type CheckedState = boolean | 'indeterminate';
|
|
2562
2562
|
|
|
2563
|
-
export declare const CollapsibleContent: __VLS_WithTemplateSlots_35<DefineComponent<CollapsibleContentProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
2563
|
+
export declare const CollapsibleContent: __VLS_WithTemplateSlots_35<DefineComponent<CollapsibleContentProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
2564
|
+
contentFound: (args_0: void) => any;
|
|
2565
|
+
}, string, PublicProps, Readonly<CollapsibleContentProps> & Readonly<{
|
|
2566
|
+
onContentFound?: ((args_0?: void | undefined) => any) | undefined;
|
|
2567
|
+
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>, {
|
|
2564
2568
|
default?(_: {}): any;
|
|
2565
2569
|
}>;
|
|
2566
2570
|
|
|
@@ -7610,6 +7614,12 @@ export declare interface SelectLabelProps extends PrimitiveProps {
|
|
|
7610
7614
|
for?: string;
|
|
7611
7615
|
}
|
|
7612
7616
|
|
|
7617
|
+
declare interface SelectOption {
|
|
7618
|
+
value: any;
|
|
7619
|
+
disabled?: boolean;
|
|
7620
|
+
textContent: string;
|
|
7621
|
+
}
|
|
7622
|
+
|
|
7613
7623
|
export declare const SelectPortal: __VLS_WithTemplateSlots_222<DefineComponent<SelectPortalProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<SelectPortalProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>, {
|
|
7614
7624
|
default?(_: {}): any;
|
|
7615
7625
|
}>;
|
|
@@ -7684,7 +7694,7 @@ export declare const SelectRoot: <T extends AcceptableValue = AcceptableValue>(_
|
|
|
7684
7694
|
};
|
|
7685
7695
|
emit: ((evt: "update:open", value: boolean) => void) & ((evt: "update:modelValue", value: AcceptableValue) => void);
|
|
7686
7696
|
}>) => VNode<RendererNode, RendererElement, {
|
|
7687
|
-
|
|
7697
|
+
[key: string]: any;
|
|
7688
7698
|
}> & {
|
|
7689
7699
|
__ctx?: {
|
|
7690
7700
|
props: {
|
|
@@ -7743,6 +7753,9 @@ declare interface SelectRootContext<T> {
|
|
|
7743
7753
|
} | null>;
|
|
7744
7754
|
isEmptyModelValue: Ref<boolean>;
|
|
7745
7755
|
disabled?: Ref<boolean>;
|
|
7756
|
+
optionsSet: Ref<Set<SelectOption>>;
|
|
7757
|
+
onOptionAdd: (option: SelectOption) => void;
|
|
7758
|
+
onOptionRemove: (option: SelectOption) => void;
|
|
7746
7759
|
}
|
|
7747
7760
|
|
|
7748
7761
|
export declare type SelectRootEmits<T = AcceptableValue> = {
|
|
@@ -7808,7 +7821,9 @@ export declare const SelectValue: __VLS_WithTemplateSlots_234<DefineComponent<Se
|
|
|
7808
7821
|
placeholder: string;
|
|
7809
7822
|
as: AsTag | Component;
|
|
7810
7823
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>, {
|
|
7811
|
-
default?(_: {
|
|
7824
|
+
default?(_: {
|
|
7825
|
+
selectedLabel: string[];
|
|
7826
|
+
}): any;
|
|
7812
7827
|
}>;
|
|
7813
7828
|
|
|
7814
7829
|
export declare interface SelectValueProps extends PrimitiveProps {
|
|
@@ -8553,6 +8568,8 @@ export declare interface TagsInputItemTextProps extends PrimitiveProps {
|
|
|
8553
8568
|
export declare const TagsInputRoot: <T extends AcceptableInputValue = string>(__VLS_props: {
|
|
8554
8569
|
readonly onInvalid?: ((payload: T) => any) | undefined;
|
|
8555
8570
|
readonly "onUpdate:modelValue"?: ((payload: T[]) => any) | undefined;
|
|
8571
|
+
readonly onAddTag?: ((payload: T) => any) | undefined;
|
|
8572
|
+
readonly onRemoveTag?: ((payload: T) => any) | undefined;
|
|
8556
8573
|
modelValue?: T[] | undefined;
|
|
8557
8574
|
defaultValue?: T[] | undefined;
|
|
8558
8575
|
addOnPaste?: boolean | undefined;
|
|
@@ -8583,11 +8600,13 @@ export declare const TagsInputRoot: <T extends AcceptableInputValue = string>(__
|
|
|
8583
8600
|
}) => any;
|
|
8584
8601
|
};
|
|
8585
8602
|
attrs: any;
|
|
8586
|
-
emit: ((evt: "invalid", payload: T) => void) & ((evt: "update:modelValue", payload: T[]) => void);
|
|
8603
|
+
emit: ((evt: "invalid", payload: T) => void) & ((evt: "update:modelValue", payload: T[]) => void) & ((evt: "addTag", payload: T) => void) & ((evt: "removeTag", payload: T) => void);
|
|
8587
8604
|
} | undefined, __VLS_expose?: ((exposed: ShallowUnwrapRef< {}>) => void) | undefined, __VLS_setup?: Promise<{
|
|
8588
8605
|
props: {
|
|
8589
8606
|
readonly onInvalid?: ((payload: T) => any) | undefined;
|
|
8590
8607
|
readonly "onUpdate:modelValue"?: ((payload: T[]) => any) | undefined;
|
|
8608
|
+
readonly onAddTag?: ((payload: T) => any) | undefined;
|
|
8609
|
+
readonly onRemoveTag?: ((payload: T) => any) | undefined;
|
|
8591
8610
|
modelValue?: T[] | undefined;
|
|
8592
8611
|
defaultValue?: T[] | undefined;
|
|
8593
8612
|
addOnPaste?: boolean | undefined;
|
|
@@ -8619,7 +8638,7 @@ export declare const TagsInputRoot: <T extends AcceptableInputValue = string>(__
|
|
|
8619
8638
|
modelValue: AcceptableInputValue[];
|
|
8620
8639
|
}) => any;
|
|
8621
8640
|
};
|
|
8622
|
-
emit: ((evt: "invalid", payload: T) => void) & ((evt: "update:modelValue", payload: T[]) => void);
|
|
8641
|
+
emit: ((evt: "invalid", payload: T) => void) & ((evt: "update:modelValue", payload: T[]) => void) & ((evt: "addTag", payload: T) => void) & ((evt: "removeTag", payload: T) => void);
|
|
8623
8642
|
}>) => VNode<RendererNode, RendererElement, {
|
|
8624
8643
|
[key: string]: any;
|
|
8625
8644
|
}> & {
|
|
@@ -8627,6 +8646,8 @@ export declare const TagsInputRoot: <T extends AcceptableInputValue = string>(__
|
|
|
8627
8646
|
props: {
|
|
8628
8647
|
readonly onInvalid?: ((payload: T) => any) | undefined;
|
|
8629
8648
|
readonly "onUpdate:modelValue"?: ((payload: T[]) => any) | undefined;
|
|
8649
|
+
readonly onAddTag?: ((payload: T) => any) | undefined;
|
|
8650
|
+
readonly onRemoveTag?: ((payload: T) => any) | undefined;
|
|
8630
8651
|
modelValue?: T[] | undefined;
|
|
8631
8652
|
defaultValue?: T[] | undefined;
|
|
8632
8653
|
addOnPaste?: boolean | undefined;
|
|
@@ -8658,7 +8679,7 @@ export declare const TagsInputRoot: <T extends AcceptableInputValue = string>(__
|
|
|
8658
8679
|
modelValue: AcceptableInputValue[];
|
|
8659
8680
|
}) => any;
|
|
8660
8681
|
};
|
|
8661
|
-
emit: ((evt: "invalid", payload: T) => void) & ((evt: "update:modelValue", payload: T[]) => void);
|
|
8682
|
+
emit: ((evt: "invalid", payload: T) => void) & ((evt: "update:modelValue", payload: T[]) => void) & ((evt: "addTag", payload: T) => void) & ((evt: "removeTag", payload: T) => void);
|
|
8662
8683
|
} | undefined;
|
|
8663
8684
|
};
|
|
8664
8685
|
|
|
@@ -8685,6 +8706,10 @@ export declare type TagsInputRootEmits<T = AcceptableInputValue> = {
|
|
|
8685
8706
|
'update:modelValue': [payload: Array<T>];
|
|
8686
8707
|
/** Event handler called when the value is invalid */
|
|
8687
8708
|
'invalid': [payload: T];
|
|
8709
|
+
/** Event handler called when tag is added */
|
|
8710
|
+
'addTag': [payload: T];
|
|
8711
|
+
/** Event handler called when tag is removed */
|
|
8712
|
+
'removeTag': [payload: T];
|
|
8688
8713
|
};
|
|
8689
8714
|
|
|
8690
8715
|
export declare interface TagsInputRootProps<T = AcceptableInputValue> extends PrimitiveProps, FormFieldProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("./AccordionItem.vue.cjs"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("./AccordionItem.vue.cjs"),l=require("../shared/useForwardExpose.cjs"),c=require("../Collapsible/CollapsibleContent.vue.cjs"),s=require("./AccordionRoot.vue.cjs"),d=e.defineComponent({__name:"AccordionContent",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(r){const o=r,n=s.injectAccordionRootContext(),t=i.injectAccordionItemContext();return l.useForwardExpose(),(u,a)=>(e.openBlock(),e.createBlock(e.unref(c.default),{role:"region","as-child":o.asChild,"force-mount":o.forceMount,"aria-labelledby":e.unref(t).triggerId,"data-state":e.unref(t).dataState.value,"data-disabled":e.unref(t).dataDisabled.value,"data-orientation":e.unref(n).orientation,style:{"--reka-accordion-content-width":"var(--reka-collapsible-content-width)","--reka-accordion-content-height":"var(--reka-collapsible-content-height)"},onContentFound:a[0]||(a[0]=_=>e.unref(n).changeModelValue(e.unref(t).value.value))},{default:e.withCtx(()=>[e.renderSlot(u.$slots,"default")]),_:3},8,["as-child","force-mount","aria-labelledby","data-state","data-disabled","data-orientation"]))}});exports.default=d;
|
|
@@ -1,34 +1,35 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { injectAccordionItemContext as
|
|
3
|
-
import { useForwardExpose as
|
|
1
|
+
import { defineComponent as l, openBlock as d, createBlock as c, unref as t, withCtx as s, renderSlot as m } from "vue";
|
|
2
|
+
import { injectAccordionItemContext as p } from "./AccordionItem.vue.js";
|
|
3
|
+
import { useForwardExpose as u } from "../shared/useForwardExpose.js";
|
|
4
4
|
import f from "../Collapsible/CollapsibleContent.vue.js";
|
|
5
|
-
import { injectAccordionRootContext as
|
|
6
|
-
const
|
|
5
|
+
import { injectAccordionRootContext as h } from "./AccordionRoot.vue.js";
|
|
6
|
+
const _ = /* @__PURE__ */ l({
|
|
7
7
|
__name: "AccordionContent",
|
|
8
8
|
props: {
|
|
9
9
|
forceMount: { type: Boolean },
|
|
10
10
|
asChild: { type: Boolean },
|
|
11
11
|
as: {}
|
|
12
12
|
},
|
|
13
|
-
setup(
|
|
14
|
-
const e =
|
|
15
|
-
return
|
|
13
|
+
setup(r) {
|
|
14
|
+
const e = r, a = h(), o = p();
|
|
15
|
+
return u(), (i, n) => (d(), c(t(f), {
|
|
16
16
|
role: "region",
|
|
17
17
|
"as-child": e.asChild,
|
|
18
18
|
"force-mount": e.forceMount,
|
|
19
19
|
"aria-labelledby": t(o).triggerId,
|
|
20
20
|
"data-state": t(o).dataState.value,
|
|
21
21
|
"data-disabled": t(o).dataDisabled.value,
|
|
22
|
-
"data-orientation": t(
|
|
23
|
-
style: { "--reka-accordion-content-width": "var(--reka-collapsible-content-width)", "--reka-accordion-content-height": "var(--reka-collapsible-content-height)" }
|
|
22
|
+
"data-orientation": t(a).orientation,
|
|
23
|
+
style: { "--reka-accordion-content-width": "var(--reka-collapsible-content-width)", "--reka-accordion-content-height": "var(--reka-collapsible-content-height)" },
|
|
24
|
+
onContentFound: n[0] || (n[0] = (C) => t(a).changeModelValue(t(o).value.value))
|
|
24
25
|
}, {
|
|
25
|
-
default:
|
|
26
|
-
|
|
26
|
+
default: s(() => [
|
|
27
|
+
m(i.$slots, "default")
|
|
27
28
|
]),
|
|
28
29
|
_: 3
|
|
29
30
|
}, 8, ["as-child", "force-mount", "aria-labelledby", "data-state", "data-disabled", "data-orientation"]));
|
|
30
31
|
}
|
|
31
32
|
});
|
|
32
33
|
export {
|
|
33
|
-
|
|
34
|
+
_ as default
|
|
34
35
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),_=require("../../../../node_modules/.pnpm/@vueuse_core@11.1.0_vue@3.5.7_typescript@5.4.2_/node_modules/@vueuse/core/index.cjs"),C=require("../shared/useId.cjs"),b=require("../shared/useForwardExpose.cjs"),g=require("../Presence/Presence.cjs"),w=require("../Primitive/Primitive.cjs"),k=require("./CollapsibleRoot.vue.cjs"),q=e.defineComponent({inheritAttrs:!1,__name:"CollapsibleContent",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["contentFound"],setup(f,{emit:p}){const m=f,v=p,n=k.injectCollapsibleRootContext();n.contentId||=C.useId(void 0,"reka-collapsible-content");const r=e.ref(),{forwardRef:h,currentElement:s}=b.useForwardExpose(),u=e.ref(0),l=e.ref(0),d=e.computed(()=>n.open.value),a=e.ref(d.value),o=e.ref();e.watch(()=>[d.value,r.value?.present],async()=>{await e.nextTick();const t=s.value;if(!t)return;o.value=o.value||{transitionDuration:t.style.transitionDuration,animationName:t.style.animationName},t.style.transitionDuration="0s",t.style.animationName="none";const i=t.getBoundingClientRect();l.value=i.height,u.value=i.width,a.value||(t.style.transitionDuration=o.value.transitionDuration,t.style.animationName=o.value.animationName)},{immediate:!0});const y=e.computed(()=>a.value&&n.open.value);return e.onMounted(()=>{requestAnimationFrame(()=>{a.value=!1})}),_.useEventListener(s,"beforematch",t=>{requestAnimationFrame(()=>{n.onOpenToggle(),v("contentFound")})}),(t,i)=>(e.openBlock(),e.createBlock(e.unref(g.default),{ref_key:"presentRef",ref:r,present:t.forceMount||e.unref(n).open.value,"force-mount":!0},{default:e.withCtx(({present:c})=>[e.createVNode(e.unref(w.Primitive),e.mergeProps(t.$attrs,{id:e.unref(n).contentId,ref:e.unref(h),"as-child":m.asChild,as:t.as,hidden:c?void 0:e.unref(n).unmountOnHide.value?"":"until-found","data-state":y.value?void 0:e.unref(n).open.value?"open":"closed","data-disabled":e.unref(n).disabled?.value?"":void 0,style:{"--reka-collapsible-content-height":`${l.value}px`,"--reka-collapsible-content-width":`${u.value}px`}}),{default:e.withCtx(()=>[!e.unref(n).unmountOnHide.value||c?e.renderSlot(t.$slots,"default",{key:0}):e.createCommentVNode("",!0)]),_:2},1040,["id","as-child","as","hidden","data-state","data-disabled","style"])]),_:3},8,["present"]))}});exports.default=q;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import P from "../
|
|
5
|
-
import
|
|
1
|
+
import { defineComponent as g, ref as o, computed as p, watch as w, nextTick as N, onMounted as x, openBlock as A, createBlock as B, unref as n, withCtx as f, createVNode as D, mergeProps as F, renderSlot as R, createCommentVNode as _ } from "vue";
|
|
2
|
+
import { useEventListener as M } from "../../../../node_modules/.pnpm/@vueuse_core@11.1.0_vue@3.5.7_typescript@5.4.2_/node_modules/@vueuse/core/index.js";
|
|
3
|
+
import { useId as O } from "../shared/useId.js";
|
|
4
|
+
import { useForwardExpose as P } from "../shared/useForwardExpose.js";
|
|
5
|
+
import $ from "../Presence/Presence.js";
|
|
6
|
+
import { Primitive as E } from "../Primitive/Primitive.js";
|
|
6
7
|
import { injectCollapsibleRootContext as I } from "./CollapsibleRoot.vue.js";
|
|
7
|
-
const
|
|
8
|
+
const z = /* @__PURE__ */ g({
|
|
8
9
|
inheritAttrs: !1,
|
|
9
10
|
__name: "CollapsibleContent",
|
|
10
11
|
props: {
|
|
@@ -12,15 +13,16 @@ const q = /* @__PURE__ */ k({
|
|
|
12
13
|
asChild: { type: Boolean },
|
|
13
14
|
as: {}
|
|
14
15
|
},
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
b(
|
|
20
|
-
|
|
16
|
+
emits: ["contentFound"],
|
|
17
|
+
setup(v, { emit: h }) {
|
|
18
|
+
const y = v, C = h, t = I();
|
|
19
|
+
t.contentId ||= O(void 0, "reka-collapsible-content");
|
|
20
|
+
const s = o(), { forwardRef: b, currentElement: l } = P(), u = o(0), d = o(0), m = p(() => t.open.value), i = o(m.value), a = o();
|
|
21
|
+
w(
|
|
22
|
+
() => [m.value, s.value?.present],
|
|
21
23
|
async () => {
|
|
22
|
-
await
|
|
23
|
-
const e =
|
|
24
|
+
await N();
|
|
25
|
+
const e = l.value;
|
|
24
26
|
if (!e)
|
|
25
27
|
return;
|
|
26
28
|
a.value = a.value || {
|
|
@@ -28,38 +30,42 @@ const q = /* @__PURE__ */ k({
|
|
|
28
30
|
animationName: e.style.animationName
|
|
29
31
|
}, e.style.transitionDuration = "0s", e.style.animationName = "none";
|
|
30
32
|
const r = e.getBoundingClientRect();
|
|
31
|
-
|
|
33
|
+
d.value = r.height, u.value = r.width, i.value || (e.style.transitionDuration = a.value.transitionDuration, e.style.animationName = a.value.animationName);
|
|
32
34
|
},
|
|
33
35
|
{
|
|
34
36
|
immediate: !0
|
|
35
37
|
}
|
|
36
38
|
);
|
|
37
|
-
const
|
|
38
|
-
return
|
|
39
|
+
const k = p(() => i.value && t.open.value);
|
|
40
|
+
return x(() => {
|
|
39
41
|
requestAnimationFrame(() => {
|
|
40
42
|
i.value = !1;
|
|
41
43
|
});
|
|
42
|
-
}), (
|
|
44
|
+
}), M(l, "beforematch", (e) => {
|
|
45
|
+
requestAnimationFrame(() => {
|
|
46
|
+
t.onOpenToggle(), C("contentFound");
|
|
47
|
+
});
|
|
48
|
+
}), (e, r) => (A(), B(n($), {
|
|
43
49
|
ref_key: "presentRef",
|
|
44
50
|
ref: s,
|
|
45
51
|
present: e.forceMount || n(t).open.value,
|
|
46
52
|
"force-mount": !0
|
|
47
53
|
}, {
|
|
48
|
-
default:
|
|
49
|
-
|
|
54
|
+
default: f(({ present: c }) => [
|
|
55
|
+
D(n(E), F(e.$attrs, {
|
|
50
56
|
id: n(t).contentId,
|
|
51
|
-
ref: n(
|
|
52
|
-
"as-child":
|
|
57
|
+
ref: n(b),
|
|
58
|
+
"as-child": y.asChild,
|
|
53
59
|
as: e.as,
|
|
54
|
-
hidden:
|
|
55
|
-
"data-state":
|
|
60
|
+
hidden: c ? void 0 : n(t).unmountOnHide.value ? "" : "until-found",
|
|
61
|
+
"data-state": k.value ? void 0 : n(t).open.value ? "open" : "closed",
|
|
56
62
|
"data-disabled": n(t).disabled?.value ? "" : void 0,
|
|
57
63
|
style: {
|
|
58
|
-
"--reka-collapsible-content-height": `${
|
|
59
|
-
"--reka-collapsible-content-width": `${
|
|
64
|
+
"--reka-collapsible-content-height": `${d.value}px`,
|
|
65
|
+
"--reka-collapsible-content-width": `${u.value}px`
|
|
60
66
|
}
|
|
61
67
|
}), {
|
|
62
|
-
default:
|
|
68
|
+
default: f(() => [
|
|
63
69
|
!n(t).unmountOnHide.value || c ? R(e.$slots, "default", { key: 0 }) : _("", !0)
|
|
64
70
|
]),
|
|
65
71
|
_: 2
|
|
@@ -70,5 +76,5 @@ const q = /* @__PURE__ */ k({
|
|
|
70
76
|
}
|
|
71
77
|
});
|
|
72
78
|
export {
|
|
73
|
-
|
|
79
|
+
z as default
|
|
74
80
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("../../../../node_modules/.pnpm/@vueuse_core@11.1.0_vue@3.5.7_typescript@5.4.2_/node_modules/@vueuse/core/index.cjs");require("@floating-ui/vue");const p=require("../Primitive/usePrimitiveElement.cjs"),f=require("../Primitive/Primitive.cjs"),b=require("./ListboxRoot.vue.cjs"),y=e.defineComponent({__name:"ListboxFilter",props:{modelValue:{},autoFocus:{type:Boolean},disabled:{type:Boolean},asChild:{type:Boolean},as:{default:"input"}},emits:["update:modelValue"],setup(n,{emit:d}){const o=n,r=d,i=c.useVModel(o,"modelValue",r,{defaultValue:"",passive:o.modelValue===void 0}),t=b.injectListboxRootContext();t.focusable.value=!1;const{primitiveElement:m,currentElement:v}=p.usePrimitiveElement(),a=e.computed(()=>o.disabled||t.disabled.value||!1);return e.onMounted(()=>{setTimeout(()=>{o.autoFocus&&v.value?.focus()},1)}),(l,u)=>(e.openBlock(),e.createBlock(e.unref(f.Primitive),{ref_key:"primitiveElement",ref:m,as:l.as,"as-child":l.asChild,value:e.unref(i),disabled:a.value?"":void 0,"data-disabled":a.value?"":void 0,"aria-disabled":a.value??void 0,type:"text",onKeydown:[e.withKeys(e.withModifiers(e.unref(t).onKeydownNavigation,["prevent"]),["down","up","
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("../../../../node_modules/.pnpm/@vueuse_core@11.1.0_vue@3.5.7_typescript@5.4.2_/node_modules/@vueuse/core/index.cjs");require("@floating-ui/vue");const p=require("../Primitive/usePrimitiveElement.cjs"),f=require("../Primitive/Primitive.cjs"),b=require("./ListboxRoot.vue.cjs"),y=e.defineComponent({__name:"ListboxFilter",props:{modelValue:{},autoFocus:{type:Boolean},disabled:{type:Boolean},asChild:{type:Boolean},as:{default:"input"}},emits:["update:modelValue"],setup(n,{emit:d}){const o=n,r=d,i=c.useVModel(o,"modelValue",r,{defaultValue:"",passive:o.modelValue===void 0}),t=b.injectListboxRootContext();t.focusable.value=!1;const{primitiveElement:m,currentElement:v}=p.usePrimitiveElement(),a=e.computed(()=>o.disabled||t.disabled.value||!1);return e.onMounted(()=>{setTimeout(()=>{o.autoFocus&&v.value?.focus()},1)}),(l,u)=>(e.openBlock(),e.createBlock(e.unref(f.Primitive),{ref_key:"primitiveElement",ref:m,as:l.as,"as-child":l.asChild,value:e.unref(i),disabled:a.value?"":void 0,"data-disabled":a.value?"":void 0,"aria-disabled":a.value??void 0,type:"text",onKeydown:[e.withKeys(e.withModifiers(e.unref(t).onKeydownNavigation,["prevent"]),["down","up","home","end"]),e.withKeys(e.unref(t).onKeydownEnter,["enter"])],onInput:u[0]||(u[0]=s=>{i.value=s.target.value,e.unref(t).highlightFirstItem(s)})},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default",{modelValue:e.unref(i)})]),_:3},8,["as","as-child","value","disabled","data-disabled","aria-disabled","onKeydown"]))}});exports.default=y;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as f, computed as v, onMounted as c, openBlock as b, createBlock as h, unref as e, withKeys as n, withModifiers as y, withCtx as w, renderSlot as V } from "vue";
|
|
2
2
|
import { useVModel as C } from "../../../../node_modules/.pnpm/@vueuse_core@11.1.0_vue@3.5.7_typescript@5.4.2_/node_modules/@vueuse/core/index.js";
|
|
3
3
|
import "@floating-ui/vue";
|
|
4
|
-
import { usePrimitiveElement as
|
|
5
|
-
import { Primitive as
|
|
6
|
-
import { injectListboxRootContext as
|
|
4
|
+
import { usePrimitiveElement as x } from "../Primitive/usePrimitiveElement.js";
|
|
5
|
+
import { Primitive as B } from "../Primitive/Primitive.js";
|
|
6
|
+
import { injectListboxRootContext as E } from "./ListboxRoot.vue.js";
|
|
7
7
|
const L = /* @__PURE__ */ f({
|
|
8
8
|
__name: "ListboxFilter",
|
|
9
9
|
props: {
|
|
@@ -15,17 +15,17 @@ const L = /* @__PURE__ */ f({
|
|
|
15
15
|
},
|
|
16
16
|
emits: ["update:modelValue"],
|
|
17
17
|
setup(u, { emit: r }) {
|
|
18
|
-
const
|
|
18
|
+
const t = u, a = C(t, "modelValue", r, {
|
|
19
19
|
defaultValue: "",
|
|
20
|
-
passive:
|
|
21
|
-
}),
|
|
22
|
-
|
|
23
|
-
const { primitiveElement: m, currentElement: p } =
|
|
20
|
+
passive: t.modelValue === void 0
|
|
21
|
+
}), o = E();
|
|
22
|
+
o.focusable.value = !1;
|
|
23
|
+
const { primitiveElement: m, currentElement: p } = x(), i = v(() => t.disabled || o.disabled.value || !1);
|
|
24
24
|
return c(() => {
|
|
25
25
|
setTimeout(() => {
|
|
26
|
-
|
|
26
|
+
t.autoFocus && p.value?.focus();
|
|
27
27
|
}, 1);
|
|
28
|
-
}), (l, d) => (b(), h(e(
|
|
28
|
+
}), (l, d) => (b(), h(e(B), {
|
|
29
29
|
ref_key: "primitiveElement",
|
|
30
30
|
ref: m,
|
|
31
31
|
as: l.as,
|
|
@@ -36,11 +36,11 @@ const L = /* @__PURE__ */ f({
|
|
|
36
36
|
"aria-disabled": i.value ?? void 0,
|
|
37
37
|
type: "text",
|
|
38
38
|
onKeydown: [
|
|
39
|
-
n(y(e(
|
|
40
|
-
n(e(
|
|
39
|
+
n(y(e(o).onKeydownNavigation, ["prevent"]), ["down", "up", "home", "end"]),
|
|
40
|
+
n(e(o).onKeydownEnter, ["enter"])
|
|
41
41
|
],
|
|
42
42
|
onInput: d[0] || (d[0] = (s) => {
|
|
43
|
-
a.value = s.target.value, e(
|
|
43
|
+
a.value = s.target.value, e(o).highlightFirstItem(s);
|
|
44
44
|
})
|
|
45
45
|
}, {
|
|
46
46
|
default: w(() => [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue"),X=require("../../../../node_modules/.pnpm/@vueuse_core@11.1.0_vue@3.5.7_typescript@5.4.2_/node_modules/@vueuse/core/index.cjs"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue"),X=require("../../../../node_modules/.pnpm/@vueuse_core@11.1.0_vue@3.5.7_typescript@5.4.2_/node_modules/@vueuse/core/index.cjs"),E=require("./utils.cjs"),Y=require("../Collection/Collection.cjs");require("@floating-ui/vue");const Z=require("../RovingFocus/utils.cjs"),ee=require("../shared/useTypeahead.cjs"),te=require("../Primitive/usePrimitiveElement.cjs"),ie=require("../shared/useDirection.cjs"),oe=require("../shared/useFormControl.cjs"),le=require("../Primitive/Primitive.cjs"),ne=require("../VisuallyHidden/VisuallyHiddenInput.vue2.cjs"),re=require("../shared/createContext.cjs"),K=require("../../../../node_modules/.pnpm/@vueuse_shared@11.1.0_vue@3.5.7_typescript@5.4.2_/node_modules/@vueuse/shared/index.cjs"),ae=require("../shared/arrays.cjs"),ue=require("../shared/useKbd.cjs"),[se,_]=re.createContext("ListboxRoot"),ce=o.defineComponent({__name:"ListboxRoot",props:{modelValue:{},defaultValue:{},multiple:{type:Boolean},orientation:{default:"vertical"},dir:{},disabled:{type:Boolean},selectionBehavior:{default:"toggle"},highlightOnHover:{type:Boolean},by:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean}},emits:["update:modelValue","highlight","entryFocus","leave"],setup(M,{expose:R,emit:A}){const a=M,h=A,{multiple:m,highlightOnHover:L,orientation:V,disabled:y,selectionBehavior:D,dir:O}=o.toRefs(a),{getItems:s}=Y.useCollection({isProvider:!0}),{handleTypeaheadSearch:S}=ee.useTypeahead(),{primitiveElement:j,currentElement:b}=te.usePrimitiveElement(),B=ue.useKbd(),k=ie.useDirection(O),N=oe.useFormControl(b),g=o.ref(),f=o.ref(!1),w=o.ref(!0),n=X.useVModel(a,"modelValue",h,{defaultValue:a.defaultValue??(m.value?[]:void 0),passive:a.modelValue===void 0,deep:!0});function $(e){if(f.value=!0,Array.isArray(n.value)){const i=n.value.findIndex(t=>E.compare(t,e,a.by));if(a.selectionBehavior==="toggle"){const t=[...n.value];i===-1?t.push(e):t.splice(i,1),n.value=t}else n.value=[e],g.value=e}else a.selectionBehavior==="toggle"&&E.compare(n.value,e,a.by)?n.value=void 0:n.value=e;setTimeout(()=>{f.value=!1},1)}const r=o.ref(null),x=o.ref(null),c=o.ref(!1),T=K.createEventHook(),q=K.createEventHook(),H=K.createEventHook();function p(){return s().map(e=>e.ref).filter(e=>e.dataset.disabled!=="")}function u(e,i=!0){if(!e)return;r.value=e,w.value&&r.value.focus(),i&&r.value.scrollIntoView({block:"nearest"});const t=s().find(l=>l.ref===e);h("highlight",t)}function U(e){if(c.value)H.trigger(e);else{const i=s().find(t=>E.compare(t.value,e,a.by));i&&(r.value=i.ref,u(i.ref))}}function z(e){r.value&&(e.preventDefault(),e.stopPropagation(),r.value.click())}function G(e){if(f.value=!0,c.value)q.trigger(e);else{const i=e.altKey||e.ctrlKey||e.metaKey;if(i&&e.key==="a"&&m.value){const t=s(),l=t.map(d=>d.value);n.value=[...l],e.preventDefault(),u(t[t.length-1].ref)}else if(!i){const t=S(e.key,p());t&&u(t)}}setTimeout(()=>{f.value=!1},1)}function F(){o.nextTick(()=>{const e=new KeyboardEvent("keydown",{key:"PageUp"});I(e)})}function C(e){const i=r.value;i?.isConnected&&(x.value=i),r.value=null,h("leave",e)}function J(e){const i=new CustomEvent("listbox.entryFocus",{bubbles:!1,cancelable:!0});if(e.currentTarget?.dispatchEvent(i),h("entryFocus",i),!i.defaultPrevented)if(x.value)u(x.value);else{const t=p()?.[0];u(t)}}function I(e){const i=Z.getFocusIntent(e,V.value,k.value);if(!i)return;let t=p();if(r.value){if(i==="last")t.reverse();else if(i==="prev"||i==="next"){i==="prev"&&t.reverse();const l=t.indexOf(r.value);t=t.slice(l+1)}Q(e,t[0])}if(t.length){const l=!r.value&&i==="prev"?t.length-1:0;u(t[l])}if(c.value)return q.trigger(e)}function Q(e,i){if(!(c.value||a.selectionBehavior!=="replace"||!m.value||!Array.isArray(n.value)||(e.altKey||e.ctrlKey||e.metaKey)&&!e.shiftKey)&&e.shiftKey){const l=s().filter(v=>v.ref.dataset.disabled!=="");let d=l.find(v=>v.ref===i)?.value;if(e.key===B.END?d=l[l.length-1].value:e.key===B.HOME&&(d=l[0].value),!d||!g.value)return;const W=ae.findValuesBetween(l.map(v=>v.value),g.value,d);n.value=W}}async function P(e){if(await o.nextTick(),c.value)T.trigger(e);else{const i=p(),t=i.find(l=>l.dataset.state==="checked");t?u(t):i.length&&u(i[0])}}return o.watch(n,()=>{f.value||o.nextTick(()=>{P()})},{immediate:!0,deep:!0}),R({highlightedElement:r,highlightItem:U,highlightFirstItem:F,highlightSelected:P,getItems:s}),_({modelValue:n,onValueChange:$,multiple:m,orientation:V,dir:k,disabled:y,highlightOnHover:L,highlightedElement:r,isVirtual:c,virtualFocusHook:T,virtualKeydownHook:q,virtualHighlightHook:H,by:a.by,firstValue:g,selectionBehavior:D,focusable:w,onLeave:C,onEnter:J,changeHighlight:u,onKeydownEnter:z,onKeydownNavigation:I,onKeydownTypeAhead:G,highlightFirstItem:F}),(e,i)=>(o.openBlock(),o.createBlock(o.unref(le.Primitive),{ref_key:"primitiveElement",ref:j,as:e.as,"as-child":e.asChild,dir:o.unref(k),"data-disabled":o.unref(y)?"":void 0,onPointerleave:C,onFocusout:i[0]||(i[0]=async t=>{const l=t.relatedTarget||t.target;await o.nextTick(),r.value&&o.unref(b)&&!o.unref(b).contains(l)&&C(t)})},{default:o.withCtx(()=>[o.renderSlot(e.$slots,"default",{modelValue:o.unref(n)}),o.unref(N)&&e.name?(o.openBlock(),o.createBlock(o.unref(ne.default),{key:0,name:e.name,value:o.unref(n),disabled:o.unref(y),required:e.required},null,8,["name","value","disabled","required"])):o.createCommentVNode("",!0)]),_:3},8,["as","as-child","dir","data-disabled"]))}});exports.default=ce;exports.injectListboxRootContext=se;exports.provideListboxRootContext=_;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as ee, toRefs as te, ref as d, watch as oe, nextTick as b, openBlock as D, createBlock as L, unref as
|
|
1
|
+
import { defineComponent as ee, toRefs as te, ref as d, watch as oe, nextTick as b, openBlock as D, createBlock as L, unref as r, withCtx as ie, renderSlot as le, createCommentVNode as ae } from "vue";
|
|
2
2
|
import { useVModel as ne } from "../../../../node_modules/.pnpm/@vueuse_core@11.1.0_vue@3.5.7_typescript@5.4.2_/node_modules/@vueuse/core/index.js";
|
|
3
|
-
import { compare as
|
|
3
|
+
import { compare as x } from "./utils.js";
|
|
4
4
|
import { useCollection as re } from "../Collection/Collection.js";
|
|
5
5
|
import "@floating-ui/vue";
|
|
6
6
|
import { getFocusIntent as se } from "../RovingFocus/utils.js";
|
|
@@ -11,7 +11,7 @@ import { useFormControl as de } from "../shared/useFormControl.js";
|
|
|
11
11
|
import { Primitive as me } from "../Primitive/Primitive.js";
|
|
12
12
|
import ve from "../VisuallyHidden/VisuallyHiddenInput.vue2.js";
|
|
13
13
|
import { createContext as pe } from "../shared/createContext.js";
|
|
14
|
-
import { createEventHook as
|
|
14
|
+
import { createEventHook as B } from "../../../../node_modules/.pnpm/@vueuse_shared@11.1.0_vue@3.5.7_typescript@5.4.2_/node_modules/@vueuse/shared/index.js";
|
|
15
15
|
import { findValuesBetween as he } from "../shared/arrays.js";
|
|
16
16
|
import { useKbd as ge } from "../shared/useKbd.js";
|
|
17
17
|
const [Re, ye] = pe("ListboxRoot"), De = /* @__PURE__ */ ee({
|
|
@@ -33,30 +33,30 @@ const [Re, ye] = pe("ListboxRoot"), De = /* @__PURE__ */ ee({
|
|
|
33
33
|
},
|
|
34
34
|
emits: ["update:modelValue", "highlight", "entryFocus", "leave"],
|
|
35
35
|
setup(q, { expose: O, emit: N }) {
|
|
36
|
-
const n = q, p = N, { multiple: h, highlightOnHover: S, orientation:
|
|
36
|
+
const n = q, p = N, { multiple: h, highlightOnHover: S, orientation: F, disabled: k, selectionBehavior: U, dir: _ } = te(n), { getItems: u } = re({ isProvider: !0 }), { handleTypeaheadSearch: $ } = ue(), { primitiveElement: j, currentElement: K } = ce(), H = ge(), V = fe(_), z = de(K), g = d(), m = d(!1), I = d(!0), l = ne(n, "modelValue", p, {
|
|
37
37
|
defaultValue: n.defaultValue ?? (h.value ? [] : void 0),
|
|
38
38
|
passive: n.modelValue === void 0,
|
|
39
39
|
deep: !0
|
|
40
40
|
});
|
|
41
41
|
function G(e) {
|
|
42
42
|
if (m.value = !0, Array.isArray(l.value)) {
|
|
43
|
-
const o = l.value.findIndex((t) =>
|
|
43
|
+
const o = l.value.findIndex((t) => x(t, e, n.by));
|
|
44
44
|
if (n.selectionBehavior === "toggle") {
|
|
45
45
|
const t = [...l.value];
|
|
46
46
|
o === -1 ? t.push(e) : t.splice(o, 1), l.value = t;
|
|
47
47
|
} else
|
|
48
48
|
l.value = [e], g.value = e;
|
|
49
49
|
} else
|
|
50
|
-
n.selectionBehavior === "toggle" &&
|
|
50
|
+
n.selectionBehavior === "toggle" && x(l.value, e, n.by) ? l.value = void 0 : l.value = e;
|
|
51
51
|
setTimeout(() => {
|
|
52
52
|
m.value = !1;
|
|
53
53
|
}, 1);
|
|
54
54
|
}
|
|
55
|
-
const a = d(null),
|
|
55
|
+
const a = d(null), C = d(null), c = d(!1), T = B(), E = B(), A = B();
|
|
56
56
|
function y() {
|
|
57
57
|
return u().map((e) => e.ref).filter((e) => e.dataset.disabled !== "");
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function s(e, o = !0) {
|
|
60
60
|
if (!e)
|
|
61
61
|
return;
|
|
62
62
|
a.value = e, I.value && a.value.focus(), o && a.value.scrollIntoView({ block: "nearest" });
|
|
@@ -67,8 +67,8 @@ const [Re, ye] = pe("ListboxRoot"), De = /* @__PURE__ */ ee({
|
|
|
67
67
|
if (c.value)
|
|
68
68
|
A.trigger(e);
|
|
69
69
|
else {
|
|
70
|
-
const o = u().find((t) =>
|
|
71
|
-
o && (a.value = o.ref,
|
|
70
|
+
const o = u().find((t) => x(t.value, e, n.by));
|
|
71
|
+
o && (a.value = o.ref, s(o.ref));
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
function Q(e) {
|
|
@@ -76,15 +76,15 @@ const [Re, ye] = pe("ListboxRoot"), De = /* @__PURE__ */ ee({
|
|
|
76
76
|
}
|
|
77
77
|
function W(e) {
|
|
78
78
|
if (m.value = !0, c.value)
|
|
79
|
-
|
|
79
|
+
E.trigger(e);
|
|
80
80
|
else {
|
|
81
81
|
const o = e.altKey || e.ctrlKey || e.metaKey;
|
|
82
82
|
if (o && e.key === "a" && h.value) {
|
|
83
83
|
const t = u(), i = t.map((f) => f.value);
|
|
84
|
-
l.value = [...i], e.preventDefault(),
|
|
84
|
+
l.value = [...i], e.preventDefault(), s(t[t.length - 1].ref);
|
|
85
85
|
} else if (!o) {
|
|
86
86
|
const t = $(e.key, y());
|
|
87
|
-
t &&
|
|
87
|
+
t && s(t);
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
setTimeout(() => {
|
|
@@ -97,22 +97,22 @@ const [Re, ye] = pe("ListboxRoot"), De = /* @__PURE__ */ ee({
|
|
|
97
97
|
M(e);
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
|
-
function
|
|
100
|
+
function w(e) {
|
|
101
101
|
const o = a.value;
|
|
102
|
-
o?.isConnected && (
|
|
102
|
+
o?.isConnected && (C.value = o), a.value = null, p("leave", e);
|
|
103
103
|
}
|
|
104
104
|
function X(e) {
|
|
105
105
|
const o = new CustomEvent("listbox.entryFocus", { bubbles: !1, cancelable: !0 });
|
|
106
106
|
if (e.currentTarget?.dispatchEvent(o), p("entryFocus", o), !o.defaultPrevented)
|
|
107
|
-
if (
|
|
108
|
-
|
|
107
|
+
if (C.value)
|
|
108
|
+
s(C.value);
|
|
109
109
|
else {
|
|
110
110
|
const t = y()?.[0];
|
|
111
|
-
|
|
111
|
+
s(t);
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
function M(e) {
|
|
115
|
-
const o = se(e,
|
|
115
|
+
const o = se(e, F.value, V.value);
|
|
116
116
|
if (!o)
|
|
117
117
|
return;
|
|
118
118
|
let t = y();
|
|
@@ -128,10 +128,10 @@ const [Re, ye] = pe("ListboxRoot"), De = /* @__PURE__ */ ee({
|
|
|
128
128
|
}
|
|
129
129
|
if (t.length) {
|
|
130
130
|
const i = !a.value && o === "prev" ? t.length - 1 : 0;
|
|
131
|
-
|
|
131
|
+
s(t[i]);
|
|
132
132
|
}
|
|
133
133
|
if (c.value)
|
|
134
|
-
return
|
|
134
|
+
return E.trigger(e);
|
|
135
135
|
}
|
|
136
136
|
function Y(e, o) {
|
|
137
137
|
if (!(c.value || n.selectionBehavior !== "replace" || !h.value || !Array.isArray(l.value) || (e.altKey || e.ctrlKey || e.metaKey) && !e.shiftKey) && e.shiftKey) {
|
|
@@ -148,7 +148,7 @@ const [Re, ye] = pe("ListboxRoot"), De = /* @__PURE__ */ ee({
|
|
|
148
148
|
T.trigger(e);
|
|
149
149
|
else {
|
|
150
150
|
const o = y(), t = o.find((i) => i.dataset.state === "checked");
|
|
151
|
-
t ?
|
|
151
|
+
t ? s(t) : o.length && s(o[0]);
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
return oe(l, () => {
|
|
@@ -166,46 +166,46 @@ const [Re, ye] = pe("ListboxRoot"), De = /* @__PURE__ */ ee({
|
|
|
166
166
|
// @ts-expect-error ignoring
|
|
167
167
|
onValueChange: G,
|
|
168
168
|
multiple: h,
|
|
169
|
-
orientation:
|
|
170
|
-
dir:
|
|
169
|
+
orientation: F,
|
|
170
|
+
dir: V,
|
|
171
171
|
disabled: k,
|
|
172
172
|
highlightOnHover: S,
|
|
173
173
|
highlightedElement: a,
|
|
174
174
|
isVirtual: c,
|
|
175
175
|
virtualFocusHook: T,
|
|
176
|
-
virtualKeydownHook:
|
|
176
|
+
virtualKeydownHook: E,
|
|
177
177
|
virtualHighlightHook: A,
|
|
178
178
|
by: n.by,
|
|
179
179
|
firstValue: g,
|
|
180
180
|
selectionBehavior: U,
|
|
181
181
|
focusable: I,
|
|
182
|
-
onLeave:
|
|
182
|
+
onLeave: w,
|
|
183
183
|
onEnter: X,
|
|
184
|
-
changeHighlight:
|
|
184
|
+
changeHighlight: s,
|
|
185
185
|
onKeydownEnter: Q,
|
|
186
186
|
onKeydownNavigation: M,
|
|
187
187
|
onKeydownTypeAhead: W,
|
|
188
188
|
highlightFirstItem: P
|
|
189
|
-
}), (e, o) => (D(), L(
|
|
189
|
+
}), (e, o) => (D(), L(r(me), {
|
|
190
190
|
ref_key: "primitiveElement",
|
|
191
191
|
ref: j,
|
|
192
192
|
as: e.as,
|
|
193
193
|
"as-child": e.asChild,
|
|
194
|
-
dir:
|
|
195
|
-
"data-disabled":
|
|
196
|
-
onPointerleave:
|
|
194
|
+
dir: r(V),
|
|
195
|
+
"data-disabled": r(k) ? "" : void 0,
|
|
196
|
+
onPointerleave: w,
|
|
197
197
|
onFocusout: o[0] || (o[0] = async (t) => {
|
|
198
198
|
const i = t.relatedTarget || t.target;
|
|
199
|
-
await b(), a.value && !
|
|
199
|
+
await b(), a.value && r(K) && !r(K).contains(i) && w(t);
|
|
200
200
|
})
|
|
201
201
|
}, {
|
|
202
202
|
default: ie(() => [
|
|
203
|
-
le(e.$slots, "default", { modelValue:
|
|
204
|
-
|
|
203
|
+
le(e.$slots, "default", { modelValue: r(l) }),
|
|
204
|
+
r(z) && e.name ? (D(), L(r(ve), {
|
|
205
205
|
key: 0,
|
|
206
206
|
name: e.name,
|
|
207
|
-
value:
|
|
208
|
-
disabled:
|
|
207
|
+
value: r(l),
|
|
208
|
+
disabled: r(k),
|
|
209
209
|
required: e.required
|
|
210
210
|
}, null, 8, ["name", "value", "disabled", "required"])) : ae("", !0)
|
|
211
211
|
]),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("./PaginationRoot.vue.cjs"),u=require("../shared/useForwardExpose.cjs"),l=require("../Primitive/Primitive.cjs"),d=e.defineComponent({__name:"PaginationFirst",props:{asChild:{type:Boolean},as:{default:"button"}},setup(a){const i=a,o=s.injectPaginationRootContext();u.useForwardExpose();const r=e.computed(()=>o.page.value===1||o.disabled.value);return(n,t)=>(e.openBlock(),e.createBlock(e.unref(l.Primitive),e.mergeProps(i,{"aria-label":"First Page",type:n.as==="button"?"button":void 0,disabled:r.value,onClick:t[0]||(t[0]=p=>!r.value&&e.unref(o).onPageChange(1))}),{default:e.withCtx(()=>[e.renderSlot(n.$slots,"default",{},()=>[t[1]||(t[1]=e.createTextVNode("First page"))])]),_:3},16,["type","disabled"]))}});exports.default=d;
|