@scalar/components 0.13.20 → 0.13.23
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.
- package/dist/components/ScalarButton/ScalarButton.stories.d.ts +12 -12
- package/dist/components/ScalarButton/ScalarButton.vue.d.ts +1 -1
- package/dist/components/ScalarButton/ScalarButton.vue.d.ts.map +1 -1
- package/dist/components/ScalarCombobox/ScalarCombobox.stories.d.ts +5 -4
- package/dist/components/ScalarCombobox/ScalarCombobox.stories.d.ts.map +1 -1
- package/dist/components/ScalarCombobox/ScalarCombobox.vue.d.ts +4 -4
- package/dist/components/ScalarCombobox/ScalarCombobox.vue.d.ts.map +1 -1
- package/dist/components/ScalarCombobox/ScalarCombobox.vue.js +14 -13
- package/dist/components/ScalarCombobox/ScalarComboboxMultiselect.vue.d.ts +2 -5
- package/dist/components/ScalarCombobox/ScalarComboboxMultiselect.vue.d.ts.map +1 -1
- package/dist/components/ScalarCombobox/ScalarComboboxMultiselect.vue.js +37 -26
- package/dist/components/ScalarCombobox/ScalarComboboxOptions.vue.d.ts +2 -14
- package/dist/components/ScalarCombobox/ScalarComboboxOptions.vue.d.ts.map +1 -1
- package/dist/components/ScalarCombobox/ScalarComboboxOptions.vue.js +76 -65
- package/dist/components/ScalarCombobox/ScalarComboboxPopover.vue.d.ts.map +1 -1
- package/dist/components/ScalarCombobox/ScalarComboboxPopover.vue.js +34 -30
- package/dist/components/ScalarCombobox/types.d.ts +9 -0
- package/dist/components/ScalarCombobox/types.d.ts.map +1 -1
- package/dist/components/ScalarContextMenu/ScalarContextMenu.stories.d.ts +3 -3
- package/dist/components/ScalarDropdown/ScalarDropdown.stories.d.ts +3 -3
- package/dist/components/ScalarFileUpload/ScalarFileUpload.stories.d.ts +364 -0
- package/dist/components/ScalarFileUpload/ScalarFileUpload.stories.d.ts.map +1 -0
- package/dist/components/ScalarFileUpload/ScalarFileUpload.test.d.ts +2 -0
- package/dist/components/ScalarFileUpload/ScalarFileUpload.test.d.ts.map +1 -0
- package/dist/components/ScalarFileUpload/ScalarFileUpload.vue.d.ts +86 -0
- package/dist/components/ScalarFileUpload/ScalarFileUpload.vue.d.ts.map +1 -0
- package/dist/components/ScalarFileUpload/ScalarFileUploadDropTarget.vue.d.ts +19 -0
- package/dist/components/ScalarFileUpload/ScalarFileUploadDropTarget.vue.d.ts.map +1 -0
- package/dist/components/ScalarFileUpload/ScalarFileUploadError.vue.d.ts +20 -0
- package/dist/components/ScalarFileUpload/ScalarFileUploadError.vue.d.ts.map +1 -0
- package/dist/components/ScalarFileUpload/ScalarFileUploadFileList.vue.d.ts +22 -0
- package/dist/components/ScalarFileUpload/ScalarFileUploadFileList.vue.d.ts.map +1 -0
- package/dist/components/ScalarFileUpload/ScalarFileUploadInput.vue.d.ts +21 -0
- package/dist/components/ScalarFileUpload/ScalarFileUploadInput.vue.d.ts.map +1 -0
- package/dist/components/ScalarFileUpload/ScalarFileUploadInputCompact.vue.d.ts +21 -0
- package/dist/components/ScalarFileUpload/ScalarFileUploadInputCompact.vue.d.ts.map +1 -0
- package/dist/components/ScalarFileUpload/ScalarFileUploadLoading.vue.d.ts +16 -0
- package/dist/components/ScalarFileUpload/ScalarFileUploadLoading.vue.d.ts.map +1 -0
- package/dist/components/ScalarFileUpload/index.d.ts +8 -0
- package/dist/components/ScalarFileUpload/index.d.ts.map +1 -0
- package/dist/components/ScalarFileUpload/types.d.ts +32 -0
- package/dist/components/ScalarFileUpload/types.d.ts.map +1 -0
- package/dist/components/ScalarListbox/ScalarListbox.stories.d.ts +9 -9
- package/dist/components/ScalarListbox/ScalarListbox.vue.d.ts +3 -3
- package/dist/components/ScalarListbox/ScalarListbox.vue.d.ts.map +1 -1
- package/dist/components/ScalarLoading/ScalarLoading.stories.d.ts +3 -3
- package/dist/components/ScalarPopover/ScalarPopover.stories.d.ts +3 -3
- package/dist/components/ScalarSidebar/ScalarSidebar.stories.d.ts +3 -2
- package/dist/components/ScalarSidebar/ScalarSidebar.stories.d.ts.map +1 -1
- package/dist/components/ScalarSidebar/ScalarSidebarButton.vue.d.ts +31 -0
- package/dist/components/ScalarSidebar/ScalarSidebarButton.vue.d.ts.map +1 -0
- package/dist/components/ScalarSidebar/ScalarSidebarButton.vue.js +63 -0
- package/dist/components/ScalarSidebar/ScalarSidebarButton.vue2.js +4 -0
- package/dist/components/ScalarSidebar/ScalarSidebarGroup.test.d.ts +2 -0
- package/dist/components/ScalarSidebar/ScalarSidebarGroup.test.d.ts.map +1 -0
- package/dist/components/ScalarSidebar/ScalarSidebarGroup.vue.d.ts +50 -0
- package/dist/components/ScalarSidebar/ScalarSidebarGroup.vue.d.ts.map +1 -0
- package/dist/components/ScalarSidebar/ScalarSidebarGroup.vue.js +47 -0
- package/dist/components/ScalarSidebar/ScalarSidebarGroup.vue2.js +4 -0
- package/dist/components/ScalarSidebar/ScalarSidebarGroupToggle.vue.d.ts +50 -0
- package/dist/components/ScalarSidebar/ScalarSidebarGroupToggle.vue.d.ts.map +1 -0
- package/dist/components/ScalarSidebar/ScalarSidebarGroupToggle.vue.js +39 -0
- package/dist/components/ScalarSidebar/ScalarSidebarGroupToggle.vue2.js +4 -0
- package/dist/components/ScalarSidebar/ScalarSidebarItem.vue.d.ts +27 -0
- package/dist/components/ScalarSidebar/ScalarSidebarItem.vue.d.ts.map +1 -0
- package/dist/components/ScalarSidebar/ScalarSidebarItem.vue.js +34 -0
- package/dist/components/ScalarSidebar/ScalarSidebarItem.vue2.js +4 -0
- package/dist/components/ScalarSidebar/ScalarSidebarItems.vue.d.ts +28 -0
- package/dist/components/ScalarSidebar/ScalarSidebarItems.vue.d.ts.map +1 -0
- package/dist/components/ScalarSidebar/ScalarSidebarItems.vue.js +22 -0
- package/dist/components/ScalarSidebar/ScalarSidebarItems.vue2.js +4 -0
- package/dist/components/ScalarSidebar/index.d.ts +5 -0
- package/dist/components/ScalarSidebar/index.d.ts.map +1 -1
- package/dist/components/ScalarSidebar/types.d.ts +25 -0
- package/dist/components/ScalarSidebar/types.d.ts.map +1 -0
- package/dist/components/ScalarSidebar/useSidebarGroups.d.ts +25 -0
- package/dist/components/ScalarSidebar/useSidebarGroups.d.ts.map +1 -0
- package/dist/components/ScalarSidebar/useSidebarGroups.js +11 -0
- package/dist/components/ScalarSidebar/useSidebarGroups.test.d.ts +2 -0
- package/dist/components/ScalarSidebar/useSidebarGroups.test.d.ts.map +1 -0
- package/dist/components/ScalarTooltip/ScalarTooltip.stories.d.ts +3 -3
- package/dist/index.js +95 -85
- package/dist/style.css +1 -1
- package/package.json +5 -4
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { defineComponent as a, openBlock as s, createBlock as p, resolveDynamicComponent as i, mergeProps as l, unref as o, withCtx as u, renderSlot as n, createVNode as d, createElementVNode as f, createTextVNode as c, toDisplayString as m } from "vue";
|
|
2
|
+
import { cva as v } from "../../cva.js";
|
|
3
|
+
import { useBindCx as h } from "../../hooks/useBindCx.js";
|
|
4
|
+
import y from "../ScalarIcon/ScalarIcon.vue.js";
|
|
5
|
+
const C = { class: "sr-only" }, _ = {}, k = /* @__PURE__ */ a({
|
|
6
|
+
..._,
|
|
7
|
+
inheritAttrs: !1,
|
|
8
|
+
__name: "ScalarSidebarGroupToggle",
|
|
9
|
+
props: {
|
|
10
|
+
is: { default: "div" },
|
|
11
|
+
open: { type: Boolean, default: !1 },
|
|
12
|
+
icon: { default: "ChevronRight" }
|
|
13
|
+
},
|
|
14
|
+
setup(b) {
|
|
15
|
+
const t = v({
|
|
16
|
+
base: "size-4 -m-px transition-transform duration-100",
|
|
17
|
+
variants: { open: { true: "rotate-90" } },
|
|
18
|
+
defaultVariants: { open: !1 }
|
|
19
|
+
}), { cx: r } = h();
|
|
20
|
+
return (e, g) => (s(), p(i(e.is), l({
|
|
21
|
+
type: e.is === "button" ? "button" : void 0
|
|
22
|
+
}, o(r)(o(t)({ open: e.open }))), {
|
|
23
|
+
default: u(() => [
|
|
24
|
+
n(e.$slots, "default", { open: e.open }, () => [
|
|
25
|
+
d(o(y), { icon: e.icon }, null, 8, ["icon"])
|
|
26
|
+
]),
|
|
27
|
+
f("span", C, [
|
|
28
|
+
n(e.$slots, "label", { open: e.open }, () => [
|
|
29
|
+
c(m(e.open ? "Close" : "Open") + " Group ", 1)
|
|
30
|
+
])
|
|
31
|
+
])
|
|
32
|
+
]),
|
|
33
|
+
_: 3
|
|
34
|
+
}, 16, ["type"]));
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
export {
|
|
38
|
+
k as default
|
|
39
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ScalarSidebarItemProps, ScalarSidebarItemSlots } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Scalar Sidebar Item component
|
|
4
|
+
*
|
|
5
|
+
* Provides a ScalarSidebarButton wrapped in an `<li>` to
|
|
6
|
+
* meet accessibility requirements and automatically indents
|
|
7
|
+
* the button based on the level of the sidebar group
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* <ScalarSidebarItem>
|
|
11
|
+
* <template #icon>
|
|
12
|
+
* <!-- Overrides the icon slot -->
|
|
13
|
+
* </template>
|
|
14
|
+
* <!-- Button text -->
|
|
15
|
+
* <template #aside>
|
|
16
|
+
* <!-- After the button text -->
|
|
17
|
+
* </template>
|
|
18
|
+
* </ScalarSidebarItem>
|
|
19
|
+
*/
|
|
20
|
+
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>;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
23
|
+
new (): {
|
|
24
|
+
$slots: S;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=ScalarSidebarItem.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarSidebarItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/ScalarSidebarItem.vue"],"names":[],"mappings":"AAoDA,OAAO,KAAK,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAI7E;;;;;;;;;;;;;;;;;GAiBG;;AACH,wBAuFC;AAWD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { defineComponent as r, useSlots as s, openBlock as i, createElementBlock as l, createVNode as a, mergeProps as d, unref as p, createSlots as c, renderList as _, withCtx as f, renderSlot as m } from "vue";
|
|
2
|
+
import { useSidebarGroups as u } from "./useSidebarGroups.js";
|
|
3
|
+
import S from "./ScalarSidebarButton.vue.js";
|
|
4
|
+
const h = { class: "contents" }, B = {}, g = /* @__PURE__ */ r({
|
|
5
|
+
...B,
|
|
6
|
+
inheritAttrs: !1,
|
|
7
|
+
__name: "ScalarSidebarItem",
|
|
8
|
+
props: {
|
|
9
|
+
is: {},
|
|
10
|
+
icon: {},
|
|
11
|
+
selected: { type: Boolean },
|
|
12
|
+
disabled: { type: Boolean },
|
|
13
|
+
indent: { default: () => {
|
|
14
|
+
} }
|
|
15
|
+
},
|
|
16
|
+
setup($) {
|
|
17
|
+
const o = s(), { level: n } = u();
|
|
18
|
+
return (e, b) => (i(), l("li", h, [
|
|
19
|
+
a(S, d({ ...e.$attrs, ...e.$props }, {
|
|
20
|
+
indent: e.indent ?? p(n)
|
|
21
|
+
}), c({ _: 2 }, [
|
|
22
|
+
_(o, (k, t) => ({
|
|
23
|
+
name: t,
|
|
24
|
+
fn: f(() => [
|
|
25
|
+
m(e.$slots, t)
|
|
26
|
+
])
|
|
27
|
+
}))
|
|
28
|
+
]), 1040, ["indent"])
|
|
29
|
+
]));
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
export {
|
|
33
|
+
g as default
|
|
34
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Component } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Scalar Sidebar Items component
|
|
4
|
+
*
|
|
5
|
+
* A base container for ScalarSidebarItem(s), renders as
|
|
6
|
+
* a `<ul>` by default to meet accessibility requirements
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* <ScalarSidebarItems>
|
|
10
|
+
* <ScalarSidebarItem>...</ScalarSidebarItem>
|
|
11
|
+
* <ScalarSidebarItem>...</ScalarSidebarItem>
|
|
12
|
+
* <ScalarSidebarItem>...</ScalarSidebarItem>
|
|
13
|
+
* </ScalarSidebarItems>
|
|
14
|
+
*/
|
|
15
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
16
|
+
is?: Component | string;
|
|
17
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
18
|
+
is?: Component | string;
|
|
19
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
20
|
+
default?(_: {}): any;
|
|
21
|
+
}>;
|
|
22
|
+
export default _default;
|
|
23
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
24
|
+
new (): {
|
|
25
|
+
$slots: S;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=ScalarSidebarItems.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarSidebarItems.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/ScalarSidebarItems.vue"],"names":[],"mappings":"AAqCA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAMpC;;;;;;;;;;;;GAYG;;SAII,SAAS,GAAG,MAAM;;SAAlB,SAAS,GAAG,MAAM;;qBA4CI,GAAG;;AA/ChC,wBA+EC;AAWD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { defineComponent as o, openBlock as r, createBlock as n, resolveDynamicComponent as s, normalizeProps as a, guardReactiveProps as l, unref as i, withCtx as p, renderSlot as c } from "vue";
|
|
2
|
+
import { useBindCx as f } from "../../hooks/useBindCx.js";
|
|
3
|
+
const u = {}, C = /* @__PURE__ */ o({
|
|
4
|
+
...u,
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "ScalarSidebarItems",
|
|
7
|
+
props: {
|
|
8
|
+
is: { default: "ul" }
|
|
9
|
+
},
|
|
10
|
+
setup(m) {
|
|
11
|
+
const { cx: t } = f();
|
|
12
|
+
return (e, _) => (r(), n(s(e.is), a(l(i(t)("flex flex-col p-3"))), {
|
|
13
|
+
default: p(() => [
|
|
14
|
+
c(e.$slots, "default")
|
|
15
|
+
]),
|
|
16
|
+
_: 3
|
|
17
|
+
}, 16));
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
export {
|
|
21
|
+
C as default
|
|
22
|
+
};
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
export { default as ScalarSidebar } from './ScalarSidebar.vue.js';
|
|
2
2
|
export { default as ScalarSidebarFooter } from './ScalarSidebarFooter.vue.js';
|
|
3
|
+
export { default as ScalarSidebarButton } from './ScalarSidebarButton.vue.js';
|
|
4
|
+
export { default as ScalarSidebarGroup } from './ScalarSidebarGroup.vue.js';
|
|
5
|
+
export { default as ScalarSidebarGroupToggle } from './ScalarSidebarGroupToggle.vue.js';
|
|
6
|
+
export { default as ScalarSidebarItem } from './ScalarSidebarItem.vue.js';
|
|
7
|
+
export { default as ScalarSidebarItems } from './ScalarSidebarItems.vue.js';
|
|
3
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,2BAA2B,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAC1E,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAC1E,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AACxE,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,gCAAgC,CAAA;AACpF,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AACtE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Component } from 'vue';
|
|
2
|
+
import type { Icon } from '../ScalarIcon';
|
|
3
|
+
import type { SidebarGroupLevel } from './useSidebarGroups.js';
|
|
4
|
+
/** Scalar Sidebar Item Props */
|
|
5
|
+
export type ScalarSidebarItemProps = {
|
|
6
|
+
/** Overrides the rendered element */
|
|
7
|
+
is?: Component | string;
|
|
8
|
+
/** Sets the icon for the item */
|
|
9
|
+
icon?: Icon;
|
|
10
|
+
/** Wether or not the item is selected */
|
|
11
|
+
selected?: boolean;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
/** The level of the sidebar group */
|
|
14
|
+
indent?: SidebarGroupLevel;
|
|
15
|
+
};
|
|
16
|
+
/** Scalar Sidebar Item Slots */
|
|
17
|
+
export type ScalarSidebarItemSlots = {
|
|
18
|
+
/** The main text content of the button */
|
|
19
|
+
default?: () => any;
|
|
20
|
+
/** Override the icon */
|
|
21
|
+
icon?: () => any;
|
|
22
|
+
/** The content to display to the right of the text content */
|
|
23
|
+
aside?: () => any;
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAEpC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAE3D,gCAAgC;AAChC,MAAM,MAAM,sBAAsB,GAAG;IACnC,qCAAqC;IACrC,EAAE,CAAC,EAAE,SAAS,GAAG,MAAM,CAAA;IACvB,iCAAiC;IACjC,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,yCAAyC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,qCAAqC;IACrC,MAAM,CAAC,EAAE,iBAAiB,CAAA;CAC3B,CAAA;AAED,gCAAgC;AAChC,MAAM,MAAM,sBAAsB,GAAG;IACnC,0CAA0C;IAC1C,OAAO,CAAC,EAAE,MAAM,GAAG,CAAA;IACnB,wBAAwB;IACxB,IAAI,CAAC,EAAE,MAAM,GAAG,CAAA;IAChB,8DAA8D;IAC9D,KAAK,CAAC,EAAE,MAAM,GAAG,CAAA;CAClB,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type InjectionKey } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* The level of the sidebar groups
|
|
4
|
+
*
|
|
5
|
+
* We shouldn't go deeper than 6 levels
|
|
6
|
+
*/
|
|
7
|
+
export type SidebarGroupLevel = 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
8
|
+
/**
|
|
9
|
+
* Tracks the level of the sidebar groups
|
|
10
|
+
*
|
|
11
|
+
* @default 0
|
|
12
|
+
*/
|
|
13
|
+
export declare const SIDEBAR_GROUPS_SYMBOL: InjectionKey<SidebarGroupLevel>;
|
|
14
|
+
/**
|
|
15
|
+
* Get the current level of the sidebar groups
|
|
16
|
+
*
|
|
17
|
+
* Optionally increments the level of the sidebar groups
|
|
18
|
+
*/
|
|
19
|
+
export declare const useSidebarGroups: ({ increment, }?: {
|
|
20
|
+
/** Whether to increment the level of the sidebar groups */
|
|
21
|
+
increment?: boolean;
|
|
22
|
+
}) => {
|
|
23
|
+
level: SidebarGroupLevel;
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=useSidebarGroups.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSidebarGroups.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/useSidebarGroups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAmB,MAAM,KAAK,CAAA;AAExD;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AAEzD;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAe,YAAY,CAAC,iBAAiB,CAAC,CAAA;AAEhF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,oBAE1B;IACD,2DAA2D;IAC3D,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;;CAQA,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { inject as t, provide as r } from "vue";
|
|
2
|
+
const o = Symbol(), l = ({
|
|
3
|
+
increment: s = !1
|
|
4
|
+
} = {}) => {
|
|
5
|
+
const e = t(o, 0);
|
|
6
|
+
return s && e < 6 ? r(o, e + 1) : r(o, e), { level: e };
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
o as SIDEBAR_GROUPS_SYMBOL,
|
|
10
|
+
l as useSidebarGroups
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSidebarGroups.test.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/useSidebarGroups.test.ts"],"names":[],"mappings":""}
|
|
@@ -261,7 +261,7 @@ declare const meta: {
|
|
|
261
261
|
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
262
262
|
disabled?: boolean;
|
|
263
263
|
fullWidth?: boolean;
|
|
264
|
-
loading?: import("../ScalarLoading").LoadingState;
|
|
264
|
+
loading?: import("../ScalarLoading").LoadingState | undefined;
|
|
265
265
|
size?: import("../ScalarButton/variants.js").Variants["size"];
|
|
266
266
|
variant?: import("../ScalarButton/variants.js").Variants["variant"];
|
|
267
267
|
type?: "button" | "submit" | "reset";
|
|
@@ -280,7 +280,7 @@ declare const meta: {
|
|
|
280
280
|
}, Readonly<{
|
|
281
281
|
disabled?: boolean;
|
|
282
282
|
fullWidth?: boolean;
|
|
283
|
-
loading?: import("../ScalarLoading").LoadingState;
|
|
283
|
+
loading?: import("../ScalarLoading").LoadingState | undefined;
|
|
284
284
|
size?: import("../ScalarButton/variants.js").Variants["size"];
|
|
285
285
|
variant?: import("../ScalarButton/variants.js").Variants["variant"];
|
|
286
286
|
type?: "button" | "submit" | "reset";
|
|
@@ -296,7 +296,7 @@ declare const meta: {
|
|
|
296
296
|
} & import("vue").ComponentOptionsBase<Readonly<{
|
|
297
297
|
disabled?: boolean;
|
|
298
298
|
fullWidth?: boolean;
|
|
299
|
-
loading?: import("../ScalarLoading").LoadingState;
|
|
299
|
+
loading?: import("../ScalarLoading").LoadingState | undefined;
|
|
300
300
|
size?: import("../ScalarButton/variants.js").Variants["size"];
|
|
301
301
|
variant?: import("../ScalarButton/variants.js").Variants["variant"];
|
|
302
302
|
type?: "button" | "submit" | "reset";
|
package/dist/index.js
CHANGED
|
@@ -1,118 +1,128 @@
|
|
|
1
1
|
/* empty css */
|
|
2
2
|
import { useBindCx as l } from "./hooks/useBindCx.js";
|
|
3
|
-
import { compose as
|
|
4
|
-
import { default as
|
|
3
|
+
import { compose as d, cva as u, cx as p, tw as s } from "./cva.js";
|
|
4
|
+
import { default as c } from "./components/ScalarButton/ScalarButton.vue.js";
|
|
5
5
|
import { default as S } from "./components/ScalarCodeBlock/ScalarCodeBlock.vue.js";
|
|
6
6
|
/* empty css */
|
|
7
7
|
import { default as i } from "./components/ScalarColorModeToggle/ScalarColorModeToggle.vue.js";
|
|
8
8
|
import { default as T } from "./components/ScalarCombobox/ScalarCombobox.vue.js";
|
|
9
|
-
import { default as
|
|
9
|
+
import { default as g } from "./components/ScalarCombobox/ScalarComboboxMultiselect.vue.js";
|
|
10
10
|
import { default as C } from "./components/ScalarContextMenu/ScalarContextMenu.vue.js";
|
|
11
|
-
import { default as
|
|
11
|
+
import { default as L } from "./components/ScalarDropdown/ScalarDropdown.vue.js";
|
|
12
12
|
import { default as P } from "./components/ScalarErrorBoundary/ScalarErrorBoundary.vue.js";
|
|
13
13
|
import { default as D } from "./components/ScalarHeader/ScalarHeader.vue.js";
|
|
14
14
|
import { default as h } from "./components/ScalarHeader/ScalarHeaderButton.vue.js";
|
|
15
15
|
import { default as F } from "./components/ScalarIconButton/ScalarIconButton.vue.js";
|
|
16
16
|
import { default as H } from "./components/ScalarListbox/ScalarListbox.vue.js";
|
|
17
|
-
import { default as
|
|
17
|
+
import { default as G } from "./components/ScalarMarkdown/ScalarMarkdown.vue.js";
|
|
18
18
|
/* empty css */
|
|
19
|
-
import { default as
|
|
20
|
-
import { default as
|
|
21
|
-
import { default as
|
|
22
|
-
import { default as
|
|
19
|
+
import { default as V } from "./components/ScalarMenu/ScalarMenu.vue.js";
|
|
20
|
+
import { default as _ } from "./components/ScalarMenu/ScalarMenuTeamPicker.vue.js";
|
|
21
|
+
import { default as q } from "./components/ScalarPopover/ScalarPopover.vue.js";
|
|
22
|
+
import { default as A } from "./components/ScalarSearchResults/ScalarSearchResultList.vue.js";
|
|
23
23
|
import { default as K } from "./components/ScalarSearchResults/ScalarSearchResultItem.vue.js";
|
|
24
24
|
import { default as Q } from "./components/ScalarSidebar/ScalarSidebar.vue.js";
|
|
25
25
|
import { default as W } from "./components/ScalarSidebar/ScalarSidebarFooter.vue.js";
|
|
26
|
-
import { default as Z } from "./components/
|
|
27
|
-
import { default as aa } from "./components/
|
|
28
|
-
import { default as oa } from "./components/
|
|
29
|
-
import { default as ta } from "./components/
|
|
30
|
-
import {
|
|
31
|
-
import { default as
|
|
32
|
-
import { default as sa } from "./components/
|
|
33
|
-
import { default as
|
|
34
|
-
import {
|
|
35
|
-
import { default as ia } from "./components/
|
|
36
|
-
import { default as Ta } from "./components/
|
|
37
|
-
import { default as
|
|
38
|
-
import { default as Ca } from "./components/
|
|
39
|
-
import { default as
|
|
40
|
-
import { default as Pa } from "./components/
|
|
41
|
-
import { default as Da } from "./components/
|
|
42
|
-
import { default as ha } from "./components/
|
|
43
|
-
import {
|
|
44
|
-
import { default as Ha } from "./components/
|
|
45
|
-
import { default as
|
|
46
|
-
import { default as
|
|
47
|
-
import {
|
|
48
|
-
import { default as
|
|
49
|
-
import { default as
|
|
50
|
-
import { default as Ka } from "./components/ScalarMenu/
|
|
51
|
-
import { default as Qa } from "./components/
|
|
52
|
-
import {
|
|
53
|
-
import { default as Za } from "./components/
|
|
54
|
-
import { default as ar } from "./components/
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
26
|
+
import { default as Z } from "./components/ScalarSidebar/ScalarSidebarButton.vue.js";
|
|
27
|
+
import { default as aa } from "./components/ScalarSidebar/ScalarSidebarGroup.vue.js";
|
|
28
|
+
import { default as oa } from "./components/ScalarSidebar/ScalarSidebarItem.vue.js";
|
|
29
|
+
import { default as ta } from "./components/ScalarSidebar/ScalarSidebarItems.vue.js";
|
|
30
|
+
import { default as fa } from "./components/ScalarTeleport/ScalarTeleportRoot.vue.js";
|
|
31
|
+
import { default as ua } from "./components/ScalarToggle/ScalarToggle.vue.js";
|
|
32
|
+
import { default as sa } from "./components/ScalarTooltip/ScalarTooltip.vue.js";
|
|
33
|
+
import { default as ca } from "./components/ScalarVirtualText/ScalarVirtualText.vue.js";
|
|
34
|
+
import { styles as Sa } from "./components/ScalarButton/variants.js";
|
|
35
|
+
import { default as ia } from "./components/ScalarColorModeToggle/ScalarColorModeToggleButton.vue.js";
|
|
36
|
+
import { default as Ta } from "./components/ScalarColorModeToggle/ScalarColorModeToggleIcon.vue.js";
|
|
37
|
+
import { default as ga } from "./components/ScalarDropdown/ScalarDropdownDivider.vue.js";
|
|
38
|
+
import { default as Ca } from "./components/ScalarDropdown/ScalarDropdownButton.vue.js";
|
|
39
|
+
import { default as La } from "./components/ScalarDropdown/ScalarDropdownItem.vue.js";
|
|
40
|
+
import { default as Pa } from "./components/ScalarDropdown/ScalarDropdownMenu.vue.js";
|
|
41
|
+
import { default as Da } from "./components/ScalarFloating/ScalarFloating.vue.js";
|
|
42
|
+
import { default as ha } from "./components/ScalarFloating/ScalarFloatingBackdrop.vue.js";
|
|
43
|
+
import { default as Fa } from "./components/ScalarIcon/ScalarIcon.vue.js";
|
|
44
|
+
import { default as Ha } from "./components/ScalarListbox/ScalarListboxItem.vue.js";
|
|
45
|
+
import { default as Ga } from "./components/ScalarListbox/ScalarListboxCheckbox.vue.js";
|
|
46
|
+
import { default as Va } from "./components/ScalarLoading/ScalarLoading.vue.js";
|
|
47
|
+
import { useLoadingState as _a } from "./components/ScalarLoading/ScalarLoading.vue2.js";
|
|
48
|
+
import { default as qa } from "./components/ScalarMenu/ScalarMenuButton.vue.js";
|
|
49
|
+
import { default as Aa } from "./components/ScalarMenu/ScalarMenuSection.vue.js";
|
|
50
|
+
import { default as Ka } from "./components/ScalarMenu/ScalarMenuLink.vue.js";
|
|
51
|
+
import { default as Qa } from "./components/ScalarMenu/ScalarMenuProduct.vue.js";
|
|
52
|
+
import { default as Wa } from "./components/ScalarMenu/ScalarMenuProducts.vue.js";
|
|
53
|
+
import { default as Za } from "./components/ScalarMenu/ScalarMenuTeamProfile.vue.js";
|
|
54
|
+
import { default as ar } from "./components/ScalarMenu/ScalarMenuResources.vue.js";
|
|
55
|
+
import { default as or } from "./components/ScalarModal/ScalarModal.vue.js";
|
|
56
|
+
import { useModal as tr } from "./components/ScalarModal/ScalarModal.vue2.js";
|
|
57
|
+
import { default as fr } from "./components/ScalarSearchInput/ScalarSearchInput.vue.js";
|
|
58
|
+
import { default as ur } from "./components/ScalarSidebar/ScalarSidebarGroupToggle.vue.js";
|
|
59
|
+
import { default as sr } from "./components/ScalarTeleport/ScalarTeleport.vue.js";
|
|
60
|
+
import { TELEPORT_SYMBOL as cr, useProvideTeleport as xr, useTeleport as Sr } from "./components/ScalarTeleport/useTeleport.js";
|
|
61
|
+
import { default as ir } from "./components/ScalarTextField/ScalarTextField.vue.js";
|
|
62
|
+
import { addScalarClassesToHeadless as Tr } from "./helpers/add-scalar-classes.js";
|
|
58
63
|
export {
|
|
59
|
-
|
|
64
|
+
c as ScalarButton,
|
|
60
65
|
S as ScalarCodeBlock,
|
|
61
66
|
i as ScalarColorModeToggle,
|
|
62
|
-
|
|
63
|
-
|
|
67
|
+
ia as ScalarColorModeToggleButton,
|
|
68
|
+
Ta as ScalarColorModeToggleIcon,
|
|
64
69
|
T as ScalarCombobox,
|
|
65
|
-
|
|
70
|
+
g as ScalarComboboxMultiselect,
|
|
66
71
|
C as ScalarContextMenu,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
+
L as ScalarDropdown,
|
|
73
|
+
Ca as ScalarDropdownButton,
|
|
74
|
+
ga as ScalarDropdownDivider,
|
|
75
|
+
La as ScalarDropdownItem,
|
|
76
|
+
Pa as ScalarDropdownMenu,
|
|
72
77
|
P as ScalarErrorBoundary,
|
|
73
|
-
|
|
74
|
-
|
|
78
|
+
Da as ScalarFloating,
|
|
79
|
+
ha as ScalarFloatingBackdrop,
|
|
75
80
|
D as ScalarHeader,
|
|
76
81
|
h as ScalarHeaderButton,
|
|
77
|
-
|
|
82
|
+
Fa as ScalarIcon,
|
|
78
83
|
F as ScalarIconButton,
|
|
79
84
|
H as ScalarListbox,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
85
|
+
Ga as ScalarListboxCheckbox,
|
|
86
|
+
Ha as ScalarListboxItem,
|
|
87
|
+
Va as ScalarLoading,
|
|
88
|
+
G as ScalarMarkdown,
|
|
89
|
+
V as ScalarMenu,
|
|
90
|
+
qa as ScalarMenuButton,
|
|
91
|
+
Ka as ScalarMenuLink,
|
|
92
|
+
Qa as ScalarMenuProduct,
|
|
93
|
+
Wa as ScalarMenuProducts,
|
|
94
|
+
ar as ScalarMenuResources,
|
|
95
|
+
Aa as ScalarMenuSection,
|
|
96
|
+
_ as ScalarMenuTeamPicker,
|
|
97
|
+
Za as ScalarMenuTeamProfile,
|
|
98
|
+
or as ScalarModal,
|
|
99
|
+
q as ScalarPopover,
|
|
100
|
+
fr as ScalarSearchInput,
|
|
96
101
|
K as ScalarSearchResultItem,
|
|
97
|
-
|
|
102
|
+
A as ScalarSearchResultList,
|
|
98
103
|
Q as ScalarSidebar,
|
|
104
|
+
Z as ScalarSidebarButton,
|
|
99
105
|
W as ScalarSidebarFooter,
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
106
|
+
aa as ScalarSidebarGroup,
|
|
107
|
+
ur as ScalarSidebarGroupToggle,
|
|
108
|
+
oa as ScalarSidebarItem,
|
|
109
|
+
ta as ScalarSidebarItems,
|
|
110
|
+
sr as ScalarTeleport,
|
|
111
|
+
fa as ScalarTeleportRoot,
|
|
112
|
+
ir as ScalarTextField,
|
|
113
|
+
ua as ScalarToggle,
|
|
114
|
+
sa as ScalarTooltip,
|
|
115
|
+
ca as ScalarVirtualText,
|
|
116
|
+
cr as TELEPORT_SYMBOL,
|
|
117
|
+
Tr as addScalarClassesToHeadless,
|
|
118
|
+
d as compose,
|
|
119
|
+
u as cva,
|
|
110
120
|
p as cx,
|
|
111
|
-
|
|
121
|
+
Sa as styles,
|
|
112
122
|
s as tw,
|
|
113
123
|
l as useBindCx,
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
124
|
+
_a as useLoadingState,
|
|
125
|
+
tr as useModal,
|
|
126
|
+
xr as useProvideTeleport,
|
|
127
|
+
Sr as useTeleport
|
|
118
128
|
};
|