@scalar/components 0.14.33 → 0.14.34

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 (54) hide show
  1. package/dist/components/ScalarButton/ScalarButton.vue.js +37 -40
  2. package/dist/components/ScalarCodeBlock/ScalarCodeBlock.vue3.js +1 -1
  3. package/dist/components/ScalarCodeBlock/ScalarCodeBlockCopy.vue.js +1 -1
  4. package/dist/components/ScalarColorModeToggle/ScalarColorModeToggleIcon.vue.js +1 -1
  5. package/dist/components/ScalarCombobox/ScalarComboboxMultiselect.vue.js +46 -49
  6. package/dist/components/ScalarCombobox/ScalarComboboxOptions.vue.js +144 -160
  7. package/dist/components/ScalarCombobox/ScalarComboboxPopover.vue.js +26 -27
  8. package/dist/components/ScalarCombobox/types.js +6 -6
  9. package/dist/components/ScalarDropdown/ScalarDropdownButton.vue.js +1 -1
  10. package/dist/components/ScalarDropdown/ScalarDropdownItem.vue.js +1 -1
  11. package/dist/components/ScalarErrorBoundary/ScalarErrorBoundary.vue.js +11 -14
  12. package/dist/components/ScalarFileUpload/ScalarFileUpload.vue.js +86 -91
  13. package/dist/components/ScalarFloating/ScalarFloating.vue.d.ts.map +1 -1
  14. package/dist/components/ScalarFloating/ScalarFloating.vue.js +22 -23
  15. package/dist/components/ScalarFloating/useResizeWithTarget.js +12 -13
  16. package/dist/components/ScalarIcon/ScalarIcon.vue.js +1 -1
  17. package/dist/components/ScalarLoading/ScalarLoading.vue.js +1 -1
  18. package/dist/components/ScalarMarkdown/ScalarMarkdown.vue.js +20 -21
  19. package/dist/components/ScalarMarkdown/ScalarMarkdown.vue3.js +1 -1
  20. package/dist/components/ScalarMarkdown/ScalarMarkdownSummary.vue.js +22 -26
  21. package/dist/components/ScalarMarkdown/ScalarMarkdownSummary.vue3.js +1 -1
  22. package/dist/components/ScalarMenu/ScalarMenuLink.vue.d.ts.map +1 -1
  23. package/dist/components/ScalarMenu/ScalarMenuLink.vue.js +6 -3
  24. package/dist/components/ScalarMenu/ScalarMenuProducts.vue.js +45 -48
  25. package/dist/components/ScalarMenu/ScalarMenuTeamPicker.vue.js +20 -23
  26. package/dist/components/ScalarModal/ScalarModal.vue.js +1 -1
  27. package/dist/components/ScalarSidebar/ScalarSidebarIndent.vue.js +1 -1
  28. package/dist/components/ScalarSidebar/ScalarSidebarItems.vue3.js +1 -1
  29. package/dist/components/ScalarSidebar/ScalarSidebarSearchInput.vue.js +16 -19
  30. package/dist/components/ScalarTextArea/ScalarTextArea.vue.d.ts.map +1 -1
  31. package/dist/components/ScalarTextArea/ScalarTextArea.vue.js +19 -22
  32. package/dist/components/ScalarTextInput/ScalarTextInput.vue.js +25 -29
  33. package/dist/components/ScalarTooltip/ScalarHotkeyTooltip.vue.js +12 -15
  34. package/dist/components/ScalarTooltip/ScalarTooltip.vue.js +20 -23
  35. package/dist/components/ScalarTooltip/ScalarTooltip.vue3.js +1 -1
  36. package/dist/components/ScalarTooltip/useTooltip.js +24 -31
  37. package/dist/index.d.ts +1 -1
  38. package/dist/index.js +6 -6
  39. package/dist/style.css +1 -1
  40. package/package.json +12 -12
  41. package/dist/components/ScalarCodeBlock/ScalarCodeBlock.vue2.js +0 -4
  42. package/dist/components/ScalarCodeBlock/ScalarCodeBlockCopy.vue3.js +0 -4
  43. package/dist/components/ScalarColorModeToggle/ScalarColorModeToggleIcon.vue3.js +0 -4
  44. package/dist/components/ScalarDropdown/ScalarDropdownButton.vue3.js +0 -4
  45. package/dist/components/ScalarDropdown/ScalarDropdownItem.vue3.js +0 -4
  46. package/dist/components/ScalarIcon/ScalarIcon.vue3.js +0 -4
  47. package/dist/components/ScalarLoading/ScalarLoading.vue3.js +0 -4
  48. package/dist/components/ScalarMarkdown/ScalarMarkdown.vue2.js +0 -4
  49. package/dist/components/ScalarMarkdown/ScalarMarkdownSummary.vue2.js +0 -4
  50. package/dist/components/ScalarModal/ScalarModal.vue3.js +0 -4
  51. package/dist/components/ScalarSidebar/ScalarSidebarIndent.vue3.js +0 -4
  52. package/dist/components/ScalarSidebar/ScalarSidebarItems.vue2.js +0 -4
  53. package/dist/components/ScalarTooltip/ScalarTooltip.vue2.js +0 -4
  54. package/dist/style.css.js +0 -4
