@scalar/components 0.13.58 → 0.14.1

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 (30) hide show
  1. package/dist/components/ScalarCodeBlock/ScalarCodeBlock.vue.js +1 -1
  2. package/dist/components/ScalarFloating/ScalarFloating.vue.d.ts.map +1 -1
  3. package/dist/components/ScalarMarkdown/ScalarMarkdown.vue.d.ts.map +1 -1
  4. package/dist/components/ScalarMarkdown/ScalarMarkdown.vue.js +6 -7
  5. package/dist/components/ScalarSearchResults/ScalarSearchResultItem.vue.d.ts.map +1 -1
  6. package/dist/components/ScalarSearchResults/ScalarSearchResultItem.vue.js +12 -11
  7. package/dist/components/ScalarSearchResults/ScalarSearchResultList.vue.js +4 -4
  8. package/dist/components/ScalarTooltip/ScalarTooltip.stories.d.ts +74 -272
  9. package/dist/components/ScalarTooltip/ScalarTooltip.stories.d.ts.map +1 -1
  10. package/dist/components/ScalarTooltip/ScalarTooltip.vue.d.ts +10 -26
  11. package/dist/components/ScalarTooltip/ScalarTooltip.vue.d.ts.map +1 -1
  12. package/dist/components/ScalarTooltip/ScalarTooltip.vue.js +27 -69
  13. package/dist/components/ScalarTooltip/ScalarTooltip.vue3.js +5 -0
  14. package/dist/components/ScalarTooltip/__tests__/useTooltip.test.d.ts +2 -0
  15. package/dist/components/ScalarTooltip/__tests__/useTooltip.test.d.ts.map +1 -0
  16. package/dist/components/ScalarTooltip/constants.d.ts +7 -0
  17. package/dist/components/ScalarTooltip/constants.d.ts.map +1 -0
  18. package/dist/components/ScalarTooltip/constants.js +6 -0
  19. package/dist/components/ScalarTooltip/types.d.ts +15 -0
  20. package/dist/components/ScalarTooltip/types.d.ts.map +1 -0
  21. package/dist/components/ScalarTooltip/useTooltip.d.ts +18 -0
  22. package/dist/components/ScalarTooltip/useTooltip.d.ts.map +1 -0
  23. package/dist/components/ScalarTooltip/useTooltip.js +75 -0
  24. package/dist/index.js +131 -130
  25. package/dist/style.css +1 -1
  26. package/package.json +9 -8
  27. package/dist/components/ScalarTooltip/ScalarTooltip.vue2.js +0 -4
  28. package/dist/helpers/oas-utils.d.ts +0 -19
  29. package/dist/helpers/oas-utils.d.ts.map +0 -1
  30. package/dist/helpers/oas-utils.js +0 -48
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as f, computed as s, createElementBlock as o, openBlock as n, createCommentVNode as a, createElementVNode as c, unref as l, createVNode as y } from "vue";
2
2
  import { syntaxHighlight as b, standardLanguages as C } from "@scalar/code-highlight";
3
+ import { prettyPrintJson as i } from "@scalar/oas-utils/helpers";
3
4
  import { useClipboard as g } from "@scalar/use-hooks/useClipboard";
4
- import { prettyPrintJson as i } from "../../helpers/oas-utils.js";
5
5
  import h from "../ScalarIcon/ScalarIcon.vue.js";
