@scalar/components 0.13.24 → 0.13.26
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/variants.d.ts.map +1 -1
- package/dist/components/ScalarButton/variants.js +2 -8
- package/dist/components/ScalarColorModeToggle/ScalarColorModeToggleIcon.vue.d.ts +1 -1
- package/dist/components/ScalarColorModeToggle/ScalarColorModeToggleIcon.vue.d.ts.map +1 -1
- package/dist/components/ScalarColorModeToggle/ScalarColorModeToggleIcon.vue.js +2 -2
- package/dist/components/ScalarColorModeToggle/ScalarColorModeToggleIcon.vue2.js +14 -11
- package/dist/components/ScalarCombobox/types.d.ts.map +1 -1
- package/dist/components/ScalarFileUpload/ScalarFileUpload.stories.d.ts.map +1 -1
- package/dist/components/ScalarFileUpload/types.d.ts.map +1 -1
- package/dist/components/ScalarFloating/useResizeWithTarget.d.ts.map +1 -1
- package/dist/components/ScalarFloating/useResizeWithTarget.js +2 -6
- package/dist/components/ScalarIcon/ScalarIcon.stories.d.ts +1 -1
- package/dist/components/ScalarIcon/icons/Alert.svg.js +21 -0
- package/dist/components/ScalarIcon/icons/Markdown.svg.js +19 -0
- package/dist/components/ScalarIcon/icons/NotAllowed.svg.js +21 -0
- package/dist/components/ScalarIcon/icons/index.d.ts +1 -1
- package/dist/components/ScalarIcon/icons/index.d.ts.map +1 -1
- package/dist/components/ScalarIcon/utils/index.js +272 -266
- package/dist/components/ScalarIconButton/ScalarIconButton.stories.d.ts +1 -1
- package/dist/components/ScalarMenu/ScalarMenuTeamPicker.vue.d.ts.map +1 -1
- package/dist/components/ScalarMenu/ScalarMenuTeamPicker.vue.js +6 -6
- package/dist/components/ScalarModal/ScalarModal.stories.d.ts +10 -12
- package/dist/components/ScalarModal/ScalarModal.stories.d.ts.map +1 -1
- package/dist/components/ScalarModal/ScalarModal.vue.d.ts +3 -5
- package/dist/components/ScalarModal/ScalarModal.vue.d.ts.map +1 -1
- package/dist/components/ScalarModal/ScalarModal.vue.js +4 -4
- package/dist/components/ScalarModal/ScalarModal.vue2.js +42 -47
- package/dist/components/ScalarSearchInput/ScalarSearchInput.vue.d.ts.map +1 -1
- package/dist/components/ScalarSearchInput/ScalarSearchInput.vue.js +2 -2
- package/dist/components/ScalarSearchInput/ScalarSearchInput.vue2.js +34 -31
- package/dist/components/ScalarSearchResults/ScalarSearchResultItem.vue.d.ts.map +1 -1
- package/dist/components/ScalarSearchResults/ScalarSearchResultItem.vue.js +5 -8
- package/dist/components/ScalarSidebar/ScalarSidebar.stories.d.ts.map +1 -1
- package/dist/components/ScalarSidebar/ScalarSidebarButton.vue.d.ts.map +1 -1
- package/dist/components/ScalarSidebar/ScalarSidebarButton.vue.js +29 -30
- package/dist/components/ScalarSidebar/ScalarSidebarGroup.vue.d.ts +23 -6
- package/dist/components/ScalarSidebar/ScalarSidebarGroup.vue.d.ts.map +1 -1
- package/dist/components/ScalarSidebar/ScalarSidebarGroup.vue.js +37 -19
- package/dist/components/ScalarSidebar/ScalarSidebarIndent.vue.d.ts +20 -0
- package/dist/components/ScalarSidebar/ScalarSidebarIndent.vue.d.ts.map +1 -0
- package/dist/components/ScalarSidebar/ScalarSidebarIndent.vue.js +7 -0
- package/dist/components/ScalarSidebar/ScalarSidebarIndent.vue2.js +37 -0
- package/dist/components/ScalarSidebar/ScalarSidebarItem.vue.d.ts.map +1 -1
- package/dist/components/ScalarSidebar/ScalarSidebarItem.vue.js +8 -8
- package/dist/components/ScalarSidebar/ScalarSidebarItems.vue.js +3 -3
- package/dist/components/ScalarSidebar/types.d.ts +2 -0
- package/dist/components/ScalarSidebar/types.d.ts.map +1 -1
- package/dist/components/ScalarSidebar/useSidebarGroups.d.ts.map +1 -1
- package/dist/components/ScalarVirtualText/ScalarVirtualText.stories.d.ts.map +1 -1
- package/dist/helpers/add-scalar-classes.d.ts.map +1 -1
- package/dist/helpers/add-scalar-classes.js +1 -3
- package/dist/helpers/oas-utils.d.ts.map +1 -1
- package/dist/hooks/useBindCx.stories.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +6 -6
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as g, computed as b, openBlock as n, createBlock as u, unref as e, withCtx as r, createVNode as a, mergeProps as v, createElementVNode as
|
|
1
|
+
import { defineComponent as g, computed as b, openBlock as n, createBlock as u, unref as e, withCtx as r, createVNode as a, mergeProps as v, createElementVNode as x, createElementBlock as k, Fragment as C, renderList as S, createTextVNode as w } from "vue";
|
|
2
2
|
import { DropdownMenu as s } from "radix-vue/namespaced";
|
|
3
3
|
import V from "./ScalarMenuTeamProfile.vue.js";
|
|
4
4
|
import $ from "./ScalarMenuLink.vue.js";
|
|
5
5
|
import B from "../ScalarDropdown/ScalarDropdownMenu.vue.js";
|
|
6
6
|
import c from "../ScalarDropdown/ScalarDropdownButton.vue.js";
|
|
7
|
-
import
|
|
7
|
+
import z from "../ScalarListbox/ScalarListboxCheckbox.vue.js";
|
|
8
8
|
import p from "../ScalarIcon/ScalarIcon.vue.js";
|
|
9
9
|
const M = /* @__PURE__ */ g({
|
|
10
10
|
inheritAttrs: !1,
|
|
@@ -32,7 +32,7 @@ const M = /* @__PURE__ */ g({
|
|
|
32
32
|
icon: "UserSwitch"
|
|
33
33
|
}, o.$attrs), {
|
|
34
34
|
default: r(() => [
|
|
35
|
-
t[2] || (t[2] =
|
|
35
|
+
t[2] || (t[2] = x("div", null, "Change team", -1)),
|
|
36
36
|
a(e(p), {
|
|
37
37
|
class: "ml-auto text-c-2 -mr-0.25",
|
|
38
38
|
icon: "ChevronRight",
|
|
@@ -45,7 +45,7 @@ const M = /* @__PURE__ */ g({
|
|
|
45
45
|
default: r(() => [
|
|
46
46
|
a(e(s).SubContent, {
|
|
47
47
|
as: e(B),
|
|
48
|
-
class: "max-h-radix-popper",
|
|
48
|
+
class: "max-h-radix-popper z-context-plus",
|
|
49
49
|
sideOffset: 3
|
|
50
50
|
}, {
|
|
51
51
|
default: r(() => [
|
|
@@ -55,7 +55,7 @@ const M = /* @__PURE__ */ g({
|
|
|
55
55
|
class: "contents"
|
|
56
56
|
}, {
|
|
57
57
|
default: r(() => [
|
|
58
|
-
(n(!0),
|
|
58
|
+
(n(!0), k(C, null, S(o.teams, (l) => (n(), u(e(s).RadioItem, {
|
|
59
59
|
key: l.id,
|
|
60
60
|
as: e(c),
|
|
61
61
|
class: "group/item",
|
|
@@ -67,7 +67,7 @@ const M = /* @__PURE__ */ g({
|
|
|
67
67
|
label: l.label,
|
|
68
68
|
src: l.src
|
|
69
69
|
}, null, 8, ["label", "src"]),
|
|
70
|
-
a(e(
|
|
70
|
+
a(e(z), {
|
|
71
71
|
class: "ml-auto",
|
|
72
72
|
selected: l.id === m.value
|
|
73
73
|
}, null, 8, ["selected"])
|
|
@@ -11,10 +11,8 @@ declare const meta: {
|
|
|
11
11
|
bodyClass?: string;
|
|
12
12
|
maxWidth?: string;
|
|
13
13
|
size?: "sm" | "lg" | "xs" | "md" | "xl" | "full" | "xxs" | undefined;
|
|
14
|
-
variant?: "form" | "search" | "error" |
|
|
15
|
-
}> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
|
|
16
|
-
size: "sm" | "lg" | "xs" | "md" | "xl" | "full" | "xxs";
|
|
17
|
-
}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
14
|
+
variant?: "form" | "search" | "error" | undefined;
|
|
15
|
+
}> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
18
16
|
P: {};
|
|
19
17
|
B: {};
|
|
20
18
|
D: {};
|
|
@@ -27,10 +25,8 @@ declare const meta: {
|
|
|
27
25
|
bodyClass?: string;
|
|
28
26
|
maxWidth?: string;
|
|
29
27
|
size?: "sm" | "lg" | "xs" | "md" | "xl" | "full" | "xxs" | undefined;
|
|
30
|
-
variant?: "form" | "search" | "error" |
|
|
31
|
-
}> & Readonly<{}>, {}, {}, {}, {}, {
|
|
32
|
-
size: "sm" | "lg" | "xs" | "md" | "xl" | "full" | "xxs";
|
|
33
|
-
}>;
|
|
28
|
+
variant?: "form" | "search" | "error" | undefined;
|
|
29
|
+
}> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
34
30
|
__isFragment?: never;
|
|
35
31
|
__isTeleport?: never;
|
|
36
32
|
__isSuspense?: never;
|
|
@@ -40,16 +36,17 @@ declare const meta: {
|
|
|
40
36
|
bodyClass?: string;
|
|
41
37
|
maxWidth?: string;
|
|
42
38
|
size?: "sm" | "lg" | "xs" | "md" | "xl" | "full" | "xxs" | undefined;
|
|
43
|
-
variant?: "form" | "search" | "error" |
|
|
44
|
-
}> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
45
|
-
size: "sm" | "lg" | "xs" | "md" | "xl" | "full" | "xxs";
|
|
46
|
-
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
39
|
+
variant?: "form" | "search" | "error" | undefined;
|
|
40
|
+
}> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
47
41
|
$slots: {
|
|
48
42
|
default?(_: {}): any;
|
|
49
43
|
default?(_: {}): any;
|
|
50
44
|
};
|
|
51
45
|
});
|
|
52
46
|
tags: string[];
|
|
47
|
+
parameters: {
|
|
48
|
+
layout: string;
|
|
49
|
+
};
|
|
53
50
|
argTypes: {
|
|
54
51
|
size: {
|
|
55
52
|
control: "select";
|
|
@@ -64,5 +61,6 @@ declare const meta: {
|
|
|
64
61
|
export default meta;
|
|
65
62
|
type Story = StoryObj<typeof meta>;
|
|
66
63
|
export declare const Base: Story;
|
|
64
|
+
export declare const Search: Story;
|
|
67
65
|
export declare const Scrolling: Story;
|
|
68
66
|
//# sourceMappingURL=ScalarModal.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarModal.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarModal/ScalarModal.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAGrD,OAAoB,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"ScalarModal.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarModal/ScalarModal.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAGrD,OAAoB,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAIzD;;GAEG;AACH,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAW0B,CAAA;AAEpC,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,IAAI,EAAE,KA8BlB,CAAA;AAED,eAAO,MAAM,MAAM,EAAE,KA6CpB,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KAoDvB,CAAA"}
|
|
@@ -10,17 +10,15 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
10
10
|
bodyClass?: string;
|
|
11
11
|
maxWidth?: string;
|
|
12
12
|
size?: "sm" | "lg" | "xs" | "md" | "xl" | "full" | "xxs" | undefined;
|
|
13
|
-
variant?: "form" | "search" | "error" |
|
|
13
|
+
variant?: "form" | "search" | "error" | undefined;
|
|
14
14
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
15
15
|
state: ReturnType<typeof useModal>;
|
|
16
16
|
title?: string;
|
|
17
17
|
bodyClass?: string;
|
|
18
18
|
maxWidth?: string;
|
|
19
19
|
size?: "sm" | "lg" | "xs" | "md" | "xl" | "full" | "xxs" | undefined;
|
|
20
|
-
variant?: "form" | "search" | "error" |
|
|
21
|
-
}> & Readonly<{}>, {
|
|
22
|
-
size: "sm" | "lg" | "xs" | "md" | "xl" | "full" | "xxs";
|
|
23
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
20
|
+
variant?: "form" | "search" | "error" | undefined;
|
|
21
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
24
22
|
default?(_: {}): any;
|
|
25
23
|
default?(_: {}): any;
|
|
26
24
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarModal.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarModal/ScalarModal.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScalarModal.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarModal/ScalarModal.vue"],"names":[],"mappings":"AA6NA,+CAA+C;AAC/C,wBAAgB,QAAQ;;;;EAUvB;;WAOQ,UAAU,CAAC,OAAO,QAAQ,CAAC;YAC1B,MAAM;gBACF,MAAM;eACP,MAAM;;;;WAHV,UAAU,CAAC,OAAO,QAAQ,CAAC;YAC1B,MAAM;gBACF,MAAM;eACP,MAAM;;;;qBA2MW,GAAG;qBACH,GAAG;;AApNjC,wBA2PK;AAWL,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import o from "./ScalarModal.vue2.js";
|
|
2
|
-
import { useModal as
|
|
2
|
+
import { useModal as e } from "./ScalarModal.vue2.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const
|
|
5
|
+
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-12dc7570"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
p as default,
|
|
8
|
+
e as useModal
|
|
9
9
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as p, openBlock as l, createBlock as r, unref as a, withCtx as o, createElementVNode as x, normalizeClass as t, createVNode as i, normalizeStyle as w, createTextVNode as b, toDisplayString as y, createCommentVNode as m, createElementBlock as n, renderSlot as d, reactive as g } from "vue";
|
|
2
2
|
import { Dialog as z, DialogPanel as k, DialogTitle as C, DialogDescription as D } from "@headlessui/vue";
|
|
3
|
-
import { cva as
|
|
3
|
+
import { cva as f, cx as c } from "../../cva.js";
|
|
4
4
|
import S from "../ScalarIconButton/ScalarIconButton.vue.js";
|
|
5
5
|
const $ = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "close-button z-10 fixed right-2 top-2"
|
|
8
8
|
};
|
|
9
9
|
function E() {
|
|
10
|
-
return
|
|
10
|
+
return g({
|
|
11
11
|
open: !1,
|
|
12
12
|
show() {
|
|
13
13
|
this.open = !0;
|
|
@@ -17,7 +17,7 @@ function E() {
|
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
|
-
const M = /* @__PURE__ */
|
|
20
|
+
const M = /* @__PURE__ */ p({
|
|
21
21
|
__name: "ScalarModal",
|
|
22
22
|
props: {
|
|
23
23
|
state: {},
|
|
@@ -28,48 +28,43 @@ const M = /* @__PURE__ */ v({
|
|
|
28
28
|
variant: {}
|
|
29
29
|
},
|
|
30
30
|
setup(N) {
|
|
31
|
-
const
|
|
31
|
+
const u = f({
|
|
32
32
|
base: [
|
|
33
33
|
"scalar-modal",
|
|
34
|
-
"col relative mx-auto mb-0 rounded-lg bg-b-1 p-0 text-left leading-snug text-c-1 opacity-0 md:w-[calc(100vw-16px)] lg:w-[calc(100vw-32px)]"
|
|
34
|
+
"flex flex-col relative mx-auto mb-0 rounded-lg bg-b-1 p-0 text-left leading-snug text-c-1 opacity-0 w-[calc(100vw-12px)] md:w-[calc(100vw-16px)] lg:w-[calc(100vw-32px)]"
|
|
35
35
|
].join(" "),
|
|
36
36
|
variants: {
|
|
37
37
|
size: {
|
|
38
|
-
xxs: "mt-
|
|
39
|
-
xs: "mt-
|
|
40
|
-
sm: "mt-
|
|
41
|
-
md: "mt-
|
|
42
|
-
lg: "m-auto max-w-screen-lg",
|
|
43
|
-
xl: "m-auto max-w-screen-xl",
|
|
44
|
-
full: "full-size-styles mt-0 lg:w-full"
|
|
38
|
+
xxs: "mt-[20svh] max-h-[60svh] max-w-screen-xxs",
|
|
39
|
+
xs: "mt-[20svh] max-h-[60svh] max-w-screen-xs",
|
|
40
|
+
sm: "mt-[20svh] max-h-[60svh] max-w-screen-sm",
|
|
41
|
+
md: "mt-[20svh] max-h-[60svh] max-w-screen-md",
|
|
42
|
+
lg: "m-auto max-h-[80svh] max-w-screen-lg",
|
|
43
|
+
xl: "m-auto max-h-[90svh] max-w-screen-xl",
|
|
44
|
+
full: "full-size-styles max-h-dvh mt-0 lg:w-full"
|
|
45
45
|
},
|
|
46
46
|
variant: {
|
|
47
47
|
form: "scalar-modal-form",
|
|
48
|
-
|
|
49
|
-
search: "scalar-modal-search",
|
|
48
|
+
search: "scalar-modal-search mt-[15svh] max-h-[60svh] max-w-[540px]",
|
|
50
49
|
error: "scalar-modal-error"
|
|
51
50
|
}
|
|
52
51
|
}
|
|
53
|
-
}),
|
|
54
|
-
base: [
|
|
55
|
-
"scalar-modal-body",
|
|
56
|
-
"relative max-h-[calc(100dvh-240px)] rounded-lg rounded-t-none border-t-1/2 bg-b-1 p-3"
|
|
57
|
-
].join(" "),
|
|
52
|
+
}), v = f({
|
|
53
|
+
base: ["scalar-modal-body", "relative flex-1 min-h-0 p-3"].join(" "),
|
|
58
54
|
variants: {
|
|
59
55
|
variant: {
|
|
60
56
|
form: "overflow-visible",
|
|
61
|
-
|
|
62
|
-
search: "col !m-0 max-h-[440px] overflow-hidden p-0",
|
|
57
|
+
search: "col !m-0 overflow-hidden p-0",
|
|
63
58
|
error: "overflow-y-scroll"
|
|
64
59
|
},
|
|
65
60
|
size: {
|
|
66
|
-
xxs: "
|
|
67
|
-
xs: "
|
|
68
|
-
sm: "
|
|
69
|
-
md: "
|
|
70
|
-
lg: "
|
|
71
|
-
xl: "m-0
|
|
72
|
-
full: "
|
|
61
|
+
xxs: "",
|
|
62
|
+
xs: "",
|
|
63
|
+
sm: "",
|
|
64
|
+
md: "",
|
|
65
|
+
lg: "",
|
|
66
|
+
xl: "m-0 p-0",
|
|
67
|
+
full: " rounded-none"
|
|
73
68
|
}
|
|
74
69
|
}
|
|
75
70
|
});
|
|
@@ -77,10 +72,10 @@ const M = /* @__PURE__ */ v({
|
|
|
77
72
|
open: e.state.open,
|
|
78
73
|
onClose: s[1] || (s[1] = (h) => e.state.hide())
|
|
79
74
|
}, {
|
|
80
|
-
default:
|
|
75
|
+
default: o(() => [
|
|
81
76
|
x("div", {
|
|
82
|
-
class:
|
|
83
|
-
a(
|
|
77
|
+
class: t(
|
|
78
|
+
a(c)(
|
|
84
79
|
e.size === "full" ? "scalar-modal-layout-full" : "scalar-modal-layout",
|
|
85
80
|
"fixed left-0 top-0 flex items-start justify-center",
|
|
86
81
|
"z-[1001] h-[100dvh] w-[100dvw]",
|
|
@@ -90,44 +85,44 @@ const M = /* @__PURE__ */ v({
|
|
|
90
85
|
)
|
|
91
86
|
}, [
|
|
92
87
|
i(a(k), {
|
|
93
|
-
class:
|
|
94
|
-
style:
|
|
88
|
+
class: t(a(u)({ size: e.size, variant: e.variant })),
|
|
89
|
+
style: w({ maxWidth: e.maxWidth })
|
|
95
90
|
}, {
|
|
96
|
-
default:
|
|
91
|
+
default: o(() => [
|
|
97
92
|
e.title ? (l(), r(a(C), {
|
|
98
93
|
key: 0,
|
|
99
|
-
class:
|
|
94
|
+
class: "scalar-modal-header m-0 -mb-1 rounded-lg pt-3 px-3 text-left text-sm font-medium text-c-1"
|
|
100
95
|
}, {
|
|
101
|
-
default:
|
|
102
|
-
y(
|
|
96
|
+
default: o(() => [
|
|
97
|
+
b(y(e.title), 1)
|
|
103
98
|
]),
|
|
104
99
|
_: 1
|
|
105
|
-
}
|
|
106
|
-
e.size === "full" ? (l(),
|
|
100
|
+
})) : m("", !0),
|
|
101
|
+
e.size === "full" ? (l(), n("div", {
|
|
107
102
|
key: 1,
|
|
108
|
-
class:
|
|
103
|
+
class: t(e.bodyClass)
|
|
109
104
|
}, [
|
|
110
|
-
|
|
105
|
+
d(e.$slots, "default", {}, void 0, !0)
|
|
111
106
|
], 2)) : (l(), r(a(D), {
|
|
112
107
|
key: 2,
|
|
113
|
-
class:
|
|
108
|
+
class: t(a(c)(a(v)({ size: e.size, variant: e.variant }), e.bodyClass))
|
|
114
109
|
}, {
|
|
115
|
-
default:
|
|
116
|
-
|
|
110
|
+
default: o(() => [
|
|
111
|
+
d(e.$slots, "default", {}, void 0, !0)
|
|
117
112
|
]),
|
|
118
113
|
_: 3
|
|
119
114
|
}, 8, ["class"]))
|
|
120
115
|
]),
|
|
121
116
|
_: 3
|
|
122
117
|
}, 8, ["class", "style"]),
|
|
123
|
-
e.size === "full" ? (l(),
|
|
118
|
+
e.size === "full" ? (l(), n("div", $, [
|
|
124
119
|
i(a(S), {
|
|
125
120
|
class: "hover:bg-b-3 focus:outline-none",
|
|
126
121
|
icon: "Close",
|
|
127
122
|
label: "Clear Search",
|
|
128
123
|
onClose: s[0] || (s[0] = (h) => e.state.hide())
|
|
129
124
|
})
|
|
130
|
-
])) :
|
|
125
|
+
])) : m("", !0)
|
|
131
126
|
], 2)
|
|
132
127
|
]),
|
|
133
128
|
_: 3
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarSearchInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSearchInput/ScalarSearchInput.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScalarSearchInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSearchInput/ScalarSearchInput.vue"],"names":[],"mappings":"AAgHA,OAAO,EAAE,KAAK,YAAY,EAAiB,MAAM,kBAAkB,CAAA;AAInE,KAAK,WAAW,GAAG;IACjB,OAAO,CAAC,EAAE,YAAY,CAAA;IACtB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAC;;;;;;;;;AA4KF,wBAQG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ScalarSearchInput.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const c = /* @__PURE__ */ r(o, [["__scopeId", "data-v-080483f0"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
c as default
|
|
7
7
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { cva as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as h, ref as v, computed as g, useAttrs as k, openBlock as s, createElementBlock as S, normalizeClass as i, unref as a, createBlock as o, createCommentVNode as c, createElementVNode as V, mergeProps as y, withModifiers as C } from "vue";
|
|
2
|
+
import { cva as z, cx as u } from "../../cva.js";
|
|
3
|
+
import B from "../ScalarIcon/ScalarIcon.vue.js";
|
|
4
|
+
import I from "../ScalarLoading/ScalarLoading.vue.js";
|
|
5
|
+
import w from "../ScalarIconButton/ScalarIconButton.vue.js";
|
|
6
|
+
const E = ["aria-label", "value"], M = /* @__PURE__ */ h({
|
|
7
7
|
inheritAttrs: !1,
|
|
8
8
|
__name: "ScalarSearchInput",
|
|
9
9
|
props: {
|
|
@@ -13,15 +13,18 @@ const I = ["aria-label", "value"], q = /* @__PURE__ */ b({
|
|
|
13
13
|
label: {}
|
|
14
14
|
},
|
|
15
15
|
emits: ["update:modelValue"],
|
|
16
|
-
setup(
|
|
17
|
-
const
|
|
18
|
-
function
|
|
19
|
-
|
|
16
|
+
setup(N, { expose: d, emit: p }) {
|
|
17
|
+
const r = p, l = v(null);
|
|
18
|
+
function m(e) {
|
|
19
|
+
r("update:modelValue", e.target.value);
|
|
20
20
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
function f() {
|
|
22
|
+
r("update:modelValue", ""), l.value && l.value.focus();
|
|
23
|
+
}
|
|
24
|
+
const t = g(() => {
|
|
25
|
+
const { class: e, ...n } = k();
|
|
26
|
+
return { class: e || "", rest: n };
|
|
27
|
+
}), b = z({
|
|
25
28
|
base: "search-background flex items-center rounded border text-sm font-medium has-[:focus-visible]:bg-b-1 has-[:focus-visible]:outline",
|
|
26
29
|
variants: {
|
|
27
30
|
sidebar: {
|
|
@@ -33,26 +36,26 @@ const I = ["aria-label", "value"], q = /* @__PURE__ */ b({
|
|
|
33
36
|
return d({
|
|
34
37
|
focus: () => {
|
|
35
38
|
var e;
|
|
36
|
-
(e =
|
|
39
|
+
(e = l.value) == null || e.focus();
|
|
37
40
|
},
|
|
38
41
|
blur: () => {
|
|
39
42
|
var e;
|
|
40
|
-
(e =
|
|
43
|
+
(e = l.value) == null || e.blur();
|
|
41
44
|
}
|
|
42
|
-
}), (e,
|
|
43
|
-
class: i(a(
|
|
45
|
+
}), (e, n) => (s(), S("label", {
|
|
46
|
+
class: i(a(u)(a(b)({ sidebar: e.sidebar }), t.value.class))
|
|
44
47
|
}, [
|
|
45
|
-
e.sidebar ? (s(), o(a(
|
|
48
|
+
e.sidebar ? (s(), o(a(B), {
|
|
46
49
|
key: 0,
|
|
47
50
|
class: "text-c-2",
|
|
48
51
|
icon: "Search",
|
|
49
52
|
size: "xs",
|
|
50
53
|
thickness: "2.5"
|
|
51
|
-
})) :
|
|
52
|
-
|
|
54
|
+
})) : c("", !0),
|
|
55
|
+
V("input", y({
|
|
53
56
|
ref_key: "inputRef",
|
|
54
|
-
ref:
|
|
55
|
-
},
|
|
57
|
+
ref: l
|
|
58
|
+
}, t.value.rest, {
|
|
56
59
|
"aria-label": e.label ?? "Enter search query",
|
|
57
60
|
autocapitalize: "off",
|
|
58
61
|
autocomplete: "off",
|
|
@@ -62,24 +65,24 @@ const I = ["aria-label", "value"], q = /* @__PURE__ */ b({
|
|
|
62
65
|
spellcheck: "false",
|
|
63
66
|
type: "search",
|
|
64
67
|
value: e.modelValue,
|
|
65
|
-
onInput:
|
|
66
|
-
}), null, 16,
|
|
67
|
-
e.loading && e.loading.isLoading ? (s(), o(a(
|
|
68
|
+
onInput: m
|
|
69
|
+
}), null, 16, E),
|
|
70
|
+
e.loading && e.loading.isLoading ? (s(), o(a(I), {
|
|
68
71
|
key: 1,
|
|
69
72
|
class: "mr-3 self-center",
|
|
70
73
|
loadingState: e.loading,
|
|
71
74
|
size: "md"
|
|
72
|
-
}, null, 8, ["loadingState"])) : e.modelValue ? (s(), o(a(
|
|
75
|
+
}, null, 8, ["loadingState"])) : e.modelValue ? (s(), o(a(w), {
|
|
73
76
|
key: 2,
|
|
74
|
-
class: i(a(
|
|
77
|
+
class: i(a(u)("p-0", e.sidebar ? "h-4 w-4" : "h-5 w-5")),
|
|
75
78
|
icon: "Close",
|
|
76
79
|
label: "Clear Search",
|
|
77
80
|
thickness: e.sidebar ? "1.75" : "1.5",
|
|
78
|
-
onClick:
|
|
79
|
-
}, null, 8, ["class", "thickness"])) :
|
|
81
|
+
onClick: C(f, ["stop", "prevent"])
|
|
82
|
+
}, null, 8, ["class", "thickness"])) : c("", !0)
|
|
80
83
|
], 2));
|
|
81
84
|
}
|
|
82
85
|
});
|
|
83
86
|
export {
|
|
84
|
-
|
|
87
|
+
M as default
|
|
85
88
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarSearchResultItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSearchResults/ScalarSearchResultItem.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScalarSearchResultItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSearchResults/ScalarSearchResultItem.vue"],"names":[],"mappings":"AA2DA,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,eAAe,CAAA;AAIrD,KAAK,WAAW,GAAG;IACjB,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAC;AAWF,iBAAS,cAAc;WAiGT,OAAO,IAA6B;;sBAXxB,GAAG;yBACA,GAAG;uBACL,GAAG;6BACG,GAAG;;;;EAanC;AAUD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import { defineComponent as a, openBlock as t, createElementBlock as s, createElementVNode as o, normalizeProps as d, guardReactiveProps as m, unref as
|
|
1
|
+
import { defineComponent as a, openBlock as t, createElementBlock as s, createElementVNode as o, normalizeProps as d, guardReactiveProps as m, unref as c, renderSlot as n, createBlock as p, createCommentVNode as r } from "vue";
|
|
2
2
|
import { useBindCx as u } from "../../hooks/useBindCx.js";
|
|
3
3
|
import f from "../ScalarIcon/ScalarIcon.vue.js";
|
|
4
|
-
const h = {
|
|
5
|
-
class: "contents",
|
|
6
|
-
role: "option"
|
|
7
|
-
}, v = {
|
|
4
|
+
const h = { class: "contents" }, v = {
|
|
8
5
|
key: 0,
|
|
9
6
|
class: "flex h-fit items-center text-sm font-medium text-c-3 group-hover:text-c-1"
|
|
10
7
|
}, x = { class: "flex min-w-0 flex-1 flex-col gap-0.75" }, _ = { class: "flex items-center gap-1" }, g = { class: "flex-1 truncate text-sm font-medium" }, k = {
|
|
@@ -21,10 +18,10 @@ const h = {
|
|
|
21
18
|
active: { type: Boolean }
|
|
22
19
|
},
|
|
23
20
|
setup($) {
|
|
24
|
-
const { cx:
|
|
21
|
+
const { cx: l } = u();
|
|
25
22
|
return (e, i) => (t(), s("li", h, [
|
|
26
23
|
o("a", d(m(
|
|
27
|
-
l
|
|
24
|
+
c(l)(
|
|
28
25
|
"group flex cursor-pointer gap-2.5 rounded px-3 py-1.5 no-underline hover:bg-b-2",
|
|
29
26
|
{
|
|
30
27
|
"bg-b-2": e.active
|
|
@@ -33,7 +30,7 @@ const h = {
|
|
|
33
30
|
)), [
|
|
34
31
|
e.icon ? (t(), s("div", v, [
|
|
35
32
|
n(e.$slots, "icon", {}, () => [
|
|
36
|
-
e.icon ? (t(), p(
|
|
33
|
+
e.icon ? (t(), p(c(f), {
|
|
37
34
|
key: 0,
|
|
38
35
|
icon: e.icon,
|
|
39
36
|
size: "sm"
|
|
@@ -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;AAUrD,QAAA,MAAM,IAAI,EAAE,
|
|
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,IAsBX,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,KAqF9B,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAkBxB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarSidebarButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/ScalarSidebarButton.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScalarSidebarButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/ScalarSidebarButton.vue"],"names":[],"mappings":"AAmFA,OAAO,KAAK,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAI7E;;;;;;;;;;;;;;;;;;;;;GAqBG;;AACH,wBA4HC;AAWD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as r, openBlock as s, createBlock as c, resolveDynamicComponent as u, mergeProps as f, unref as o, withCtx as m, renderSlot as t, createVNode as n, createElementVNode as p, createElementBlock as a, createCommentVNode as l } from "vue";
|
|
2
2
|
import { cva as b } from "../../cva.js";
|
|
3
3
|
import { useBindCx as v } from "../../hooks/useBindCx.js";
|
|
4
|
+
import y from "./ScalarSidebarIndent.vue.js";
|
|
4
5
|
import h from "../ScalarIcon/ScalarIcon.vue.js";
|
|
5
|
-
const
|
|
6
|
+
const B = { class: "flex items-center gap-1 flex-1 py-2 leading-5" }, g = {
|
|
6
7
|
key: 0,
|
|
7
8
|
class: "size-3.5"
|
|
8
|
-
},
|
|
9
|
-
|
|
9
|
+
}, S = { key: 0 }, $ = {}, w = /* @__PURE__ */ r({
|
|
10
|
+
...$,
|
|
10
11
|
inheritAttrs: !1,
|
|
11
12
|
__name: "ScalarSidebarButton",
|
|
12
13
|
props: {
|
|
@@ -16,48 +17,46 @@ const y = { class: "flex items-center gap-1 flex-1" }, B = {
|
|
|
16
17
|
disabled: { type: Boolean },
|
|
17
18
|
indent: { default: 0 }
|
|
18
19
|
},
|
|
19
|
-
setup(
|
|
20
|
-
const
|
|
21
|
-
base: ["rounded
|
|
20
|
+
setup(k) {
|
|
21
|
+
const d = b({
|
|
22
|
+
base: ["group/button flex rounded px-1.5 font-medium text-c-2 no-underline"],
|
|
22
23
|
variants: {
|
|
23
24
|
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
|
-
}
|
|
25
|
+
disabled: { true: "cursor-auto" }
|
|
34
26
|
},
|
|
35
27
|
compoundVariants: [
|
|
36
28
|
{ selected: !1, disabled: !1, class: "hover:bg-b-2" }
|
|
37
29
|
],
|
|
38
|
-
defaultVariants: { selected: !1, disabled: !1
|
|
30
|
+
defaultVariants: { selected: !1, disabled: !1 }
|
|
39
31
|
}), { cx: i } = v();
|
|
40
|
-
return (e,
|
|
32
|
+
return (e, C) => (s(), c(u(e.is), f({
|
|
41
33
|
"aria-level": e.indent,
|
|
34
|
+
"aria-selected": e.selected,
|
|
42
35
|
type: e.is === "button" ? "button" : void 0
|
|
43
|
-
}, o(i)(o(
|
|
44
|
-
default:
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
36
|
+
}, o(i)(o(d)({ selected: e.selected, disabled: e.disabled }))), {
|
|
37
|
+
default: m(() => [
|
|
38
|
+
t(e.$slots, "indent", {}, () => [
|
|
39
|
+
n(y, {
|
|
40
|
+
indent: e.indent,
|
|
41
|
+
selected: e.selected
|
|
42
|
+
}, null, 8, ["indent", "selected"])
|
|
43
|
+
]),
|
|
44
|
+
p("div", B, [
|
|
45
|
+
e.icon || e.$slots.icon ? (s(), a("div", g, [
|
|
46
|
+
t(e.$slots, "icon", {}, () => [
|
|
47
|
+
n(o(h), { icon: e.icon }, null, 8, ["icon"])
|
|
49
48
|
])
|
|
50
49
|
])) : l("", !0),
|
|
51
|
-
|
|
50
|
+
t(e.$slots, "default")
|
|
52
51
|
]),
|
|
53
|
-
e.$slots.aside ? (
|
|
54
|
-
|
|
52
|
+
e.$slots.aside ? (s(), a("div", S, [
|
|
53
|
+
t(e.$slots, "aside")
|
|
55
54
|
])) : l("", !0)
|
|
56
55
|
]),
|
|
57
56
|
_: 3
|
|
58
|
-
}, 16, ["aria-level", "type"]));
|
|
57
|
+
}, 16, ["aria-level", "aria-selected", "type"]));
|
|
59
58
|
}
|
|
60
59
|
});
|
|
61
60
|
export {
|
|
62
|
-
|
|
61
|
+
w as default
|
|
63
62
|
};
|