@scalar/components 0.13.19 → 0.13.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/components/ScalarCombobox/ScalarCombobox.stories.d.ts +5 -4
  2. package/dist/components/ScalarCombobox/ScalarCombobox.stories.d.ts.map +1 -1
  3. package/dist/components/ScalarCombobox/ScalarCombobox.vue.d.ts +4 -4
  4. package/dist/components/ScalarCombobox/ScalarCombobox.vue.d.ts.map +1 -1
  5. package/dist/components/ScalarCombobox/ScalarCombobox.vue.js +14 -13
  6. package/dist/components/ScalarCombobox/ScalarComboboxMultiselect.vue.d.ts +2 -5
  7. package/dist/components/ScalarCombobox/ScalarComboboxMultiselect.vue.d.ts.map +1 -1
  8. package/dist/components/ScalarCombobox/ScalarComboboxMultiselect.vue.js +37 -26
  9. package/dist/components/ScalarCombobox/ScalarComboboxOptions.vue.d.ts +2 -13
  10. package/dist/components/ScalarCombobox/ScalarComboboxOptions.vue.d.ts.map +1 -1
  11. package/dist/components/ScalarCombobox/ScalarComboboxOptions.vue.js +1 -1
  12. package/dist/components/ScalarCombobox/ScalarComboboxPopover.vue.d.ts.map +1 -1
  13. package/dist/components/ScalarCombobox/ScalarComboboxPopover.vue.js +34 -30
  14. package/dist/components/ScalarCombobox/types.d.ts +9 -0
  15. package/dist/components/ScalarCombobox/types.d.ts.map +1 -1
  16. package/dist/components/ScalarMenu/ScalarMenu.vue.d.ts.map +1 -1
  17. package/dist/components/ScalarMenu/ScalarMenu.vue.js +9 -9
  18. package/dist/components/ScalarSidebar/ScalarSidebar.stories.d.ts +3 -2
  19. package/dist/components/ScalarSidebar/ScalarSidebar.stories.d.ts.map +1 -1
  20. package/dist/components/ScalarSidebar/ScalarSidebarButton.vue.d.ts +31 -0
  21. package/dist/components/ScalarSidebar/ScalarSidebarButton.vue.d.ts.map +1 -0
  22. package/dist/components/ScalarSidebar/ScalarSidebarButton.vue.js +63 -0
  23. package/dist/components/ScalarSidebar/ScalarSidebarButton.vue2.js +4 -0
  24. package/dist/components/ScalarSidebar/ScalarSidebarGroup.test.d.ts +2 -0
  25. package/dist/components/ScalarSidebar/ScalarSidebarGroup.test.d.ts.map +1 -0
  26. package/dist/components/ScalarSidebar/ScalarSidebarGroup.vue.d.ts +50 -0
  27. package/dist/components/ScalarSidebar/ScalarSidebarGroup.vue.d.ts.map +1 -0
  28. package/dist/components/ScalarSidebar/ScalarSidebarGroup.vue.js +47 -0
  29. package/dist/components/ScalarSidebar/ScalarSidebarGroup.vue2.js +4 -0
  30. package/dist/components/ScalarSidebar/ScalarSidebarGroupToggle.vue.d.ts +50 -0
  31. package/dist/components/ScalarSidebar/ScalarSidebarGroupToggle.vue.d.ts.map +1 -0
  32. package/dist/components/ScalarSidebar/ScalarSidebarGroupToggle.vue.js +39 -0
  33. package/dist/components/ScalarSidebar/ScalarSidebarGroupToggle.vue2.js +4 -0
  34. package/dist/components/ScalarSidebar/ScalarSidebarItem.vue.d.ts +27 -0
  35. package/dist/components/ScalarSidebar/ScalarSidebarItem.vue.d.ts.map +1 -0
  36. package/dist/components/ScalarSidebar/ScalarSidebarItem.vue.js +34 -0
  37. package/dist/components/ScalarSidebar/ScalarSidebarItem.vue2.js +4 -0
  38. package/dist/components/ScalarSidebar/ScalarSidebarItems.vue.d.ts +28 -0
  39. package/dist/components/ScalarSidebar/ScalarSidebarItems.vue.d.ts.map +1 -0
  40. package/dist/components/ScalarSidebar/ScalarSidebarItems.vue.js +22 -0
  41. package/dist/components/ScalarSidebar/ScalarSidebarItems.vue2.js +4 -0
  42. package/dist/components/ScalarSidebar/index.d.ts +5 -0
  43. package/dist/components/ScalarSidebar/index.d.ts.map +1 -1
  44. package/dist/components/ScalarSidebar/types.d.ts +25 -0
  45. package/dist/components/ScalarSidebar/types.d.ts.map +1 -0
  46. package/dist/components/ScalarSidebar/useSidebarGroups.d.ts +25 -0
  47. package/dist/components/ScalarSidebar/useSidebarGroups.d.ts.map +1 -0
  48. package/dist/components/ScalarSidebar/useSidebarGroups.js +11 -0
  49. package/dist/components/ScalarSidebar/useSidebarGroups.test.d.ts +2 -0
  50. package/dist/components/ScalarSidebar/useSidebarGroups.test.d.ts.map +1 -0
  51. package/dist/index.js +95 -85
  52. package/dist/style.css +1 -1
  53. package/package.json +3 -3
