@scalar/components 0.14.13 → 0.14.16

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 (69) hide show
  1. package/dist/components/ScalarButton/ScalarButton.stories.d.ts +12 -12
  2. package/dist/components/ScalarButton/ScalarButton.vue.d.ts +1 -1
  3. package/dist/components/ScalarButton/variants.d.ts +7 -2
  4. package/dist/components/ScalarButton/variants.d.ts.map +1 -1
  5. package/dist/components/ScalarCodeBlock/ScalarCodeBlock.vue.d.ts.map +1 -1
  6. package/dist/components/ScalarCombobox/ScalarComboboxOptions.vue.d.ts +3 -1
  7. package/dist/components/ScalarCombobox/ScalarComboboxOptions.vue.d.ts.map +1 -1
  8. package/dist/components/ScalarCombobox/ScalarComboboxOptions.vue.js +58 -52
  9. package/dist/components/ScalarCombobox/ScalarComboboxPopover.vue.d.ts.map +1 -1
  10. package/dist/components/ScalarCombobox/ScalarComboboxPopover.vue.js +0 -1
  11. package/dist/components/ScalarContextMenu/ScalarContextMenu.stories.d.ts +3 -3
  12. package/dist/components/ScalarDropdown/ScalarDropdown.stories.d.ts +3 -3
  13. package/dist/components/ScalarIcon/ScalarIcon.stories.d.ts +1 -1
  14. package/dist/components/ScalarIcon/ScalarIconLegacyAdapter.vue.d.ts +3 -4
  15. package/dist/components/ScalarIcon/ScalarIconLegacyAdapter.vue.d.ts.map +1 -1
  16. package/dist/components/ScalarIcon/icons/index.d.ts +1 -1
  17. package/dist/components/ScalarIcon/icons/index.d.ts.map +1 -1
  18. package/dist/components/ScalarIcon/icons/programming-language-rust.svg.js +19 -0
  19. package/dist/components/ScalarIcon/utils/index.d.ts +2 -0
  20. package/dist/components/ScalarIcon/utils/index.d.ts.map +1 -1
  21. package/dist/components/ScalarIcon/utils/index.js +68 -66
  22. package/dist/components/ScalarIconButton/ScalarIconButton.stories.d.ts +9 -21
  23. package/dist/components/ScalarIconButton/ScalarIconButton.stories.d.ts.map +1 -1
  24. package/dist/components/ScalarIconButton/ScalarIconButton.vue.d.ts +17 -77
  25. package/dist/components/ScalarIconButton/ScalarIconButton.vue.d.ts.map +1 -1
  26. package/dist/components/ScalarIconButton/ScalarIconButton.vue.js +30 -31
  27. package/dist/components/ScalarIconButton/types.d.ts +50 -0
  28. package/dist/components/ScalarIconButton/types.d.ts.map +1 -0
  29. package/dist/components/ScalarIconButton/variants.d.ts +62 -0
  30. package/dist/components/ScalarIconButton/variants.d.ts.map +1 -0
  31. package/dist/components/ScalarIconButton/variants.js +32 -0
  32. package/dist/components/ScalarLoading/ScalarLoading.stories.d.ts +3 -3
  33. package/dist/components/ScalarMenu/ScalarMenuLink.vue.d.ts +2 -1
  34. package/dist/components/ScalarMenu/ScalarMenuLink.vue.d.ts.map +1 -1
  35. package/dist/components/ScalarMenu/ScalarMenuProduct.vue.d.ts +2 -1
  36. package/dist/components/ScalarMenu/ScalarMenuProduct.vue.d.ts.map +1 -1
  37. package/dist/components/ScalarPopover/ScalarPopover.stories.d.ts +3 -3
  38. package/dist/components/ScalarSearchInput/ScalarSearchInput.vue.d.ts.map +1 -1
  39. package/dist/components/ScalarSearchInput/ScalarSearchInput.vue.js +27 -27
  40. package/dist/components/ScalarSearchResults/ScalarSearchResultItem.vue.d.ts +2 -2
  41. package/dist/components/ScalarSearchResults/ScalarSearchResultItem.vue.d.ts.map +1 -1
  42. package/dist/components/ScalarSearchResults/ScalarSearchResultItem.vue.js +13 -14
  43. package/dist/components/ScalarSearchResults/ScalarSearchResultList.vue.d.ts.map +1 -1
  44. package/dist/components/ScalarSearchResults/ScalarSearchResultList.vue.js +11 -12
  45. package/dist/components/ScalarSearchResults/ScalarSearchResults.stories.d.ts +3 -3
  46. package/dist/components/ScalarSidebar/ScalarSidebarGroupToggle.vue.d.ts +3 -2
  47. package/dist/components/ScalarSidebar/ScalarSidebarGroupToggle.vue.d.ts.map +1 -1
  48. package/dist/components/ScalarSidebar/ScalarSidebarSearchButton.vue.d.ts.map +1 -1
  49. package/dist/components/ScalarSidebar/types.d.ts +2 -1
  50. package/dist/components/ScalarSidebar/types.d.ts.map +1 -1
  51. package/dist/components/ScalarTooltip/ScalarTooltip.stories.d.ts +15 -15
  52. package/dist/components/ScalarTooltip/ScalarTooltip.vue.d.ts +21 -17
  53. package/dist/components/ScalarTooltip/ScalarTooltip.vue.d.ts.map +1 -1
  54. package/dist/components/ScalarTooltip/ScalarTooltip.vue.js +13 -11
  55. package/dist/components/ScalarTooltip/constants.d.ts +2 -0
  56. package/dist/components/ScalarTooltip/constants.d.ts.map +1 -1
  57. package/dist/components/ScalarTooltip/constants.js +5 -4
  58. package/dist/components/ScalarTooltip/index.d.ts +2 -0
  59. package/dist/components/ScalarTooltip/index.d.ts.map +1 -1
  60. package/dist/components/ScalarTooltip/types.d.ts +3 -2
  61. package/dist/components/ScalarTooltip/types.d.ts.map +1 -1
  62. package/dist/components/ScalarTooltip/useTooltip.d.ts.map +1 -1
  63. package/dist/components/ScalarTooltip/useTooltip.js +25 -25
  64. package/dist/components/ScalarTooltip/useTooltip.test.d.ts.map +1 -0
  65. package/dist/index.js +23 -21
  66. package/dist/style.css +1 -1
  67. package/package.json +11 -11
  68. package/dist/components/ScalarTooltip/__tests__/useTooltip.test.d.ts.map +0 -1
  69. /package/dist/components/ScalarTooltip/{__tests__/useTooltip.test.d.ts → useTooltip.test.d.ts} +0 -0
