@scalar/components 0.16.20 → 0.16.23

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 (67) hide show
  1. package/dist/components/ScalarButton/ScalarButton.vue.js +28 -28
  2. package/dist/components/ScalarCheckboxInput/ScalarCheckbox.vue.js +7 -7
  3. package/dist/components/ScalarCheckboxInput/ScalarCheckboxGroup.vue.js +15 -15
  4. package/dist/components/ScalarCheckboxInput/ScalarCheckboxInput.vue.js +10 -10
  5. package/dist/components/ScalarCheckboxInput/ScalarCheckboxRadioGroup.vue.js +15 -15
  6. package/dist/components/ScalarCodeBlock/ScalarCodeBlock.vue.js +6 -6
  7. package/dist/components/ScalarCodeBlock/ScalarCodeBlockCopy.vue2.js +20 -20
  8. package/dist/components/ScalarColorModeToggle/ScalarColorModeToggle.vue.js +7 -7
  9. package/dist/components/ScalarColorModeToggle/ScalarColorModeToggleIcon.vue2.js +13 -13
  10. package/dist/components/ScalarCombobox/ScalarCombobox.vue.js +20 -20
  11. package/dist/components/ScalarCombobox/ScalarComboboxMultiselect.vue.js +25 -25
  12. package/dist/components/ScalarCombobox/ScalarComboboxOption.vue.js +9 -9
  13. package/dist/components/ScalarCombobox/ScalarComboboxOptionGroup.vue.js +9 -9
  14. package/dist/components/ScalarCombobox/ScalarComboboxOptions.vue.js +51 -51
  15. package/dist/components/ScalarContextMenu/ScalarContextMenu.vue.js +8 -8
  16. package/dist/components/ScalarDropdown/ScalarDropdown.vue.js +36 -36
  17. package/dist/components/ScalarDropdown/ScalarDropdownButton.vue2.js +11 -11
  18. package/dist/components/ScalarDropdown/ScalarDropdownItem.vue2.js +14 -14
  19. package/dist/components/ScalarDropdown/ScalarDropdownMenu.vue.js +12 -12
  20. package/dist/components/ScalarFileUpload/ScalarFileUpload.vue.js +47 -47
  21. package/dist/components/ScalarFileUpload/ScalarFileUploadInput.vue.js +23 -23
  22. package/dist/components/ScalarFileUpload/ScalarFileUploadInputCompact.vue.js +17 -17
  23. package/dist/components/ScalarFileUpload/ScalarFileUploadLoading.vue.js +9 -9
  24. package/dist/components/ScalarFloating/ScalarFloating.vue.js +30 -30
  25. package/dist/components/ScalarForm/ScalarFormError.vue.js +8 -8
  26. package/dist/components/ScalarForm/ScalarFormField.vue.js +14 -14
  27. package/dist/components/ScalarForm/ScalarFormInput.vue.js +9 -9
  28. package/dist/components/ScalarForm/ScalarFormInputGroup.vue.js +8 -8
  29. package/dist/components/ScalarHeader/ScalarHeaderButton.vue.js +12 -12
  30. package/dist/components/ScalarIcon/ScalarIcon.vue2.js +8 -8
  31. package/dist/components/ScalarIcon/ScalarIconLegacyAdapter.vue.js +10 -10
  32. package/dist/components/ScalarIconButton/ScalarIconButton.vue.js +18 -18
  33. package/dist/components/ScalarListbox/ScalarListbox.vue.js +28 -28
  34. package/dist/components/ScalarListbox/ScalarListboxCheckbox.vue.js +9 -9
  35. package/dist/components/ScalarListbox/ScalarListboxInput.vue.js +11 -11
  36. package/dist/components/ScalarListbox/ScalarListboxItem.vue.js +10 -10
  37. package/dist/components/ScalarLoading/ScalarLoading.vue2.js +13 -13
  38. package/dist/components/ScalarMarkdown/ScalarMarkdown.vue.js +13 -13
  39. package/dist/components/ScalarMarkdown/ScalarMarkdownSummary.vue.js +16 -16
  40. package/dist/components/ScalarMenu/ScalarMenuButton.vue.js +16 -16
  41. package/dist/components/ScalarMenu/ScalarMenuLink.vue.js +17 -17
  42. package/dist/components/ScalarMenu/ScalarMenuProduct.vue.js +11 -11
  43. package/dist/components/ScalarMenu/ScalarMenuProducts.vue.js +24 -24
  44. package/dist/components/ScalarMenu/ScalarMenuTeamPicker.vue.js +17 -17
  45. package/dist/components/ScalarMenu/ScalarMenuTeamProfile.vue.js +14 -14
  46. package/dist/components/ScalarMenu/ScalarMenuWorkspacePicker.vue.js +8 -8
  47. package/dist/components/ScalarModal/ScalarModal.vue2.js +34 -34
  48. package/dist/components/ScalarPopover/ScalarPopover.vue.js +25 -25
  49. package/dist/components/ScalarSearchInput/ScalarSearchInput.vue.js +26 -26
  50. package/dist/components/ScalarSearchResults/ScalarSearchResultItem.vue.js +30 -30
  51. package/dist/components/ScalarSearchResults/ScalarSearchResultList.vue.js +8 -8
  52. package/dist/components/ScalarSidebar/ScalarSidebarButton.vue.js +24 -24
  53. package/dist/components/ScalarSidebar/ScalarSidebarGroup.vue.js +51 -51
  54. package/dist/components/ScalarSidebar/ScalarSidebarGroupToggle.vue.js +18 -18
  55. package/dist/components/ScalarSidebar/ScalarSidebarIndent.vue2.js +14 -14
  56. package/dist/components/ScalarSidebar/ScalarSidebarItem.vue.js +7 -7
  57. package/dist/components/ScalarSidebar/ScalarSidebarItems.vue.js +12 -12
  58. package/dist/components/ScalarSidebar/ScalarSidebarNestedItems.vue.js +46 -46
  59. package/dist/components/ScalarSidebar/ScalarSidebarSearchInput.vue.js +30 -30
  60. package/dist/components/ScalarSidebar/ScalarSidebarSection.vue.js +18 -18
  61. package/dist/components/ScalarSidebar/ScalarSidebarSpacer.vue.js +8 -8
  62. package/dist/components/ScalarTeleport/ScalarTeleport.vue.js +12 -12
  63. package/dist/components/ScalarTextInput/ScalarTextInput.vue.js +34 -34
  64. package/dist/components/ScalarToggle/ScalarToggle.vue.js +20 -20
  65. package/dist/components/ScalarToggle/ScalarToggleGroup.vue.js +14 -14
  66. package/dist/components/ScalarVirtualText/ScalarVirtualText.vue.js +25 -25
  67. package/package.json +8 -8
