@scalar/components 0.14.17 → 0.14.19
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/ScalarCard/ScalarCard.stories.d.ts +10 -0
- package/dist/components/ScalarCard/ScalarCard.stories.d.ts.map +1 -0
- package/dist/components/ScalarCard/ScalarCard.test.d.ts +2 -0
- package/dist/components/ScalarCard/ScalarCard.test.d.ts.map +1 -0
- package/dist/components/ScalarCard/ScalarCard.vue.d.ts +30 -0
- package/dist/components/ScalarCard/ScalarCard.vue.d.ts.map +1 -0
- package/dist/components/ScalarCard/ScalarCard.vue.js +25 -0
- package/dist/components/ScalarCard/ScalarCard.vue2.js +4 -0
- package/dist/components/ScalarCard/ScalarCardFooter.vue.d.ts +19 -0
- package/dist/components/ScalarCard/ScalarCardFooter.vue.d.ts.map +1 -0
- package/dist/components/ScalarCard/ScalarCardFooter.vue.js +20 -0
- package/dist/components/ScalarCard/ScalarCardFooter.vue2.js +4 -0
- package/dist/components/ScalarCard/ScalarCardHeader.vue.d.ts +22 -0
- package/dist/components/ScalarCard/ScalarCardHeader.vue.d.ts.map +1 -0
- package/dist/components/ScalarCard/ScalarCardHeader.vue.js +34 -0
- package/dist/components/ScalarCard/ScalarCardHeader.vue2.js +4 -0
- package/dist/components/ScalarCard/ScalarCardSection.vue.d.ts +22 -0
- package/dist/components/ScalarCard/ScalarCardSection.vue.d.ts.map +1 -0
- package/dist/components/ScalarCard/ScalarCardSection.vue.js +16 -0
- package/dist/components/ScalarCard/ScalarCardSection.vue2.js +4 -0
- package/dist/components/ScalarCard/index.d.ts +5 -0
- package/dist/components/ScalarCard/index.d.ts.map +1 -0
- package/dist/components/ScalarCard/useCardHeading.d.ts +21 -0
- package/dist/components/ScalarCard/useCardHeading.d.ts.map +1 -0
- package/dist/components/ScalarCard/useCardHeading.js +16 -0
- package/dist/components/ScalarColorModeToggle/ScalarColorModeToggleIcon.vue2.js +4 -3
- package/dist/components/ScalarCombobox/ScalarCombobox.vue.js +11 -11
- package/dist/components/ScalarCombobox/ScalarComboboxMultiselect.vue.d.ts +1 -1
- package/dist/components/ScalarCombobox/ScalarComboboxMultiselect.vue.d.ts.map +1 -1
- package/dist/components/ScalarCombobox/ScalarComboboxMultiselect.vue.js +12 -12
- package/dist/components/ScalarCombobox/ScalarComboboxPopover.vue.js +6 -6
- package/dist/components/ScalarDropdown/ScalarDropdown.vue.js +15 -15
- package/dist/components/ScalarFileUpload/ScalarFileUploadFileList.vue.js +7 -5
- package/dist/components/ScalarFileUpload/ScalarFileUploadInput.vue.js +2 -1
- package/dist/components/ScalarFloating/ScalarFloating.vue.js +20 -20
- package/dist/components/ScalarListbox/ScalarListbox.vue.js +15 -15
- package/dist/components/ScalarMarkdown/ScalarMarkdown.vue.d.ts.map +1 -1
- package/dist/components/ScalarMenu/ScalarMenuProducts.vue.js +6 -3
- package/dist/components/ScalarMenu/ScalarMenuResources.vue.js +8 -5
- package/dist/components/ScalarMenu/ScalarMenuTeamPicker.vue.js +7 -5
- package/dist/components/ScalarPopover/ScalarPopover.vue.js +11 -11
- package/dist/components/ScalarSearchInput/ScalarSearchInput.vue.d.ts.map +1 -1
- package/dist/components/ScalarSearchInput/ScalarSearchInput.vue.js +8 -6
- package/dist/components/ScalarSidebar/ScalarSidebarButton.vue.d.ts.map +1 -1
- package/dist/components/ScalarSidebar/ScalarSidebarButton.vue.js +19 -19
- package/dist/components/ScalarSidebar/ScalarSidebarGroup.vue.d.ts.map +1 -1
- package/dist/components/ScalarSidebar/ScalarSidebarGroup.vue.js +18 -16
- package/dist/components/ScalarSidebar/ScalarSidebarGroup.vue2.js +4 -0
- package/dist/components/ScalarSidebar/ScalarSidebarGroupToggle.vue.d.ts.map +1 -1
- package/dist/components/ScalarSidebar/ScalarSidebarGroupToggle.vue.js +26 -19
- package/dist/components/ScalarSidebar/ScalarSidebarItem.vue.js +9 -8
- package/dist/components/ScalarSidebar/types.d.ts +12 -1
- package/dist/components/ScalarSidebar/types.d.ts.map +1 -1
- package/dist/helpers/add-scalar-classes.d.ts +4 -2
- package/dist/helpers/add-scalar-classes.d.ts.map +1 -1
- package/dist/helpers/add-scalar-classes.js +13 -17
- package/dist/helpers/add-scalar-classes.test.d.ts +2 -0
- package/dist/helpers/add-scalar-classes.test.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +159 -152
- package/dist/style.css +1 -1
- package/package.json +8 -8
- package/dist/components/ScalarSidebar/ScalarSidebarGroup.vue3.js +0 -5
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as w, ref as d, computed as a, createElementBlock as z, openBlock as s, Fragment as S, createElementVNode as m, createBlock as $, createCommentVNode as
|
|
2
|
-
import { getSideAxis as
|
|
3
|
-
import { useFloating as x, autoUpdate as E, offset as
|
|
4
|
-
import { useResizeWithTarget as
|
|
5
|
-
import
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as w, ref as d, computed as a, createElementBlock as z, openBlock as s, Fragment as S, createElementVNode as m, createBlock as $, createCommentVNode as b, normalizeClass as k, renderSlot as u, unref as o, withCtx as B, normalizeStyle as R } from "vue";
|
|
2
|
+
import { getSideAxis as c } from "@floating-ui/utils";
|
|
3
|
+
import { useFloating as x, autoUpdate as E, offset as F, flip as C, shift as M, size as H } from "@floating-ui/vue";
|
|
4
|
+
import { useResizeWithTarget as N } from "./useResizeWithTarget.js";
|
|
5
|
+
import T from "../ScalarTeleport/ScalarTeleport.vue.js";
|
|
6
|
+
const D = /* @__PURE__ */ w({
|
|
7
7
|
inheritAttrs: !1,
|
|
8
8
|
__name: "ScalarFloating",
|
|
9
9
|
props: {
|
|
10
10
|
placement: { default: "bottom" },
|
|
11
|
-
offset: { default: 5 },
|
|
11
|
+
offset: { type: [Number, Object, Function], default: 5 },
|
|
12
12
|
resize: { type: Boolean, default: !1 },
|
|
13
13
|
target: {},
|
|
14
14
|
middleware: { default: () => [] },
|
|
@@ -27,18 +27,18 @@ const I = /* @__PURE__ */ w({
|
|
|
27
27
|
return t.target;
|
|
28
28
|
return ((e = n.value.children) == null ? void 0 : e[0]) || n.value;
|
|
29
29
|
}
|
|
30
|
-
}), f =
|
|
30
|
+
}), f = N(r, {
|
|
31
31
|
enabled: a(() => t.resize)
|
|
32
|
-
}),
|
|
33
|
-
() =>
|
|
32
|
+
}), g = a(
|
|
33
|
+
() => c(t.placement) === "y" ? f.width.value : void 0
|
|
34
34
|
), h = a(
|
|
35
|
-
() =>
|
|
35
|
+
() => c(t.placement) === "x" ? f.height.value : void 0
|
|
36
36
|
), { floatingStyles: p, middlewareData: y } = x(r, i, {
|
|
37
37
|
placement: a(() => t.placement),
|
|
38
38
|
whileElementsMounted: E,
|
|
39
39
|
middleware: a(() => [
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
F(t.offset),
|
|
41
|
+
C(),
|
|
42
42
|
M(),
|
|
43
43
|
H({
|
|
44
44
|
apply({ availableWidth: e, availableHeight: l, elements: v }) {
|
|
@@ -55,34 +55,34 @@ const I = /* @__PURE__ */ w({
|
|
|
55
55
|
m("div", {
|
|
56
56
|
ref_key: "wrapperRef",
|
|
57
57
|
ref: n,
|
|
58
|
-
class:
|
|
58
|
+
class: k({ contents: !!e.$slots.default })
|
|
59
59
|
}, [
|
|
60
60
|
u(e.$slots, "default")
|
|
61
61
|
], 2),
|
|
62
|
-
e.$slots.floating ? (s(), $(o(
|
|
62
|
+
e.$slots.floating ? (s(), $(o(T), {
|
|
63
63
|
key: 0,
|
|
64
64
|
disabled: !e.teleport,
|
|
65
65
|
to: typeof e.teleport == "string" ? e.teleport : void 0
|
|
66
66
|
}, {
|
|
67
|
-
default:
|
|
67
|
+
default: B(() => [
|
|
68
68
|
m("div", {
|
|
69
69
|
ref_key: "floatingRef",
|
|
70
70
|
ref: i,
|
|
71
71
|
class: "relative z-context",
|
|
72
|
-
style:
|
|
72
|
+
style: R(o(p))
|
|
73
73
|
}, [
|
|
74
74
|
u(e.$slots, "floating", {
|
|
75
75
|
data: o(y),
|
|
76
76
|
height: h.value,
|
|
77
|
-
width:
|
|
77
|
+
width: g.value
|
|
78
78
|
})
|
|
79
79
|
], 4)
|
|
80
80
|
]),
|
|
81
81
|
_: 3
|
|
82
|
-
}, 8, ["disabled", "to"])) :
|
|
82
|
+
}, 8, ["disabled", "to"])) : b("", !0)
|
|
83
83
|
], 64));
|
|
84
84
|
}
|
|
85
85
|
});
|
|
86
86
|
export {
|
|
87
|
-
|
|
87
|
+
D as default
|
|
88
88
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as c, createBlock as i, openBlock as o, unref as t, withCtx as l, createCommentVNode as
|
|
1
|
+
import { defineComponent as c, createBlock as i, openBlock as o, unref as t, withCtx as l, createCommentVNode as s, createVNode as r, createTextVNode as b, toDisplayString as y, mergeProps as p, renderSlot as V, createElementBlock as d, createElementVNode as B, Fragment as _, renderList as g, normalizeStyle as k } from "vue";
|
|
2
2
|
import { Listbox as x, ListboxLabel as L, ListboxButton as h, ListboxOptions as $ } from "@headlessui/vue";
|
|
3
|
-
import { useBindCx as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
3
|
+
import { useBindCx as N } from "@scalar/use-hooks/useBindCx";
|
|
4
|
+
import S from "./ScalarListboxItem.vue.js";
|
|
5
|
+
import C from "../ScalarFloating/ScalarFloating.vue.js";
|
|
6
6
|
import v from "../ScalarFloating/ScalarFloatingBackdrop.vue.js";
|
|
7
|
-
const w = { class: "custom-scroll min-h-0 flex-1" },
|
|
7
|
+
const w = { class: "custom-scroll min-h-0 flex-1" }, P = /* @__PURE__ */ c({
|
|
8
8
|
inheritAttrs: !1,
|
|
9
9
|
__name: "ScalarListbox",
|
|
10
10
|
props: {
|
|
@@ -14,7 +14,7 @@ const w = { class: "custom-scroll min-h-0 flex-1" }, T = /* @__PURE__ */ c({
|
|
|
14
14
|
multiple: { type: Boolean },
|
|
15
15
|
modelValue: {},
|
|
16
16
|
placement: {},
|
|
17
|
-
offset: {},
|
|
17
|
+
offset: { type: [Number, Object, Function] },
|
|
18
18
|
resize: { type: Boolean },
|
|
19
19
|
target: {},
|
|
20
20
|
middleware: {},
|
|
@@ -22,7 +22,7 @@ const w = { class: "custom-scroll min-h-0 flex-1" }, T = /* @__PURE__ */ c({
|
|
|
22
22
|
},
|
|
23
23
|
emits: ["update:modelValue"],
|
|
24
24
|
setup(z) {
|
|
25
|
-
const { cx: u } =
|
|
25
|
+
const { cx: u } = N();
|
|
26
26
|
return (e, m) => (o(), i(t(x), {
|
|
27
27
|
modelValue: e.modelValue,
|
|
28
28
|
multiple: e.multiple,
|
|
@@ -34,11 +34,11 @@ const w = { class: "custom-scroll min-h-0 flex-1" }, T = /* @__PURE__ */ c({
|
|
|
34
34
|
class: "sr-only"
|
|
35
35
|
}, {
|
|
36
36
|
default: l(() => [
|
|
37
|
-
y(
|
|
37
|
+
b(y(e.label), 1)
|
|
38
38
|
]),
|
|
39
39
|
_: 1
|
|
40
|
-
})) :
|
|
41
|
-
r(t(
|
|
40
|
+
})) : s("", !0),
|
|
41
|
+
r(t(C), p(e.$props, {
|
|
42
42
|
placement: e.placement ?? "bottom-start"
|
|
43
43
|
}), {
|
|
44
44
|
floating: l(({ width: f }) => [
|
|
@@ -49,9 +49,9 @@ const w = { class: "custom-scroll min-h-0 flex-1" }, T = /* @__PURE__ */ c({
|
|
|
49
49
|
B("div", w, [
|
|
50
50
|
r(t($), { class: "flex flex-col gap-0.75 p-0.75 -outline-offset-1" }, {
|
|
51
51
|
default: l(() => [
|
|
52
|
-
(o(!0), d(_, null, g(e.options, (
|
|
53
|
-
key:
|
|
54
|
-
option:
|
|
52
|
+
(o(!0), d(_, null, g(e.options, (n) => (o(), i(S, {
|
|
53
|
+
key: n.id,
|
|
54
|
+
option: n,
|
|
55
55
|
style: k(e.multiple ? "checkbox" : "radio")
|
|
56
56
|
}, null, 8, ["option", "style"]))), 128))
|
|
57
57
|
]),
|
|
@@ -59,7 +59,7 @@ const w = { class: "custom-scroll min-h-0 flex-1" }, T = /* @__PURE__ */ c({
|
|
|
59
59
|
})
|
|
60
60
|
]),
|
|
61
61
|
r(t(v))
|
|
62
|
-
], 16)) :
|
|
62
|
+
], 16)) : s("", !0)
|
|
63
63
|
]),
|
|
64
64
|
default: l(() => [
|
|
65
65
|
r(t(h), {
|
|
@@ -80,5 +80,5 @@ const w = { class: "custom-scroll min-h-0 flex-1" }, T = /* @__PURE__ */ c({
|
|
|
80
80
|
}
|
|
81
81
|
});
|
|
82
82
|
export {
|
|
83
|
-
|
|
83
|
+
P as default
|
|
84
84
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarMarkdown.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarMarkdown/ScalarMarkdown.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScalarMarkdown.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarMarkdown/ScalarMarkdown.vue"],"names":[],"mappings":"AAirBA,KAAK,WAAW,GAAG;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC9D,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACxB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAC;;gBAPa,OAAO;iBAKN,OAAO;;AAsHzB,wBAQG"}
|
|
@@ -24,7 +24,8 @@ const w = /* @__PURE__ */ p({
|
|
|
24
24
|
default: n(() => e[3] || (e[3] = [
|
|
25
25
|
l(" Dashboard ")
|
|
26
26
|
])),
|
|
27
|
-
_: 1
|
|
27
|
+
_: 1,
|
|
28
|
+
__: [3]
|
|
28
29
|
}, 8, ["href", "icon", "selected"]),
|
|
29
30
|
t(d, {
|
|
30
31
|
href: ((a = o.hrefs) == null ? void 0 : a.docs) ?? "https://docs.scalar.com",
|
|
@@ -35,7 +36,8 @@ const w = /* @__PURE__ */ p({
|
|
|
35
36
|
default: n(() => e[4] || (e[4] = [
|
|
36
37
|
l(" Docs ")
|
|
37
38
|
])),
|
|
38
|
-
_: 1
|
|
39
|
+
_: 1,
|
|
40
|
+
__: [4]
|
|
39
41
|
}, 8, ["href", "icon", "selected"]),
|
|
40
42
|
t(d, {
|
|
41
43
|
href: ((f = o.hrefs) == null ? void 0 : f.client) ?? "https://client.scalar.com",
|
|
@@ -46,7 +48,8 @@ const w = /* @__PURE__ */ p({
|
|
|
46
48
|
default: n(() => e[5] || (e[5] = [
|
|
47
49
|
l(" Client ")
|
|
48
50
|
])),
|
|
49
|
-
_: 1
|
|
51
|
+
_: 1,
|
|
52
|
+
__: [5]
|
|
50
53
|
}, 8, ["href", "icon", "selected"])
|
|
51
54
|
], 16);
|
|
52
55
|
};
|
|
@@ -4,8 +4,8 @@ import a from "./ScalarMenuLink.vue.js";
|
|
|
4
4
|
import f from "./ScalarMenuSection.vue.js";
|
|
5
5
|
const y = /* @__PURE__ */ i({
|
|
6
6
|
__name: "ScalarMenuResources",
|
|
7
|
-
setup(
|
|
8
|
-
return (
|
|
7
|
+
setup(_) {
|
|
8
|
+
return (u, o) => (c(), l(f, null, {
|
|
9
9
|
title: t(() => o[0] || (o[0] = [
|
|
10
10
|
e("Resources")
|
|
11
11
|
])),
|
|
@@ -18,7 +18,8 @@ const y = /* @__PURE__ */ i({
|
|
|
18
18
|
default: t(() => o[1] || (o[1] = [
|
|
19
19
|
e(" Sales & Support ")
|
|
20
20
|
])),
|
|
21
|
-
_: 1
|
|
21
|
+
_: 1,
|
|
22
|
+
__: [1]
|
|
22
23
|
}, 8, ["icon"]),
|
|
23
24
|
r(a, {
|
|
24
25
|
href: "https://scalar.com/terms-and-conditions",
|
|
@@ -28,7 +29,8 @@ const y = /* @__PURE__ */ i({
|
|
|
28
29
|
default: t(() => o[2] || (o[2] = [
|
|
29
30
|
e(" Terms & Conditions ")
|
|
30
31
|
])),
|
|
31
|
-
_: 1
|
|
32
|
+
_: 1,
|
|
33
|
+
__: [2]
|
|
32
34
|
}, 8, ["icon"]),
|
|
33
35
|
r(a, {
|
|
34
36
|
href: "https://scalar.com/privacy-policy",
|
|
@@ -38,7 +40,8 @@ const y = /* @__PURE__ */ i({
|
|
|
38
40
|
default: t(() => o[3] || (o[3] = [
|
|
39
41
|
e(" Privacy Policy ")
|
|
40
42
|
])),
|
|
41
|
-
_: 1
|
|
43
|
+
_: 1,
|
|
44
|
+
__: [3]
|
|
42
45
|
}, 8, ["icon"])
|
|
43
46
|
]),
|
|
44
47
|
_: 1
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as _, computed as g, createBlock as u, openBlock as n, unref as e, withCtx as r, createVNode as a, mergeProps as b, createElementVNode as S, createElementBlock as w, Fragment as x, renderList as v, createTextVNode as C } from "vue";
|
|
2
2
|
import { ScalarIconUserSwitch as k, ScalarIconCaretRight as V, ScalarIconPlus as $ } from "@scalar/icons";
|
|
3
3
|
import { DropdownMenu as s } from "radix-vue/namespaced";
|
|
4
4
|
import I from "./ScalarMenuTeamProfile.vue.js";
|
|
@@ -6,7 +6,7 @@ import B from "./ScalarMenuLink.vue.js";
|
|
|
6
6
|
import P from "../ScalarDropdown/ScalarDropdownMenu.vue.js";
|
|
7
7
|
import c from "../ScalarDropdown/ScalarDropdownButton.vue.js";
|
|
8
8
|
import z from "../ScalarListbox/ScalarListboxCheckbox.vue.js";
|
|
9
|
-
const y = /* @__PURE__ */
|
|
9
|
+
const y = /* @__PURE__ */ _({
|
|
10
10
|
inheritAttrs: !1,
|
|
11
11
|
__name: "ScalarMenuTeamPicker",
|
|
12
12
|
props: {
|
|
@@ -15,7 +15,7 @@ const y = /* @__PURE__ */ g({
|
|
|
15
15
|
},
|
|
16
16
|
emits: ["update:team", "add"],
|
|
17
17
|
setup(p, { emit: f }) {
|
|
18
|
-
const i = p, d = f, m =
|
|
18
|
+
const i = p, d = f, m = g({
|
|
19
19
|
get: () => {
|
|
20
20
|
var o;
|
|
21
21
|
return (o = i.team) == null ? void 0 : o.id;
|
|
@@ -38,7 +38,8 @@ const y = /* @__PURE__ */ g({
|
|
|
38
38
|
weight: "bold"
|
|
39
39
|
})
|
|
40
40
|
]),
|
|
41
|
-
_: 1
|
|
41
|
+
_: 1,
|
|
42
|
+
__: [2]
|
|
42
43
|
}, 16, ["is", "icon"]),
|
|
43
44
|
a(e(s).Portal, null, {
|
|
44
45
|
default: r(() => [
|
|
@@ -87,7 +88,8 @@ const y = /* @__PURE__ */ g({
|
|
|
87
88
|
}),
|
|
88
89
|
t[3] || (t[3] = C(" Create new team "))
|
|
89
90
|
]),
|
|
90
|
-
_: 1
|
|
91
|
+
_: 1,
|
|
92
|
+
__: [3]
|
|
91
93
|
}, 8, ["as"])
|
|
92
94
|
]),
|
|
93
95
|
_: 1
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { defineComponent as m, createBlock as i, openBlock as c, unref as e, withCtx as t, createVNode as r, normalizeProps as u, guardReactiveProps as d, renderSlot as s, mergeProps as _ } from "vue";
|
|
2
2
|
import { Popover as P, PopoverButton as v, PopoverPanel as B } from "@headlessui/vue";
|
|
3
|
-
import { useBindCx as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
const
|
|
3
|
+
import { useBindCx as y } from "@scalar/use-hooks/useBindCx";
|
|
4
|
+
import $ from "../ScalarFloating/ScalarFloating.vue.js";
|
|
5
|
+
import g from "../ScalarFloating/ScalarFloatingBackdrop.vue.js";
|
|
6
|
+
const z = /* @__PURE__ */ m({
|
|
7
7
|
inheritAttrs: !1,
|
|
8
8
|
__name: "ScalarPopover",
|
|
9
9
|
props: {
|
|
10
10
|
focus: { type: Boolean },
|
|
11
11
|
placement: {},
|
|
12
|
-
offset: {},
|
|
12
|
+
offset: { type: [Number, Object, Function] },
|
|
13
13
|
resize: { type: Boolean },
|
|
14
14
|
target: {},
|
|
15
15
|
middleware: {},
|
|
16
16
|
teleport: { type: [Boolean, String] }
|
|
17
17
|
},
|
|
18
|
-
setup(
|
|
19
|
-
const { cx: l } =
|
|
20
|
-
return (o,
|
|
18
|
+
setup(b) {
|
|
19
|
+
const { cx: l } = y();
|
|
20
|
+
return (o, h) => (c(), i(e(P), { as: "template" }, {
|
|
21
21
|
default: t(({ open: a }) => [
|
|
22
|
-
r(e(
|
|
22
|
+
r(e($), u(d(o.$props)), {
|
|
23
23
|
floating: t(({ width: p, height: f }) => [
|
|
24
24
|
r(e(B), _({
|
|
25
25
|
focus: o.focus,
|
|
@@ -31,7 +31,7 @@ const b = /* @__PURE__ */ m({
|
|
|
31
31
|
open: a
|
|
32
32
|
}),
|
|
33
33
|
s(o.$slots, "backdrop", { open: a }, () => [
|
|
34
|
-
r(e(
|
|
34
|
+
r(e(g))
|
|
35
35
|
])
|
|
36
36
|
]),
|
|
37
37
|
_: 2
|
|
@@ -53,5 +53,5 @@ const b = /* @__PURE__ */ m({
|
|
|
53
53
|
}
|
|
54
54
|
});
|
|
55
55
|
export {
|
|
56
|
-
|
|
56
|
+
z as default
|
|
57
57
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarSearchInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSearchInput/ScalarSearchInput.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScalarSearchInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSearchInput/ScalarSearchInput.vue"],"names":[],"mappings":"AAoFA,OAAO,EAAE,KAAK,YAAY,EAAiB,MAAM,kBAAkB,CAAA;AAInE;;;;;;;;;;;GAWG;;iBAgCU,MAAM;;cA5BP,YAAY;YACd,MAAM;;;;iBA2BH,MAAM;;cA5BP,YAAY;YACd,MAAM;;;;AAJhB,wBA6JC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as p, mergeModels as f, useModel as m, ref as g, createElementBlock as h, openBlock as t, normalizeProps as v, guardReactiveProps as b, unref as e, createVNode as k, withDirectives as _, createBlock as n, createCommentVNode as C, createElementVNode as S, mergeProps as y, vModelText as V, withModifiers as M } from "vue";
|
|
2
2
|
import { ScalarIconMagnifyingGlass as x } from "@scalar/icons";
|
|
3
3
|
import { useBindCx as z } from "@scalar/use-hooks/useBindCx";
|
|
4
4
|
import B from "../ScalarLoading/ScalarLoading.vue.js";
|
|
5
5
|
import E from "../ScalarIconButton/ScalarIconButton.vue.js";
|
|
6
|
-
const N = ["aria-label"], P = {}, q = /* @__PURE__ */
|
|
6
|
+
const N = ["aria-label"], P = {}, q = /* @__PURE__ */ p({
|
|
7
7
|
...P,
|
|
8
8
|
inheritAttrs: !1,
|
|
9
9
|
__name: "ScalarSearchInput",
|
|
10
|
-
props: /* @__PURE__ */
|
|
10
|
+
props: /* @__PURE__ */ f({
|
|
11
11
|
loading: {},
|
|
12
12
|
label: {}
|
|
13
13
|
}, {
|
|
@@ -22,10 +22,12 @@ const N = ["aria-label"], P = {}, q = /* @__PURE__ */ f({
|
|
|
22
22
|
}
|
|
23
23
|
const { classCx: c, otherAttrs: d } = z();
|
|
24
24
|
return (l, r) => (t(), h("label", v(b(
|
|
25
|
-
e(c)(
|
|
25
|
+
e(c)(
|
|
26
|
+
"flex items-center text-lg font-medium h-10 pl-3 pr-1 py-2 gap-2.25"
|
|
27
|
+
)
|
|
26
28
|
)), [
|
|
27
29
|
k(e(x), { class: "text-sidebar-c-search size-4" }),
|
|
28
|
-
_(S("input",
|
|
30
|
+
_(S("input", y({
|
|
29
31
|
ref_key: "inputRef",
|
|
30
32
|
ref: o,
|
|
31
33
|
"aria-label": l.label ?? "Enter search query",
|
|
@@ -39,7 +41,7 @@ const N = ["aria-label"], P = {}, q = /* @__PURE__ */ f({
|
|
|
39
41
|
}, e(d), {
|
|
40
42
|
"onUpdate:modelValue": r[0] || (r[0] = (u) => a.value = u)
|
|
41
43
|
}), null, 16, N), [
|
|
42
|
-
[
|
|
44
|
+
[V, a.value]
|
|
43
45
|
]),
|
|
44
46
|
l.loading && l.loading.isLoading ? (t(), n(e(B), {
|
|
45
47
|
key: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarSidebarButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/ScalarSidebarButton.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScalarSidebarButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/ScalarSidebarButton.vue"],"names":[],"mappings":"AA4FA,OAAO,KAAK,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAI7E;;;;;;;;;;;;;;;;;;;;;GAqBG;;AACH,wBAoIC;AAWD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as r, createBlock as
|
|
1
|
+
import { defineComponent as r, createBlock as i, openBlock as t, resolveDynamicComponent as c, mergeProps as u, unref as a, withCtx as f, renderSlot as s, createElementVNode as p, createElementBlock as n, createCommentVNode as o, createVNode as m } from "vue";
|
|
2
2
|
import { cva as b, useBindCx as v } from "@scalar/use-hooks/useBindCx";
|
|
3
3
|
import y from "./ScalarSidebarIndent.vue.js";
|
|
4
4
|
import h from "../ScalarIcon/ScalarIconLegacyAdapter.vue.js";
|
|
5
|
-
const
|
|
5
|
+
const B = { class: "flex items-center gap-1 flex-1 py-2 leading-5" }, $ = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "size-4"
|
|
8
|
-
},
|
|
8
|
+
}, g = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "flex items-center"
|
|
11
11
|
}, k = {}, w = /* @__PURE__ */ r({
|
|
@@ -15,30 +15,30 @@ const g = { class: "flex items-center gap-1 flex-1 py-2 leading-5" }, B = {
|
|
|
15
15
|
props: {
|
|
16
16
|
is: { default: "a" },
|
|
17
17
|
icon: {},
|
|
18
|
+
active: { type: Boolean },
|
|
18
19
|
selected: { type: Boolean },
|
|
19
20
|
disabled: { type: Boolean },
|
|
20
21
|
indent: { default: 0 }
|
|
21
22
|
},
|
|
22
23
|
setup(C) {
|
|
23
|
-
const
|
|
24
|
+
const d = b({
|
|
24
25
|
base: [
|
|
25
26
|
"group/button flex items-stretch rounded px-2 font-sidebar text-c-2 no-underline"
|
|
26
27
|
],
|
|
27
28
|
variants: {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
disabled: { true: "cursor-auto" }
|
|
29
|
+
active: { true: "text-c-1 font-sidebar-active" },
|
|
30
|
+
disabled: { true: "cursor-auto" },
|
|
31
|
+
selected: { true: "cursor-auto bg-b-2 text-c-1 font-sidebar-active" }
|
|
32
32
|
},
|
|
33
33
|
compoundVariants: [
|
|
34
34
|
{ selected: !1, disabled: !1, class: "hover:bg-b-2" }
|
|
35
35
|
],
|
|
36
|
-
defaultVariants: { selected: !1, disabled: !1 }
|
|
37
|
-
}), { cx:
|
|
38
|
-
return (e, S) => (t(),
|
|
36
|
+
defaultVariants: { selected: !1, disabled: !1, active: !1 }
|
|
37
|
+
}), { cx: l } = v();
|
|
38
|
+
return (e, S) => (t(), i(c(e.is), u({
|
|
39
39
|
"aria-selected": e.selected,
|
|
40
40
|
type: e.is === "button" ? "button" : void 0
|
|
41
|
-
},
|
|
41
|
+
}, a(l)(a(d)({ selected: e.selected, disabled: e.disabled, active: e.active }))), {
|
|
42
42
|
default: f(() => [
|
|
43
43
|
s(e.$slots, "indent", {}, () => [
|
|
44
44
|
m(y, {
|
|
@@ -47,20 +47,20 @@ const g = { class: "flex items-center gap-1 flex-1 py-2 leading-5" }, B = {
|
|
|
47
47
|
disabled: e.disabled
|
|
48
48
|
}, null, 8, ["indent", "selected", "disabled"])
|
|
49
49
|
]),
|
|
50
|
-
p("div",
|
|
51
|
-
e.icon || e.$slots.icon ? (t(),
|
|
50
|
+
p("div", B, [
|
|
51
|
+
e.icon || e.$slots.icon ? (t(), n("div", $, [
|
|
52
52
|
s(e.$slots, "icon", {}, () => [
|
|
53
|
-
e.icon ? (t(), a(
|
|
53
|
+
e.icon ? (t(), i(a(h), {
|
|
54
54
|
key: 0,
|
|
55
55
|
icon: e.icon
|
|
56
|
-
}, null, 8, ["icon"])) :
|
|
56
|
+
}, null, 8, ["icon"])) : o("", !0)
|
|
57
57
|
])
|
|
58
|
-
])) :
|
|
58
|
+
])) : o("", !0),
|
|
59
59
|
s(e.$slots, "default")
|
|
60
60
|
]),
|
|
61
|
-
e.$slots.aside ? (t(),
|
|
61
|
+
e.$slots.aside ? (t(), n("div", g, [
|
|
62
62
|
s(e.$slots, "aside")
|
|
63
|
-
])) :
|
|
63
|
+
])) : o("", !0)
|
|
64
64
|
]),
|
|
65
65
|
_: 3
|
|
66
66
|
}, 16, ["aria-selected", "type"]));
|
|
@@ -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":"AAsFA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAA;AAM9E,OAAO,EAAE,KAAK,iBAAiB,EAAoB,MAAM,oBAAoB,CAAA;AAI7E;;;;;;;;;;;;;;GAcG;;iBAgCU,OAAO;;;;iBAAP,OAAO;;;;IAtBlB,qCAAqC;oBACrB;QAAE,IAAI,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO;IAC3C,wCAAwC;mBACzB;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,KAAK,EAAE,iBAAiB,CAAA;KAAE,GAAG,OAAO;IACpE,mCAAmC;kBACrB;QAAE,IAAI,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO;;IALzC,qCAAqC;oBACrB;QAAE,IAAI,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO;IAC3C,wCAAwC;mBACzB;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,KAAK,EAAE,iBAAiB,CAAA;KAAE,GAAG,OAAO;IACpE,mCAAmC;kBACrB;QAAE,IAAI,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO;;AAd3C,wBA+JC;AAWD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useBindCx as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { useSidebarGroups as
|
|
7
|
-
const V = { class: "group/item contents" }, x = {}, A = /* @__PURE__ */
|
|
1
|
+
import { defineComponent as p, mergeModels as m, useModel as c, createElementBlock as f, openBlock as r, renderSlot as a, createBlock as v, createCommentVNode as b, unref as t, createVNode as s, withCtx as l, resolveDynamicComponent as B, normalizeProps as _, mergeProps as g } from "vue";
|
|
2
|
+
import { useBindCx as y } from "@scalar/use-hooks/useBindCx";
|
|
3
|
+
import C from "./ScalarSidebarButton.vue.js";
|
|
4
|
+
import S from "./ScalarSidebarGroupToggle.vue.js";
|
|
5
|
+
import $ from "./ScalarSidebarIndent.vue.js";
|
|
6
|
+
import { useSidebarGroups as k } from "./useSidebarGroups.js";
|
|
7
|
+
const V = { class: "group/item contents" }, x = {}, A = /* @__PURE__ */ p({
|
|
8
8
|
...x,
|
|
9
9
|
inheritAttrs: !1,
|
|
10
10
|
__name: "ScalarSidebarGroup",
|
|
11
|
-
props: /* @__PURE__ */
|
|
11
|
+
props: /* @__PURE__ */ m({
|
|
12
12
|
is: { default: "ul" },
|
|
13
13
|
icon: {},
|
|
14
|
+
active: { type: Boolean },
|
|
14
15
|
selected: { type: Boolean },
|
|
15
16
|
disabled: { type: Boolean },
|
|
16
17
|
indent: {}
|
|
@@ -20,30 +21,31 @@ const V = { class: "group/item contents" }, x = {}, A = /* @__PURE__ */ m({
|
|
|
20
21
|
}),
|
|
21
22
|
emits: ["update:modelValue"],
|
|
22
23
|
setup(d) {
|
|
23
|
-
const e = c(d, "modelValue"), { level: n } =
|
|
24
|
-
return (o,
|
|
24
|
+
const e = c(d, "modelValue"), { level: n } = k({ increment: !0 }), { cx: u } = y();
|
|
25
|
+
return (o, i) => (r(), f("li", V, [
|
|
25
26
|
a(o.$slots, "button", {
|
|
26
27
|
level: t(n),
|
|
27
28
|
open: !!e.value
|
|
28
29
|
}, () => [
|
|
29
|
-
s(
|
|
30
|
+
s(C, {
|
|
30
31
|
is: "button",
|
|
31
32
|
class: "group/group-button",
|
|
32
33
|
"aria-expanded": e.value,
|
|
33
34
|
indent: t(n),
|
|
35
|
+
active: o.active,
|
|
34
36
|
selected: o.selected,
|
|
35
37
|
disabled: o.disabled,
|
|
36
38
|
icon: o.icon,
|
|
37
|
-
onClick:
|
|
39
|
+
onClick: i[0] || (i[0] = (M) => e.value = !e.value)
|
|
38
40
|
}, {
|
|
39
41
|
indent: l(() => [
|
|
40
|
-
s(
|
|
42
|
+
s($, {
|
|
41
43
|
class: "mr-0",
|
|
42
44
|
indent: t(n)
|
|
43
45
|
}, null, 8, ["indent"])
|
|
44
46
|
]),
|
|
45
47
|
icon: l(() => [
|
|
46
|
-
s(
|
|
48
|
+
s(S, {
|
|
47
49
|
class: "text-c-3",
|
|
48
50
|
open: e.value
|
|
49
51
|
}, null, 8, ["open"])
|
|
@@ -54,9 +56,9 @@ const V = { class: "group/item contents" }, x = {}, A = /* @__PURE__ */ m({
|
|
|
54
56
|
})
|
|
55
57
|
]),
|
|
56
58
|
_: 3
|
|
57
|
-
}, 8, ["aria-expanded", "indent", "selected", "disabled", "icon"])
|
|
59
|
+
}, 8, ["aria-expanded", "indent", "active", "selected", "disabled", "icon"])
|
|
58
60
|
]),
|
|
59
|
-
e.value ? (
|
|
61
|
+
e.value ? (r(), v(B(o.is), _(g({ key: 0 }, t(u)("group/items flex flex-col gap-px"))), {
|
|
60
62
|
default: l(() => [
|
|
61
63
|
a(o.$slots, "items", {
|
|
62
64
|
open: !!e.value
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarSidebarGroupToggle.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/ScalarSidebarGroupToggle.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScalarSidebarGroupToggle.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/ScalarSidebarGroupToggle.vue"],"names":[],"mappings":"AAsEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAG9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAEpC,OAAO,EAAE,KAAK,IAAI,EAA2B,MAAM,eAAe,CAAA;AAIlE;;;;;;;GAOG;;IAID,+BAA+B;SAC1B,SAAS,GAAG,MAAM;IACvB,wCAAwC;WACjC,OAAO;IACd,yBAAyB;WAClB,IAAI,GAAG,mBAAmB;;IALjC,+BAA+B;SAC1B,SAAS,GAAG,MAAM;IACvB,wCAAwC;WACjC,OAAO;IACd,yBAAyB;WAClB,IAAI,GAAG,mBAAmB;;IAMjC,+BAA+B;oBACf;QAAE,IAAI,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO;IAC3C,uCAAuC;kBACzB;QAAE,IAAI,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO;;IAHzC,+BAA+B;oBACf;QAAE,IAAI,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO;IAC3C,uCAAuC;kBACzB;QAAE,IAAI,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO;;AAjB3C,wBAwHC;AAWD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|