@scalar/components 0.16.20 → 0.16.22

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 A, mergeModels as m, useModel as p, ref as c, createElementBlock as v, openBlock as r, mergeProps as E, unref as s, withModifiers as g, renderSlot as a, createCommentVNode as y, createBlock as $, createElementVNode as F, resolveDynamicComponent as T, createSlots as k, withCtx as n, createVNode as b, createTextVNode as w, toDisplayString as j } from "vue";
2
- import { useBindCx as P } from "@scalar/use-hooks/useBindCx";
3
- import U from "./ScalarFileUploadDropTarget.vue.js";
4
- import _ from "./ScalarFileUploadError.vue.js";
1
+ import { defineComponent as S, mergeModels as m, useModel as c, ref as v, createElementBlock as p, openBlock as n, mergeProps as A, unref as s, withModifiers as g, renderSlot as r, createCommentVNode as y, createBlock as $, createElementVNode as E, resolveDynamicComponent as F, createSlots as k, withCtx as i, createVNode as b, createTextVNode as T, toDisplayString as w } from "vue";
2
+ import { useBindCx as j } from "@scalar/use-hooks/useBindCx";
3
+ import P from "./ScalarFileUploadDropTarget.vue.js";
4
+ import U from "./ScalarFileUploadError.vue.js";
5
5
  import q from "./ScalarFileUploadInput.vue.js";
6
6
  import z from "./ScalarFileUploadInputCompact.vue.js";
7
7
  import G from "./ScalarFileUploadLoading.vue.js";
8
8
  import { isExtensionList as h } from "./types.js";
