@scalar/components 0.14.18 → 0.14.19

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 (53) hide show
  1. package/dist/components/ScalarCard/ScalarCard.stories.d.ts +10 -0
  2. package/dist/components/ScalarCard/ScalarCard.stories.d.ts.map +1 -0
  3. package/dist/components/ScalarCard/ScalarCard.test.d.ts +2 -0
  4. package/dist/components/ScalarCard/ScalarCard.test.d.ts.map +1 -0
  5. package/dist/components/ScalarCard/ScalarCard.vue.d.ts +30 -0
  6. package/dist/components/ScalarCard/ScalarCard.vue.d.ts.map +1 -0
  7. package/dist/components/ScalarCard/ScalarCard.vue.js +25 -0
  8. package/dist/components/ScalarCard/ScalarCard.vue2.js +4 -0
  9. package/dist/components/ScalarCard/ScalarCardFooter.vue.d.ts +19 -0
  10. package/dist/components/ScalarCard/ScalarCardFooter.vue.d.ts.map +1 -0
  11. package/dist/components/ScalarCard/ScalarCardFooter.vue.js +20 -0
  12. package/dist/components/ScalarCard/ScalarCardFooter.vue2.js +4 -0
  13. package/dist/components/ScalarCard/ScalarCardHeader.vue.d.ts +22 -0
  14. package/dist/components/ScalarCard/ScalarCardHeader.vue.d.ts.map +1 -0
  15. package/dist/components/ScalarCard/ScalarCardHeader.vue.js +34 -0
  16. package/dist/components/ScalarCard/ScalarCardHeader.vue2.js +4 -0
  17. package/dist/components/ScalarCard/ScalarCardSection.vue.d.ts +22 -0
  18. package/dist/components/ScalarCard/ScalarCardSection.vue.d.ts.map +1 -0
  19. package/dist/components/ScalarCard/ScalarCardSection.vue.js +16 -0
  20. package/dist/components/ScalarCard/ScalarCardSection.vue2.js +4 -0
  21. package/dist/components/ScalarCard/index.d.ts +5 -0
  22. package/dist/components/ScalarCard/index.d.ts.map +1 -0
  23. package/dist/components/ScalarCard/useCardHeading.d.ts +21 -0
  24. package/dist/components/ScalarCard/useCardHeading.d.ts.map +1 -0
  25. package/dist/components/ScalarCard/useCardHeading.js +16 -0
  26. package/dist/components/ScalarColorModeToggle/ScalarColorModeToggleIcon.vue2.js +4 -3
  27. package/dist/components/ScalarCombobox/ScalarCombobox.vue.js +11 -11
  28. package/dist/components/ScalarCombobox/ScalarComboboxMultiselect.vue.d.ts +1 -1
  29. package/dist/components/ScalarCombobox/ScalarComboboxMultiselect.vue.d.ts.map +1 -1
  30. package/dist/components/ScalarCombobox/ScalarComboboxMultiselect.vue.js +12 -12
  31. package/dist/components/ScalarCombobox/ScalarComboboxPopover.vue.js +6 -6
  32. package/dist/components/ScalarDropdown/ScalarDropdown.vue.js +15 -15
  33. package/dist/components/ScalarFileUpload/ScalarFileUploadFileList.vue.js +7 -5
  34. package/dist/components/ScalarFileUpload/ScalarFileUploadInput.vue.js +2 -1
  35. package/dist/components/ScalarFloating/ScalarFloating.vue.js +20 -20
  36. package/dist/components/ScalarListbox/ScalarListbox.vue.js +15 -15
  37. package/dist/components/ScalarMarkdown/ScalarMarkdown.vue.d.ts.map +1 -1
  38. package/dist/components/ScalarMenu/ScalarMenuProducts.vue.js +6 -3
  39. package/dist/components/ScalarMenu/ScalarMenuResources.vue.js +8 -5
  40. package/dist/components/ScalarMenu/ScalarMenuTeamPicker.vue.js +7 -5
  41. package/dist/components/ScalarPopover/ScalarPopover.vue.js +11 -11
  42. package/dist/components/ScalarSearchInput/ScalarSearchInput.vue.d.ts.map +1 -1
  43. package/dist/components/ScalarSearchInput/ScalarSearchInput.vue.js +8 -6
  44. package/dist/helpers/add-scalar-classes.d.ts +4 -2
  45. package/dist/helpers/add-scalar-classes.d.ts.map +1 -1
  46. package/dist/helpers/add-scalar-classes.js +13 -17
  47. package/dist/helpers/add-scalar-classes.test.d.ts +2 -0
  48. package/dist/helpers/add-scalar-classes.test.d.ts.map +1 -0
  49. package/dist/index.d.ts +1 -0
  50. package/dist/index.d.ts.map +1 -1
  51. package/dist/index.js +158 -150
  52. package/dist/style.css +1 -1
  53. package/package.json +8 -8
