@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":"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"}
@@ -1,7 +1,7 @@
1
+ import type { ScalarIconComponent } from '@scalar/icons/types';
1
2
  import type { Component } from 'vue';
2
3
  import type { Icon } from '../ScalarIcon';
3
4
  import type { SidebarGroupLevel } from './useSidebarGroups.js';
4
- import type { ScalarIconComponent } from '@scalar/icons/types';
5
5
  /** Scalar Sidebar Item Props */
6
6
  export type ScalarSidebarItemProps = {
7
7
  /** Overrides the rendered element */
@@ -25,6 +25,29 @@ export type ScalarSidebarItemProps = {
25
25
  /** The level of the sidebar group */
26
26
  indent?: SidebarGroupLevel;
27
27
  };
28
+ export type ScalarSidebarGroupProps = ScalarSidebarItemProps & {
29
+ /**
30
+ * Disables the internal open state for the group
31
+ *
32
+ *
33
+ * @example
34
+ * <script setup lang="ts">
35
+ * import { ref } from 'vue'
36
+ *
37
+ * // External state to control the group
38
+ * const myRef = ref(false)
39
+ * </script>
40
+ * <template>
41
+ * <ScalarSidebarGroup
42
+ * :open="myRef"
43
+ * controlled
44
+ * @click="myRef = !myRef">
45
+ * ...
46
+ * </ScalarSidebarGroup>
47
+ * </template>
48
+ */
49
+ controlled?: boolean;
50
+ };
28
51
  /** Scalar Sidebar Item Slots */
29
52
  export type ScalarSidebarItemSlots = {
30
53
  /** The main text content of the button */
@@ -36,4 +59,33 @@ export type ScalarSidebarItemSlots = {
36
59
  /** The indent to display before content */
37
60
  indent?(): unknown;
38
61
  };
62
+ /** Scalar Sidebar Item Slots */
63
+ export type ScalarSidebarGroupSlots = {
64
+ /** The text content of the toggle */
65
+ default?(props: {
66
+ open: boolean;
67
+ }): unknown;
68
+ /** Override the entire toggle button */
69
+ button?(props: {
70
+ open: boolean;
71
+ level: SidebarGroupLevel;
72
+ }): unknown;
73
+ /** Icon for the sidebar group */
74
+ icon?(props: {
75
+ open: boolean;
76
+ }): unknown;
77
+ /** Override the entire toggle button */
78
+ button?(props: {
79
+ open: boolean;
80
+ level: SidebarGroupLevel;
81
+ }): unknown;
82
+ /** The content to display to the right of the text content */
83
+ aside?(props: {
84
+ open: boolean;
85
+ }): unknown;
86
+ /** The list of sidebar subitems */
87
+ items?(props: {
88
+ open: boolean;
89
+ }): unknown;
90
+ };
39
91
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAEpC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAE9D,gCAAgC;AAChC,MAAM,MAAM,sBAAsB,GAAG;IACnC,qCAAqC;IACrC,EAAE,CAAC,EAAE,SAAS,GAAG,MAAM,CAAA;IACvB,iCAAiC;IACjC,IAAI,CAAC,EAAE,IAAI,GAAG,mBAAmB,CAAA;IACjC;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,qCAAqC;IACrC,MAAM,CAAC,EAAE,iBAAiB,CAAA;CAC3B,CAAA;AAED,gCAAgC;AAChC,MAAM,MAAM,sBAAsB,GAAG;IACnC,0CAA0C;IAC1C,OAAO,CAAC,IAAI,OAAO,CAAA;IACnB,wBAAwB;IACxB,IAAI,CAAC,IAAI,OAAO,CAAA;IAChB,8DAA8D;IAC9D,KAAK,CAAC,IAAI,OAAO,CAAA;IACjB,2CAA2C;IAC3C,MAAM,CAAC,IAAI,OAAO,CAAA;CACnB,CAAA"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAEpC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAE3D,gCAAgC;AAChC,MAAM,MAAM,sBAAsB,GAAG;IACnC,qCAAqC;IACrC,EAAE,CAAC,EAAE,SAAS,GAAG,MAAM,CAAA;IACvB,iCAAiC;IACjC,IAAI,CAAC,EAAE,IAAI,GAAG,mBAAmB,CAAA;IACjC;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,qCAAqC;IACrC,MAAM,CAAC,EAAE,iBAAiB,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,sBAAsB,GAAG;IAC7D;;;;;;;;;;;;;;;;;;;OAmBG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AAED,gCAAgC;AAChC,MAAM,MAAM,sBAAsB,GAAG;IACnC,0CAA0C;IAC1C,OAAO,CAAC,IAAI,OAAO,CAAA;IACnB,wBAAwB;IACxB,IAAI,CAAC,IAAI,OAAO,CAAA;IAChB,8DAA8D;IAC9D,KAAK,CAAC,IAAI,OAAO,CAAA;IACjB,2CAA2C;IAC3C,MAAM,CAAC,IAAI,OAAO,CAAA;CACnB,CAAA;AACD,gCAAgC;AAChC,MAAM,MAAM,uBAAuB,GAAG;IACpC,qCAAqC;IACrC,OAAO,CAAC,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAA;IAC3C,wCAAwC;IACxC,MAAM,CAAC,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,KAAK,EAAE,iBAAiB,CAAA;KAAE,GAAG,OAAO,CAAA;IACpE,iCAAiC;IACjC,IAAI,CAAC,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAA;IACxC,wCAAwC;IACxC,MAAM,CAAC,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,KAAK,EAAE,iBAAiB,CAAA;KAAE,GAAG,OAAO,CAAA;IACpE,8DAA8D;IAC9D,KAAK,CAAC,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAA;IACzC,mCAAmC;IACnC,KAAK,CAAC,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAA;CAC1C,CAAA"}
@@ -1,12 +1,18 @@
1
- import { ref as r, computed as s, provide as n } from "vue";
2
- const c = Symbol(), S = () => {
3
- const e = r([]), o = s(() => e.value.some((t) => t.value));
4
- return n(c, e), {
1
+ import { ref as n, computed as r, provide as u, inject as c, onBeforeUnmount as i } from "vue";
2
+ const s = Symbol(), l = (t) => {
3
+ const e = c(s);
4
+ e && (e.value.push(t), i(() => {
5
+ e.value = e.value.filter((o) => o !== t);
6
+ }));
7
+ }, m = () => {
8
+ const t = n([]), e = r(() => t.value.some((o) => o.value));
9
+ return u(s, t), {
5
10
  /** Whether or not any nested child items are open */
6
- open: o
11
+ open: e
7
12
  };
8
13
  };
9
14
  export {
10
- c as SIDEBAR_NESTED_ITEMS_SYMBOL,
11
- S as useSidebarNestedItems
15
+ s as SIDEBAR_NESTED_ITEMS_SYMBOL,
16
+ l as useSidebarNestedItem,
17
+ m as useSidebarNestedItems
12
18
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarTextArea.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarTextArea/ScalarTextArea.vue"],"names":[],"mappings":"AAuDA;;;;;;;GAOG;;iBAuBU,MAAM;;;;iBAAN,MAAM;;;;AAtBnB,wBAwGC"}
1
+ {"version":3,"file":"ScalarTextArea.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarTextArea/ScalarTextArea.vue"],"names":[],"mappings":"AAyDA;;;;;;;GAOG;;iBAuBU,MAAM;;;;iBAAN,MAAM;;;;AAtBnB,wBA4GC"}
@@ -1,9 +1,9 @@
1
1
  import { defineComponent as u, useModel as m, onMounted as f, createBlock as d, openBlock as c, unref as t, mergeProps as l, withCtx as p, withDirectives as x, createElementVNode as _, vModelText as v } from "vue";
2
2
  import { useBindCx as h } from "@scalar/use-hooks/useBindCx";
3
3
  import { useTextareaAutosize as k } from "@vueuse/core";
4
- import C from "../ScalarForm/ScalarFormInput.vue.js";
5
- const V = {}, T = /* @__PURE__ */ u({
6
- ...V,
4
+ import A from "../ScalarForm/ScalarFormInput.vue.js";
5
+ const C = {}, B = /* @__PURE__ */ u({
6
+ ...C,
7
7
  inheritAttrs: !1,
8
8
  __name: "ScalarTextArea",
9
9
  props: {
@@ -11,17 +11,21 @@ const V = {}, T = /* @__PURE__ */ u({
11
11
  modelModifiers: {}
12
12
  },
13
13
  emits: ["update:modelValue"],
14
- setup(a) {
15
- const o = m(a, "modelValue"), { textarea: r } = k({
14
+ setup(i) {
15
+ const o = m(i, "modelValue"), { textarea: r } = k({
16
16
  // @ts-expect-error - unexpected type mismatch
17
17
  input: o,
18
18
  styleProp: "minHeight"
19
- }), { classCx: i, otherAttrs: n } = h();
19
+ }), { stylingAttrsCx: a, otherAttrs: n } = h();
20
20
  return f(() => {
21
21
  "autofocus" in n.value && r.value?.focus();
22
- }), (w, e) => (c(), d(t(C), l({ is: "div" }, t(i)("custom-scroll flex text-c-1 min-h-0 shrink cursor-text"), {
23
- onClick: e[1] || (e[1] = (s) => t(r)?.focus())
24
- }), {
22
+ }), (V, e) => (c(), d(t(A), l(
23
+ { is: "div" },
24
+ t(a)("custom-scroll flex text-c-1 min-h-0 shrink cursor-text"),
25
+ {
26
+ onClick: e[1] || (e[1] = (s) => t(r)?.focus())
27
+ }
28
+ ), {
25
29
  default: p(() => [
26
30
  x(_("textarea", l({
27
31
  ref_key: "textarea",
@@ -36,5 +40,5 @@ const V = {}, T = /* @__PURE__ */ u({
36
40
  }
37
41
  });
38
42
  export {
39
- T as default
43
+ B as default
40
44
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarTextInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarTextInput/ScalarTextInput.vue"],"names":[],"mappings":"AAwFA;;;;;;;GAOG;;eAGU,OAAO;;iBA6BP,MAAM;;;;eA7BN,OAAO;;iBA6BP,MAAM;;;;aA2GN,CAAC,KAAK,IAAiB,KAAK,GAAG;;aAC/B,CAAC,KAAK,IAAiB,KAAK,GAAG;;aAC/B,CAAC,KAAK,IAAiB,KAAK,GAAG;;YAChC,CAAC,KAAK,IAAiB,KAAK,GAAG;;AA7I3C,wBAkLC;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":"ScalarTextInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarTextInput/ScalarTextInput.vue"],"names":[],"mappings":"AA2FA;;;;;;;GAOG;;eAGU,OAAO;;iBA6BP,MAAM;;;;eA7BN,OAAO;;iBA6BP,MAAM;;;;aAiHN,CAAC,KAAK,IAAiB,KAAK,GAAG;;aAC/B,CAAC,KAAK,IAAiB,KAAK,GAAG;;aAC/B,CAAC,KAAK,IAAiB,KAAK,GAAG;;YAChC,CAAC,KAAK,IAAiB,KAAK,GAAG;;AAnJ3C,wBAwLC;AAOD,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,10 +1,10 @@
1
- import { defineComponent as y, mergeModels as v, useModel as x, ref as _, onMounted as $, createBlock as k, openBlock as t, unref as r, mergeProps as c, withCtx as w, createElementVNode as i, renderSlot as o, createElementBlock as n, createCommentVNode as l, withDirectives as C, vModelDynamic as V, toDisplayString as b } from "vue";
2
- import { useBindCx as g } from "@scalar/use-hooks/useBindCx";
1
+ import { defineComponent as y, mergeModels as v, useModel as x, ref as _, onMounted as $, createBlock as k, openBlock as t, unref as r, mergeProps as c, withCtx as w, createElementVNode as i, renderSlot as o, createElementBlock as n, createCommentVNode as l, withDirectives as C, vModelDynamic as g, toDisplayString as V } from "vue";
2
+ import { useBindCx as b } from "@scalar/use-hooks/useBindCx";
3
3
  import B from "../ScalarForm/ScalarFormInput.vue.js";
4
- const M = { class: "flex flex-1 relative" }, D = {
4
+ const M = { class: "flex flex-1 relative" }, A = {
5
5
  key: 0,
6
6
  class: "select-none whitespace-nowrap text-sm text-transparent"
7
- }, S = ["readonly", "aria-readonly"], A = {
7
+ }, D = ["readonly", "aria-readonly"], S = {
8
8
  key: 1,
9
9
  class: "absolute inset-0 select-none overflow-hidden whitespace-nowrap text-sm"
10
10
  }, E = {
@@ -25,7 +25,7 @@ const M = { class: "flex flex-1 relative" }, D = {
25
25
  }),
26
26
  emits: ["update:modelValue"],
27
27
  setup(d) {
28
- const a = x(d, "modelValue"), s = _(), { classCx: p, otherAttrs: u } = g();
28
+ const a = x(d, "modelValue"), s = _(), { stylingAttrsCx: p, otherAttrs: u } = b();
29
29
  $(() => {
30
30
  "autofocus" in u.value && s.value?.focus();
31
31
  });
@@ -34,12 +34,15 @@ const M = { class: "flex flex-1 relative" }, D = {
34
34
  }
35
35
  return (e, f) => (t(), k(r(B), c(
36
36
  { is: "div" },
37
- r(p)("cursor-text text-c-1", e.readonly ? "" : "focus-within:bg-b-1"),
37
+ r(p)(
38
+ "cursor-text text-c-1",
39
+ e.readonly ? "" : "focus-within:bg-b-1"
40
+ ),
38
41
  { onClick: m }
39
42
  ), {
40
43
  default: w(() => [
41
44
  i("div", M, [
42
- e.$slots.prefix ? (t(), n("span", D, [
45
+ e.$slots.prefix ? (t(), n("span", A, [
43
46
  o(e.$slots, "prefix")
44
47
  ])) : l("", !0),
45
48
  C(i("input", c({
@@ -49,14 +52,14 @@ const M = { class: "flex flex-1 relative" }, D = {
49
52
  readonly: e.readonly,
50
53
  "aria-readonly": e.readonly || void 0,
51
54
  class: "z-1 min-w-0 flex-1 border-none bg-transparent text-sm placeholder:font-[inherit] focus-within:outline-none"
52
- }, r(u)), null, 16, S), [
53
- [V, a.value]
55
+ }, r(u)), null, 16, D), [
56
+ [g, a.value]
54
57
  ]),
55
- e.$slots.prefix || e.$slots.suffix ? (t(), n("div", A, [
58
+ e.$slots.prefix || e.$slots.suffix ? (t(), n("div", S, [
56
59
  e.$slots.prefix ? (t(), n("span", E, [
57
60
  o(e.$slots, "prefix")
58
61
  ])) : l("", !0),
59
- i("span", N, b(a.value || e.$attrs.placeholder), 1),
62
+ i("span", N, V(a.value || e.$attrs.placeholder), 1),
60
63
  e.$slots.suffix ? (t(), n("span", z, [
61
64
  o(e.$slots, "suffix")
62
65
  ])) : l("", !0)
@@ -2,7 +2,7 @@ import { defineComponent as u, useModel as d, createBlock as i, openBlock as c,
2
2
  import { useBindCx as x } from "@scalar/use-hooks/useBindCx";
3
3
  import g from "./ScalarToggle.vue.js";
4
4
  import h from "../ScalarForm/ScalarFormInput.vue.js";
5
- const v = { class: "flex-1 text-left min-w-0 truncate" }, B = {}, w = /* @__PURE__ */ u({
5
+ const v = { class: "flex-1 text-left min-w-0 truncate" }, B = {}, $ = /* @__PURE__ */ u({
6
6
  ...B,
7
7
  inheritAttrs: !1,
8
8
  __name: "ScalarToggleInput",
@@ -12,7 +12,7 @@ const v = { class: "flex-1 text-left min-w-0 truncate" }, B = {}, w = /* @__PURE
12
12
  },
13
13
  emits: ["update:modelValue"],
14
14
  setup(r) {
15
- const e = d(r, "modelValue"), { classCx: a, otherAttrs: s } = x();
15
+ const e = d(r, "modelValue"), { stylingAttrsCx: a, otherAttrs: s } = x();
16
16
  return (n, o) => (c(), i(t(h), l(
17
17
  { is: "label" },
18
18
  t(a)("cursor-pointer gap-2 hover:bg-b-2", { "text-c-1": e.value })
@@ -32,5 +32,5 @@ const v = { class: "flex-1 text-left min-w-0 truncate" }, B = {}, w = /* @__PURE
32
32
  }
33
33
  });
34
34
  export {
35
- w as default
35
+ $ as default
36
36
  };