@scalar/components 0.12.67 → 0.12.69

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 (56) hide show
  1. package/dist/components/ScalarDropdown/ScalarDropdown.stories.d.ts +12 -4
  2. package/dist/components/ScalarDropdown/ScalarDropdown.stories.d.ts.map +1 -1
  3. package/dist/components/ScalarDropdown/ScalarDropdown.vue.d.ts +3 -1
  4. package/dist/components/ScalarDropdown/ScalarDropdown.vue.d.ts.map +1 -1
  5. package/dist/components/ScalarDropdown/ScalarDropdown.vue.js +14 -14
  6. package/dist/components/ScalarIcon/icons/House.svg.js +5 -5
  7. package/dist/components/ScalarListbox/ScalarListbox.stories.d.ts +3 -1
  8. package/dist/components/ScalarListbox/ScalarListbox.stories.d.ts.map +1 -1
  9. package/dist/components/ScalarListbox/ScalarListbox.vue.d.ts +3 -1
  10. package/dist/components/ScalarListbox/ScalarListbox.vue.d.ts.map +1 -1
  11. package/dist/components/ScalarListbox/ScalarListbox.vue.js +18 -18
  12. package/dist/components/ScalarMenu/ScalarMenu.spec.d.ts +2 -0
  13. package/dist/components/ScalarMenu/ScalarMenu.spec.d.ts.map +1 -0
  14. package/dist/components/ScalarMenu/ScalarMenu.stories.d.ts +119 -0
  15. package/dist/components/ScalarMenu/ScalarMenu.stories.d.ts.map +1 -0
  16. package/dist/components/ScalarMenu/ScalarMenu.vue.d.ts +27 -0
  17. package/dist/components/ScalarMenu/ScalarMenu.vue.d.ts.map +1 -0
  18. package/dist/components/ScalarMenu/ScalarMenu.vue.js +45 -0
  19. package/dist/components/ScalarMenu/ScalarMenu.vue2.js +4 -0
  20. package/dist/components/ScalarMenu/ScalarMenuLink.vue.d.ts +22 -0
  21. package/dist/components/ScalarMenu/ScalarMenuLink.vue.d.ts.map +1 -0
  22. package/dist/components/ScalarMenu/ScalarMenuLink.vue.js +21 -0
  23. package/dist/components/ScalarMenu/ScalarMenuLink.vue2.js +4 -0
  24. package/dist/components/ScalarMenu/ScalarMenuProduct.vue.d.ts +23 -0
  25. package/dist/components/ScalarMenu/ScalarMenuProduct.vue.d.ts.map +1 -0
  26. package/dist/components/ScalarMenu/ScalarMenuProduct.vue.js +30 -0
  27. package/dist/components/ScalarMenu/ScalarMenuProduct.vue2.js +4 -0
  28. package/dist/components/ScalarMenu/ScalarMenuProducts.vue.d.ts +12 -0
  29. package/dist/components/ScalarMenu/ScalarMenuProducts.vue.d.ts.map +1 -0
  30. package/dist/components/ScalarMenu/ScalarMenuProducts.vue.js +53 -0
  31. package/dist/components/ScalarMenu/ScalarMenuProducts.vue2.js +4 -0
  32. package/dist/components/ScalarMenu/ScalarMenuProfile.vue.d.ts +12 -0
  33. package/dist/components/ScalarMenu/ScalarMenuProfile.vue.d.ts.map +1 -0
  34. package/dist/components/ScalarMenu/ScalarMenuProfile.vue.js +52 -0
  35. package/dist/components/ScalarMenu/ScalarMenuProfile.vue2.js +4 -0
  36. package/dist/components/ScalarMenu/ScalarMenuResources.vue.d.ts +3 -0
  37. package/dist/components/ScalarMenu/ScalarMenuResources.vue.d.ts.map +1 -0
  38. package/dist/components/ScalarMenu/ScalarMenuResources.vue.js +40 -0
  39. package/dist/components/ScalarMenu/ScalarMenuResources.vue2.js +4 -0
  40. package/dist/components/ScalarMenu/ScalarMenuSection.vue.d.ts +19 -0
  41. package/dist/components/ScalarMenu/ScalarMenuSection.vue.d.ts.map +1 -0
  42. package/dist/components/ScalarMenu/ScalarMenuSection.vue.js +17 -0
  43. package/dist/components/ScalarMenu/index.d.ts +8 -0
  44. package/dist/components/ScalarMenu/index.d.ts.map +1 -0
  45. package/dist/components/ScalarModal/ScalarModal.vue.js +4 -4
  46. package/dist/components/ScalarModal/ScalarModal.vue2.js +15 -15
  47. package/dist/components/ScalarPopover/ScalarPopover.stories.d.ts +12 -4
  48. package/dist/components/ScalarPopover/ScalarPopover.stories.d.ts.map +1 -1
  49. package/dist/components/ScalarPopover/ScalarPopover.vue.d.ts +3 -1
  50. package/dist/components/ScalarPopover/ScalarPopover.vue.d.ts.map +1 -1
  51. package/dist/components/ScalarPopover/ScalarPopover.vue.js +7 -7
  52. package/dist/index.d.ts +20 -20
  53. package/dist/index.d.ts.map +1 -1
  54. package/dist/index.js +66 -50
  55. package/dist/style.css +1 -1
  56. package/package.json +3 -3