@@ -32,7 +32,8 @@ const v = { class: "flex items-center gap-1.5 whitespace-nowrap" }, B = { class:
32
32
  default: x(() => e[2] || (e[2] = [
33
33
  o(" Browse files ")
34
34
  ])),
35
- _: 1
35
+ _: 1,
36
+ __: [2]
36
37
  })
37
38
  ]),
38
39
  r(t.$slots, "sublabel", {}, () => [
@@ -1,14 +1,14 @@
1
- import { defineComponent as w, 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 B, renderSlot as u, unref as o, withCtx as R, normalizeStyle as b } from "vue";
2
- import { getSideAxis as g } from "@floating-ui/utils";
3
- import { useFloating as x, autoUpdate as E, offset as C, flip as F, shift as M, size as H } from "@floating-ui/vue";
4
- import { useResizeWithTarget as T } from "./useResizeWithTarget.js";
5
- import W from "../ScalarTeleport/ScalarTeleport.vue.js";
6
- const I = /* @__PURE__ */ w({
1
+ import { defineComponent as w, ref as d, computed as a, createElementBlock as z, openBlock as s, Fragment as S, createElementVNode as m, createBlock as $, createCommentVNode as b, normalizeClass as k, renderSlot as u, unref as o, withCtx as B, normalizeStyle as R } from "vue";
2
+ import { getSideAxis as c } from "@floating-ui/utils";
3
+ import { useFloating as x, autoUpdate as E, offset as F, flip as C, shift as M, size as H } from "@floating-ui/vue";
4
+ import { useResizeWithTarget as N } from "./useResizeWithTarget.js";
5
+ import T from "../ScalarTeleport/ScalarTeleport.vue.js";
6
+ const D = /* @__PURE__ */ w({
7
7
  inheritAttrs: !1,
8
8
  __name: "ScalarFloating",
9
9
  props: {
10
10
  placement: { default: "bottom" },
11
- offset: { default: 5 },
11
+ offset: { type: [Number, Object, Function], default: 5 },
12
12
  resize: { type: Boolean, default: !1 },
13
13
  target: {},
14
14
  middleware: { default: () => [] },
@@ -27,18 +27,18 @@ const I = /* @__PURE__ */ w({
27
27
  return t.target;
28
28
  return ((e = n.value.children) == null ? void 0 : e[0]) || n.value;
29
29
  }
30
- }), f = T(r, {
30
+ }), f = N(r, {
31
31
  enabled: a(() => t.resize)
32
- }), c = a(
33
- () => g(t.placement) === "y" ? f.width.value : void 0
32
+ }), g = a(
33
+ () => c(t.placement) === "y" ? f.width.value : void 0
34
34
  ), h = a(
35
- () => g(t.placement) === "x" ? f.height.value : void 0
35
+ () => c(t.placement) === "x" ? f.height.value : void 0
36
36
  ), { floatingStyles: p, middlewareData: y } = x(r, i, {
37
37
  placement: a(() => t.placement),
38
38
  whileElementsMounted: E,
39
39
  middleware: a(() => [
40
- C(t.offset),
41
- F(),
40
+ F(t.offset),
41
+ C(),
42
42
  M(),
43
43
  H({
44
44
  apply({ availableWidth: e, availableHeight: l, elements: v }) {
@@ -55,34 +55,34 @@ const I = /* @__PURE__ */ w({
55
55
  m("div", {
56
56
  ref_key: "wrapperRef",
57
57
  ref: n,
58
- class: B({ contents: !!e.$slots.default })
58
+ class: k({ contents: !!e.$slots.default })
59
59
  }, [
60
60
  u(e.$slots, "default")
61
61
  ], 2),
62
- e.$slots.floating ? (s(), $(o(W), {
62
+ e.$slots.floating ? (s(), $(o(T), {
63
63
  key: 0,
64
64
  disabled: !e.teleport,
65
65
  to: typeof e.teleport == "string" ? e.teleport : void 0
66
66
  }, {
67
- default: R(() => [
67
+ default: B(() => [
68
68
  m("div", {
69
69
  ref_key: "floatingRef",
70
70
  ref: i,
71
71
  class: "relative z-context",
72
- style: b(o(p))
72
+ style: R(o(p))
73
73
  }, [
74
74
  u(e.$slots, "floating", {
75
75
  data: o(y),
76
76
  height: h.value,
77
- width: c.value
77
+ width: g.value
78
78
  })
79
79
  ], 4)
80
80
  ]),
81
81
  _: 3
82
- }, 8, ["disabled", "to"])) : k("", !0)
82
+ }, 8, ["disabled", "to"])) : b("", !0)
83
83
  ], 64));
84
84
  }
85
85
  });
86
86
  export {
87
- I as default
87
+ D as default
88
88
  };
@@ -1,10 +1,10 @@
1
- import { defineComponent as c, createBlock as i, openBlock as o, unref as t, withCtx as l, createCommentVNode as n, createVNode as r, createTextVNode as y, toDisplayString as b, mergeProps as p, renderSlot as V, createElementBlock as d, createElementVNode as B, Fragment as _, renderList as g, normalizeStyle as k } from "vue";
1
+ import { defineComponent as c, createBlock as i, openBlock as o, unref as t, withCtx as l, createCommentVNode as s, createVNode as r, createTextVNode as b, toDisplayString as y, mergeProps as p, renderSlot as V, createElementBlock as d, createElementVNode as B, Fragment as _, renderList as g, normalizeStyle as k } from "vue";
2
2
  import { Listbox as x, ListboxLabel as L, ListboxButton as h, ListboxOptions as $ } from "@headlessui/vue";
3
- import { useBindCx as S } from "@scalar/use-hooks/useBindCx";
4
- import C from "./ScalarListboxItem.vue.js";
5
- import N from "../ScalarFloating/ScalarFloating.vue.js";
3
+ import { useBindCx as N } from "@scalar/use-hooks/useBindCx";
4
+ import S from "./ScalarListboxItem.vue.js";
5
+ import C from "../ScalarFloating/ScalarFloating.vue.js";
6
6
  import v from "../ScalarFloating/ScalarFloatingBackdrop.vue.js";
7
- const w = { class: "custom-scroll min-h-0 flex-1" }, T = /* @__PURE__ */ c({
7
+ const w = { class: "custom-scroll min-h-0 flex-1" }, P = /* @__PURE__ */ c({
8
8
  inheritAttrs: !1,
9
9
  __name: "ScalarListbox",
10
10
  props: {
@@ -14,7 +14,7 @@ const w = { class: "custom-scroll min-h-0 flex-1" }, T = /* @__PURE__ */ c({
14
14
  multiple: { type: Boolean },
15
15
  modelValue: {},
16
16
  placement: {},
17
- offset: {},
17
+ offset: { type: [Number, Object, Function] },
18
18
  resize: { type: Boolean },
19
19
  target: {},
20
20
  middleware: {},
@@ -22,7 +22,7 @@ const w = { class: "custom-scroll min-h-0 flex-1" }, T = /* @__PURE__ */ c({
22
22
  },
23
23
  emits: ["update:modelValue"],
24
24
  setup(z) {
25
- const { cx: u } = S();
25
+ const { cx: u } = N();
26
26
  return (e, m) => (o(), i(t(x), {
27
27
  modelValue: e.modelValue,
28
28
  multiple: e.multiple,
@@ -34,11 +34,11 @@ const w = { class: "custom-scroll min-h-0 flex-1" }, T = /* @__PURE__ */ c({
34
34
  class: "sr-only"
35
35
  }, {
36
36
  default: l(() => [
37
- y(b(e.label), 1)
37
+ b(y(e.label), 1)
38
38
  ]),
39
39
  _: 1
40
- })) : n("", !0),
41
- r(t(N), p(e.$props, {
40
+ })) : s("", !0),
41
+ r(t(C), p(e.$props, {
42
42
  placement: e.placement ?? "bottom-start"
43
43
  }), {
44
44
  floating: l(({ width: f }) => [
@@ -49,9 +49,9 @@ const w = { class: "custom-scroll min-h-0 flex-1" }, T = /* @__PURE__ */ c({
49
49
  B("div", w, [
50
50
  r(t($), { class: "flex flex-col gap-0.75 p-0.75 -outline-offset-1" }, {
51
51
  default: l(() => [
52
- (o(!0), d(_, null, g(e.options, (s) => (o(), i(C, {
53
- key: s.id,
54
- option: s,
52
+ (o(!0), d(_, null, g(e.options, (n) => (o(), i(S, {
53
+ key: n.id,
54
+ option: n,
55
55
  style: k(e.multiple ? "checkbox" : "radio")
56
56
  }, null, 8, ["option", "style"]))), 128))
57
57
  ]),
@@ -59,7 +59,7 @@ const w = { class: "custom-scroll min-h-0 flex-1" }, T = /* @__PURE__ */ c({
59
59
  })
60
60
  ]),
61
61
  r(t(v))
62
- ], 16)) : n("", !0)
62
+ ], 16)) : s("", !0)
63
63
  ]),
64
64
  default: l(() => [
65
65
  r(t(h), {
@@ -80,5 +80,5 @@ const w = { class: "custom-scroll min-h-0 flex-1" }, T = /* @__PURE__ */ c({
80
80
  }
81
81
  });
82
82
  export {
83
- T as default
83
+ P as default
84
84
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarMarkdown.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarMarkdown/ScalarMarkdown.vue"],"names":[],"mappings":"AAsFA,KAAK,WAAW,GAAG;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC9D,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACxB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAC;;gBAPa,OAAO;iBAKN,OAAO;;AAsHzB,wBAQG"}
1
+ {"version":3,"file":"ScalarMarkdown.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarMarkdown/ScalarMarkdown.vue"],"names":[],"mappings":"AAirBA,KAAK,WAAW,GAAG;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC9D,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACxB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAC;;gBAPa,OAAO;iBAKN,OAAO;;AAsHzB,wBAQG"}
@@ -24,7 +24,8 @@ const w = /* @__PURE__ */ p({
24
24
  default: n(() => e[3] || (e[3] = [
25
25
  l(" Dashboard ")
26
26
  ])),
27
- _: 1
27
+ _: 1,
28
+ __: [3]
28
29
  }, 8, ["href", "icon", "selected"]),
29
30
  t(d, {
30
31
  href: ((a = o.hrefs) == null ? void 0 : a.docs) ?? "https://docs.scalar.com",
@@ -35,7 +36,8 @@ const w = /* @__PURE__ */ p({
35
36
  default: n(() => e[4] || (e[4] = [
36
37
  l(" Docs ")
37
38
  ])),
38
- _: 1
39
+ _: 1,
40
+ __: [4]
39
41
  }, 8, ["href", "icon", "selected"]),
40
42
  t(d, {
41
43
  href: ((f = o.hrefs) == null ? void 0 : f.client) ?? "https://client.scalar.com",
@@ -46,7 +48,8 @@ const w = /* @__PURE__ */ p({
46
48
  default: n(() => e[5] || (e[5] = [
47
49
  l(" Client ")
48
50
  ])),
49
- _: 1
51
+ _: 1,
52
+ __: [5]
50
53
  }, 8, ["href", "icon", "selected"])
51
54
  ], 16);
52
55
  };
@@ -4,8 +4,8 @@ import a from "./ScalarMenuLink.vue.js";
4
4
  import f from "./ScalarMenuSection.vue.js";
5
5
  const y = /* @__PURE__ */ i({
6
6
  __name: "ScalarMenuResources",
7
- setup(u) {
8
- return (d, o) => (c(), l(f, null, {
7
+ setup(_) {
8
+ return (u, o) => (c(), l(f, null, {
9
9
  title: t(() => o[0] || (o[0] = [
10
10
  e("Resources")
11
11
  ])),
@@ -18,7 +18,8 @@ const y = /* @__PURE__ */ i({
18
18
  default: t(() => o[1] || (o[1] = [
19
19
  e(" Sales & Support ")
20
20
  ])),
21
- _: 1
21
+ _: 1,
22
+ __: [1]
22
23
  }, 8, ["icon"]),
23
24
  r(a, {
24
25
  href: "https://scalar.com/terms-and-conditions",
@@ -28,7 +29,8 @@ const y = /* @__PURE__ */ i({
28
29
  default: t(() => o[2] || (o[2] = [
29
30
  e(" Terms & Conditions ")
30
31
  ])),
31
- _: 1
32
+ _: 1,
33
+ __: [2]
32
34
  }, 8, ["icon"]),
33
35
  r(a, {
34
36
  href: "https://scalar.com/privacy-policy",
@@ -38,7 +40,8 @@ const y = /* @__PURE__ */ i({
38
40
  default: t(() => o[3] || (o[3] = [
39
41
  e(" Privacy Policy ")
40
42
  ])),
41
- _: 1
43
+ _: 1,
44
+ __: [3]
42
45
  }, 8, ["icon"])
43
46
  ]),
44
47
  _: 1
@@ -1,4 +1,4 @@
1
- import { defineComponent as g, computed as _, createBlock as u, openBlock as n, unref as e, withCtx as r, createVNode as a, mergeProps as b, createElementVNode as S, createElementBlock as w, Fragment as x, 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 S, createElementBlock as w, Fragment as x, renderList as v, createTextVNode as C } from "vue";
2
2
  import { ScalarIconUserSwitch as k, ScalarIconCaretRight as V, ScalarIconPlus as $ } from "@scalar/icons";
3
3
  import { DropdownMenu as s } from "radix-vue/namespaced";
4
4
  import I from "./ScalarMenuTeamProfile.vue.js";
@@ -6,7 +6,7 @@ import B from "./ScalarMenuLink.vue.js";
6
6
  import P from "../ScalarDropdown/ScalarDropdownMenu.vue.js";
7
7
  import c from "../ScalarDropdown/ScalarDropdownButton.vue.js";
8
8
  import z from "../ScalarListbox/ScalarListboxCheckbox.vue.js";
9
- const y = /* @__PURE__ */ g({
9
+ const y = /* @__PURE__ */ _({
10
10
  inheritAttrs: !1,
11
11
  __name: "ScalarMenuTeamPicker",
12
12
  props: {
@@ -15,7 +15,7 @@ const y = /* @__PURE__ */ g({
15
15
  },
16
16
  emits: ["update:team", "add"],
17
17
  setup(p, { emit: f }) {
18
- const i = p, d = f, m = _({
18
+ const i = p, d = f, m = g({
19
19
  get: () => {
20
20
  var o;
21
21
  return (o = i.team) == null ? void 0 : o.id;
@@ -38,7 +38,8 @@ const y = /* @__PURE__ */ g({
38
38
  weight: "bold"
39
39
  })
40
40
  ]),
41
- _: 1
41
+ _: 1,
42
+ __: [2]
42
43
  }, 16, ["is", "icon"]),
43
44
  a(e(s).Portal, null, {
44
45
  default: r(() => [
@@ -87,7 +88,8 @@ const y = /* @__PURE__ */ g({
87
88
  }),
88
89
  t[3] || (t[3] = C(" Create new team "))
89
90
  ]),
90
- _: 1
91
+ _: 1,
92
+ __: [3]
91
93
  }, 8, ["as"])
92
94
  ]),
93
95
  _: 1
@@ -1,25 +1,25 @@
1
1
  import { defineComponent as m, createBlock as i, openBlock as c, unref as e, withCtx as t, createVNode as r, normalizeProps as u, guardReactiveProps as d, renderSlot as s, mergeProps as _ } from "vue";
2
2
  import { Popover as P, PopoverButton as v, PopoverPanel as B } from "@headlessui/vue";
3
- import { useBindCx as $ } from "@scalar/use-hooks/useBindCx";
4
- import g from "../ScalarFloating/ScalarFloating.vue.js";
5
- import y from "../ScalarFloating/ScalarFloatingBackdrop.vue.js";
6
- const b = /* @__PURE__ */ m({
3
+ import { useBindCx as y } from "@scalar/use-hooks/useBindCx";
4
+ import $ from "../ScalarFloating/ScalarFloating.vue.js";
5
+ import g from "../ScalarFloating/ScalarFloatingBackdrop.vue.js";
6
+ const z = /* @__PURE__ */ m({
7
7
  inheritAttrs: !1,
8
8
  __name: "ScalarPopover",
9
9
  props: {
10
10
  focus: { type: Boolean },
11
11
  placement: {},
12
- offset: {},
12
+ offset: { type: [Number, Object, Function] },
13
13
  resize: { type: Boolean },
14
14
  target: {},
15
15
  middleware: {},
16
16
  teleport: { type: [Boolean, String] }
17
17
  },
18
- setup(h) {
19
- const { cx: l } = $();
20
- return (o, k) => (c(), i(e(P), { as: "template" }, {
18
+ setup(b) {
19
+ const { cx: l } = y();
20
+ return (o, h) => (c(), i(e(P), { as: "template" }, {
21
21
  default: t(({ open: a }) => [
22
- r(e(g), u(d(o.$props)), {
22
+ r(e($), u(d(o.$props)), {
23
23
  floating: t(({ width: p, height: f }) => [
24
24
  r(e(B), _({
25
25
  focus: o.focus,
@@ -31,7 +31,7 @@ const b = /* @__PURE__ */ m({
31
31
  open: a
32
32
  }),
33
33
  s(o.$slots, "backdrop", { open: a }, () => [
34
- r(e(y))
34
+ r(e(g))
35
35
  ])
36
36
  ]),
37
37
  _: 2
@@ -53,5 +53,5 @@ const b = /* @__PURE__ */ m({
53
53
  }
54
54
  });
55
55
  export {
56
- b as default
56
+ z as default
57
57
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarSearchInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSearchInput/ScalarSearchInput.vue"],"names":[],"mappings":"AAkFA,OAAO,EAAE,KAAK,YAAY,EAAiB,MAAM,kBAAkB,CAAA;AAInE;;;;;;;;;;;GAWG;;iBAgCU,MAAM;;cA5BP,YAAY;YACd,MAAM;;;;iBA2BH,MAAM;;cA5BP,YAAY;YACd,MAAM;;;;AAJhB,wBA2JC"}
1
+ {"version":3,"file":"ScalarSearchInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSearchInput/ScalarSearchInput.vue"],"names":[],"mappings":"AAoFA,OAAO,EAAE,KAAK,YAAY,EAAiB,MAAM,kBAAkB,CAAA;AAInE;;;;;;;;;;;GAWG;;iBAgCU,MAAM;;cA5BP,YAAY;YACd,MAAM;;;;iBA2BH,MAAM;;cA5BP,YAAY;YACd,MAAM;;;;AAJhB,wBA6JC"}
@@ -1,13 +1,13 @@
1
- import { defineComponent as f, mergeModels as p, useModel as m, ref as g, createElementBlock as h, openBlock as t, normalizeProps as v, guardReactiveProps as b, unref as e, createVNode as k, withDirectives as _, createBlock as n, createCommentVNode as C, createElementVNode as S, mergeProps as V, vModelText as y, withModifiers as M } from "vue";
1
+ import { defineComponent as p, mergeModels as f, useModel as m, ref as g, createElementBlock as h, openBlock as t, normalizeProps as v, guardReactiveProps as b, unref as e, createVNode as k, withDirectives as _, createBlock as n, createCommentVNode as C, createElementVNode as S, mergeProps as y, vModelText as V, withModifiers as M } from "vue";
2
2
  import { ScalarIconMagnifyingGlass as x } from "@scalar/icons";
3
3
  import { useBindCx as z } from "@scalar/use-hooks/useBindCx";
4
4
  import B from "../ScalarLoading/ScalarLoading.vue.js";
5
5
  import E from "../ScalarIconButton/ScalarIconButton.vue.js";
6
- const N = ["aria-label"], P = {}, q = /* @__PURE__ */ f({
6
+ const N = ["aria-label"], P = {}, q = /* @__PURE__ */ p({
7
7
  ...P,
8
8
  inheritAttrs: !1,
9
9
  __name: "ScalarSearchInput",
10
- props: /* @__PURE__ */ p({
10
+ props: /* @__PURE__ */ f({
11
11
  loading: {},
12
12
  label: {}
13
13
  }, {
@@ -22,10 +22,12 @@ const N = ["aria-label"], P = {}, q = /* @__PURE__ */ f({
22
22
  }
23
23
  const { classCx: c, otherAttrs: d } = z();
24
24
  return (l, r) => (t(), h("label", v(b(
25
- e(c)("flex items-center text-lg font-medium h-10 p-3 pr-1 h-14 gap-2")
25
+ e(c)(
26
+ "flex items-center text-lg font-medium h-10 pl-3 pr-1 py-2 gap-2.25"
27
+ )
26
28
  )), [
27
29
  k(e(x), { class: "text-sidebar-c-search size-4" }),
28
- _(S("input", V({
30
+ _(S("input", y({
29
31
  ref_key: "inputRef",
30
32
  ref: o,
31
33
  "aria-label": l.label ?? "Enter search query",
@@ -39,7 +41,7 @@ const N = ["aria-label"], P = {}, q = /* @__PURE__ */ f({
39
41
  }, e(d), {
40
42
  "onUpdate:modelValue": r[0] || (r[0] = (u) => a.value = u)
41
43
  }), null, 16, N), [
42
- [y, a.value]
44
+ [V, a.value]
43
45
  ]),
44
46
  l.loading && l.loading.isLoading ? (t(), n(e(B), {
45
47
  key: 0,
@@ -1,5 +1,7 @@
1
1
  /**
2
- * Helper method for adding the scalar classes to HeadlessUI portal root
2
+ * Makes sure the scalar classes are added to the HeadlessUI portal root
3
+ *
4
+ * Returns the mutation observer instance
3
5
  */
4
- export declare const addScalarClassesToHeadless: () => void;
6
+ export declare const addScalarClassesToHeadless: () => MutationObserver;
5
7
  //# sourceMappingURL=add-scalar-classes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"add-scalar-classes.d.ts","sourceRoot":"","sources":["../../src/helpers/add-scalar-classes.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,0BAA0B,YAwBtC,CAAA"}
1
+ {"version":3,"file":"add-scalar-classes.d.ts","sourceRoot":"","sources":["../../src/helpers/add-scalar-classes.ts"],"names":[],"mappings":"AAqBA;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,wBAmBtC,CAAA"}
@@ -1,20 +1,16 @@
1
- const l = () => {
2
- const e = document.getElementById("headlessui-portal-root");
3
- if (e)
4
- e.classList.add("scalar-app"), e.classList.add("scalar-client");
5
- else {
6
- const a = new MutationObserver((t) => {
7
- const d = t.find(
8
- (s) => Array.from(s.addedNodes).find((o) => o.id === "headlessui-portal-root")
9
- );
10
- if (d) {
11
- const s = d.addedNodes[0];
12
- s.classList.add("scalar-app"), s.classList.add("scalar-client"), a.disconnect();
13
- }
14
- });
15
- a.observe(document.body, { childList: !0 });
16
- }
1
+ const e = "scalar-app", a = "headlessui-portal-root", c = (s) => s !== null && s instanceof HTMLElement, o = (s) => {
2
+ !s || s.classList.contains(e) || s.classList.add(e);
3
+ }, d = () => {
4
+ o(document.getElementById(a));
5
+ const s = new MutationObserver(
6
+ (r) => r.forEach(
7
+ ({ addedNodes: n }) => n.forEach((t) => {
8
+ c(t) && t.id === a && o(t);
9
+ })
10
+ )
11
+ );
12
+ return s.observe(document.body, { childList: !0 }), s;
17
13
  };
18
14
  export {
19
- l as addScalarClassesToHeadless
15
+ d as addScalarClassesToHeadless
20
16
  };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=add-scalar-classes.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-scalar-classes.test.d.ts","sourceRoot":"","sources":["../../src/helpers/add-scalar-classes.test.ts"],"names":[],"mappings":""}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import './style.css';
2
2
  export * from './components/ScalarButton';
3
+ export * from './components/ScalarCard';
3
4
  export * from './components/ScalarCodeBlock';
4
5
  export * from './components/ScalarColorModeToggle';
5
6
  export * from './components/ScalarCombobox';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AAEpB,cAAc,2BAA2B,CAAA;AACzC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,oCAAoC,CAAA;AAClD,cAAc,6BAA6B,CAAA;AAC3C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,kCAAkC,CAAA;AAChD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,yBAAyB,CAAA;AACvC,cAAc,2BAA2B,CAAA;AACzC,cAAc,yBAAyB,CAAA;AACvC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,yBAAyB,CAAA;AACvC,cAAc,0BAA0B,CAAA;AACxC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,kCAAkC,CAAA;AAChD,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,2BAA2B,CAAA;AACzC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,gCAAgC,CAAA;AAE9C,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,6BAA6B,CAAA;AAC7E,cAAc,WAAW,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AAEpB,cAAc,2BAA2B,CAAA;AACzC,cAAc,yBAAyB,CAAA;AACvC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,oCAAoC,CAAA;AAClD,cAAc,6BAA6B,CAAA;AAC3C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,kCAAkC,CAAA;AAChD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,yBAAyB,CAAA;AACvC,cAAc,2BAA2B,CAAA;AACzC,cAAc,yBAAyB,CAAA;AACvC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,yBAAyB,CAAA;AACvC,cAAc,0BAA0B,CAAA;AACxC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,kCAAkC,CAAA;AAChD,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,2BAA2B,CAAA;AACzC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,gCAAgC,CAAA;AAE9C,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,6BAA6B,CAAA;AAC7E,cAAc,WAAW,CAAA"}