@@ -40,20 +40,20 @@ declare const meta: {
40
40
  default(props: {
41
41
  open: boolean;
42
42
  }): import("vue").Slot;
43
- before(props: {
43
+ before?(props: {
44
44
  open: boolean;
45
45
  }): import("vue").Slot;
46
- after(props: {
46
+ after?(props: {
47
47
  open: boolean;
48
48
  }): import("vue").Slot;
49
49
  }> & {
50
50
  default(props: {
51
51
  open: boolean;
52
52
  }): import("vue").Slot;
53
- before(props: {
53
+ before?(props: {
54
54
  open: boolean;
55
55
  }): import("vue").Slot;
56
- after(props: {
56
+ after?(props: {
57
57
  open: boolean;
58
58
  }): import("vue").Slot;
59
59
  };
@@ -78,6 +78,7 @@ export declare const Base: Story;
78
78
  export declare const Groups: Story;
79
79
  export declare const Multiselect: Story;
80
80
  export declare const MultiselectGroups: Story;
81
+ export declare const WithSlots: Story;
81
82
  /**
82
83
  * Applies a custom class to the combobox popover
83
84
  */
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarCombobox.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCombobox/ScalarCombobox.stories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAMrD,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAElD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAa6B,CAAA;AAEvC,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAqClC,eAAO,MAAM,IAAI,EAAE,KA0BlB,CAAA;AAED,eAAO,MAAM,MAAM,EAAE,KA0BpB,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,KA0BzB,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,KA0B/B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,KA6B3B,CAAA"}
1
+ {"version":3,"file":"ScalarCombobox.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCombobox/ScalarCombobox.stories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAMrD,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAElD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAa6B,CAAA;AAEvC,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAqClC,eAAO,MAAM,IAAI,EAAE,KA0BlB,CAAA;AAED,eAAO,MAAM,MAAM,EAAE,KA0BpB,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,KA0BzB,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,KA0B/B,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KAiCvB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,KA6B3B,CAAA"}
@@ -16,16 +16,16 @@ declare function __VLS_template(): {
16
16
  /** The reference element for the combobox */
17
17
  default(props: SlotProps): Slot;
18
18
  /** A slot for contents before the combobox options */
19
- before(props: SlotProps): Slot;
19
+ before?(props: SlotProps): Slot;
20
20
  /** A slot for contents after the combobox options */
21
- after(props: SlotProps): Slot;
21
+ after?(props: SlotProps): Slot;
22
22
  }> & {
23
23
  /** The reference element for the combobox */
24
24
  default(props: SlotProps): Slot;
25
25
  /** A slot for contents before the combobox options */
26
- before(props: SlotProps): Slot;
26
+ before?(props: SlotProps): Slot;
27
27
  /** A slot for contents after the combobox options */
28
- after(props: SlotProps): Slot;
28
+ after?(props: SlotProps): Slot;
29
29
  };
30
30
  refs: {};
31
31
  rootEl: any;
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarCombobox.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCombobox/ScalarCombobox.vue"],"names":[],"mappings":"AAuEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAE/B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAA;AAG9D,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAIlD,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,MAAM,EAAE,GAAG,WAAW,EAAE,CAAA;IACjC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,GAAG,qBAAqB,CAAA;AAEzB,KAAK,SAAS,GAAG;IACf,0CAA0C;IAC1C,IAAI,EAAE,OAAO,CAAA;CACd,CAAA;AAyBD,iBAAS,cAAc;WAqFT,OAAO,IAA6B;;QAnGhD,6CAA6C;uBAC9B,SAAS,GAAG,IAAI;QAC/B,sDAAsD;sBACxC,SAAS,GAAG,IAAI;QAC9B,qDAAqD;qBACxC,SAAS,GAAG,IAAI;;QAL7B,6CAA6C;uBAC9B,SAAS,GAAG,IAAI;QAC/B,sDAAsD;sBACxC,SAAS,GAAG,IAAI;QAC9B,qDAAqD;qBACxC,SAAS,GAAG,IAAI;;;;EAmG9B;AAWD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;kFAQnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,E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,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,7 +1,7 @@
1
- import { defineComponent as m, openBlock as p, createBlock as d, withCtx as l, renderSlot as a, createVNode as s, createSlots as n } from "vue";
2
- import i from "./ScalarComboboxOptions.vue.js";
3
- import f from "./ScalarComboboxPopover.vue.js";
4
- const h = /* @__PURE__ */ m({
1
+ import { defineComponent as m, openBlock as p, createBlock as d, withCtx as l, renderSlot as t, createVNode as s, createSlots as n } from "vue";
2
+ import f from "./ScalarComboboxOptions.vue.js";
3
+ import i from "./ScalarComboboxPopover.vue.js";
4
+ const c = /* @__PURE__ */ m({
5
5
  __name: "ScalarCombobox",
6
6
  props: {
7
7
  options: {},
@@ -16,44 +16,45 @@ const h = /* @__PURE__ */ m({
16
16
  },
17
17
  emits: ["update:modelValue"],
18
18
  setup(u) {
19
- return (e, V) => (p(), d(f, {
19
+ return (e, V) => (p(), d(i, {
20
20
  middleware: e.middleware,
21
+ offset: e.offset,
21
22
  placement: e.placement ?? "bottom-start",
22
23
  resize: e.resize,
23
24
  target: e.target,
24
25
  teleport: e.teleport
25
26
  }, {
26
27
  default: l(({ open: o }) => [
27
- a(e.$slots, "default", { open: o })
28
+ t(e.$slots, "default", { open: o })
28
29
  ]),
29
- popover: l(({ open: o, close: t }) => [
30
- s(i, {
30
+ popover: l(({ open: o, close: a }) => [
31
+ s(f, {
31
32
  modelValue: e.modelValue ? [e.modelValue] : [],
32
33
  open: o,
33
34
  options: e.options,
34
35
  placeholder: e.placeholder,
35
- "onUpdate:modelValue": (r) => (t(), e.$emit("update:modelValue", r[0]))
36
+ "onUpdate:modelValue": (r) => (a(), e.$emit("update:modelValue", r[0]))
36
37
  }, n({ _: 2 }, [
37
38
  e.$slots.before ? {
38
39
  name: "before",
39
40
  fn: l(() => [
40
- a(e.$slots, "before", { open: o })
41
+ t(e.$slots, "before", { open: o })
41
42
  ]),
42
43
  key: "0"
43
44
  } : void 0,
44
45
  e.$slots.after ? {
45
46
  name: "after",
46
47
  fn: l(() => [
47
- a(e.$slots, "after", { open: o })
48
+ t(e.$slots, "after", { open: o })
48
49
  ]),
49
50
  key: "1"
50
51
  } : void 0
51
52
  ]), 1032, ["modelValue", "open", "options", "placeholder", "onUpdate:modelValue"])
52
53
  ]),
53
54
  _: 3
54
- }, 8, ["middleware", "placement", "resize", "target", "teleport"]));
55
+ }, 8, ["middleware", "offset", "placement", "resize", "target", "teleport"]));
55
56
  }
56
57
  });
57
58
  export {
58
- h as default
59
+ c as default
59
60
  };
@@ -1,5 +1,5 @@
1
1
  import type { ScalarFloatingOptions } from '../ScalarFloating';
2
- import type { Option, OptionGroup } from './types.js';
2
+ import type { ComboboxSlots, Option, OptionGroup } from './types.js';
3
3
  type __VLS_Props = {
4
4
  options: Option[] | OptionGroup[];
5
5
  modelValue?: Option[];
@@ -8,10 +8,7 @@ type __VLS_Props = {
8
8
  } & ScalarFloatingOptions;
9
9
  declare function __VLS_template(): {
10
10
  attrs: Partial<{}>;
11
- slots: {
12
- default?(_: {}): any;
13
- actions?(_: {}): any;
14
- };
11
+ slots: Readonly<ComboboxSlots> & ComboboxSlots;
15
12
  refs: {
16
13
  comboboxPopoverRef: ({
17
14
  $: import("vue").ComponentInternalInstance;
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarComboboxMultiselect.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCombobox/ScalarComboboxMultiselect.vue"],"names":[],"mappings":"AA6DA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAA;AAG9D,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAIlD,KAAK,WAAW,GAAG;IACf,OAAO,EAAE,MAAM,EAAE,GAAG,WAAW,EAAE,CAAA;IACjC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,GAAG,qBAAqB,CAAC;AAuB5B,i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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA4BP,KA9Ba,eA8Bb,KA7BU,uBA6BV,KA5BO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kFA8LL,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,10 +1,7 @@
1
- import { defineComponent as m, ref as u, openBlock as t, createBlock as a, withCtx as s, createElementVNode as f, createCommentVNode as i, createElementBlock as b, renderSlot as p } from "vue";
2
- import c from "./ScalarComboboxOptions.vue.js";
1
+ import { defineComponent as d, ref as f, openBlock as p, createBlock as n, withCtx as l, createSlots as u, renderSlot as a, createCommentVNode as b } from "vue";
2
+ import $ from "./ScalarComboboxOptions.vue.js";
3
3
  import V from "./ScalarComboboxPopover.vue.js";
4
- const v = { class: "divide-1 divide-y" }, y = {
5
- key: 1,
6
- class: "p-0.75"
7
- }, h = /* @__PURE__ */ m({
4
+ const w = /* @__PURE__ */ d({
8
5
  __name: "ScalarComboboxMultiselect",
9
6
  props: {
10
7
  options: {},
@@ -19,42 +16,56 @@ const v = { class: "divide-1 divide-y" }, y = {
19
16
  teleport: { type: [Boolean, String] }
20
17
  },
21
18
  emits: ["update:modelValue", "delete"],
22
- setup($, { expose: n }) {
23
- const r = u(null);
24
- return n({ comboboxPopoverRef: r }), (e, o) => (t(), a(V, {
19
+ setup(y, { expose: i }) {
20
+ const s = f(null);
21
+ return i({ comboboxPopoverRef: s }), (e, o) => (p(), n(V, {
25
22
  ref_key: "comboboxPopoverRef",
26
- ref: r,
23
+ ref: s,
27
24
  middleware: e.middleware,
25
+ offset: e.offset,
28
26
  placement: e.placement ?? "bottom-start",
29
27
  resize: e.resize,
30
28
  target: e.target,
31
29
  teleport: e.teleport
32
30
  }, {
33
- popover: s(({ open: d }) => [
34
- f("div", v, [
35
- e.options && e.options.length ? (t(), a(c, {
31
+ popover: l(({ open: t }) => {
32
+ var m;
33
+ return [
34
+ (m = e.options) != null && m.length ? (p(), n($, {
36
35
  key: 0,
37
36
  isDeletable: e.isDeletable,
38
37
  modelValue: e.modelValue,
39
38
  multiselect: "",
40
- open: d,
39
+ open: t,
41
40
  options: e.options,
42
41
  placeholder: e.placeholder,
43
- onDelete: o[0] || (o[0] = (l) => e.$emit("delete", l)),
44
- "onUpdate:modelValue": o[1] || (o[1] = (l) => e.$emit("update:modelValue", l))
45
- }, null, 8, ["isDeletable", "modelValue", "open", "options", "placeholder"])) : i("", !0),
46
- e.$slots.actions ? (t(), b("div", y, [
47
- p(e.$slots, "actions")
48
- ])) : i("", !0)
49
- ])
50
- ]),
51
- default: s(() => [
52
- p(e.$slots, "default")
42
+ onDelete: o[0] || (o[0] = (r) => e.$emit("delete", r)),
43
+ "onUpdate:modelValue": o[1] || (o[1] = (r) => e.$emit("update:modelValue", r))
44
+ }, u({ _: 2 }, [
45
+ e.$slots.before ? {
46
+ name: "before",
47
+ fn: l(() => [
48
+ a(e.$slots, "before", { open: t })
49
+ ]),
50
+ key: "0"
51
+ } : void 0,
52
+ e.$slots.after ? {
53
+ name: "after",
54
+ fn: l(() => [
55
+ a(e.$slots, "after", { open: t })
56
+ ]),
57
+ key: "1"
58
+ } : void 0
59
+ ]), 1032, ["isDeletable", "modelValue", "open", "options", "placeholder"])) : b("", !0)
60
+ ];
61
+ }),
62
+ default: l(() => [
63
+ a(e.$slots, "default")
53
64
  ]),
54
65
  _: 3
55
- }, 8, ["middleware", "placement", "resize", "target", "teleport"]));
66
+ }, 8, ["middleware", "offset", "placement", "resize", "target", "teleport"]));
56
67
  }
57
68
  });
58
69
  export {
59
- h as default
70
+ w as default
60
71
  };
@@ -1,5 +1,4 @@
1
- import { type Slot } from 'vue';
2
- import { type Option, type OptionGroup } from './types.js';
1
+ import { type ComboboxSlots, type Option, type OptionGroup } from './types.js';
3
2
  type __VLS_Props = {
4
3
  options: Option[] | OptionGroup[];
5
4
  modelValue?: Option[];
@@ -10,17 +9,7 @@ type __VLS_Props = {
10
9
  };
11
10
  declare function __VLS_template(): {
12
11
  attrs: Partial<{}>;
13
- slots: Readonly<{
14
- /** A slot for contents before the combobox options */
15
- before(): Slot;
16
- /** A slot for contents after the combobox options */
17
- after(): Slot;
18
- }> & {
19
- /** A slot for contents before the combobox options */
20
- before(): Slot;
21
- /** A slot for contents after the combobox options */
22
- after(): Slot;
23
- };
12
+ slots: Readonly<Omit<ComboboxSlots, "default">> & Omit<ComboboxSlots, "default">;
24
13
  refs: {};
25
14
  rootEl: any;
26
15
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarComboboxOptions.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCombobox/ScalarComboboxOptions.vue"],"names":[],"mappings":"AAiKA,OAAO,EAAE,KAAK,IAAI,EAAwB,MAAM,KAAK,CAAA;AAIrD,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,WAAW,EAAY,MAAM,SAAS,CAAA;AAIjE,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,GAAG,WAAW,EAAE,CAAA;IACjC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAC;AA8FF,iBAAS,cAAc;WA2JT,OAAO,IAA6B;;QA/OhD,sDAAsD;kBAC5C,IAAI;QACd,qDAAqD;iBAC5C,IAAI;;QAHb,sDAAsD;kBAC5C,IAAI;QACd,qDAAqD;iBAC5C,IAAI;;;;EAiPd;AAmBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;kFAOnB,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":"ScalarComboboxOptions.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCombobox/ScalarComboboxOptions.vue"],"names":[],"mappings":"AAqKA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,MAAM,EACX,KAAK,WAAW,EAEjB,MAAM,SAAS,CAAA;AAIhB,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,GAAG,WAAW,EAAE,CAAA;IACjC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAC;AAyFF,iBAAS,cAAc;WA8JT,OAAO,IAA6B;;;;EAKjD;AAmBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;kFAOnB,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"}
@@ -73,7 +73,7 @@ const R = { class: "relative flex" }, W = ["aria-controls", "placeholder"], X =
73
73
  ]),
74
74
  g(x("ul", {
75
75
  id: w(h),
76
- class: "border-t p-0.75"
76
+ class: "border-t p-0.75 custom-scroll flex-1 min-h-0"
77
77
  }, [
78
78
  B(e.$slots, "before"),
79
79
  (a(!0), u(m, null, M(K.value, (n, c) => (a(), u(m, { key: c }, [
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarComboboxPopover.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCombobox/ScalarComboboxPopover.vue"],"names":[],"mappings":"AA+DA,OAAO,EAAkB,KAAK,qBAAqB,EAAE,MAAM,mBAAmB,CAAA;AAC9E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AA8B1D,iBAAS,cAAc;WAwGT,OAAO,IAA6B;;;;;;;;;;;;;;;;0BA3IlD,KA1B6B,eA0B7B,KAzBkB,uBAyBlB,KAxBwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwKvB;AAeD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;oBAhKrB,KA1B6B,eA0B7B,KAzBkB,uBAyBlB,KAxBwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8PA+LtB,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":"ScalarComboboxPopover.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCombobox/ScalarComboboxPopover.vue"],"names":[],"mappings":"AAoEA,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,mBAAmB,CAAA;AAC1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AA8B1D,iBAAS,cAAc;WA0GT,OAAO,IAA6B;;;;;;;;;;;;;;;;0BAjJlD,KA5BmB,eA4BnB,KA3BkB,uBA2BlB,KA1Be;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgLd;AAgBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;oBAvKrB,KA5BmB,eA4BnB,KA3BkB,uBA2BlB,KA1Be;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8PAwMb,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,8 +1,9 @@
1
- import { defineComponent as m, ref as c, openBlock as v, createBlock as y, unref as t, withCtx as r, createVNode as l, normalizeProps as w, guardReactiveProps as _, createSlots as b, renderSlot as s, mergeProps as g, createElementVNode as B } from "vue";
2
- import { Popover as P, PopoverButton as k, PopoverPanel as x } from "@headlessui/vue";
3
- import { useBindCx as h } from "../../hooks/useBindCx.js";
4
- import C from "../ScalarFloating/ScalarFloating.vue.js";
5
- const K = /* @__PURE__ */ m({
1
+ import { defineComponent as u, ref as c, openBlock as _, createBlock as v, unref as o, withCtx as t, createVNode as r, normalizeProps as y, guardReactiveProps as w, createSlots as x, renderSlot as l, mergeProps as B } from "vue";
2
+ import { Popover as P, PopoverButton as h, PopoverPanel as k } from "@headlessui/vue";
3
+ import { useBindCx as g } from "../../hooks/useBindCx.js";
4
+ import $ from "../ScalarFloating/ScalarFloating.vue.js";
5
+ import C from "../ScalarFloating/ScalarFloatingBackdrop.vue.js";
6
+ const z = /* @__PURE__ */ u({
6
7
  inheritAttrs: !1,
7
8
  __name: "ScalarComboboxPopover",
8
9
  props: {
@@ -13,42 +14,45 @@ const K = /* @__PURE__ */ m({
13
14
  middleware: {},
14
15
  teleport: { type: [Boolean, String] }
15
16
  },
16
- setup(E, { expose: p }) {
17
- const { cx: d } = h(), a = c(null), f = (e) => {
18
- var o;
19
- ["ArrowUp", "ArrowDown"].includes(e.key) && (e.preventDefault(), (o = e.target) == null || o.dispatchEvent(new KeyboardEvent("keydown", { key: "Enter" })));
17
+ setup(S, { expose: s }) {
18
+ const { cx: f } = g(), p = c(null), i = (e) => {
19
+ var n;
20
+ ["ArrowUp", "ArrowDown"].includes(e.key) && (e.preventDefault(), (n = e.target) == null || n.dispatchEvent(new KeyboardEvent("keydown", { key: "Enter" })));
20
21
  };
21
- return p({ popoverButtonRef: a }), (e, o) => (v(), y(t(P), { as: "template" }, {
22
- default: r(({ open: n }) => [
23
- l(t(C), w(_(e.$props)), b({
24
- default: r(() => [
25
- l(t(k), {
22
+ return s({ popoverButtonRef: p }), (e, n) => (_(), v(o(P), { as: "template" }, {
23
+ default: t(({ open: a }) => [
24
+ r(o($), y(w(e.$props)), x({
25
+ default: t(() => [
26
+ r(o(h), {
26
27
  ref_key: "popoverButtonRef",
27
- ref: a,
28
+ ref: p,
28
29
  as: "template",
29
- onKeydown: f
30
+ onKeydown: i
30
31
  }, {
31
- default: r(() => [
32
- s(e.$slots, "default", { open: n })
32
+ default: t(() => [
33
+ l(e.$slots, "default", { open: a })
33
34
  ]),
34
35
  _: 2
35
36
  }, 1536)
36
37
  ]),
37
38
  _: 2
38
39
  }, [
39
- n ? {
40
+ a ? {
40
41
  name: "floating",
41
- fn: r(({ width: i }) => [
42
- l(t(x), g({
43
- focus: "",
44
- style: { width: i }
45
- }, t(d)("relative flex w-40 flex-col rounded border text-sm")), {
46
- default: r(({ close: u }) => [
47
- s(e.$slots, "popover", {
48
- close: u,
49
- open: n
42
+ fn: t(({ width: m }) => [
43
+ r(o(k), B(
44
+ {
45
+ focus: "",
46
+ style: { width: m }
47
+ },
48
+ o(f)("relative flex flex-col max-h-[inherit] w-40 rounded text-sm")
49
+ ), {
50
+ default: t(({ close: d }) => [
51
+ l(e.$slots, "popover", {
52
+ close: d,
53
+ open: a
50
54
  }),
51
- o[0] || (o[0] = B("div", { class: "absolute inset-0 -z-1 rounded bg-b-1 shadow-md brightness-lifted" }, null, -1))
55
+ r(o(C))
52
56
  ]),
53
57
  _: 2
54
58
  }, 1040, ["style"])
@@ -62,5 +66,5 @@ const K = /* @__PURE__ */ m({
62
66
  }
63
67
  });
64
68
  export {
65
- K as default
69
+ z as default
66
70
  };
@@ -12,4 +12,13 @@ export type OptionGroup = {
12
12
  export declare function isGroup(option: Option | OptionGroup): option is OptionGroup;
13
13
  /** Type guard to check if an array of options is an array of groups */
14
14
  export declare function isGroups(options: Option[] | OptionGroup[]): options is OptionGroup[];
15
+ /** Available slots for the combobox */
16
+ export type ComboboxSlots = {
17
+ /** The reference element / trigger for the combobox */
18
+ default(): any;
19
+ /** A slot for contents before the combobox options */
20
+ before?(): any;
21
+ /** A slot for contents after the combobox options */
22
+ after?(): any;
23
+ };
15
24
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCombobox/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,MAAM,GAAG;IACnB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB,CAAA;AAED,kDAAkD;AAClD,wBAAgB,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,GAAG,MAAM,IAAI,WAAW,CAE3E;AAED,uEAAuE;AACvE,wBAAgB,QAAQ,CACtB,OAAO,EAAE,MAAM,EAAE,GAAG,WAAW,EAAE,GAChC,OAAO,IAAI,WAAW,EAAE,CAE1B"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCombobox/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,MAAM,GAAG;IACnB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB,CAAA;AAED,kDAAkD;AAClD,wBAAgB,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,GAAG,MAAM,IAAI,WAAW,CAE3E;AAED,uEAAuE;AACvE,wBAAgB,QAAQ,CACtB,OAAO,EAAE,MAAM,EAAE,GAAG,WAAW,EAAE,GAChC,OAAO,IAAI,WAAW,EAAE,CAE1B;AAED,uCAAuC;AACvC,MAAM,MAAM,aAAa,GAAG;IAC1B,uDAAuD;IACvD,OAAO,IAAI,GAAG,CAAA;IACd,sDAAsD;IACtD,MAAM,CAAC,IAAI,GAAG,CAAA;IACd,qDAAqD;IACrD,KAAK,CAAC,IAAI,GAAG,CAAA;CACd,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarMenu.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarMenu/ScalarMenu.vue"],"names":[],"mappings":"AA6FA,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,SAAS,CAAA;AAgChB,iBAAS,cAAc;WA8FT,OAAO,IAA6B;;QAxH9C,uCAAuC;iBAC9B,CAAC,CAAC,EAAE,qBAAqB,KAAK,GAAG;QAC1C,kCAAkC;mBACvB,CAAC,CAAC,EAAE,mBAAmB,KAAK,GAAG;QAC1C,0DAA0D;kBAChD,CAAC,CAAC,EAAE,mBAAmB,KAAK,GAAG;QACzC,sCAAsC;mBAC3B,CAAC,CAAC,EAAE,mBAAmB,KAAK,GAAG;;QAP1C,uCAAuC;iBAC9B,CAAC,CAAC,EAAE,qBAAqB,KAAK,GAAG;QAC1C,kCAAkC;mBACvB,CAAC,CAAC,EAAE,mBAAmB,KAAK,GAAG;QAC1C,0DAA0D;kBAChD,CAAC,CAAC,EAAE,mBAAmB,KAAK,GAAG;QACzC,sCAAsC;mBAC3B,CAAC,CAAC,EAAE,mBAAmB,KAAK,GAAG;;;;EAsH7C;AAcD,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":"ScalarMenu.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarMenu/ScalarMenu.vue"],"names":[],"mappings":"AA6FA,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,SAAS,CAAA;AAgChB,iBAAS,cAAc;WA+FT,OAAO,IAA6B;;QAzH9C,uCAAuC;iBAC9B,CAAC,CAAC,EAAE,qBAAqB,KAAK,GAAG;QAC1C,kCAAkC;mBACvB,CAAC,CAAC,EAAE,mBAAmB,KAAK,GAAG;QAC1C,0DAA0D;kBAChD,CAAC,CAAC,EAAE,mBAAmB,KAAK,GAAG;QACzC,sCAAsC;mBAC3B,CAAC,CAAC,EAAE,mBAAmB,KAAK,GAAG;;QAP1C,uCAAuC;iBAC9B,CAAC,CAAC,EAAE,qBAAqB,KAAK,GAAG;QAC1C,kCAAkC;mBACvB,CAAC,CAAC,EAAE,mBAAmB,KAAK,GAAG;QAC1C,0DAA0D;kBAChD,CAAC,CAAC,EAAE,mBAAmB,KAAK,GAAG;QACzC,sCAAsC;mBAC3B,CAAC,CAAC,EAAE,mBAAmB,KAAK,GAAG;;;;EAuH7C;AAcD,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,4 +1,4 @@
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";
1
+ import { defineComponent as i, ref as m, openBlock as u, createBlock as d, unref as l, withCtx as t, createVNode as n, renderSlot as e, createSlots as $, mergeProps as c } from "vue";
2
2
  import { DropdownMenu as r } from "radix-vue/namespaced";
3
3
  import _ from "./ScalarMenuButton.vue.js";
4
4
  import g from "./ScalarMenuProducts.vue.js";
@@ -12,15 +12,15 @@ const M = /* @__PURE__ */ i({
12
12
  function a() {
13
13
  s.value = !1;
14
14
  }
15
- return (o, f) => (u(), d(n(r).Root, {
15
+ return (o, f) => (u(), d(l(r).Root, {
16
16
  open: s.value,
17
17
  "onUpdate:open": f[0] || (f[0] = (p) => s.value = p)
18
18
  }, {
19
19
  default: t(() => [
20
- l(n(r).Trigger, { asChild: "" }, {
20
+ n(l(r).Trigger, { asChild: "" }, {
21
21
  default: t(() => [
22
22
  e(o.$slots, "button", { open: s.value }, () => [
23
- l(_, {
23
+ n(_, {
24
24
  class: "min-w-0",
25
25
  open: s.value
26
26
  }, $({ _: 2 }, [
@@ -43,19 +43,19 @@ const M = /* @__PURE__ */ i({
43
43
  ]),
44
44
  _: 3
45
45
  }),
46
- l(n(r).Content, c({
46
+ n(l(r).Content, c({
47
47
  align: "start",
48
- as: n(b),
49
- class: "max-h-radix-popper",
48
+ as: l(b),
49
+ class: "max-h-radix-popper z-context",
50
50
  sideOffset: 5
51
51
  }, o.$attrs), {
52
52
  default: t(() => [
53
53
  e(o.$slots, "products", { close: a }, () => [
54
- l(g)
54
+ n(g)
55
55
  ]),
56
56
  e(o.$slots, "profile", { close: a }),
57
57
  e(o.$slots, "sections", { close: a }, () => [
58
- l(v)
58
+ n(v)
59
59
  ])
60
60
  ]),
61
61
  _: 3
@@ -1,8 +1,9 @@
1
1
  import type { Meta, StoryObj } from '@storybook/vue3';
2
- import ScalarSidebar from './ScalarSidebar.vue.js';
3
- declare const meta: Meta<typeof ScalarSidebar>;
2
+ declare const meta: Meta;
4
3
  export default meta;
5
4
  type Story = StoryObj<typeof meta>;
6
5
  export declare const Base: Story;
6
+ export declare const WithNavItems: Story;
7
+ export declare const WithNestedGroups: Story;
7
8
  export declare const WithFooter: Story;
8
9
  //# sourceMappingURL=ScalarSidebar.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarSidebar.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/ScalarSidebar.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAErD,OAAO,aAAa,MAAM,qBAAqB,CAAA;AAG/C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,aAAa,CAqBpC,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,IAAI,EAAE,KAAU,CAAA;AAE7B,eAAO,MAAM,UAAU,EAAE,KAkBxB,CAAA"}
1
+ {"version":3,"file":"ScalarSidebar.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/ScalarSidebar.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAUrD,QAAA,MAAM,IAAI,EAAE,IAwBX,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,IAAI,EAAE,KAAU,CAAA;AAE7B,eAAO,MAAM,YAAY,EAAE,KAqC1B,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KA6D9B,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAkBxB,CAAA"}
@@ -0,0 +1,31 @@
1
+ import type { ScalarSidebarItemProps, ScalarSidebarItemSlots } from './types';
2
+ /**
3
+ * Scalar Sidebar Button component
4
+ *
5
+ * Provide a styled link for the ScalarSidebar or similar, supports
6
+ * the same props and slots as ScalarSidebarItem
7
+ *
8
+ * This is used internally by the ScalarSidebarItem component
9
+ *
10
+ * If you're looking to create items in ScalarSidebarItems
11
+ * you probably want the ScalarSidebarItem component
12
+ *
13
+ * @example
14
+ * <ScalarSidebarButton>
15
+ * <template #icon>
16
+ * <!-- Overrides the icon slot -->
17
+ * </template>
18
+ * <!-- Button text -->
19
+ * <template #aside>
20
+ * <!-- After the button text -->
21
+ * </template>
22
+ * </ScalarSidebarButton>
23
+ */
24
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<ScalarSidebarItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ScalarSidebarItemProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, Readonly<ScalarSidebarItemSlots> & ScalarSidebarItemSlots>;
25
+ export default _default;
26
+ type __VLS_WithTemplateSlots<T, S> = T & {
27
+ new (): {
28
+ $slots: S;
29
+ };
30
+ };
31
+ //# sourceMappingURL=ScalarSidebarButton.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScalarSidebarButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/ScalarSidebarButton.vue"],"names":[],"mappings":"AAoFA,OAAO,KAAK,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAI7E;;;;;;;;;;;;;;;;;;;;;GAqBG;;AACH,wBAyHC;AAWD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,63 @@
1
+ import { defineComponent as d, openBlock as t, createBlock as r, resolveDynamicComponent as p, mergeProps as c, unref as o, withCtx as u, createElementVNode as f, createElementBlock as n, renderSlot as s, createVNode as m, createCommentVNode as l } from "vue";
2
+ import { cva as b } from "../../cva.js";
3
+ import { useBindCx as v } from "../../hooks/useBindCx.js";
4
+ import h from "../ScalarIcon/ScalarIcon.vue.js";
5
+ const y = { class: "flex items-center gap-1 flex-1" }, B = {
6
+ key: 0,
7
+ class: "size-3.5"
8
+ }, _ = { key: 0 }, k = {}, N = /* @__PURE__ */ d({
9
+ ...k,
10
+ inheritAttrs: !1,
11
+ __name: "ScalarSidebarButton",
12
+ props: {
13
+ is: { default: "a" },
14
+ icon: {},
15
+ selected: { type: Boolean },
16
+ disabled: { type: Boolean },
17
+ indent: { default: 0 }
18
+ },
19
+ setup(C) {
20
+ const a = b({
21
+ base: ["rounded p-1.5 font-medium text-c-2 no-underline"],
22
+ variants: {
23
+ selected: { true: "cursor-auto bg-b-2 text-c-1" },
24
+ disabled: { true: "cursor-auto" },
25
+ indent: {
26
+ 0: "pl-[6px]",
27
+ 1: "pl-[24px]",
28
+ 2: "pl-[42px]",
29
+ 3: "pl-[60px]",
30
+ 4: "pl-[78px]",
31
+ 5: "pl-[96px]",
32
+ 6: "pl-[114px]"
33
+ }
34
+ },
35
+ compoundVariants: [
36
+ { selected: !1, disabled: !1, class: "hover:bg-b-2" }
37
+ ],
38
+ defaultVariants: { selected: !1, disabled: !1, indent: 0 }
39
+ }), { cx: i } = v();
40
+ return (e, V) => (t(), r(p(e.is), c({
41
+ "aria-level": e.indent,
42
+ type: e.is === "button" ? "button" : void 0
43
+ }, o(i)(o(a)({ selected: e.selected, disabled: e.disabled, indent: e.indent }))), {
44
+ default: u(() => [
45
+ f("div", y, [
46
+ e.icon || e.$slots.icon ? (t(), n("div", B, [
47
+ s(e.$slots, "icon", {}, () => [
48
+ m(o(h), { icon: e.icon }, null, 8, ["icon"])
49
+ ])
50
+ ])) : l("", !0),
51
+ s(e.$slots, "default")
52
+ ]),
53
+ e.$slots.aside ? (t(), n("div", _, [
54
+ s(e.$slots, "aside")
55
+ ])) : l("", !0)
56
+ ]),
57
+ _: 3
58
+ }, 16, ["aria-level", "type"]));
59
+ }
60
+ });
61
+ export {
62
+ N as default
63
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./ScalarSidebarButton.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ScalarSidebarGroup.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScalarSidebarGroup.test.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/ScalarSidebarGroup.test.ts"],"names":[],"mappings":""}