@scalar/components 0.15.1 → 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 (208) 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/ScalarColorModeToggle/ScalarColorModeToggleIcon.vue2.js +5 -6
  6. package/dist/components/ScalarCombobox/ScalarComboboxOptions.vue.js +28 -28
  7. package/dist/components/ScalarDropdown/ScalarDropdownItem.vue2.js +2 -2
  8. package/dist/components/ScalarFileUpload/ScalarFileUploadDropTarget.vue.js +1 -1
  9. package/dist/components/ScalarFileUpload/ScalarFileUploadFileList.vue.js +8 -10
  10. package/dist/components/ScalarFileUpload/ScalarFileUploadInput.vue.js +4 -5
  11. package/dist/components/ScalarIcon/ScalarIconLegacyAdapter.vue.js +3 -3
  12. package/dist/components/ScalarIcon/icons/Add.svg.js +2 -2
  13. package/dist/components/ScalarIcon/icons/AddTab.svg.js +2 -2
  14. package/dist/components/ScalarIcon/icons/Alert.svg.js +2 -2
  15. package/dist/components/ScalarIcon/icons/ArrowLeft.svg.js +2 -2
  16. package/dist/components/ScalarIcon/icons/ArrowRight.svg.js +2 -2
  17. package/dist/components/ScalarIcon/icons/Brackets.svg.js +2 -2
  18. package/dist/components/ScalarIcon/icons/Branch.svg.js +2 -2
  19. package/dist/components/ScalarIcon/icons/Changelog.svg.js +2 -2
  20. package/dist/components/ScalarIcon/icons/Checkmark.svg.js +2 -2
  21. package/dist/components/ScalarIcon/icons/ChevronDown.svg.js +2 -2
  22. package/dist/components/ScalarIcon/icons/ChevronLeft.svg.js +2 -2
  23. package/dist/components/ScalarIcon/icons/ChevronRight.svg.js +2 -2
  24. package/dist/components/ScalarIcon/icons/ChevronUp.svg.js +2 -2
  25. package/dist/components/ScalarIcon/icons/Clipboard.svg.js +2 -2
  26. package/dist/components/ScalarIcon/icons/Close.svg.js +2 -2
  27. package/dist/components/ScalarIcon/icons/CloseTab.svg.js +2 -2
  28. package/dist/components/ScalarIcon/icons/CloseTabs.svg.js +2 -2
  29. package/dist/components/ScalarIcon/icons/Cloud.svg.js +2 -2
  30. package/dist/components/ScalarIcon/icons/CodeFolder.svg.js +2 -2
  31. package/dist/components/ScalarIcon/icons/Cog.svg.js +2 -2
  32. package/dist/components/ScalarIcon/icons/Collection.svg.js +2 -2
  33. package/dist/components/ScalarIcon/icons/Cookie.svg.js +2 -2
  34. package/dist/components/ScalarIcon/icons/DarkMode.svg.js +2 -2
  35. package/dist/components/ScalarIcon/icons/Delete.svg.js +2 -2
  36. package/dist/components/ScalarIcon/icons/Discord.svg.js +2 -2
  37. package/dist/components/ScalarIcon/icons/DocsPage.svg.js +2 -2
  38. package/dist/components/ScalarIcon/icons/Download.svg.js +2 -2
  39. package/dist/components/ScalarIcon/icons/Duplicate.svg.js +2 -2
  40. package/dist/components/ScalarIcon/icons/Edit.svg.js +2 -2
  41. package/dist/components/ScalarIcon/icons/Ellipses.svg.js +2 -2
  42. package/dist/components/ScalarIcon/icons/Email.svg.js +2 -2
  43. package/dist/components/ScalarIcon/icons/Error.svg.js +2 -2
  44. package/dist/components/ScalarIcon/icons/Example.svg.js +2 -2
  45. package/dist/components/ScalarIcon/icons/ExternalLink.svg.js +2 -2
  46. package/dist/components/ScalarIcon/icons/FilterList.svg.js +2 -2
  47. package/dist/components/ScalarIcon/icons/Folder.svg.js +2 -2
  48. package/dist/components/ScalarIcon/icons/GitHub.svg.js +2 -2
  49. package/dist/components/ScalarIcon/icons/GitHubLine.svg.js +2 -2
  50. package/dist/components/ScalarIcon/icons/Globe.svg.js +2 -2
  51. package/dist/components/ScalarIcon/icons/Google.svg.js +2 -2
  52. package/dist/components/ScalarIcon/icons/Help.svg.js +2 -2
  53. package/dist/components/ScalarIcon/icons/Hide.svg.js +2 -2
  54. package/dist/components/ScalarIcon/icons/History.svg.js +2 -2
  55. package/dist/components/ScalarIcon/icons/House.svg.js +2 -2
  56. package/dist/components/ScalarIcon/icons/Import.svg.js +2 -2
  57. package/dist/components/ScalarIcon/icons/Info.svg.js +2 -2
  58. package/dist/components/ScalarIcon/icons/Key.svg.js +2 -2
  59. package/dist/components/ScalarIcon/icons/Leave.svg.js +2 -2
  60. package/dist/components/ScalarIcon/icons/LightDarkModeToggle.svg.js +2 -2
  61. package/dist/components/ScalarIcon/icons/LightMode.svg.js +2 -2
  62. package/dist/components/ScalarIcon/icons/Link.svg.js +2 -2
  63. package/dist/components/ScalarIcon/icons/Lock.svg.js +2 -2
  64. package/dist/components/ScalarIcon/icons/Logo.svg.js +2 -2
  65. package/dist/components/ScalarIcon/icons/Magic.svg.js +2 -2
  66. package/dist/components/ScalarIcon/icons/Markdown.svg.js +2 -2
  67. package/dist/components/ScalarIcon/icons/Menu.svg.js +2 -2
  68. package/dist/components/ScalarIcon/icons/NotAllowed.svg.js +2 -2
  69. package/dist/components/ScalarIcon/icons/Page.svg.js +2 -2
  70. package/dist/components/ScalarIcon/icons/Pencil.svg.js +2 -2
  71. package/dist/components/ScalarIcon/icons/Play.svg.js +2 -2
  72. package/dist/components/ScalarIcon/icons/Refresh.svg.js +2 -2
  73. package/dist/components/ScalarIcon/icons/Roadmap.svg.js +2 -2
  74. package/dist/components/ScalarIcon/icons/Scribble.svg.js +2 -2
  75. package/dist/components/ScalarIcon/icons/Search.svg.js +2 -2
  76. package/dist/components/ScalarIcon/icons/Server.svg.js +2 -2
  77. package/dist/components/ScalarIcon/icons/Settings.svg.js +2 -2
  78. package/dist/components/ScalarIcon/icons/Show.svg.js +2 -2
  79. package/dist/components/ScalarIcon/icons/Sort.svg.js +2 -2
  80. package/dist/components/ScalarIcon/icons/Terminal.svg.js +2 -2
  81. package/dist/components/ScalarIcon/icons/Trash.svg.js +2 -2
  82. package/dist/components/ScalarIcon/icons/Unlock.svg.js +2 -2
  83. package/dist/components/ScalarIcon/icons/Unwatch.svg.js +2 -2
  84. package/dist/components/ScalarIcon/icons/Upload.svg.js +2 -2
  85. package/dist/components/ScalarIcon/icons/User.svg.js +2 -2
  86. package/dist/components/ScalarIcon/icons/UserSwitch.svg.js +2 -2
  87. package/dist/components/ScalarIcon/icons/Users.svg.js +2 -2
  88. package/dist/components/ScalarIcon/icons/Versions.svg.js +2 -2
  89. package/dist/components/ScalarIcon/icons/Wallet.svg.js +2 -2
  90. package/dist/components/ScalarIcon/icons/Watch.svg.js +2 -2
  91. package/dist/components/ScalarIcon/icons/Workspace.svg.js +2 -2
  92. package/dist/components/ScalarIcon/icons/programming-framework-angular.svg.js +2 -2
  93. package/dist/components/ScalarIcon/icons/programming-framework-astro.svg.js +2 -2
  94. package/dist/components/ScalarIcon/icons/programming-framework-laravel.svg.js +2 -2
  95. package/dist/components/ScalarIcon/icons/programming-framework-nextdotjs.svg.js +2 -2
  96. package/dist/components/ScalarIcon/icons/programming-framework-react.svg.js +2 -2
  97. package/dist/components/ScalarIcon/icons/programming-framework-vuedotjs.svg.js +2 -2
  98. package/dist/components/ScalarIcon/icons/programming-language-c.svg.js +2 -2
  99. package/dist/components/ScalarIcon/icons/programming-language-clojure.svg.js +2 -2
  100. package/dist/components/ScalarIcon/icons/programming-language-csharp.svg.js +2 -2
  101. package/dist/components/ScalarIcon/icons/programming-language-css3.svg.js +2 -2
  102. package/dist/components/ScalarIcon/icons/programming-language-dart.svg.js +2 -2
  103. package/dist/components/ScalarIcon/icons/programming-language-fsharp.svg.js +2 -2
  104. package/dist/components/ScalarIcon/icons/programming-language-go.svg.js +2 -2
  105. package/dist/components/ScalarIcon/icons/programming-language-html5.svg.js +2 -2
  106. package/dist/components/ScalarIcon/icons/programming-language-http.svg.js +2 -2
  107. package/dist/components/ScalarIcon/icons/programming-language-java.svg.js +2 -2
  108. package/dist/components/ScalarIcon/icons/programming-language-javascript.svg.js +2 -2
  109. package/dist/components/ScalarIcon/icons/programming-language-json.svg.js +2 -2
  110. package/dist/components/ScalarIcon/icons/programming-language-kotlin.svg.js +2 -2
  111. package/dist/components/ScalarIcon/icons/programming-language-node.svg.js +2 -2
  112. package/dist/components/ScalarIcon/icons/programming-language-objc.svg.js +2 -2
  113. package/dist/components/ScalarIcon/icons/programming-language-ocaml.svg.js +2 -2
  114. package/dist/components/ScalarIcon/icons/programming-language-php.svg.js +2 -2
  115. package/dist/components/ScalarIcon/icons/programming-language-powershell.svg.js +2 -2
  116. package/dist/components/ScalarIcon/icons/programming-language-python.svg.js +2 -2
  117. package/dist/components/ScalarIcon/icons/programming-language-r.svg.js +2 -2
  118. package/dist/components/ScalarIcon/icons/programming-language-ruby.svg.js +2 -2
  119. package/dist/components/ScalarIcon/icons/programming-language-rust.svg.js +2 -2
  120. package/dist/components/ScalarIcon/icons/programming-language-scala.svg.js +2 -2
  121. package/dist/components/ScalarIcon/icons/programming-language-shell.svg.js +2 -2
  122. package/dist/components/ScalarIcon/icons/programming-language-swift.svg.js +2 -2
  123. package/dist/components/ScalarIcon/icons/programming-language-typescript.svg.js +2 -2
  124. package/dist/components/ScalarIcon/icons/programming-script-code.svg.js +2 -2
  125. package/dist/components/ScalarIcon/icons/programming-tool-git.svg.js +2 -2
  126. package/dist/components/ScalarIcon/icons/programming-tool-tailwindcss.svg.js +2 -2
  127. package/dist/components/ScalarIcon/logos/Adonisjs.svg.js +2 -2
  128. package/dist/components/ScalarIcon/logos/Docusaurus.svg.js +2 -2
  129. package/dist/components/ScalarIcon/logos/Dotnet.svg.js +2 -2
  130. package/dist/components/ScalarIcon/logos/Elysiajs.svg.js +2 -2
  131. package/dist/components/ScalarIcon/logos/Express.svg.js +2 -2
  132. package/dist/components/ScalarIcon/logos/Fastapi.svg.js +2 -2
  133. package/dist/components/ScalarIcon/logos/Fastify.svg.js +2 -2
  134. package/dist/components/ScalarIcon/logos/Go.svg.js +2 -2
  135. package/dist/components/ScalarIcon/logos/Hono.svg.js +2 -2
  136. package/dist/components/ScalarIcon/logos/Laravel.svg.js +2 -2
  137. package/dist/components/ScalarIcon/logos/Litestar.svg.js +2 -2
  138. package/dist/components/ScalarIcon/logos/Nestjs.svg.js +2 -2
  139. package/dist/components/ScalarIcon/logos/Nextjs.svg.js +2 -2
  140. package/dist/components/ScalarIcon/logos/Nitro.svg.js +2 -2
  141. package/dist/components/ScalarIcon/logos/Nuxt.svg.js +2 -2
  142. package/dist/components/ScalarIcon/logos/Openapi.svg.js +2 -2
  143. package/dist/components/ScalarIcon/logos/Platformatic.svg.js +2 -2
  144. package/dist/components/ScalarIcon/logos/React.svg.js +2 -2
  145. package/dist/components/ScalarIcon/logos/Rust.svg.js +2 -2
  146. package/dist/components/ScalarIcon/logos/Svelte.svg.js +2 -2
  147. package/dist/components/ScalarIcon/logos/Vue.svg.js +2 -2
  148. package/dist/components/ScalarIconButton/ScalarIconButton.vue.js +7 -7
  149. package/dist/components/ScalarListbox/ScalarListbox.vue.js +3 -3
  150. package/dist/components/ScalarMenu/ScalarMenuLink.vue.js +4 -4
  151. package/dist/components/ScalarMenu/ScalarMenuProduct.vue.js +7 -7
  152. package/dist/components/ScalarMenu/ScalarMenuProducts.vue.js +12 -15
  153. package/dist/components/ScalarMenu/ScalarMenuResources.vue.js +17 -20
  154. package/dist/components/ScalarMenu/ScalarMenuSupport.vue.d.ts +3 -0
  155. package/dist/components/ScalarMenu/ScalarMenuSupport.vue.d.ts.map +1 -0
  156. package/dist/components/ScalarMenu/ScalarMenuSupport.vue.js +40 -0
  157. package/dist/components/ScalarMenu/ScalarMenuSupport.vue2.js +4 -0
  158. package/dist/components/ScalarMenu/ScalarMenuTeamPicker.vue.js +6 -8
  159. package/dist/components/ScalarMenu/ScalarMenuWorkspacePicker.vue.d.ts +18 -0
  160. package/dist/components/ScalarMenu/ScalarMenuWorkspacePicker.vue.d.ts.map +1 -0
  161. package/dist/components/ScalarMenu/ScalarMenuWorkspacePicker.vue.js +94 -0
  162. package/dist/components/ScalarMenu/ScalarMenuWorkspacePicker.vue2.js +4 -0
  163. package/dist/components/ScalarMenu/fixtures.d.ts +2 -0
  164. package/dist/components/ScalarMenu/fixtures.d.ts.map +1 -0
  165. package/dist/components/ScalarMenu/index.d.ts +4 -2
  166. package/dist/components/ScalarMenu/index.d.ts.map +1 -1
  167. package/dist/components/ScalarModal/ScalarModal.vue.d.ts +6 -2
  168. package/dist/components/ScalarModal/ScalarModal.vue.d.ts.map +1 -1
  169. package/dist/components/ScalarModal/ScalarModal.vue.js +4 -4
  170. package/dist/components/ScalarModal/ScalarModal.vue2.js +27 -24
  171. package/dist/components/ScalarSearchInput/ScalarSearchInput.vue.js +9 -9
  172. package/dist/components/ScalarSearchResults/ScalarSearchResultItem.vue.js +6 -6
  173. package/dist/components/ScalarSidebar/ScalarSidebarButton.vue.d.ts.map +1 -1
  174. package/dist/components/ScalarSidebar/ScalarSidebarButton.vue.js +34 -38
  175. package/dist/components/ScalarSidebar/ScalarSidebarGroup.vue.d.ts +22 -29
  176. package/dist/components/ScalarSidebar/ScalarSidebarGroup.vue.d.ts.map +1 -1
  177. package/dist/components/ScalarSidebar/ScalarSidebarGroup.vue.js +47 -41
  178. package/dist/components/ScalarSidebar/ScalarSidebarGroupToggle.vue.d.ts.map +1 -1
  179. package/dist/components/ScalarSidebar/ScalarSidebarGroupToggle.vue.js +9 -9
  180. package/dist/components/ScalarSidebar/ScalarSidebarIndent.vue.js +4 -4
  181. package/dist/components/ScalarSidebar/ScalarSidebarIndent.vue2.js +4 -4
  182. package/dist/components/ScalarSidebar/ScalarSidebarItem.vue.d.ts.map +1 -1
  183. package/dist/components/ScalarSidebar/ScalarSidebarItem.vue.js +12 -12
  184. package/dist/components/ScalarSidebar/ScalarSidebarNestedItems.vue.d.ts +10 -7
  185. package/dist/components/ScalarSidebar/ScalarSidebarNestedItems.vue.d.ts.map +1 -1
  186. package/dist/components/ScalarSidebar/ScalarSidebarNestedItems.vue.js +123 -0
  187. package/dist/components/ScalarSidebar/ScalarSidebarNestedItems.vue2.js +4 -0
  188. package/dist/components/ScalarSidebar/ScalarSidebarSearchButton.vue.js +1 -1
  189. package/dist/components/ScalarSidebar/ScalarSidebarSearchInput.vue.js +11 -11
  190. package/dist/components/ScalarSidebar/ScalarSidebarSection.vue.js +9 -9
  191. package/dist/components/ScalarSidebar/findScrollContainer.js +22 -0
  192. package/dist/components/ScalarSidebar/index.d.ts +3 -0
  193. package/dist/components/ScalarSidebar/index.d.ts.map +1 -1
  194. package/dist/components/ScalarSidebar/types.d.ts +53 -1
  195. package/dist/components/ScalarSidebar/types.d.ts.map +1 -1
  196. package/dist/components/ScalarSidebar/useSidebarNestedItems.js +13 -7
  197. package/dist/components/ScalarTextArea/ScalarTextArea.vue.d.ts.map +1 -1
  198. package/dist/components/ScalarTextArea/ScalarTextArea.vue.js +14 -10
  199. package/dist/components/ScalarTextInput/ScalarTextInput.vue.d.ts.map +1 -1
  200. package/dist/components/ScalarTextInput/ScalarTextInput.vue.js +14 -11
  201. package/dist/components/ScalarToggle/ScalarToggleInput.vue.js +3 -3
  202. package/dist/docs/useBindCx/MockComponents.d.ts +154 -0
  203. package/dist/docs/useBindCx/MockComponents.d.ts.map +1 -0
  204. package/dist/index.js +144 -134
  205. package/dist/style.css +1 -1
  206. package/package.json +11 -11
  207. package/dist/docs/useBindCx/MockComponent.d.ts +0 -76
  208. package/dist/docs/useBindCx/MockComponent.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarModal.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarModal/ScalarModal.vue"],"names":[],"mappings":"AAgNA,+CAA+C;AAC/C,wBAAgB,QAAQ;;;;EAUvB;;WAMQ,UAAU,CAAC,OAAO,QAAQ,CAAC;YAC1B,MAAM;gBACF,MAAM;eACP,MAAM;;;;WAHV,UAAU,CAAC,OAAO,QAAQ,CAAC;YAC1B,MAAM;gBACF,MAAM;eACP,MAAM;;;;cA+LL,CAAC,KAAK,IAAiB,KAAK,GAAG;;cAC/B,CAAC,KAAK,IAAiB,KAAK,GAAG;;AAvM7C,wBAyOK;AAOL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"ScalarModal.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarModal/ScalarModal.vue"],"names":[],"mappings":"AAyNA,+CAA+C;AAC/C,wBAAgB,QAAQ;;;;EAUvB;;WAMQ,UAAU,CAAC,OAAO,QAAQ,CAAC;YAC1B,MAAM;gBACF,MAAM;eACP,MAAM;;;;;;WAHV,UAAU,CAAC,OAAO,QAAQ,CAAC;YAC1B,MAAM;gBACF,MAAM;eACP,MAAM;;;;;;cAuML,CAAC,KAAK,IAAiB,KAAK,GAAG;;cAC/B,CAAC,KAAK,IAAiB,KAAK,GAAG;;AA/M7C,wBAoPK;AAOL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,9 +1,9 @@
