@scalar/components 0.12.54 → 0.12.56
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/README.md +6 -6
- package/dist/components/ScalarIcon/ScalarIcon.stories.d.ts +1 -1
- package/dist/components/ScalarIcon/icons/Unwatch.svg.js +21 -0
- package/dist/components/ScalarIcon/icons/Watch.svg.js +21 -0
- package/dist/components/ScalarIcon/icons/icons.d.ts +1 -1
- package/dist/components/ScalarIcon/icons/icons.d.ts.map +1 -1
- package/dist/components/ScalarIcon/icons/index.js +96 -92
- package/dist/components/ScalarIconButton/ScalarIconButton.stories.d.ts +1 -1
- package/dist/components/ScalarModal/ScalarModal.vue.d.ts +2 -1
- package/dist/components/ScalarModal/ScalarModal.vue.d.ts.map +1 -1
- package/dist/components/ScalarModal/ScalarModal.vue.js +3 -3
- package/dist/components/ScalarModal/ScalarModal.vue2.js +61 -45
- package/dist/components/ScalarSearchInput/ScalarSearchInput.stories.d.ts +44 -164
- package/dist/components/ScalarSearchInput/ScalarSearchInput.stories.d.ts.map +1 -1
- package/dist/components/ScalarSearchInput/ScalarSearchInput.vue.d.ts +3 -10
- package/dist/components/ScalarSearchInput/ScalarSearchInput.vue.d.ts.map +1 -1
- package/dist/components/ScalarSearchInput/ScalarSearchInput.vue.js +34 -36
- package/dist/components/ScalarSearchResults/ScalarSearchResultItem.vue.d.ts.map +1 -1
- package/dist/components/ScalarSearchResults/ScalarSearchResultItem.vue.js +12 -9
- package/dist/components/ScalarSearchResults/ScalarSearchResultList.vue.d.ts.map +1 -1
- package/dist/components/ScalarSearchResults/ScalarSearchResultList.vue.js +2 -1
- package/dist/components/ScalarToggle/ScalarToggle.spec.d.ts +2 -0
- package/dist/components/ScalarToggle/ScalarToggle.spec.d.ts.map +1 -0
- package/dist/components/ScalarToggle/ScalarToggle.stories.d.ts +92 -0
- package/dist/components/ScalarToggle/ScalarToggle.stories.d.ts.map +1 -0
- package/dist/components/ScalarToggle/ScalarToggle.vue.d.ts +19 -0
- package/dist/components/ScalarToggle/ScalarToggle.vue.d.ts.map +1 -0
- package/dist/components/ScalarToggle/ScalarToggle.vue.js +54 -0
- package/dist/components/ScalarToggle/ScalarToggle.vue2.js +4 -0
- package/dist/components/ScalarToggle/index.d.ts +2 -0
- package/dist/components/ScalarToggle/index.d.ts.map +1 -0
- package/dist/components/ScalarTooltip/ScalarTooltip.stories.d.ts +12 -0
- package/dist/components/ScalarTooltip/ScalarTooltip.stories.d.ts.map +1 -1
- package/dist/components/ScalarTooltip/ScalarTooltip.vue.d.ts +2 -0
- package/dist/components/ScalarTooltip/ScalarTooltip.vue.d.ts.map +1 -1
- package/dist/components/ScalarTooltip/ScalarTooltip.vue.js +15 -13
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +20 -18
- package/dist/style.css +1 -1
- package/package.json +2 -2
|
@@ -1,202 +1,82 @@
|
|
|
1
1
|
import type { StoryObj } from '@storybook/vue3';
|
|
2
2
|
declare const meta: {
|
|
3
|
-
component: {
|
|
4
|
-
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
5
|
-
loading?: import("../ScalarLoading").LoadingState;
|
|
6
|
-
modelValue?: string;
|
|
7
|
-
sidebar?: boolean;
|
|
8
|
-
}> & Readonly<{
|
|
9
|
-
"onUpdate:modelValue"?: ((v: string) => any) | undefined;
|
|
10
|
-
}>, {
|
|
11
|
-
focus: () => void;
|
|
12
|
-
blur: () => void;
|
|
13
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
14
|
-
"update:modelValue": (v: string) => any;
|
|
15
|
-
}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
16
|
-
P: {};
|
|
17
|
-
B: {};
|
|
18
|
-
D: {};
|
|
19
|
-
C: {};
|
|
20
|
-
M: {};
|
|
21
|
-
Defaults: {};
|
|
22
|
-
}, Readonly<{
|
|
23
|
-
loading?: import("../ScalarLoading").LoadingState;
|
|
24
|
-
modelValue?: string;
|
|
25
|
-
sidebar?: boolean;
|
|
26
|
-
}> & Readonly<{
|
|
27
|
-
"onUpdate:modelValue"?: ((v: string) => any) | undefined;
|
|
28
|
-
}>, {
|
|
29
|
-
focus: () => void;
|
|
30
|
-
blur: () => void;
|
|
31
|
-
}, {}, {}, {}, {}>;
|
|
32
|
-
__isFragment?: never;
|
|
33
|
-
__isTeleport?: never;
|
|
34
|
-
__isSuspense?: never;
|
|
35
|
-
} & import("vue").ComponentOptionsBase<Readonly<{
|
|
3
|
+
component: import("vue").DefineComponent<{
|
|
36
4
|
loading?: import("../ScalarLoading").LoadingState;
|
|
37
5
|
modelValue?: string;
|
|
38
6
|
sidebar?: boolean;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}>, {
|
|
7
|
+
label?: string;
|
|
8
|
+
}, {
|
|
42
9
|
focus: () => void;
|
|
43
10
|
blur: () => void;
|
|
44
11
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
45
12
|
"update:modelValue": (v: string) => any;
|
|
46
|
-
}, string,
|
|
47
|
-
$slots: {
|
|
48
|
-
label?(_: {}): any;
|
|
49
|
-
};
|
|
50
|
-
});
|
|
51
|
-
tags: string[];
|
|
52
|
-
argTypes: {};
|
|
53
|
-
render: (args: import("@storybook/vue3").ComponentPropsAndSlots<{
|
|
54
|
-
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
55
|
-
loading?: import("../ScalarLoading").LoadingState;
|
|
56
|
-
modelValue?: string;
|
|
57
|
-
sidebar?: boolean;
|
|
58
|
-
}> & Readonly<{
|
|
59
|
-
"onUpdate:modelValue"?: ((v: string) => any) | undefined;
|
|
60
|
-
}>, {
|
|
61
|
-
focus: () => void;
|
|
62
|
-
blur: () => void;
|
|
63
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
64
|
-
"update:modelValue": (v: string) => any;
|
|
65
|
-
}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
66
|
-
P: {};
|
|
67
|
-
B: {};
|
|
68
|
-
D: {};
|
|
69
|
-
C: {};
|
|
70
|
-
M: {};
|
|
71
|
-
Defaults: {};
|
|
72
|
-
}, Readonly<{
|
|
73
|
-
loading?: import("../ScalarLoading").LoadingState;
|
|
74
|
-
modelValue?: string;
|
|
75
|
-
sidebar?: boolean;
|
|
76
|
-
}> & Readonly<{
|
|
77
|
-
"onUpdate:modelValue"?: ((v: string) => any) | undefined;
|
|
78
|
-
}>, {
|
|
79
|
-
focus: () => void;
|
|
80
|
-
blur: () => void;
|
|
81
|
-
}, {}, {}, {}, {}>;
|
|
82
|
-
__isFragment?: never;
|
|
83
|
-
__isTeleport?: never;
|
|
84
|
-
__isSuspense?: never;
|
|
85
|
-
} & import("vue").ComponentOptionsBase<Readonly<{
|
|
13
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
86
14
|
loading?: import("../ScalarLoading").LoadingState;
|
|
87
15
|
modelValue?: string;
|
|
88
16
|
sidebar?: boolean;
|
|
17
|
+
label?: string;
|
|
89
18
|
}> & Readonly<{
|
|
90
19
|
"onUpdate:modelValue"?: ((v: string) => any) | undefined;
|
|
91
|
-
}>, {
|
|
20
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
tags: string[];
|
|
22
|
+
argTypes: {};
|
|
23
|
+
render: (args: import("@storybook/vue3").ComponentPropsAndSlots<import("vue").DefineComponent<{
|
|
24
|
+
loading?: import("../ScalarLoading").LoadingState;
|
|
25
|
+
modelValue?: string;
|
|
26
|
+
sidebar?: boolean;
|
|
27
|
+
label?: string;
|
|
28
|
+
}, {
|
|
92
29
|
focus: () => void;
|
|
93
30
|
blur: () => void;
|
|
94
31
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
95
32
|
"update:modelValue": (v: string) => any;
|
|
96
|
-
}, string,
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
33
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
34
|
+
loading?: import("../ScalarLoading").LoadingState;
|
|
35
|
+
modelValue?: string;
|
|
36
|
+
sidebar?: boolean;
|
|
37
|
+
label?: string;
|
|
38
|
+
}> & Readonly<{
|
|
39
|
+
"onUpdate:modelValue"?: ((v: string) => any) | undefined;
|
|
40
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>>) => {
|
|
101
41
|
components: {
|
|
102
|
-
ScalarSearchInput: {
|
|
103
|
-
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
104
|
-
loading?: import("../ScalarLoading").LoadingState;
|
|
105
|
-
modelValue?: string;
|
|
106
|
-
sidebar?: boolean;
|
|
107
|
-
}> & Readonly<{
|
|
108
|
-
"onUpdate:modelValue"?: ((v: string) => any) | undefined;
|
|
109
|
-
}>, {
|
|
110
|
-
focus: () => void;
|
|
111
|
-
blur: () => void;
|
|
112
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
113
|
-
"update:modelValue": (v: string) => any;
|
|
114
|
-
}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
115
|
-
P: {};
|
|
116
|
-
B: {};
|
|
117
|
-
D: {};
|
|
118
|
-
C: {};
|
|
119
|
-
M: {};
|
|
120
|
-
Defaults: {};
|
|
121
|
-
}, Readonly<{
|
|
122
|
-
loading?: import("../ScalarLoading").LoadingState;
|
|
123
|
-
modelValue?: string;
|
|
124
|
-
sidebar?: boolean;
|
|
125
|
-
}> & Readonly<{
|
|
126
|
-
"onUpdate:modelValue"?: ((v: string) => any) | undefined;
|
|
127
|
-
}>, {
|
|
128
|
-
focus: () => void;
|
|
129
|
-
blur: () => void;
|
|
130
|
-
}, {}, {}, {}, {}>;
|
|
131
|
-
__isFragment?: never;
|
|
132
|
-
__isTeleport?: never;
|
|
133
|
-
__isSuspense?: never;
|
|
134
|
-
} & import("vue").ComponentOptionsBase<Readonly<{
|
|
42
|
+
ScalarSearchInput: import("vue").DefineComponent<{
|
|
135
43
|
loading?: import("../ScalarLoading").LoadingState;
|
|
136
44
|
modelValue?: string;
|
|
137
45
|
sidebar?: boolean;
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
}>, {
|
|
46
|
+
label?: string;
|
|
47
|
+
}, {
|
|
141
48
|
focus: () => void;
|
|
142
49
|
blur: () => void;
|
|
143
50
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
144
51
|
"update:modelValue": (v: string) => any;
|
|
145
|
-
}, string,
|
|
146
|
-
$slots: {
|
|
147
|
-
label?(_: {}): any;
|
|
148
|
-
};
|
|
149
|
-
});
|
|
150
|
-
};
|
|
151
|
-
setup(this: void): {
|
|
152
|
-
args: import("@storybook/vue3").ComponentPropsAndSlots<{
|
|
153
|
-
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
154
|
-
loading?: import("../ScalarLoading").LoadingState;
|
|
155
|
-
modelValue?: string;
|
|
156
|
-
sidebar?: boolean;
|
|
157
|
-
}> & Readonly<{
|
|
158
|
-
"onUpdate:modelValue"?: ((v: string) => any) | undefined;
|
|
159
|
-
}>, {
|
|
160
|
-
focus: () => void;
|
|
161
|
-
blur: () => void;
|
|
162
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
163
|
-
"update:modelValue": (v: string) => any;
|
|
164
|
-
}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
165
|
-
P: {};
|
|
166
|
-
B: {};
|
|
167
|
-
D: {};
|
|
168
|
-
C: {};
|
|
169
|
-
M: {};
|
|
170
|
-
Defaults: {};
|
|
171
|
-
}, Readonly<{
|
|
172
|
-
loading?: import("../ScalarLoading").LoadingState;
|
|
173
|
-
modelValue?: string;
|
|
174
|
-
sidebar?: boolean;
|
|
175
|
-
}> & Readonly<{
|
|
176
|
-
"onUpdate:modelValue"?: ((v: string) => any) | undefined;
|
|
177
|
-
}>, {
|
|
178
|
-
focus: () => void;
|
|
179
|
-
blur: () => void;
|
|
180
|
-
}, {}, {}, {}, {}>;
|
|
181
|
-
__isFragment?: never;
|
|
182
|
-
__isTeleport?: never;
|
|
183
|
-
__isSuspense?: never;
|
|
184
|
-
} & import("vue").ComponentOptionsBase<Readonly<{
|
|
52
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
185
53
|
loading?: import("../ScalarLoading").LoadingState;
|
|
186
54
|
modelValue?: string;
|
|
187
55
|
sidebar?: boolean;
|
|
56
|
+
label?: string;
|
|
188
57
|
}> & Readonly<{
|
|
189
58
|
"onUpdate:modelValue"?: ((v: string) => any) | undefined;
|
|
190
|
-
}>, {
|
|
59
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
60
|
+
};
|
|
61
|
+
setup(this: void): {
|
|
62
|
+
args: import("@storybook/vue3").ComponentPropsAndSlots<import("vue").DefineComponent<{
|
|
63
|
+
loading?: import("../ScalarLoading").LoadingState;
|
|
64
|
+
modelValue?: string;
|
|
65
|
+
sidebar?: boolean;
|
|
66
|
+
label?: string;
|
|
67
|
+
}, {
|
|
191
68
|
focus: () => void;
|
|
192
69
|
blur: () => void;
|
|
193
70
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
194
71
|
"update:modelValue": (v: string) => any;
|
|
195
|
-
}, string,
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
72
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
73
|
+
loading?: import("../ScalarLoading").LoadingState;
|
|
74
|
+
modelValue?: string;
|
|
75
|
+
sidebar?: boolean;
|
|
76
|
+
label?: string;
|
|
77
|
+
}> & Readonly<{
|
|
78
|
+
"onUpdate:modelValue"?: ((v: string) => any) | undefined;
|
|
79
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>>;
|
|
200
80
|
model: import("vue").Ref<string, string>;
|
|
201
81
|
};
|
|
202
82
|
template: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarSearchInput.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSearchInput/ScalarSearchInput.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAMrD,QAAA,MAAM,IAAI
|
|
1
|
+
{"version":3,"file":"ScalarSearchInput.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSearchInput/ScalarSearchInput.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAMrD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAYgC,CAAA;AAE1C,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,IAAI,EAAE,KAAU,CAAA;AAE7B,eAAO,MAAM,OAAO,EAAE,KAUrB,CAAA"}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { type LoadingState } from '../ScalarLoading';
|
|
2
|
-
declare
|
|
3
|
-
label?(_: {}): any;
|
|
4
|
-
};
|
|
5
|
-
declare const __VLS_component: import("vue").DefineComponent<{
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
6
3
|
loading?: LoadingState;
|
|
7
4
|
modelValue?: string;
|
|
8
5
|
sidebar?: boolean;
|
|
6
|
+
label?: string;
|
|
9
7
|
}, {
|
|
10
8
|
focus: () => void;
|
|
11
9
|
blur: () => void;
|
|
@@ -15,14 +13,9 @@ declare const __VLS_component: import("vue").DefineComponent<{
|
|
|
15
13
|
loading?: LoadingState;
|
|
16
14
|
modelValue?: string;
|
|
17
15
|
sidebar?: boolean;
|
|
16
|
+
label?: string;
|
|
18
17
|
}> & Readonly<{
|
|
19
18
|
"onUpdate:modelValue"?: ((v: string) => any) | undefined;
|
|
20
19
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
22
20
|
export default _default;
|
|
23
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
24
|
-
new (): {
|
|
25
|
-
$slots: S;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
21
|
//# sourceMappingURL=ScalarSearchInput.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarSearchInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSearchInput/ScalarSearchInput.vue"],"names":[],"mappings":"AA8FA,OAAO,EAAE,KAAK,YAAY,EAAiB,MAAM,kBAAkB,CAAA
|
|
1
|
+
{"version":3,"file":"ScalarSearchInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSearchInput/ScalarSearchInput.vue"],"names":[],"mappings":"AA8FA,OAAO,EAAE,KAAK,YAAY,EAAiB,MAAM,kBAAkB,CAAA;;cAKvD,YAAY;iBACT,MAAM;cACT,OAAO;YACT,MAAM;;;;;;;cAHJ,YAAY;iBACT,MAAM;cACT,OAAO;YACT,MAAM;;;;AAoLhB,wBAUG"}
|
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import { defineComponent as b, ref as h, computed as g, useAttrs as k, openBlock as
|
|
2
|
-
import { cva as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as b, ref as h, computed as g, useAttrs as k, openBlock as s, createElementBlock as v, normalizeClass as i, unref as a, createBlock as o, createCommentVNode as u, createElementVNode as S, mergeProps as V } from "vue";
|
|
2
|
+
import { cva as y, cx as c } from "../../cva.js";
|
|
3
|
+
import C from "../ScalarIcon/ScalarIcon.vue.js";
|
|
4
|
+
import N from "../ScalarLoading/ScalarLoading.vue.js";
|
|
5
|
+
import z from "../ScalarIconButton/ScalarIconButton.vue.js";
|
|
6
|
+
const B = ["aria-label", "value"], q = /* @__PURE__ */ b({
|
|
7
7
|
inheritAttrs: !1,
|
|
8
8
|
__name: "ScalarSearchInput",
|
|
9
9
|
props: {
|
|
10
10
|
loading: {},
|
|
11
11
|
modelValue: {},
|
|
12
|
-
sidebar: { type: Boolean }
|
|
12
|
+
sidebar: { type: Boolean },
|
|
13
|
+
label: {}
|
|
13
14
|
},
|
|
14
15
|
emits: ["update:modelValue"],
|
|
15
|
-
setup(
|
|
16
|
-
const
|
|
16
|
+
setup(I, { expose: d, emit: m }) {
|
|
17
|
+
const t = m, r = h(null);
|
|
17
18
|
function p(e) {
|
|
18
|
-
|
|
19
|
+
t("update:modelValue", e.target.value);
|
|
19
20
|
}
|
|
20
21
|
const n = g(() => {
|
|
21
|
-
const { class: e, ...
|
|
22
|
-
return { className: e || "", rest:
|
|
23
|
-
}), f =
|
|
24
|
-
base: "flex items-center rounded border bg-b-1 text-sm font-medium",
|
|
22
|
+
const { class: e, ...l } = k();
|
|
23
|
+
return { className: e || "", rest: l };
|
|
24
|
+
}), f = y({
|
|
25
|
+
base: "flex items-center rounded border bg-b-1 text-sm font-medium has-[:focus-visible]:outline",
|
|
25
26
|
variants: {
|
|
26
27
|
sidebar: {
|
|
27
28
|
true: "h-8 gap-1.5 px-1.5",
|
|
@@ -32,56 +33,53 @@ const E = { class: "sr-only" }, $ = ["value"], _ = /* @__PURE__ */ b({
|
|
|
32
33
|
return d({
|
|
33
34
|
focus: () => {
|
|
34
35
|
var e;
|
|
35
|
-
(e =
|
|
36
|
+
(e = r.value) == null || e.focus();
|
|
36
37
|
},
|
|
37
38
|
blur: () => {
|
|
38
39
|
var e;
|
|
39
|
-
(e =
|
|
40
|
+
(e = r.value) == null || e.blur();
|
|
40
41
|
}
|
|
41
|
-
}), (e,
|
|
42
|
-
class:
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
V(e.$slots, "label", {}, () => [
|
|
46
|
-
a[1] || (a[1] = y("Enter search"))
|
|
47
|
-
])
|
|
48
|
-
]),
|
|
49
|
-
e.sidebar ? (l(), o(s(z), {
|
|
42
|
+
}), (e, l) => (s(), v("label", {
|
|
43
|
+
class: i(a(c)(a(f)({ sidebar: e.sidebar }), n.value.className))
|
|
44
|
+
}, [
|
|
45
|
+
e.sidebar ? (s(), o(a(C), {
|
|
50
46
|
key: 0,
|
|
51
47
|
class: "text-c-2",
|
|
52
48
|
icon: "Search",
|
|
53
49
|
size: "xs",
|
|
54
50
|
thickness: "2.5"
|
|
55
51
|
})) : u("", !0),
|
|
56
|
-
|
|
52
|
+
S("input", V({
|
|
57
53
|
ref_key: "inputRef",
|
|
58
|
-
ref:
|
|
54
|
+
ref: r
|
|
55
|
+
}, n.value.rest, {
|
|
56
|
+
"aria-label": e.label ?? "Enter search query",
|
|
59
57
|
autocapitalize: "off",
|
|
60
58
|
autocomplete: "off",
|
|
61
59
|
autocorrect: "off",
|
|
62
|
-
class: "flex-1 rounded border-none bg-transparent outline-none",
|
|
60
|
+
class: "flex-1 appearance-none rounded border-none bg-transparent outline-none",
|
|
63
61
|
placeholder: "Search...",
|
|
64
62
|
spellcheck: "false",
|
|
65
|
-
type: "
|
|
63
|
+
type: "search",
|
|
66
64
|
value: e.modelValue,
|
|
67
65
|
onInput: p
|
|
68
|
-
}, null,
|
|
69
|
-
e.loading && e.loading.isLoading ? (
|
|
66
|
+
}), null, 16, B),
|
|
67
|
+
e.loading && e.loading.isLoading ? (s(), o(a(N), {
|
|
70
68
|
key: 1,
|
|
71
69
|
class: "mr-3 self-center",
|
|
72
70
|
loadingState: e.loading,
|
|
73
71
|
size: "md"
|
|
74
|
-
}, null, 8, ["loadingState"])) : e.modelValue ? (
|
|
72
|
+
}, null, 8, ["loadingState"])) : e.modelValue ? (s(), o(a(z), {
|
|
75
73
|
key: 2,
|
|
76
|
-
class:
|
|
74
|
+
class: i(a(c)("p-0", e.sidebar ? "h-4 w-4" : "h-5 w-5")),
|
|
77
75
|
icon: "Close",
|
|
78
76
|
label: "Clear Search",
|
|
79
77
|
thickness: e.sidebar ? "1.75" : "1.5",
|
|
80
|
-
onClick:
|
|
78
|
+
onClick: l[0] || (l[0] = (E) => t("update:modelValue", ""))
|
|
81
79
|
}, null, 8, ["class", "thickness"])) : u("", !0)
|
|
82
|
-
],
|
|
80
|
+
], 2));
|
|
83
81
|
}
|
|
84
82
|
});
|
|
85
83
|
export {
|
|
86
|
-
|
|
84
|
+
q as default
|
|
87
85
|
};
|
|
@@ -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":"AAwEA,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,eAAe,CAAA;AAuBrD,iBAAS,cAAc;kBAqGG,GAAG;qBACA,GAAG;mBACL,GAAG;yBACG,GAAG;EAiBnC;AACD,QAAA,MAAM,eAAe;WA5IZ,IAAI;aACF,OAAO;;WADT,IAAI;aACF,OAAO;iGAiJhB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { defineComponent as i, computed as d, useAttrs as m, openBlock as t, createElementBlock as n, createElementVNode as s, mergeProps as u, unref as a, renderSlot as r, createBlock as p, createCommentVNode as
|
|
1
|
+
import { defineComponent as i, computed as d, useAttrs as m, openBlock as t, createElementBlock as n, createElementVNode as s, mergeProps as u, unref as a, renderSlot as r, createBlock as p, createCommentVNode as l } from "vue";
|
|
2
2
|
import { cx as f } from "../../cva.js";
|
|
3
3
|
import v from "../ScalarIcon/ScalarIcon.vue.js";
|
|
4
|
-
const h = {
|
|
4
|
+
const h = {
|
|
5
|
+
class: "contents",
|
|
6
|
+
role: "option"
|
|
7
|
+
}, _ = {
|
|
5
8
|
key: 0,
|
|
6
9
|
class: "flex h-fit items-center text-sm font-medium text-c-3 group-hover:text-c-1"
|
|
7
10
|
}, x = { class: "flex min-w-0 flex-1 flex-col gap-0.75" }, g = { class: "flex items-center gap-1" }, k = { class: "flex-1 truncate text-sm font-medium" }, y = {
|
|
@@ -18,18 +21,18 @@ const h = { class: "contents" }, _ = {
|
|
|
18
21
|
active: { type: Boolean }
|
|
19
22
|
},
|
|
20
23
|
setup(N) {
|
|
21
|
-
const
|
|
24
|
+
const c = d(() => {
|
|
22
25
|
const { class: e, ...o } = m();
|
|
23
26
|
return { className: e || "", rest: o };
|
|
24
27
|
});
|
|
25
28
|
return (e, o) => (t(), n("li", h, [
|
|
26
|
-
s("a", u(
|
|
29
|
+
s("a", u(c.value.rest, {
|
|
27
30
|
class: a(f)(
|
|
28
31
|
"group flex cursor-pointer gap-2.5 rounded px-3 py-1.5 no-underline hover:bg-b-2",
|
|
29
32
|
{
|
|
30
33
|
"bg-b-2": e.active
|
|
31
34
|
},
|
|
32
|
-
|
|
35
|
+
c.value.className
|
|
33
36
|
)
|
|
34
37
|
}), [
|
|
35
38
|
e.icon ? (t(), n("div", _, [
|
|
@@ -38,10 +41,10 @@ const h = { class: "contents" }, _ = {
|
|
|
38
41
|
key: 0,
|
|
39
42
|
icon: e.icon,
|
|
40
43
|
size: "sm"
|
|
41
|
-
}, null, 8, ["icon"])) :
|
|
44
|
+
}, null, 8, ["icon"])) : l("", !0)
|
|
42
45
|
]),
|
|
43
46
|
o[0] || (o[0] = s("span", null, " ", -1))
|
|
44
|
-
])) :
|
|
47
|
+
])) : l("", !0),
|
|
45
48
|
s("div", x, [
|
|
46
49
|
s("div", g, [
|
|
47
50
|
s("div", k, [
|
|
@@ -49,11 +52,11 @@ const h = { class: "contents" }, _ = {
|
|
|
49
52
|
]),
|
|
50
53
|
e.$slots.addon ? (t(), n("div", y, [
|
|
51
54
|
r(e.$slots, "addon")
|
|
52
|
-
])) :
|
|
55
|
+
])) : l("", !0)
|
|
53
56
|
]),
|
|
54
57
|
e.$slots.description ? (t(), n("div", $, [
|
|
55
58
|
r(e.$slots, "description")
|
|
56
|
-
])) :
|
|
59
|
+
])) : l("", !0)
|
|
57
60
|
])
|
|
58
61
|
], 16)
|
|
59
62
|
]));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarSearchResultList.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSearchResults/ScalarSearchResultList.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScalarSearchResultList.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSearchResults/ScalarSearchResultList.vue"],"names":[],"mappings":"AA2DA,iBAAS,cAAc;uBAuCQ,GAAG;qBACL,GAAG;EAgB/B;AACD,QAAA,MAAM,eAAe;gBA1EP,OAAO;;gBAAP,OAAO;iGAgFnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -12,7 +12,8 @@ const v = /* @__PURE__ */ r({
|
|
|
12
12
|
return { className: e || "", rest: t };
|
|
13
13
|
});
|
|
14
14
|
return (e, t) => (c(), m("ul", u(l.value.rest, {
|
|
15
|
-
class: p(d)("flex flex-col", l.value.className)
|
|
15
|
+
class: p(d)("flex flex-col", l.value.className),
|
|
16
|
+
role: "listbox"
|
|
16
17
|
}), [
|
|
17
18
|
e.noResults ? o(e.$slots, "noResults", { key: 0 }, () => [
|
|
18
19
|
t[0] || (t[0] = s("div", { class: "flex flex-col items-center gap-2 px-3 py-4" }, [
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarToggle.spec.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarToggle/ScalarToggle.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/vue3';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
component: import("vue").DefineComponent<{
|
|
4
|
+
modelValue: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
id?: string;
|
|
7
|
+
ariaLabel?: string;
|
|
8
|
+
ariaLabelledBy?: string;
|
|
9
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
10
|
+
"update:modelValue": (value: boolean) => any;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
12
|
+
modelValue: boolean;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
id?: string;
|
|
15
|
+
ariaLabel?: string;
|
|
16
|
+
ariaLabelledBy?: string;
|
|
17
|
+
}> & Readonly<{
|
|
18
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
19
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
tags: string[];
|
|
21
|
+
argTypes: {
|
|
22
|
+
modelValue: {
|
|
23
|
+
control: "boolean";
|
|
24
|
+
};
|
|
25
|
+
disabled: {
|
|
26
|
+
control: "boolean";
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
render: (args: import("@storybook/vue3").ComponentPropsAndSlots<import("vue").DefineComponent<{
|
|
30
|
+
modelValue: boolean;
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
id?: string;
|
|
33
|
+
ariaLabel?: string;
|
|
34
|
+
ariaLabelledBy?: string;
|
|
35
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
36
|
+
"update:modelValue": (value: boolean) => any;
|
|
37
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
38
|
+
modelValue: boolean;
|
|
39
|
+
disabled?: boolean;
|
|
40
|
+
id?: string;
|
|
41
|
+
ariaLabel?: string;
|
|
42
|
+
ariaLabelledBy?: string;
|
|
43
|
+
}> & Readonly<{
|
|
44
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
45
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>>) => {
|
|
46
|
+
components: {
|
|
47
|
+
ScalarToggle: import("vue").DefineComponent<{
|
|
48
|
+
modelValue: boolean;
|
|
49
|
+
disabled?: boolean;
|
|
50
|
+
id?: string;
|
|
51
|
+
ariaLabel?: string;
|
|
52
|
+
ariaLabelledBy?: string;
|
|
53
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
54
|
+
"update:modelValue": (value: boolean) => any;
|
|
55
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
56
|
+
modelValue: boolean;
|
|
57
|
+
disabled?: boolean;
|
|
58
|
+
id?: string;
|
|
59
|
+
ariaLabel?: string;
|
|
60
|
+
ariaLabelledBy?: string;
|
|
61
|
+
}> & Readonly<{
|
|
62
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
63
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
64
|
+
};
|
|
65
|
+
setup(this: void): {
|
|
66
|
+
args: import("@storybook/vue3").ComponentPropsAndSlots<import("vue").DefineComponent<{
|
|
67
|
+
modelValue: boolean;
|
|
68
|
+
disabled?: boolean;
|
|
69
|
+
id?: string;
|
|
70
|
+
ariaLabel?: string;
|
|
71
|
+
ariaLabelledBy?: string;
|
|
72
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
73
|
+
"update:modelValue": (value: boolean) => any;
|
|
74
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
75
|
+
modelValue: boolean;
|
|
76
|
+
disabled?: boolean;
|
|
77
|
+
id?: string;
|
|
78
|
+
ariaLabel?: string;
|
|
79
|
+
ariaLabelledBy?: string;
|
|
80
|
+
}> & Readonly<{
|
|
81
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
82
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>>;
|
|
83
|
+
model: import("vue").Ref<boolean, boolean>;
|
|
84
|
+
};
|
|
85
|
+
template: string;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
export default meta;
|
|
89
|
+
type Story = StoryObj<typeof meta>;
|
|
90
|
+
export declare const Base: Story;
|
|
91
|
+
export declare const Disabled: Story;
|
|
92
|
+
//# sourceMappingURL=ScalarToggle.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarToggle.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarToggle/ScalarToggle.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAKrD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAe2B,CAAA;AAErC,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,IAAI,EAAE,KAElB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
modelValue: boolean;
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
id?: string;
|
|
5
|
+
ariaLabel?: string;
|
|
6
|
+
ariaLabelledBy?: string;
|
|
7
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
8
|
+
"update:modelValue": (value: boolean) => any;
|
|
9
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
10
|
+
modelValue: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
id?: string;
|
|
13
|
+
ariaLabel?: string;
|
|
14
|
+
ariaLabelledBy?: string;
|
|
15
|
+
}> & Readonly<{
|
|
16
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
17
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
export default _default;
|
|
19
|
+
//# sourceMappingURL=ScalarToggle.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarToggle.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarToggle/ScalarToggle.vue"],"names":[],"mappings":";gBA2Dc,OAAO;eACR,OAAO;SACb,MAAM;gBACC,MAAM;qBACD,MAAM;;;;gBAJX,OAAO;eACR,OAAO;SACb,MAAM;gBACC,MAAM;qBACD,MAAM;;;;AAuFzB,wBASG"}
|