@scalar/components 0.13.12 → 0.13.14

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 (83) hide show
  1. package/README.md +20 -0
  2. package/dist/components/ScalarColorModeToggle/ScalarColorModeToggle.stories.d.ts +9 -0
  3. package/dist/components/ScalarColorModeToggle/ScalarColorModeToggle.stories.d.ts.map +1 -0
  4. package/dist/components/ScalarColorModeToggle/ScalarColorModeToggle.test.d.ts +2 -0
  5. package/dist/components/ScalarColorModeToggle/ScalarColorModeToggle.test.d.ts.map +1 -0
  6. package/dist/components/ScalarColorModeToggle/ScalarColorModeToggle.vue.d.ts +24 -0
  7. package/dist/components/ScalarColorModeToggle/ScalarColorModeToggle.vue.d.ts.map +1 -0
  8. package/dist/components/ScalarColorModeToggle/ScalarColorModeToggle.vue.js +30 -0
  9. package/dist/components/ScalarColorModeToggle/ScalarColorModeToggle.vue2.js +4 -0
  10. package/dist/components/ScalarColorModeToggle/ScalarColorModeToggleButton.vue.d.ts +22 -0
  11. package/dist/components/ScalarColorModeToggle/ScalarColorModeToggleButton.vue.d.ts.map +1 -0
  12. package/dist/components/ScalarColorModeToggle/ScalarColorModeToggleButton.vue.js +41 -0
  13. package/dist/components/ScalarColorModeToggle/ScalarColorModeToggleButton.vue2.js +4 -0
  14. package/dist/components/ScalarColorModeToggle/ScalarColorModeToggleIcon.vue.d.ts +25 -0
  15. package/dist/components/ScalarColorModeToggle/ScalarColorModeToggleIcon.vue.d.ts.map +1 -0
  16. package/dist/components/ScalarColorModeToggle/ScalarColorModeToggleIcon.vue.js +7 -0
  17. package/dist/components/ScalarColorModeToggle/ScalarColorModeToggleIcon.vue2.js +32 -0
  18. package/dist/components/ScalarColorModeToggle/index.d.ts +4 -0
  19. package/dist/components/ScalarColorModeToggle/index.d.ts.map +1 -0
  20. package/dist/components/ScalarDropdown/ScalarDropdownButton.vue.d.ts +5 -6
  21. package/dist/components/ScalarDropdown/ScalarDropdownButton.vue.d.ts.map +1 -1
  22. package/dist/components/ScalarDropdown/ScalarDropdownButton.vue.js +2 -2
  23. package/dist/components/ScalarDropdown/ScalarDropdownButton.vue2.js +19 -17
  24. package/dist/components/ScalarDropdown/ScalarDropdownDivider.vue.js +7 -7
  25. package/dist/components/ScalarIcon/ScalarIcon.stories.d.ts +1 -1
  26. package/dist/components/ScalarIcon/icons/UserSwitch.svg.js +20 -0
  27. package/dist/components/ScalarIcon/icons/index.d.ts +1 -1
  28. package/dist/components/ScalarIcon/icons/index.d.ts.map +1 -1
  29. package/dist/components/ScalarIcon/icons/programming-language-dart.svg.js +16 -0
  30. package/dist/components/ScalarIcon/utils/index.js +154 -150
  31. package/dist/components/ScalarIconButton/ScalarIconButton.stories.d.ts +1 -1
  32. package/dist/components/ScalarMenu/ScalarMenu.stories.d.ts +12 -13
  33. package/dist/components/ScalarMenu/ScalarMenu.stories.d.ts.map +1 -1
  34. package/dist/components/ScalarMenu/ScalarMenu.vue.d.ts +1 -2
  35. package/dist/components/ScalarMenu/ScalarMenu.vue.d.ts.map +1 -1
  36. package/dist/components/ScalarMenu/ScalarMenu.vue.js +62 -59
  37. package/dist/components/ScalarMenu/ScalarMenuButton.vue.d.ts.map +1 -1
  38. package/dist/components/ScalarMenu/ScalarMenuButton.vue.js +15 -21
  39. package/dist/components/ScalarMenu/ScalarMenuLink.vue.d.ts +3 -0
  40. package/dist/components/ScalarMenu/ScalarMenuLink.vue.d.ts.map +1 -1
  41. package/dist/components/ScalarMenu/ScalarMenuLink.vue.js +31 -19
  42. package/dist/components/ScalarMenu/ScalarMenuProduct.vue.d.ts +3 -1
  43. package/dist/components/ScalarMenu/ScalarMenuProduct.vue.d.ts.map +1 -1
  44. package/dist/components/ScalarMenu/ScalarMenuProduct.vue.js +20 -18
  45. package/dist/components/ScalarMenu/ScalarMenuResources.vue.d.ts.map +1 -1
  46. package/dist/components/ScalarMenu/ScalarMenuResources.vue.js +21 -12
  47. package/dist/components/ScalarMenu/ScalarMenuSection.vue.d.ts +0 -1
  48. package/dist/components/ScalarMenu/ScalarMenuSection.vue.d.ts.map +1 -1
  49. package/dist/components/ScalarMenu/ScalarMenuSection.vue.js +9 -14
  50. package/dist/components/ScalarMenu/ScalarMenuTeamPicker.vue.d.ts +9 -5
  51. package/dist/components/ScalarMenu/ScalarMenuTeamPicker.vue.d.ts.map +1 -1
  52. package/dist/components/ScalarMenu/ScalarMenuTeamPicker.vue.js +97 -43
  53. package/dist/components/ScalarMenu/ScalarMenuTeamProfile.vue.d.ts +7 -0
  54. package/dist/components/ScalarMenu/ScalarMenuTeamProfile.vue.d.ts.map +1 -0
  55. package/dist/components/ScalarMenu/ScalarMenuTeamProfile.vue.js +39 -0
  56. package/dist/components/ScalarMenu/ScalarMenuTeamProfile.vue2.js +4 -0
  57. package/dist/components/ScalarMenu/index.d.ts +2 -0
  58. package/dist/components/ScalarMenu/index.d.ts.map +1 -1
  59. package/dist/components/ScalarMenu/types.d.ts +11 -4
  60. package/dist/components/ScalarMenu/types.d.ts.map +1 -1
  61. package/dist/components/ScalarModal/ScalarModal.vue.js +5 -5
  62. package/dist/components/ScalarModal/ScalarModal.vue2.js +1 -1
  63. package/dist/components/ScalarSidebar/ScalarSidebar.stories.d.ts +8 -0
  64. package/dist/components/ScalarSidebar/ScalarSidebar.stories.d.ts.map +1 -0
  65. package/dist/components/ScalarSidebar/ScalarSidebar.test.d.ts +2 -0
  66. package/dist/components/ScalarSidebar/ScalarSidebar.test.d.ts.map +1 -0
  67. package/dist/components/ScalarSidebar/ScalarSidebar.vue.d.ts +20 -0
  68. package/dist/components/ScalarSidebar/ScalarSidebar.vue.d.ts.map +1 -0
  69. package/dist/components/ScalarSidebar/ScalarSidebar.vue.js +18 -0
  70. package/dist/components/ScalarSidebar/ScalarSidebar.vue2.js +4 -0
  71. package/dist/components/ScalarSidebar/ScalarSidebarFooter.vue.d.ts +39 -0
  72. package/dist/components/ScalarSidebar/ScalarSidebarFooter.vue.d.ts.map +1 -0
  73. package/dist/components/ScalarSidebar/ScalarSidebarFooter.vue.js +31 -0
  74. package/dist/components/ScalarSidebar/ScalarSidebarFooter.vue2.js +4 -0
  75. package/dist/components/ScalarSidebar/index.d.ts +3 -0
  76. package/dist/components/ScalarSidebar/index.d.ts.map +1 -0
  77. package/dist/components/ScalarVirtualText/ScalarVirtualText.vue.d.ts.map +1 -1
  78. package/dist/components/ScalarVirtualText/ScalarVirtualText.vue.js +11 -11
  79. package/dist/index.d.ts +2 -0
  80. package/dist/index.d.ts.map +1 -1
  81. package/dist/index.js +100 -88
  82. package/dist/style.css +1 -1
  83. package/package.json +3 -3