1
1
  import o from "./ScalarModal.vue2.js";
2
- import { useModal as s } from "./ScalarModal.vue2.js";
2
+ import { useModal as f } from "./ScalarModal.vue2.js";
3
3
  /* empty css */
4
- import a from "../../_virtual/_plugin-vue_export-helper.js";
5
- const m = /* @__PURE__ */ a(o, [["__scopeId", "data-v-589f8aa0"]]);
4
+ import r from "../../_virtual/_plugin-vue_export-helper.js";
5
+ const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-1319c63c"]]);
6
6
  export {
7
7
  m as default,
8
- s as useModal
8
+ f as useModal
9
9
  };
@@ -1,13 +1,13 @@
1
- import { defineComponent as x, createBlock as i, openBlock as l, unref as a, withCtx as t, createElementVNode as c, normalizeClass as o, createVNode as m, createElementBlock as r, createCommentVNode as d, normalizeStyle as w, createTextVNode as b, toDisplayString as y, renderSlot as n, reactive as g } from "vue";
2
- import { Dialog as z, DialogPanel as k, DialogTitle as C } from "@headlessui/vue";
1
+ import { defineComponent as x, createBlock as i, openBlock as l, unref as a, withCtx as t, createElementVNode as w, normalizeClass as o, createVNode as m, createElementBlock as r, createCommentVNode as d, normalizeStyle as b, createTextVNode as y, toDisplayString as g, renderSlot as n, reactive as z } from "vue";
2
+ import { Dialog as k, DialogPanel as C, DialogTitle as S } from "@headlessui/vue";
3
3
  import { cva as f, cx as v } from "@scalar/use-hooks/useBindCx";