@@ -0,0 +1,12 @@
1
+ type Product = 'dashboard' | 'docs' | 'client';
2
+ type __VLS_Props = {
3
+ selected?: Product;
4
+ hrefs?: Record<Product, string>;
5
+ };
6
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
7
+ open: (event: Event, product: Product) => any;
8
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
9
+ onOpen?: ((event: Event, product: Product) => any) | undefined;
10
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
11
+ export default _default;
12
+ //# sourceMappingURL=ScalarMenuProducts.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScalarMenuProducts.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarMenu/ScalarMenuProducts.vue"],"names":[],"mappings":"AA6CA,KAAK,OAAO,GAAG,WAAW,GAAG,MAAM,GAAG,QAAQ,CAAA;AAE9C,KAAK,WAAW,GAAG;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;CAChC,CAAC;;;;;;AAqIF,wBAQG"}
@@ -0,0 +1,53 @@
1
+ import { defineComponent as f, openBlock as p, createElementBlock as m, createVNode as t, withCtx as r, createTextVNode as d } from "vue";
2
+ import l from "./ScalarMenuProduct.vue.js";
3
+ const c = { class: "flex gap-3" }, C = /* @__PURE__ */ f({
4
+ __name: "ScalarMenuProducts",
5
+ props: {
6
+ selected: {},
7
+ hrefs: {}
8
+ },
9
+ emits: ["open"],
10
+ setup(u) {
11
+ return (s, e) => {
12
+ var n, i, a;
13
+ return p(), m("div", c, [
14
+ t(l, {
15
+ href: ((n = s.hrefs) == null ? void 0 : n.dashboard) ?? "https://dashboard.scalar.com",
16
+ icon: "House",
17
+ selected: s.selected === "dashboard",
18
+ onClick: e[0] || (e[0] = (o) => s.$emit("open", o, "dashboard"))
19
+ }, {
20
+ default: r(() => e[3] || (e[3] = [
21
+ d(" Dashboard ")
22
+ ])),
23
+ _: 1
24
+ }, 8, ["href", "selected"]),
25
+ t(l, {
26
+ href: ((i = s.hrefs) == null ? void 0 : i.docs) ?? "https://docs.scalar.com",
27
+ icon: "Page",
28
+ selected: s.selected === "docs",
29
+ onClick: e[1] || (e[1] = (o) => s.$emit("open", o, "docs"))
30
+ }, {
31
+ default: r(() => e[4] || (e[4] = [
32
+ d(" Docs ")
33
+ ])),
34
+ _: 1
35
+ }, 8, ["href", "selected"]),
36
+ t(l, {
37
+ href: ((a = s.hrefs) == null ? void 0 : a.client) ?? "https://client.scalar.com",
38
+ icon: "ExternalLink",
39
+ selected: s.selected === "client",
40
+ onClick: e[2] || (e[2] = (o) => s.$emit("open", o, "client"))
41
+ }, {
42
+ default: r(() => e[5] || (e[5] = [
43
+ d(" Client ")
44
+ ])),
45
+ _: 1
46
+ }, 8, ["href", "selected"])
47
+ ]);
48
+ };
49
+ }
50
+ });
51
+ export {
52
+ C as default
53
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./ScalarMenuProducts.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,12 @@
1
+ import { type ScalarListboxOption } from '../../index.js';
2
+ type __VLS_Props = {
3
+ team?: ScalarListboxOption | undefined;
4
+ teams: ScalarListboxOption[];
5
+ };
6
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
7
+ "update:team": (value: ScalarListboxOption | undefined) => any;
8
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
9
+ "onUpdate:team"?: ((value: ScalarListboxOption | undefined) => any) | undefined;
10
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
11
+ export default _default;
12
+ //# sourceMappingURL=ScalarMenuProfile.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScalarMenuProfile.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarMenu/ScalarMenuProfile.vue"],"names":[],"mappings":"AAgDA,OAAO,EAIL,KAAK,mBAAmB,EACzB,MAAM,QAAQ,CAAA;AAIf,KAAK,WAAW,GAAG;IACjB,IAAI,CAAC,EAAE,mBAAmB,GAAG,SAAS,CAAA;IACtC,KAAK,EAAE,mBAAmB,EAAE,CAAA;CAC7B,CAAC;;;;;;AAuGF,wBAQG"}
@@ -0,0 +1,52 @@
1
+ import { defineComponent as p, computed as u, openBlock as d, createElementBlock as f, createVNode as o, unref as a, withCtx as l, createTextVNode as _, toDisplayString as x } from "vue";
2
+ import h from "../ScalarListbox/ScalarListbox.vue.js";
3
+ import v from "../ScalarButton/ScalarButton.vue.js";
4
+ import V from "../ScalarIcon/ScalarIcon.vue.js";
5
+ const w = { class: "flex flex-col *:contents *:w-full" }, g = /* @__PURE__ */ p({
6
+ __name: "ScalarMenuProfile",
7
+ props: {
8
+ team: {},
9
+ teams: {}
10
+ },
11
+ emits: ["update:team"],
12
+ setup(m, { emit: r }) {
13
+ const i = m, c = r, n = u({
14
+ get: () => i.team,
15
+ set: (e) => c("update:team", e)
16
+ });
17
+ return (e, s) => (d(), f("div", w, [
18
+ o(a(h), {
19
+ modelValue: n.value,
20
+ "onUpdate:modelValue": s[0] || (s[0] = (t) => n.value = t),
21
+ options: e.teams,
22
+ placement: "bottom-end",
23
+ resize: ""
24
+ }, {
25
+ default: l(() => [
26
+ o(a(v), {
27
+ class: "h-auto px-2.5 py-1 text-xs shadow-none",
28
+ variant: "outlined"
29
+ }, {
30
+ default: l(() => {
31
+ var t;
32
+ return [
33
+ _(x((t = e.team) == null ? void 0 : t.label) + " ", 1),
34
+ o(a(V), {
35
+ class: "ml-auto text-c-2",
36
+ icon: "ChevronDown",
37
+ size: "xs",
38
+ thickness: "2.5"
39
+ })
40
+ ];
41
+ }),
42
+ _: 1
43
+ })
44
+ ]),
45
+ _: 1
46
+ }, 8, ["modelValue", "options"])
47
+ ]));
48
+ }
49
+ });
50
+ export {
51
+ g as default
52
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./ScalarMenuProfile.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,3 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, HTMLDivElement>;
2
+ export default _default;
3
+ //# sourceMappingURL=ScalarMenuResources.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScalarMenuResources.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarMenu/ScalarMenuResources.vue"],"names":[],"mappings":";AA+GA,wBAMG"}
@@ -0,0 +1,40 @@
1
+ import { defineComponent as l, openBlock as n, createBlock as s, withCtx as r, createTextVNode as e, createVNode as o } from "vue";
2
+ import a from "./ScalarMenuLink.vue.js";
3
+ import i from "./ScalarMenuSection.vue.js";
4
+ const d = /* @__PURE__ */ l({
5
+ __name: "ScalarMenuResources",
6
+ setup(m) {
7
+ return (p, t) => (n(), s(i, null, {
8
+ title: r(() => t[0] || (t[0] = [
9
+ e("Resources")
10
+ ])),
11
+ default: r(() => [
12
+ o(a, {
13
+ href: "mailto:marc@scalar.com",
14
+ target: "_blank"
15
+ }, {
16
+ default: r(() => t[1] || (t[1] = [
17
+ e(" Sales & Support ")
18
+ ])),
19
+ _: 1
20
+ }),
21
+ o(a, { href: "https://scalar.com/terms-and-conditions" }, {
22
+ default: r(() => t[2] || (t[2] = [
23
+ e(" Terms & Conditions ")
24
+ ])),
25
+ _: 1
26
+ }),
27
+ o(a, { href: "https://scalar.com/privacy-policy" }, {
28
+ default: r(() => t[3] || (t[3] = [
29
+ e(" Privacy Policy ")
30
+ ])),
31
+ _: 1
32
+ })
33
+ ]),
34
+ _: 1
35
+ }));
36
+ }
37
+ });
38
+ export {
39
+ d as default
40
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./ScalarMenuResources.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,19 @@
1
+ declare function __VLS_template(): {
2
+ attrs: Partial<{}>;
3
+ slots: {
4
+ title?(_: {}): any;
5
+ default?(_: {}): any;
6
+ };
7
+ refs: {};
8
+ rootEl: HTMLDivElement;
9
+ };
10
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
+ declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, HTMLDivElement>;
12
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
13
+ export default _default;
14
+ type __VLS_WithTemplateSlots<T, S> = T & {
15
+ new (): {
16
+ $slots: S;
17
+ };
18
+ };
19
+ //# sourceMappingURL=ScalarMenuSection.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScalarMenuSection.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarMenu/ScalarMenuSection.vue"],"names":[],"mappings":"AAoBA,iBAAS,cAAc;WA+CT,OAAO,IAA6B;;uBATvB,GAAG;yBACD,GAAG;;;;EAa/B;AAOD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,0RAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAKpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { openBlock as c, createElementBlock as s, createElementVNode as t, renderSlot as o } from "vue";
2
+ import l from "../../_virtual/_plugin-vue_export-helper.js";
3
+ const n = {}, r = { class: "flex flex-col gap-1.5" }, a = { class: "px-2.5 leading text-c-1" }, d = { class: "flex flex-col" };
4
+ function i(e, f) {
5
+ return c(), s("div", r, [
6
+ t("div", a, [
7
+ o(e.$slots, "title")
8
+ ]),
9
+ t("div", d, [
10
+ o(e.$slots, "default")
11
+ ])
12
+ ]);
13
+ }
14
+ const p = /* @__PURE__ */ l(n, [["render", i]]);
15
+ export {
16
+ p as default
17
+ };
@@ -0,0 +1,8 @@
1
+ export { default as ScalarMenu } from './ScalarMenu.vue.js';
2
+ export { default as ScalarMenuSection } from './ScalarMenuSection.vue.js';
3
+ export { default as ScalarMenuLink } from './ScalarMenuLink.vue.js';
4
+ export { default as ScalarMenuProduct } from './ScalarMenuProduct.vue.js';
5
+ export { default as ScalarMenuProducts } from './ScalarMenuProducts.vue.js';
6
+ export { default as ScalarMenuProfile } from './ScalarMenuProfile.vue.js';
7
+ export { default as ScalarMenuResources } from './ScalarMenuResources.vue.js';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarMenu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AACtE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AACtE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AACxE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AACtE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,2BAA2B,CAAA"}
@@ -1,9 +1,9 @@
1
1
  import o from "./ScalarModal.vue2.js";
2
- import { useModal as s } from "./ScalarModal.vue2.js";
2
+ import { useModal as f } from "./ScalarModal.vue2.js";
3
3
  /* empty css */
4
4
  import r from "../../_virtual/_plugin-vue_export-helper.js";
5
- const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-f7e672e8"]]);
5
+ const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-3129528d"]]);
6
6
  export {
7
- f as default,
8
- s as useModal
7
+ p as default,
8
+ f as useModal
9
9
  };
@@ -1,6 +1,6 @@
1
- import { defineComponent as v, openBlock as l, createBlock as r, unref as a, withCtx as t, createElementVNode as x, normalizeClass as s, createVNode as i, normalizeStyle as b, createTextVNode as y, toDisplayString as g, createCommentVNode as d, createElementBlock as m, renderSlot as n, reactive as w } from "vue";
1
+ import { defineComponent as v, openBlock as l, createBlock as r, unref as a, withCtx as t, createElementVNode as x, normalizeClass as o, createVNode as i, normalizeStyle as b, createTextVNode as y, toDisplayString as g, createCommentVNode as d, createElementBlock as m, renderSlot as n, reactive as w } from "vue";
2
2
  import { Dialog as z, DialogPanel as k, DialogTitle as C, DialogDescription as D } from "@headlessui/vue";
3
- import { cva as c, cx as f } from "../../cva.js";
3
+ import { cva as c, cx as u } from "../../cva.js";
4
4
  import S from "../ScalarIconButton/ScalarIconButton.vue.js";
5
5
  const $ = {
6
6
  key: 0,
@@ -28,10 +28,10 @@ const M = /* @__PURE__ */ v({
28
28
  variant: {}
29
29
  },
30
30
  setup(N) {
31
- const p = c({
31
+ const f = c({
32
32
  base: [
33
33
  "scalar-modal",
34
- "col relative mx-auto mb-0 rounded-lg bg-b-2 p-0 text-left leading-snug text-c-1 opacity-0 md:w-[calc(100vw-16px)] lg:w-[calc(100vw-32px)]"
34
+ "col relative mx-auto mb-0 rounded-lg bg-b-1 p-0 text-left leading-snug text-c-1 opacity-0 md:w-[calc(100vw-16px)] lg:w-[calc(100vw-32px)]"
35
35
  ].join(" "),
36
36
  variants: {
37
37
  size: {
@@ -50,10 +50,10 @@ const M = /* @__PURE__ */ v({
50
50
  error: "scalar-modal-error"
51
51
  }
52
52
  }
53
- }), u = c({
53
+ }), p = c({
54
54
  base: [
55
55
  "scalar-modal-body",
56
- "relative m-1 max-h-[calc(100dvh-240px)] rounded-lg bg-b-1 p-3"
56
+ "relative max-h-[calc(100dvh-240px)] rounded-lg rounded-t-none border-t-1/2 bg-b-1 p-3"
57
57
  ].join(" "),
58
58
  variants: {
59
59
  variant: {
@@ -73,14 +73,14 @@ const M = /* @__PURE__ */ v({
73
73
  }
74
74
  }
75
75
  });
76
- return (e, o) => (l(), r(a(z), {
76
+ return (e, s) => (l(), r(a(z), {
77
77
  open: e.state.open,
78
- onClose: o[1] || (o[1] = (h) => e.state.hide())
78
+ onClose: s[1] || (s[1] = (h) => e.state.hide())
79
79
  }, {
80
80
  default: t(() => [
81
81
  x("div", {
82
- class: s(
83
- a(f)(
82
+ class: o(
83
+ a(u)(
84
84
  e.size === "full" ? "scalar-modal-layout-full" : "scalar-modal-layout",
85
85
  "fixed left-0 top-0 flex items-start justify-center",
86
86
  "z-[1001] h-[100dvh] w-[100dvw]",
@@ -90,13 +90,13 @@ const M = /* @__PURE__ */ v({
90
90
  )
91
91
  }, [
92
92
  i(a(k), {
93
- class: s(a(p)({ size: e.size, variant: e.variant })),
93
+ class: o(a(f)({ size: e.size, variant: e.variant })),
94
94
  style: b({ maxWidth: e.maxWidth })
95
95
  }, {
96
96
  default: t(() => [
97
97
  e.title ? (l(), r(a(C), {
98
98
  key: 0,
99
- class: s(["scalar-modal-header m-0 -mb-1 rounded-lg p-3 text-left text-sm font-medium text-c-1", { "pb-0 pt-6": e.variant === "history" }])
99
+ class: o(["scalar-modal-header m-0 -mb-1 rounded-lg p-3 text-left text-sm font-medium text-c-1", { "pb-0 pt-6": e.variant === "history" }])
100
100
  }, {
101
101
  default: t(() => [
102
102
  y(g(e.title), 1)
@@ -105,12 +105,12 @@ const M = /* @__PURE__ */ v({
105
105
  }, 8, ["class"])) : d("", !0),
106
106
  e.size === "full" ? (l(), m("div", {
107
107
  key: 1,
108
- class: s(e.bodyClass)
108
+ class: o(e.bodyClass)
109
109
  }, [
110
110
  n(e.$slots, "default", {}, void 0, !0)
111
111
  ], 2)) : (l(), r(a(D), {
112
112
  key: 2,
113
- class: s(a(f)(e.bodyClass, a(u)({ size: e.size, variant: e.variant })))
113
+ class: o(a(u)(e.bodyClass, a(p)({ size: e.size, variant: e.variant })))
114
114
  }, {
115
115
  default: t(() => [
116
116
  n(e.$slots, "default", {}, void 0, !0)
@@ -125,7 +125,7 @@ const M = /* @__PURE__ */ v({
125
125
  class: "hover:bg-b-3 focus:outline-none",
126
126
  icon: "Close",
127
127
  label: "Clear Search",
128
- onClose: o[0] || (o[0] = (h) => e.state.hide())
128
+ onClose: s[0] || (s[0] = (h) => e.state.hide())
129
129
  })
130
130
  ])) : d("", !0)
131
131
  ], 2)
@@ -32,7 +32,9 @@ declare const meta: {
32
32
  teleport?: (boolean | string) | undefined;
33
33
  }> & 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 () => {
34
34
  $slots: {
35
- default?(_: {}): any;
35
+ default?(_: {
36
+ open: any;
37
+ }): any;
36
38
  popover?(_: {
37
39
  close: () => any;
38
40
  }): any;
@@ -80,7 +82,9 @@ declare const meta: {
80
82
  teleport?: (boolean | string) | undefined;
81
83
  }> & 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 () => {
82
84
  $slots: {
83
- default?(_: {}): any;
85
+ default?(_: {
86
+ open: any;
87
+ }): any;
84
88
  popover?(_: {
85
89
  close: () => any;
86
90
  }): any;
@@ -119,7 +123,9 @@ declare const meta: {
119
123
  teleport?: (boolean | string) | undefined;
120
124
  }> & 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 () => {
121
125
  $slots: {
122
- default?(_: {}): any;
126
+ default?(_: {
127
+ open: any;
128
+ }): any;
123
129
  popover?(_: {
124
130
  close: () => any;
125
131
  }): any;
@@ -214,7 +220,9 @@ declare const meta: {
214
220
  teleport?: (boolean | string) | undefined;
215
221
  }> & 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 () => {
216
222
  $slots: {
217
- default?(_: {}): any;
223
+ default?(_: {
224
+ open: any;
225
+ }): any;
218
226
  popover?(_: {
219
227
  close: () => any;
220
228
  }): any;
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarPopover.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarPopover/ScalarPopover.stories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAKrD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiC4B,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":"ScalarPopover.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarPopover/ScalarPopover.stories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAKrD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiC4B,CAAA;AAEtC,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,IAAI,EAAE,KAAU,CAAA"}
@@ -3,7 +3,9 @@ type __VLS_Props = Omit<FloatingOptions, 'middleware'>;
3
3
  declare function __VLS_template(): {
4
4
  attrs: Partial<{}>;
5
5
  slots: {
6
- default?(_: {}): any;
6
+ default?(_: {
7
+ open: any;
8
+ }): any;
7
9
  popover?(_: {
8
10
  close: () => any;
9
11
  }): any;
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarPopover.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarPopover/ScalarPopover.vue"],"names":[],"mappings":"AAyCA,OAAO,EAAE,KAAK,eAAe,EAAkB,MAAM,mBAAmB,CAAA;AAKxE,KAAK,WAAW,GAAG,IAAI,CAAC,eAAe,EAAE,YAAY,CAAC,CAAC;AAUvD,iBAAS,cAAc;WA4FT,OAAO,IAA6B;;yBATpB,GAAG;;;YACH,GAAG;;;;EAahC;AAYD,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":"ScalarPopover.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarPopover/ScalarPopover.vue"],"names":[],"mappings":"AAyCA,OAAO,EAAE,KAAK,eAAe,EAAkB,MAAM,mBAAmB,CAAA;AAKxE,KAAK,WAAW,GAAG,IAAI,CAAC,eAAe,EAAE,YAAY,CAAC,CAAC;AAUvD,iBAAS,cAAc;WA4FT,OAAO,IAA6B;;;;YATpB,GAAG;;;YACH,GAAG;;;;EAahC;AAYD,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,4 +1,4 @@
1
- import { defineComponent as d, openBlock as m, createBlock as u, unref as o, withCtx as t, createVNode as r, mergeProps as p, renderSlot as s, createElementVNode as c } from "vue";
1
+ import { defineComponent as d, openBlock as m, createBlock as u, unref as o, withCtx as t, createVNode as r, mergeProps as p, renderSlot as a, createElementVNode as c } from "vue";
2
2
  import { Popover as g, PopoverPanel as v, PopoverButton as B } from "@headlessui/vue";
3
3
  import P from "../ScalarFloating/ScalarFloating.vue.js";
4
4
  const O = /* @__PURE__ */ d({
@@ -13,9 +13,9 @@ const O = /* @__PURE__ */ d({
13
13
  },
14
14
  setup(_) {
15
15
  return (e, l) => (m(), u(o(g), { as: "template" }, {
16
- default: t(({ open: a }) => [
16
+ default: t(({ open: s }) => [
17
17
  r(o(P), p(e.$props, {
18
- isOpen: a ?? e.isOpen,
18
+ isOpen: s ?? e.isOpen,
19
19
  teleport: e.teleport
20
20
  }), {
21
21
  floating: t(({ width: n, height: i }) => [
@@ -24,7 +24,7 @@ const O = /* @__PURE__ */ d({
24
24
  style: { width: n, height: i }
25
25
  }, e.$attrs), {
26
26
  default: t(({ close: f }) => [
27
- s(e.$slots, "popover", {
27
+ a(e.$slots, "popover", {
28
28
  close: () => f()
29
29
  }),
30
30
  l[0] || (l[0] = c("div", { class: "absolute inset-0 -z-1 rounded bg-b-1 shadow-lg brightness-lifted" }, null, -1))
@@ -35,10 +35,10 @@ const O = /* @__PURE__ */ d({
35
35
  default: t(() => [
36
36
  r(o(B), { as: "template" }, {
37
37
  default: t(() => [
38
- s(e.$slots, "default")
38
+ a(e.$slots, "default", { open: s })
39
39
  ]),
40
- _: 3
41
- })
40
+ _: 2
41
+ }, 1024)
42
42
  ]),
43
43
  _: 2
44
44
  }, 1040, ["isOpen", "teleport"])
package/dist/index.d.ts CHANGED
@@ -1,23 +1,23 @@
1
- import { ScalarButton } from './components/ScalarButton';
2
- import { ScalarCodeBlock } from './components/ScalarCodeBlock';
3
- import { ScalarCombobox, ScalarComboboxMultiselect, type ScalarComboboxOption } from './components/ScalarCombobox';
4
- import { ScalarContextMenu } from './components/ScalarContextMenu';
5
- import { ScalarDropdown, ScalarDropdownDivider, ScalarDropdownItem } from './components/ScalarDropdown';
6
- import { ScalarFloating } from './components/ScalarFloating';
7
- import { type Icon, ScalarIcon } from './components/ScalarIcon';
8
- import { ScalarIconButton } from './components/ScalarIconButton';
9
- import { ScalarListbox, type ScalarListboxOption } from './components/ScalarListbox';
10
- import { ScalarLoading, useLoadingState } from './components/ScalarLoading';
11
- import { ScalarMarkdown } from './components/ScalarMarkdown';
12
- import { type ModalState, ScalarModal, useModal } from './components/ScalarModal';
13
- import { ScalarPopover } from './components/ScalarPopover';
14
- import { ScalarSearchInput } from './components/ScalarSearchInput';
15
- import { ScalarSearchResultItem, ScalarSearchResultList } from './components/ScalarSearchResults';
16
- import { ScalarTextField } from './components/ScalarTextField';
17
- import { ScalarToggle } from './components/ScalarToggle';
18
- import { ScalarTooltip } from './components/ScalarTooltip';
19
- import { ScalarVirtualText } from './components/ScalarVirtualText';
20
1
  import './tailwind/tailwind.css';
2
+ export * from './components/ScalarButton';
3
+ export * from './components/ScalarCodeBlock';
4
+ export * from './components/ScalarCombobox';
5
+ export * from './components/ScalarContextMenu';
6
+ export * from './components/ScalarDropdown';
7
+ export * from './components/ScalarFloating';
8
+ export * from './components/ScalarIcon';
9
+ export * from './components/ScalarIconButton';
10
+ export * from './components/ScalarListbox';
11
+ export * from './components/ScalarLoading';
12
+ export * from './components/ScalarMarkdown';
13
+ export * from './components/ScalarModal';
14
+ export * from './components/ScalarMenu';
15
+ export * from './components/ScalarPopover';
16
+ export * from './components/ScalarSearchInput';
17
+ export * from './components/ScalarSearchResults';
18
+ export * from './components/ScalarTextField';
19
+ export * from './components/ScalarToggle';
20
+ export * from './components/ScalarTooltip';
21
+ export * from './components/ScalarVirtualText';
21
22
  export * from './helpers';
22
- export { ScalarButton, ScalarCodeBlock, ScalarCombobox, ScalarComboboxMultiselect, ScalarMarkdown, ScalarDropdown, ScalarDropdownDivider, ScalarDropdownItem, ScalarFloating, ScalarIcon, ScalarIconButton, ScalarListbox, ScalarLoading, ScalarContextMenu, ScalarModal, ScalarPopover, ScalarSearchInput, ScalarSearchResultItem, ScalarSearchResultList, ScalarTextField, ScalarToggle, ScalarTooltip, ScalarVirtualText, type Icon, type ScalarListboxOption, type ScalarComboboxOption, type ModalState, useLoadingState, useModal, };
23
23
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAC9D,OAAO,EACL,cAAc,EACd,yBAAyB,EACzB,KAAK,oBAAoB,EAC1B,MAAM,6BAA6B,CAAA;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,6BAA6B,CAAA;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAC5D,OAAO,EAAE,KAAK,IAAI,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAA;AAChE,OAAO,EACL,aAAa,EACb,KAAK,mBAAmB,EACzB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAC5D,OAAO,EACL,KAAK,UAAU,EACf,WAAW,EACX,QAAQ,EACT,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACvB,MAAM,kCAAkC,CAAA;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,yBAAyB,CAAA;AAEhC,cAAc,WAAW,CAAA;AAEzB,OAAO,EACL,YAAY,EACZ,eAAe,EACf,cAAc,EACd,yBAAyB,EACzB,cAAc,EACd,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,sBAAsB,EACtB,sBAAsB,EACtB,eAAe,EACf,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,KAAK,IAAI,EACT,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,UAAU,EACf,eAAe,EACf,QAAQ,GACT,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAA;AAEhC,cAAc,2BAA2B,CAAA;AACzC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,yBAAyB,CAAA;AACvC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,0BAA0B,CAAA;AACxC,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,kCAAkC,CAAA;AAChD,cAAc,8BAA8B,CAAA;AAC5C,cAAc,2BAA2B,CAAA;AACzC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,gCAAgC,CAAA;AAE9C,cAAc,WAAW,CAAA"}