@@ -1,12 +1,12 @@
1
- import { defineComponent as v, createBlock as n, openBlock as s, resolveDynamicComponent as l, mergeProps as p, unref as a, withCtx as f, createElementBlock as i, createCommentVNode as d, renderSlot as t, normalizeClass as o, createVNode as z } from "vue";
2
- import { cva as r, useBindCx as g } from "@scalar/use-hooks/useBindCx";
3
- import { BUTTON_VARIANT_STYLES as y } from "./constants.js";
4
- import h from "../ScalarLoading/ScalarLoading.vue.js";
5
- const k = {
1
+ import { defineComponent as f, createBlock as r, openBlock as t, resolveDynamicComponent as d, mergeProps as z, unref as a, withCtx as g, createElementBlock as s, createCommentVNode as c, renderSlot as n, normalizeClass as o, createVNode as x } from "vue";
2
+ import { cva as l, useBindCx as y } from "@scalar/use-hooks/useBindCx";
3
+ import { BUTTON_VARIANT_STYLES as h } from "./constants.js";
4
+ import k from "../ScalarLoading/ScalarLoading.vue.js";
5
+ const A = {
6
6
  key: 3,
7
7
  class: "centered"
8
- }, A = {}, T = /* @__PURE__ */ v({
9
- ...A,
8
+ }, B = {}, T = /* @__PURE__ */ f({
9
+ ...B,
10
10
  inheritAttrs: !1,
11
11
  __name: "ScalarButton",
12
12
  props: {
@@ -17,8 +17,8 @@ const k = {
17
17
  icon: { type: [Object, Function] },
18
18
  loader: {}
19
19
  },
20
- setup(B) {
21
- const m = r({
20
+ setup(e) {
21
+ const m = l({
22
22
  base: "scalar-button flex cursor-pointer items-center justify-center rounded font-medium -outline-offset-1",
23
23
  variants: {
24
24
  disabled: { true: "bg-b-2 text-color-3 shadow-none" },
@@ -27,7 +27,7 @@ const k = {
27
27
  sm: "px-3.5 py-2 text-sm leading-5",
28
28
  md: "px-5 py-3 text-sm leading-5"
29
29
  },
30
- variant: y
30
+ variant: h
31
31
  },
32
32
  compoundVariants: [
33
33
  {
@@ -41,7 +41,7 @@ const k = {
41
41
  class: "to-b-1.5 bg-linear-to-b hover:bg-linear-to-b dark:hover:bg-linear-to-t"
42
42
  }
43
43
  ]
44
- }), c = r({
44
+ }), u = l({
45
45
  base: "shrink-0",
46
46
  variants: {
47
47
  size: {
@@ -50,7 +50,7 @@ const k = {
50
50
  md: "size-3.5 -ml-0.5 mr-1.5"
51
51
  }
52
52
  }
53
- }), u = r({
53
+ }), b = l({
54
54
  variants: {
55
55
  size: {
56
56
  xs: "size-4",
@@ -58,37 +58,37 @@ const k = {
58
58
  md: "size-6"
59
59
  }
60
60
  }
61
- }), { cx: b } = g();
62
- return (e, V) => (s(), n(l(e.is), p(
61
+ }), { cx: v } = y();
62
+ return (i, V) => (t(), r(d(e.is), z(
63
63
  {
64
64
  "aria-disabled": e.disabled || void 0,
65
65
  type: e.is === "button" ? "button" : void 0
66
66
  },
67
- a(b)(a(m)({ disabled: e.disabled, size: e.size, variant: e.variant }), {
67
+ a(v)(a(m)({ disabled: e.disabled, size: e.size, variant: e.variant }), {
68
68
  relative: e.loader?.isActive
69
69
  })
70
70
  ), {
71
- default: f(() => [
72
- e.$slots.icon || e.icon ? (s(), i("div", {
71
+ default: g(() => [
72
+ i.$slots.icon || e.icon ? (t(), s("div", {
73
73
  key: 0,
74
- class: o([a(c)({ size: e.size }), { invisible: e.loader?.isActive }])
74
+ class: o([a(u)({ size: e.size }), { invisible: e.loader?.isActive }])
75
75
  }, [
76
- t(e.$slots, "icon", {}, () => [
77
- (s(), n(l(e.icon), { class: "size-full" }))
76
+ n(i.$slots, "icon", {}, () => [
77
+ (t(), r(d(e.icon), { class: "size-full" }))
78
78
  ])
79
- ], 2)) : d("", !0),
80
- e.loader ? (s(), i("span", {
79
+ ], 2)) : c("", !0),
80
+ e.loader ? (t(), s("span", {
81
81
  key: 1,
82
82
  class: o({ invisible: e.loader?.isActive })
83
83
  }, [
84
- t(e.$slots, "default")
85
- ], 2)) : t(e.$slots, "default", { key: 2 }),
86
- e.loader?.isActive ? (s(), i("div", k, [
87
- z(a(h), {
88
- class: o(a(u)({ size: e.size })),
84
+ n(i.$slots, "default")
85
+ ], 2)) : n(i.$slots, "default", { key: 2 }),
86
+ e.loader?.isActive ? (t(), s("div", A, [
87
+ x(a(k), {
88
+ class: o(a(b)({ size: e.size })),
89
89
  loader: e.loader
90
90
  }, null, 8, ["class", "loader"])
91
- ])) : d("", !0)
91
+ ])) : c("", !0)
92
92
  ]),
93
93
  _: 3
94
94
  }, 16, ["aria-disabled", "type"]));
@@ -1,20 +1,20 @@
1
- import { defineComponent as o, createElementBlock as c, openBlock as t, normalizeClass as r, createBlock as a, createCommentVNode as n, unref as s } from "vue";
2
- import { ScalarIconCheck as l } from "@scalar/icons";
3
- const d = {}, i = /* @__PURE__ */ o({
1
+ import { defineComponent as c, createElementBlock as o, openBlock as t, normalizeClass as r, createBlock as a, createCommentVNode as n, unref as l } from "vue";
2
+ import { ScalarIconCheck as s } from "@scalar/icons";
3
+ const d = {}, p = /* @__PURE__ */ c({
4
4
  ...d,
5
5
  __name: "ScalarCheckbox",
6
6
  props: {
7
7
  selected: { type: Boolean },
8
8
  type: { default: "checkbox" }
9
9
  },
10
- setup(p) {
11
- return (e, m) => (t(), c("div", {
10
+ setup(e) {
11
+ return (m, u) => (t(), o("div", {
12
12
  class: r(["flex size-4 items-center justify-center p-0.75", [
13
13
  e.selected ? "bg-c-accent text-b-1" : "text-transparent shadow-border",
14
14
  e.type === "checkbox" ? "rounded" : "rounded-full"
15
15
  ]])
16
16
  }, [
17
- e.selected ? (t(), a(s(l), {
17
+ e.selected ? (t(), a(l(s), {
18
18
  key: 0,
19
19
  class: "size-3",
20
20
  weight: "bold"
@@ -23,5 +23,5 @@ const d = {}, i = /* @__PURE__ */ o({
23
23
  }
24
24
  });
25
25
  export {
26
- i as default
26
+ p as default
27
27
  };
@@ -1,29 +1,29 @@
1
- import { defineComponent as c, mergeModels as f, useModel as _, useId as i, createBlock as t, openBlock as u, unref as o, withCtx as m, createElementBlock as p, Fragment as v, renderList as V, createTextVNode as k, toDisplayString as x } from "vue";
2
- import g from "./ScalarCheckboxInput.vue.js";
3
- import h from "../ScalarForm/ScalarFormInputGroup.vue.js";
4
- const B = {}, S = /* @__PURE__ */ c({
5
- ...B,
1
+ import { defineComponent as s, mergeModels as c, useModel as f, useId as _, createBlock as o, openBlock as u, unref as m, withCtx as r, createElementBlock as i, Fragment as v, renderList as p, createTextVNode as V, toDisplayString as k } from "vue";
2
+ import x from "./ScalarCheckboxInput.vue.js";
3
+ import g from "../ScalarForm/ScalarFormInputGroup.vue.js";
4
+ const h = {}, S = /* @__PURE__ */ s({
5
+ ...h,
6
6
  __name: "ScalarCheckboxGroup",
7
- props: /* @__PURE__ */ f({
7
+ props: /* @__PURE__ */ c({
8
8
  options: { default: () => [] }
9
9
  }, {
10
10
  modelValue: { default: [] },
11
11
  modelModifiers: {}
12
12
  }),
13
13
  emits: ["update:modelValue"],
14
- setup(r) {
15
- const l = _(r, "modelValue"), d = i();
16
- return (n, C) => (u(), t(o(h), null, {
17
- default: m(() => [
18
- (u(!0), p(v, null, V(n.options, (e) => (u(), t(g, {
14
+ setup(t) {
15
+ const l = f(t, "modelValue"), d = _();
16
+ return (B, C) => (u(), o(m(g), null, {
17
+ default: r(() => [
18
+ (u(!0), i(v, null, p(t.options, (e) => (u(), o(x, {
19
19
  key: e.value,
20
20
  modelValue: l.value?.some(({ value: a }) => a === e.value),
21
- name: o(d),
21
+ name: m(d),
22
22
  value: e.value,
23
- "onUpdate:modelValue": (a) => l.value = a ? [...l.value, e] : l.value.filter(({ value: s }) => s !== e.value)
23
+ "onUpdate:modelValue": (a) => l.value = a ? [...l.value, e] : l.value.filter(({ value: n }) => n !== e.value)
24
24
  }, {
25
- default: m(() => [
26
- k(x(e.label), 1)
25
+ default: r(() => [
26
+ V(k(e.label), 1)
27
27
  ]),
28
28
  _: 2
29
29
  }, 1032, ["modelValue", "name", "value", "onUpdate:modelValue"]))), 128))
@@ -1,23 +1,23 @@
1
- import { defineComponent as u, mergeModels as m, useModel as p, createBlock as c, openBlock as f, unref as o, mergeProps as s, withCtx as _, createVNode as y, createElementVNode as r, withDirectives as h, renderSlot as v, vModelDynamic as x } from "vue";
1
+ import { defineComponent as c, mergeModels as u, useModel as m, createBlock as p, openBlock as f, unref as o, mergeProps as s, withCtx as _, createVNode as y, createElementVNode as r, withDirectives as h, renderSlot as x, vModelDynamic as v } from "vue";
2
2
  import { useBindCx as V } from "@scalar/use-hooks/useBindCx";
3
3
  import b from "./ScalarCheckbox.vue.js";
4
4
  import g from "../ScalarForm/ScalarFormInput.vue.js";
5
- const k = { class: "flex-1 text-left min-w-0 truncate" }, C = ["type"], B = {}, D = /* @__PURE__ */ u({
5
+ const k = { class: "flex-1 text-left min-w-0 truncate" }, C = ["type"], B = {}, D = /* @__PURE__ */ c({
6
6
  ...B,
7
7
  inheritAttrs: !1,
8
8
  __name: "ScalarCheckboxInput",
9
- props: /* @__PURE__ */ m({
9
+ props: /* @__PURE__ */ u({
10
10
  type: { default: "checkbox" }
11
11
  }, {
12
12
  modelValue: { type: Boolean },
13
13
  modelModifiers: {}
14
14
  }),
15
15
  emits: ["update:modelValue"],
16
- setup(n) {
17
- const e = p(n, "modelValue"), { stylingAttrsCx: a, otherAttrs: i } = V();
18
- return (t, l) => (f(), c(o(g), s(
16
+ setup(t) {
17
+ const e = m(t, "modelValue"), { stylingAttrsCx: n, otherAttrs: a } = V();
18
+ return (i, l) => (f(), p(o(g), s(
19
19
  { is: "label" },
20
- o(a)("cursor-pointer gap-2 hover:bg-b-2", { "text-c-1": e.value })
20
+ o(n)("cursor-pointer gap-2 hover:bg-b-2", { "text-c-1": e.value })
21
21
  ), {
22
22
  default: _(() => [
23
23
  y(b, {
@@ -26,14 +26,14 @@ const k = { class: "flex-1 text-left min-w-0 truncate" }, C = ["type"], B = {},
26
26
  type: t.type
27
27
  }, null, 8, ["selected", "type"]),
28
28
  r("div", k, [
29
- v(t.$slots, "default")
29
+ x(i.$slots, "default")
30
30
  ]),
31
31
  h(r("input", s({
32
32
  "onUpdate:modelValue": l[0] || (l[0] = (d) => e.value = d),
33
33
  class: "sr-only",
34
34
  type: t.type
35
- }, o(i)), null, 16, C), [
36
- [x, e.value]
35
+ }, o(a)), null, 16, C), [
36
+ [v, e.value]
37
37
  ])
38
38
  ]),
39
39
  _: 3
@@ -1,8 +1,8 @@
1
- import { defineComponent as s, mergeModels as c, useModel as i, useId as _, createBlock as o, openBlock as l, unref as t, withCtx as u, createElementBlock as f, Fragment as p, renderList as v, createTextVNode as V, toDisplayString as k } from "vue";
2
- import x from "./ScalarCheckboxInput.vue.js";
3
- import g from "../ScalarForm/ScalarFormInputGroup.vue.js";
4
- const h = {}, b = /* @__PURE__ */ s({
5
- ...h,
1
+ import { defineComponent as n, mergeModels as c, useModel as s, useId as i, createBlock as t, openBlock as l, unref as u, withCtx as d, createElementBlock as f, Fragment as _, renderList as p, createTextVNode as v, toDisplayString as V } from "vue";
2
+ import k from "./ScalarCheckboxInput.vue.js";
3
+ import x from "../ScalarForm/ScalarFormInputGroup.vue.js";
4
+ const g = {}, b = /* @__PURE__ */ n({
5
+ ...g,
6
6
  __name: "ScalarCheckboxRadioGroup",
7
7
  props: /* @__PURE__ */ c({
8
8
  options: { default: () => [] }
@@ -11,20 +11,20 @@ const h = {}, b = /* @__PURE__ */ s({
11
11
  modelModifiers: {}
12
12
  }),
13
13
  emits: ["update:modelValue"],
14
- setup(r) {
15
- const a = i(r, "modelValue"), d = _();
16
- return (m, y) => (l(), o(t(g), null, {
17
- default: u(() => [
18
- (l(!0), f(p, null, v(m.options, (e) => (l(), o(x, {
14
+ setup(a) {
15
+ const o = s(a, "modelValue"), m = i();
16
+ return (h, y) => (l(), t(u(x), null, {
17
+ default: d(() => [
18
+ (l(!0), f(_, null, p(a.options, (e) => (l(), t(k, {
19
19
  key: e.value,
20
- modelValue: a.value?.value === e.value,
21
- name: t(d),
20
+ modelValue: o.value?.value === e.value,
21
+ name: u(m),
22
22
  type: "radio",
23
23
  value: e.value,
24
- "onUpdate:modelValue": (n) => a.value = n ? e : void 0
24
+ "onUpdate:modelValue": (r) => o.value = r ? e : void 0
25
25
  }, {
26
- default: u(() => [
27
- V(k(e.label), 1)
26
+ default: d(() => [
27
+ v(V(e.label), 1)
28
28
  ]),
29
29
  _: 2
30
30
  }, 1032, ["modelValue", "name", "value", "onUpdate:modelValue"]))), 128))
@@ -1,4 +1,4 @@
1
- import { defineComponent as s, useId as u, computed as n, createElementBlock as d, openBlock as r, createBlock as m, createCommentVNode as p, createElementVNode as f, unref as o } from "vue";
1
+ import { defineComponent as s, useId as u, computed as n, createElementBlock as d, openBlock as a, createBlock as m, createCommentVNode as p, createElementVNode as f, unref as o } from "vue";
2
2
  import { syntaxHighlight as h, standardLanguages as C } from "@scalar/code-highlight";
3
3
  import { prettyPrintJson as g } from "@scalar/oas-utils/helpers";
4
4
  import y from "./ScalarCodeBlockCopy.vue.js";
@@ -18,14 +18,14 @@ const k = {
18
18
  setup(e) {
19
19
  const l = u(), t = n(
20
20
  () => e.prettyPrintedContent || g(e.content ?? "")
21
- ), c = n(() => h(t.value, {
21
+ ), r = n(() => h(t.value, {
22
22
  lang: e.lang.trim(),
23
23
  languages: C,
24
24
  lineNumbers: e.lineNumbers,
25
25
  maskCredentials: e.hideCredentials
26
- }).slice(5, -6)), i = n(() => t.value !== null && t.value !== "null" && t.value !== "404 Not Found");
27
- return (a, b) => (r(), d("div", k, [
28
- a.copy && i.value ? (r(), m(o(y), {
26
+ }).slice(5, -6)), c = n(() => t.value !== null && t.value !== "null" && t.value !== "404 Not Found");
27
+ return (i, b) => (a(), d("div", k, [
28
+ e.copy && c.value ? (a(), m(o(y), {
29
29
  key: 0,
30
30
  content: t.value,
31
31
  controls: o(l)
@@ -33,7 +33,7 @@ const k = {
33
33
  f("pre", {
34
34
  id: o(l),
35
35
  class: "scalar-codeblock-pre",
36
- innerHTML: c.value
36
+ innerHTML: r.value
37
37
  }, null, 8, v)
38
38
  ]));
39
39
  }
@@ -1,28 +1,28 @@
1
- import { defineComponent as f, ref as d, createElementBlock as n, openBlock as l, normalizeClass as s, unref as o, createVNode as a, createCommentVNode as m, withCtx as y } from "vue";
1
+ import { defineComponent as p, ref as d, createElementBlock as n, openBlock as l, normalizeClass as c, unref as t, createVNode as s, createCommentVNode as m, withCtx as y } from "vue";
2
2
  import { ScalarIconCopy as C, ScalarIconCheck as h } from "@scalar/icons";
3
3
  import { cva as v, cx as i } from "@scalar/use-hooks/useBindCx";
4
4
  import { useClipboard as b } from "@scalar/use-hooks/useClipboard";
5
5
  import k from "../ScalarButton/ScalarButton.vue.js";
6
- const g = {
6
+ const x = {
7
7
  key: 0,
8
8
  class: "sr-only",
9
9
  role: "alert"
10
- }, N = /* @__PURE__ */ f({
10
+ }, T = /* @__PURE__ */ p({
11
11
  __name: "ScalarCodeBlockCopy",
12
12
  props: {
13
13
  content: {},
14
14
  controls: {},
15
15
  class: {}
16
16
  },
17
- setup(t) {
17
+ setup(o) {
18
18
  const { copyToClipboard: r } = b(), e = d(!1), u = async () => {
19
19
  if (e.value)
20
20
  return;
21
- const c = typeof t.content == "string" ? t.content : JSON.stringify(t.content, null, 2);
22
- await r(c), e.value = !0, setTimeout(() => {
21
+ const a = typeof o.content == "string" ? o.content : JSON.stringify(o.content, null, 2);
22
+ await r(a), e.value = !0, setTimeout(() => {
23
23
  e.value = !1;
24
24
  }, 1200);
25
- }, p = v({
25
+ }, f = v({
26
26
  base: "absolute top-0 right-0 h-8 w-8 p-0 flex items-center justify-center brightness-lifted bg-inherit rounded focus-visible:opacity-100 -outline-offset-1",
27
27
  variants: {
28
28
  showCopied: {
@@ -31,36 +31,36 @@ const g = {
31
31
  }
32
32
  }
33
33
  });
34
- return (c, x) => (l(), n("div", {
35
- class: s(
36
- o(i)(
34
+ return (a, g) => (l(), n("div", {
35
+ class: c(
36
+ t(i)(
37
37
  "scalar-code-copy opacity-0 group-hover/code-block:opacity-100 sticky flex inset-0 justify-end items-start bg-inherit",
38
- t.class
38
+ o.class
39
39
  )
40
40
  )
41
41
  }, [
42
- a(o(k), {
43
- "aria-controls": c.controls,
42
+ s(t(k), {
43
+ "aria-controls": o.controls,
44
44
  "aria-label": "Copy",
45
- class: s(o(i)(o(p)({ showCopied: e.value }))),
45
+ class: c(t(i)(t(f)({ showCopied: e.value }))),
46
46
  type: "button",
47
47
  variant: "ghost",
48
48
  onClick: u
49
49
  }, {
50
50
  default: y(() => [
51
- a(o(C), {
52
- class: s(["copy-icon size-4", { copied: e.value }])
51
+ s(t(C), {
52
+ class: c(["copy-icon size-4", { copied: e.value }])
53
53
  }, null, 8, ["class"]),
54
- a(o(h), {
55
- class: s(["check-icon size-4", { visible: e.value }])
54
+ s(t(h), {
55
+ class: c(["check-icon size-4", { visible: e.value }])
56
56
  }, null, 8, ["class"])
57
57
  ]),
58
58
  _: 1
59
59
  }, 8, ["aria-controls", "class"]),
60
- e.value ? (l(), n("div", g, " Copied ")) : m("", !0)
60
+ e.value ? (l(), n("div", x, " Copied ")) : m("", !0)
61
61
  ], 2));
62
62
  }
63
63
  });
64
64
  export {
65
- N as default
65
+ T as default
66
66
  };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as u, computed as c, createBlock as r, openBlock as t, unref as o, isRef as s } from "vue";
2
- import { useColorMode as p } from "@scalar/use-hooks/useColorMode";
3
- import f from "./ScalarColorModeToggleButton.vue.js";
2
+ import { useColorMode as f } from "@scalar/use-hooks/useColorMode";
3
+ import p from "./ScalarColorModeToggleButton.vue.js";
4
4
  import _ from "./ScalarColorModeToggleIcon.vue.js";
5
5
  const k = {}, S = /* @__PURE__ */ u({
6
6
  ...k,
@@ -8,11 +8,11 @@ const k = {}, S = /* @__PURE__ */ u({
8
8
  props: {
9
9
  variant: { default: "switch" }
10
10
  },
11
- setup(g) {
12
- const { isDarkMode: e, toggleColorMode: n, darkLightMode: i } = p(), l = c(
11
+ setup(n) {
12
+ const { isDarkMode: e, toggleColorMode: i, darkLightMode: d } = f(), l = c(
13
13
  () => e.value ? "Set light mode" : "Set dark mode"
14
14
  );
15
- return (d, a) => d.variant === "switch" ? (t(), r(f, {
15
+ return (g, a) => n.variant === "switch" ? (t(), r(p, {
16
16
  key: 0,
17
17
  modelValue: o(e),
18
18
  "onUpdate:modelValue": a[0] || (a[0] = (m) => s(e) ? e.value = m : null),
@@ -20,8 +20,8 @@ const k = {}, S = /* @__PURE__ */ u({
20
20
  }, null, 8, ["modelValue", "aria-label"])) : (t(), r(_, {
21
21
  key: 1,
22
22
  "aria-label": l.value,
23
- mode: o(i),
24
- onClick: o(n)
23
+ mode: o(d),
24
+ onClick: o(i)
25
25
  }, null, 8, ["aria-label", "mode", "onClick"]));
26
26
  }
27
27
  });
@@ -1,23 +1,23 @@
1
- import { defineComponent as a, computed as r, createBlock as i, openBlock as c, resolveDynamicComponent as u, mergeProps as m, unref as p, withCtx as g, createElementVNode as e } from "vue";
1
+ import { defineComponent as a, computed as s, createBlock as c, openBlock as i, resolveDynamicComponent as r, mergeProps as u, unref as m, withCtx as g, createElementVNode as e } from "vue";
2
2
  import { useBindCx as d } from "@scalar/use-hooks/useBindCx";
3
- const f = {}, _ = /* @__PURE__ */ a({
4
- ...f,
3
+ const p = {}, b = /* @__PURE__ */ a({
4
+ ...p,
5
5
  inheritAttrs: !1,
6
6
  __name: "ScalarColorModeToggleIcon",
7
7
  props: {
8
8
  is: { default: "button" },
9
9
  mode: { default: "light" }
10
10
  },
11
- setup(l) {
12
- const { cx: n } = d(), s = r(
13
- () => l.mode === "dark" ? "Set light mode" : "Set dark mode"
11
+ setup(t) {
12
+ const { cx: l } = d(), n = s(
13
+ () => t.mode === "dark" ? "Set light mode" : "Set dark mode"
14
14
  );
15
- return (o, t) => (c(), i(u(o.is), m({
16
- "aria-label": s.value,
17
- class: `toggle-icon-${o.mode}`,
18
- type: o.is === "button" ? "button" : void 0
19
- }, p(n)("size-3 flex items-center justify-center text-c-1")), {
20
- default: g(() => [...t[0] || (t[0] = [
15
+ return (f, o) => (i(), c(r(t.is), u({
16
+ "aria-label": n.value,
17
+ class: `toggle-icon-${t.mode}`,
18
+ type: t.is === "button" ? "button" : void 0
19
+ }, m(l)("size-3 flex items-center justify-center text-c-1")), {
20
+ default: g(() => [...o[0] || (o[0] = [
21
21
  e("span", { class: "toggle-icon-sun-ray" }, null, -1),
22
22
  e("span", { class: "toggle-icon-sun-ray" }, null, -1),
23
23
  e("span", { class: "toggle-icon-sun-ray" }, null, -1),
@@ -31,5 +31,5 @@ const f = {}, _ = /* @__PURE__ */ a({
31
31
  }
32
32
  });
33
33
  export {
34
- _ as default
34
+ b as default
35
35
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as f, mergeModels as s, useModel as c, createBlock as g, openBlock as $, withCtx as t, createVNode as v, createSlots as V, renderSlot as l, normalizeProps as r, guardReactiveProps as n } from "vue";
1
+ import { defineComponent as f, mergeModels as s, useModel as c, createBlock as g, openBlock as $, withCtx as l, createVNode as v, createSlots as V, renderSlot as a, normalizeProps as n, guardReactiveProps as m } from "vue";
2
2
  import h from "./ScalarComboboxOptions.vue.js";
3
3
  import y from "./ScalarComboboxPopover.vue.js";
4
4
  const B = /* @__PURE__ */ f({
@@ -17,9 +17,9 @@ const B = /* @__PURE__ */ f({
17
17
  modelModifiers: {}
18
18
  }),
19
19
  emits: /* @__PURE__ */ s(["add"], ["update:modelValue"]),
20
- setup(m, { emit: i }) {
21
- const u = i, a = c(m, "modelValue");
22
- return (e, b) => ($(), g(y, {
20
+ setup(e, { emit: p }) {
21
+ const u = p, d = c(e, "modelValue");
22
+ return (o, b) => ($(), g(y, {
23
23
  middleware: e.middleware,
24
24
  offset: e.offset,
25
25
  placement: e.placement ?? "bottom-start",
@@ -27,36 +27,36 @@ const B = /* @__PURE__ */ f({
27
27
  target: e.target,
28
28
  teleport: e.teleport
29
29
  }, {
30
- default: t(({ open: d }) => [
31
- l(e.$slots, "default", { open: d })
30
+ default: l(({ open: r }) => [
31
+ a(o.$slots, "default", { open: r })
32
32
  ]),
33
- popover: t(({ open: d, close: p }) => [
33
+ popover: l(({ open: r, close: i }) => [
34
34
  v(h, {
35
- modelValue: a.value ? [a.value] : [],
36
- open: d,
35
+ modelValue: d.value ? [d.value] : [],
36
+ open: r,
37
37
  options: e.options,
38
38
  placeholder: e.placeholder,
39
- onAdd: () => (p(), u("add")),
40
- "onUpdate:modelValue": (o) => (p(), a.value = o[0])
39
+ onAdd: () => (i(), u("add")),
40
+ "onUpdate:modelValue": (t) => (i(), d.value = t[0])
41
41
  }, V({ _: 2 }, [
42
- e.$slots.option ? {
42
+ o.$slots.option ? {
43
43
  name: "option",
44
- fn: t((o) => [
45
- l(e.$slots, "option", r(n(o)))
44
+ fn: l((t) => [
45
+ a(o.$slots, "option", n(m(t)))
46
46
  ]),
47
47
  key: "0"
48
48
  } : void 0,
49
- e.$slots.group ? {
49
+ o.$slots.group ? {
50
50
  name: "group",
51
- fn: t((o) => [
52
- l(e.$slots, "group", r(n(o)))
51
+ fn: l((t) => [
52
+ a(o.$slots, "group", n(m(t)))
53
53
  ]),
54
54
  key: "1"
55
55
  } : void 0,
56
- e.$slots.add ? {
56
+ o.$slots.add ? {
57
57
  name: "add",
58
- fn: t((o) => [
59
- l(e.$slots, "add", r(n(o)))
58
+ fn: l((t) => [
59
+ a(o.$slots, "add", n(m(t)))
60
60
  ]),
61
61
  key: "2"
62
62
  } : void 0
@@ -1,9 +1,9 @@
1
- import { defineComponent as b, mergeModels as m, useModel as y, ref as c, createBlock as i, openBlock as f, withCtx as t, createCommentVNode as k, createSlots as V, renderSlot as r, normalizeProps as d, guardReactiveProps as s } from "vue";
1
+ import { defineComponent as $, mergeModels as f, useModel as b, ref as y, createBlock as p, openBlock as u, withCtx as l, createCommentVNode as k, createSlots as V, renderSlot as d, normalizeProps as n, guardReactiveProps as m } from "vue";
2
2
  import w from "./ScalarComboboxOptions.vue.js";
3
3
  import z from "./ScalarComboboxPopover.vue.js";
4
- const P = /* @__PURE__ */ b({
4
+ const P = /* @__PURE__ */ $({
5
5
  __name: "ScalarComboboxMultiselect",
6
- props: /* @__PURE__ */ m({
6
+ props: /* @__PURE__ */ f({
7
7
  options: {},
8
8
  placeholder: {},
9
9
  placement: {},
@@ -16,12 +16,12 @@ const P = /* @__PURE__ */ b({
16
16
  modelValue: { default: [] },
17
17
  modelModifiers: {}
18
18
  }),
19
- emits: /* @__PURE__ */ m(["add"], ["update:modelValue"]),
20
- setup(u, { expose: g, emit: v }) {
21
- const $ = v, n = y(u, "modelValue"), p = c(null);
22
- return g({ comboboxPopoverRef: p }), (e, l) => (f(), i(z, {
19
+ emits: /* @__PURE__ */ f(["add"], ["update:modelValue"]),
20
+ setup(e, { expose: c, emit: g }) {
21
+ const v = g, s = b(e, "modelValue"), i = y(null);
22
+ return c({ comboboxPopoverRef: i }), (t, a) => (u(), p(z, {
23
23
  ref_key: "comboboxPopoverRef",
24
- ref: p,
24
+ ref: i,
25
25
  middleware: e.middleware,
26
26
  offset: e.offset,
27
27
  placement: e.placement ?? "bottom-start",
@@ -29,38 +29,38 @@ const P = /* @__PURE__ */ b({
29
29
  target: e.target,
30
30
  teleport: e.teleport
31
31
  }, {
32
- default: t(({ open: a }) => [
33
- r(e.$slots, "default", { open: a })
32
+ default: l(({ open: r }) => [
33
+ d(t.$slots, "default", { open: r })
34
34
  ]),
35
- popover: t(({ open: a }) => [
36
- e.options?.length ? (f(), i(w, {
35
+ popover: l(({ open: r }) => [
36
+ e.options?.length ? (u(), p(w, {
37
37
  key: 0,
38
- modelValue: n.value,
39
- "onUpdate:modelValue": l[0] || (l[0] = (o) => n.value = o),
38
+ modelValue: s.value,
39
+ "onUpdate:modelValue": a[0] || (a[0] = (o) => s.value = o),
40
40
  multiselect: "",
41
- open: a,
41
+ open: r,
42
42
  options: e.options,
43
43
  placeholder: e.placeholder,
44
- onAdd: l[1] || (l[1] = (o) => $("add"))
44
+ onAdd: a[1] || (a[1] = (o) => v("add"))
45
45
  }, V({ _: 2 }, [
46
- e.$slots.option ? {
46
+ t.$slots.option ? {
47
47
  name: "option",
48
- fn: t((o) => [
49
- r(e.$slots, "option", d(s(o)))
48
+ fn: l((o) => [
49
+ d(t.$slots, "option", n(m(o)))
50
50
  ]),
51
51
  key: "0"
52
52
  } : void 0,
53
- e.$slots.group ? {
53
+ t.$slots.group ? {
54
54
  name: "group",
55
- fn: t((o) => [
56
- r(e.$slots, "group", d(s(o)))
55
+ fn: l((o) => [
56
+ d(t.$slots, "group", n(m(o)))
57
57
  ]),
58
58
  key: "1"
59
59
  } : void 0,
60
- e.$slots.add ? {
60
+ t.$slots.add ? {
61
61
  name: "add",
62
- fn: t((o) => [
63
- r(e.$slots, "add", d(s(o)))
62
+ fn: l((o) => [
63
+ d(t.$slots, "add", n(m(o)))
64
64
  ]),
65
65
  key: "2"
66
66
  } : void 0