@scalar/components 0.16.3 → 0.16.5
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/ScalarButton/ScalarButton.vue.js +27 -27
- package/dist/components/ScalarButton/types.d.ts +6 -6
- package/dist/components/ScalarButton/types.d.ts.map +1 -1
- package/dist/components/ScalarFileUpload/ScalarFileUpload.vue.js +25 -25
- package/dist/components/ScalarFileUpload/ScalarFileUploadLoading.vue.js +7 -7
- package/dist/components/ScalarLoading/ScalarLoading.vue.d.ts +14 -16
- package/dist/components/ScalarLoading/ScalarLoading.vue.d.ts.map +1 -1
- package/dist/components/ScalarLoading/ScalarLoading.vue.js +3 -5
- package/dist/components/ScalarLoading/ScalarLoading.vue2.js +20 -58
- package/dist/components/ScalarLoading/index.d.ts +3 -1
- package/dist/components/ScalarLoading/index.d.ts.map +1 -1
- package/dist/components/ScalarLoading/types.d.ts +61 -0
- package/dist/components/ScalarLoading/types.d.ts.map +1 -0
- package/dist/components/ScalarLoading/useLoadingState.d.ts +16 -0
- package/dist/components/ScalarLoading/useLoadingState.d.ts.map +1 -0
- package/dist/components/ScalarLoading/useLoadingState.js +39 -0
- package/dist/components/ScalarSearchInput/ScalarSearchInput.vue.d.ts +2 -2
- package/dist/components/ScalarSearchInput/ScalarSearchInput.vue.d.ts.map +1 -1
- package/dist/components/ScalarSearchInput/ScalarSearchInput.vue.js +17 -17
- package/dist/components/ScalarSidebar/ScalarSidebarGroup.vue.d.ts +3 -0
- package/dist/components/ScalarSidebar/ScalarSidebarGroup.vue.d.ts.map +1 -1
- package/dist/components/ScalarSidebar/ScalarSidebarGroup.vue.js +66 -62
- package/dist/components/ScalarSidebar/ScalarSidebarNestedItems.vue.d.ts +3 -0
- package/dist/components/ScalarSidebar/ScalarSidebarNestedItems.vue.d.ts.map +1 -1
- package/dist/components/ScalarSidebar/ScalarSidebarNestedItems.vue.js +63 -62
- package/dist/components/ScalarSidebar/ScalarSidebarSearchInput.vue.d.ts +1 -1
- package/dist/components/ScalarSidebar/ScalarSidebarSearchInput.vue.d.ts.map +1 -1
- package/dist/components/ScalarSidebar/ScalarSidebarSearchInput.vue.js +16 -16
- package/dist/components/ScalarSidebar/ScalarSidebarSection.vue.d.ts.map +1 -1
- package/dist/components/ScalarSidebar/ScalarSidebarSection.vue.js +35 -35
- package/dist/components/ScalarThemeSwatches/ScalarThemeSwatches.vue.d.ts +15 -0
- package/dist/components/ScalarThemeSwatches/ScalarThemeSwatches.vue.d.ts.map +1 -0
- package/dist/components/ScalarThemeSwatches/ScalarThemeSwatches.vue.js +35 -0
- package/dist/components/ScalarThemeSwatches/ScalarThemeSwatches.vue2.js +4 -0
- package/dist/components/ScalarThemeSwatches/index.d.ts +3 -0
- package/dist/components/ScalarThemeSwatches/index.d.ts.map +1 -0
- package/dist/components/ScalarThemeSwatches/useThemeSwatches.d.ts +28 -0
- package/dist/components/ScalarThemeSwatches/useThemeSwatches.d.ts.map +1 -0
- package/dist/components/ScalarThemeSwatches/useThemeSwatches.js +33 -0
- package/dist/components/ScalarWrappingText/ScalarWrappingText.vue.d.ts +14 -0
- package/dist/components/ScalarWrappingText/ScalarWrappingText.vue.d.ts.map +1 -0
- package/dist/components/ScalarWrappingText/ScalarWrappingText.vue.js +25 -0
- package/dist/components/ScalarWrappingText/ScalarWrappingText.vue2.js +4 -0
- package/dist/components/ScalarWrappingText/constants.d.ts +13 -0
- package/dist/components/ScalarWrappingText/constants.d.ts.map +1 -0
- package/dist/components/ScalarWrappingText/constants.js +12 -0
- package/dist/components/ScalarWrappingText/index.d.ts +2 -0
- package/dist/components/ScalarWrappingText/index.d.ts.map +1 -0
- package/dist/components/ScalarWrappingText/types.d.ts +18 -0
- package/dist/components/ScalarWrappingText/types.d.ts.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +76 -70
- package/dist/style.css +1 -1
- package/package.json +10 -10
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as p, mergeModels as f, useModel as m, ref as
|
|
1
|
+
import { defineComponent as p, mergeModels as f, useModel as m, ref as h, createElementBlock as v, openBlock as r, normalizeProps as g, guardReactiveProps as b, unref as e, createVNode as k, withDirectives as _, createBlock as n, createCommentVNode as y, createElementVNode as C, mergeProps as V, vModelText as M, withModifiers as S } from "vue";
|
|
2
2
|
import { ScalarIconMagnifyingGlass as x } from "@scalar/icons";
|
|
3
3
|
import { useBindCx as z } from "@scalar/use-hooks/useBindCx";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
const E = ["aria-label"], N = {},
|
|
4
|
+
import A from "../ScalarLoading/ScalarLoading.vue.js";
|
|
5
|
+
import B from "../ScalarIconButton/ScalarIconButton.vue.js";
|
|
6
|
+
const E = ["aria-label"], N = {}, D = /* @__PURE__ */ p({
|
|
7
7
|
...N,
|
|
8
8
|
inheritAttrs: !1,
|
|
9
9
|
__name: "ScalarSearchInput",
|
|
10
10
|
props: /* @__PURE__ */ f({
|
|
11
|
-
|
|
11
|
+
loader: {},
|
|
12
12
|
label: {}
|
|
13
13
|
}, {
|
|
14
14
|
modelValue: {},
|
|
@@ -16,21 +16,21 @@ const E = ["aria-label"], N = {}, q = /* @__PURE__ */ p({
|
|
|
16
16
|
}),
|
|
17
17
|
emits: ["update:modelValue"],
|
|
18
18
|
setup(s) {
|
|
19
|
-
const
|
|
19
|
+
const l = m(s, "modelValue"), o = h(null);
|
|
20
20
|
function i() {
|
|
21
|
-
|
|
21
|
+
l.value = "", o.value && o.value.focus();
|
|
22
22
|
}
|
|
23
23
|
const { stylingAttrsCx: c, otherAttrs: d } = z();
|
|
24
|
-
return (
|
|
24
|
+
return (a, t) => (r(), v("label", g(b(
|
|
25
25
|
e(c)(
|
|
26
26
|
"flex items-center text-lg font-medium h-10 pl-3 pr-1 py-2 gap-2.25"
|
|
27
27
|
)
|
|
28
28
|
)), [
|
|
29
29
|
k(e(x), { class: "text-sidebar-c-search size-4" }),
|
|
30
|
-
_(C("input",
|
|
30
|
+
_(C("input", V({
|
|
31
31
|
ref_key: "inputRef",
|
|
32
32
|
ref: o,
|
|
33
|
-
"aria-label":
|
|
33
|
+
"aria-label": a.label ?? "Enter search query",
|
|
34
34
|
autocapitalize: "off",
|
|
35
35
|
autocomplete: "off",
|
|
36
36
|
autocorrect: "off",
|
|
@@ -39,26 +39,26 @@ const E = ["aria-label"], N = {}, q = /* @__PURE__ */ p({
|
|
|
39
39
|
spellcheck: "false",
|
|
40
40
|
type: "search"
|
|
41
41
|
}, e(d), {
|
|
42
|
-
"onUpdate:modelValue":
|
|
42
|
+
"onUpdate:modelValue": t[0] || (t[0] = (u) => l.value = u)
|
|
43
43
|
}), null, 16, E), [
|
|
44
|
-
[
|
|
44
|
+
[M, l.value]
|
|
45
45
|
]),
|
|
46
|
-
|
|
46
|
+
a.loader && a.loader.isActive ? (r(), n(e(A), {
|
|
47
47
|
key: 0,
|
|
48
48
|
class: "self-center",
|
|
49
|
-
|
|
49
|
+
loader: a.loader,
|
|
50
50
|
size: "md"
|
|
51
|
-
}, null, 8, ["
|
|
51
|
+
}, null, 8, ["loader"])) : l.value ? (r(), n(e(B), {
|
|
52
52
|
key: 1,
|
|
53
53
|
class: "p-0 size-5",
|
|
54
54
|
icon: "Close",
|
|
55
55
|
label: "Clear Search",
|
|
56
56
|
thickness: "1.5",
|
|
57
|
-
onClick:
|
|
57
|
+
onClick: S(i, ["stop", "prevent"])
|
|
58
58
|
})) : y("", !0)
|
|
59
59
|
], 16));
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
62
|
export {
|
|
63
|
-
|
|
63
|
+
D as default
|
|
64
64
|
};
|
|
@@ -28,11 +28,14 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<import("./
|
|
|
28
28
|
open?: boolean;
|
|
29
29
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
30
30
|
"update:open": (value: boolean) => any;
|
|
31
|
+
} & {
|
|
32
|
+
click: (event: MouseEvent) => any;
|
|
31
33
|
}, string, import("vue").PublicProps, Readonly<import("./types").ScalarSidebarItemProps & {
|
|
32
34
|
controlled?: boolean;
|
|
33
35
|
} & {
|
|
34
36
|
open?: boolean;
|
|
35
37
|
}> & Readonly<{
|
|
38
|
+
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
36
39
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
37
40
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ScalarSidebarGroupSlots>;
|
|
38
41
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarSidebarGroup.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/ScalarSidebarGroup.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScalarSidebarGroup.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/ScalarSidebarGroup.vue"],"names":[],"mappings":"AAsHA,OAAO,KAAK,EAA2B,uBAAuB,EAAE,MAAM,SAAS,CAAA;AAI/E;;;;;;;;;;;;;;;;;;;;;;GAsBG;;;;WAqCM,OAAO;;;;;;;;WAAP,OAAO;;;;;AApChB,wBAsLC;AAOD,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as f, mergeModels as r, useModel as v, createBlock as b, openBlock as d, resolveDynamicComponent as k, normalizeProps as y, guardReactiveProps as B, unref as n, withCtx as t, renderSlot as l, createElementBlock as g, createCommentVNode as $, createVNode as s, createSlots as C } from "vue";
|
|
2
2
|
import { useBindCx as S } from "@scalar/use-hooks/useBindCx";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { useSidebarGroups as
|
|
7
|
-
const
|
|
8
|
-
|
|
3
|
+
import _ from "./ScalarSidebarButton.vue.js";
|
|
4
|
+
import h from "./ScalarSidebarGroupToggle.vue.js";
|
|
5
|
+
import x from "./ScalarSidebarIndent.vue.js";
|
|
6
|
+
import { useSidebarGroups as M } from "./useSidebarGroups.js";
|
|
7
|
+
const G = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "group/items flex flex-col gap-px"
|
|
10
|
+
}, N = {}, E = /* @__PURE__ */ f({
|
|
11
|
+
...N,
|
|
9
12
|
inheritAttrs: !1,
|
|
10
13
|
__name: "ScalarSidebarGroup",
|
|
11
|
-
props: /* @__PURE__ */
|
|
12
|
-
is: { default: "
|
|
14
|
+
props: /* @__PURE__ */ r({
|
|
15
|
+
is: { default: "li" },
|
|
13
16
|
icon: { type: [Object, Function] },
|
|
14
17
|
active: { type: Boolean },
|
|
15
18
|
selected: { type: Boolean },
|
|
@@ -20,62 +23,63 @@ const A = { class: "group/item flex flex-col gap-px" }, M = {}, D = /* @__PURE__
|
|
|
20
23
|
open: { type: Boolean, default: !1 },
|
|
21
24
|
openModifiers: {}
|
|
22
25
|
}),
|
|
23
|
-
emits: ["update:open"],
|
|
24
|
-
setup(
|
|
25
|
-
const o = v(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
t(e.$slots, "icon", { open: o.value }, () => [
|
|
50
|
-
s(_, {
|
|
51
|
-
class: "text-c-3",
|
|
52
|
-
open: o.value
|
|
53
|
-
}, null, 8, ["open"])
|
|
54
|
-
])
|
|
55
|
-
]),
|
|
56
|
-
default: n(() => [
|
|
57
|
-
t(e.$slots, "default", { open: o.value })
|
|
58
|
-
]),
|
|
59
|
-
_: 2
|
|
60
|
-
}, [
|
|
61
|
-
e.$slots.aside ? {
|
|
62
|
-
name: "aside",
|
|
63
|
-
fn: n(() => [
|
|
64
|
-
t(e.$slots, "aside", { open: o.value })
|
|
26
|
+
emits: /* @__PURE__ */ r(["click"], ["update:open"]),
|
|
27
|
+
setup(i, { emit: c }) {
|
|
28
|
+
const p = c, o = v(i, "open"), { level: a } = M({ increment: !0 }), { cx: u } = S(), m = (e) => {
|
|
29
|
+
p("click", e), i.controlled || (o.value = !o.value);
|
|
30
|
+
};
|
|
31
|
+
return (e, P) => (d(), b(k(e.is), y(B(n(u)("group/item flex flex-col gap-px"))), {
|
|
32
|
+
default: t(() => [
|
|
33
|
+
l(e.$slots, "button", {
|
|
34
|
+
level: n(a),
|
|
35
|
+
open: o.value
|
|
36
|
+
}, () => [
|
|
37
|
+
s(_, {
|
|
38
|
+
is: "button",
|
|
39
|
+
active: e.active,
|
|
40
|
+
"aria-expanded": o.value,
|
|
41
|
+
class: "group/group-button",
|
|
42
|
+
disabled: e.disabled,
|
|
43
|
+
indent: n(a),
|
|
44
|
+
selected: e.selected,
|
|
45
|
+
onClick: m
|
|
46
|
+
}, C({
|
|
47
|
+
indent: t(() => [
|
|
48
|
+
s(x, {
|
|
49
|
+
class: "mr-0",
|
|
50
|
+
indent: n(a)
|
|
51
|
+
}, null, 8, ["indent"])
|
|
65
52
|
]),
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
53
|
+
icon: t(() => [
|
|
54
|
+
l(e.$slots, "icon", { open: o.value }, () => [
|
|
55
|
+
s(h, {
|
|
56
|
+
class: "text-c-3",
|
|
57
|
+
open: o.value
|
|
58
|
+
}, null, 8, ["open"])
|
|
59
|
+
])
|
|
60
|
+
]),
|
|
61
|
+
default: t(() => [
|
|
62
|
+
l(e.$slots, "default", { open: o.value })
|
|
63
|
+
]),
|
|
64
|
+
_: 2
|
|
65
|
+
}, [
|
|
66
|
+
e.$slots.aside ? {
|
|
67
|
+
name: "aside",
|
|
68
|
+
fn: t(() => [
|
|
69
|
+
l(e.$slots, "aside", { open: o.value })
|
|
70
|
+
]),
|
|
71
|
+
key: "0"
|
|
72
|
+
} : void 0
|
|
73
|
+
]), 1032, ["active", "aria-expanded", "disabled", "indent", "selected"])
|
|
73
74
|
]),
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
o.value ? (d(), g("ul", G, [
|
|
76
|
+
l(e.$slots, "items", { open: o.value })
|
|
77
|
+
])) : $("", !0)
|
|
78
|
+
]),
|
|
79
|
+
_: 3
|
|
80
|
+
}, 16));
|
|
77
81
|
}
|
|
78
82
|
});
|
|
79
83
|
export {
|
|
80
|
-
|
|
84
|
+
E as default
|
|
81
85
|
};
|
|
@@ -20,11 +20,14 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<import("./
|
|
|
20
20
|
open?: boolean;
|
|
21
21
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
22
22
|
"update:open": (value: boolean) => any;
|
|
23
|
+
} & {
|
|
24
|
+
click: (event: MouseEvent) => any;
|
|
23
25
|
}, string, import("vue").PublicProps, Readonly<import("./types").ScalarSidebarItemProps & {
|
|
24
26
|
controlled?: boolean;
|
|
25
27
|
} & {
|
|
26
28
|
open?: boolean;
|
|
27
29
|
}> & Readonly<{
|
|
30
|
+
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
28
31
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
29
32
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
30
33
|
/** The text content of the button */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarSidebarNestedItems.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/ScalarSidebarNestedItems.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScalarSidebarNestedItems.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/ScalarSidebarNestedItems.vue"],"names":[],"mappings":"AAyLA;;;;;;;;;;;;;;;GAeG;;;;WAiFM,OAAO;;;;;;;;WAAP,OAAO;;;;;IAjEd,qCAAqC;cACzB,MAAM,OAAO;IACzB,iCAAiC;aACtB,MAAM,OAAO;IACxB,wBAAwB;WACf,MAAM,OAAO;IACtB,8BAA8B;YACpB,MAAM,OAAO;IACvB,+BAA+B;WACtB,MAAM,OAAO;IACtB,qCAAqC;mBACtB,MAAM,OAAO;IAC5B,mCAAmC;YACzB,MAAM,OAAO;;AA5BzB,wBAkTC;AAOD,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarIconArrowRight as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { defineComponent as g, mergeModels as d, useModel as B, useTemplateRef as T, ref as _, createElementBlock as u, openBlock as f, normalizeStyle as h, normalizeClass as z, renderSlot as s, createVNode as t, mergeProps as I, unref as r, withCtx as l, Transition as N, createCommentVNode as A, normalizeProps as w, guardReactiveProps as L, createTextVNode as M, nextTick as m } from "vue";
|
|
2
|
+
import { ScalarIconArrowRight as P, ScalarIconCaretLeft as R, ScalarIconListDashes as V } from "@scalar/icons";
|
|
3
|
+
import p from "./ScalarSidebarButton.vue.js";
|
|
4
|
+
import q from "./ScalarSidebarItems.vue.js";
|
|
5
5
|
/* empty css */
|
|
6
|
-
import
|
|
7
|
-
import { findScrollContainer as
|
|
8
|
-
import { useSidebarGroups as
|
|
9
|
-
import { useSidebarNestedItem as
|
|
10
|
-
import
|
|
11
|
-
const
|
|
6
|
+
import x from "./ScalarSidebarSpacer.vue.js";
|
|
7
|
+
import { findScrollContainer as v } from "./findScrollContainer.js";
|
|
8
|
+
import { useSidebarGroups as E } from "./useSidebarGroups.js";
|
|
9
|
+
import { useSidebarNestedItem as O } from "./useSidebarNestedItems.js";
|
|
10
|
+
import j from "../ScalarIcon/ScalarIconLegacyAdapter.vue.js";
|
|
11
|
+
const D = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "absolute inset-0 translate-x-full"
|
|
14
|
-
},
|
|
15
|
-
...
|
|
14
|
+
}, F = {}, te = /* @__PURE__ */ g({
|
|
15
|
+
...F,
|
|
16
16
|
inheritAttrs: !1,
|
|
17
17
|
__name: "ScalarSidebarNestedItems",
|
|
18
|
-
props: /* @__PURE__ */
|
|
18
|
+
props: /* @__PURE__ */ d({
|
|
19
19
|
is: {},
|
|
20
|
-
icon: { type: [Object, Function], default:
|
|
20
|
+
icon: { type: [Object, Function], default: V },
|
|
21
21
|
active: { type: Boolean },
|
|
22
22
|
selected: { type: Boolean },
|
|
23
23
|
disabled: { type: Boolean },
|
|
@@ -27,53 +27,54 @@ const j = {
|
|
|
27
27
|
open: { type: Boolean, default: !1 },
|
|
28
28
|
openModifiers: {}
|
|
29
29
|
}),
|
|
30
|
-
emits: ["update:open"],
|
|
31
|
-
setup(
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
const { level:
|
|
35
|
-
function
|
|
36
|
-
i.value =
|
|
37
|
-
() =>
|
|
30
|
+
emits: /* @__PURE__ */ d(["click"], ["update:open"]),
|
|
31
|
+
setup(c, { emit: b }) {
|
|
32
|
+
const $ = b, o = B(c, "open");
|
|
33
|
+
O(o);
|
|
34
|
+
const { level: S } = E({ reset: !0 }), n = T("el"), i = _(0);
|
|
35
|
+
function k() {
|
|
36
|
+
i.value = v(n.value).scrollTop ?? 0, m(
|
|
37
|
+
() => n.value?.querySelector('button:not([aria-expanded="true"])')?.focus({ preventScroll: !0 })
|
|
38
38
|
);
|
|
39
39
|
}
|
|
40
|
-
function
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
function y() {
|
|
41
|
+
m(() => {
|
|
42
|
+
n.value?.querySelector("button")?.focus({ preventScroll: !0 }), v(n.value).scrollTop = i.value;
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
|
-
|
|
45
|
+
const C = (e) => {
|
|
46
|
+
$("click", e), c.controlled || (o.value = !o.value);
|
|
47
|
+
};
|
|
48
|
+
return (e, a) => (f(), u("li", {
|
|
46
49
|
ref_key: "el",
|
|
47
|
-
ref:
|
|
48
|
-
class: z(["group/item group/nested-items contents", { "group/nested-items-open":
|
|
49
|
-
style:
|
|
50
|
+
ref: n,
|
|
51
|
+
class: z(["group/item group/nested-items contents", { "group/nested-items-open": o.value }]),
|
|
52
|
+
style: h({ "--nested-items-offset": `${i.value}px` })
|
|
50
53
|
}, [
|
|
51
|
-
|
|
52
|
-
t(
|
|
54
|
+
s(e.$slots, "button", {}, () => [
|
|
55
|
+
t(p, I({
|
|
53
56
|
is: "button",
|
|
54
|
-
"aria-expanded":
|
|
57
|
+
"aria-expanded": o.value,
|
|
55
58
|
class: "text-c-1 font-sidebar-active",
|
|
56
59
|
disabled: e.disabled,
|
|
57
|
-
indent: r(
|
|
60
|
+
indent: r(S),
|
|
58
61
|
selected: e.selected
|
|
59
|
-
}, e.$attrs, {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
o(e.$slots, "icon", {}, () => [
|
|
64
|
-
t(r(O), {
|
|
62
|
+
}, e.$attrs, { onClick: C }), {
|
|
63
|
+
icon: l(() => [
|
|
64
|
+
s(e.$slots, "icon", {}, () => [
|
|
65
|
+
t(r(j), {
|
|
65
66
|
icon: e.icon,
|
|
66
67
|
weight: "bold"
|
|
67
68
|
}, null, 8, ["icon"])
|
|
68
69
|
])
|
|
69
70
|
]),
|
|
70
|
-
aside:
|
|
71
|
-
|
|
72
|
-
t(r(
|
|
71
|
+
aside: l(() => [
|
|
72
|
+
s(e.$slots, "aside", {}, () => [
|
|
73
|
+
t(r(P), { class: "size-4 text-c-2" })
|
|
73
74
|
])
|
|
74
75
|
]),
|
|
75
|
-
default:
|
|
76
|
-
|
|
76
|
+
default: l(() => [
|
|
77
|
+
s(e.$slots, "default")
|
|
77
78
|
]),
|
|
78
79
|
_: 3
|
|
79
80
|
}, 16, ["aria-expanded", "disabled", "indent", "selected"])
|
|
@@ -82,36 +83,36 @@ const j = {
|
|
|
82
83
|
duration: 300,
|
|
83
84
|
enterActiveClass: "top-(--nested-items-offset)",
|
|
84
85
|
leaveActiveClass: "top-(--nested-items-offset)",
|
|
85
|
-
onEnter:
|
|
86
|
-
onLeave:
|
|
86
|
+
onEnter: k,
|
|
87
|
+
onLeave: y
|
|
87
88
|
}, {
|
|
88
|
-
default:
|
|
89
|
-
|
|
90
|
-
t(
|
|
91
|
-
default:
|
|
92
|
-
|
|
93
|
-
t(
|
|
89
|
+
default: l(() => [
|
|
90
|
+
o.value ? (f(), u("div", D, [
|
|
91
|
+
t(q, w(L(e.$attrs)), {
|
|
92
|
+
default: l(() => [
|
|
93
|
+
s(e.$slots, "back", {}, () => [
|
|
94
|
+
t(p, {
|
|
94
95
|
is: "button",
|
|
95
96
|
class: "text-c-1 font-sidebar-active",
|
|
96
|
-
onClick:
|
|
97
|
+
onClick: a[0] || (a[0] = (G) => !e.controlled && (o.value = !1))
|
|
97
98
|
}, {
|
|
98
|
-
icon:
|
|
99
|
-
t(r(
|
|
99
|
+
icon: l(() => [
|
|
100
|
+
t(r(R), { class: "size-4 -m-px text-c-2" })
|
|
100
101
|
]),
|
|
101
|
-
default:
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
default: l(() => [
|
|
103
|
+
s(e.$slots, "back-label", {}, () => [
|
|
104
|
+
a[1] || (a[1] = M("Back", -1))
|
|
104
105
|
])
|
|
105
106
|
]),
|
|
106
107
|
_: 3
|
|
107
108
|
})
|
|
108
109
|
]),
|
|
109
|
-
t(
|
|
110
|
-
|
|
110
|
+
t(x, { class: "h-3" }),
|
|
111
|
+
s(e.$slots, "items")
|
|
111
112
|
]),
|
|
112
113
|
_: 3
|
|
113
114
|
}, 16)
|
|
114
|
-
])) :
|
|
115
|
+
])) : A("", !0)
|
|
115
116
|
]),
|
|
116
117
|
_: 3
|
|
117
118
|
})
|
|
@@ -119,5 +120,5 @@ const j = {
|
|
|
119
120
|
}
|
|
120
121
|
});
|
|
121
122
|
export {
|
|
122
|
-
|
|
123
|
+
te as default
|
|
123
124
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarSidebarSearchInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/ScalarSidebarSearchInput.vue"],"names":[],"mappings":"AA0EA,OAAO,EAAE,KAAK,YAAY,EAAiB,MAAM,kBAAkB,CAAA;AAEnE,KAAK,WAAW,GAAG;IACjB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,
|
|
1
|
+
{"version":3,"file":"ScalarSidebarSearchInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/ScalarSidebarSearchInput.vue"],"names":[],"mappings":"AA0EA,OAAO,EAAE,KAAK,YAAY,EAAiB,MAAM,kBAAkB,CAAA;AAEnE,KAAK,WAAW,GAAG;IACjB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAC;AAwBF,KAAK,iBAAiB,GAAG,WAAW,GAAG;IACvC,UAAU,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;;;;;;AA4HF,wBAOG"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as f, mergeModels as p, ref as m, useModel as b, onMounted as h, createElementBlock as
|
|
2
|
-
import { ScalarIconMagnifyingGlass as B, ScalarIconX as
|
|
3
|
-
import { useBindCx as
|
|
1
|
+
import { defineComponent as f, mergeModels as p, ref as m, useModel as b, onMounted as h, createElementBlock as v, openBlock as l, normalizeProps as g, guardReactiveProps as k, unref as e, createVNode as y, withDirectives as S, createBlock as n, createCommentVNode as x, createElementVNode as C, mergeProps as M, vModelText as V, withModifiers as z } from "vue";
|
|
2
|
+
import { ScalarIconMagnifyingGlass as B, ScalarIconX as A } from "@scalar/icons";
|
|
3
|
+
import { useBindCx as w } from "@scalar/use-hooks/useBindCx";
|
|
4
4
|
import E from "../ScalarLoading/ScalarLoading.vue.js";
|
|
5
5
|
import I from "../ScalarIconButton/ScalarIconButton.vue.js";
|
|
6
|
-
const N = ["aria-label"],
|
|
6
|
+
const N = ["aria-label"], G = /* @__PURE__ */ f({
|
|
7
7
|
inheritAttrs: !1,
|
|
8
8
|
__name: "ScalarSidebarSearchInput",
|
|
9
9
|
props: /* @__PURE__ */ p({
|
|
10
10
|
autofocus: { type: Boolean },
|
|
11
|
-
|
|
11
|
+
loader: {},
|
|
12
12
|
label: {}
|
|
13
13
|
}, {
|
|
14
14
|
modelValue: {},
|
|
@@ -20,19 +20,19 @@ const N = ["aria-label"], D = /* @__PURE__ */ f({
|
|
|
20
20
|
function i() {
|
|
21
21
|
a.value = "", o.value && o.value.focus();
|
|
22
22
|
}
|
|
23
|
-
const { stylingAttrsCx: c, otherAttrs: u } =
|
|
24
|
-
return h(() => t.autofocus && o.value?.focus()), (
|
|
23
|
+
const { stylingAttrsCx: c, otherAttrs: u } = w();
|
|
24
|
+
return h(() => t.autofocus && o.value?.focus()), (r, s) => (l(), v("label", g(k(
|
|
25
25
|
e(c)(
|
|
26
26
|
"flex items-center rounded border text-base has-[:focus-visible]:bg-b-1 has-[:focus-visible]:outline h-8 gap-1 pl-2 pr-1.5",
|
|
27
27
|
"bg-sidebar-b-search border-sidebar-border-search",
|
|
28
28
|
a.value ? "text-c-1" : "text-sidebar-c-search"
|
|
29
29
|
)
|
|
30
30
|
)), [
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
y(e(B), { class: "text-sidebar-c-search size-4" }),
|
|
32
|
+
S(C("input", M({
|
|
33
33
|
ref_key: "inputRef",
|
|
34
34
|
ref: o,
|
|
35
|
-
"aria-label":
|
|
35
|
+
"aria-label": r.label ?? "Enter search query",
|
|
36
36
|
autocapitalize: "off",
|
|
37
37
|
autocomplete: "off",
|
|
38
38
|
autocorrect: "off",
|
|
@@ -41,19 +41,19 @@ const N = ["aria-label"], D = /* @__PURE__ */ f({
|
|
|
41
41
|
spellcheck: "false",
|
|
42
42
|
type: "search"
|
|
43
43
|
}, e(u), {
|
|
44
|
-
"onUpdate:modelValue":
|
|
44
|
+
"onUpdate:modelValue": s[0] || (s[0] = (d) => a.value = d)
|
|
45
45
|
}), null, 16, N), [
|
|
46
46
|
[V, a.value]
|
|
47
47
|
]),
|
|
48
|
-
|
|
48
|
+
r.loader && r.loader.isActive ? (l(), n(e(E), {
|
|
49
49
|
key: 0,
|
|
50
50
|
class: "mr-3 self-center",
|
|
51
|
-
|
|
51
|
+
loader: r.loader,
|
|
52
52
|
size: "md"
|
|
53
|
-
}, null, 8, ["
|
|
53
|
+
}, null, 8, ["loader"])) : a.value ? (l(), n(e(I), {
|
|
54
54
|
key: 1,
|
|
55
55
|
class: "p-0.25 size-4",
|
|
56
|
-
icon: e(
|
|
56
|
+
icon: e(A),
|
|
57
57
|
weight: "bold",
|
|
58
58
|
label: "Clear Search",
|
|
59
59
|
onClick: z(i, ["stop", "prevent"])
|
|
@@ -62,5 +62,5 @@ const N = ["aria-label"], D = /* @__PURE__ */ f({
|
|
|
62
62
|
}
|
|
63
63
|
});
|
|
64
64
|
export {
|
|
65
|
-
|
|
65
|
+
G as default
|
|
66
66
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarSidebarSection.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/ScalarSidebarSection.vue"],"names":[],"mappings":"AA0FA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAIrD;;;;;;;;;;;;;;;;;GAiBG;;IAMD,qCAAqC;gBACzB,OAAO;IACnB,mCAAmC;cACzB,OAAO;;AARnB,
|
|
1
|
+
{"version":3,"file":"ScalarSidebarSection.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/ScalarSidebarSection.vue"],"names":[],"mappings":"AA0FA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAIrD;;;;;;;;;;;;;;;;;GAiBG;;IAMD,qCAAqC;gBACzB,OAAO;IACnB,mCAAmC;cACzB,OAAO;;AARnB,wBA2HC;AAOD,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|