@@ -1,8 +1,8 @@
1
- import { defineComponent as p, mergeModels as f, createPropsRestProxy as v, useId as h, useModel as y, useTemplateRef as w, ref as k, onMounted as x, createElementBlock as u, openBlock as m, normalizeProps as g, guardReactiveProps as B, unref as r, createVNode as M, createCommentVNode as P, mergeProps as V, normalizeClass as b, renderSlot as C, createTextVNode as S, toDisplayString as T } from "vue";
1
+ import { defineComponent as p, mergeModels as f, createPropsRestProxy as v, useId as h, useModel as y, useTemplateRef as w, ref as k, onMounted as x, createElementBlock as u, openBlock as m, normalizeProps as g, guardReactiveProps as B, unref as a, createVNode as M, createCommentVNode as P, mergeProps as V, normalizeClass as b, renderSlot as C, createTextVNode as S, toDisplayString as T } from "vue";
2
2
  import { useBindCx as R } from "@scalar/use-hooks/useBindCx";
3
3
  import { useResizeObserver as _ } from "@vueuse/core";
4
4
  import z from "./ScalarMarkdown.vue.js";
5
- import "./ScalarMarkdown.vue2.js";
5
+ /* empty css */
6
6
  const N = ["aria-controls", "aria-expanded"], E = /* @__PURE__ */ p({
7
7
  inheritAttrs: !1,
8
8
  __name: "ScalarMarkdownSummary",
@@ -19,40 +19,36 @@ const N = ["aria-controls", "aria-expanded"], E = /* @__PURE__ */ p({
19
19
  modelModifiers: {}
20
20
  }),
21
21
  emits: ["update:modelValue"],
22
- setup(t) {
23
- const c = v(t, ["clamp"]), l = h(), o = y(t, "modelValue"), n = w("scalar-markdown"), s = k(!1);
24
- _(() => {
25
- var e;
26
- return (e = n.value) == null ? void 0 : e.el;
27
- }, i);
28
- function i() {
29
- var a;
30
- const e = (a = n.value) == null ? void 0 : a.el;
31
- e && (s.value = e.scrollHeight > e.clientHeight || e.scrollWidth > e.clientWidth);
22
+ setup(r) {
23
+ const c = v(r, ["clamp"]), t = h(), e = y(r, "modelValue"), l = w("scalar-markdown"), n = k(!1);
24
+ _(() => l.value?.el, s);
25
+ function s() {
26
+ const o = l.value?.el;
27
+ o && (n.value = o.scrollHeight > o.clientHeight || o.scrollWidth > o.clientWidth);
32
28
  }
33
- x(i);
29
+ x(s);
34
30
  const { cx: d } = R();
35
- return (e, a) => (m(), u("div", g(B(
36
- r(d)(
31
+ return (o, i) => (m(), u("div", g(B(
32
+ a(d)(
37
33
  "group/summary flex gap-0.5",
38
- o.value ? "flex-col" : "flex-row items-baseline"
34
+ e.value ? "flex-col" : "flex-row items-baseline"
39
35
  )
40
36
  )), [
41
37
  M(z, V({ ref: "scalar-markdown" }, c, {
42
- id: r(l),
43
- class: { "markdown-summary truncate": !o.value },
44
- clamp: o.value ? void 0 : e.clamp
38
+ id: a(t),
39
+ class: { "markdown-summary truncate": !e.value },
40
+ clamp: e.value ? void 0 : o.clamp
45
41
  }), null, 16, ["id", "class", "clamp"]),
46
- s.value || o.value ? (m(), u("button", {
42
+ n.value || e.value ? (m(), u("button", {
47
43
  key: 0,
48
- class: b(["whitespace-nowrap font-medium hover:underline", { "self-end": o.value }]),
44
+ class: b(["whitespace-nowrap font-medium hover:underline", { "self-end": e.value }]),
49
45
  type: "button",
50
- "aria-controls": r(l),
51
- "aria-expanded": o.value,
52
- onClick: a[0] || (a[0] = ($) => o.value = !o.value)
46
+ "aria-controls": a(t),
47
+ "aria-expanded": e.value,
48
+ onClick: i[0] || (i[0] = ($) => e.value = !e.value)
53
49
  }, [
54
- C(e.$slots, "button", { open: o.value }, () => [
55
- S(T(o.value ? " Show Less" : "More"), 1)
50
+ C(o.$slots, "button", { open: e.value }, () => [
51
+ S(T(e.value ? " Show Less" : "More"), 1)
56
52
  ])
57
53
  ], 10, N)) : P("", !0)
58
54
  ], 16));
@@ -1,5 +1,5 @@
1
1
  import o from "./ScalarMarkdownSummary.vue.js";
2
- import "./ScalarMarkdownSummary.vue2.js";
2
+ /* empty css */
3
3
  export {
4
4
  o as default
5
5
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarMenuLink.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarMenu/ScalarMenuLink.vue"],"names":[],"mappings":"AA2CA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAG9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAGpC,OAAO,EAAE,KAAK,IAAI,EAA2B,MAAM,eAAe,CAAA;AAElE,KAAK,WAAW,GAAG;IACjB,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACvB,IAAI,CAAC,EAAE,IAAI,GAAG,mBAAmB,CAAA;IACjC,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAC;AAqEF,QAAA,IAAI,QAAQ,IAAW,CAAE;AACzB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAsBhD,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"ScalarMenuLink.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarMenu/ScalarMenuLink.vue"],"names":[],"mappings":"AA4CA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAG9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAGpC,OAAO,EAAE,KAAK,IAAI,EAA2B,MAAM,eAAe,CAAA;AAElE,KAAK,WAAW,GAAG;IACjB,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACvB,IAAI,CAAC,EAAE,IAAI,GAAG,mBAAmB,CAAA;IACjC,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAC;AAuEF,QAAA,IAAI,QAAQ,IAAW,CAAE;AACzB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAsBhD,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,4 +1,4 @@
1
- import { defineComponent as i, createBlock as n, openBlock as o, unref as t, mergeProps as l, withCtx as a, createElementBlock as m, createElementVNode as c, normalizeClass as s, renderSlot as f } from "vue";
1
+ import { defineComponent as i, createBlock as n, openBlock as o, unref as t, mergeProps as a, withCtx as l, createElementBlock as m, createElementVNode as c, normalizeClass as s, renderSlot as f } from "vue";
2
2
  import { useBindCx as p } from "@scalar/use-hooks/useBindCx";
3
3
  import { DropdownMenu as u } from "radix-vue/namespaced";
4
4
  import d from "../ScalarDropdown/ScalarDropdownButton.vue.js";
@@ -16,8 +16,11 @@ const h = {
16
16
  },
17
17
  setup(k) {
18
18
  const { cx: r } = p();
19
- return (e, w) => (o(), n(t(d), l(t(r)("flex items-center"), { is: e.is }), {
20
- default: a(() => [
19
+ return (e, w) => (o(), n(t(d), a(t(r)("flex items-center"), {
20
+ is: e.is,
21
+ as: "a"
22
+ }), {
23
+ default: l(() => [
21
24
  e.icon ? (o(), n(t(g), {
22
25
  key: 0,
23
26
  class: s([
@@ -1,8 +1,8 @@
1
- import { defineComponent as p, createElementBlock as m, openBlock as u, normalizeProps as h, guardReactiveProps as C, unref as s, createVNode as t, withCtx as n, createTextVNode as l } from "vue";
2
- import { ScalarIconHouse as k, ScalarIconBook as b, ScalarIconArrowUpRight as B } from "@scalar/icons";
3
- import { useBindCx as S } from "@scalar/use-hooks/useBindCx";
1
+ import { defineComponent as a, createElementBlock as f, openBlock as c, normalizeProps as p, guardReactiveProps as m, unref as s, createVNode as t, withCtx as n, createTextVNode as l } from "vue";
2
+ import { ScalarIconHouse as u, ScalarIconBook as h, ScalarIconArrowUpRight as C } from "@scalar/icons";
3
+ import { useBindCx as k } from "@scalar/use-hooks/useBindCx";
4
4
  import d from "./ScalarMenuProduct.vue.js";
5
- const w = /* @__PURE__ */ p({
5
+ const P = /* @__PURE__ */ a({
6
6
  inheritAttrs: !1,
7
7
  __name: "ScalarMenuProducts",
8
8
  props: {
@@ -10,51 +10,48 @@ const w = /* @__PURE__ */ p({
10
10
  hrefs: {}
11
11
  },
12
12
  emits: ["open"],
13
- setup($) {
14
- const { cx: c } = S();
15
- return (o, e) => {
16
- var i, a, f;
17
- return u(), m("div", h(C(s(c)("flex flex-col"))), [
18
- t(d, {
19
- href: ((i = o.hrefs) == null ? void 0 : i.dashboard) ?? "https://dashboard.scalar.com",
20
- icon: s(k),
21
- selected: o.selected === "dashboard",
22
- onClick: e[0] || (e[0] = (r) => o.$emit("open", r, "dashboard"))
23
- }, {
24
- default: n(() => e[3] || (e[3] = [
25
- l(" Dashboard ")
26
- ])),
27
- _: 1,
28
- __: [3]
29
- }, 8, ["href", "icon", "selected"]),
30
- t(d, {
31
- href: ((a = o.hrefs) == null ? void 0 : a.docs) ?? "https://docs.scalar.com",
32
- icon: s(b),
33
- selected: o.selected === "docs",
34
- onClick: e[1] || (e[1] = (r) => o.$emit("open", r, "docs"))
35
- }, {
36
- default: n(() => e[4] || (e[4] = [
37
- l(" Docs ")
38
- ])),
39
- _: 1,
40
- __: [4]
41
- }, 8, ["href", "icon", "selected"]),
42
- t(d, {
43
- href: ((f = o.hrefs) == null ? void 0 : f.client) ?? "https://client.scalar.com",
44
- icon: s(B),
45
- selected: o.selected === "client",
46
- onClick: e[2] || (e[2] = (r) => o.$emit("open", r, "client"))
47
- }, {
48
- default: n(() => e[5] || (e[5] = [
49
- l(" Client ")
50
- ])),
51
- _: 1,
52
- __: [5]
53
- }, 8, ["href", "icon", "selected"])
54
- ], 16);
55
- };
13
+ setup(b) {
14
+ const { cx: i } = k();
15
+ return (o, e) => (c(), f("div", p(m(s(i)("flex flex-col"))), [
16
+ t(d, {
17
+ href: o.hrefs?.dashboard ?? "https://dashboard.scalar.com",
18
+ icon: s(u),
19
+ selected: o.selected === "dashboard",
20
+ onClick: e[0] || (e[0] = (r) => o.$emit("open", r, "dashboard"))
21
+ }, {
22
+ default: n(() => e[3] || (e[3] = [
23
+ l(" Dashboard ")
24
+ ])),
25
+ _: 1,
26
+ __: [3]
27
+ }, 8, ["href", "icon", "selected"]),
28
+ t(d, {
29
+ href: o.hrefs?.docs ?? "https://docs.scalar.com",
30
+ icon: s(h),
31
+ selected: o.selected === "docs",
32
+ onClick: e[1] || (e[1] = (r) => o.$emit("open", r, "docs"))
33
+ }, {
34
+ default: n(() => e[4] || (e[4] = [
35
+ l(" Docs ")
36
+ ])),
37
+ _: 1,
38
+ __: [4]
39
+ }, 8, ["href", "icon", "selected"]),
40
+ t(d, {
41
+ href: o.hrefs?.client ?? "https://client.scalar.com",
42
+ icon: s(C),
43
+ selected: o.selected === "client",
44
+ onClick: e[2] || (e[2] = (r) => o.$emit("open", r, "client"))
45
+ }, {
46
+ default: n(() => e[5] || (e[5] = [
47
+ l(" Client ")
48
+ ])),
49
+ _: 1,
50
+ __: [5]
51
+ }, 8, ["href", "icon", "selected"])
52
+ ], 16));
56
53
  }
57
54
  });
58
55
  export {
59
- w as default
56
+ P as default
60
57
  };
@@ -1,6 +1,6 @@
1
- import { defineComponent as _, computed as g, createBlock as u, openBlock as n, unref as e, withCtx as o, createVNode as a, mergeProps as b, createElementVNode as x, createElementBlock as S, Fragment as w, renderList as v, createTextVNode as C } from "vue";
1
+ import { defineComponent as _, computed as g, createBlock as u, openBlock as n, unref as e, withCtx as r, createVNode as a, mergeProps as b, createElementVNode as x, createElementBlock as S, Fragment as w, renderList as v, createTextVNode as C } from "vue";
2
2
  import { ScalarIconUserSwitch as k, ScalarIconCaretRight as V, ScalarIconPlus as $ } from "@scalar/icons";
3
- import { DropdownMenu as s } from "radix-vue/namespaced";
3
+ import { DropdownMenu as o } from "radix-vue/namespaced";
4
4
  import I from "./ScalarMenuTeamProfile.vue.js";
5
5
  import B from "./ScalarMenuLink.vue.js";
6
6
  import P from "../ScalarDropdown/ScalarDropdownMenu.vue.js";
@@ -16,22 +16,19 @@ const y = /* @__PURE__ */ _({
16
16
  emits: ["update:team", "add"],
17
17
  setup(f, { emit: p }) {
18
18
  const i = f, d = p, m = g({
19
- get: () => {
20
- var r;
21
- return (r = i.team) == null ? void 0 : r.id;
22
- },
23
- set: (r) => d(
19
+ get: () => i.team?.id,
20
+ set: (s) => d(
24
21
  "update:team",
25
- i.teams.find((t) => t.id === r)
22
+ i.teams.find((t) => t.id === s)
26
23
  )
27
24
  });
28
- return (r, t) => (n(), u(e(s).Sub, null, {
29
- default: o(() => [
25
+ return (s, t) => (n(), u(e(o).Sub, null, {
26
+ default: r(() => [
30
27
  a(e(B), b({
31
- is: e(s).SubTrigger,
28
+ is: e(o).SubTrigger,
32
29
  icon: e(k)
33
- }, r.$attrs), {
34
- default: o(() => [
30
+ }, s.$attrs), {
31
+ default: r(() => [
35
32
  t[2] || (t[2] = x("div", null, "Change team", -1)),
36
33
  a(e(V), {
37
34
  class: "ml-auto text-c-2 -mr-0.25 size-3",
@@ -41,27 +38,27 @@ const y = /* @__PURE__ */ _({
41
38
  _: 1,
42
39
  __: [2]
43
40
  }, 16, ["is", "icon"]),
44
- a(e(s).Portal, null, {
45
- default: o(() => [
46
- a(e(s).SubContent, {
41
+ a(e(o).Portal, null, {
42
+ default: r(() => [
43
+ a(e(o).SubContent, {
47
44
  as: e(P),
48
45
  class: "max-h-radix-popper z-context-plus",
49
46
  sideOffset: 3
50
47
  }, {
51
- default: o(() => [
52
- a(e(s).RadioGroup, {
48
+ default: r(() => [
49
+ a(e(o).RadioGroup, {
53
50
  modelValue: m.value,
54
51
  "onUpdate:modelValue": t[0] || (t[0] = (l) => m.value = l),
55
52
  class: "contents"
56
53
  }, {
57
- default: o(() => [
58
- (n(!0), S(w, null, v(r.teams, (l) => (n(), u(e(s).RadioItem, {
54
+ default: r(() => [
55
+ (n(!0), S(w, null, v(s.teams, (l) => (n(), u(e(o).RadioItem, {
59
56
  key: l.id,
60
57
  as: e(c),
61
58
  class: "group/item flex items-center",
62
59
  value: l.id
63
60
  }, {
64
- default: o(() => [
61
+ default: r(() => [
65
62
  a(I, {
66
63
  class: "-ml-0.75 flex-1 min-w-0",
67
64
  label: l.label,
@@ -77,12 +74,12 @@ const y = /* @__PURE__ */ _({
77
74
  ]),
78
75
  _: 1
79
76
  }, 8, ["modelValue"]),
80
- a(e(s).Item, {
77
+ a(e(o).Item, {
81
78
  as: e(c),
82
79
  class: "flex items-center",
83
80
  onClick: t[1] || (t[1] = (l) => d("add"))
84
81
  }, {
85
- default: o(() => [
82
+ default: r(() => [
86
83
  a(e($), {
87
84
  class: "bg-b-3 -ml-0.75 rounded p-1 size-5 text-c-3",
88
85
  weight: "bold"
@@ -1,6 +1,6 @@
1
1
  import o from "./ScalarModal.vue2.js";
2
2
  import { useModal as s } from "./ScalarModal.vue2.js";
3
- import "./ScalarModal.vue3.js";
3
+ /* empty css */
4
4
  import a from "../../_virtual/_plugin-vue_export-helper.js";
5
5
  const m = /* @__PURE__ */ a(o, [["__scopeId", "data-v-589f8aa0"]]);
6
6
  export {
@@ -1,5 +1,5 @@
1
1
  import o from "./ScalarSidebarIndent.vue2.js";
2
- import "./ScalarSidebarIndent.vue3.js";
2
+ /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
4
  const c = /* @__PURE__ */ r(o, [["__scopeId", "data-v-3e080c68"]]);
5
5
  export {
@@ -1,5 +1,5 @@
1
1
  import o from "./ScalarSidebarItems.vue.js";
2
- import "./ScalarSidebarItems.vue2.js";
2
+ /* empty css */
3
3
  export {
4
4
  o as default
5
5
  };
@@ -1,4 +1,4 @@
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 a, 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 x, createBlock as s, createCommentVNode as y, 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
3
  import { useBindCx as E } from "@scalar/use-hooks/useBindCx";
4
4
  import I from "../ScalarLoading/ScalarLoading.vue.js";
@@ -16,26 +16,23 @@ const P = ["aria-label"], D = /* @__PURE__ */ f({
16
16
  }),
17
17
  emits: ["update:modelValue"],
18
18
  setup(t) {
19
- const l = m(null), o = b(t, "modelValue");
19
+ const o = m(null), a = b(t, "modelValue");
20
20
  function i() {
21
- o.value = "", l.value && l.value.focus();
21
+ a.value = "", o.value && o.value.focus();
22
22
  }
23
23
  const { classCx: c, otherAttrs: u } = E();
24
- return h(() => {
25
- var e;
26
- return t.autofocus && ((e = l.value) == null ? void 0 : e.focus());
27
- }), (e, n) => (r(), g("label", v(S(
28
- a(c)(
24
+ return h(() => t.autofocus && o.value?.focus()), (l, n) => (r(), g("label", v(S(
25
+ e(c)(
29
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",
30
27
  "bg-sidebar-b-search border-sidebar-border-search",
31
- o.value ? "text-c-1" : "text-sidebar-c-search"
28
+ a.value ? "text-c-1" : "text-sidebar-c-search"
32
29
  )
33
30
  )), [
34
- k(a(B), { class: "text-sidebar-c-search size-4" }),
31
+ k(e(B), { class: "text-sidebar-c-search size-4" }),
35
32
  x(C("input", M({
36
33
  ref_key: "inputRef",
37
- ref: l,
38
- "aria-label": e.label ?? "Enter search query",
34
+ ref: o,
35
+ "aria-label": l.label ?? "Enter search query",
39
36
  autocapitalize: "off",
40
37
  autocomplete: "off",
41
38
  autocorrect: "off",
@@ -43,20 +40,20 @@ const P = ["aria-label"], D = /* @__PURE__ */ f({
43
40
  placeholder: "Search...",
44
41
  spellcheck: "false",
45
42
  type: "search"
46
- }, a(u), {
47
- "onUpdate:modelValue": n[0] || (n[0] = (d) => o.value = d)
43
+ }, e(u), {
44
+ "onUpdate:modelValue": n[0] || (n[0] = (d) => a.value = d)
48
45
  }), null, 16, P), [
49
- [V, o.value]
46
+ [V, a.value]
50
47
  ]),
51
- e.loading && e.loading.isLoading ? (r(), s(a(I), {
48
+ l.loading && l.loading.isLoading ? (r(), s(e(I), {
52
49
  key: 0,
53
50
  class: "mr-3 self-center",
54
- loadingState: e.loading,
51
+ loadingState: l.loading,
55
52
  size: "md"
56
- }, null, 8, ["loadingState"])) : o.value ? (r(), s(a(N), {
53
+ }, null, 8, ["loadingState"])) : a.value ? (r(), s(e(N), {
57
54
  key: 1,
58
55
  class: "p-0.25 size-4",
59
- icon: a(w),
56
+ icon: e(w),
60
57
  weight: "bold",
61
58
  label: "Clear Search",
62
59
  onClick: z(i, ["stop", "prevent"])
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarTextArea.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarTextArea/ScalarTextArea.vue"],"names":[],"mappings":"AAqDA;;;;;;;GAOG;;iBAsBU,MAAM;;;;iBAAN,MAAM;;;;AArBnB,wBAyFC"}
1
+ {"version":3,"file":"ScalarTextArea.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarTextArea/ScalarTextArea.vue"],"names":[],"mappings":"AAsDA;;;;;;;GAOG;;iBAuBU,MAAM;;;;iBAAN,MAAM;;;;AAtBnB,wBA0FC"}
@@ -1,8 +1,8 @@
1
- import { defineComponent as d, useModel as f, onMounted as c, createElementBlock as p, openBlock as x, mergeProps as i, unref as r, withDirectives as v, createElementVNode as b, vModelText as _ } from "vue";
2
- import { useBindCx as g } from "@scalar/use-hooks/useBindCx";
3
- import { useTextareaAutosize as h } from "@vueuse/core";
4
- const k = {}, C = /* @__PURE__ */ d({
5
- ...k,
1
+ import { defineComponent as a, useModel as m, onMounted as d, createElementBlock as f, openBlock as c, mergeProps as l, unref as n, withDirectives as p, createElementVNode as x, vModelText as v } from "vue";
2
+ import { useBindCx as b } from "@scalar/use-hooks/useBindCx";
3
+ import { useTextareaAutosize as _ } from "@vueuse/core";
4
+ const g = {}, A = /* @__PURE__ */ a({
5
+ ...g,
6
6
  inheritAttrs: !1,
7
7
  __name: "ScalarTextArea",
8
8
  props: {
@@ -10,35 +10,32 @@ const k = {}, C = /* @__PURE__ */ d({
10
10
  modelModifiers: {}
11
11
  },
12
12
  emits: ["update:modelValue"],
13
- setup(a) {
14
- const t = f(a, "modelValue"), { textarea: o } = h({
13
+ setup(u) {
14
+ const t = m(u, "modelValue"), { textarea: o } = _({
15
+ // @ts-expect-error - unexpected type mismatch
15
16
  input: t,
16
17
  styleProp: "minHeight"
17
- }), { classCx: m, otherAttrs: s } = g();
18
- return c(() => {
19
- var n;
20
- "autofocus" in s.value && ((n = o.value) == null || n.focus());
21
- }), (n, e) => (x(), p("div", i(
22
- r(m)(
18
+ }), { classCx: i, otherAttrs: r } = b();
19
+ return d(() => {
20
+ "autofocus" in r.value && o.value?.focus();
21
+ }), (h, e) => (c(), f("div", l(
22
+ n(i)(
23
23
  "bg-b-1.5 custom-scroll flex min-h-0 shrink cursor-text items-center gap-0.75 rounded-md border px-3 py-2.5 outline-offset-[-1px] focus-within:bg-b-1 has-[input:focus-visible]:outline"
24
24
  ),
25
25
  {
26
- onClick: e[1] || (e[1] = (l) => {
27
- var u;
28
- return (u = r(o)) == null ? void 0 : u.focus();
29
- })
26
+ onClick: e[1] || (e[1] = (s) => n(o)?.focus())
30
27
  }
31
28
  ), [
32
- v(b("textarea", i({
29
+ p(x("textarea", l({
33
30
  ref_key: "textarea",
34
31
  ref: o,
35
- "onUpdate:modelValue": e[0] || (e[0] = (l) => t.value = l)
36
- }, r(s), { class: "w-full resize-none border-none bg-transparent text-sm focus-within:outline-none" }), null, 16), [
37
- [_, t.value]
32
+ "onUpdate:modelValue": e[0] || (e[0] = (s) => t.value = s)
33
+ }, n(r), { class: "w-full resize-none border-none bg-transparent text-sm focus-within:outline-none" }), null, 16), [
34
+ [v, t.value]
38
35
  ])
39
36
  ], 16));
40
37
  }
41
38
  });
42
39
  export {
43
- C as default
40
+ A as default
44
41
  };
@@ -1,19 +1,19 @@
1
- import { defineComponent as h, useModel as v, ref as $, onMounted as b, createElementBlock as t, openBlock as s, mergeProps as f, unref as c, createElementVNode as a, renderSlot as n, createCommentVNode as l, withDirectives as w, vModelDynamic as _, toDisplayString as k } from "vue";
2
- import { useBindCx as y } from "@scalar/use-hooks/useBindCx";
3
- const g = { class: "flex flex-1 relative" }, V = {
1
+ import { defineComponent as x, useModel as h, ref as v, onMounted as $, createElementBlock as t, openBlock as s, mergeProps as d, unref as f, createElementVNode as a, renderSlot as n, createCommentVNode as l, withDirectives as b, vModelDynamic as w, toDisplayString as _ } from "vue";
2
+ import { useBindCx as k } from "@scalar/use-hooks/useBindCx";
3
+ const y = { class: "flex flex-1 relative" }, g = {
4
4
  key: 0,
5
5
  class: "select-none whitespace-nowrap text-sm text-transparent"
6
- }, C = {
6
+ }, V = {
7
7
  key: 1,
8
8
  class: "absolute inset-0 select-none overflow-hidden whitespace-nowrap text-sm"
9
- }, M = {
9
+ }, C = {
10
10
  key: 0,
11
11
  class: "text-c-2"
12
- }, B = { class: "text-transparent" }, D = {
12
+ }, M = { class: "text-transparent" }, B = {
13
13
  key: 1,
14
14
  class: "text-c-2"
15
- }, S = {}, N = /* @__PURE__ */ h({
16
- ...S,
15
+ }, D = {}, E = /* @__PURE__ */ x({
16
+ ...D,
17
17
  inheritAttrs: !1,
18
18
  __name: "ScalarTextInput",
19
19
  props: {
@@ -21,40 +21,36 @@ const g = { class: "flex flex-1 relative" }, V = {
21
21
  modelModifiers: {}
22
22
  },
23
23
  emits: ["update:modelValue"],
24
- setup(m) {
25
- const r = v(m, "modelValue"), i = $(), { classCx: x, otherAttrs: u } = y();
26
- return b(() => {
27
- var e;
28
- "autofocus" in u.value && ((e = i.value) == null || e.focus());
29
- }), (e, o) => (s(), t("div", f(
30
- c(x)(
24
+ setup(c) {
25
+ const r = h(c, "modelValue"), i = v(), { classCx: m, otherAttrs: u } = k();
26
+ return $(() => {
27
+ "autofocus" in u.value && i.value?.focus();
28
+ }), (e, o) => (s(), t("div", d(
29
+ f(m)(
31
30
  "bg-b-1.5 flex cursor-text items-center gap-0.75 rounded-md border px-3 py-2.5 outline-offset-[-1px] focus-within:bg-b-1 has-[input:focus-visible]:outline"
32
31
  ),
33
32
  {
34
- onClick: o[1] || (o[1] = (p) => {
35
- var d;
36
- return (d = i.value) == null ? void 0 : d.focus();
37
- })
33
+ onClick: o[1] || (o[1] = (p) => i.value?.focus())
38
34
  }
39
35
  ), [
40
- a("div", g, [
41
- e.$slots.prefix ? (s(), t("span", V, [
36
+ a("div", y, [
37
+ e.$slots.prefix ? (s(), t("span", g, [
42
38
  n(e.$slots, "prefix")
43
39
  ])) : l("", !0),
44
- w(a("input", f({
40
+ b(a("input", d({
45
41
  ref_key: "input",
46
42
  ref: i,
47
43
  "onUpdate:modelValue": o[0] || (o[0] = (p) => r.value = p),
48
44
  class: "z-1 min-w-0 flex-1 border-none bg-transparent text-sm placeholder:font-[inherit] focus-within:outline-none"
49
- }, c(u)), null, 16), [
50
- [_, r.value]
45
+ }, f(u)), null, 16), [
46
+ [w, r.value]
51
47
  ]),
52
- e.$slots.prefix || e.$slots.suffix ? (s(), t("div", C, [
53
- e.$slots.prefix ? (s(), t("span", M, [
48
+ e.$slots.prefix || e.$slots.suffix ? (s(), t("div", V, [
49
+ e.$slots.prefix ? (s(), t("span", C, [
54
50
  n(e.$slots, "prefix")
55
51
  ])) : l("", !0),
56
- a("span", B, k(r.value || e.$attrs.placeholder), 1),
57
- e.$slots.suffix ? (s(), t("span", D, [
52
+ a("span", M, _(r.value || e.$attrs.placeholder), 1),
53
+ e.$slots.suffix ? (s(), t("span", B, [
58
54
  n(e.$slots, "suffix")
59
55
  ])) : l("", !0)
60
56
  ])) : l("", !0)
@@ -64,5 +60,5 @@ const g = { class: "flex flex-1 relative" }, V = {
64
60
  }
65
61
  });
66
62
  export {
67
- N as default
63
+ E as default
68
64
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as c, ref as i, computed as n, render as f, h as l, createElementBlock as m, openBlock as s, normalizeClass as u, renderSlot as h } from "vue";
1
+ import { defineComponent as c, ref as i, computed as o, render as f, h as l, createElementBlock as m, openBlock as s, normalizeClass as u, renderSlot as h } from "vue";
2
2
  import { DEFAULT_OFFSET as y, DEFAULT_DELAY as k } from "./constants.js";
3
3
  import { useTooltip as p } from "./useTooltip.js";
4
4
  import a from "../ScalarHotkey/ScalarHotkey.vue.js";
@@ -14,14 +14,14 @@ const T = {}, w = /* @__PURE__ */ c({
14
14
  offset: { default: () => y }
15
15
  },
16
16
  setup(e) {
17
- const r = i(null), d = n(() => {
17
+ const n = i(null), d = o(() => {
18
18
  if (!document) return "";
19
- const t = document.createElement("div"), o = "-m-0.5 border-none p-0 grid grid-flow-col *:border *:h-5 *:min-w-5 *:border-border-tooltip *:rounded *:px-1 *:flex *:items-center *:justify-center";
19
+ const t = document.createElement("div"), r = "-m-0.5 border-none p-0 grid grid-flow-col *:border *:h-5 *:min-w-5 *:border-border-tooltip *:rounded *:px-1 *:flex *:items-center *:justify-center";
20
20
  return e.content ? f(
21
21
  l("div", { class: "flex items-center gap-2" }, [
22
22
  e.content,
23
23
  l(a, {
24
- class: o,
24
+ class: r,
25
25
  hotkey: e.hotkey,
26
26
  modifier: e.modifier
27
27
  })
@@ -29,7 +29,7 @@ const T = {}, w = /* @__PURE__ */ c({
29
29
  t
30
30
  ) : f(
31
31
  l(a, {
32
- class: o,
32
+ class: r,
33
33
  hotkey: e.hotkey,
34
34
  modifier: e.modifier
35
35
  }),
@@ -39,18 +39,15 @@ const T = {}, w = /* @__PURE__ */ c({
39
39
  return p({
40
40
  content: d,
41
41
  contentTarget: "innerHTML",
42
- delay: n(() => e.delay),
43
- placement: n(() => e.placement),
44
- offset: n(() => e.offset),
45
- targetRef: n(
46
- () => {
47
- var t, o;
48
- return ((o = (t = r.value) == null ? void 0 : t.children) == null ? void 0 : o[0]) || r.value || void 0;
49
- }
42
+ delay: o(() => e.delay),
43
+ placement: o(() => e.placement),
44
+ offset: o(() => e.offset),
45
+ targetRef: o(
46
+ () => n.value?.children?.[0] || n.value || void 0
50
47
  )
51
- }), (t, o) => (s(), m("div", {
48
+ }), (t, r) => (s(), m("div", {
52
49
  ref_key: "wrapperRef",
53
- ref: r,
50
+ ref: n,
54
51
  class: u({ contents: !!t.$slots.default })
55
52
  }, [
56
53
  h(t.$slots, "default")