6
6
  const k = {
7
7
  class: "scalar-code-block custom-scroll min-h-12 focus-visible:outline",
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarFloating.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarFloating/ScalarFloating.vue"],"names":[],"mappings":"AA2HA,OAAO,EACL,KAAK,cAAc,EAOpB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAY,KAAK,IAAI,EAAiB,MAAM,KAAK,CAAA;AAGxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AA6F9C,iBAAS,cAAc;WAqDT,OAAO,IAA6B;;QAjIhD,kEAAkE;mBACvD,IAAI;QACf,2BAA2B;yBACV;YACf,4FAA4F;YAC5F,KAAK,CAAC,EAAE,MAAM,CAAA;YACd,6FAA6F;YAC7F,MAAM,CAAC,EAAE,MAAM,CAAA;YACf,gDAAgD;YAChD,IAAI,CAAC,EAAE,cAAc,CAAA;SACtB,GAAG,IAAI;;QAVR,kEAAkE;mBACvD,IAAI;QACf,2BAA2B;yBACV;YACf,4FAA4F;YAC5F,KAAK,CAAC,EAAE,MAAM,CAAA;YACd,6FAA6F;YAC7F,MAAM,CAAC,EAAE,MAAM,CAAA;YACf,gDAAgD;YAChD,IAAI,CAAC,EAAE,cAAc,CAAA;SACtB,GAAG,IAAI;;;;;;;EA4HT;AAeD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,0SAMnB,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":"ScalarFloating.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarFloating/ScalarFloating.vue"],"names":[],"mappings":"AA2HA,OAAO,EACL,KAAK,cAAc,EAOpB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAY,KAAK,IAAI,EAAwB,MAAM,KAAK,CAAA;AAG/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AA6F9C,iBAAS,cAAc;WAqDT,OAAO,IAA6B;;QAjIhD,kEAAkE;mBACvD,IAAI;QACf,2BAA2B;yBACV;YACf,4FAA4F;YAC5F,KAAK,CAAC,EAAE,MAAM,CAAA;YACd,6FAA6F;YAC7F,MAAM,CAAC,EAAE,MAAM,CAAA;YACf,gDAAgD;YAChD,IAAI,CAAC,EAAE,cAAc,CAAA;SACtB,GAAG,IAAI;;QAVR,kEAAkE;mBACvD,IAAI;QACf,2BAA2B;yBACV;YACf,4FAA4F;YAC5F,KAAK,CAAC,EAAE,MAAM,CAAA;YACd,6FAA6F;YAC7F,MAAM,CAAC,EAAE,MAAM,CAAA;YACf,gDAAgD;YAChD,IAAI,CAAC,EAAE,cAAc,CAAA;SACtB,GAAG,IAAI;;;;;;;EA4HT;AAeD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,0SAMnB,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 +1 @@
1
- {"version":3,"file":"ScalarMarkdown.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarMarkdown/ScalarMarkdown.vue"],"names":[],"mappings":"AAuDA,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;CACf,CAAC;;gBALa,OAAO;;AAuFxB,wBAQG"}
1
+ {"version":3,"file":"ScalarMarkdown.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarMarkdown/ScalarMarkdown.vue"],"names":[],"mappings":"AAmDA,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;CACf,CAAC;;gBALa,OAAO;;AAuFxB,wBAQG"}
@@ -1,8 +1,7 @@
1
- import { defineComponent as t, computed as n, onServerPrefetch as l, createElementBlock as m, openBlock as s, normalizeStyle as p, normalizeClass as i, unref as c } from "vue";
1
+ import { defineComponent as t, computed as n, onServerPrefetch as m, createElementBlock as s, openBlock as l, normalizeStyle as i, normalizeClass as p, unref as c } from "vue";
2
2
  import { htmlFromMarkdown as f } from "@scalar/code-highlight";
3
3
  import { cx as u } from "@scalar/use-hooks/useBindCx";
