@scalar/components 0.12.76 → 0.13.0
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 +3 -0
- package/dist/components/ScalarButton/ScalarButton.stories.d.ts.map +1 -1
- package/dist/components/ScalarButton/ScalarButton.vue.d.ts.map +1 -1
- package/dist/components/ScalarButton/ScalarButton.vue.js +29 -32
- package/dist/components/ScalarCombobox/ScalarCombobox.stories.d.ts +30 -5
- package/dist/components/ScalarCombobox/ScalarCombobox.stories.d.ts.map +1 -1
- package/dist/components/ScalarCombobox/ScalarCombobox.vue.d.ts +24 -7
- package/dist/components/ScalarCombobox/ScalarCombobox.vue.d.ts.map +1 -1
- package/dist/components/ScalarCombobox/ScalarCombobox.vue.js +34 -18
- package/dist/components/ScalarCombobox/ScalarComboboxMultiselect.vue.d.ts +16 -82
- package/dist/components/ScalarCombobox/ScalarComboboxMultiselect.vue.d.ts.map +1 -1
- package/dist/components/ScalarCombobox/ScalarComboboxMultiselect.vue.js +23 -22
- package/dist/components/ScalarCombobox/ScalarComboboxOption.vue.d.ts +7 -2
- package/dist/components/ScalarCombobox/ScalarComboboxOption.vue.d.ts.map +1 -1
- package/dist/components/ScalarCombobox/ScalarComboboxOption.vue.js +23 -28
- package/dist/components/ScalarCombobox/ScalarComboboxOptions.vue.d.ts +25 -1
- package/dist/components/ScalarCombobox/ScalarComboboxOptions.vue.d.ts.map +1 -1
- package/dist/components/ScalarCombobox/ScalarComboboxOptions.vue.js +58 -56
- package/dist/components/ScalarCombobox/ScalarComboboxPopover.vue.d.ts +5 -11
- package/dist/components/ScalarCombobox/ScalarComboboxPopover.vue.d.ts.map +1 -1
- package/dist/components/ScalarCombobox/ScalarComboboxPopover.vue.js +43 -43
- package/dist/components/ScalarCombobox/types.d.ts +4 -2
- package/dist/components/ScalarCombobox/types.d.ts.map +1 -1
- package/dist/components/ScalarCombobox/types.js +8 -3
- package/dist/components/ScalarDropdown/ScalarDropdown.stories.d.ts +73 -105
- package/dist/components/ScalarDropdown/ScalarDropdown.stories.d.ts.map +1 -1
- package/dist/components/ScalarDropdown/ScalarDropdown.vue.d.ts +40 -22
- package/dist/components/ScalarDropdown/ScalarDropdown.vue.d.ts.map +1 -1
- package/dist/components/ScalarDropdown/ScalarDropdown.vue.js +32 -42
- package/dist/components/ScalarDropdown/ScalarDropdownButton.vue.d.ts +35 -0
- package/dist/components/ScalarDropdown/ScalarDropdownButton.vue.d.ts.map +1 -0
- package/dist/components/ScalarDropdown/ScalarDropdownButton.vue.js +7 -0
- package/dist/components/ScalarDropdown/ScalarDropdownButton.vue2.js +37 -0
- package/dist/components/ScalarDropdown/ScalarDropdownDivider.vue.d.ts +17 -1
- package/dist/components/ScalarDropdown/ScalarDropdownDivider.vue.d.ts.map +1 -1
- package/dist/components/ScalarDropdown/ScalarDropdownDivider.vue.js +7 -6
- package/dist/components/ScalarDropdown/ScalarDropdownDivider.vue2.js +4 -0
- package/dist/components/ScalarDropdown/ScalarDropdownItem.vue.d.ts +18 -15
- package/dist/components/ScalarDropdown/ScalarDropdownItem.vue.d.ts.map +1 -1
- package/dist/components/ScalarDropdown/ScalarDropdownItem.vue.js +2 -2
- package/dist/components/ScalarDropdown/ScalarDropdownItem.vue2.js +19 -29
- package/dist/components/ScalarDropdown/ScalarDropdownMenu.vue.d.ts +32 -0
- package/dist/components/ScalarDropdown/ScalarDropdownMenu.vue.d.ts.map +1 -0
- package/dist/components/ScalarDropdown/ScalarDropdownMenu.vue.js +28 -0
- package/dist/components/ScalarDropdown/ScalarDropdownMenu.vue2.js +4 -0
- package/dist/components/ScalarDropdown/index.d.ts +2 -0
- package/dist/components/ScalarDropdown/index.d.ts.map +1 -1
- package/dist/components/ScalarErrorBoundary/ScalarErrorBoundary.spec.d.ts +2 -0
- package/dist/components/ScalarErrorBoundary/ScalarErrorBoundary.spec.d.ts.map +1 -0
- package/dist/components/ScalarErrorBoundary/ScalarErrorBoundary.stories.d.ts +6 -0
- package/dist/components/ScalarErrorBoundary/ScalarErrorBoundary.stories.d.ts.map +1 -0
- package/dist/components/ScalarErrorBoundary/ScalarErrorBoundary.vue.d.ts +18 -0
- package/dist/components/ScalarErrorBoundary/ScalarErrorBoundary.vue.d.ts.map +1 -0
- package/dist/components/ScalarErrorBoundary/ScalarErrorBoundary.vue.js +23 -0
- package/dist/components/ScalarErrorBoundary/ScalarErrorBoundary.vue2.js +4 -0
- package/dist/components/ScalarErrorBoundary/index.d.ts +2 -0
- package/dist/components/ScalarErrorBoundary/index.d.ts.map +1 -0
- package/dist/components/ScalarFloating/ScalarFloating.stories.d.ts +4 -0
- package/dist/components/ScalarFloating/ScalarFloating.stories.d.ts.map +1 -1
- package/dist/components/ScalarFloating/ScalarFloating.vue.d.ts +5 -4
- package/dist/components/ScalarFloating/ScalarFloating.vue.d.ts.map +1 -1
- package/dist/components/ScalarFloating/ScalarFloating.vue.js +32 -29
- package/dist/components/ScalarFloating/index.d.ts +1 -1
- package/dist/components/ScalarFloating/index.d.ts.map +1 -1
- package/dist/components/ScalarFloating/types.d.ts +15 -7
- package/dist/components/ScalarFloating/types.d.ts.map +1 -1
- package/dist/components/ScalarFloating/useResizeWithTarget.d.ts +3 -0
- package/dist/components/ScalarFloating/useResizeWithTarget.d.ts.map +1 -1
- package/dist/components/ScalarIcon/ScalarIcon.stories.d.ts +1 -0
- package/dist/components/ScalarIcon/ScalarIcon.stories.d.ts.map +1 -1
- package/dist/components/ScalarIcon/ScalarIcon.vue.d.ts.map +1 -1
- package/dist/components/ScalarIcon/ScalarIcon.vue.js +2 -2
- package/dist/components/ScalarIcon/ScalarIcon.vue2.js +18 -15
- package/dist/components/ScalarIcon/icons/Hide.svg.js +10 -9
- package/dist/components/ScalarIcon/icons/Show.svg.js +7 -8
- package/dist/components/ScalarIconButton/ScalarIconButton.stories.d.ts +10 -7
- package/dist/components/ScalarIconButton/ScalarIconButton.stories.d.ts.map +1 -1
- package/dist/components/ScalarIconButton/ScalarIconButton.vue.d.ts +1 -1
- package/dist/components/ScalarIconButton/ScalarIconButton.vue.d.ts.map +1 -1
- package/dist/components/ScalarIconButton/ScalarIconButton.vue.js +19 -21
- package/dist/components/ScalarListbox/ScalarListbox.stories.d.ts +52 -25
- package/dist/components/ScalarListbox/ScalarListbox.stories.d.ts.map +1 -1
- package/dist/components/ScalarListbox/ScalarListbox.vue.d.ts +41 -22
- package/dist/components/ScalarListbox/ScalarListbox.vue.d.ts.map +1 -1
- package/dist/components/ScalarListbox/ScalarListbox.vue.js +46 -85
- package/dist/components/ScalarListbox/ScalarListboxCheckbox.vue.d.ts +8 -0
- package/dist/components/ScalarListbox/ScalarListboxCheckbox.vue.d.ts.map +1 -0
- package/dist/components/ScalarListbox/ScalarListboxCheckbox.vue.js +26 -0
- package/dist/components/ScalarListbox/ScalarListboxCheckbox.vue2.js +4 -0
- package/dist/components/ScalarListbox/ScalarListboxItem.vue.d.ts +8 -0
- package/dist/components/ScalarListbox/ScalarListboxItem.vue.d.ts.map +1 -0
- package/dist/components/ScalarListbox/ScalarListboxItem.vue.js +53 -0
- package/dist/components/ScalarListbox/ScalarListboxItem.vue2.js +4 -0
- package/dist/components/ScalarListbox/index.d.ts +3 -1
- package/dist/components/ScalarListbox/index.d.ts.map +1 -1
- package/dist/components/ScalarListbox/types.d.ts +1 -0
- package/dist/components/ScalarListbox/types.d.ts.map +1 -1
- package/dist/components/ScalarLoading/ScalarLoading.stories.d.ts +28 -6
- package/dist/components/ScalarLoading/ScalarLoading.stories.d.ts.map +1 -1
- package/dist/components/ScalarLoading/ScalarLoading.vue.d.ts +2 -2
- package/dist/components/ScalarLoading/ScalarLoading.vue.d.ts.map +1 -1
- package/dist/components/ScalarLoading/ScalarLoading.vue.js +3 -3
- package/dist/components/ScalarLoading/ScalarLoading.vue2.js +29 -30
- package/dist/components/ScalarMenu/ScalarMenu.stories.d.ts +133 -108
- package/dist/components/ScalarMenu/ScalarMenu.stories.d.ts.map +1 -1
- package/dist/components/ScalarMenu/ScalarMenu.vue.d.ts +34 -18
- package/dist/components/ScalarMenu/ScalarMenu.vue.d.ts.map +1 -1
- package/dist/components/ScalarMenu/ScalarMenu.vue.js +22 -20
- package/dist/components/ScalarMenu/ScalarMenuButton.vue.d.ts +2 -2
- package/dist/components/ScalarMenu/ScalarMenuButton.vue.d.ts.map +1 -1
- package/dist/components/ScalarMenu/ScalarMenuButton.vue.js +25 -17
- package/dist/components/ScalarMenu/ScalarMenuLink.vue.d.ts.map +1 -1
- package/dist/components/ScalarMenu/ScalarMenuLink.vue.js +17 -10
- package/dist/components/ScalarMenu/ScalarMenuProduct.vue.d.ts +2 -2
- package/dist/components/ScalarMenu/ScalarMenuProduct.vue.d.ts.map +1 -1
- package/dist/components/ScalarMenu/ScalarMenuProduct.vue.js +22 -16
- package/dist/components/ScalarMenu/ScalarMenuProducts.vue.d.ts +1 -1
- package/dist/components/ScalarMenu/ScalarMenuProducts.vue.d.ts.map +1 -1
- package/dist/components/ScalarMenu/ScalarMenuProducts.vue.js +25 -22
- package/dist/components/ScalarMenu/ScalarMenuResources.vue.d.ts +1 -1
- package/dist/components/ScalarMenu/ScalarMenuResources.vue.js +3 -3
- package/dist/components/ScalarMenu/ScalarMenuSection.vue.d.ts +2 -2
- package/dist/components/ScalarMenu/ScalarMenuSection.vue.d.ts.map +1 -1
- package/dist/components/ScalarMenu/ScalarMenuSection.vue.js +18 -15
- package/dist/components/ScalarMenu/ScalarMenuSection.vue2.js +4 -0
- package/dist/components/ScalarMenu/ScalarMenuTeamPicker.vue.d.ts +1 -1
- package/dist/components/ScalarMenu/ScalarMenuTeamPicker.vue.d.ts.map +1 -1
- package/dist/components/ScalarMenu/ScalarMenuTeamPicker.vue.js +18 -16
- package/dist/components/ScalarModal/ScalarModal.stories.d.ts +3 -3
- package/dist/components/ScalarModal/ScalarModal.vue.d.ts +2 -2
- package/dist/components/ScalarPopover/ScalarPopover.stories.d.ts +20 -116
- package/dist/components/ScalarPopover/ScalarPopover.stories.d.ts.map +1 -1
- package/dist/components/ScalarPopover/ScalarPopover.vue.d.ts +4 -11
- package/dist/components/ScalarPopover/ScalarPopover.vue.d.ts.map +1 -1
- package/dist/components/ScalarPopover/ScalarPopover.vue.js +23 -24
- package/dist/components/ScalarPopover/index.d.ts +1 -0
- package/dist/components/ScalarPopover/index.d.ts.map +1 -1
- package/dist/components/ScalarPopover/types.d.ts +15 -0
- package/dist/components/ScalarPopover/types.d.ts.map +1 -0
- package/dist/components/ScalarSearchInput/ScalarSearchInput.stories.d.ts +6 -1
- package/dist/components/ScalarSearchInput/ScalarSearchInput.stories.d.ts.map +1 -1
- package/dist/components/ScalarSearchInput/ScalarSearchInput.vue.js +3 -3
- package/dist/components/ScalarSearchInput/ScalarSearchInput.vue2.js +10 -10
- package/dist/components/ScalarSearchResults/ScalarSearchResultItem.vue.d.ts.map +1 -1
- package/dist/components/ScalarSearchResults/ScalarSearchResultItem.vue.js +31 -35
- package/dist/components/ScalarSearchResults/ScalarSearchResultList.vue.d.ts.map +1 -1
- package/dist/components/ScalarSearchResults/ScalarSearchResultList.vue.js +12 -18
- package/dist/components/ScalarToggle/ScalarToggle.stories.d.ts +26 -39
- package/dist/components/ScalarToggle/ScalarToggle.stories.d.ts.map +1 -1
- package/dist/components/ScalarToggle/ScalarToggle.vue.d.ts +3 -5
- package/dist/components/ScalarToggle/ScalarToggle.vue.d.ts.map +1 -1
- package/dist/components/ScalarToggle/ScalarToggle.vue.js +24 -35
- package/dist/hooks/useBindCx.d.ts +51 -0
- package/dist/hooks/useBindCx.d.ts.map +1 -0
- package/dist/hooks/useBindCx.js +34 -0
- package/dist/hooks/useBindCx.stories.d.ts +430 -0
- package/dist/hooks/useBindCx.stories.d.ts.map +1 -0
- package/dist/hooks/useBindCx.test.d.ts +2 -0
- package/dist/hooks/useBindCx.test.d.ts.map +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +80 -68
- package/dist/style.css +1 -1
- package/package.json +3 -3
|
@@ -1,28 +1,27 @@
|
|
|
1
|
-
import { openBlock as
|
|
1
|
+
import { openBlock as r, createElementBlock as n, createElementVNode as o } from "vue";
|
|
2
2
|
const t = {
|
|
3
3
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4
|
+
fill: "none",
|
|
4
5
|
viewBox: "0 0 24 24"
|
|
5
6
|
};
|
|
6
7
|
function l(s, e) {
|
|
7
|
-
return
|
|
8
|
+
return r(), n("svg", t, e[0] || (e[0] = [
|
|
8
9
|
o("path", {
|
|
9
|
-
fill: "none",
|
|
10
10
|
stroke: "currentColor",
|
|
11
11
|
"stroke-linecap": "round",
|
|
12
12
|
"stroke-linejoin": "round",
|
|
13
|
-
d: "
|
|
13
|
+
d: "M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7"
|
|
14
14
|
}, null, -1),
|
|
15
15
|
o("path", {
|
|
16
|
-
fill: "none",
|
|
17
16
|
stroke: "currentColor",
|
|
18
17
|
"stroke-linecap": "round",
|
|
19
18
|
"stroke-linejoin": "round",
|
|
20
|
-
d: "
|
|
19
|
+
d: "M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6"
|
|
21
20
|
}, null, -1)
|
|
22
21
|
]));
|
|
23
22
|
}
|
|
24
|
-
const
|
|
23
|
+
const i = { render: l };
|
|
25
24
|
export {
|
|
26
|
-
|
|
25
|
+
i as default,
|
|
27
26
|
l as render
|
|
28
27
|
};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import type { StoryObj } from '@storybook/vue3';
|
|
2
|
+
/**
|
|
3
|
+
* A helper wrapper around the icon only ScalarButton
|
|
4
|
+
*/
|
|
2
5
|
declare const meta: {
|
|
3
6
|
component: import("vue").DefineComponent<{
|
|
4
7
|
label: string;
|
|
@@ -17,7 +20,7 @@ declare const meta: {
|
|
|
17
20
|
}> & Readonly<{}>, {
|
|
18
21
|
size: "xs" | "sm" | "md" | "full" | "xxs";
|
|
19
22
|
variant: string;
|
|
20
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {},
|
|
23
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
24
|
tags: string[];
|
|
22
25
|
argTypes: {
|
|
23
26
|
icon: {
|
|
@@ -35,12 +38,11 @@ declare const meta: {
|
|
|
35
38
|
control: "select";
|
|
36
39
|
options: string[];
|
|
37
40
|
};
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
};
|
|
41
|
+
disabled: {
|
|
42
|
+
control: "boolean";
|
|
43
|
+
};
|
|
44
|
+
class: {
|
|
45
|
+
control: "text";
|
|
44
46
|
};
|
|
45
47
|
};
|
|
46
48
|
};
|
|
@@ -48,4 +50,5 @@ export default meta;
|
|
|
48
50
|
type Story = StoryObj<typeof meta>;
|
|
49
51
|
export declare const Base: Story;
|
|
50
52
|
export declare const Disabled: Story;
|
|
53
|
+
export declare const CustomClasses: Story;
|
|
51
54
|
//# sourceMappingURL=ScalarIconButton.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarIconButton.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarIconButton/ScalarIconButton.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAKrD,QAAA,MAAM,IAAI
|
|
1
|
+
{"version":3,"file":"ScalarIconButton.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarIconButton/ScalarIconButton.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAKrD;;GAEG;AACH,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAc+B,CAAA;AAEzC,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;AAED,eAAO,MAAM,aAAa,EAAE,KAE3B,CAAA"}
|
|
@@ -71,6 +71,6 @@ declare const variants: (props?: ({
|
|
|
71
71
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
72
72
|
size: "xs" | "sm" | "md" | "full" | "xxs";
|
|
73
73
|
variant: string;
|
|
74
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {},
|
|
74
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
75
75
|
export default _default;
|
|
76
76
|
//# sourceMappingURL=ScalarIconButton.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarIconButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarIconButton/ScalarIconButton.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScalarIconButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarIconButton/ScalarIconButton.vue"],"names":[],"mappings":"AA0DA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,KAAK,CAAA;AAKvC,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,eAAe,CAAA;AAIrD,KAAK,QAAQ,GAAG,YAAY,CAAC,OAAO,QAAQ,CAAC,CAAA;AAE7C,KAAK,WAAW,GAAG;IACf,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,IAAI,CAAA;IACV,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAA;IAC7B,IAAI,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAA;IACvB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAC;AAYJ,QAAA,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAeZ,CACD;;;;;AAoED,wBAOG"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { cva as
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
1
|
+
import { defineComponent as t, openBlock as i, createElementBlock as n, mergeProps as r, unref as s, createVNode as l, createElementVNode as d, toDisplayString as c } from "vue";
|
|
2
|
+
import { cva as p } from "../../cva.js";
|
|
3
|
+
import { useBindCx as u } from "../../hooks/useBindCx.js";
|
|
4
|
+
import { styles as m } from "../ScalarButton/variants.js";
|
|
5
|
+
import f from "../ScalarIcon/ScalarIcon.vue.js";
|
|
6
|
+
const b = ["ariaDisabled"], h = { class: "sr-only" }, w = /* @__PURE__ */ t({
|
|
7
|
+
inheritAttrs: !1,
|
|
6
8
|
__name: "ScalarIconButton",
|
|
7
9
|
props: {
|
|
8
10
|
label: {},
|
|
@@ -12,8 +14,8 @@ const z = ["ariaDisabled"], k = { class: "sr-only" }, D = /* @__PURE__ */ n({
|
|
|
12
14
|
size: { default: "md" },
|
|
13
15
|
thickness: {}
|
|
14
16
|
},
|
|
15
|
-
setup(
|
|
16
|
-
const o =
|
|
17
|
+
setup(v) {
|
|
18
|
+
const { cx: o } = u(), a = p({
|
|
17
19
|
base: "scalar-icon-button grid aspect-square cursor-pointer rounded",
|
|
18
20
|
variants: {
|
|
19
21
|
size: {
|
|
@@ -26,25 +28,21 @@ const z = ["ariaDisabled"], k = { class: "sr-only" }, D = /* @__PURE__ */ n({
|
|
|
26
28
|
disabled: {
|
|
27
29
|
true: "cursor-not-allowed shadow-none"
|
|
28
30
|
},
|
|
29
|
-
variant:
|
|
31
|
+
variant: m
|
|
30
32
|
}
|
|
31
|
-
}), a = r(() => {
|
|
32
|
-
const { class: s, ...t } = i();
|
|
33
|
-
return { class: s || "", rest: t };
|
|
34
33
|
});
|
|
35
|
-
return (
|
|
36
|
-
ariaDisabled:
|
|
37
|
-
class: e(f)(e(o)({ size: s.size, variant: s.variant, disabled: s.disabled }), a.value.class),
|
|
34
|
+
return (e, z) => (i(), n("button", r({
|
|
35
|
+
ariaDisabled: e.disabled || void 0,
|
|
38
36
|
type: "button"
|
|
39
|
-
}), [
|
|
40
|
-
|
|
41
|
-
icon:
|
|
42
|
-
thickness:
|
|
37
|
+
}, s(o)(s(a)({ size: e.size, variant: e.variant, disabled: e.disabled }))), [
|
|
38
|
+
l(s(f), {
|
|
39
|
+
icon: e.icon,
|
|
40
|
+
thickness: e.thickness
|
|
43
41
|
}, null, 8, ["icon", "thickness"]),
|
|
44
|
-
|
|
45
|
-
], 16,
|
|
42
|
+
d("span", h, c(e.label), 1)
|
|
43
|
+
], 16, b));
|
|
46
44
|
}
|
|
47
45
|
});
|
|
48
46
|
export {
|
|
49
|
-
|
|
47
|
+
w as default
|
|
50
48
|
};
|
|
@@ -2,56 +2,78 @@ import type { StoryObj } from '@storybook/vue3';
|
|
|
2
2
|
import type { Option } from './types';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
component: {
|
|
5
|
-
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
6
|
-
multiple?: boolean;
|
|
5
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<({
|
|
7
6
|
options: Option[];
|
|
8
|
-
modelValue?: Option | Option[];
|
|
9
7
|
id?: string;
|
|
10
8
|
label?: string;
|
|
11
|
-
} &
|
|
9
|
+
} & {
|
|
10
|
+
multiple?: false;
|
|
11
|
+
modelValue?: Option;
|
|
12
|
+
} & import("../ScalarFloating").ScalarFloatingOptions) | ({
|
|
13
|
+
options: Option[];
|
|
14
|
+
id?: string;
|
|
15
|
+
label?: string;
|
|
16
|
+
} & {
|
|
17
|
+
multiple: true;
|
|
18
|
+
modelValue?: Option[];
|
|
19
|
+
} & import("../ScalarFloating").ScalarFloatingOptions)> & Readonly<{
|
|
12
20
|
"onUpdate:modelValue"?: ((v: Option) => any) | undefined;
|
|
13
21
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
14
22
|
"update:modelValue": (v: Option) => any;
|
|
15
|
-
}, import("vue").PublicProps, {
|
|
16
|
-
multiple: boolean;
|
|
17
|
-
}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
23
|
+
}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
18
24
|
P: {};
|
|
19
25
|
B: {};
|
|
20
26
|
D: {};
|
|
21
27
|
C: {};
|
|
22
28
|
M: {};
|
|
23
29
|
Defaults: {};
|
|
24
|
-
}, Readonly<{
|
|
25
|
-
|
|
30
|
+
}, {} & (Readonly<({
|
|
31
|
+
options: Option[];
|
|
32
|
+
id?: string;
|
|
33
|
+
label?: string;
|
|
34
|
+
} & {
|
|
35
|
+
multiple?: false;
|
|
36
|
+
modelValue?: Option;
|
|
37
|
+
} & import("../ScalarFloating").ScalarFloatingOptions) | ({
|
|
26
38
|
options: Option[];
|
|
27
|
-
modelValue?: Option | Option[];
|
|
28
39
|
id?: string;
|
|
29
40
|
label?: string;
|
|
30
|
-
} &
|
|
41
|
+
} & {
|
|
42
|
+
multiple: true;
|
|
43
|
+
modelValue?: Option[];
|
|
44
|
+
} & import("../ScalarFloating").ScalarFloatingOptions)> & Readonly<{
|
|
31
45
|
"onUpdate:modelValue"?: ((v: Option) => any) | undefined;
|
|
32
|
-
}
|
|
33
|
-
multiple: boolean;
|
|
34
|
-
}>;
|
|
46
|
+
}>), {}, {}, {}, {}, {}>;
|
|
35
47
|
__isFragment?: never;
|
|
36
48
|
__isTeleport?: never;
|
|
37
49
|
__isSuspense?: never;
|
|
38
|
-
} & import("vue").ComponentOptionsBase<Readonly<{
|
|
39
|
-
multiple?: boolean;
|
|
50
|
+
} & import("vue").ComponentOptionsBase<Readonly<({
|
|
40
51
|
options: Option[];
|
|
41
|
-
modelValue?: Option | Option[];
|
|
42
52
|
id?: string;
|
|
43
53
|
label?: string;
|
|
44
|
-
} &
|
|
54
|
+
} & {
|
|
55
|
+
multiple?: false;
|
|
56
|
+
modelValue?: Option;
|
|
57
|
+
} & import("../ScalarFloating").ScalarFloatingOptions) | ({
|
|
58
|
+
options: Option[];
|
|
59
|
+
id?: string;
|
|
60
|
+
label?: string;
|
|
61
|
+
} & {
|
|
62
|
+
multiple: true;
|
|
63
|
+
modelValue?: Option[];
|
|
64
|
+
} & import("../ScalarFloating").ScalarFloatingOptions)> & Readonly<{
|
|
45
65
|
"onUpdate:modelValue"?: ((v: Option) => any) | undefined;
|
|
46
66
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
47
67
|
"update:modelValue": (v: Option) => any;
|
|
48
|
-
}, string, {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
68
|
+
}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
69
|
+
$slots: Readonly<{
|
|
70
|
+
default(props: {
|
|
71
|
+
open: boolean;
|
|
72
|
+
}): import("vue").Slot;
|
|
73
|
+
}> & {
|
|
74
|
+
default(props: {
|
|
75
|
+
open: boolean;
|
|
76
|
+
}): import("vue").Slot;
|
|
55
77
|
};
|
|
56
78
|
});
|
|
57
79
|
tags: string[];
|
|
@@ -63,9 +85,14 @@ declare const meta: {
|
|
|
63
85
|
control: "select";
|
|
64
86
|
options: import("@floating-ui/utils").Placement[];
|
|
65
87
|
};
|
|
88
|
+
class: {
|
|
89
|
+
control: "text";
|
|
90
|
+
};
|
|
66
91
|
};
|
|
67
92
|
};
|
|
68
93
|
export default meta;
|
|
69
94
|
type Story = StoryObj<typeof meta>;
|
|
70
95
|
export declare const Base: Story;
|
|
96
|
+
export declare const Multiselect: Story;
|
|
97
|
+
export declare const CustomClasses: Story;
|
|
71
98
|
//# sourceMappingURL=ScalarListbox.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarListbox.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarListbox/ScalarListbox.stories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAKrD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAErC,QAAA,MAAM,IAAI
|
|
1
|
+
{"version":3,"file":"ScalarListbox.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarListbox/ScalarListbox.stories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAKrD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAErC,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQ4B,CAAA;AAEtC,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,IAAI,EAAE,KAkClB,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,KAkCzB,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAkC3B,CAAA"}
|
|
@@ -1,35 +1,54 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Slot } from 'vue';
|
|
2
|
+
import { type ScalarFloatingOptions } from '../ScalarFloating';
|
|
2
3
|
import type { Option } from './types';
|
|
3
|
-
type
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
modelValue?: Option | Option[];
|
|
12
|
-
id?: string;
|
|
13
|
-
label?: string;
|
|
14
|
-
} & Omit<FloatingOptions, 'middleware' | 'offset' | 'targetRef'>;
|
|
4
|
+
type SingleSelectListboxProps = {
|
|
5
|
+
multiple?: false;
|
|
6
|
+
modelValue?: Option;
|
|
7
|
+
};
|
|
8
|
+
type MultipleSelectListboxProps = {
|
|
9
|
+
multiple: true;
|
|
10
|
+
modelValue?: Option[];
|
|
11
|
+
};
|
|
15
12
|
declare function __VLS_template(): {
|
|
16
13
|
attrs: Partial<{}>;
|
|
17
|
-
slots: {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
slots: Readonly<{
|
|
15
|
+
/** The reference element for the listbox */
|
|
16
|
+
default(props: {
|
|
17
|
+
/** Whether or not the listbox is open */
|
|
18
|
+
open: boolean;
|
|
19
|
+
}): Slot;
|
|
20
|
+
}> & {
|
|
21
|
+
/** The reference element for the listbox */
|
|
22
|
+
default(props: {
|
|
23
|
+
/** Whether or not the listbox is open */
|
|
24
|
+
open: boolean;
|
|
25
|
+
}): Slot;
|
|
21
26
|
};
|
|
22
27
|
refs: {};
|
|
23
28
|
rootEl: any;
|
|
24
29
|
};
|
|
25
30
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
26
|
-
declare const __VLS_component: import("vue").DefineComponent<
|
|
31
|
+
declare const __VLS_component: import("vue").DefineComponent<({
|
|
32
|
+
options: Option[];
|
|
33
|
+
id?: string;
|
|
34
|
+
label?: string;
|
|
35
|
+
} & SingleSelectListboxProps & ScalarFloatingOptions) | ({
|
|
36
|
+
options: Option[];
|
|
37
|
+
id?: string;
|
|
38
|
+
label?: string;
|
|
39
|
+
} & MultipleSelectListboxProps & ScalarFloatingOptions), {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
27
40
|
"update:modelValue": (v: Option) => any;
|
|
28
|
-
}, string, import("vue").PublicProps, Readonly<
|
|
41
|
+
}, string, import("vue").PublicProps, Readonly<({
|
|
42
|
+
options: Option[];
|
|
43
|
+
id?: string;
|
|
44
|
+
label?: string;
|
|
45
|
+
} & SingleSelectListboxProps & ScalarFloatingOptions) | ({
|
|
46
|
+
options: Option[];
|
|
47
|
+
id?: string;
|
|
48
|
+
label?: string;
|
|
49
|
+
} & MultipleSelectListboxProps & ScalarFloatingOptions)> & Readonly<{
|
|
29
50
|
"onUpdate:modelValue"?: ((v: Option) => any) | undefined;
|
|
30
|
-
}>, {
|
|
31
|
-
multiple: boolean;
|
|
32
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
51
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
52
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
34
53
|
export default _default;
|
|
35
54
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarListbox.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarListbox/ScalarListbox.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScalarListbox.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarListbox/ScalarListbox.vue"],"names":[],"mappings":"AAyGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAG/B,OAAO,EAAkB,KAAK,qBAAqB,EAAE,MAAM,mBAAmB,CAAA;AAE9E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAIrC,KAAK,wBAAwB,GAAG;IAC9B,QAAQ,CAAC,EAAE,KAAK,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,KAAK,0BAA0B,GAAG;IAChC,QAAQ,EAAE,IAAI,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CACtB,CAAA;AAkCD,iBAAS,cAAc;WAgIT,OAAO,IAA6B;;QAhJhD,4CAA4C;uBAC7B;YACb,yCAAyC;YACzC,IAAI,EAAE,OAAO,CAAA;SACd,GAAG,IAAI;;QAJR,4CAA4C;uBAC7B;YACb,yCAAyC;YACzC,IAAI,EAAE,OAAO,CAAA;SACd,GAAG,IAAI;;;;EAiJT;AAgBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;aArLR,MAAM,EAAE;SACZ,MAAM;YACH,MAAM;;aAFL,MAAM,EAAE;SACZ,MAAM;YACH,MAAM;;;;aAFL,MAAM,EAAE;SACZ,MAAM;YACH,MAAM;;aAFL,MAAM,EAAE;SACZ,MAAM;YACH,MAAM;;;kFA0LhB,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,129 +1,90 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Listbox as
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as b, openBlock as o, createBlock as a, unref as t, withCtx as l, createTextVNode as c, toDisplayString as g, createCommentVNode as d, createVNode as s, createElementBlock as m, mergeProps as y, createElementVNode as u, Fragment as V, renderList as B, normalizeStyle as k, renderSlot as w } from "vue";
|
|
2
|
+
import { Listbox as L, ListboxLabel as h, ListboxOptions as v, ListboxButton as z } from "@headlessui/vue";
|
|
3
|
+
import { useBindCx as S } from "../../hooks/useBindCx.js";
|
|
4
|
+
import x from "./ScalarListboxItem.vue.js";
|
|
5
|
+
import C from "../ScalarFloating/ScalarFloating.vue.js";
|
|
6
|
+
const N = { class: "custom-scroll min-h-0 flex-1" }, O = /* @__PURE__ */ b({
|
|
7
7
|
inheritAttrs: !1,
|
|
8
8
|
__name: "ScalarListbox",
|
|
9
9
|
props: {
|
|
10
|
-
multiple: { type: Boolean, default: !1 },
|
|
11
10
|
options: {},
|
|
12
|
-
modelValue: {},
|
|
13
11
|
id: {},
|
|
14
12
|
label: {},
|
|
13
|
+
multiple: { type: Boolean },
|
|
14
|
+
modelValue: {},
|
|
15
15
|
placement: {},
|
|
16
16
|
resize: { type: Boolean },
|
|
17
|
-
|
|
17
|
+
target: {},
|
|
18
|
+
middleware: {},
|
|
18
19
|
teleport: { type: [Boolean, String] }
|
|
19
20
|
},
|
|
20
21
|
emits: ["update:modelValue"],
|
|
21
|
-
setup(
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
// Layout
|
|
25
|
-
"group/listbox",
|
|
26
|
-
"flex min-w-0 items-center gap-1.5 rounded px-2 py-1.5 text-left",
|
|
27
|
-
"first-of-type:mt-0.75 last-of-type:mb-0.75",
|
|
28
|
-
// Text / background style
|
|
29
|
-
"truncate bg-transparent text-c-1",
|
|
30
|
-
// Interaction
|
|
31
|
-
"cursor-pointer hover:bg-b-2"
|
|
32
|
-
],
|
|
33
|
-
variants: {
|
|
34
|
-
selected: { true: "text-c-1" },
|
|
35
|
-
active: { true: "bg-b-2" },
|
|
36
|
-
disabled: { true: "pointer-events-none opacity-50" }
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
return (e, o) => (i(), d(t(B), {
|
|
22
|
+
setup($) {
|
|
23
|
+
const { cx: p } = S();
|
|
24
|
+
return (e, r) => (o(), a(t(L), {
|
|
40
25
|
modelValue: e.modelValue,
|
|
41
26
|
multiple: e.multiple,
|
|
42
|
-
"onUpdate:modelValue":
|
|
27
|
+
"onUpdate:modelValue": r[0] || (r[0] = (i) => e.$emit("update:modelValue", i))
|
|
43
28
|
}, {
|
|
44
|
-
default:
|
|
45
|
-
e.label ? (
|
|
29
|
+
default: l(({ open: i }) => [
|
|
30
|
+
e.label ? (o(), a(t(h), {
|
|
46
31
|
key: 0,
|
|
47
32
|
class: "sr-only"
|
|
48
33
|
}, {
|
|
49
|
-
default:
|
|
50
|
-
|
|
34
|
+
default: l(() => [
|
|
35
|
+
c(g(e.label), 1)
|
|
51
36
|
]),
|
|
52
37
|
_: 1
|
|
53
|
-
})) :
|
|
54
|
-
|
|
55
|
-
|
|
38
|
+
})) : d("", !0),
|
|
39
|
+
s(t(C), {
|
|
40
|
+
middleware: e.middleware,
|
|
56
41
|
placement: e.placement ?? "bottom-start",
|
|
57
42
|
resize: e.resize,
|
|
43
|
+
target: e.target,
|
|
58
44
|
teleport: e.teleport
|
|
59
45
|
}, {
|
|
60
|
-
floating:
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
class: p(
|
|
77
|
-
t(N)(
|
|
78
|
-
t(c)({ active: b, selected: u, disabled: l.disabled })
|
|
79
|
-
)
|
|
80
|
-
)
|
|
81
|
-
}, [
|
|
82
|
-
a("div", {
|
|
83
|
-
class: p([
|
|
84
|
-
"flex size-4 items-center justify-center rounded-full p-[3px]",
|
|
85
|
-
u ? "bg-c-accent text-b-1" : "text-transparent group-hover/listbox:shadow-border"
|
|
86
|
-
])
|
|
87
|
-
}, [
|
|
88
|
-
n(t(j), {
|
|
89
|
-
class: "relative top-[0.5px] size-2.5",
|
|
90
|
-
icon: "Checkmark",
|
|
91
|
-
thickness: "2.5"
|
|
92
|
-
})
|
|
93
|
-
], 2),
|
|
94
|
-
a("span", {
|
|
95
|
-
class: p(["inline-block min-w-0 flex-1 truncate", l.color ? l.color : "text-c-1"])
|
|
96
|
-
}, m(l.label), 3)
|
|
97
|
-
], 2)
|
|
98
|
-
]),
|
|
99
|
-
_: 2
|
|
100
|
-
}, 1032, ["disabled", "value"]))), 128))
|
|
46
|
+
floating: l(({ width: f }) => [
|
|
47
|
+
i ? (o(), m("div", y(
|
|
48
|
+
{
|
|
49
|
+
key: 0,
|
|
50
|
+
style: { width: f }
|
|
51
|
+
},
|
|
52
|
+
t(p)("relative flex max-h-[inherit] w-40 rounded border text-sm")
|
|
53
|
+
), [
|
|
54
|
+
u("div", N, [
|
|
55
|
+
s(t(v), { class: "flex flex-col p-0.75" }, {
|
|
56
|
+
default: l(() => [
|
|
57
|
+
(o(!0), m(V, null, B(e.options, (n) => (o(), a(x, {
|
|
58
|
+
key: n.id,
|
|
59
|
+
option: n,
|
|
60
|
+
style: k(e.multiple ? "checkbox" : "radio")
|
|
61
|
+
}, null, 8, ["option", "style"]))), 128))
|
|
101
62
|
]),
|
|
102
63
|
_: 1
|
|
103
64
|
})
|
|
104
65
|
]),
|
|
105
|
-
|
|
106
|
-
], 16)
|
|
66
|
+
r[1] || (r[1] = u("div", { class: "absolute inset-0 -z-1 rounded bg-b-1 shadow-md brightness-lifted" }, null, -1))
|
|
67
|
+
], 16)) : d("", !0)
|
|
107
68
|
]),
|
|
108
|
-
default:
|
|
109
|
-
|
|
69
|
+
default: l(() => [
|
|
70
|
+
s(t(z), {
|
|
110
71
|
id: e.id,
|
|
111
72
|
as: "template",
|
|
112
73
|
class: "justify-start focus:outline-none focus-visible:ring-1 focus-visible:ring-c-accent"
|
|
113
74
|
}, {
|
|
114
|
-
default:
|
|
115
|
-
|
|
75
|
+
default: l(() => [
|
|
76
|
+
w(e.$slots, "default", { open: i })
|
|
116
77
|
]),
|
|
117
78
|
_: 2
|
|
118
79
|
}, 1032, ["id"])
|
|
119
80
|
]),
|
|
120
81
|
_: 2
|
|
121
|
-
}, 1032, ["
|
|
82
|
+
}, 1032, ["middleware", "placement", "resize", "target", "teleport"])
|
|
122
83
|
]),
|
|
123
84
|
_: 3
|
|
124
85
|
}, 8, ["modelValue", "multiple"]));
|
|
125
86
|
}
|
|
126
87
|
});
|
|
127
88
|
export {
|
|
128
|
-
|
|
89
|
+
O as default
|
|
129
90
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { OptionStyle } from './types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
selected?: boolean;
|
|
4
|
+
style?: OptionStyle;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
7
|
+
export default _default;
|
|
8
|
+
//# sourceMappingURL=ScalarListboxCheckbox.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarListboxCheckbox.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarListbox/ScalarListboxCheckbox.vue"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAI1C,KAAK,WAAW,GAAG;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,WAAW,CAAA;CACpB,CAAC;;AAyEF,wBAOG"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { defineComponent as t, openBlock as o, createElementBlock as r, normalizeClass as c, createVNode as s, unref as n } from "vue";
|
|
2
|
+
import a from "../ScalarIcon/ScalarIcon.vue.js";
|
|
3
|
+
const m = /* @__PURE__ */ t({
|
|
4
|
+
__name: "ScalarListboxCheckbox",
|
|
5
|
+
props: {
|
|
6
|
+
selected: { type: Boolean },
|
|
7
|
+
style: {}
|
|
8
|
+
},
|
|
9
|
+
setup(l) {
|
|
10
|
+
return (e, p) => (o(), r("div", {
|
|
11
|
+
class: c(["flex size-4 items-center justify-center p-0.75", [
|
|
12
|
+
e.selected ? "bg-c-accent text-b-1" : "text-transparent group-hover/item:shadow-border",
|
|
13
|
+
e.style === "checkbox" ? "rounded" : "rounded-full"
|
|
14
|
+
]])
|
|
15
|
+
}, [
|
|
16
|
+
s(n(a), {
|
|
17
|
+
class: "relative top-[0.5px] size-2.5",
|
|
18
|
+
icon: "Checkmark",
|
|
19
|
+
thickness: "2.5"
|
|
20
|
+
})
|
|
21
|
+
], 2));
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
export {
|
|
25
|
+
m as default
|
|
26
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Option, OptionStyle } from './types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
option: Option;
|
|
4
|
+
style?: OptionStyle;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
export default _default;
|
|
8
|
+
//# sourceMappingURL=ScalarListboxItem.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarListboxItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarListbox/ScalarListboxItem.vue"],"names":[],"mappings":"AAsDA,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAIlD,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,WAAW,CAAA;CACpB,CAAC;;AAoGF,wBAOG"}
|