@@ -1,9 +1,10 @@
1
+ import type { ScalarIconComponent } from '@scalar/icons/types';
1
2
  import type { Component } from 'vue';
2
3
  import type { Icon } from '../../index.js';
3
4
  type __VLS_Props = {
4
5
  is?: string | Component;
5
6
  selected?: boolean;
6
- icon: Icon | Component;
7
+ icon: Icon | ScalarIconComponent;
7
8
  };
8
9
  declare function __VLS_template(): {
9
10
  attrs: Partial<{}>;
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarMenuProduct.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarMenu/ScalarMenuProduct.vue"],"names":[],"mappings":"AAyCA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAEpC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAKlC,KAAK,WAAW,GAAG;IACjB,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,EAAE,IAAI,GAAG,SAAS,CAAA;CACvB,CAAC;AAsBF,iBAAS,cAAc;WAyCT,OAAO,IAA6B;;yBARrB,GAAG;;;;EAa/B;AAWD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"ScalarMenuProduct.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarMenu/ScalarMenuProduct.vue"],"names":[],"mappings":"AAwCA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAG9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAEpC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAKlC,KAAK,WAAW,GAAG;IACjB,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,EAAE,IAAI,GAAG,mBAAmB,CAAA;CACjC,CAAC;AAsBF,iBAAS,cAAc;WAyCT,OAAO,IAA6B;;yBARrB,GAAG;;;;EAa/B;AAWD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -87,7 +87,7 @@ declare const meta: {
87
87
  type?: "button" | "submit" | "reset";
88
88
  }> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
89
89
  size: "sm" | "md";
90
- variant: string;
90
+ variant: "solid" | "outlined" | "ghost" | "danger";
91
91
  fullWidth: boolean;
92
92
  type: "button" | "submit" | "reset";
93
93
  }, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
@@ -106,7 +106,7 @@ declare const meta: {
106
106
  type?: "button" | "submit" | "reset";
107
107
  }> & Readonly<{}>, {}, {}, {}, {}, {
108
108
  size: "sm" | "md";
109
- variant: string;
109
+ variant: "solid" | "outlined" | "ghost" | "danger";
110
110
  fullWidth: boolean;
111
111
  type: "button" | "submit" | "reset";
112
112
  }>;
@@ -122,7 +122,7 @@ declare const meta: {
122
122
  type?: "button" | "submit" | "reset";
123
123
  }> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
124
124
  size: "sm" | "md";
125
- variant: string;
125
+ variant: "solid" | "outlined" | "ghost" | "danger";
126
126
  fullWidth: boolean;
127
127
  type: "button" | "submit" | "reset";
