@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.
Files changed (211) hide show
  1. package/dist/components/ScalarButton/ScalarButton.vue.js +5 -5
  2. package/dist/components/ScalarCard/ScalarCard.vue.d.ts.map +1 -1
  3. package/dist/components/ScalarCard/ScalarCard.vue.js +11 -11
  4. package/dist/components/ScalarCheckboxInput/ScalarCheckboxInput.vue.js +11 -11
  5. package/dist/components/ScalarCodeBlock/ScalarCodeBlock.vue.d.ts +24 -10
  6. package/dist/components/ScalarCodeBlock/ScalarCodeBlock.vue.d.ts.map +1 -1
  7. package/dist/components/ScalarCodeBlock/ScalarCodeBlock.vue.js +23 -20
  8. package/dist/components/ScalarColorModeToggle/ScalarColorModeToggleIcon.vue2.js +5 -6
  9. package/dist/components/ScalarCombobox/ScalarComboboxOptions.vue.js +28 -28
  10. package/dist/components/ScalarDropdown/ScalarDropdownItem.vue2.js +2 -2
  11. package/dist/components/ScalarFileUpload/ScalarFileUploadDropTarget.vue.js +1 -1
  12. package/dist/components/ScalarFileUpload/ScalarFileUploadFileList.vue.js +8 -10
  13. package/dist/components/ScalarFileUpload/ScalarFileUploadInput.vue.js +4 -5
  14. package/dist/components/ScalarIcon/ScalarIconLegacyAdapter.vue.js +3 -3
  15. package/dist/components/ScalarIcon/icons/Add.svg.js +2 -2
  16. package/dist/components/ScalarIcon/icons/AddTab.svg.js +2 -2
  17. package/dist/components/ScalarIcon/icons/Alert.svg.js +2 -2
  18. package/dist/components/ScalarIcon/icons/ArrowLeft.svg.js +2 -2
  19. package/dist/components/ScalarIcon/icons/ArrowRight.svg.js +2 -2
  20. package/dist/components/ScalarIcon/icons/Brackets.svg.js +2 -2
  21. package/dist/components/ScalarIcon/icons/Branch.svg.js +2 -2
  22. package/dist/components/ScalarIcon/icons/Changelog.svg.js +2 -2
  23. package/dist/components/ScalarIcon/icons/Checkmark.svg.js +2 -2
  24. package/dist/components/ScalarIcon/icons/ChevronDown.svg.js +2 -2
  25. package/dist/components/ScalarIcon/icons/ChevronLeft.svg.js +2 -2
  26. package/dist/components/ScalarIcon/icons/ChevronRight.svg.js +2 -2
  27. package/dist/components/ScalarIcon/icons/ChevronUp.svg.js +2 -2
  28. package/dist/components/ScalarIcon/icons/Clipboard.svg.js +2 -2
  29. package/dist/components/ScalarIcon/icons/Close.svg.js +2 -2
  30. package/dist/components/ScalarIcon/icons/CloseTab.svg.js +2 -2
  31. package/dist/components/ScalarIcon/icons/CloseTabs.svg.js +2 -2
  32. package/dist/components/ScalarIcon/icons/Cloud.svg.js +2 -2
  33. package/dist/components/ScalarIcon/icons/CodeFolder.svg.js +2 -2
  34. package/dist/components/ScalarIcon/icons/Cog.svg.js +2 -2
  35. package/dist/components/ScalarIcon/icons/Collection.svg.js +2 -2
  36. package/dist/components/ScalarIcon/icons/Cookie.svg.js +2 -2
  37. package/dist/components/ScalarIcon/icons/DarkMode.svg.js +2 -2
  38. package/dist/components/ScalarIcon/icons/Delete.svg.js +2 -2
  39. package/dist/components/ScalarIcon/icons/Discord.svg.js +2 -2
  40. package/dist/components/ScalarIcon/icons/DocsPage.svg.js +2 -2
  41. package/dist/components/ScalarIcon/icons/Download.svg.js +2 -2
  42. package/dist/components/ScalarIcon/icons/Duplicate.svg.js +2 -2
  43. package/dist/components/ScalarIcon/icons/Edit.svg.js +2 -2
  44. package/dist/components/ScalarIcon/icons/Ellipses.svg.js +2 -2
  45. package/dist/components/ScalarIcon/icons/Email.svg.js +2 -2
  46. package/dist/components/ScalarIcon/icons/Error.svg.js +2 -2
  47. package/dist/components/ScalarIcon/icons/Example.svg.js +2 -2
  48. package/dist/components/ScalarIcon/icons/ExternalLink.svg.js +2 -2
  49. package/dist/components/ScalarIcon/icons/FilterList.svg.js +2 -2
  50. package/dist/components/ScalarIcon/icons/Folder.svg.js +2 -2
  51. package/dist/components/ScalarIcon/icons/GitHub.svg.js +2 -2
  52. package/dist/components/ScalarIcon/icons/GitHubLine.svg.js +2 -2
  53. package/dist/components/ScalarIcon/icons/Globe.svg.js +2 -2
  54. package/dist/components/ScalarIcon/icons/Google.svg.js +2 -2
  55. package/dist/components/ScalarIcon/icons/Help.svg.js +2 -2
  56. package/dist/components/ScalarIcon/icons/Hide.svg.js +2 -2
  57. package/dist/components/ScalarIcon/icons/History.svg.js +2 -2
  58. package/dist/components/ScalarIcon/icons/House.svg.js +2 -2
  59. package/dist/components/ScalarIcon/icons/Import.svg.js +2 -2
  60. package/dist/components/ScalarIcon/icons/Info.svg.js +2 -2
  61. package/dist/components/ScalarIcon/icons/Key.svg.js +2 -2
  62. package/dist/components/ScalarIcon/icons/Leave.svg.js +2 -2
  63. package/dist/components/ScalarIcon/icons/LightDarkModeToggle.svg.js +2 -2
  64. package/dist/components/ScalarIcon/icons/LightMode.svg.js +2 -2
  65. package/dist/components/ScalarIcon/icons/Link.svg.js +2 -2
  66. package/dist/components/ScalarIcon/icons/Lock.svg.js +2 -2
  67. package/dist/components/ScalarIcon/icons/Logo.svg.js +2 -2
  68. package/dist/components/ScalarIcon/icons/Magic.svg.js +2 -2
  69. package/dist/components/ScalarIcon/icons/Markdown.svg.js +2 -2
  70. package/dist/components/ScalarIcon/icons/Menu.svg.js +2 -2
  71. package/dist/components/ScalarIcon/icons/NotAllowed.svg.js +2 -2
  72. package/dist/components/ScalarIcon/icons/Page.svg.js +2 -2
  73. package/dist/components/ScalarIcon/icons/Pencil.svg.js +2 -2
  74. package/dist/components/ScalarIcon/icons/Play.svg.js +2 -2
  75. package/dist/components/ScalarIcon/icons/Refresh.svg.js +2 -2
  76. package/dist/components/ScalarIcon/icons/Roadmap.svg.js +2 -2
  77. package/dist/components/ScalarIcon/icons/Scribble.svg.js +2 -2
  78. package/dist/components/ScalarIcon/icons/Search.svg.js +2 -2
  79. package/dist/components/ScalarIcon/icons/Server.svg.js +2 -2
  80. package/dist/components/ScalarIcon/icons/Settings.svg.js +2 -2
  81. package/dist/components/ScalarIcon/icons/Show.svg.js +2 -2
  82. package/dist/components/ScalarIcon/icons/Sort.svg.js +2 -2
  83. package/dist/components/ScalarIcon/icons/Terminal.svg.js +2 -2
  84. package/dist/components/ScalarIcon/icons/Trash.svg.js +2 -2
  85. package/dist/components/ScalarIcon/icons/Unlock.svg.js +2 -2
  86. package/dist/components/ScalarIcon/icons/Unwatch.svg.js +2 -2
  87. package/dist/components/ScalarIcon/icons/Upload.svg.js +2 -2
  88. package/dist/components/ScalarIcon/icons/User.svg.js +2 -2
  89. package/dist/components/ScalarIcon/icons/UserSwitch.svg.js +2 -2
  90. package/dist/components/ScalarIcon/icons/Users.svg.js +2 -2
  91. package/dist/components/ScalarIcon/icons/Versions.svg.js +2 -2
  92. package/dist/components/ScalarIcon/icons/Wallet.svg.js +2 -2
  93. package/dist/components/ScalarIcon/icons/Watch.svg.js +2 -2
  94. package/dist/components/ScalarIcon/icons/Workspace.svg.js +2 -2
  95. package/dist/components/ScalarIcon/icons/programming-framework-angular.svg.js +2 -2
  96. package/dist/components/ScalarIcon/icons/programming-framework-astro.svg.js +2 -2
  97. package/dist/components/ScalarIcon/icons/programming-framework-laravel.svg.js +2 -2
  98. package/dist/components/ScalarIcon/icons/programming-framework-nextdotjs.svg.js +2 -2
  99. package/dist/components/ScalarIcon/icons/programming-framework-react.svg.js +2 -2
  100. package/dist/components/ScalarIcon/icons/programming-framework-vuedotjs.svg.js +2 -2
  101. package/dist/components/ScalarIcon/icons/programming-language-c.svg.js +2 -2
  102. package/dist/components/ScalarIcon/icons/programming-language-clojure.svg.js +2 -2
  103. package/dist/components/ScalarIcon/icons/programming-language-csharp.svg.js +2 -2
  104. package/dist/components/ScalarIcon/icons/programming-language-css3.svg.js +2 -2
  105. package/dist/components/ScalarIcon/icons/programming-language-dart.svg.js +2 -2
  106. package/dist/components/ScalarIcon/icons/programming-language-fsharp.svg.js +2 -2
  107. package/dist/components/ScalarIcon/icons/programming-language-go.svg.js +2 -2
  108. package/dist/components/ScalarIcon/icons/programming-language-html5.svg.js +2 -2
  109. package/dist/components/ScalarIcon/icons/programming-language-http.svg.js +2 -2
  110. package/dist/components/ScalarIcon/icons/programming-language-java.svg.js +2 -2
  111. package/dist/components/ScalarIcon/icons/programming-language-javascript.svg.js +2 -2
  112. package/dist/components/ScalarIcon/icons/programming-language-json.svg.js +2 -2
  113. package/dist/components/ScalarIcon/icons/programming-language-kotlin.svg.js +2 -2
  114. package/dist/components/ScalarIcon/icons/programming-language-node.svg.js +2 -2
  115. package/dist/components/ScalarIcon/icons/programming-language-objc.svg.js +2 -2
  116. package/dist/components/ScalarIcon/icons/programming-language-ocaml.svg.js +2 -2
  117. package/dist/components/ScalarIcon/icons/programming-language-php.svg.js +2 -2
  118. package/dist/components/ScalarIcon/icons/programming-language-powershell.svg.js +2 -2
  119. package/dist/components/ScalarIcon/icons/programming-language-python.svg.js +2 -2
  120. package/dist/components/ScalarIcon/icons/programming-language-r.svg.js +2 -2
  121. package/dist/components/ScalarIcon/icons/programming-language-ruby.svg.js +2 -2
  122. package/dist/components/ScalarIcon/icons/programming-language-rust.svg.js +2 -2
  123. package/dist/components/ScalarIcon/icons/programming-language-scala.svg.js +2 -2
  124. package/dist/components/ScalarIcon/icons/programming-language-shell.svg.js +2 -2
  125. package/dist/components/ScalarIcon/icons/programming-language-swift.svg.js +2 -2
  126. package/dist/components/ScalarIcon/icons/programming-language-typescript.svg.js +2 -2
  127. package/dist/components/ScalarIcon/icons/programming-script-code.svg.js +2 -2
  128. package/dist/components/ScalarIcon/icons/programming-tool-git.svg.js +2 -2
  129. package/dist/components/ScalarIcon/icons/programming-tool-tailwindcss.svg.js +2 -2
  130. package/dist/components/ScalarIcon/logos/Adonisjs.svg.js +2 -2
  131. package/dist/components/ScalarIcon/logos/Docusaurus.svg.js +2 -2
  132. package/dist/components/ScalarIcon/logos/Dotnet.svg.js +2 -2
  133. package/dist/components/ScalarIcon/logos/Elysiajs.svg.js +2 -2
  134. package/dist/components/ScalarIcon/logos/Express.svg.js +2 -2
  135. package/dist/components/ScalarIcon/logos/Fastapi.svg.js +2 -2
  136. package/dist/components/ScalarIcon/logos/Fastify.svg.js +2 -2
  137. package/dist/components/ScalarIcon/logos/Go.svg.js +2 -2
  138. package/dist/components/ScalarIcon/logos/Hono.svg.js +2 -2
  139. package/dist/components/ScalarIcon/logos/Laravel.svg.js +2 -2
  140. package/dist/components/ScalarIcon/logos/Litestar.svg.js +2 -2
  141. package/dist/components/ScalarIcon/logos/Nestjs.svg.js +2 -2
  142. package/dist/components/ScalarIcon/logos/Nextjs.svg.js +2 -2
  143. package/dist/components/ScalarIcon/logos/Nitro.svg.js +2 -2
  144. package/dist/components/ScalarIcon/logos/Nuxt.svg.js +2 -2
  145. package/dist/components/ScalarIcon/logos/Openapi.svg.js +2 -2
  146. package/dist/components/ScalarIcon/logos/Platformatic.svg.js +2 -2
  147. package/dist/components/ScalarIcon/logos/React.svg.js +2 -2
  148. package/dist/components/ScalarIcon/logos/Rust.svg.js +2 -2
  149. package/dist/components/ScalarIcon/logos/Svelte.svg.js +2 -2
  150. package/dist/components/ScalarIcon/logos/Vue.svg.js +2 -2
  151. package/dist/components/ScalarIconButton/ScalarIconButton.vue.js +7 -7
  152. package/dist/components/ScalarListbox/ScalarListbox.vue.js +3 -3
  153. package/dist/components/ScalarMenu/ScalarMenuLink.vue.js +4 -4
  154. package/dist/components/ScalarMenu/ScalarMenuProduct.vue.js +7 -7
  155. package/dist/components/ScalarMenu/ScalarMenuProducts.vue.js +12 -15
  156. package/dist/components/ScalarMenu/ScalarMenuResources.vue.js +17 -20
  157. package/dist/components/ScalarMenu/ScalarMenuSupport.vue.d.ts +3 -0
  158. package/dist/components/ScalarMenu/ScalarMenuSupport.vue.d.ts.map +1 -0
  159. package/dist/components/ScalarMenu/ScalarMenuSupport.vue.js +40 -0
  160. package/dist/components/ScalarMenu/ScalarMenuSupport.vue2.js +4 -0
  161. package/dist/components/ScalarMenu/ScalarMenuTeamPicker.vue.js +6 -8
  162. package/dist/components/ScalarMenu/ScalarMenuWorkspacePicker.vue.d.ts +18 -0
  163. package/dist/components/ScalarMenu/ScalarMenuWorkspacePicker.vue.d.ts.map +1 -0
  164. package/dist/components/ScalarMenu/ScalarMenuWorkspacePicker.vue.js +94 -0
  165. package/dist/components/ScalarMenu/ScalarMenuWorkspacePicker.vue2.js +4 -0
  166. package/dist/components/ScalarMenu/fixtures.d.ts +2 -0
  167. package/dist/components/ScalarMenu/fixtures.d.ts.map +1 -0
  168. package/dist/components/ScalarMenu/index.d.ts +4 -2
  169. package/dist/components/ScalarMenu/index.d.ts.map +1 -1
  170. package/dist/components/ScalarModal/ScalarModal.vue.d.ts +6 -2
  171. package/dist/components/ScalarModal/ScalarModal.vue.d.ts.map +1 -1
  172. package/dist/components/ScalarModal/ScalarModal.vue.js +4 -4
  173. package/dist/components/ScalarModal/ScalarModal.vue2.js +27 -24
  174. package/dist/components/ScalarSearchInput/ScalarSearchInput.vue.js +9 -9
  175. package/dist/components/ScalarSearchResults/ScalarSearchResultItem.vue.js +6 -6
  176. package/dist/components/ScalarSidebar/ScalarSidebarButton.vue.d.ts.map +1 -1
  177. package/dist/components/ScalarSidebar/ScalarSidebarButton.vue.js +34 -38
  178. package/dist/components/ScalarSidebar/ScalarSidebarGroup.vue.d.ts +22 -29
  179. package/dist/components/ScalarSidebar/ScalarSidebarGroup.vue.d.ts.map +1 -1
  180. package/dist/components/ScalarSidebar/ScalarSidebarGroup.vue.js +47 -41
  181. package/dist/components/ScalarSidebar/ScalarSidebarGroupToggle.vue.d.ts.map +1 -1
  182. package/dist/components/ScalarSidebar/ScalarSidebarGroupToggle.vue.js +9 -9
  183. package/dist/components/ScalarSidebar/ScalarSidebarIndent.vue.js +4 -4
  184. package/dist/components/ScalarSidebar/ScalarSidebarIndent.vue2.js +4 -4
  185. package/dist/components/ScalarSidebar/ScalarSidebarItem.vue.d.ts.map +1 -1
  186. package/dist/components/ScalarSidebar/ScalarSidebarItem.vue.js +12 -12
  187. package/dist/components/ScalarSidebar/ScalarSidebarNestedItems.vue.d.ts +10 -7
  188. package/dist/components/ScalarSidebar/ScalarSidebarNestedItems.vue.d.ts.map +1 -1
  189. package/dist/components/ScalarSidebar/ScalarSidebarNestedItems.vue.js +123 -0
  190. package/dist/components/ScalarSidebar/ScalarSidebarNestedItems.vue2.js +4 -0
  191. package/dist/components/ScalarSidebar/ScalarSidebarSearchButton.vue.js +1 -1
  192. package/dist/components/ScalarSidebar/ScalarSidebarSearchInput.vue.js +11 -11
  193. package/dist/components/ScalarSidebar/ScalarSidebarSection.vue.js +9 -9
  194. package/dist/components/ScalarSidebar/findScrollContainer.js +22 -0
  195. package/dist/components/ScalarSidebar/index.d.ts +3 -0
  196. package/dist/components/ScalarSidebar/index.d.ts.map +1 -1
  197. package/dist/components/ScalarSidebar/types.d.ts +53 -1
  198. package/dist/components/ScalarSidebar/types.d.ts.map +1 -1
  199. package/dist/components/ScalarSidebar/useSidebarNestedItems.js +13 -7
  200. package/dist/components/ScalarTextArea/ScalarTextArea.vue.d.ts.map +1 -1
  201. package/dist/components/ScalarTextArea/ScalarTextArea.vue.js +14 -10
  202. package/dist/components/ScalarTextInput/ScalarTextInput.vue.d.ts.map +1 -1
  203. package/dist/components/ScalarTextInput/ScalarTextInput.vue.js +14 -11
  204. package/dist/components/ScalarToggle/ScalarToggleInput.vue.js +3 -3
  205. package/dist/docs/useBindCx/MockComponents.d.ts +154 -0
  206. package/dist/docs/useBindCx/MockComponents.d.ts.map +1 -0
  207. package/dist/index.js +144 -134
  208. package/dist/style.css +1 -1
  209. package/package.json +11 -11
  210. package/dist/docs/useBindCx/MockComponent.d.ts +0 -76
  211. package/dist/docs/useBindCx/MockComponent.d.ts.map +0 -1