@@ -1,67 +1,70 @@
1
- import { defineComponent as r, openBlock as a, createBlock as n, unref as m, mergeProps as p, withCtx as l, renderSlot as o, createVNode as t, createSlots as i, createElementVNode as f } from "vue";
2
- import c from "./ScalarMenuButton.vue.js";
3
- import $ from "./ScalarMenuProducts.vue.js";
4
- import d from "./ScalarMenuResources.vue.js";
5
- import u from "../ScalarPopover/ScalarPopover.vue.js";
6
- const b = { class: "custom-scroll flex flex-col gap-3 p-2.25" }, B = /* @__PURE__ */ r({
1
+ import { defineComponent as i, ref as m, openBlock as u, createBlock as d, unref as n, withCtx as t, createVNode as l, renderSlot as e, createSlots as $, mergeProps as c } from "vue";
2
+ import { DropdownMenu as r } from "radix-vue/namespaced";
3
+ import _ from "./ScalarMenuButton.vue.js";
4
+ import g from "./ScalarMenuProducts.vue.js";
5
+ import v from "./ScalarMenuResources.vue.js";
6
+ import b from "../ScalarDropdown/ScalarDropdownMenu.vue.js";
7
+ const M = /* @__PURE__ */ i({
8
+ inheritAttrs: !1,
7
9
  __name: "ScalarMenu",
8
- props: {
9
- placement: {},
10
- resize: { type: Boolean },
11
- target: {},
12
- middleware: {},
13
- teleport: { type: [Boolean, String] }
14
- },
15
- setup(_) {
16
- return (e, g) => (a(), n(m(u), p(e.$props, {
17
- class: "max-h-[inherit] w-[280px] max-w-[inherit]",
18
- placement: e.placement ?? "bottom-start"
19
- }), {
20
- default: l(({ open: s }) => [
21
- o(e.$slots, "button", { open: s }, () => [
22
- t(c, {
23
- class: "min-w-0",
24
- open: s
25
- }, i({ _: 2 }, [
26
- e.$slots.logo ? {
27
- name: "logo",
28
- fn: l(() => [
29
- o(e.$slots, "logo")
30
- ]),
31
- key: "0"
32
- } : void 0,
33
- e.$slots.label ? {
34
- name: "label",
35
- fn: l(() => [
36
- o(e.$slots, "label")
37
- ]),
38
- key: "1"
39
- } : void 0,
40
- e.$slots["sr-label"] ? {
41
- name: "sr-label",
42
- fn: l(() => [
43
- o(e.$slots, "sr-label")
44
- ]),
45
- key: "2"
46
- } : void 0
47
- ]), 1032, ["open"])
48
- ])
49
- ]),
50
- popover: l(({ close: s }) => [
51
- f("div", b, [
52
- o(e.$slots, "products", { close: s }, () => [
53
- t($)
10
+ setup(k) {
11
+ const s = m(!1);
12
+ function a() {
13
+ s.value = !1;
14
+ }
15
+ return (o, f) => (u(), d(n(r).Root, {
16
+ open: s.value,
17
+ "onUpdate:open": f[0] || (f[0] = (p) => s.value = p)
18
+ }, {
19
+ default: t(() => [
20
+ l(n(r).Trigger, { asChild: "" }, {
21
+ default: t(() => [
22
+ e(o.$slots, "button", { open: s.value }, () => [
23
+ l(_, {
24
+ class: "min-w-0",
25
+ open: s.value
26
+ }, $({ _: 2 }, [
27
+ o.$slots.logo ? {
28
+ name: "logo",
29
+ fn: t(() => [
30
+ e(o.$slots, "logo")
31
+ ]),
32
+ key: "0"
33
+ } : void 0,
34
+ o.$slots.label ? {
35
+ name: "label",
36
+ fn: t(() => [
37
+ e(o.$slots, "label")
38
+ ]),
39
+ key: "1"
40
+ } : void 0
41
+ ]), 1032, ["open"])
42
+ ])
43
+ ]),
44
+ _: 3
45
+ }),
46
+ l(n(r).Content, c({
47
+ align: "start",
48
+ as: n(b),
49
+ class: "max-h-radix-popper",
50
+ sideOffset: 5
51
+ }, o.$attrs), {
52
+ default: t(() => [
53
+ e(o.$slots, "products", { close: a }, () => [
54
+ l(g)
55
+ ]),
56
+ e(o.$slots, "profile", { close: a }),
57
+ e(o.$slots, "sections", { close: a }, () => [
58
+ l(v)
59
+ ])
54
60
  ]),
55
- o(e.$slots, "profile", { close: s }),
56
- o(e.$slots, "sections", { close: s }, () => [
57
- t(d)
58
- ])
59
- ])
61
+ _: 3
62
+ }, 16, ["as"])
60
63
  ]),
61
64
  _: 3
62
- }, 16, ["placement"]));
65
+ }, 8, ["open"]));
63
66
  }
64
67
  });
65
68
  export {
66
- B as default
69
+ M as default
67
70
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarMenuButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarMenu/ScalarMenuButton.vue"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,+BAA+B,CAAA;AAiBtC,iBAAS,cAAc;WAwET,OAAO,IAA6B;;;;EAKjD;AAUD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,sTAOnB,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":"ScalarMenuButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarMenu/ScalarMenuButton.vue"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,+BAA+B,CAAA;AAiBtC,iBAAS,cAAc;WAiET,OAAO,IAA6B;;;;EAKjD;AAUD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,sTAOnB,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,33 +1,27 @@
1
- import { defineComponent as a, openBlock as n, createBlock as c, unref as o, withCtx as p, createElementVNode as s, renderSlot as t, createVNode as r, createElementBlock as i, createCommentVNode as m, createTextVNode as u, toDisplayString as d } from "vue";
2
- import _ from "../ScalarHeader/ScalarHeaderButton.vue.js";
3
- import l from "../ScalarIcon/ScalarIcon.vue.js";
4
- const h = { class: "h-5 w-auto" }, f = {
5
- key: 0,
6
- class: "ml-0.75 truncate"
7
- }, C = { class: "sr-only" }, b = /* @__PURE__ */ a({
1
+ import { defineComponent as a, openBlock as l, createBlock as c, unref as e, withCtx as p, createElementVNode as n, renderSlot as t, createVNode as r, createTextVNode as i, toDisplayString as u } from "vue";
2
+ import m from "../ScalarHeader/ScalarHeaderButton.vue.js";
3
+ import s from "../ScalarIcon/ScalarIcon.vue.js";
4
+ const d = { class: "h-5 w-auto" }, _ = { class: "sr-only" }, B = /* @__PURE__ */ a({
8
5
  __name: "ScalarMenuButton",
9
6
  props: {
10
7
  open: { type: Boolean }
11
8
  },
12
- setup(g) {
13
- return (e, k) => (n(), c(o(_), { class: "gap-0.5 px-2" }, {
9
+ setup(f) {
10
+ return (o, h) => (l(), c(e(m), { class: "gap-0.5 px-2" }, {
14
11
  default: p(() => [
15
- s("div", h, [
16
- t(e.$slots, "logo", {}, () => [
17
- r(o(l), { icon: "Logo" })
12
+ n("div", d, [
13
+ t(o.$slots, "logo", {}, () => [
14
+ r(e(s), { icon: "Logo" })
18
15
  ])
19
16
  ]),
20
- e.$slots.label ? (n(), i("div", f, [
21
- t(e.$slots, "label")
22
- ])) : m("", !0),
23
- s("span", C, [
24
- t(e.$slots, "sr-label", {}, () => [
25
- u(d(e.open ? "Close Menu" : "Open Menu"), 1)
17
+ n("span", _, [
18
+ t(o.$slots, "label", {}, () => [
19
+ i(u(o.open ? "Close Menu" : "Open Menu"), 1)
26
20
  ])
27
21
  ]),
28
- r(o(l), {
22
+ r(e(s), {
29
23
  class: "shrink-0 text-c-3 group-hover/button:text-c-1",
30
- icon: e.open ? "ChevronUp" : "ChevronDown",
24
+ icon: o.open ? "ChevronUp" : "ChevronDown",
31
25
  size: "md"
32
26
  }, null, 8, ["icon"])
33
27
  ]),
@@ -36,5 +30,5 @@ const h = { class: "h-5 w-auto" }, f = {
36
30
  }
37
31
  });
38
32
  export {
39
- b as default
33
+ B as default
40
34
  };
@@ -1,6 +1,9 @@
1
1
  import type { Component } from 'vue';
2
+ import { type Icon } from '../ScalarIcon';
2
3
  type __VLS_Props = {
3
4
  is?: string | Component;
5
+ icon?: Icon;
6
+ strong?: boolean;
4
7
  };
5
8
  declare function __VLS_template(): {
6
9
  attrs: Partial<{}>;
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarMenuLink.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarMenu/ScalarMenuLink.vue"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAMpC,KAAK,WAAW,GAAG;IACjB,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CACxB,CAAC;AAWF,iBAAS,cAAc;WA+CT,OAAO,IAA6B;;yBARrB,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":"ScalarMenuLink.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarMenu/ScalarMenuLink.vue"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAGpC,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,eAAe,CAAA;AAIrD,KAAK,WAAW,GAAG;IACjB,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACvB,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAC;AASF,iBAAS,cAAc;WA0DT,OAAO,IAA6B;;yBARpB,GAAG;;;;EAahC;AAUD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAOnB,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,28 +1,40 @@
1
- import { defineComponent as o, openBlock as n, createBlock as r, resolveDynamicComponent as i, mergeProps as s, unref as p, withCtx as u, renderSlot as a } from "vue";
2
- import { useBindCx as l } from "../../hooks/useBindCx.js";
3
- const x = /* @__PURE__ */ o({
4
- inheritAttrs: !1,
1
+ import { defineComponent as r, openBlock as o, createBlock as n, unref as s, withCtx as a, normalizeClass as t, createElementBlock as i, createElementVNode as l, renderSlot as c } from "vue";
2
+ import { DropdownMenu as m } from "radix-vue/namespaced";
3
+ import f from "../ScalarDropdown/ScalarDropdownButton.vue.js";
4
+ import p from "../ScalarIcon/ScalarIcon.vue.js";
5
+ const d = {
6
+ key: 1,
7
+ class: "size-3"
8
+ }, _ = /* @__PURE__ */ r({
5
9
  __name: "ScalarMenuLink",
6
10
  props: {
7
- is: {}
11
+ is: { default: () => m.Item },
12
+ icon: {},
13
+ strong: { type: Boolean }
8
14
  },
9
- setup(c) {
10
- const { cx: t } = l();
11
- return (e, d) => (n(), r(i(e.is ?? "a"), s(
12
- {
13
- type: e.is === "button" ? "button" : void 0
14
- },
15
- p(t)(
16
- "relative flex cursor-pointer rounded px-2.5 py-1 font-medium leading text-c-2 no-underline hover:bg-b-2 focus:text-c-1"
17
- )
18
- ), {
19
- default: u(() => [
20
- a(e.$slots, "default")
15
+ setup(u) {
16
+ return (e, k) => (o(), n(s(f), {
17
+ is: e.is,
18
+ as: "a"
19
+ }, {
20
+ default: a(() => [
21
+ e.icon ? (o(), n(s(p), {
22
+ key: 0,
23
+ class: t(e.strong ? "text-c-1" : "text-c-2"),
24
+ icon: e.icon,
25
+ size: "xs",
26
+ thickness: e.strong ? "2.5" : "2"
27
+ }, null, 8, ["class", "icon", "thickness"])) : (o(), i("div", d)),
28
+ l("div", {
29
+ class: t(["flex items-center flex-1", e.strong ? "font-medium" : "font-normal"])
30
+ }, [
31
+ c(e.$slots, "default")
32
+ ], 2)
21
33
  ]),
22
34
  _: 3
23
- }, 16, ["type"]));
35
+ }, 8, ["is"]));
24
36
  }
25
37
  });
26
38
  export {
27
- x as default
39
+ _ as default
28
40
  };
@@ -1,5 +1,7 @@
1
- import { type Icon } from '../../index.js';
1
+ import type { Component } from 'vue';
2
+ import type { Icon } from '../../index.js';
2
3
  type __VLS_Props = {
4
+ is?: string | Component;
3
5
  selected?: boolean;
4
6
  icon: Icon;
5
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarMenuProduct.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarMenu/ScalarMenuProduct.vue"],"names":[],"mappings":"AAoCA,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,QAAQ,CAAA;AAM9C,KAAK,WAAW,GAAG;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,EAAE,IAAI,CAAA;CACX,CAAC;AAqBF,iBAAS,cAAc;WA0CT,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":"AAuCA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAEpC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAOlC,KAAK,WAAW,GAAG;IACjB,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,EAAE,IAAI,CAAA;CACX,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,17 +1,18 @@
1
- import { defineComponent as t, openBlock as s, createElementBlock as a, mergeProps as c, unref as o, createVNode as l, createElementVNode as i, renderSlot as d } from "vue";
1
+ import { defineComponent as n, openBlock as s, createBlock as a, unref as r, mergeProps as i, withCtx as c, renderSlot as l } from "vue";
2
2
  import { cva as p } from "../../cva.js";
3
- import { useBindCx as m } from "../../hooks/useBindCx.js";
4
- import f from "../ScalarIcon/ScalarIcon.vue.js";
5
- const u = { class: "font-medium" }, x = /* @__PURE__ */ t({
3
+ import { useBindCx as d } from "../../hooks/useBindCx.js";
4
+ import f from "./ScalarMenuLink.vue.js";
5
+ const h = /* @__PURE__ */ n({
6
6
  inheritAttrs: !1,
7
7
  __name: "ScalarMenuProduct",
8
8
  props: {
9
+ is: { default: "a" },
9
10
  selected: { type: Boolean },
10
11
  icon: {}
11
12
  },
12
- setup(b) {
13
- const { cx: r } = m(), n = p({
14
- base: "relative flex min-w-0 flex-1 items-center gap-2 overflow-hidden rounded px-2 py-1.5 leading no-underline flex-row",
13
+ setup(m) {
14
+ const { cx: o } = d(), t = p({
15
+ base: "gap-1.5",
15
16
  variants: {
16
17
  selected: {
17
18
  true: "pointer-events-none bg-b-2 dark:bg-b-3",
@@ -19,18 +20,19 @@ const u = { class: "font-medium" }, x = /* @__PURE__ */ t({
19
20
  }
20
21
  }
21
22
  });
22
- return (e, g) => (s(), a("a", c({ target: "_blank" }, o(r)(o(n)({ selected: e.selected }))), [
23
- l(o(f), {
24
- icon: e.icon,
25
- size: "xs",
26
- thickness: "2.5"
27
- }, null, 8, ["icon"]),
28
- i("span", u, [
29
- d(e.$slots, "default")
30
- ])
31
- ], 16));
23
+ return (e, u) => (s(), a(r(f), i({
24
+ is: e.is,
25
+ icon: e.icon,
26
+ strong: "",
27
+ target: "_blank"
28
+ }, r(o)(r(t)({ selected: e.selected }))), {
29
+ default: c(() => [
30
+ l(e.$slots, "default")
31
+ ]),
32
+ _: 3
33
+ }, 16, ["is", "icon"]));
32
34
  }
33
35
  });
34
36
  export {
35
- x as default
37
+ h as default
36
38
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarMenuResources.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarMenu/ScalarMenuResources.vue"],"names":[],"mappings":";AA+GA,wBAMG"}
1
+ {"version":3,"file":"ScalarMenuResources.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarMenu/ScalarMenuResources.vue"],"names":[],"mappings":";AAsHA,wBAMG"}
@@ -1,31 +1,40 @@
1
- import { defineComponent as s, openBlock as l, createBlock as n, withCtx as r, createTextVNode as e, createVNode as o } from "vue";
1
+ import { defineComponent as n, openBlock as l, createBlock as i, withCtx as o, createTextVNode as e, createVNode as r } from "vue";
2
2
  import a from "./ScalarMenuLink.vue.js";
3
- import i from "./ScalarMenuSection.vue.js";
4
- const d = /* @__PURE__ */ s({
3
+ import s from "./ScalarMenuSection.vue.js";
4
+ const d = /* @__PURE__ */ n({
5
5
  __name: "ScalarMenuResources",
6
6
  setup(m) {
7
- return (f, t) => (l(), n(i, null, {
8
- title: r(() => t[0] || (t[0] = [
7
+ return (c, t) => (l(), i(s, null, {
8
+ title: o(() => t[0] || (t[0] = [
9
9
  e("Resources")
10
10
  ])),
11
- default: r(() => [
12
- o(a, {
11
+ default: o(() => [
12
+ r(a, {
13
13
  href: "mailto:marc@scalar.com",
14
+ icon: "Email",
14
15
  target: "_blank"
15
16
  }, {
16
- default: r(() => t[1] || (t[1] = [
17
+ default: o(() => t[1] || (t[1] = [
17
18
  e(" Sales & Support ")
18
19
  ])),
19
20
  _: 1
20
21
  }),
21
- o(a, { href: "https://scalar.com/terms-and-conditions" }, {
22
- default: r(() => t[2] || (t[2] = [
22
+ r(a, {
23
+ href: "https://scalar.com/terms-and-conditions",
24
+ icon: "DocsPage",
25
+ target: "_blank"
26
+ }, {
27
+ default: o(() => t[2] || (t[2] = [
23
28
  e(" Terms & Conditions ")
24
29
  ])),
25
30
  _: 1
26
31
  }),
27
- o(a, { href: "https://scalar.com/privacy-policy" }, {
28
- default: r(() => t[3] || (t[3] = [
32
+ r(a, {
33
+ href: "https://scalar.com/privacy-policy",
34
+ icon: "Changelog",
35
+ target: "_blank"
36
+ }, {
37
+ default: o(() => t[3] || (t[3] = [
29
38
  e(" Privacy Policy ")
30
39
  ])),
31
40
  _: 1
@@ -1,7 +1,6 @@
1
1
  declare function __VLS_template(): {
2
2
  attrs: Partial<{}>;
3
3
  slots: {
4
- title?(_: {}): any;
5
4
  default?(_: {}): any;
6
5
  };
7
6
  refs: {};
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarMenuSection.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarMenu/ScalarMenuSection.vue"],"names":[],"mappings":"AA8BA,iBAAS,cAAc;WA6CT,OAAO,IAA6B;;uBATvB,GAAG;yBACD,GAAG;;;;EAa/B;AAQD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,+QAKnB,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"}
1
+ {"version":3,"file":"ScalarMenuSection.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarMenu/ScalarMenuSection.vue"],"names":[],"mappings":"AAsBA,iBAAS,cAAc;WAuCT,OAAO,IAA6B;;yBARrB,GAAG;;;;EAa/B;AAQD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,+QAKnB,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"}
@@ -1,20 +1,15 @@
1
- import { defineComponent as s, openBlock as l, createElementBlock as r, normalizeProps as c, guardReactiveProps as a, unref as i, createElementVNode as t, renderSlot as o } from "vue";
2
- import { useBindCx as d } from "../../hooks/useBindCx.js";
3
- const f = { class: "px-2.5 font-medium leading text-c-3" }, m = { class: "flex flex-col" }, h = /* @__PURE__ */ s({
1
+ import { defineComponent as r, openBlock as t, createElementBlock as n, Fragment as o, createVNode as a, unref as l, renderSlot as c } from "vue";
2
+ import i from "../ScalarDropdown/ScalarDropdownDivider.vue.js";
3
+ const u = /* @__PURE__ */ r({
4
4
  inheritAttrs: !1,
5
5
  __name: "ScalarMenuSection",
6
- setup(p) {
7
- const { cx: n } = d();
8
- return (e, u) => (l(), r("div", c(a(i(n)("flex flex-col gap-1.5"))), [
9
- t("div", f, [
10
- o(e.$slots, "title")
11
- ]),
12
- t("div", m, [
13
- o(e.$slots, "default")
14
- ])
15
- ], 16));
6
+ setup(m) {
7
+ return (e, p) => (t(), n(o, null, [
8
+ a(l(i)),
9
+ c(e.$slots, "default")
10
+ ], 64));
16
11
  }
17
12
  });
18
13
  export {
19
- h as default
14
+ u as default
20
15
  };
@@ -1,12 +1,16 @@
1
- import { type ScalarListboxOption } from '../../index.js';
1
+ import { type ScalarMenuTeamOption } from '.';
2
2
  type __VLS_Props = {
3
- team?: ScalarListboxOption | undefined;
4
- teams: ScalarListboxOption[];
3
+ /** The currently selected team */
4
+ team?: ScalarMenuTeamOption | undefined;
5
+ /** The list of teams to choose from */
6
+ teams: ScalarMenuTeamOption[];
5
7
  };
6
8
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
7
- "update:team": (value: ScalarListboxOption | undefined) => any;
9
+ add: () => any;
10
+ "update:team": (value: ScalarMenuTeamOption | undefined) => any;
8
11
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
9
- "onUpdate:team"?: ((value: ScalarListboxOption | undefined) => any) | undefined;
12
+ onAdd?: (() => any) | undefined;
13
+ "onUpdate:team"?: ((value: ScalarMenuTeamOption | undefined) => any) | undefined;
10
14
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
15
  export default _default;
12
16
  //# sourceMappingURL=ScalarMenuTeamPicker.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarMenuTeamPicker.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarMenu/ScalarMenuTeamPicker.vue"],"names":[],"mappings":"AAmDA,OAAO,EAIL,KAAK,mBAAmB,EACzB,MAAM,OAAO,CAAA;AAKd,KAAK,WAAW,GAAG;IACjB,IAAI,CAAC,EAAE,mBAAmB,GAAG,SAAS,CAAA;IACtC,KAAK,EAAE,mBAAmB,EAAE,CAAA;CAC7B,CAAC;;;;;;AA0GF,wBAOG"}
1
+ {"version":3,"file":"ScalarMenuTeamPicker.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarMenu/ScalarMenuTeamPicker.vue"],"names":[],"mappings":"AAkGA,OAAO,EAAkB,KAAK,oBAAoB,EAAE,MAAM,IAAI,CAAA;AAK9D,KAAK,WAAW,GAAG;IACjB,kCAAkC;IAClC,IAAI,CAAC,EAAE,oBAAoB,GAAG,SAAS,CAAA;IACvC,uCAAuC;IACvC,KAAK,EAAE,oBAAoB,EAAE,CAAA;CAC9B,CAAC;;;;;;;;AAwLF,wBAOG"}
@@ -1,53 +1,107 @@
1
- import { defineComponent as d, computed as u, openBlock as f, createElementBlock as x, normalizeProps as _, guardReactiveProps as v, unref as o, createVNode as a, withCtx as s, createElementVNode as h, toDisplayString as V } from "vue";
2
- import { useBindCx as g } from "../../hooks/useBindCx.js";
3
- import C from "../ScalarListbox/ScalarListbox.vue.js";
4
- import b from "../ScalarButton/ScalarButton.vue.js";
5
- import k from "../ScalarIcon/ScalarIcon.vue.js";
6
- const w = { class: "truncate" }, D = /* @__PURE__ */ d({
1
+ import { defineComponent as g, computed as b, openBlock as n, createBlock as u, unref as e, withCtx as o, createVNode as a, mergeProps as v, createElementVNode as k, createElementBlock as x, Fragment as C, renderList as S, createTextVNode as w } from "vue";
2
+ import { DropdownMenu as m } from "radix-vue/namespaced";
3
+ import V from "./ScalarMenuTeamProfile.vue.js";
4
+ import $ from "./ScalarMenuLink.vue.js";
5
+ import B from "../ScalarDropdown/ScalarDropdownMenu.vue.js";
6
+ import p from "../ScalarDropdown/ScalarDropdownButton.vue.js";
7
+ import I from "../ScalarListbox/ScalarListboxCheckbox.vue.js";
8
+ import f from "../ScalarIcon/ScalarIcon.vue.js";
9
+ const M = /* @__PURE__ */ g({
7
10
  inheritAttrs: !1,
8
11
  __name: "ScalarMenuTeamPicker",
9
12
  props: {
10
13
  team: {},
11
14
  teams: {}
12
15
  },
13
- emits: ["update:team"],
14
- setup(r, { emit: l }) {
15
- const i = r, p = l, n = u({
16
- get: () => i.team,
17
- set: (e) => p("update:team", e)
18
- }), { cx: c } = g();
19
- return (e, m) => (f(), x("div", _(v(o(c)("flex flex-col pb-px"))), [
20
- a(o(C), {
21
- modelValue: n.value,
22
- "onUpdate:modelValue": m[0] || (m[0] = (t) => n.value = t),
23
- options: e.teams,
24
- placement: "bottom-end",
25
- resize: ""
26
- }, {
27
- default: s(() => [
28
- a(o(b), {
29
- class: "h-auto px-2.5 py-1 text-xs leading shadow-none",
30
- variant: "outlined"
31
- }, {
32
- default: s(() => {
33
- var t;
34
- return [
35
- h("div", w, V((t = e.team) == null ? void 0 : t.label), 1),
36
- a(o(k), {
37
- class: "ml-auto text-c-2",
38
- icon: "ChevronDown",
39
- size: "sm"
40
- })
41
- ];
42
- }),
43
- _: 1
44
- })
45
- ]),
46
- _: 1
47
- }, 8, ["modelValue", "options"])
48
- ], 16));
16
+ emits: ["update:team", "add"],
17
+ setup(c, { emit: _ }) {
18
+ const i = c, d = _, s = b({
19
+ get: () => {
20
+ var r;
21
+ return (r = i.team) == null ? void 0 : r.id;
22
+ },
23
+ set: (r) => d(
24
+ "update:team",
25
+ i.teams.find((t) => t.id === r)
26
+ )
27
+ });
28
+ return (r, t) => (n(), u(e(m).Sub, null, {
29
+ default: o(() => [
30
+ a(e($), v({
31
+ is: e(m).SubTrigger,
32
+ icon: "UserSwitch"
33
+ }, r.$attrs), {
34
+ default: o(() => [
35
+ t[2] || (t[2] = k("div", null, "Change team", -1)),
36
+ a(e(f), {
37
+ class: "ml-auto text-c-2 -mr-0.25",
38
+ icon: "ChevronRight",
39
+ size: "sm"
40
+ })
41
+ ]),
42
+ _: 1
43
+ }, 16, ["is"]),
44
+ a(e(m).Portal, null, {
45
+ default: o(() => [
46
+ a(e(m).SubContent, {
47
+ as: e(B),
48
+ class: "max-h-radix-popper",
49
+ sideOffset: 3
50
+ }, {
51
+ default: o(() => [
52
+ a(e(m).RadioGroup, {
53
+ modelValue: s.value,
54
+ "onUpdate:modelValue": t[0] || (t[0] = (l) => s.value = l),
55
+ as: "template"
56
+ }, {
57
+ default: o(() => [
58
+ (n(!0), x(C, null, S(r.teams, (l) => (n(), u(e(m).RadioItem, {
59
+ key: l.id,
60
+ as: e(p),
61
+ class: "group/item",
62
+ value: l.id
63
+ }, {
64
+ default: o(() => [
65
+ a(V, {
66
+ class: "-ml-0.75 flex-1 min-w-0",
67
+ label: l.label,
68
+ src: l.src
69
+ }, null, 8, ["label", "src"]),
70
+ a(e(I), {
71
+ class: "ml-auto",
72
+ selected: l.id === s.value
73
+ }, null, 8, ["selected"])
74
+ ]),
75
+ _: 2
76
+ }, 1032, ["as", "value"]))), 128))
77
+ ]),
78
+ _: 1
79
+ }, 8, ["modelValue"]),
80
+ a(e(m).Item, {
81
+ as: e(p),
82
+ onClick: t[1] || (t[1] = (l) => d("add"))
83
+ }, {
84
+ default: o(() => [
85
+ a(e(f), {
86
+ class: "bg-b-3 -ml-0.75 rounded p-0.75 size-5 text-c-3",
87
+ icon: "Add",
88
+ thickness: "1.75"
89
+ }),
90
+ t[3] || (t[3] = w(" Create new team "))
91
+ ]),
92
+ _: 1
93
+ }, 8, ["as"])
94
+ ]),
95
+ _: 1
96
+ }, 8, ["as"])
97
+ ]),
98
+ _: 1
99
+ })
100
+ ]),
101
+ _: 1
102
+ }));
49
103
  }
50
104
  });
51
105
  export {
52
- D as default
106
+ M as default
53
107
  };