4
- import S from "../ScalarIconButton/ScalarIconButton.vue.js";
5
- const $ = {
4
+ import D from "../ScalarIconButton/ScalarIconButton.vue.js";
5
+ const N = {
6
6
  key: 0,
7
7
  class: "close-button z-10 fixed right-2 top-2"
8
8
  };
9
- function W() {
10
- return g({
9
+ function M() {
10
+ return z({
11
11
  open: !1,
12
12
  show() {
13
13
  this.open = !0;
@@ -17,7 +17,7 @@ function W() {
17
17
  }
18
18
  });
19
19
  }
20
- const E = /* @__PURE__ */ x({
20
+ const T = /* @__PURE__ */ x({
21
21
  __name: "ScalarModal",
22
22
  props: {
23
23
  state: {},
@@ -27,8 +27,9 @@ const E = /* @__PURE__ */ x({
27
27
  size: { default: "md" },
28
28
  variant: {}
29
29
  },
30
- setup(D) {
31
- const p = f({
30
+ emits: ["close"],
31
+ setup(V, { emit: p }) {
32
+ const u = p, h = f({
32
33
  base: [
33
34
  "scalar-modal",
34
35
  "flex flex-col relative mb-0 rounded-lg bg-b-1 p-0 text-left leading-snug text-c-1 opacity-0 w-[calc(100vw-12px)] md:w-[calc(100vw-16px)] lg:w-[calc(100vw-32px)]"
@@ -49,7 +50,7 @@ const E = /* @__PURE__ */ x({
49
50
  error: "scalar-modal-error"
50
51
  }
51
52
  }
52
- }), u = f({
53
+ }), c = f({
53
54
  base: ["scalar-modal-body", "relative flex-1 min-h-0 p-3"].join(" "),
54
55
  variants: {
55
56
  variant: {
@@ -68,12 +69,14 @@ const E = /* @__PURE__ */ x({
68
69
  }
69
70
  }
70
71
  });
71
- return (e, s) => (l(), i(a(z), {
72
+ return (e, s) => (l(), i(a(k), {
72
73
  open: e.state.open,
73
- onClose: s[1] || (s[1] = (h) => e.state.hide())
74
+ onClose: s[1] || (s[1] = () => {
75
+ e.state.hide(), u("close");
76
+ })
74
77
  }, {
75
78
  default: t(() => [
76
- c("div", {
79
+ w("div", {
77
80
  class: o(
78
81
  a(v)(
79
82
  e.size === "full" ? "scalar-modal-layout-full" : "scalar-modal-layout",
@@ -84,17 +87,17 @@ const E = /* @__PURE__ */ x({
84
87
  )
85
88
  )
86
89
  }, [
87
- m(a(k), {
88
- class: o(a(p)({ size: e.size, variant: e.variant })),
89
- style: w({ maxWidth: e.maxWidth })
90
+ m(a(C), {
91
+ class: o(a(h)({ size: e.size, variant: e.variant })),
92
+ style: b({ maxWidth: e.maxWidth })
90
93
  }, {
91
94
  default: t(() => [
92
- e.title ? (l(), i(a(C), {
95
+ e.title ? (l(), i(a(S), {
93
96
  key: 0,
94
97
  class: "scalar-modal-header m-0 -mb-1 rounded-lg pt-3 px-3 text-left text-sm font-medium text-c-1"
95
98
  }, {
96
99
  default: t(() => [
97
- b(y(e.title), 1)
100
+ y(g(e.title), 1)
98
101
  ]),
99
102
  _: 1
100
103
  })) : d("", !0),
@@ -105,19 +108,19 @@ const E = /* @__PURE__ */ x({
105
108
  n(e.$slots, "default", {}, void 0, !0)
106
109
  ], 2)) : (l(), r("div", {
107
110
  key: 2,
108
- class: o(a(v)(a(u)({ size: e.size, variant: e.variant }), e.bodyClass))
111
+ class: o(a(v)(a(c)({ size: e.size, variant: e.variant }), e.bodyClass))
109
112
  }, [
110
113
  n(e.$slots, "default", {}, void 0, !0)
111
114
  ], 2))
112
115
  ]),
113
116
  _: 3
114
117
  }, 8, ["class", "style"]),
115
- e.size === "full" ? (l(), r("div", $, [
116
- m(a(S), {
118
+ e.size === "full" ? (l(), r("div", N, [
119
+ m(a(D), {
117
120
  class: "hover:bg-b-3 focus:outline-none",
118
121
  icon: "Close",
119
122
  label: "Clear Search",
120
- onClose: s[0] || (s[0] = (h) => e.state.hide())
123
+ onClose: s[0] || (s[0] = ($) => e.state.hide())
121
124
  })
122
125
  ])) : d("", !0)
123
126
  ], 2)
@@ -127,6 +130,6 @@ const E = /* @__PURE__ */ x({
127
130
  }
128
131
  });
129
132
  export {
130
- E as default,
131
- W as useModal
133
+ T as default,
134
+ M as useModal
132
135
  };
@@ -1,10 +1,10 @@
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";
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 y, createElementVNode as C, mergeProps as S, 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
- import E from "../ScalarIconButton/ScalarIconButton.vue.js";
6
- const N = ["aria-label"], P = {}, q = /* @__PURE__ */ p({
7
- ...P,
5
+ import A from "../ScalarIconButton/ScalarIconButton.vue.js";
6
+ const E = ["aria-label"], N = {}, q = /* @__PURE__ */ p({
7
+ ...N,
8
8
  inheritAttrs: !1,
9
9
  __name: "ScalarSearchInput",
10
10
  props: /* @__PURE__ */ f({
@@ -20,14 +20,14 @@ const N = ["aria-label"], P = {}, q = /* @__PURE__ */ p({
20
20
  function i() {
21
21
  a.value = "", o.value && o.value.focus();
22
22
  }
23
- const { classCx: c, otherAttrs: d } = z();
23
+ const { stylingAttrsCx: c, otherAttrs: d } = z();
24
24
  return (l, r) => (t(), h("label", v(b(
25
25
  e(c)(
26
26
  "flex items-center text-lg font-medium h-10 pl-3 pr-1 py-2 gap-2.25"
27
27
  )
28
28
  )), [
29
29
  k(e(x), { class: "text-sidebar-c-search size-4" }),
30
- _(S("input", y({
30
+ _(C("input", S({
31
31
  ref_key: "inputRef",
32
32
  ref: o,
33
33
  "aria-label": l.label ?? "Enter search query",
@@ -40,7 +40,7 @@ const N = ["aria-label"], P = {}, q = /* @__PURE__ */ p({
40
40
  type: "search"
41
41
  }, e(d), {
42
42
  "onUpdate:modelValue": r[0] || (r[0] = (u) => a.value = u)
43
- }), null, 16, N), [
43
+ }), null, 16, E), [
44
44
  [V, a.value]
45
45
  ]),
46
46
  l.loading && l.loading.isLoading ? (t(), n(e(B), {
@@ -48,14 +48,14 @@ const N = ["aria-label"], P = {}, q = /* @__PURE__ */ p({
48
48
  class: "self-center",
49
49
  loadingState: l.loading,
50
50
  size: "md"
51
- }, null, 8, ["loadingState"])) : a.value ? (t(), n(e(E), {
51
+ }, null, 8, ["loadingState"])) : a.value ? (t(), n(e(A), {
52
52
  key: 1,
53
53
  class: "p-0 size-5",
54
54
  icon: "Close",
55
55
  label: "Clear Search",
56
56
  thickness: "1.5",
57
57
  onClick: M(i, ["stop", "prevent"])
58
- })) : C("", !0)
58
+ })) : y("", !0)
59
59
  ], 16));
60
60
  }
61
61
  });
@@ -4,7 +4,7 @@ import u from "../ScalarIcon/ScalarIconLegacyAdapter.vue.js";
4
4
  const f = ["aria-selected"], h = {
5
5
  key: 0,
6
6
  class: "flex h-fit items-center text-sm font-medium text-c-3 group-hover:text-c-1"
7
- }, _ = { class: "flex min-w-0 flex-1 flex-col gap-0.75" }, b = { class: "flex items-center gap-1" }, x = { class: "flex-1 truncate zoomed:!whitespace-normal break-words text-base font-medium" }, k = {
7
+ }, b = { class: "flex min-w-0 flex-1 flex-col gap-0.75" }, _ = { class: "flex items-center gap-1" }, x = { class: "flex-1 truncate zoomed:!whitespace-normal break-words text-base font-medium" }, k = {
8
8
  key: 0,
9
9
  class: "text-base text-c-2"
10
10
  }, g = {
@@ -14,7 +14,7 @@ const f = ["aria-selected"], h = {
14
14
  inheritAttrs: !1,
15
15
  __name: "ScalarSearchResultItem",
16
16
  props: {
17
- icon: {},
17
+ icon: { type: [Object, Function] },
18
18
  selected: { type: Boolean }
19
19
  },
20
20
  setup(v) {
@@ -34,14 +34,14 @@ const f = ["aria-selected"], h = {
34
34
  r(e.$slots, "icon", {}, () => [
35
35
  e.icon ? (t(), m(l(u), {
36
36
  key: 0,
37
- icon: e.icon,
38
- class: "size-4"
37
+ class: "size-4",
38
+ icon: e.icon
39
39
  }, null, 8, ["icon"])) : s("", !0)
40
40
  ]),
41
41
  i[0] || (i[0] = n("span", null, " ", -1))
42
42
  ])) : s("", !0),
43
- n("div", _, [
44
- n("div", b, [
43
+ n("div", b, [
44
+ n("div", _, [
45
45
  n("div", x, [
46
46
  r(e.$slots, "default")
47
47
  ]),
@@ -1 +1 @@
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;AAG7E;;;;;;;;;;;;;;;;;;;;;GAqBG;;AACH,wBAmIC;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":"ScalarSidebarButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/ScalarSidebarButton.vue"],"names":[],"mappings":"AAuFA,OAAO,KAAK,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAG7E;;;;;;;;;;;;;;;;;;;;;GAqBG;;AACH,wBA2HC;AAOD,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,29 +1,27 @@
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
- import { cva as b, useBindCx as v } from "@scalar/use-hooks/useBindCx";
3
- import y from "./ScalarSidebarIndent.vue.js";
4
- import h from "../ScalarIcon/ScalarIconLegacyAdapter.vue.js";
5
- const B = { class: "flex items-center gap-1 flex-1 py-2 leading-5" }, $ = {
1
+ import { defineComponent as l, createBlock as o, openBlock as s, resolveDynamicComponent as r, mergeProps as c, unref as a, withCtx as u, renderSlot as t, createElementBlock as f, createCommentVNode as n, createElementVNode as b, createVNode as p } from "vue";
2
+ import { cva as m, useBindCx as v } from "@scalar/use-hooks/useBindCx";
3
+ import h from "./ScalarSidebarIndent.vue.js";
4
+ import y from "../ScalarIcon/ScalarIconLegacyAdapter.vue.js";
5
+ const B = {
6
6
  key: 0,
7
- class: "size-4"
8
- }, g = {
9
- key: 0,
10
- class: "flex items-center"
11
- }, k = {}, w = /* @__PURE__ */ r({
12
- ...k,
7
+ class: "h-[1lh] *:size-4 mr-1"
8
+ }, k = { class: "flex-1 min-w-0" }, $ = {}, E = /* @__PURE__ */ l({
9
+ ...$,
13
10
  inheritAttrs: !1,
14
11
  __name: "ScalarSidebarButton",
15
12
  props: {
16
13
  is: { default: "a" },
17
- icon: {},
14
+ icon: { type: [Object, Function] },
18
15
  active: { type: Boolean },
19
16
  selected: { type: Boolean },
20
17
  disabled: { type: Boolean },
21
18
  indent: { default: 0 }
22
19
  },
23
- setup(C) {
24
- const d = b({
20
+ setup(g) {
21
+ const i = m({
25
22
  base: [
26
- "group/button flex items-stretch rounded px-2 font-sidebar text-c-2 no-underline"
23
+ "group/button flex items-stretch rounded p-2 ",
24
+ "font-sidebar leading-5 text-c-2 no-underline wrap-break-word"
27
25
  ],
28
26
  variants: {
29
27
  active: { true: "text-c-1 font-sidebar-active" },
@@ -34,38 +32,36 @@ const B = { class: "flex items-center gap-1 flex-1 py-2 leading-5" }, $ = {
34
32
  { selected: !1, disabled: !1, class: "hover:bg-b-2" }
35
33
  ],
36
34
  defaultVariants: { selected: !1, disabled: !1, active: !1 }
37
- }), { cx: l } = v();
38
- return (e, S) => (t(), i(c(e.is), u({
35
+ }), { cx: d } = v();
36
+ return (e, C) => (s(), o(r(e.is), c({
39
37
  "aria-selected": e.selected,
40
38
  type: e.is === "button" ? "button" : void 0
41
- }, a(l)(a(d)({ selected: e.selected, disabled: e.disabled, active: e.active }))), {
42
- default: f(() => [
43
- s(e.$slots, "indent", {}, () => [
44
- m(y, {
39
+ }, a(d)(a(i)({ selected: e.selected, disabled: e.disabled, active: e.active }))), {
40
+ default: u(() => [
41
+ t(e.$slots, "indent", {}, () => [
42
+ p(h, {
43
+ disabled: e.disabled,
45
44
  indent: e.indent,
46
- selected: e.selected,
47
- disabled: e.disabled
48
- }, null, 8, ["indent", "selected", "disabled"])
45
+ selected: e.selected
46
+ }, null, 8, ["disabled", "indent", "selected"])
49
47
  ]),
50
- p("div", B, [
51
- e.icon || e.$slots.icon ? (t(), n("div", $, [
52
- s(e.$slots, "icon", {}, () => [
53
- e.icon ? (t(), i(a(h), {
54
- key: 0,
55
- icon: e.icon
56
- }, null, 8, ["icon"])) : o("", !0)
57
- ])
58
- ])) : o("", !0),
59
- s(e.$slots, "default")
48
+ e.icon || e.$slots.icon ? (s(), f("div", B, [
49
+ t(e.$slots, "icon", {}, () => [
50
+ e.icon ? (s(), o(a(y), {
51
+ key: 0,
52
+ icon: e.icon
53
+ }, null, 8, ["icon"])) : n("", !0)
54
+ ])
55
+ ])) : n("", !0),
56
+ b("div", k, [
57
+ t(e.$slots, "default")
60
58
  ]),
61
- e.$slots.aside ? (t(), n("div", g, [
62
- s(e.$slots, "aside")
63
- ])) : o("", !0)
59
+ t(e.$slots, "aside")
64
60
  ]),
65
61
  _: 3
66
62
  }, 16, ["aria-selected", "type"]));
67
63
  }
68
64
  });
69
65
  export {
70
- w as default
66
+ E as default
71
67
  };
@@ -1,12 +1,14 @@
1
- import type { ScalarSidebarItemProps } from '../../components/ScalarSidebar/types';
2
- import { type SidebarGroupLevel } from './useSidebarGroups.js';
1
+ import type { ScalarSidebarGroupSlots } from './types';
3
2
  /**
4
3
  * Scalar Sidebar Group component
5
4
  *
6
- * A collapsible ScalarSidebarItem that can contain subitems
5
+ * A collapsible ScalarSidebarItem that can contain subitems.
6
+ *
7
+ * Classes applied to the component are passed to the inner list element.
8
+ * Other attributes (like click event) are passed to the toggle button.
7
9
  *
8
10
  * @example
9
- * <ScalarSidebarGroup v-model="open">
11
+ * <ScalarSidebarGroup>
10
12
  * <!-- Group toggle text -->
11
13
  * <template #items>
12
14
  * <ScalarSidebarItem>...</ScalarSidebarItem>
@@ -14,34 +16,25 @@ import { type SidebarGroupLevel } from './useSidebarGroups.js';
14
16
  * <ScalarSidebarItem>...</ScalarSidebarItem>
15
17
  * </template>
16
18
  * </ScalarSidebarGroup>
19
+ *
20
+ *
21
+ * By default the component has it's own internal open state, but this can be
22
+ * controlled by passing the `controlled` prop and using binding the :open prop.
23
+ *
17
24
  */
18
- declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ScalarSidebarItemProps & {
19
- modelValue?: boolean;
25
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<import("./types").ScalarSidebarItemProps & {
26
+ controlled?: boolean;
27
+ } & {
28
+ open?: boolean;
20
29
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
21
- "update:modelValue": (value: boolean) => any;
22
- }, string, import("vue").PublicProps, Readonly<ScalarSidebarItemProps & {
23
- modelValue?: boolean;
30
+ "update:open": (value: boolean) => any;
31
+ }, string, import("vue").PublicProps, Readonly<import("./types").ScalarSidebarItemProps & {
32
+ controlled?: boolean;
33
+ } & {
34
+ open?: boolean;
24
35
  }> & Readonly<{
25
- "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
26
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
27
- /** The text content of the toggle */
28
- default?(props: {
29
- open: boolean;
30
- }): unknown;
31
- /** Override the entire toggle button */
32
- button?(props: {
33
- open: boolean;
34
- level: SidebarGroupLevel;
35
- }): unknown;
36
- /** The list of sidebar subitems */
37
- items?(props: {
38
- open: boolean;
39
- }): unknown;
40
- /** Side icon for the sidebar group */
41
- icon?(props: {
42
- open: boolean;
43
- }): unknown;
44
- }>;
36
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
37
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ScalarSidebarGroupSlots>;
45
38
  export default _default;
46
39
  type __VLS_WithSlots<T, S> = T & {
47
40
  new (): {
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarSidebarGroup.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/ScalarSidebarGroup.vue"],"names":[],"mappings":"AA2FA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAA;AAM9E,OAAO,EAAE,KAAK,iBAAiB,EAAoB,MAAM,oBAAoB,CAAA;AAG7E;;;;;;;;;;;;;;GAcG;;iBA8BU,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;IACzC,sCAAsC;iBACzB;QAAE,IAAI,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO;;AAd1C,wBAqKC;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":"ScalarSidebarGroup.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/ScalarSidebarGroup.vue"],"names":[],"mappings":"AAuGA,OAAO,KAAK,EAA2B,uBAAuB,EAAE,MAAM,SAAS,CAAA;AAI/E;;;;;;;;;;;;;;;;;;;;;;GAsBG;;;;WAqBM,OAAO;;;;;;WAAP,OAAO;;;;AApBhB,wBAyKC;AAOD,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -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
  }