4
- import { sleep as d } from "../../helpers/oas-utils.js";
5
- const y = ["innerHTML"], T = /* @__PURE__ */ t({
4
+ const d = ["innerHTML"], T = /* @__PURE__ */ t({
6
5
  __name: "ScalarMarkdown",
7
6
  props: {
8
7
  value: {},
@@ -20,15 +19,15 @@ const y = ["innerHTML"], T = /* @__PURE__ */ t({
20
19
  transformType: e.transformType
21
20
  })
22
21
  );
23
- return l(async () => await d(1)), (r, h) => (s(), m("div", {
24
- class: i(
22
+ return m(async () => await new Promise((r) => setTimeout(r, 1))), (r, y) => (l(), s("div", {
23
+ class: p(
25
24
  c(u)("markdown text-ellipsis", { "line-clamp-4": r.clamp }, e.class)
26
25
  ),
27
- style: p({
26
+ style: i({
28
27
  "-webkit-line-clamp": typeof r.clamp == "string" ? r.clamp : void 0
29
28
  }),
30
29
  innerHTML: o.value
31
- }, null, 14, y));
30
+ }, null, 14, d));
32
31
  }
33
32
  });
34
33
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarSearchResultItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSearchResults/ScalarSearchResultItem.vue"],"names":[],"mappings":"AA4DA,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,eAAe,CAAA;AAIrD,KAAK,WAAW,GAAG;IACjB,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,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":"AA6DA,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,eAAe,CAAA;AAIrD,KAAK,WAAW,GAAG;IACjB,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,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,16 +1,16 @@
1
- import { defineComponent as d, createElementBlock as t, openBlock as o, mergeProps as a, unref as l, createCommentVNode as s, createElementVNode as n, renderSlot as r, createBlock as m } from "vue";
1
+ import { defineComponent as a, 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/ScalarIcon.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
- }, k = { class: "flex min-w-0 flex-1 flex-col gap-0.75" }, x = { class: "flex items-center gap-1" }, _ = { class: "flex-1 truncate zoomed:!whitespace-normal break-words text-sm font-medium" }, g = {
7
+ }, x = { class: "flex min-w-0 flex-1 flex-col gap-0.75" }, k = { class: "flex items-center gap-1" }, _ = { class: "flex-1 truncate zoomed:!whitespace-normal break-words text-sm font-medium" }, g = {
8
8
  key: 0,
9
9
  class: "text-sm text-c-2"
10
10
  }, v = {
11
11
  key: 0,
12
12
  class: "truncate zoomed:!whitespace-normal break-words text-sm text-c-2"
13
- }, B = /* @__PURE__ */ d({
13
+ }, B = /* @__PURE__ */ a({
14
14
  inheritAttrs: !1,
15
15
  __name: "ScalarSearchResultItem",
16
16
  props: {
@@ -19,19 +19,20 @@ const f = ["aria-selected"], h = {
19
19
  },
20
20
  setup(b) {
21
21
  const { cx: c } = p();
22
- return (e, i) => (o(), t("li", a(
22
+ return (e, i) => (t(), o("a", d(
23
23
  {
24
24
  "aria-selected": e.selected,
25
- role: "option"
25
+ role: "option",
26
+ tabindex: "-1"
26
27
  },
27
28
  l(c)(
28
29
  "group flex cursor-pointer gap-2.5 rounded px-3 py-1.5 no-underline hover:bg-b-2",
29
30
  { "bg-b-2": e.selected }
30
31
  )
31
32
  ), [
32
- e.icon ? (o(), t("div", h, [
33
+ e.icon ? (t(), o("div", h, [
33
34
  r(e.$slots, "icon", {}, () => [
34
- e.icon ? (o(), m(l(u), {
35
+ e.icon ? (t(), m(l(u), {
35
36
  key: 0,
36
37
  icon: e.icon,
37
38
  size: "sm"
@@ -39,16 +40,16 @@ const f = ["aria-selected"], h = {
39
40
  ]),
40
41
  i[0] || (i[0] = n("span", null, " ", -1))
41
42
  ])) : s("", !0),
42
- n("div", k, [
43
- n("div", x, [
43
+ n("div", x, [
44
+ n("div", k, [
44
45
  n("div", _, [
45
46
  r(e.$slots, "default")
46
47
  ]),
47
- e.$slots.addon ? (o(), t("div", g, [
48
+ e.$slots.addon ? (t(), o("div", g, [
48
49
  r(e.$slots, "addon")
49
50
  ])) : s("", !0)
50
51
  ]),
51
- e.$slots.description ? (o(), t("div", v, [
52
+ e.$slots.description ? (t(), o("div", v, [
52
53
  r(e.$slots, "description")
53
54
  ])) : s("", !0)
54
55
  ])
@@ -1,4 +1,4 @@
1
- import { defineComponent as r, createElementBlock as n, openBlock as a, mergeProps as m, unref as u, renderSlot as s, createCommentVNode as f, createElementVNode as t } from "vue";
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
2
  import { useBindCx as p } from "@scalar/use-hooks/useBindCx";
3
3
  const x = /* @__PURE__ */ r({
4
4
  inheritAttrs: !1,
@@ -6,9 +6,9 @@ const x = /* @__PURE__ */ r({
6
6
  props: {
7
7
  noResults: { type: Boolean }
8
8
  },
9
- setup(c) {
9
+ setup(u) {
10
10
  const { cx: l } = p();
11
- return (e, o) => (a(), n("ul", m({ role: "listbox" }, u(l)("flex flex-col")), [
11
+ return (e, o) => (a(), n("div", m({ role: "listbox" }, f(l)("flex flex-col")), [
12
12
  e.noResults ? s(e.$slots, "noResults", { key: 0 }, () => [
13
13
  o[0] || (o[0] = t("div", { class: "flex flex-col items-center gap-2 px-3 py-4" }, [
14
14
  t("div", { class: "rotate-90 text-lg font-bold" }, ":("),
@@ -17,7 +17,7 @@ const x = /* @__PURE__ */ r({
17
17
  role: "alert"
18
18
  }, " No results found ")
19
19
  ], -1))
20
- ]) : f("", !0),
20
+ ]) : i("", !0),
21
21
  s(e.$slots, "default")
22
22
  ], 16));
23
23
  }
@@ -2,29 +2,11 @@ import type { StoryObj } from '@storybook/vue3';
2
2
  declare const meta: {
3
3
  component: {
4
4
  new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
5
- click?: () => void;
5
+ content?: string;
6
6
  delay?: number;
7
- skipDelay?: number;
8
- align?: "start" | "center" | "end";
9
- side?: "top" | "right" | "bottom" | "left";
10
- sideOffset?: number;
11
- class?: string;
12
- triggerClass?: string;
13
- resize?: boolean;
14
- as?: string;
15
- disabled?: boolean;
16
- textSize?: "xs" | "sm" | "base";
17
- }> & Readonly<{
18
- onClick?: (() => any) | undefined;
19
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
20
- click: () => any;
21
- }, import("vue").PublicProps, {
22
- disabled: boolean;
23
- align: "start" | "center" | "end";
24
- side: "top" | "right" | "bottom" | "left";
25
- textSize: "xs" | "sm" | "base";
26
- skipDelay: number;
27
- }, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
7
+ placement?: import("@floating-ui/vue").Placement;
8
+ offset?: number;
9
+ }> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, HTMLDivElement, import("vue").ComponentProvideOptions, {
28
10
  P: {};
29
11
  B: {};
30
12
  D: {};
@@ -32,73 +14,51 @@ declare const meta: {
32
14
  M: {};
33
15
  Defaults: {};
34
16
  }, Readonly<{
35
- click?: () => void;
17
+ content?: string;
36
18
  delay?: number;
37
- skipDelay?: number;
38
- align?: "start" | "center" | "end";
39
- side?: "top" | "right" | "bottom" | "left";
40
- sideOffset?: number;
41
- class?: string;
42
- triggerClass?: string;
43
- resize?: boolean;
44
- as?: string;
45
- disabled?: boolean;
46
- textSize?: "xs" | "sm" | "base";
47
- }> & Readonly<{
48
- onClick?: (() => any) | undefined;
49
- }>, {}, {}, {}, {}, {
50
- disabled: boolean;
51
- align: "start" | "center" | "end";
52
- side: "top" | "right" | "bottom" | "left";
53
- textSize: "xs" | "sm" | "base";
54
- skipDelay: number;
55
- }>;
19
+ placement?: import("@floating-ui/vue").Placement;
20
+ offset?: number;
21
+ }> & Readonly<{}>, {}, {}, {}, {}, {}>;
56
22
  __isFragment?: never;
57
23
  __isTeleport?: never;
58
24
  __isSuspense?: never;
59
25
  } & import("vue").ComponentOptionsBase<Readonly<{
60
- click?: () => void;
26
+ content?: string;
61
27
  delay?: number;
62
- skipDelay?: number;
63
- align?: "start" | "center" | "end";
64
- side?: "top" | "right" | "bottom" | "left";
65
- sideOffset?: number;
66
- class?: string;
67
- triggerClass?: string;
68
- resize?: boolean;
69
- as?: string;
70
- disabled?: boolean;
71
- textSize?: "xs" | "sm" | "base";
72
- }> & Readonly<{
73
- onClick?: (() => any) | undefined;
74
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
75
- click: () => any;
76
- }, string, {
77
- disabled: boolean;
78
- align: "start" | "center" | "end";
79
- side: "top" | "right" | "bottom" | "left";
80
- textSize: "xs" | "sm" | "base";
81
- skipDelay: number;
82
- }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
28
+ placement?: import("@floating-ui/vue").Placement;
29
+ offset?: number;
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 () => {
83
31
  $slots: {
84
- trigger?(_: {}): any;
85
- content?(_: {}): any;
32
+ default?(_: {}): any;
86
33
  };
87
34
  });
88
35
  tags: string[];
36
+ args: {
37
+ content: string;
38
+ };
89
39
  argTypes: {
90
- delay: {
91
- control: "number";
40
+ content: {
41
+ control: "text";
92
42
  };
93
- skipDelay: {
94
- control: "number";
43
+ delay: {
44
+ control: {
45
+ type: "range";
46
+ min: number;
47
+ max: number;
48
+ step: number;
49
+ };
95
50
  };
96
- side: {
51
+ placement: {
97
52
  control: "select";
98
- options: string[];
53
+ options: import("@floating-ui/utils").Placement[];
99
54
  };
100
- sideOffset: {
101
- control: "number";
55
+ offset: {
56
+ control: {
57
+ type: "range";
58
+ min: number;
59
+ max: number;
60
+ step: number;
61
+ };
102
62
  };
103
63
  class: {
104
64
  control: "text";
@@ -106,29 +66,11 @@ declare const meta: {
106
66
  };
107
67
  render: (args: import("@storybook/vue3").ComponentPropsAndSlots<{
108
68
  new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
109
- click?: () => void;
69
+ content?: string;
110
70
  delay?: number;
111
- skipDelay?: number;
112
- align?: "start" | "center" | "end";
113
- side?: "top" | "right" | "bottom" | "left";
114
- sideOffset?: number;
115
- class?: string;
116
- triggerClass?: string;
117
- resize?: boolean;
118
- as?: string;
119
- disabled?: boolean;
120
- textSize?: "xs" | "sm" | "base";
121
- }> & Readonly<{
122
- onClick?: (() => any) | undefined;
123
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
124
- click: () => any;
125
- }, import("vue").PublicProps, {
126
- disabled: boolean;
127
- align: "start" | "center" | "end";
128
- side: "top" | "right" | "bottom" | "left";
129
- textSize: "xs" | "sm" | "base";
130
- skipDelay: number;
131
- }, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
71
+ placement?: import("@floating-ui/vue").Placement;
72
+ offset?: number;
73
+ }> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, HTMLDivElement, import("vue").ComponentProvideOptions, {
132
74
  P: {};
133
75
  B: {};
134
76
  D: {};
@@ -136,85 +78,32 @@ declare const meta: {
136
78
  M: {};
137
79
  Defaults: {};
138
80
  }, Readonly<{
139
- click?: () => void;
81
+ content?: string;
140
82
  delay?: number;
141
- skipDelay?: number;
142
- align?: "start" | "center" | "end";
143
- side?: "top" | "right" | "bottom" | "left";
144
- sideOffset?: number;
145
- class?: string;
146
- triggerClass?: string;
147
- resize?: boolean;
148
- as?: string;
149
- disabled?: boolean;
150
- textSize?: "xs" | "sm" | "base";
151
- }> & Readonly<{
152
- onClick?: (() => any) | undefined;
153
- }>, {}, {}, {}, {}, {
154
- disabled: boolean;
155
- align: "start" | "center" | "end";
156
- side: "top" | "right" | "bottom" | "left";
157
- textSize: "xs" | "sm" | "base";
158
- skipDelay: number;
159
- }>;
83
+ placement?: import("@floating-ui/vue").Placement;
84
+ offset?: number;
85
+ }> & Readonly<{}>, {}, {}, {}, {}, {}>;
160
86
  __isFragment?: never;
161
87
  __isTeleport?: never;
162
88
  __isSuspense?: never;
163
89
  } & import("vue").ComponentOptionsBase<Readonly<{
164
- click?: () => void;
90
+ content?: string;
165
91
  delay?: number;
166
- skipDelay?: number;
167
- align?: "start" | "center" | "end";
168
- side?: "top" | "right" | "bottom" | "left";
169
- sideOffset?: number;
170
- class?: string;
171
- triggerClass?: string;
172
- resize?: boolean;
173
- as?: string;
174
- disabled?: boolean;
175
- textSize?: "xs" | "sm" | "base";
176
- }> & Readonly<{
177
- onClick?: (() => any) | undefined;
178
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
179
- click: () => any;
180
- }, string, {
181
- disabled: boolean;
182
- align: "start" | "center" | "end";
183
- side: "top" | "right" | "bottom" | "left";
184
- textSize: "xs" | "sm" | "base";
185
- skipDelay: number;
186
- }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
92
+ placement?: import("@floating-ui/vue").Placement;
93
+ offset?: number;
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 () => {
187
95
  $slots: {
188
- trigger?(_: {}): any;
189
- content?(_: {}): any;
96
+ default?(_: {}): any;
190
97
  };
191
98
  })>) => {
192
99
  components: {
193
100
  ScalarTooltip: {
194
101
  new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
195
- click?: () => void;
102
+ content?: string;
196
103
  delay?: number;
197
- skipDelay?: number;
198
- align?: "start" | "center" | "end";
199
- side?: "top" | "right" | "bottom" | "left";
200
- sideOffset?: number;
201
- class?: string;
202
- triggerClass?: string;
203
- resize?: boolean;
204
- as?: string;
205
- disabled?: boolean;
206
- textSize?: "xs" | "sm" | "base";
207
- }> & Readonly<{
208
- onClick?: (() => any) | undefined;
209
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
210
- click: () => any;
211
- }, import("vue").PublicProps, {
212
- disabled: boolean;
213
- align: "start" | "center" | "end";
214
- side: "top" | "right" | "bottom" | "left";
215
- textSize: "xs" | "sm" | "base";
216
- skipDelay: number;
217
- }, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
104
+ placement?: import("@floating-ui/vue").Placement;
105
+ offset?: number;
106
+ }> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, HTMLDivElement, import("vue").ComponentProvideOptions, {
218
107
  P: {};
219
108
  B: {};
220
109
  D: {};
@@ -222,57 +111,22 @@ declare const meta: {
222
111
  M: {};
223
112
  Defaults: {};
224
113
  }, Readonly<{
225
- click?: () => void;
114
+ content?: string;
226
115
  delay?: number;
227
- skipDelay?: number;
228
- align?: "start" | "center" | "end";
229
- side?: "top" | "right" | "bottom" | "left";
230
- sideOffset?: number;
231
- class?: string;
232
- triggerClass?: string;
233
- resize?: boolean;
234
- as?: string;
235
- disabled?: boolean;
236
- textSize?: "xs" | "sm" | "base";
237
- }> & Readonly<{
238
- onClick?: (() => any) | undefined;
239
- }>, {}, {}, {}, {}, {
240
- disabled: boolean;
241
- align: "start" | "center" | "end";
242
- side: "top" | "right" | "bottom" | "left";
243
- textSize: "xs" | "sm" | "base";
244
- skipDelay: number;
245
- }>;
116
+ placement?: import("@floating-ui/vue").Placement;
117
+ offset?: number;
118
+ }> & Readonly<{}>, {}, {}, {}, {}, {}>;
246
119
  __isFragment?: never;
247
120
  __isTeleport?: never;
248
121
  __isSuspense?: never;
249
122
  } & import("vue").ComponentOptionsBase<Readonly<{
250
- click?: () => void;
123
+ content?: string;
251
124
  delay?: number;
252
- skipDelay?: number;
253
- align?: "start" | "center" | "end";
254
- side?: "top" | "right" | "bottom" | "left";
255
- sideOffset?: number;
256
- class?: string;
257
- triggerClass?: string;
258
- resize?: boolean;
259
- as?: string;
260
- disabled?: boolean;
261
- textSize?: "xs" | "sm" | "base";
262
- }> & Readonly<{
263
- onClick?: (() => any) | undefined;
264
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
265
- click: () => any;
266
- }, string, {
267
- disabled: boolean;
268
- align: "start" | "center" | "end";
269
- side: "top" | "right" | "bottom" | "left";
270
- textSize: "xs" | "sm" | "base";
271
- skipDelay: number;
272
- }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
125
+ placement?: import("@floating-ui/vue").Placement;
126
+ offset?: number;
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 () => {
273
128
  $slots: {
274
- trigger?(_: {}): any;
275
- content?(_: {}): any;
129
+ default?(_: {}): any;
276
130
  };
277
131
  });
278
132
  ScalarButton: {
@@ -334,29 +188,11 @@ declare const meta: {
334
188
  setup(this: void): {
335
189
  args: import("@storybook/vue3").ComponentPropsAndSlots<{
336
190
  new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
337
- click?: () => void;
191
+ content?: string;
338
192
  delay?: number;
339
- skipDelay?: number;
340
- align?: "start" | "center" | "end";
341
- side?: "top" | "right" | "bottom" | "left";
342
- sideOffset?: number;
343
- class?: string;
344
- triggerClass?: string;
345
- resize?: boolean;
346
- as?: string;
347
- disabled?: boolean;
348
- textSize?: "xs" | "sm" | "base";
349
- }> & Readonly<{
350
- onClick?: (() => any) | undefined;
351
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
352
- click: () => any;
353
- }, import("vue").PublicProps, {
354
- disabled: boolean;
355
- align: "start" | "center" | "end";
356
- side: "top" | "right" | "bottom" | "left";
357
- textSize: "xs" | "sm" | "base";
358
- skipDelay: number;
359
- }, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
193
+ placement?: import("@floating-ui/vue").Placement;
194
+ offset?: number;
195
+ }> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, HTMLDivElement, import("vue").ComponentProvideOptions, {
360
196
  P: {};
361
197
  B: {};
362
198
  D: {};
@@ -364,57 +200,22 @@ declare const meta: {
364
200
  M: {};
365
201
  Defaults: {};
366
202
  }, Readonly<{
367
- click?: () => void;
203
+ content?: string;
368
204
  delay?: number;
369
- skipDelay?: number;
370
- align?: "start" | "center" | "end";
371
- side?: "top" | "right" | "bottom" | "left";
372
- sideOffset?: number;
373
- class?: string;
374
- triggerClass?: string;
375
- resize?: boolean;
376
- as?: string;
377
- disabled?: boolean;
378
- textSize?: "xs" | "sm" | "base";
379
- }> & Readonly<{
380
- onClick?: (() => any) | undefined;
381
- }>, {}, {}, {}, {}, {
382
- disabled: boolean;
383
- align: "start" | "center" | "end";
384
- side: "top" | "right" | "bottom" | "left";
385
- textSize: "xs" | "sm" | "base";
386
- skipDelay: number;
387
- }>;
205
+ placement?: import("@floating-ui/vue").Placement;
206
+ offset?: number;
207
+ }> & Readonly<{}>, {}, {}, {}, {}, {}>;
388
208
  __isFragment?: never;
389
209
  __isTeleport?: never;
390
210
  __isSuspense?: never;
391
211
  } & import("vue").ComponentOptionsBase<Readonly<{
392
- click?: () => void;
212
+ content?: string;
393
213
  delay?: number;
394
- skipDelay?: number;
395
- align?: "start" | "center" | "end";
396
- side?: "top" | "right" | "bottom" | "left";
397
- sideOffset?: number;
398
- class?: string;
399
- triggerClass?: string;
400
- resize?: boolean;
401
- as?: string;
402
- disabled?: boolean;
403
- textSize?: "xs" | "sm" | "base";
404
- }> & Readonly<{
405
- onClick?: (() => any) | undefined;
406
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
407
- click: () => any;
408
- }, string, {
409
- disabled: boolean;
410
- align: "start" | "center" | "end";
411
- side: "top" | "right" | "bottom" | "left";
412
- textSize: "xs" | "sm" | "base";
413
- skipDelay: number;
414
- }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
214
+ placement?: import("@floating-ui/vue").Placement;
215
+ offset?: number;
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 () => {
415
217
  $slots: {
416
- trigger?(_: {}): any;
417
- content?(_: {}): any;
218
+ default?(_: {}): any;
418
219
  };
419
220
  })>;
420
221
  };
@@ -424,4 +225,5 @@ declare const meta: {
424
225
  export default meta;
425
226
  type Story = StoryObj<typeof meta>;
426
227
  export declare const Base: Story;
228
+ export declare const Multiple: Story;
427
229
  //# sourceMappingURL=ScalarTooltip.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarTooltip.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarTooltip/ScalarTooltip.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAKrD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0C4B,CAAA;AAEtC,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,IAAI,EAAE,KAAU,CAAA"}
1
+ {"version":3,"file":"ScalarTooltip.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarTooltip/ScalarTooltip.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAMrD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwC4B,CAAA;AAEtC,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,IAAI,EAAE,KAAU,CAAA;AAE7B,eAAO,MAAM,QAAQ,EAAE,KAoCtB,CAAA"}