9
- const H = ["accept", "multiple"], I = {}, Y = /* @__PURE__ */ A({
9
+ const H = ["accept", "multiple"], I = {}, Y = /* @__PURE__ */ S({
10
10
  ...I,
11
11
  inheritAttrs: !1,
12
12
  __name: "ScalarFileUpload",
@@ -22,62 +22,62 @@ const H = ["accept", "multiple"], I = {}, Y = /* @__PURE__ */ A({
22
22
  errorModifiers: {}
23
23
  }),
24
24
  emits: /* @__PURE__ */ m(["selected"], ["update:modelValue", "update:error"]),
25
- setup(i, { emit: C }) {
26
- const D = C, V = p(i, "modelValue"), l = p(i, "error"), u = c(), t = c(!1);
25
+ setup(t, { emit: C }) {
26
+ const D = C, V = c(t, "modelValue"), o = c(t, "error"), u = v(), a = v(!1);
27
27
  function d() {
28
28
  u.value?.click();
29
29
  }
30
30
  function f(e) {
31
- if (l.value = void 0, !e || e.length < 1) {
32
- l.value = "No files found to upload";
31
+ if (o.value = void 0, !e || e.length < 1) {
32
+ o.value = "No files found to upload";
33
33
  return;
34
34
  }
35
- const o = Array.from(e);
36
- if (!i.multiple && o.length > 1) {
37
- l.value = "Too many files selected";
35
+ const l = Array.from(e);
36
+ if (!t.multiple && l.length > 1) {
37
+ o.value = "Too many files selected";
38
38
  return;
39
39
  }
40
- V.value = o, D("selected", o);
40
+ V.value = l, D("selected", l);
41
41
  }
42
- function B(e) {
43
- const o = e.target.files;
44
- f(o);
42
+ function x(e) {
43
+ const l = e.target.files;
44
+ f(l);
45
45
  }
46
- function M(e) {
47
- t.value = !1, f(e.dataTransfer?.files);
46
+ function B(e) {
47
+ a.value = !1, f(e.dataTransfer?.files);
48
48
  }
49
- const { cx: N } = P();
50
- return (e, o) => (r(), v("div", E(
51
- s(N)(
49
+ const { cx: M } = j();
50
+ return (e, l) => (n(), p("div", A(
51
+ s(M)(
52
52
  "flex flex-col relative border-dashed border-1 has-[input:focus-visible]:outline outline-offset-1 rounded"
53
53
  ),
54
54
  {
55
- onDragenter: o[1] || (o[1] = (S) => t.value = !0),
56
- onDragover: o[2] || (o[2] = g(() => {
55
+ onDragenter: l[1] || (l[1] = (N) => a.value = !0),
56
+ onDragover: l[2] || (l[2] = g(() => {
57
57
  }, ["prevent"])),
58
- onDrop: g(M, ["prevent"])
58
+ onDrop: g(B, ["prevent"])
59
59
  }
60
60
  ), [
61
- a(e.$slots, "default", { open: d }, () => [
62
- (r(), $(T(
63
- e.variant === "compact" ? z : q
61
+ r(e.$slots, "default", { open: d }, () => [
62
+ (n(), $(F(
63
+ t.variant === "compact" ? z : q
64
64
  ), {
65
- extensions: s(h)(e.accept) ? e.accept : void 0,
65
+ extensions: s(h)(t.accept) ? t.accept : void 0,
66
66
  onClick: d
67
67
  }, k({ _: 2 }, [
68
68
  e.$slots.label ? {
69
69
  name: "default",
70
- fn: n(() => [
71
- a(e.$slots, "label")
70
+ fn: i(() => [
71
+ r(e.$slots, "label")
72
72
  ]),
73
73
  key: "0"
74
74
  } : void 0,
75
- l.value ? {
75
+ o.value ? {
76
76
  name: "sublabel",
77
- fn: n(() => [
78
- b(_, null, {
79
- default: n(() => [
80
- w(j(l.value), 1)
77
+ fn: i(() => [
78
+ b(U, null, {
79
+ default: i(() => [
80
+ T(w(o.value), 1)
81
81
  ]),
82
82
  _: 1
83
83
  })
@@ -86,35 +86,35 @@ const H = ["accept", "multiple"], I = {}, Y = /* @__PURE__ */ A({
86
86
  } : void 0
87
87
  ]), 1032, ["extensions"]))
88
88
  ]),
89
- t.value ? (r(), v("div", {
89
+ a.value ? (n(), p("div", {
90
90
  key: 0,
91
91
  class: "absolute inset-0",
92
- onDragleave: o[0] || (o[0] = (S) => t.value = !1)
92
+ onDragleave: l[0] || (l[0] = (N) => a.value = !1)
93
93
  }, [
94
- a(e.$slots, "drop-target", {}, () => [
95
- b(U, null, k({ _: 2 }, [
94
+ r(e.$slots, "drop-target", {}, () => [
95
+ b(P, null, k({ _: 2 }, [
96
96
  e.$slots["drop-target-label"] ? {
97
97
  name: "default",
98
- fn: n(() => [
99
- a(e.$slots, "drop-target-label")
98
+ fn: i(() => [
99
+ r(e.$slots, "drop-target-label")
100
100
  ]),
101
101
  key: "0"
102
102
  } : void 0
103
103
  ]), 1024)
104
104
  ])
105
105
  ], 32)) : y("", !0),
106
- e.loader?.isActive ? (r(), $(G, {
106
+ t.loader?.isActive ? (n(), $(G, {
107
107
  key: 1,
108
- loader: e.loader
108
+ loader: t.loader
109
109
  }, null, 8, ["loader"])) : y("", !0),
110
- F("input", {
110
+ E("input", {
111
111
  ref_key: "input",
112
112
  ref: u,
113
- accept: s(h)(e.accept) ? e.accept.join(",") : e.accept,
113
+ accept: s(h)(t.accept) ? t.accept.join(",") : t.accept,
114
114
  class: "sr-only",
115
- multiple: e.multiple,
115
+ multiple: t.multiple,
116
116
  type: "file",
117
- onChange: B
117
+ onChange: x
118
118
  }, null, 40, H)
119
119
  ], 16));
120
120
  }
@@ -1,11 +1,11 @@
1
- import { defineComponent as m, createElementBlock as i, openBlock as n, normalizeProps as f, guardReactiveProps as u, unref as l, createElementVNode as s, renderSlot as r, createVNode as c, createTextVNode as o, toDisplayString as p, withCtx as x, createCommentVNode as _ } from "vue";
2
- import { useBindCx as k } from "@scalar/use-hooks/useBindCx";
3
- import y from "../ScalarButton/ScalarButton.vue.js";
4
- const v = { class: "flex items-center gap-1.5 whitespace-nowrap" }, B = { class: "text-c-2" }, C = {
1
+ import { defineComponent as f, createElementBlock as n, openBlock as l, normalizeProps as c, guardReactiveProps as u, unref as r, createElementVNode as t, renderSlot as a, createVNode as x, createTextVNode as i, toDisplayString as p, withCtx as k, createCommentVNode as y } from "vue";
2
+ import { useBindCx as v } from "@scalar/use-hooks/useBindCx";
3
+ import B from "../ScalarButton/ScalarButton.vue.js";
4
+ const C = { class: "flex items-center gap-1.5 whitespace-nowrap" }, g = { class: "text-c-2" }, w = {
5
5
  key: 0,
6
6
  class: "text-c-3 text-xs"
7
- }, g = {}, $ = /* @__PURE__ */ m({
8
- ...g,
7
+ }, N = {}, $ = /* @__PURE__ */ f({
8
+ ...N,
9
9
  inheritAttrs: !1,
10
10
  __name: "ScalarFileUploadInput",
11
11
  props: {
@@ -13,33 +13,33 @@ const v = { class: "flex items-center gap-1.5 whitespace-nowrap" }, B = { class:
13
13
  extensions: {}
14
14
  },
15
15
  emits: ["click"],
16
- setup(w) {
17
- const { cx: a } = k();
18
- return (t, e) => (n(), i("div", f(u(l(a)("flex items-center justify-center gap-2 flex-col px-6 py-4"))), [
19
- s("div", v, [
20
- s("span", B, [
21
- r(t.$slots, "default", {}, () => [
22
- o("Drop " + p(t.multiple ? "files" : "file") + " here to upload", 1)
16
+ setup(s) {
17
+ const { cx: d } = v();
18
+ return (o, e) => (l(), n("div", c(u(r(d)("flex items-center justify-center gap-2 flex-col px-6 py-4"))), [
19
+ t("div", C, [
20
+ t("span", g, [
21
+ a(o.$slots, "default", {}, () => [
22
+ i("Drop " + p(s.multiple ? "files" : "file") + " here to upload", 1)
23
23
  ]),
24
- e[1] || (e[1] = s("span", { class: "text-c-3" }, " or", -1))
24
+ e[1] || (e[1] = t("span", { class: "text-c-3" }, " or", -1))
25
25
  ]),
26
- c(l(y), {
26
+ x(r(B), {
27
27
  size: "xs",
28
28
  tabindex: "-1",
29
29
  variant: "outlined",
30
- onClick: e[0] || (e[0] = (d) => t.$emit("click", d))
30
+ onClick: e[0] || (e[0] = (m) => o.$emit("click", m))
31
31
  }, {
32
- default: x(() => [...e[2] || (e[2] = [
33
- o(" Browse files ", -1)
32
+ default: k(() => [...e[2] || (e[2] = [
33
+ i(" Browse files ", -1)
34
34
  ])]),
35
35
  _: 1
36
36
  })
37
37
  ]),
38
- r(t.$slots, "sublabel", {}, () => [
39
- t.extensions ? (n(), i("div", C, [
40
- e[3] || (e[3] = s("span", { class: "font-medium" }, "Supported file types:", -1)),
41
- o(" " + p(t.extensions.join(", ")), 1)
42
- ])) : _("", !0)
38
+ a(o.$slots, "sublabel", {}, () => [
39
+ s.extensions ? (l(), n("div", w, [
40
+ e[3] || (e[3] = t("span", { class: "font-medium" }, "Supported file types:", -1)),
41
+ i(" " + p(s.extensions.join(", ")), 1)
42
+ ])) : y("", !0)
43
43
  ])
44
44
  ], 16));
45
45
  }
@@ -1,11 +1,11 @@
1
- import { defineComponent as c, createElementBlock as o, openBlock as s, mergeProps as m, unref as n, createElementVNode as l, renderSlot as i, createVNode as d, toDisplayString as r, createCommentVNode as u } from "vue";
2
- import { ScalarIconUploadSimple as f } from "@scalar/icons";
3
- import { useBindCx as x } from "@scalar/use-hooks/useBindCx";
4
- const _ = { class: "flex items-center gap-1 whitespace-nowrap text-c-2" }, b = {
1
+ import { defineComponent as m, createElementBlock as n, openBlock as l, mergeProps as d, unref as s, createElementVNode as i, renderSlot as r, createVNode as u, toDisplayString as a, createCommentVNode as f } from "vue";
2
+ import { ScalarIconUploadSimple as x } from "@scalar/icons";
3
+ import { useBindCx as b } from "@scalar/use-hooks/useBindCx";
4
+ const k = { class: "flex items-center gap-1 whitespace-nowrap text-c-2" }, y = {
5
5
  key: 0,
6
6
  class: "text-c-3 text-xs"
7
- }, k = {}, h = /* @__PURE__ */ c({
8
- ...k,
7
+ }, g = {}, h = /* @__PURE__ */ m({
8
+ ...g,
9
9
  inheritAttrs: !1,
10
10
  __name: "ScalarFileUploadInputCompact",
11
11
  props: {
@@ -13,25 +13,25 @@ const _ = { class: "flex items-center gap-1 whitespace-nowrap text-c-2" }, b = {
13
13
  extensions: {}
14
14
  },
15
15
  emits: ["click"],
16
- setup(y) {
17
- const { cx: p } = x();
18
- return (e, t) => (s(), o("button", m(
16
+ setup(e) {
17
+ const { cx: c } = b();
18
+ return (t, o) => (l(), n("button", d(
19
19
  { type: "button" },
20
- n(p)(
20
+ s(c)(
21
21
  "flex items-center justify-center gap-1 rounded flex-col px-4 py-3 hover:bg-b-2"
22
22
  ),
23
23
  {
24
- onClick: t[0] || (t[0] = (a) => e.$emit("click", a))
24
+ onClick: o[0] || (o[0] = (p) => t.$emit("click", p))
25
25
  }
26
26
  ), [
27
- l("div", _, [
28
- i(e.$slots, "default", {}, () => [
29
- d(n(f), { class: "size-3.5" }),
30
- l("span", null, " Upload " + r(e.multiple ? "files" : "file"), 1)
27
+ i("div", k, [
28
+ r(t.$slots, "default", {}, () => [
29
+ u(s(x), { class: "size-3.5" }),
30
+ i("span", null, " Upload " + a(e.multiple ? "files" : "file"), 1)
31
31
  ])
32
32
  ]),
33
- i(e.$slots, "sublabel", {}, () => [
34
- e.extensions ? (s(), o("div", b, r(e.extensions.join(", ")), 1)) : u("", !0)
33
+ r(t.$slots, "sublabel", {}, () => [
34
+ e.extensions ? (l(), n("div", y, a(e.extensions.join(", ")), 1)) : f("", !0)
35
35
  ])
36
36
  ], 16));
37
37
  }
@@ -1,6 +1,6 @@
1
- import { defineComponent as t, createElementBlock as a, openBlock as n, normalizeProps as l, guardReactiveProps as i, unref as e, createVNode as s } from "vue";
2
- import { useBindCx as c } from "@scalar/use-hooks/useBindCx";
3
- import d from "../ScalarLoading/ScalarLoading.vue.js";
1
+ import { defineComponent as t, createElementBlock as a, openBlock as n, normalizeProps as l, guardReactiveProps as c, unref as e, createVNode as i } from "vue";
2
+ import { useBindCx as d } from "@scalar/use-hooks/useBindCx";
3
+ import s from "../ScalarLoading/ScalarLoading.vue.js";
4
4
  const p = {}, z = /* @__PURE__ */ t({
5
5
  ...p,
6
6
  inheritAttrs: !1,
@@ -8,15 +8,15 @@ const p = {}, z = /* @__PURE__ */ t({
8
8
  props: {
9
9
  loader: {}
10
10
  },
11
- setup(u) {
12
- const { cx: r } = c();
13
- return (o, m) => (n(), a("div", l(i(
14
- e(r)(
11
+ setup(r) {
12
+ const { cx: o } = d();
13
+ return (u, m) => (n(), a("div", l(c(
14
+ e(o)(
15
15
  " size-full flex items-center justify-center absolute inset-0 z-1 rounded p-1 backdrop-blur text-c-2"
16
16
  )
17
17
  )), [
18
- s(e(d), {
19
- loader: o.loader,
18
+ i(e(s), {
19
+ loader: r.loader,
20
20
  size: "md"
21
21
  }, null, 8, ["loader"])
22
22
  ], 16));
@@ -1,5 +1,5 @@
1
- import { defineComponent as b, ref as d, computed as a, createElementBlock as z, openBlock as s, Fragment as S, createElementVNode as m, createBlock as $, createCommentVNode as k, normalizeClass as x, renderSlot as u, unref as i, withCtx as B, normalizeStyle as E } from "vue";
2
- import { getSideAxis as c } from "@floating-ui/utils";
1
+ import { defineComponent as b, ref as d, computed as a, createElementBlock as x, openBlock as s, Fragment as z, createElementVNode as m, createBlock as S, createCommentVNode as $, normalizeClass as k, renderSlot as c, unref as i, withCtx as B, normalizeStyle as E } from "vue";
2
+ import { getSideAxis as u } from "@floating-ui/utils";
3
3
  import { useFloating as R, autoUpdate as C, offset as F, flip as M, shift as H, size as T } from "@floating-ui/vue";
4
4
  import { useResizeWithTarget as N } from "./useResizeWithTarget.js";
5
5
  import W from "../ScalarTeleport/ScalarTeleport.vue.js";
@@ -14,55 +14,55 @@ const D = /* @__PURE__ */ b({
14
14
  middleware: { default: () => [] },
15
15
  teleport: { type: [Boolean, String] }
16
16
  },
17
- setup(t, { expose: g }) {
17
+ setup(e, { expose: g }) {
18
18
  const r = d(null), n = d(null), o = a(() => {
19
19
  if (typeof window < "u" && n.value) {
20
- if (typeof t.target == "string") {
21
- const l = document.getElementById(t.target);
20
+ if (typeof e.target == "string") {
21
+ const l = document.getElementById(e.target);
22
22
  if (l)
23
23
  return l;
24
- console.warn(`ScalarFloating: Target with id="${t.target}" not found`);
25
- } else if (t.target instanceof HTMLElement)
26
- return t.target;
27
- const e = n.value.children?.[0];
28
- return e instanceof HTMLElement ? e : n.value;
24
+ console.warn(`ScalarFloating: Target with id="${e.target}" not found`);
25
+ } else if (e.target instanceof HTMLElement)
26
+ return e.target;
27
+ const t = n.value.children?.[0];
28
+ return t instanceof HTMLElement ? t : n.value;
29
29
  }
30
30
  }), f = N(o, {
31
- enabled: a(() => t.resize)
31
+ enabled: a(() => e.resize)
32
32
  }), h = a(
33
- () => c(t.placement ?? "bottom") === "y" ? f.width.value : void 0
34
- ), p = a(
35
- () => c(t.placement ?? "bottom") === "x" ? f.height.value : void 0
36
- ), { floatingStyles: y, middlewareData: v } = R(o, r, {
37
- placement: a(() => t.placement ?? "bottom"),
33
+ () => u(e.placement ?? "bottom") === "y" ? f.width.value : void 0
34
+ ), y = a(
35
+ () => u(e.placement ?? "bottom") === "x" ? f.height.value : void 0
36
+ ), { floatingStyles: v, middlewareData: w } = R(o, r, {
37
+ placement: a(() => e.placement ?? "bottom"),
38
38
  whileElementsMounted: C,
39
39
  middleware: a(() => [
40
- F(t.offset),
40
+ F(e.offset),
41
41
  M(),
42
42
  H({ padding: 10 }),
43
43
  T({
44
- apply({ availableWidth: e, availableHeight: l, elements: w }) {
45
- Object.assign(w.floating.style, {
46
- maxWidth: `${Math.max(0, e) - 20}px`,
44
+ apply({ availableWidth: t, availableHeight: l, elements: p }) {
45
+ Object.assign(p.floating.style, {
46
+ maxWidth: `${Math.max(0, t) - 20}px`,
47
47
  maxHeight: `${Math.max(0, l) - 20}px`
48
48
  });
49
49
  }
50
50
  }),
51
- ...t.middleware
51
+ ...e.middleware
52
52
  ])
53
53
  });
54
54
  return g({
55
55
  /** The resolved target element */
56
56
  targetRef: o
57
- }), (e, l) => (s(), z(S, null, [
57
+ }), (t, l) => (s(), x(z, null, [
58
58
  m("div", {
59
59
  ref_key: "wrapperRef",
60
60
  ref: n,
61
- class: x({ contents: !!e.$slots.default })
61
+ class: k({ contents: !!t.$slots.default })
62
62
  }, [
63
- u(e.$slots, "default")
63
+ c(t.$slots, "default")
64
64
  ], 2),
65
- e.$slots.floating ? (s(), $(i(W), {
65
+ t.$slots.floating ? (s(), S(i(W), {
66
66
  key: 0,
67
67
  disabled: !e.teleport,
68
68
  to: typeof e.teleport == "string" ? e.teleport : void 0
@@ -72,17 +72,17 @@ const D = /* @__PURE__ */ b({
72
72
  ref_key: "floatingRef",
73
73
  ref: r,
74
74
  class: "relative z-context",
75
- style: E(i(y))
75
+ style: E(i(v))
76
76
  }, [
77
- u(e.$slots, "floating", {
78
- data: i(v),
79
- height: p.value,
77
+ c(t.$slots, "floating", {
78
+ data: i(w),
79
+ height: y.value,
80
80
  width: h.value
81
81
  })
82
82
  ], 4)
83
83
  ]),
84
84
  _: 3
85
- }, 8, ["disabled", "to"])) : k("", !0)
85
+ }, 8, ["disabled", "to"])) : $("", !0)
86
86
  ], 64));
87
87
  }
88
88
  });
@@ -1,7 +1,7 @@
1
- import { defineComponent as c, computed as l, createElementBlock as s, openBlock as a, mergeProps as d, unref as n, createBlock as m, renderSlot as u, resolveDynamicComponent as f } from "vue";
1
+ import { defineComponent as i, computed as l, createElementBlock as s, openBlock as e, mergeProps as d, unref as a, createBlock as m, renderSlot as u, resolveDynamicComponent as f } from "vue";
2
2
  import { ScalarIconWarningCircle as v, ScalarIconWarning as g } from "@scalar/icons";
3
- import { cva as p, useBindCx as b } from "@scalar/use-hooks/useBindCx";
4
- const C = /* @__PURE__ */ c({
3
+ import { cva as b, useBindCx as p } from "@scalar/use-hooks/useBindCx";
4
+ const C = /* @__PURE__ */ i({
5
5
  inheritAttrs: !1,
6
6
  __name: "ScalarFormError",
7
7
  props: {
@@ -9,7 +9,7 @@ const C = /* @__PURE__ */ c({
9
9
  icon: {}
10
10
  },
11
11
  setup(r) {
12
- const t = l(() => r.icon ? r.icon : r.variant === "error" ? v : g), o = p({
12
+ const n = l(() => r.icon ? r.icon : r.variant === "error" ? v : g), t = b({
13
13
  base: "flex items-baseline gap-1.5 rounded border p-2",
14
14
  variants: {
15
15
  variant: {
@@ -17,13 +17,13 @@ const C = /* @__PURE__ */ c({
17
17
  warning: "border-c-alert bg-b-alert text-c-alert"
18
18
  }
19
19
  }
20
- }), { cx: i } = b();
21
- return (e, x) => (a(), s("div", d({ role: "alert" }, n(i)(n(o)({ variant: e.variant }))), [
22
- (a(), m(f(t.value), {
20
+ }), { cx: o } = p();
21
+ return (c, x) => (e(), s("div", d({ role: "alert" }, a(o)(a(t)({ variant: r.variant }))), [
22
+ (e(), m(f(n.value), {
23
23
  class: "relative top-0.5 shrink-0",
24
24
  weight: "bold"
25
25
  })),
26
- u(e.$slots, "default")
26
+ u(c.$slots, "default")
27
27
  ], 16));
28
28
  }
29
29
  });
@@ -1,34 +1,34 @@
1
- import { defineComponent as n, createBlock as i, openBlock as t, resolveDynamicComponent as m, normalizeProps as p, guardReactiveProps as c, unref as l, withCtx as d, createElementBlock as a, createCommentVNode as r, renderSlot as o, normalizeClass as f } from "vue";
2
- import { useBindCx as u } from "@scalar/use-hooks/useBindCx";
3
- const _ = {
1
+ import { defineComponent as i, createBlock as m, openBlock as t, resolveDynamicComponent as c, normalizeProps as d, guardReactiveProps as f, unref as l, withCtx as p, createElementBlock as a, createCommentVNode as n, renderSlot as o, normalizeClass as u } from "vue";
2
+ import { useBindCx as _ } from "@scalar/use-hooks/useBindCx";
3
+ const b = {
4
4
  key: 0,
5
5
  class: "flex items-start justify-between gap-2 text-sm leading-none text-c-1 whitespace-nowrap font-medium"
6
- }, b = {}, x = /* @__PURE__ */ n({
7
- ...b,
6
+ }, w = {}, k = /* @__PURE__ */ i({
7
+ ...w,
8
8
  inheritAttrs: !1,
9
9
  __name: "ScalarFormField",
10
10
  props: {
11
11
  is: { default: "label" }
12
12
  },
13
- setup(w) {
14
- const { cx: s } = u();
15
- return (e, C) => (t(), i(m(e.is), p(c(l(s)("flex flex-col gap-1.5 rounded"))), {
16
- default: d(() => [
17
- e.$slots.label ? (t(), a("div", _, [
13
+ setup(r) {
14
+ const { cx: s } = _();
15
+ return (e, x) => (t(), m(c(r.is), d(f(l(s)("flex flex-col gap-1.5 rounded"))), {
16
+ default: p(() => [
17
+ e.$slots.label ? (t(), a("div", b, [
18
18
  o(e.$slots, "label")
19
- ])) : r("", !0),
19
+ ])) : n("", !0),
20
20
  o(e.$slots, "default"),
21
21
  e.$slots.below ? (t(), a("span", {
22
22
  key: 1,
23
- class: f(l(s)("-mt-1.5 text-sm"))
23
+ class: u(l(s)("-mt-1.5 text-sm"))
24
24
  }, [
25
25
  o(e.$slots, "below")
26
- ], 2)) : r("", !0)
26
+ ], 2)) : n("", !0)
27
27
  ]),
28
28
  _: 3
29
29
  }, 16));
30
30
  }
31
31
  });
32
32
  export {
33
- x as default
33
+ k as default
34
34
  };
@@ -1,15 +1,15 @@
1
- import { defineComponent as s, createBlock as u, openBlock as i, resolveDynamicComponent as p, mergeProps as a, unref as e, withCtx as d, renderSlot as f } from "vue";
2
- import { useBindCx as l, cva as c } from "@scalar/use-hooks/useBindCx";
3
- import { useFormGroupInput as m } from "./useFormGroups.js";
4
- const b = {}, y = /* @__PURE__ */ s({
5
- ...b,
1
+ import { defineComponent as s, createBlock as i, openBlock as a, resolveDynamicComponent as p, mergeProps as c, unref as e, withCtx as d, renderSlot as f } from "vue";
2
+ import { useBindCx as l, cva as m } from "@scalar/use-hooks/useBindCx";
3
+ import { useFormGroupInput as b } from "./useFormGroups.js";
4
+ const x = {}, y = /* @__PURE__ */ s({
5
+ ...x,
6
6
  inheritAttrs: !1,
7
7
  __name: "ScalarFormInput",
8
8
  props: {
9
9
  is: { default: "button" }
10
10
  },
11
- setup(_) {
12
- const { cx: o } = l(), r = m(), n = c({
11
+ setup(t) {
12
+ const { cx: o } = l(), r = b(), n = m({
13
13
  base: [
14
14
  // Layout
15
15
  "bg-b-1.5 flex items-center text-c-2 gap-0.75 px-3 py-2.5 ",
@@ -24,11 +24,11 @@ const b = {}, y = /* @__PURE__ */ s({
24
24
  button: { true: "cursor-pointer hover:bg-b-2" }
25
25
  }
26
26
  });
27
- return (t, g) => (i(), u(p(t.is), a({
27
+ return (u, g) => (a(), i(p(t.is), c({
28
28
  type: t.is === "button" ? "button" : void 0
29
29
  }, e(o)(e(n)({ button: t.is === "button", grouped: e(r) }))), {
30
30
  default: d(() => [
31
- f(t.$slots, "default")
31
+ f(u.$slots, "default")
32
32
  ]),
33
33
  _: 3
34
34
  }, 16, ["type"]));
@@ -1,18 +1,18 @@
1
- import { defineComponent as r, createBlock as t, openBlock as n, resolveDynamicComponent as s, normalizeProps as a, guardReactiveProps as i, unref as p, withCtx as l, renderSlot as u } from "vue";
2
- import { useBindCx as d } from "@scalar/use-hooks/useBindCx";
1
+ import { defineComponent as t, createBlock as n, openBlock as s, resolveDynamicComponent as a, normalizeProps as i, guardReactiveProps as l, unref as u, withCtx as d, renderSlot as p } from "vue";
2
+ import { useBindCx as c } from "@scalar/use-hooks/useBindCx";
3
3
  import { useFormGroup as f } from "./useFormGroups.js";
4
- const m = {}, h = /* @__PURE__ */ r({
4
+ const m = {}, h = /* @__PURE__ */ t({
5
5
  ...m,
6
6
  inheritAttrs: !1,
7
7
  __name: "ScalarFormInputGroup",
8
8
  props: {
9
9
  is: { default: "div" }
10
10
  },
11
- setup(c) {
12
- const { cx: o } = d();
13
- return f(), (e, _) => (n(), t(s(e.is), a(i(p(o)("flex flex-col border rounded divide-y"))), {
14
- default: l(() => [
15
- u(e.$slots, "default")
11
+ setup(e) {
12
+ const { cx: o } = c();
13
+ return f(), (r, _) => (s(), n(a(e.is), i(l(u(o)("flex flex-col border rounded divide-y"))), {
14
+ default: d(() => [
15
+ p(r.$slots, "default")
16
16
  ]),
17
17
  _: 3
18
18
  }, 16));
@@ -1,15 +1,15 @@
1
- import { defineComponent as r, createBlock as a, openBlock as s, resolveDynamicComponent as i, mergeProps as u, unref as t, withCtx as p, renderSlot as c } from "vue";
2
- import { cva as l, useBindCx as d } from "@scalar/use-hooks/useBindCx";
3
- const f = {}, g = /* @__PURE__ */ r({
4
- ...f,
1
+ import { defineComponent as a, createBlock as i, openBlock as s, resolveDynamicComponent as u, mergeProps as c, unref as t, withCtx as l, renderSlot as d } from "vue";
2
+ import { cva as f, useBindCx as p } from "@scalar/use-hooks/useBindCx";
3
+ const m = {}, x = /* @__PURE__ */ a({
4
+ ...m,
5
5
  inheritAttrs: !1,
6
6
  __name: "ScalarHeaderButton",
7
7
  props: {
8
8
  is: { default: "button" },
9
9
  active: { type: Boolean }
10
10
  },
11
- setup(m) {
12
- const o = l({
11
+ setup(e) {
12
+ const n = f({
13
13
  base: "group/button flex items-center rounded px-2.5 py-1.5 font-medium no-underline leading-3 ",
14
14
  variants: {
15
15
  active: {
@@ -17,17 +17,17 @@ const f = {}, g = /* @__PURE__ */ r({
17
17
  false: "bg-transparent hover:bg-b-3 cursor-pointer"
18
18
  }
19
19
  }
20
- }), { cx: n } = d();
21
- return (e, b) => (s(), a(i(e.is), u({
20
+ }), { cx: o } = p();
21
+ return (r, b) => (s(), i(u(e.is), c({
22
22
  type: e.is === "button" ? "button" : void 0
23
- }, t(n)(t(o)({ active: e.active }))), {
24
- default: p(() => [
25
- c(e.$slots, "default")
23
+ }, t(o)(t(n)({ active: e.active }))), {
24
+ default: l(() => [
25
+ d(r.$slots, "default")
26
26
  ]),
27
27
  _: 3
28
28
  }, 16, ["type"]));
29
29
  }
30
30
  });
31
31
  export {
32
- g as default
32
+ x as default
33
33
  };