@@ -1,75 +1,81 @@
1
- import { defineComponent as p, mergeModels as m, useModel as c, createElementBlock as f, openBlock as r, renderSlot as t, createBlock as v, createCommentVNode as b, unref as l, createVNode as s, withCtx as n, resolveDynamicComponent as B, normalizeProps as _, mergeProps as g } from "vue";
2
- import { useBindCx as $ } from "@scalar/use-hooks/useBindCx";
3
- import y from "./ScalarSidebarButton.vue.js";
4
- import C from "./ScalarSidebarGroupToggle.vue.js";
5
- import S from "./ScalarSidebarIndent.vue.js";
6
- import { useSidebarGroups as k } from "./useSidebarGroups.js";
7
- const V = { class: "group/item contents" }, x = {}, A = /* @__PURE__ */ p({
8
- ...x,
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__ */ m({
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
- modelValue: { type: Boolean, default: !1 },
20
- modelModifiers: {}
20
+ open: { type: Boolean, default: !1 },
21
+ openModifiers: {}
21
22
  }),
22
- emits: ["update:modelValue"],
23
- setup(d) {
24
- const e = c(d, "modelValue"), { level: a } = k({ increment: !0 }), { cx: u } = $();
25
- return (o, i) => (r(), f("li", V, [
26
- t(o.$slots, "button", {
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: !!e.value
29
+ open: o.value
29
30
  }, () => [
30
- s(y, {
31
+ s(k, d({
31
32
  is: "button",
32
- active: o.active,
33
- "aria-expanded": e.value,
33
+ active: e.active,
34
+ "aria-expanded": o.value,
34
35
  class: "group/group-button",
35
- disabled: o.disabled,
36
+ disabled: e.disabled,
36
37
  indent: l(a),
37
- selected: o.selected,
38
- onClick: i[0] || (i[0] = (M) => e.value = !e.value)
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(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(o.$slots, "icon", { open: e.value }, () => [
48
- s(C, {
49
+ t(e.$slots, "icon", { open: o.value }, () => [
50
+ s(_, {
49
51
  class: "text-c-3",
50
- open: e.value
52
+ open: o.value
51
53
  }, null, 8, ["open"])
52
54
  ])
53
55
  ]),
54
56
  default: n(() => [
55
- t(o.$slots, "default", {
56
- open: !!e.value
57
- })
57
+ t(e.$slots, "default", { open: o.value })
58
58
  ]),
59
- _: 3
60
- }, 8, ["active", "aria-expanded", "disabled", "indent", "selected"])
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
- e.value ? (r(), v(B(o.is), _(g({ key: 0 }, l(u)("group/items flex flex-col gap-px"))), {
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(o.$slots, "items", {
65
- open: !!e.value
66
- })
72
+ t(e.$slots, "items", { open: o.value })
67
73
  ]),
68
74
  _: 3
69
- }, 16)) : b("", !0)
75
+ }, 16)) : g("", !0)
70
76
  ]));
71
77
  }
72
78
  });
73
79
  export {
74
- A as default
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":"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;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
+ {"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 l, mergeProps as p, unref as o, withCtx as f, renderSlot as r, createElementVNode as c, createTextVNode as u, toDisplayString as d } from "vue";
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 _ } from "@scalar/use-hooks/useBindCx";
4
- import b from "../ScalarIcon/ScalarIconLegacyAdapter.vue.js";
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(l(e.is), p({
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: f(() => [
23
+ default: c(() => [
24
24
  r(e.$slots, "default", { open: e.open }, () => [
25
- e.icon ? (t(), n(o(b), {
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
- c("span", g, [
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 o from "./ScalarSidebarIndent.vue2.js";
1
+ import a from "./ScalarSidebarIndent.vue2.js";
2
2
  /* empty css */
3
- import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const c = /* @__PURE__ */ r(o, [["__scopeId", "data-v-3e080c68"]]);
3
+ import o from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ o(a, [["__scopeId", "data-v-48a21042"]]);
5
5
  export {
6
- c as default
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 g, normalizeClass as y } from "vue";
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: y([
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)) : g("", !0)
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":"AAmDA,OAAO,KAAK,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAI7E;;;;;;;;;;;;;;;;;GAiBG;;AACH,wBAwEC;AAOD,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
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 d, createSlots as c, renderList as _, withCtx as m, renderSlot as f } from "vue";
2
- import u from "./ScalarSidebarButton.vue.js";
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" }, h = {}, C = /* @__PURE__ */ r({
5
- ...h,
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, b) => (a(), i("li", B, [
20
- l(u, p({ ...e.$attrs, ...e.$props }, {
21
- indent: e.indent ?? d(n)
22
- }), c({ _: 2 }, [
23
- _(o, (v, t) => ({
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
- f(e.$slots, t)
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
- modelValue?: boolean;
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:modelValue": (value: boolean) => any;
22
- }, string, import("vue").PublicProps, Readonly<ScalarSidebarItemProps & {
23
- modelValue?: boolean;
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:modelValue"?: ((value: boolean) => any) | undefined;
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":"AAmKA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAKrD;;;;;;;;;;;;;;;GAeG;;iBAgEU,OAAO;;;;iBAAP,OAAO;;;;IAvDlB,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"}
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
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./ScalarSidebarNestedItems.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -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 x, createBlock as s, createCommentVNode as y, createElementVNode as C, mergeProps as M, vModelText as V, withModifiers as z } from "vue";
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 E } from "@scalar/use-hooks/useBindCx";
4
- import I from "../ScalarLoading/ScalarLoading.vue.js";
5
- import N from "../ScalarIconButton/ScalarIconButton.vue.js";
6
- const P = ["aria-label"], D = /* @__PURE__ */ f({
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 { classCx: c, otherAttrs: u } = E();
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
- x(C("input", M({
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, P), [
45
+ }), null, 16, N), [
46
46
  [V, a.value]
47
47
  ]),
48
- l.loading && l.loading.isLoading ? (r(), s(e(I), {
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(N), {
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"])) : y("", !0)
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 o, withCtx as i, renderSlot as r, resolveDynamicComponent as f, normalizeProps as m, guardReactiveProps as u } from "vue";
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: t } = B({ increment: !1 }), { cx: l } = _();
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(t)
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
- indent: o(t),
28
+ disabled: "",
29
29
  icon: e.icon,
30
- disabled: ""
30
+ indent: t(o)
31
31
  }, {
32
32
  default: i(() => [
33
33
  r(e.$slots, "default")
34
34
  ]),
35
35
  _: 3
36
- }, 8, ["indent", "icon"]),
37
- (s(), p(f(e.is), m(u(o(l)("flex flex-col gap-px"))), {
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(t)
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"}