@scalar/components 0.14.21 → 0.14.22
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/ScalarCombobox/ScalarCombobox.stories.d.ts +29 -60
- package/dist/components/ScalarCombobox/ScalarCombobox.stories.d.ts.map +1 -1
- package/dist/components/ScalarCombobox/ScalarCombobox.vue.d.ts +21 -41
- package/dist/components/ScalarCombobox/ScalarCombobox.vue.d.ts.map +1 -1
- package/dist/components/ScalarCombobox/ScalarCombobox.vue.js +40 -27
- package/dist/components/ScalarCombobox/ScalarComboboxMultiselect.test.d.ts +2 -0
- package/dist/components/ScalarCombobox/ScalarComboboxMultiselect.test.d.ts.map +1 -0
- package/dist/components/ScalarCombobox/ScalarComboboxMultiselect.vue.d.ts +252 -438
- package/dist/components/ScalarCombobox/ScalarComboboxMultiselect.vue.d.ts.map +1 -1
- package/dist/components/ScalarCombobox/ScalarComboboxMultiselect.vue.js +45 -32
- package/dist/components/ScalarCombobox/ScalarComboboxOption.test.d.ts +2 -0
- package/dist/components/ScalarCombobox/ScalarComboboxOption.test.d.ts.map +1 -0
- package/dist/components/ScalarCombobox/ScalarComboboxOption.vue.d.ts +5 -9
- package/dist/components/ScalarCombobox/ScalarComboboxOption.vue.d.ts.map +1 -1
- package/dist/components/ScalarCombobox/ScalarComboboxOption.vue.js +14 -28
- package/dist/components/ScalarCombobox/ScalarComboboxOptionGroup.test.d.ts +2 -0
- package/dist/components/ScalarCombobox/ScalarComboboxOptionGroup.test.d.ts.map +1 -0
- package/dist/components/ScalarCombobox/ScalarComboboxOptionGroup.vue.d.ts.map +1 -1
- package/dist/components/ScalarCombobox/ScalarComboboxOptionGroup.vue.js +5 -5
- package/dist/components/ScalarCombobox/ScalarComboboxOptions.test.d.ts +2 -0
- package/dist/components/ScalarCombobox/ScalarComboboxOptions.test.d.ts.map +1 -0
- package/dist/components/ScalarCombobox/ScalarComboboxOptions.vue.d.ts +22 -29
- package/dist/components/ScalarCombobox/ScalarComboboxOptions.vue.d.ts.map +1 -1
- package/dist/components/ScalarCombobox/ScalarComboboxOptions.vue.js +2 -2
- package/dist/components/ScalarCombobox/ScalarComboboxOptions.vue2.js +112 -92
- package/dist/components/ScalarCombobox/ScalarComboboxOptions.vue3.js +2 -2
- package/dist/components/ScalarCombobox/ScalarComboboxPopover.test.d.ts +2 -0
- package/dist/components/ScalarCombobox/ScalarComboboxPopover.test.d.ts.map +1 -0
- package/dist/components/ScalarCombobox/types.d.ts +17 -6
- package/dist/components/ScalarCombobox/types.d.ts.map +1 -1
- package/dist/components/ScalarCombobox/types.js +3 -3
- package/dist/components/ScalarListbox/ScalarListbox.vue.js +25 -25
- package/dist/components/ScalarListbox/ScalarListboxCheckbox.vue.d.ts +1 -2
- package/dist/components/ScalarListbox/ScalarListboxCheckbox.vue.d.ts.map +1 -1
- package/dist/components/ScalarListbox/ScalarListboxCheckbox.vue.js +7 -7
- package/dist/components/ScalarListbox/ScalarListboxItem.vue.d.ts +2 -2
- package/dist/components/ScalarListbox/ScalarListboxItem.vue.d.ts.map +1 -1
- package/dist/components/ScalarListbox/ScalarListboxItem.vue.js +17 -17
- package/dist/components/ScalarListbox/index.d.ts +1 -1
- package/dist/components/ScalarListbox/index.d.ts.map +1 -1
- package/dist/components/ScalarListbox/types.d.ts +0 -1
- package/dist/components/ScalarListbox/types.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +4 -3
|
@@ -1,74 +1,43 @@
|
|
|
1
1
|
import type { StoryObj } from '@storybook/vue3';
|
|
2
2
|
import type { Option, OptionGroup } from './types.js';
|
|
3
3
|
declare const meta: {
|
|
4
|
-
component: {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"onUpdate:modelValue"?: ((
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
} & import("vue").ComponentOptionsBase<Readonly<{
|
|
31
|
-
options: Option[] | OptionGroup[];
|
|
32
|
-
modelValue?: Option;
|
|
33
|
-
placeholder?: string;
|
|
34
|
-
} & import("../ScalarFloating").ScalarFloatingOptions> & Readonly<{
|
|
35
|
-
"onUpdate:modelValue"?: ((v: Option) => any) | undefined;
|
|
36
|
-
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
37
|
-
"update:modelValue": (v: Option) => any;
|
|
38
|
-
}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
39
|
-
$slots: Readonly<{
|
|
40
|
-
default(props: {
|
|
41
|
-
open: boolean;
|
|
42
|
-
}): unknown;
|
|
43
|
-
before?(props: {
|
|
44
|
-
open: boolean;
|
|
45
|
-
}): unknown;
|
|
46
|
-
after?(props: {
|
|
47
|
-
open: boolean;
|
|
48
|
-
}): unknown;
|
|
49
|
-
}> & {
|
|
50
|
-
default(props: {
|
|
51
|
-
open: boolean;
|
|
52
|
-
}): unknown;
|
|
53
|
-
before?(props: {
|
|
54
|
-
open: boolean;
|
|
55
|
-
}): unknown;
|
|
56
|
-
after?(props: {
|
|
57
|
-
open: boolean;
|
|
58
|
-
}): unknown;
|
|
59
|
-
};
|
|
60
|
-
});
|
|
4
|
+
component: <O extends Option = Option, G extends OptionGroup<O> = OptionGroup<O>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
|
|
5
|
+
slots: Readonly<import("./types.js").ComboboxSlots<O, G>> & import("./types.js").ComboboxSlots<O, G>;
|
|
6
|
+
attrs: any;
|
|
7
|
+
emit: (evt: "update:modelValue", value: O) => void;
|
|
8
|
+
}, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
9
|
+
props: {
|
|
10
|
+
readonly "onUpdate:modelValue"?: ((value: O) => any) | undefined;
|
|
11
|
+
modelValue?: O | undefined;
|
|
12
|
+
options: import("./types.js").OptionsOrGroups<O, G>;
|
|
13
|
+
placeholder?: string | undefined;
|
|
14
|
+
placement?: import("@floating-ui/utils").Placement | undefined;
|
|
15
|
+
offset?: import("@floating-ui/vue").OffsetOptions | undefined;
|
|
16
|
+
resize?: boolean | undefined;
|
|
17
|
+
target?: (string | HTMLElement) | undefined;
|
|
18
|
+
middleware?: import("@floating-ui/vue").Middleware[] | undefined;
|
|
19
|
+
teleport?: (boolean | string) | undefined;
|
|
20
|
+
} & import("vue").PublicProps;
|
|
21
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
22
|
+
attrs: any;
|
|
23
|
+
slots: Readonly<import("./types.js").ComboboxSlots<O, G>> & import("./types.js").ComboboxSlots<O, G>;
|
|
24
|
+
emit: (evt: "update:modelValue", value: O) => void;
|
|
25
|
+
}>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
26
|
+
[key: string]: any;
|
|
27
|
+
}> & {
|
|
28
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
29
|
+
};
|
|
61
30
|
tags: string[];
|
|
62
31
|
argTypes: {
|
|
63
32
|
resize: {
|
|
64
|
-
control:
|
|
33
|
+
control: string;
|
|
65
34
|
};
|
|
66
35
|
placement: {
|
|
67
|
-
control:
|
|
36
|
+
control: string;
|
|
68
37
|
options: import("@floating-ui/utils").Placement[];
|
|
69
38
|
};
|
|
70
39
|
class: {
|
|
71
|
-
control:
|
|
40
|
+
control: string;
|
|
72
41
|
};
|
|
73
42
|
};
|
|
74
43
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarCombobox.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCombobox/ScalarCombobox.stories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"ScalarCombobox.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCombobox/ScalarCombobox.stories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAOrD,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAUlD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;+BA+Pu4C,KAAK;;;;;;;;;;;;;;;;;;;;;;CAlPx2C,CAAA;AAE9C,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAkDlC,eAAO,MAAM,IAAI,EAAE,KAyBlB,CAAA;AAED,eAAO,MAAM,MAAM,EAAE,KAyBpB,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,KAyBzB,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,KAyB/B,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KA+CvB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,KA4B3B,CAAA"}
|
|
@@ -1,45 +1,25 @@
|
|
|
1
1
|
import type { ScalarFloatingOptions } from '../ScalarFloating';
|
|
2
|
-
import type { Option, OptionGroup } from './types.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
import type { ComboboxSlots, Option, OptionGroup, OptionsOrGroups } from './types.js';
|
|
3
|
+
declare const _default: <O extends Option = Option, G extends OptionGroup<O> = OptionGroup<O>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
5
|
+
readonly "onUpdate:modelValue"?: ((value: O) => any) | undefined;
|
|
6
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue"> & Partial<{}> & ({
|
|
7
|
+
modelValue?: O;
|
|
8
|
+
} & {
|
|
9
|
+
options: OptionsOrGroups<O, G>;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
} & ScalarFloatingOptions)> & import("vue").PublicProps;
|
|
12
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
13
|
+
attrs: any;
|
|
14
|
+
slots: Readonly<ComboboxSlots<O, G>> & ComboboxSlots<O, G>;
|
|
15
|
+
emit: (evt: "update:modelValue", value: O) => void;
|
|
16
|
+
}>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
17
|
+
[key: string]: any;
|
|
18
|
+
}> & {
|
|
19
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
11
20
|
};
|
|
12
|
-
declare function __VLS_template(): {
|
|
13
|
-
attrs: Partial<{}>;
|
|
14
|
-
slots: Readonly<{
|
|
15
|
-
/** The reference element for the combobox */
|
|
16
|
-
default(props: SlotProps): unknown;
|
|
17
|
-
/** A slot for contents before the combobox options */
|
|
18
|
-
before?(props: SlotProps): unknown;
|
|
19
|
-
/** A slot for contents after the combobox options */
|
|
20
|
-
after?(props: SlotProps): unknown;
|
|
21
|
-
}> & {
|
|
22
|
-
/** The reference element for the combobox */
|
|
23
|
-
default(props: SlotProps): unknown;
|
|
24
|
-
/** A slot for contents before the combobox options */
|
|
25
|
-
before?(props: SlotProps): unknown;
|
|
26
|
-
/** A slot for contents after the combobox options */
|
|
27
|
-
after?(props: SlotProps): unknown;
|
|
28
|
-
};
|
|
29
|
-
refs: {};
|
|
30
|
-
rootEl: any;
|
|
31
|
-
};
|
|
32
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
33
|
-
declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
34
|
-
"update:modelValue": (v: Option) => any;
|
|
35
|
-
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
36
|
-
"onUpdate:modelValue"?: ((v: Option) => any) | undefined;
|
|
37
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
38
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
39
21
|
export default _default;
|
|
40
|
-
type
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
};
|
|
44
|
-
};
|
|
22
|
+
type __VLS_PrettifyLocal<T> = {
|
|
23
|
+
[K in keyof T]: T[K];
|
|
24
|
+
} & {};
|
|
45
25
|
//# sourceMappingURL=ScalarCombobox.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarCombobox.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCombobox/ScalarCombobox.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScalarCombobox.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCombobox/ScalarCombobox.vue"],"names":[],"mappings":"AA2EA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAA;AAG9D,OAAO,KAAK,EACV,aAAa,EACb,MAAM,EACN,WAAW,EACX,eAAe,EAChB,MAAM,SAAS,CAAA;yBAGC,CAAC,SAAS,MAAM,WAAW,CAAC,SAAS,WAAW,CAAC,CAAC,CAAC,gCACtD,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WAuJxD,mBAAmB,CAAC;;;qBAhIjB,CAAC;;iBAnBD,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC;sBAChB,MAAM;8BAkJ+F,CAAC,4BAA2B;oBAChI,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;;;;;YAK+B,OAAO,CAAC,OAAO,WAAW,CAAC;;AAjKvE,wBAiK4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as m, mergeModels as i, useModel as f, createBlock as u, openBlock as b, withCtx as o, createVNode as g, createSlots as $, renderSlot as l, normalizeProps as s, guardReactiveProps as p } from "vue";
|
|
2
|
+
import v from "./ScalarComboboxOptions.vue.js";
|
|
3
|
+
import V from "./ScalarComboboxPopover.vue.js";
|
|
4
|
+
const w = /* @__PURE__ */ m({
|
|
5
5
|
__name: "ScalarCombobox",
|
|
6
|
-
props: {
|
|
6
|
+
props: /* @__PURE__ */ i({
|
|
7
7
|
options: {},
|
|
8
|
-
modelValue: {},
|
|
9
8
|
placeholder: {},
|
|
10
9
|
placement: {},
|
|
11
10
|
offset: { type: [Number, Object, Function] },
|
|
@@ -13,14 +12,14 @@ const y = /* @__PURE__ */ n({
|
|
|
13
12
|
target: {},
|
|
14
13
|
middleware: {},
|
|
15
14
|
teleport: { type: [Boolean, String] }
|
|
16
|
-
},
|
|
15
|
+
}, {
|
|
16
|
+
modelValue: {},
|
|
17
|
+
modelModifiers: {}
|
|
18
|
+
}),
|
|
17
19
|
emits: ["update:modelValue"],
|
|
18
|
-
setup(
|
|
19
|
-
const r =
|
|
20
|
-
|
|
21
|
-
e && r("update:modelValue", e);
|
|
22
|
-
}
|
|
23
|
-
return (e, h) => (i(), s(b, {
|
|
20
|
+
setup(n) {
|
|
21
|
+
const r = f(n, "modelValue");
|
|
22
|
+
return (e, c) => (b(), u(V, {
|
|
24
23
|
middleware: e.middleware,
|
|
25
24
|
offset: e.offset,
|
|
26
25
|
placement: e.placement ?? "bottom-start",
|
|
@@ -28,30 +27,44 @@ const y = /* @__PURE__ */ n({
|
|
|
28
27
|
target: e.target,
|
|
29
28
|
teleport: e.teleport
|
|
30
29
|
}, {
|
|
31
|
-
default:
|
|
32
|
-
l(e.$slots, "default", { open:
|
|
30
|
+
default: o(({ open: a }) => [
|
|
31
|
+
l(e.$slots, "default", { open: a })
|
|
33
32
|
]),
|
|
34
|
-
popover:
|
|
35
|
-
|
|
36
|
-
modelValue:
|
|
37
|
-
open:
|
|
33
|
+
popover: o(({ open: a, close: d }) => [
|
|
34
|
+
g(v, {
|
|
35
|
+
modelValue: r.value ? [r.value] : [],
|
|
36
|
+
open: a,
|
|
38
37
|
options: e.options,
|
|
39
38
|
placeholder: e.placeholder,
|
|
40
|
-
"onUpdate:modelValue": (
|
|
41
|
-
},
|
|
39
|
+
"onUpdate:modelValue": (t) => (d(), r.value = t[0])
|
|
40
|
+
}, $({ _: 2 }, [
|
|
42
41
|
e.$slots.before ? {
|
|
43
42
|
name: "before",
|
|
44
|
-
fn:
|
|
45
|
-
l(e.$slots, "before"
|
|
43
|
+
fn: o(() => [
|
|
44
|
+
l(e.$slots, "before")
|
|
46
45
|
]),
|
|
47
46
|
key: "0"
|
|
48
47
|
} : void 0,
|
|
48
|
+
e.$slots.option ? {
|
|
49
|
+
name: "option",
|
|
50
|
+
fn: o((t) => [
|
|
51
|
+
l(e.$slots, "option", s(p(t)))
|
|
52
|
+
]),
|
|
53
|
+
key: "1"
|
|
54
|
+
} : void 0,
|
|
55
|
+
e.$slots.group ? {
|
|
56
|
+
name: "group",
|
|
57
|
+
fn: o((t) => [
|
|
58
|
+
l(e.$slots, "group", s(p(t)))
|
|
59
|
+
]),
|
|
60
|
+
key: "2"
|
|
61
|
+
} : void 0,
|
|
49
62
|
e.$slots.after ? {
|
|
50
63
|
name: "after",
|
|
51
|
-
fn:
|
|
52
|
-
l(e.$slots, "after"
|
|
64
|
+
fn: o(() => [
|
|
65
|
+
l(e.$slots, "after")
|
|
53
66
|
]),
|
|
54
|
-
key: "
|
|
67
|
+
key: "3"
|
|
55
68
|
} : void 0
|
|
56
69
|
]), 1032, ["modelValue", "open", "options", "placeholder", "onUpdate:modelValue"])
|
|
57
70
|
]),
|
|
@@ -60,5 +73,5 @@ const y = /* @__PURE__ */ n({
|
|
|
60
73
|
}
|
|
61
74
|
});
|
|
62
75
|
export {
|
|
63
|
-
|
|
76
|
+
w as default
|
|
64
77
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarComboboxMultiselect.test.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCombobox/ScalarComboboxMultiselect.test.ts"],"names":[],"mappings":""}
|