@scalar/components 0.15.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ScalarButton/ScalarButton.vue.js +5 -5
- package/dist/components/ScalarCard/ScalarCard.vue.d.ts.map +1 -1
- package/dist/components/ScalarCard/ScalarCard.vue.js +11 -11
- package/dist/components/ScalarCheckboxInput/ScalarCheckboxInput.vue.js +11 -11
- package/dist/components/ScalarCodeBlock/ScalarCodeBlock.vue.d.ts +24 -10
- package/dist/components/ScalarCodeBlock/ScalarCodeBlock.vue.d.ts.map +1 -1
- package/dist/components/ScalarCodeBlock/ScalarCodeBlock.vue.js +23 -20
- package/dist/components/ScalarColorModeToggle/ScalarColorModeToggleIcon.vue2.js +5 -6
- package/dist/components/ScalarCombobox/ScalarComboboxOptions.vue.js +28 -28
- package/dist/components/ScalarDropdown/ScalarDropdownItem.vue2.js +2 -2
- package/dist/components/ScalarFileUpload/ScalarFileUploadDropTarget.vue.js +1 -1
- package/dist/components/ScalarFileUpload/ScalarFileUploadFileList.vue.js +8 -10
- package/dist/components/ScalarFileUpload/ScalarFileUploadInput.vue.js +4 -5
- package/dist/components/ScalarIcon/ScalarIconLegacyAdapter.vue.js +3 -3
- package/dist/components/ScalarIcon/icons/Add.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/AddTab.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Alert.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/ArrowLeft.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/ArrowRight.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Brackets.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Branch.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Changelog.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Checkmark.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/ChevronDown.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/ChevronLeft.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/ChevronRight.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/ChevronUp.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Clipboard.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Close.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/CloseTab.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/CloseTabs.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Cloud.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/CodeFolder.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Cog.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Collection.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Cookie.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/DarkMode.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Delete.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Discord.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/DocsPage.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Download.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Duplicate.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Edit.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Ellipses.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Email.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Error.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Example.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/ExternalLink.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/FilterList.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Folder.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/GitHub.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/GitHubLine.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Globe.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Google.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Help.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Hide.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/History.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/House.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Import.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Info.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Key.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Leave.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/LightDarkModeToggle.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/LightMode.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Link.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Lock.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Logo.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Magic.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Markdown.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Menu.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/NotAllowed.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Page.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Pencil.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Play.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Refresh.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Roadmap.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Scribble.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Search.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Server.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Settings.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Show.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Sort.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Terminal.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Trash.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Unlock.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Unwatch.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Upload.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/User.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/UserSwitch.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Users.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Versions.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Wallet.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Watch.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/Workspace.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/programming-framework-angular.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/programming-framework-astro.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/programming-framework-laravel.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/programming-framework-nextdotjs.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/programming-framework-react.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/programming-framework-vuedotjs.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/programming-language-c.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/programming-language-clojure.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/programming-language-csharp.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/programming-language-css3.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/programming-language-dart.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/programming-language-fsharp.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/programming-language-go.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/programming-language-html5.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/programming-language-http.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/programming-language-java.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/programming-language-javascript.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/programming-language-json.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/programming-language-kotlin.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/programming-language-node.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/programming-language-objc.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/programming-language-ocaml.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/programming-language-php.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/programming-language-powershell.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/programming-language-python.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/programming-language-r.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/programming-language-ruby.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/programming-language-rust.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/programming-language-scala.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/programming-language-shell.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/programming-language-swift.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/programming-language-typescript.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/programming-script-code.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/programming-tool-git.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/programming-tool-tailwindcss.svg.js +2 -2
- package/dist/components/ScalarIcon/logos/Adonisjs.svg.js +2 -2
- package/dist/components/ScalarIcon/logos/Docusaurus.svg.js +2 -2
- package/dist/components/ScalarIcon/logos/Dotnet.svg.js +2 -2
- package/dist/components/ScalarIcon/logos/Elysiajs.svg.js +2 -2
- package/dist/components/ScalarIcon/logos/Express.svg.js +2 -2
- package/dist/components/ScalarIcon/logos/Fastapi.svg.js +2 -2
- package/dist/components/ScalarIcon/logos/Fastify.svg.js +2 -2
- package/dist/components/ScalarIcon/logos/Go.svg.js +2 -2
- package/dist/components/ScalarIcon/logos/Hono.svg.js +2 -2
- package/dist/components/ScalarIcon/logos/Laravel.svg.js +2 -2
- package/dist/components/ScalarIcon/logos/Litestar.svg.js +2 -2
- package/dist/components/ScalarIcon/logos/Nestjs.svg.js +2 -2
- package/dist/components/ScalarIcon/logos/Nextjs.svg.js +2 -2
- package/dist/components/ScalarIcon/logos/Nitro.svg.js +2 -2
- package/dist/components/ScalarIcon/logos/Nuxt.svg.js +2 -2
- package/dist/components/ScalarIcon/logos/Openapi.svg.js +2 -2
- package/dist/components/ScalarIcon/logos/Platformatic.svg.js +2 -2
- package/dist/components/ScalarIcon/logos/React.svg.js +2 -2
- package/dist/components/ScalarIcon/logos/Rust.svg.js +2 -2
- package/dist/components/ScalarIcon/logos/Svelte.svg.js +2 -2
- package/dist/components/ScalarIcon/logos/Vue.svg.js +2 -2
- package/dist/components/ScalarIconButton/ScalarIconButton.vue.js +7 -7
- package/dist/components/ScalarListbox/ScalarListbox.vue.js +3 -3
- package/dist/components/ScalarMenu/ScalarMenuLink.vue.js +4 -4
- package/dist/components/ScalarMenu/ScalarMenuProduct.vue.js +7 -7
- package/dist/components/ScalarMenu/ScalarMenuProducts.vue.js +12 -15
- package/dist/components/ScalarMenu/ScalarMenuResources.vue.js +17 -20
- package/dist/components/ScalarMenu/ScalarMenuSupport.vue.d.ts +3 -0
- package/dist/components/ScalarMenu/ScalarMenuSupport.vue.d.ts.map +1 -0
- package/dist/components/ScalarMenu/ScalarMenuSupport.vue.js +40 -0
- package/dist/components/ScalarMenu/ScalarMenuSupport.vue2.js +4 -0
- package/dist/components/ScalarMenu/ScalarMenuTeamPicker.vue.js +6 -8
- package/dist/components/ScalarMenu/ScalarMenuWorkspacePicker.vue.d.ts +18 -0
- package/dist/components/ScalarMenu/ScalarMenuWorkspacePicker.vue.d.ts.map +1 -0
- package/dist/components/ScalarMenu/ScalarMenuWorkspacePicker.vue.js +94 -0
- package/dist/components/ScalarMenu/ScalarMenuWorkspacePicker.vue2.js +4 -0
- package/dist/components/ScalarMenu/fixtures.d.ts +2 -0
- package/dist/components/ScalarMenu/fixtures.d.ts.map +1 -0
- package/dist/components/ScalarMenu/index.d.ts +4 -2
- package/dist/components/ScalarMenu/index.d.ts.map +1 -1
- package/dist/components/ScalarModal/ScalarModal.vue.d.ts +6 -2
- package/dist/components/ScalarModal/ScalarModal.vue.d.ts.map +1 -1
- package/dist/components/ScalarModal/ScalarModal.vue.js +4 -4
- package/dist/components/ScalarModal/ScalarModal.vue2.js +27 -24
- package/dist/components/ScalarSearchInput/ScalarSearchInput.vue.js +9 -9
- package/dist/components/ScalarSearchResults/ScalarSearchResultItem.vue.js +6 -6
- package/dist/components/ScalarSidebar/ScalarSidebarButton.vue.d.ts.map +1 -1
- package/dist/components/ScalarSidebar/ScalarSidebarButton.vue.js +34 -38
- package/dist/components/ScalarSidebar/ScalarSidebarGroup.vue.d.ts +22 -29
- package/dist/components/ScalarSidebar/ScalarSidebarGroup.vue.d.ts.map +1 -1
- package/dist/components/ScalarSidebar/ScalarSidebarGroup.vue.js +47 -41
- package/dist/components/ScalarSidebar/ScalarSidebarGroupToggle.vue.d.ts.map +1 -1
- package/dist/components/ScalarSidebar/ScalarSidebarGroupToggle.vue.js +9 -9
- package/dist/components/ScalarSidebar/ScalarSidebarIndent.vue.js +4 -4
- package/dist/components/ScalarSidebar/ScalarSidebarIndent.vue2.js +4 -4
- package/dist/components/ScalarSidebar/ScalarSidebarItem.vue.d.ts.map +1 -1
- package/dist/components/ScalarSidebar/ScalarSidebarItem.vue.js +12 -12
- package/dist/components/ScalarSidebar/ScalarSidebarNestedItems.vue.d.ts +10 -7
- package/dist/components/ScalarSidebar/ScalarSidebarNestedItems.vue.d.ts.map +1 -1
- package/dist/components/ScalarSidebar/ScalarSidebarNestedItems.vue.js +123 -0
- package/dist/components/ScalarSidebar/ScalarSidebarNestedItems.vue2.js +4 -0
- package/dist/components/ScalarSidebar/ScalarSidebarSearchButton.vue.js +1 -1
- package/dist/components/ScalarSidebar/ScalarSidebarSearchInput.vue.js +11 -11
- package/dist/components/ScalarSidebar/ScalarSidebarSection.vue.js +9 -9
- package/dist/components/ScalarSidebar/findScrollContainer.js +22 -0
- package/dist/components/ScalarSidebar/index.d.ts +3 -0
- package/dist/components/ScalarSidebar/index.d.ts.map +1 -1
- package/dist/components/ScalarSidebar/types.d.ts +53 -1
- package/dist/components/ScalarSidebar/types.d.ts.map +1 -1
- package/dist/components/ScalarSidebar/useSidebarNestedItems.js +13 -7
- package/dist/components/ScalarTextArea/ScalarTextArea.vue.d.ts.map +1 -1
- package/dist/components/ScalarTextArea/ScalarTextArea.vue.js +14 -10
- package/dist/components/ScalarTextInput/ScalarTextInput.vue.d.ts.map +1 -1
- package/dist/components/ScalarTextInput/ScalarTextInput.vue.js +14 -11
- package/dist/components/ScalarToggle/ScalarToggleInput.vue.js +3 -3
- package/dist/docs/useBindCx/MockComponents.d.ts +154 -0
- package/dist/docs/useBindCx/MockComponents.d.ts.map +1 -0
- package/dist/index.js +144 -134
- package/dist/style.css +1 -1
- package/package.json +11 -11
- package/dist/docs/useBindCx/MockComponent.d.ts +0 -76
- package/dist/docs/useBindCx/MockComponent.d.ts.map +0 -1
|
@@ -1,75 +1,81 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useBindCx as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { useSidebarGroups as
|
|
7
|
-
const
|
|
8
|
-
...
|
|
1
|
+
import { defineComponent as c, mergeModels as f, useModel as v, createElementBlock as b, openBlock as r, renderSlot as t, createBlock as y, createCommentVNode as g, unref as l, createVNode as s, mergeProps as d, createSlots as B, withCtx as n, resolveDynamicComponent as $, normalizeProps as C } from "vue";
|
|
2
|
+
import { useBindCx as S } from "@scalar/use-hooks/useBindCx";
|
|
3
|
+
import k from "./ScalarSidebarButton.vue.js";
|
|
4
|
+
import _ from "./ScalarSidebarGroupToggle.vue.js";
|
|
5
|
+
import h from "./ScalarSidebarIndent.vue.js";
|
|
6
|
+
import { useSidebarGroups as x } from "./useSidebarGroups.js";
|
|
7
|
+
const A = { class: "group/item flex flex-col gap-px" }, M = {}, D = /* @__PURE__ */ c({
|
|
8
|
+
...M,
|
|
9
9
|
inheritAttrs: !1,
|
|
10
10
|
__name: "ScalarSidebarGroup",
|
|
11
|
-
props: /* @__PURE__ */
|
|
11
|
+
props: /* @__PURE__ */ f({
|
|
12
12
|
is: { default: "ul" },
|
|
13
|
-
icon: {},
|
|
13
|
+
icon: { type: [Object, Function] },
|
|
14
14
|
active: { type: Boolean },
|
|
15
15
|
selected: { type: Boolean },
|
|
16
16
|
disabled: { type: Boolean },
|
|
17
|
-
indent: {}
|
|
17
|
+
indent: {},
|
|
18
|
+
controlled: { type: Boolean }
|
|
18
19
|
}, {
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
open: { type: Boolean, default: !1 },
|
|
21
|
+
openModifiers: {}
|
|
21
22
|
}),
|
|
22
|
-
emits: ["update:
|
|
23
|
-
setup(
|
|
24
|
-
const
|
|
25
|
-
return (
|
|
26
|
-
t(
|
|
23
|
+
emits: ["update:open"],
|
|
24
|
+
setup(p) {
|
|
25
|
+
const o = v(p, "open"), { level: a } = x({ increment: !0 }), { stylingAttrsCx: u, otherAttrs: m } = S();
|
|
26
|
+
return (e, i) => (r(), b("li", A, [
|
|
27
|
+
t(e.$slots, "button", {
|
|
27
28
|
level: l(a),
|
|
28
|
-
open:
|
|
29
|
+
open: o.value
|
|
29
30
|
}, () => [
|
|
30
|
-
s(
|
|
31
|
+
s(k, d({
|
|
31
32
|
is: "button",
|
|
32
|
-
active:
|
|
33
|
-
"aria-expanded":
|
|
33
|
+
active: e.active,
|
|
34
|
+
"aria-expanded": o.value,
|
|
34
35
|
class: "group/group-button",
|
|
35
|
-
disabled:
|
|
36
|
+
disabled: e.disabled,
|
|
36
37
|
indent: l(a),
|
|
37
|
-
selected:
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
selected: e.selected
|
|
39
|
+
}, l(m), {
|
|
40
|
+
onClick: i[0] || (i[0] = (G) => !e.controlled && (o.value = !o.value))
|
|
41
|
+
}), B({
|
|
40
42
|
indent: n(() => [
|
|
41
|
-
s(
|
|
43
|
+
s(h, {
|
|
42
44
|
class: "mr-0",
|
|
43
45
|
indent: l(a)
|
|
44
46
|
}, null, 8, ["indent"])
|
|
45
47
|
]),
|
|
46
48
|
icon: n(() => [
|
|
47
|
-
t(
|
|
48
|
-
s(
|
|
49
|
+
t(e.$slots, "icon", { open: o.value }, () => [
|
|
50
|
+
s(_, {
|
|
49
51
|
class: "text-c-3",
|
|
50
|
-
open:
|
|
52
|
+
open: o.value
|
|
51
53
|
}, null, 8, ["open"])
|
|
52
54
|
])
|
|
53
55
|
]),
|
|
54
56
|
default: n(() => [
|
|
55
|
-
t(
|
|
56
|
-
open: !!e.value
|
|
57
|
-
})
|
|
57
|
+
t(e.$slots, "default", { open: o.value })
|
|
58
58
|
]),
|
|
59
|
-
_:
|
|
60
|
-
},
|
|
59
|
+
_: 2
|
|
60
|
+
}, [
|
|
61
|
+
e.$slots.aside ? {
|
|
62
|
+
name: "aside",
|
|
63
|
+
fn: n(() => [
|
|
64
|
+
t(e.$slots, "aside", { open: o.value })
|
|
65
|
+
]),
|
|
66
|
+
key: "0"
|
|
67
|
+
} : void 0
|
|
68
|
+
]), 1040, ["active", "aria-expanded", "disabled", "indent", "selected"])
|
|
61
69
|
]),
|
|
62
|
-
|
|
70
|
+
o.value ? (r(), y($(e.is), C(d({ key: 0 }, l(u)("group/items flex flex-col gap-px"))), {
|
|
63
71
|
default: n(() => [
|
|
64
|
-
t(
|
|
65
|
-
open: !!e.value
|
|
66
|
-
})
|
|
72
|
+
t(e.$slots, "items", { open: o.value })
|
|
67
73
|
]),
|
|
68
74
|
_: 3
|
|
69
|
-
}, 16)) :
|
|
75
|
+
}, 16)) : g("", !0)
|
|
70
76
|
]));
|
|
71
77
|
}
|
|
72
78
|
});
|
|
73
79
|
export {
|
|
74
|
-
|
|
80
|
+
D as default
|
|
75
81
|
};
|
|
@@ -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":"AAqEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAE9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAEpC,OAAO,EAAE,KAAK,IAAI,EAA2B,MAAM,eAAe,CAAA;AAGlE;;;;;;;GAOG;;IAGD,+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;;IAKjC,+BAA+B;oBACf;QAAE,IAAI,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO;IAC3C,uCAAuC;kBACzB;QAAE,IAAI,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO;;AAf3C,wBAmHC;AAOD,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as i, createBlock as n, openBlock as t, resolveDynamicComponent as
|
|
1
|
+
import { defineComponent as i, createBlock as n, openBlock as t, resolveDynamicComponent as p, mergeProps as l, unref as o, withCtx as c, renderSlot as r, createElementVNode as f, createTextVNode as u, toDisplayString as d } from "vue";
|
|
2
2
|
import { ScalarIconCaretRight as m } from "@scalar/icons";
|
|
3
|
-
import { cva as y, useBindCx as
|
|
4
|
-
import
|
|
3
|
+
import { cva as y, useBindCx as b } from "@scalar/use-hooks/useBindCx";
|
|
4
|
+
import _ from "../ScalarIcon/ScalarIconLegacyAdapter.vue.js";
|
|
5
5
|
const g = { class: "sr-only" }, h = {}, $ = /* @__PURE__ */ i({
|
|
6
6
|
...h,
|
|
7
7
|
inheritAttrs: !1,
|
|
@@ -9,20 +9,20 @@ const g = { class: "sr-only" }, h = {}, $ = /* @__PURE__ */ i({
|
|
|
9
9
|
props: {
|
|
10
10
|
is: { default: "div" },
|
|
11
11
|
open: { type: Boolean, default: !1 },
|
|
12
|
-
icon: {}
|
|
12
|
+
icon: { type: [Object, Function] }
|
|
13
13
|
},
|
|
14
14
|
setup(v) {
|
|
15
15
|
const s = y({
|
|
16
16
|
base: "size-4 flex items-center justify-center transition-transform duration-100",
|
|
17
17
|
variants: { open: { true: "rotate-90" } },
|
|
18
18
|
defaultVariants: { open: !1 }
|
|
19
|
-
}), { cx: a } =
|
|
20
|
-
return (e, C) => (t(), n(
|
|
19
|
+
}), { cx: a } = b();
|
|
20
|
+
return (e, C) => (t(), n(p(e.is), l({
|
|
21
21
|
type: e.is === "button" ? "button" : void 0
|
|
22
22
|
}, o(a)(o(s)({ open: e.open }))), {
|
|
23
|
-
default:
|
|
23
|
+
default: c(() => [
|
|
24
24
|
r(e.$slots, "default", { open: e.open }, () => [
|
|
25
|
-
e.icon ? (t(), n(o(
|
|
25
|
+
e.icon ? (t(), n(o(_), {
|
|
26
26
|
key: 0,
|
|
27
27
|
icon: e.icon
|
|
28
28
|
}, null, 8, ["icon"])) : (t(), n(o(m), {
|
|
@@ -31,7 +31,7 @@ const g = { class: "sr-only" }, h = {}, $ = /* @__PURE__ */ i({
|
|
|
31
31
|
weight: "bold"
|
|
32
32
|
}))
|
|
33
33
|
]),
|
|
34
|
-
|
|
34
|
+
f("span", g, [
|
|
35
35
|
r(e.$slots, "label", { open: e.open }, () => [
|
|
36
36
|
u(d(e.open ? "Close" : "Open") + " Group ", 1)
|
|
37
37
|
])
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import a from "./ScalarSidebarIndent.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const m = /* @__PURE__ */ o(a, [["__scopeId", "data-v-48a21042"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as o, computed as c, createElementBlock as t, openBlock as n, normalizeProps as u, guardReactiveProps as b, unref as m, Fragment as f, renderList as p, createElementVNode as v, createCommentVNode as
|
|
1
|
+
import { defineComponent as o, computed as c, createElementBlock as t, openBlock as n, normalizeProps as u, guardReactiveProps as b, unref as m, Fragment as f, renderList as p, createElementVNode as v, createCommentVNode as y, normalizeClass as g } from "vue";
|
|
2
2
|
import { useBindCx as B } from "@scalar/use-hooks/useBindCx";
|
|
3
3
|
const _ = {}, C = /* @__PURE__ */ o({
|
|
4
4
|
..._,
|
|
@@ -12,7 +12,7 @@ const _ = {}, C = /* @__PURE__ */ o({
|
|
|
12
12
|
setup(d) {
|
|
13
13
|
const a = c(() => Array.from({ length: d.indent }, (e, r) => r)), { cx: s } = B();
|
|
14
14
|
return (e, r) => (n(), t("div", u(b(
|
|
15
|
-
m(s)("scalar-sidebar-indent flex justify-center", {
|
|
15
|
+
m(s)("scalar-sidebar-indent -my-2 flex justify-center", {
|
|
16
16
|
"mr-[calc(20px-var(--scalar-sidebar-indent))]": e.indent > 0,
|
|
17
17
|
"scalar-sidebar-indent-selected": e.selected
|
|
18
18
|
})
|
|
@@ -24,11 +24,11 @@ const _ = {}, C = /* @__PURE__ */ o({
|
|
|
24
24
|
r[0] || (r[0] = v("div", { class: "scalar-sidebar-indent-border absolute left-2 inset-y-0 w-border bg-sidebar-indent-border" }, null, -1)),
|
|
25
25
|
i === a.value.length - 1 ? (n(), t("div", {
|
|
26
26
|
key: 0,
|
|
27
|
-
class:
|
|
27
|
+
class: g([
|
|
28
28
|
"absolute left-2 inset-y-0 w-border",
|
|
29
29
|
e.disabled ? "" : e.selected ? "bg-sidebar-indent-border-active" : "group-hover/button:bg-sidebar-indent-border-hover"
|
|
30
30
|
])
|
|
31
|
-
}, null, 2)) :
|
|
31
|
+
}, null, 2)) : y("", !0)
|
|
32
32
|
]))), 128))
|
|
33
33
|
], 16));
|
|
34
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarSidebarItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/ScalarSidebarItem.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScalarSidebarItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/ScalarSidebarItem.vue"],"names":[],"mappings":"AAoDA,OAAO,KAAK,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAI7E;;;;;;;;;;;;;;;;;GAiBG;;AACH,wBAyEC;AAOD,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { defineComponent as r, useSlots as s, createElementBlock as i, openBlock as a, createVNode as l, mergeProps as p, unref as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as r, useSlots as s, createElementBlock as i, openBlock as a, createVNode as l, mergeProps as p, unref as c, createSlots as d, renderList as _, withCtx as m, renderSlot as u } from "vue";
|
|
2
|
+
import f from "./ScalarSidebarButton.vue.js";
|
|
3
3
|
import { useSidebarGroups as S } from "./useSidebarGroups.js";
|
|
4
|
-
const B = { class: "group/item contents" },
|
|
5
|
-
...
|
|
4
|
+
const B = { class: "group/item contents" }, b = {}, C = /* @__PURE__ */ r({
|
|
5
|
+
...b,
|
|
6
6
|
inheritAttrs: !1,
|
|
7
7
|
__name: "ScalarSidebarItem",
|
|
8
8
|
props: {
|
|
9
9
|
is: {},
|
|
10
|
-
icon: {},
|
|
10
|
+
icon: { type: [Object, Function] },
|
|
11
11
|
active: { type: Boolean },
|
|
12
12
|
selected: { type: Boolean },
|
|
13
13
|
disabled: { type: Boolean },
|
|
14
14
|
indent: { default: () => {
|
|
15
15
|
} }
|
|
16
16
|
},
|
|
17
|
-
setup(
|
|
17
|
+
setup(h) {
|
|
18
18
|
const o = s(), { level: n } = S();
|
|
19
|
-
return (e,
|
|
20
|
-
l(
|
|
21
|
-
indent: e.indent ??
|
|
22
|
-
}),
|
|
23
|
-
_(o, (
|
|
19
|
+
return (e, y) => (a(), i("li", B, [
|
|
20
|
+
l(f, p({ ...e.$attrs, ...e.$props }, {
|
|
21
|
+
indent: e.indent ?? c(n)
|
|
22
|
+
}), d({ _: 2 }, [
|
|
23
|
+
_(o, ($, t) => ({
|
|
24
24
|
name: t,
|
|
25
25
|
fn: m(() => [
|
|
26
|
-
|
|
26
|
+
u(e.$slots, t)
|
|
27
27
|
])
|
|
28
28
|
}))
|
|
29
29
|
]), 1040, ["indent"])
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { ScalarSidebarItemProps } from './types';
|
|
2
1
|
/**
|
|
3
2
|
* Scalar Sidebar Nested Items component
|
|
4
3
|
*
|
|
@@ -15,14 +14,18 @@ import type { ScalarSidebarItemProps } from './types';
|
|
|
15
14
|
* </template>
|
|
16
15
|
* </ScalarSidebarNestedItems>
|
|
17
16
|
*/
|
|
18
|
-
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ScalarSidebarItemProps & {
|
|
19
|
-
|
|
17
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<import("./types").ScalarSidebarItemProps & {
|
|
18
|
+
controlled?: boolean;
|
|
19
|
+
} & {
|
|
20
|
+
open?: boolean;
|
|
20
21
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
21
|
-
"update:
|
|
22
|
-
}, string, import("vue").PublicProps, Readonly<ScalarSidebarItemProps & {
|
|
23
|
-
|
|
22
|
+
"update:open": (value: boolean) => any;
|
|
23
|
+
}, string, import("vue").PublicProps, Readonly<import("./types").ScalarSidebarItemProps & {
|
|
24
|
+
controlled?: boolean;
|
|
25
|
+
} & {
|
|
26
|
+
open?: boolean;
|
|
24
27
|
}> & Readonly<{
|
|
25
|
-
"onUpdate:
|
|
28
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
26
29
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
27
30
|
/** The text content of the button */
|
|
28
31
|
default?: () => unknown;
|
|
@@ -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":"AAyKA;;;;;;;;;;;;;;;GAeG;;;;WAgEM,OAAO;;;;;;WAAP,OAAO;;;;IAvDd,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;;AArBzB,wBAkSC;AAOD,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { defineComponent as y, mergeModels as C, useModel as k, useTemplateRef as g, ref as B, createElementBlock as d, openBlock as u, normalizeStyle as T, normalizeClass as z, renderSlot as o, createVNode as t, mergeProps as I, unref as r, withCtx as s, Transition as N, createCommentVNode as _, normalizeProps as A, guardReactiveProps as w, createTextVNode as L, nextTick as c } from "vue";
|
|
2
|
+
import { ScalarIconArrowRight as M, ScalarIconCaretLeft as P, ScalarIconListDashes as R } from "@scalar/icons";
|
|
3
|
+
import f from "./ScalarSidebarButton.vue.js";
|
|
4
|
+
import V from "./ScalarSidebarItems.vue.js";
|
|
5
|
+
/* empty css */
|
|
6
|
+
import h from "./ScalarSidebarSpacer.vue.js";
|
|
7
|
+
import { findScrollContainer as p } from "./findScrollContainer.js";
|
|
8
|
+
import { useSidebarGroups as q } from "./useSidebarGroups.js";
|
|
9
|
+
import { useSidebarNestedItem as E } from "./useSidebarNestedItems.js";
|
|
10
|
+
import O from "../ScalarIcon/ScalarIconLegacyAdapter.vue.js";
|
|
11
|
+
const j = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "absolute inset-0 translate-x-full"
|
|
14
|
+
}, x = {}, Y = /* @__PURE__ */ y({
|
|
15
|
+
...x,
|
|
16
|
+
inheritAttrs: !1,
|
|
17
|
+
__name: "ScalarSidebarNestedItems",
|
|
18
|
+
props: /* @__PURE__ */ C({
|
|
19
|
+
is: {},
|
|
20
|
+
icon: { type: [Object, Function], default: R },
|
|
21
|
+
active: { type: Boolean },
|
|
22
|
+
selected: { type: Boolean },
|
|
23
|
+
disabled: { type: Boolean },
|
|
24
|
+
indent: {},
|
|
25
|
+
controlled: { type: Boolean }
|
|
26
|
+
}, {
|
|
27
|
+
open: { type: Boolean, default: !1 },
|
|
28
|
+
openModifiers: {}
|
|
29
|
+
}),
|
|
30
|
+
emits: ["update:open"],
|
|
31
|
+
setup(m) {
|
|
32
|
+
const l = k(m, "open");
|
|
33
|
+
E(l);
|
|
34
|
+
const { level: v } = q({ reset: !0 }), a = g("el"), i = B(0);
|
|
35
|
+
function b() {
|
|
36
|
+
i.value = p(a.value).scrollTop ?? 0, c(
|
|
37
|
+
() => a.value?.querySelector('button:not([aria-expanded="true"])')?.focus({ preventScroll: !0 })
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
function $() {
|
|
41
|
+
c(() => {
|
|
42
|
+
a.value?.querySelector("button")?.focus({ preventScroll: !0 }), p(a.value).scrollTop = i.value;
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
return (e, n) => (u(), d("li", {
|
|
46
|
+
ref_key: "el",
|
|
47
|
+
ref: a,
|
|
48
|
+
class: z(["group/item group/nested-items contents", { "group/nested-items-open": l.value }]),
|
|
49
|
+
style: T({ "--nested-items-offset": `${i.value}px` })
|
|
50
|
+
}, [
|
|
51
|
+
o(e.$slots, "button", {}, () => [
|
|
52
|
+
t(f, I({
|
|
53
|
+
is: "button",
|
|
54
|
+
"aria-expanded": l.value,
|
|
55
|
+
class: "text-c-1 font-sidebar-active",
|
|
56
|
+
disabled: e.disabled,
|
|
57
|
+
indent: r(v),
|
|
58
|
+
selected: e.selected
|
|
59
|
+
}, e.$attrs, {
|
|
60
|
+
onClick: n[0] || (n[0] = (S) => !e.controlled && (l.value = !0))
|
|
61
|
+
}), {
|
|
62
|
+
icon: s(() => [
|
|
63
|
+
o(e.$slots, "icon", {}, () => [
|
|
64
|
+
t(r(O), {
|
|
65
|
+
icon: e.icon,
|
|
66
|
+
weight: "bold"
|
|
67
|
+
}, null, 8, ["icon"])
|
|
68
|
+
])
|
|
69
|
+
]),
|
|
70
|
+
aside: s(() => [
|
|
71
|
+
o(e.$slots, "aside", {}, () => [
|
|
72
|
+
t(r(M), { class: "size-4 text-c-2" })
|
|
73
|
+
])
|
|
74
|
+
]),
|
|
75
|
+
default: s(() => [
|
|
76
|
+
o(e.$slots, "default")
|
|
77
|
+
]),
|
|
78
|
+
_: 3
|
|
79
|
+
}, 16, ["aria-expanded", "disabled", "indent", "selected"])
|
|
80
|
+
]),
|
|
81
|
+
t(N, {
|
|
82
|
+
duration: 300,
|
|
83
|
+
enterActiveClass: "top-(--nested-items-offset)",
|
|
84
|
+
leaveActiveClass: "top-(--nested-items-offset)",
|
|
85
|
+
onEnter: b,
|
|
86
|
+
onLeave: $
|
|
87
|
+
}, {
|
|
88
|
+
default: s(() => [
|
|
89
|
+
l.value ? (u(), d("div", j, [
|
|
90
|
+
t(V, A(w(e.$attrs)), {
|
|
91
|
+
default: s(() => [
|
|
92
|
+
o(e.$slots, "back", {}, () => [
|
|
93
|
+
t(f, {
|
|
94
|
+
is: "button",
|
|
95
|
+
class: "text-c-1 font-sidebar-active",
|
|
96
|
+
onClick: n[1] || (n[1] = (S) => !e.controlled && (l.value = !1))
|
|
97
|
+
}, {
|
|
98
|
+
icon: s(() => [
|
|
99
|
+
t(r(P), { class: "size-4 -m-px text-c-2" })
|
|
100
|
+
]),
|
|
101
|
+
default: s(() => [
|
|
102
|
+
o(e.$slots, "back-label", {}, () => [
|
|
103
|
+
n[2] || (n[2] = L("Back", -1))
|
|
104
|
+
])
|
|
105
|
+
]),
|
|
106
|
+
_: 3
|
|
107
|
+
})
|
|
108
|
+
]),
|
|
109
|
+
t(h, { class: "h-3" }),
|
|
110
|
+
o(e.$slots, "items")
|
|
111
|
+
]),
|
|
112
|
+
_: 3
|
|
113
|
+
}, 16)
|
|
114
|
+
])) : _("", !0)
|
|
115
|
+
]),
|
|
116
|
+
_: 3
|
|
117
|
+
})
|
|
118
|
+
], 6));
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
export {
|
|
122
|
+
Y as default
|
|
123
|
+
};
|
|
@@ -25,7 +25,7 @@ const f = { class: "flex-1 text-left leading-none" }, h = {
|
|
|
25
25
|
p(n(b), { class: "size-4" }),
|
|
26
26
|
t("span", f, [
|
|
27
27
|
a(r.$slots, "default", {}, () => [
|
|
28
|
-
e[0] || (e[0] = u("Search..."))
|
|
28
|
+
e[0] || (e[0] = u("Search...", -1))
|
|
29
29
|
])
|
|
30
30
|
]),
|
|
31
31
|
r.$slots.shortcut ? (o(), s("span", h, [
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as f, mergeModels as p, ref as m, useModel as b, onMounted as h, createElementBlock as g, openBlock as r, normalizeProps as v, guardReactiveProps as S, unref as e, createVNode as k, withDirectives as
|
|
1
|
+
import { defineComponent as f, mergeModels as p, ref as m, useModel as b, onMounted as h, createElementBlock as g, openBlock as r, normalizeProps as v, guardReactiveProps as S, unref as e, createVNode as k, withDirectives as y, createBlock as s, createCommentVNode as x, createElementVNode as C, mergeProps as M, vModelText as V, withModifiers as z } from "vue";
|
|
2
2
|
import { ScalarIconMagnifyingGlass as B, ScalarIconX as w } from "@scalar/icons";
|
|
3
|
-
import { useBindCx as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
const
|
|
3
|
+
import { useBindCx as A } from "@scalar/use-hooks/useBindCx";
|
|
4
|
+
import E from "../ScalarLoading/ScalarLoading.vue.js";
|
|
5
|
+
import I from "../ScalarIconButton/ScalarIconButton.vue.js";
|
|
6
|
+
const N = ["aria-label"], D = /* @__PURE__ */ f({
|
|
7
7
|
inheritAttrs: !1,
|
|
8
8
|
__name: "ScalarSidebarSearchInput",
|
|
9
9
|
props: /* @__PURE__ */ p({
|
|
@@ -20,7 +20,7 @@ const P = ["aria-label"], D = /* @__PURE__ */ f({
|
|
|
20
20
|
function i() {
|
|
21
21
|
a.value = "", o.value && o.value.focus();
|
|
22
22
|
}
|
|
23
|
-
const {
|
|
23
|
+
const { stylingAttrsCx: c, otherAttrs: u } = A();
|
|
24
24
|
return h(() => t.autofocus && o.value?.focus()), (l, n) => (r(), g("label", v(S(
|
|
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",
|
|
@@ -29,7 +29,7 @@ const P = ["aria-label"], D = /* @__PURE__ */ f({
|
|
|
29
29
|
)
|
|
30
30
|
)), [
|
|
31
31
|
k(e(B), { class: "text-sidebar-c-search size-4" }),
|
|
32
|
-
|
|
32
|
+
y(C("input", M({
|
|
33
33
|
ref_key: "inputRef",
|
|
34
34
|
ref: o,
|
|
35
35
|
"aria-label": l.label ?? "Enter search query",
|
|
@@ -42,22 +42,22 @@ const P = ["aria-label"], D = /* @__PURE__ */ f({
|
|
|
42
42
|
type: "search"
|
|
43
43
|
}, e(u), {
|
|
44
44
|
"onUpdate:modelValue": n[0] || (n[0] = (d) => a.value = d)
|
|
45
|
-
}), null, 16,
|
|
45
|
+
}), null, 16, N), [
|
|
46
46
|
[V, a.value]
|
|
47
47
|
]),
|
|
48
|
-
l.loading && l.loading.isLoading ? (r(), s(e(
|
|
48
|
+
l.loading && l.loading.isLoading ? (r(), s(e(E), {
|
|
49
49
|
key: 0,
|
|
50
50
|
class: "mr-3 self-center",
|
|
51
51
|
loadingState: l.loading,
|
|
52
52
|
size: "md"
|
|
53
|
-
}, null, 8, ["loadingState"])) : a.value ? (r(), s(e(
|
|
53
|
+
}, null, 8, ["loadingState"])) : a.value ? (r(), s(e(I), {
|
|
54
54
|
key: 1,
|
|
55
55
|
class: "p-0.25 size-4",
|
|
56
56
|
icon: e(w),
|
|
57
57
|
weight: "bold",
|
|
58
58
|
label: "Clear Search",
|
|
59
59
|
onClick: z(i, ["stop", "prevent"])
|
|
60
|
-
}, null, 8, ["icon"])) :
|
|
60
|
+
}, null, 8, ["icon"])) : x("", !0)
|
|
61
61
|
], 16));
|
|
62
62
|
}
|
|
63
63
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as c, createElementBlock as d, openBlock as s, createVNode as n, createBlock as p, unref as
|
|
1
|
+
import { defineComponent as c, createElementBlock as d, openBlock as s, createVNode as n, createBlock as p, unref as t, withCtx as i, renderSlot as r, resolveDynamicComponent as f, normalizeProps as m, guardReactiveProps as u } from "vue";
|
|
2
2
|
import { useBindCx as _ } from "@scalar/use-hooks/useBindCx";
|
|
3
3
|
import b from "./ScalarSidebarButton.vue.js";
|
|
4
4
|
import a from "./ScalarSidebarSpacer.vue.js";
|
|
@@ -9,32 +9,32 @@ const g = { class: "group/item group/sidebar-section contents" }, h = {}, P = /*
|
|
|
9
9
|
__name: "ScalarSidebarSection",
|
|
10
10
|
props: {
|
|
11
11
|
is: { default: "ul" },
|
|
12
|
-
icon: {},
|
|
12
|
+
icon: { type: [Object, Function] },
|
|
13
13
|
active: { type: Boolean },
|
|
14
14
|
selected: { type: Boolean },
|
|
15
15
|
disabled: { type: Boolean },
|
|
16
16
|
indent: {}
|
|
17
17
|
},
|
|
18
18
|
setup(v) {
|
|
19
|
-
const { level:
|
|
19
|
+
const { level: o } = B({ increment: !1 }), { cx: l } = _();
|
|
20
20
|
return (e, x) => (s(), d("li", g, [
|
|
21
21
|
n(a, {
|
|
22
22
|
class: "group/spacer-before h-3",
|
|
23
|
-
indent: o
|
|
23
|
+
indent: t(o)
|
|
24
24
|
}, null, 8, ["indent"]),
|
|
25
25
|
n(b, {
|
|
26
26
|
is: "div",
|
|
27
27
|
class: "text-sm font-bold",
|
|
28
|
-
|
|
28
|
+
disabled: "",
|
|
29
29
|
icon: e.icon,
|
|
30
|
-
|
|
30
|
+
indent: t(o)
|
|
31
31
|
}, {
|
|
32
32
|
default: i(() => [
|
|
33
33
|
r(e.$slots, "default")
|
|
34
34
|
]),
|
|
35
35
|
_: 3
|
|
36
|
-
}, 8, ["
|
|
37
|
-
(s(), p(f(e.is), m(u(
|
|
36
|
+
}, 8, ["icon", "indent"]),
|
|
37
|
+
(s(), p(f(e.is), m(u(t(l)("flex flex-col gap-px"))), {
|
|
38
38
|
default: i(() => [
|
|
39
39
|
r(e.$slots, "items")
|
|
40
40
|
]),
|
|
@@ -42,7 +42,7 @@ const g = { class: "group/item group/sidebar-section contents" }, h = {}, P = /*
|
|
|
42
42
|
}, 16)),
|
|
43
43
|
n(a, {
|
|
44
44
|
class: "group/spacer-after h-3",
|
|
45
|
-
indent: o
|
|
45
|
+
indent: t(o)
|
|
46
46
|
}, null, 8, ["indent"])
|
|
47
47
|
]));
|
|
48
48
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
function r(o) {
|
|
2
|
+
const t = window.getComputedStyle(o), [e, n] = t.overflow.split(" ");
|
|
3
|
+
return {
|
|
4
|
+
x: t.overflowX || e,
|
|
5
|
+
y: t.overflowY || n || e
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
function u(o, t = "y") {
|
|
9
|
+
if (!o)
|
|
10
|
+
return document.documentElement;
|
|
11
|
+
let e = o.parentElement;
|
|
12
|
+
for (; e; ) {
|
|
13
|
+
const l = r(e)[t];
|
|
14
|
+
if (l === "auto" || l === "scroll")
|
|
15
|
+
return e;
|
|
16
|
+
e = e.parentElement;
|
|
17
|
+
}
|
|
18
|
+
return document.documentElement;
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
u as findScrollContainer
|
|
22
|
+
};
|
|
@@ -3,9 +3,12 @@ export { default as ScalarSidebarButton } from './ScalarSidebarButton.vue.js';
|
|
|
3
3
|
export { default as ScalarSidebarFooter } from './ScalarSidebarFooter.vue.js';
|
|
4
4
|
export { default as ScalarSidebarGroup } from './ScalarSidebarGroup.vue.js';
|
|
5
5
|
export { default as ScalarSidebarGroupToggle } from './ScalarSidebarGroupToggle.vue.js';
|
|
6
|
+
export { default as ScalarSidebarIndent } from './ScalarSidebarIndent.vue.js';
|
|
6
7
|
export { default as ScalarSidebarItem } from './ScalarSidebarItem.vue.js';
|
|
7
8
|
export { default as ScalarSidebarItems } from './ScalarSidebarItems.vue.js';
|
|
9
|
+
export { default as ScalarSidebarNestedItems } from './ScalarSidebarNestedItems.vue.js';
|
|
8
10
|
export { default as ScalarSidebarSearchButton } from './ScalarSidebarSearchButton.vue.js';
|
|
9
11
|
export { default as ScalarSidebarSearchInput } from './ScalarSidebarSearchInput.vue.js';
|
|
10
12
|
export { default as ScalarSidebarSection } from './ScalarSidebarSection.vue.js';
|
|
13
|
+
export { default as ScalarSidebarSpacer } from './ScalarSidebarSpacer.vue.js';
|
|
11
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAC1E,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAC1E,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AACxE,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,gCAAgC,CAAA;AACpF,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AACtE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AACxE,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,iCAAiC,CAAA;AACtF,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,gCAAgC,CAAA;AACpF,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,4BAA4B,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAC1E,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAC1E,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AACxE,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,gCAAgC,CAAA;AACpF,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAC1E,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AACtE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AACxE,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,gCAAgC,CAAA;AACpF,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,iCAAiC,CAAA;AACtF,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,gCAAgC,CAAA;AACpF,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AAC5E,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,2BAA2B,CAAA"}
|