128
128
  }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarSearchInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSearchInput/ScalarSearchInput.vue"],"names":[],"mappings":"AAiFA,OAAO,EAAE,KAAK,YAAY,EAAiB,MAAM,kBAAkB,CAAA;AAInE;;;;;;;;;;;GAWG;;iBAgCU,MAAM;;cA5BP,YAAY;YACd,MAAM;;;;iBA2BH,MAAM;;cA5BP,YAAY;YACd,MAAM;;;;AAJhB,wBAoJC"}
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,12 +1,13 @@
1
- import { defineComponent as f, mergeModels as m, useModel as p, ref as h, createElementBlock as b, openBlock as t, normalizeProps as g, guardReactiveProps as v, unref as l, withDirectives as k, createBlock as n, createCommentVNode as _, createElementVNode as C, mergeProps as S, vModelText as V, withModifiers as y } from "vue";
2
- import { useBindCx as M } from "@scalar/use-hooks/useBindCx";
3
- import x from "../ScalarLoading/ScalarLoading.vue.js";
4
- import z from "../ScalarIconButton/ScalarIconButton.vue.js";
5
- const B = ["aria-label"], E = {}, L = /* @__PURE__ */ f({
6
- ...E,
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";
2
+ import { ScalarIconMagnifyingGlass as x } from "@scalar/icons";
3
+ import { useBindCx as z } from "@scalar/use-hooks/useBindCx";
4
+ import B from "../ScalarLoading/ScalarLoading.vue.js";
5
+ import E from "../ScalarIconButton/ScalarIconButton.vue.js";
6
+ const N = ["aria-label"], P = {}, q = /* @__PURE__ */ f({
7
+ ...P,
7
8
  inheritAttrs: !1,
8
9
  __name: "ScalarSearchInput",
9
- props: /* @__PURE__ */ m({
10
+ props: /* @__PURE__ */ p({
10
11
  loading: {},
11
12
  label: {}
12
13
  }, {
@@ -15,20 +16,19 @@ const B = ["aria-label"], E = {}, L = /* @__PURE__ */ f({
15
16
  }),
16
17
  emits: ["update:modelValue"],
17
18
  setup(s) {
18
- const e = p(s, "modelValue"), a = h(null);
19
+ const a = m(s, "modelValue"), o = g(null);
19
20
  function i() {
20
- e.value = "", a.value && a.value.focus();
21
+ a.value = "", o.value && o.value.focus();
21
22
  }
22
- const { classCx: u, otherAttrs: c } = M();
23
- return (o, r) => (t(), b("label", g(v(
24
- l(u)(
25
- "flex items-center rounded border text-sm font-medium has-[:focus-visible]:bg-b-1 bg-b-1.5 has-[:focus-visible]:outline h-10 p-3"
26
- )
23
+ const { classCx: c, otherAttrs: d } = z();
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")
27
26
  )), [
28
- k(C("input", S({
27
+ k(e(x), { class: "text-sidebar-c-search size-4" }),
28
+ _(S("input", V({
29
29
  ref_key: "inputRef",
30
- ref: a,
31
- "aria-label": o.label ?? "Enter search query",
30
+ ref: o,
31
+ "aria-label": l.label ?? "Enter search query",
32
32
  autocapitalize: "off",
33
33
  autocomplete: "off",
34
34
  autocorrect: "off",
@@ -36,27 +36,27 @@ const B = ["aria-label"], E = {}, L = /* @__PURE__ */ f({
36
36
  placeholder: "Search...",
37
37
  spellcheck: "false",
38
38
  type: "search"
39
- }, l(c), {
40
- "onUpdate:modelValue": r[0] || (r[0] = (d) => e.value = d)
41
- }), null, 16, B), [
42
- [V, e.value]
39
+ }, e(d), {
40
+ "onUpdate:modelValue": r[0] || (r[0] = (u) => a.value = u)
41
+ }), null, 16, N), [
42
+ [y, a.value]
43
43
  ]),
44
- o.loading && o.loading.isLoading ? (t(), n(l(x), {
44
+ l.loading && l.loading.isLoading ? (t(), n(e(B), {
45
45
  key: 0,
46
46
  class: "self-center",
47
- loadingState: o.loading,
47
+ loadingState: l.loading,
48
48
  size: "md"
49
- }, null, 8, ["loadingState"])) : e.value ? (t(), n(l(z), {
49
+ }, null, 8, ["loadingState"])) : a.value ? (t(), n(e(E), {
50
50
  key: 1,
51
51
  class: "p-0 size-5",
52
52
  icon: "Close",
53
53
  label: "Clear Search",
54
54
  thickness: "1.5",
55
- onClick: y(i, ["stop", "prevent"])
56
- })) : _("", !0)
55
+ onClick: M(i, ["stop", "prevent"])
56
+ })) : C("", !0)
57
57
  ], 16));
58
58
  }
59
59
  });
60
60
  export {
61
- L as default
61
+ q as default
62
62
  };
@@ -1,7 +1,7 @@
1
- import type { Component } from 'vue';
1
+ import type { ScalarIconComponent } from '@scalar/icons/types';
2
2
  import { type Icon } from '../ScalarIcon';
3
3
  type __VLS_Props = {
4
- icon?: Icon | Component;
4
+ icon?: Icon | ScalarIconComponent;
5
5
  selected?: boolean;
6
6
  };
7
7
  declare function __VLS_template(): {
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarSearchResultItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSearchResults/ScalarSearchResultItem.vue"],"names":[],"mappings":"AA8DA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAEpC,OAAO,EAAE,KAAK,IAAI,EAA2B,MAAM,eAAe,CAAA;AAIlE,KAAK,WAAW,GAAG;IACjB,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,CAAA;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAC;AAWF,iBAAS,cAAc;WAiGT,OAAO,IAA6B;;sBAXxB,GAAG;yBACA,GAAG;uBACL,GAAG;6BACG,GAAG;;;;EAanC;AAUD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"ScalarSearchResultItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSearchResults/ScalarSearchResultItem.vue"],"names":[],"mappings":"AA4DA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAG9D,OAAO,EAAE,KAAK,IAAI,EAA2B,MAAM,eAAe,CAAA;AAIlE,KAAK,WAAW,GAAG;IACjB,IAAI,CAAC,EAAE,IAAI,GAAG,mBAAmB,CAAA;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAC;AAWF,iBAAS,cAAc;WAkGT,OAAO,IAA6B;;sBAXxB,GAAG;yBACA,GAAG;uBACL,GAAG;6BACG,GAAG;;;;EAanC;AAUD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,15 +1,15 @@
1
- import { defineComponent as c, createElementBlock as o, openBlock as t, mergeProps as a, unref as l, createCommentVNode as s, createElementVNode as n, renderSlot as r, createBlock as m } from "vue";
1
+ import { defineComponent as c, createElementBlock as o, openBlock as t, mergeProps as d, unref as l, createCommentVNode as s, createElementVNode as n, renderSlot as r, createBlock as m } from "vue";
2
2
  import { useBindCx as p } from "@scalar/use-hooks/useBindCx";
3
3
  import u from "../ScalarIcon/ScalarIconLegacyAdapter.vue.js";
4
4
  const f = ["aria-selected"], h = {
5
5
  key: 0,
6
6
  class: "flex h-fit items-center text-sm font-medium text-c-3 group-hover:text-c-1"
7
- }, _ = { class: "flex min-w-0 flex-1 flex-col gap-0.75" }, x = { class: "flex items-center gap-1" }, g = { class: "flex-1 truncate zoomed:!whitespace-normal break-words text-sm font-medium" }, k = {
7
+ }, _ = { class: "flex min-w-0 flex-1 flex-col gap-0.75" }, b = { class: "flex items-center gap-1" }, x = { class: "flex-1 truncate zoomed:!whitespace-normal break-words text-base font-medium" }, k = {
8
8
  key: 0,
9
- class: "text-sm text-c-2"
10
- }, b = {
9
+ class: "text-base text-c-2"
10
+ }, g = {
11
11
  key: 0,
12
- class: "truncate zoomed:!whitespace-normal break-words text-sm text-c-2"
12
+ class: "truncate zoomed:!whitespace-normal break-words text-base text-c-2"
13
13
  }, B = /* @__PURE__ */ c({
14
14
  inheritAttrs: !1,
15
15
  __name: "ScalarSearchResultItem",
@@ -18,15 +18,15 @@ const f = ["aria-selected"], h = {
18
18
  selected: { type: Boolean }
19
19
  },
20
20
  setup(v) {
21
- const { cx: d } = p();
22
- return (e, i) => (t(), o("a", a(
21
+ const { cx: a } = p();
22
+ return (e, i) => (t(), o("a", d(
23
23
  {
24
24
  "aria-selected": e.selected,
25
25
  role: "option",
26
26
  tabindex: "-1"
27
27
  },
28
- l(d)(
29
- "group flex cursor-pointer gap-2.5 rounded px-3 py-1.5 no-underline hover:bg-b-2",
28
+ l(a)(
29
+ "group flex cursor-pointer gap-2 rounded px-2 py-1.5 no-underline hover:bg-b-2",
30
30
  { "bg-b-2": e.selected }
31
31
  )
32
32
  ), [
@@ -35,22 +35,21 @@ const f = ["aria-selected"], h = {
35
35
  e.icon ? (t(), m(l(u), {
36
36
  key: 0,
37
37
  icon: e.icon,
38
- size: "sm",
39
- weight: "bold"
38
+ class: "size-4"
40
39
  }, null, 8, ["icon"])) : s("", !0)
41
40
  ]),
42
41
  i[0] || (i[0] = n("span", null, " ", -1))
43
42
  ])) : s("", !0),
44
43
  n("div", _, [
45
- n("div", x, [
46
- n("div", g, [
44
+ n("div", b, [
45
+ n("div", x, [
47
46
  r(e.$slots, "default")
48
47
  ]),
49
48
  e.$slots.addon ? (t(), o("div", k, [
50
49
  r(e.$slots, "addon")
51
50
  ])) : s("", !0)
52
51
  ]),
53
- e.$slots.description ? (t(), o("div", b, [
52
+ e.$slots.description ? (t(), o("div", g, [
54
53
  r(e.$slots, "description")
55
54
  ])) : s("", !0)
56
55
  ])
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarSearchResultList.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSearchResults/ScalarSearchResultList.vue"],"names":[],"mappings":"AAmCA,KAAK,WAAW,GAAG;IACjB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAC;AAWF,iBAAS,cAAc;WAsDT,OAAO,IAA6B;;2BATnB,GAAG;yBACL,GAAG;;;;EAa/B;AASD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"ScalarSearchResultList.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSearchResults/ScalarSearchResultList.vue"],"names":[],"mappings":"AAkCA,KAAK,WAAW,GAAG;IACjB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAC;AAWF,iBAAS,cAAc;WAkDT,OAAO,IAA6B;;2BATnB,GAAG;yBACL,GAAG;;;;EAa/B;AASD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,24 +1,23 @@
1
- import { defineComponent as r, createElementBlock as n, openBlock as a, mergeProps as m, unref as f, renderSlot as s, createCommentVNode as i, createElementVNode as t } from "vue";
2
- import { useBindCx as p } from "@scalar/use-hooks/useBindCx";
1
+ import { defineComponent as r, createElementBlock as n, openBlock as a, mergeProps as m, unref as p, renderSlot as o, createCommentVNode as u, createElementVNode as s } from "vue";
2
+ import { useBindCx as f } from "@scalar/use-hooks/useBindCx";
3
3
  const x = /* @__PURE__ */ r({
4
4
  inheritAttrs: !1,
5
5
  __name: "ScalarSearchResultList",
6
6
  props: {
7
7
  noResults: { type: Boolean }
8
8
  },
9
- setup(u) {
10
- const { cx: l } = p();
11
- return (e, o) => (a(), n("div", m({ role: "listbox" }, f(l)("flex flex-col")), [
12
- e.noResults ? s(e.$slots, "noResults", { key: 0 }, () => [
13
- o[0] || (o[0] = t("div", { class: "flex flex-col items-center gap-2 px-3 py-4" }, [
14
- t("div", { class: "rotate-90 text-lg font-bold" }, ":("),
15
- t("div", {
16
- class: "text-sm font-medium text-c-2",
9
+ setup(i) {
10
+ const { cx: l } = f();
11
+ return (e, t) => (a(), n("div", m({ role: "listbox" }, p(l)("flex flex-col")), [
12
+ e.noResults ? o(e.$slots, "noResults", { key: 0 }, () => [
13
+ t[0] || (t[0] = s("div", { class: "flex flex-col items-center gap-2 px-3 py-4" }, [
14
+ s("div", {
15
+ class: "text-base font-medium text-c-2",
17
16
  role: "alert"
18
17
  }, " No results found ")
19
18
  ], -1))
20
- ]) : i("", !0),
21
- s(e.$slots, "default")
19
+ ]) : u("", !0),
20
+ o(e.$slots, "default")
22
21
  ], 16));
23
22
  }
24
23
  });
@@ -77,7 +77,7 @@ declare const meta: {
77
77
  });
78
78
  ScalarSearchResultItem: {
79
79
  new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
80
- icon?: import("../ScalarIcon/index.js").Icon | import("vue").Component;
80
+ icon?: import("../ScalarIcon/index.js").Icon | import("@scalar/icons/types").ScalarIconComponent;
81
81
  selected?: boolean;
82
82
  }> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
83
83
  P: {};
@@ -87,14 +87,14 @@ declare const meta: {
87
87
  M: {};
88
88
  Defaults: {};
89
89
  }, Readonly<{
90
- icon?: import("../ScalarIcon/index.js").Icon | import("vue").Component;
90
+ icon?: import("../ScalarIcon/index.js").Icon | import("@scalar/icons/types").ScalarIconComponent;
91
91
  selected?: boolean;
92
92
  }> & Readonly<{}>, {}, {}, {}, {}, {}>;
93
93
  __isFragment?: never;
94
94
  __isTeleport?: never;
95
95
  __isSuspense?: never;
96
96
  } & import("vue").ComponentOptionsBase<Readonly<{
97
- icon?: import("../ScalarIcon/index.js").Icon | import("vue").Component;
97
+ icon?: import("../ScalarIcon/index.js").Icon | import("@scalar/icons/types").ScalarIconComponent;
98
98
  selected?: boolean;
99
99
  }> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
100
100
  $slots: {
@@ -1,3 +1,4 @@
1
+ import type { ScalarIconComponent } from '@scalar/icons/types';
1
2
  import type { Component } from 'vue';
2
3
  import { type Icon } from '../ScalarIcon';
3
4
  /**
@@ -14,14 +15,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
14
15
  /** Whether or not the toggle is open */
15
16
  open?: boolean;
16
17
  /** Overrides the icon */
17
- icon?: Icon | Component;
18
+ icon?: Icon | ScalarIconComponent;
18
19
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
19
20
  /** Override the element tag */
20
21
  is?: Component | string;
21
22
  /** Whether or not the toggle is open */
22
23
  open?: boolean;
23
24
  /** Overrides the icon */
24
- icon?: Icon | Component;
25
+ icon?: Icon | ScalarIconComponent;
25
26
  }> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, Readonly<{
26
27
  /** Override the toggle icon */
27
28
  default?: (props: {
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarSidebarGroupToggle.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/ScalarSidebarGroupToggle.vue"],"names":[],"mappings":"AAuEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAEpC,OAAO,EAAE,KAAK,IAAI,EAA2B,MAAM,eAAe,CAAA;AAIlE;;;;;;;GAOG;;IAID,+BAA+B;SAC1B,SAAS,GAAG,MAAM;IACvB,wCAAwC;WACjC,OAAO;IACd,yBAAyB;WAClB,IAAI,GAAG,SAAS;;IALvB,+BAA+B;SAC1B,SAAS,GAAG,MAAM;IACvB,wCAAwC;WACjC,OAAO;IACd,yBAAyB;WAClB,IAAI,GAAG,SAAS;;IAUvB,+BAA+B;cACrB,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,OAAO,CAAA;KAAE,KAAK,GAAG;IAC3C,uCAAuC;YAC/B,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,OAAO,CAAA;KAAE,KAAK,GAAG;;IAHzC,+BAA+B;cACrB,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,OAAO,CAAA;KAAE,KAAK,GAAG;IAC3C,uCAAuC;YAC/B,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,OAAO,CAAA;KAAE,KAAK,GAAG;;AArB3C,wBAgHC;AAWD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"ScalarSidebarGroupToggle.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/ScalarSidebarGroupToggle.vue"],"names":[],"mappings":"AAsEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAG9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAEpC,OAAO,EAAE,KAAK,IAAI,EAA2B,MAAM,eAAe,CAAA;AAIlE;;;;;;;GAOG;;IAID,+BAA+B;SAC1B,SAAS,GAAG,MAAM;IACvB,wCAAwC;WACjC,OAAO;IACd,yBAAyB;WAClB,IAAI,GAAG,mBAAmB;;IALjC,+BAA+B;SAC1B,SAAS,GAAG,MAAM;IACvB,wCAAwC;WACjC,OAAO;IACd,yBAAyB;WAClB,IAAI,GAAG,mBAAmB;;IAUjC,+BAA+B;cACrB,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,OAAO,CAAA;KAAE,KAAK,GAAG;IAC3C,uCAAuC;YAC/B,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,OAAO,CAAA;KAAE,KAAK,GAAG;;IAHzC,+BAA+B;cACrB,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,OAAO,CAAA;KAAE,KAAK,GAAG;IAC3C,uCAAuC;YAC/B,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,OAAO,CAAA;KAAE,KAAK,GAAG;;AArB3C,wBAgHC;AAWD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarSidebarSearchButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/ScalarSidebarSearchButton.vue"],"names":[],"mappings":"AA0CA,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAC;AAYF,iBAAS,cAAc;WAkET,OAAO,IAA6B;;yBATrB,GAAG;0BACF,GAAG;;;;EAahC;AAUD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"ScalarSidebarSearchButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/ScalarSidebarSearchButton.vue"],"names":[],"mappings":"AA0CA,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAC;AAWF,iBAAS,cAAc;WAkET,OAAO,IAA6B;;yBATrB,GAAG;0BACF,GAAG;;;;EAahC;AAUD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,12 +1,13 @@
1
1
  import type { Component } from 'vue';
2
2
  import type { Icon } from '../ScalarIcon';
3
3
  import type { SidebarGroupLevel } from './useSidebarGroups.js';
4
+ import type { ScalarIconComponent } from '@scalar/icons/types';
4
5
  /** Scalar Sidebar Item Props */
5
6
  export type ScalarSidebarItemProps = {
6
7
  /** Overrides the rendered element */
7
8
  is?: Component | string;
8
9
  /** Sets the icon for the item */
9
- icon?: Icon | Component;
10
+ icon?: Icon | ScalarIconComponent;
10
11
  /** Wether or not the item is selected */
11
12
  selected?: boolean;
12
13
  disabled?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAEpC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAE3D,gCAAgC;AAChC,MAAM,MAAM,sBAAsB,GAAG;IACnC,qCAAqC;IACrC,EAAE,CAAC,EAAE,SAAS,GAAG,MAAM,CAAA;IACvB,iCAAiC;IACjC,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,CAAA;IACvB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,qCAAqC;IACrC,MAAM,CAAC,EAAE,iBAAiB,CAAA;CAC3B,CAAA;AAED,gCAAgC;AAChC,MAAM,MAAM,sBAAsB,GAAG;IACnC,0CAA0C;IAC1C,OAAO,CAAC,EAAE,MAAM,GAAG,CAAA;IACnB,wBAAwB;IACxB,IAAI,CAAC,EAAE,MAAM,GAAG,CAAA;IAChB,8DAA8D;IAC9D,KAAK,CAAC,EAAE,MAAM,GAAG,CAAA;IACjB,2CAA2C;IAC3C,MAAM,CAAC,EAAE,MAAM,GAAG,CAAA;CACnB,CAAA"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAEpC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAE9D,gCAAgC;AAChC,MAAM,MAAM,sBAAsB,GAAG;IACnC,qCAAqC;IACrC,EAAE,CAAC,EAAE,SAAS,GAAG,MAAM,CAAA;IACvB,iCAAiC;IACjC,IAAI,CAAC,EAAE,IAAI,GAAG,mBAAmB,CAAA;IACjC,yCAAyC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,qCAAqC;IACrC,MAAM,CAAC,EAAE,iBAAiB,CAAA;CAC3B,CAAA;AAED,gCAAgC;AAChC,MAAM,MAAM,sBAAsB,GAAG;IACnC,0CAA0C;IAC1C,OAAO,CAAC,EAAE,MAAM,GAAG,CAAA;IACnB,wBAAwB;IACxB,IAAI,CAAC,EAAE,MAAM,GAAG,CAAA;IAChB,8DAA8D;IAC9D,KAAK,CAAC,EAAE,MAAM,GAAG,CAAA;IACjB,2CAA2C;IAC3C,MAAM,CAAC,EAAE,MAAM,GAAG,CAAA;CACnB,CAAA"}
@@ -4,7 +4,7 @@ declare const meta: {
4
4
  new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
5
5
  content?: string;
6
6
  delay?: number;
7
- placement?: import("@floating-ui/utils").Placement;
7
+ placement?: import("./types").ScalarTooltipPlacement;
8
8
  offset?: number;
9
9
  }> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, HTMLDivElement, import("vue").ComponentProvideOptions, {
10
10
  P: {};
@@ -16,7 +16,7 @@ declare const meta: {
16
16
  }, Readonly<{
17
17
  content?: string;
18
18
  delay?: number;
19
- placement?: import("@floating-ui/utils").Placement;
19
+ placement?: import("./types").ScalarTooltipPlacement;
20
20
  offset?: number;
21
21
  }> & Readonly<{}>, {}, {}, {}, {}, {}>;
22
22
  __isFragment?: never;
@@ -25,7 +25,7 @@ declare const meta: {
25
25
  } & import("vue").ComponentOptionsBase<Readonly<{
26
26
  content?: string;
27
27
  delay?: number;
28
- placement?: import("@floating-ui/utils").Placement;
28
+ placement?: import("./types").ScalarTooltipPlacement;
29
29
  offset?: number;
30
30
  }> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
31
31
  $slots: {
@@ -68,7 +68,7 @@ declare const meta: {
68
68
  new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
69
69
  content?: string;
70
70
  delay?: number;
71
- placement?: import("@floating-ui/utils").Placement;
71
+ placement?: import("./types").ScalarTooltipPlacement;
72
72
  offset?: number;
73
73
  }> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, HTMLDivElement, import("vue").ComponentProvideOptions, {
74
74
  P: {};
@@ -80,7 +80,7 @@ declare const meta: {
80
80
  }, Readonly<{
81
81
  content?: string;
82
82
  delay?: number;
83
- placement?: import("@floating-ui/utils").Placement;
83
+ placement?: import("./types").ScalarTooltipPlacement;
84
84
  offset?: number;
85
85
  }> & Readonly<{}>, {}, {}, {}, {}, {}>;
86
86
  __isFragment?: never;
@@ -89,7 +89,7 @@ declare const meta: {
89
89
  } & import("vue").ComponentOptionsBase<Readonly<{
90
90
  content?: string;
91
91
  delay?: number;
92
- placement?: import("@floating-ui/utils").Placement;
92
+ placement?: import("./types").ScalarTooltipPlacement;
93
93
  offset?: number;
94
94
  }> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
95
95
  $slots: {
@@ -101,7 +101,7 @@ declare const meta: {
101
101
  new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
102
102
  content?: string;
103
103
  delay?: number;
104
- placement?: import("@floating-ui/utils").Placement;
104
+ placement?: import("./types").ScalarTooltipPlacement;
105
105
  offset?: number;
106
106
  }> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, HTMLDivElement, import("vue").ComponentProvideOptions, {
107
107
  P: {};
@@ -113,7 +113,7 @@ declare const meta: {
113
113
  }, Readonly<{
114
114
  content?: string;
115
115
  delay?: number;
116
- placement?: import("@floating-ui/utils").Placement;
116
+ placement?: import("./types").ScalarTooltipPlacement;
117
117
  offset?: number;
118
118
  }> & Readonly<{}>, {}, {}, {}, {}, {}>;
119
119
  __isFragment?: never;
@@ -122,7 +122,7 @@ declare const meta: {
122
122
  } & import("vue").ComponentOptionsBase<Readonly<{
123
123
  content?: string;
124
124
  delay?: number;
125
- placement?: import("@floating-ui/utils").Placement;
125
+ placement?: import("./types").ScalarTooltipPlacement;
126
126
  offset?: number;
127
127
  }> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
128
128
  $slots: {
@@ -139,7 +139,7 @@ declare const meta: {
139
139
  type?: "button" | "submit" | "reset";
140
140
  }> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
141
141
  size: "sm" | "md";
142
- variant: string;
142
+ variant: "solid" | "outlined" | "ghost" | "danger";
143
143
  fullWidth: boolean;
144
144
  type: "button" | "submit" | "reset";
145
145
  }, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
@@ -158,7 +158,7 @@ declare const meta: {
158
158
  type?: "button" | "submit" | "reset";
159
159
  }> & Readonly<{}>, {}, {}, {}, {}, {
160
160
  size: "sm" | "md";
161
- variant: string;
161
+ variant: "solid" | "outlined" | "ghost" | "danger";
162
162
  fullWidth: boolean;
163
163
  type: "button" | "submit" | "reset";
164
164
  }>;
@@ -174,7 +174,7 @@ declare const meta: {
174
174
  type?: "button" | "submit" | "reset";
175
175
  }> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
176
176
  size: "sm" | "md";
177
- variant: string;
177
+ variant: "solid" | "outlined" | "ghost" | "danger";
178
178
  fullWidth: boolean;
179
179
  type: "button" | "submit" | "reset";
180
180
  }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
@@ -190,7 +190,7 @@ declare const meta: {
190
190
  new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
191
191
  content?: string;
192
192
  delay?: number;
193
- placement?: import("@floating-ui/utils").Placement;
193
+ placement?: import("./types").ScalarTooltipPlacement;
194
194
  offset?: number;
195
195
  }> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, HTMLDivElement, import("vue").ComponentProvideOptions, {
196
196
  P: {};
@@ -202,7 +202,7 @@ declare const meta: {
202
202
  }, Readonly<{
203
203
  content?: string;
204
204
  delay?: number;
205
- placement?: import("@floating-ui/utils").Placement;
205
+ placement?: import("./types").ScalarTooltipPlacement;
206
206
  offset?: number;
207
207
  }> & Readonly<{}>, {}, {}, {}, {}, {}>;
208
208
  __isFragment?: never;
@@ -211,7 +211,7 @@ declare const meta: {
211
211
  } & import("vue").ComponentOptionsBase<Readonly<{
212
212
  content?: string;
213
213
  delay?: number;
214
- placement?: import("@floating-ui/utils").Placement;
214
+ placement?: import("./types").ScalarTooltipPlacement;
215
215
  offset?: number;
216
216
  }> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
217
217
  $slots: {
@@ -1,23 +1,27 @@
1
- import type { Placement } from '@floating-ui/vue';
2
- type __VLS_Props = {
1
+ import type { ScalarTooltipPlacement } from './types';
2
+ /**
3
+ * Scalar tooltip component
4
+ *
5
+ * Adds a tooltip to an interactive element
6
+ *
7
+ * @example
8
+ * <ScalarTooltip content="This is a tooltip">
9
+ * <ScalarButton>Hover Me</ScalarButton>
10
+ * </ScalarTooltip>
11
+ */
12
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
3
13
  content?: string;
4
14
  delay?: number;
5
- placement?: Placement;
15
+ placement?: ScalarTooltipPlacement;
6
16
  offset?: number;
7
- };
8
- declare function __VLS_template(): {
9
- attrs: Partial<{}>;
10
- slots: {
11
- default?(_: {}): any;
12
- };
13
- refs: {
14
- wrapperRef: HTMLDivElement;
15
- };
16
- rootEl: HTMLDivElement;
17
- };
18
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
19
- declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
20
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
17
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
18
+ content?: string;
19
+ delay?: number;
20
+ placement?: ScalarTooltipPlacement;
21
+ offset?: number;
22
+ }> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>, {
23
+ default?(_: {}): any;
24
+ }>;
21
25
  export default _default;
22
26
  type __VLS_WithTemplateSlots<T, S> = T & {
23
27
  new (): {
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarTooltip.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarTooltip/ScalarTooltip.vue"],"names":[],"mappings":"AAwDA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAOjD,KAAK,WAAW,GAAG;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAC;AA0BF,iBAAS,cAAc;WAwCT,OAAO,IAA6B;;yBATrB,GAAG;;;;;;EAc/B;AASD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,6SAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"ScalarTooltip.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarTooltip/ScalarTooltip.vue"],"names":[],"mappings":"AAyEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAKrD;;;;;;;;;GASG;;cAIS,MAAM;YACR,MAAM;gBACF,sBAAsB;aACzB,MAAM;;cAHL,MAAM;YACR,MAAM;gBACF,sBAAsB;aACzB,MAAM;;qBA0DY,GAAG;;AAhEhC,wBAkGC;AAWD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,29 +1,31 @@
1
1
  import { defineComponent as n, ref as f, computed as t, createElementBlock as r, openBlock as c, normalizeClass as d, renderSlot as s } from "vue";
2
- import { useTooltip as u } from "./useTooltip.js";
3
- const i = /* @__PURE__ */ n({
2
+ import { DEFAULT_OFFSET as u, DEFAULT_DELAY as m } from "./constants.js";
3
+ import { useTooltip as p } from "./useTooltip.js";
4
+ const i = {}, v = /* @__PURE__ */ n({
5
+ ...i,
4
6
  __name: "ScalarTooltip",
5
7
  props: {
6
8
  content: { default: "" },
7
- delay: { default: 300 },
9
+ delay: { default: () => m },
8
10
  placement: { default: "top" },
9
- offset: { default: 4 }
11
+ offset: { default: () => u }
10
12
  },
11
13
  setup(l) {
12
- const a = f(null);
13
- return u({
14
+ const o = f(null);
15
+ return p({
14
16
  content: t(() => l.content),
15
17
  delay: t(() => l.delay),
16
18
  placement: t(() => l.placement),
17
19
  offset: t(() => l.offset),
18
20
  targetRef: t(
19
21
  () => {
20
- var e, o;
21
- return ((o = (e = a.value) == null ? void 0 : e.children) == null ? void 0 : o[0]) || a.value || void 0;
22
+ var e, a;
23
+ return ((a = (e = o.value) == null ? void 0 : e.children) == null ? void 0 : a[0]) || o.value || void 0;
22
24
  }
23
25
  )
24
- }), (e, o) => (c(), r("div", {
26
+ }), (e, a) => (c(), r("div", {
25
27
  ref_key: "wrapperRef",
26
- ref: a,
28
+ ref: o,
27
29
  class: d({ contents: !!e.$slots.default })
28
30
  }, [
29
31
  s(e.$slots, "default")
@@ -31,5 +33,5 @@ const i = /* @__PURE__ */ n({
31
33
  }
32
34
  });
33
35
  export {
34
- i as default
36
+ v as default
35
37
  };
@@ -4,4 +4,6 @@ export declare const ELEMENT_ID: "scalar-tooltip";
4
4
  export declare const ELEMENT_CLASS: "scalar-tooltip";
5
5
  /** The default delay for the tooltip */
6
6
  export declare const DEFAULT_DELAY: 300;
7
+ /** The default offset for the tooltip */
8
+ export declare const DEFAULT_OFFSET: 4;
7
9
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarTooltip/constants.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,eAAO,MAAM,UAAU,kBAA4B,CAAA;AAEnD,4CAA4C;AAC5C,eAAO,MAAM,aAAa,kBAA4B,CAAA;AAEtD,wCAAwC;AACxC,eAAO,MAAM,aAAa,KAAe,CAAA"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarTooltip/constants.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,eAAO,MAAM,UAAU,kBAA4B,CAAA;AAEnD,4CAA4C;AAC5C,eAAO,MAAM,aAAa,kBAA4B,CAAA;AAEtD,wCAAwC;AACxC,eAAO,MAAM,aAAa,KAAe,CAAA;AAEzC,yCAAyC;AACzC,eAAO,MAAM,cAAc,GAAa,CAAA"}