eco-vue-js 0.3.84 → 0.3.85
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,16 +1,16 @@
|
|
1
|
-
declare const _default:
|
1
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
2
2
|
title?: string | undefined;
|
3
3
|
selectedLength?: number | undefined;
|
4
|
+
disableMessageMore?: string | undefined;
|
4
5
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
5
6
|
"clear:selected": () => void;
|
6
7
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
7
8
|
title?: string | undefined;
|
8
9
|
selectedLength?: number | undefined;
|
10
|
+
disableMessageMore?: string | undefined;
|
9
11
|
}>>> & {
|
10
12
|
"onClear:selected"?: (() => any) | undefined;
|
11
|
-
}, {}, {}
|
12
|
-
default?(_: {}): any;
|
13
|
-
}>;
|
13
|
+
}, {}, {}>;
|
14
14
|
export default _default;
|
15
15
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
16
16
|
type __VLS_TypePropsToRuntimeProps<T> = {
|
@@ -21,9 +21,4 @@ type __VLS_TypePropsToRuntimeProps<T> = {
|
|
21
21
|
required: true;
|
22
22
|
};
|
23
23
|
};
|
24
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
25
|
-
new (): {
|
26
|
-
$slots: S;
|
27
|
-
};
|
28
|
-
};
|
29
24
|
//# sourceMappingURL=WButtonSelection.vue.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WButtonSelection.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Button/WButtonSelection.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"WButtonSelection.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Button/WButtonSelection.vue"],"names":[],"mappings":"AAkEA;;;;;;;;;;;;;;AAiSA,wBAWG;AACH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC"}
|
@@ -1,9 +1,14 @@
|
|
1
|
-
import { defineComponent, openBlock, createElementBlock, createElementVNode,
|
1
|
+
import { defineComponent, ref, openBlock, createElementBlock, createElementVNode, Fragment, renderList, createBlock, resolveDynamicComponent, unref, withCtx, createVNode, markRaw, createCommentVNode, Transition, toDisplayString } from 'vue';
|
2
2
|
import { numberFormatter } from '../../utils/utils.js';
|
3
3
|
import IconCancel from '../../assets/icons/default/IconCancel.svg.js';
|
4
|
+
import IconMore from '../../assets/icons/default/IconMore.svg.js';
|
5
|
+
import _sfc_main$1 from '../DropdownMenu/WDropdownMenu.vue.js';
|
6
|
+
import _sfc_main$2 from './WButtonSelectionAction.vue.js';
|
7
|
+
import { HorizontalAlign } from '../../utils/HorizontalAlign.js';
|
8
|
+
import _sfc_main$3 from '../ClickOutside/WClickOutside.vue.js';
|
4
9
|
|
5
|
-
const _hoisted_1 = { class: "
|
6
|
-
const _hoisted_2 = { class: "flex
|
10
|
+
const _hoisted_1 = { class: "grid grid-cols-[1fr,auto] h-12 pb-3 w-full" };
|
11
|
+
const _hoisted_2 = { class: "flex" };
|
7
12
|
const _hoisted_3 = {
|
8
13
|
key: 0,
|
9
14
|
class: "flex gap-3 sm-not:gap-1"
|
@@ -16,14 +21,54 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
16
21
|
__name: "WButtonSelection",
|
17
22
|
props: {
|
18
23
|
title: {},
|
19
|
-
selectedLength: {}
|
24
|
+
selectedLength: {},
|
25
|
+
disableMessageMore: {}
|
20
26
|
},
|
21
27
|
emits: ["clear:selected"],
|
22
28
|
setup(__props) {
|
29
|
+
const isOpen = ref(false);
|
23
30
|
return (_ctx, _cache) => {
|
24
31
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
25
32
|
createElementVNode("div", _hoisted_2, [
|
26
|
-
|
33
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.$slots.default?.(), (slot, index) => {
|
34
|
+
return openBlock(), createBlock(resolveDynamicComponent(slot), {
|
35
|
+
key: index,
|
36
|
+
class: "border-r border-solid border-gray-300 dark:border-gray-700 last:border-r-0"
|
37
|
+
});
|
38
|
+
}), 128)),
|
39
|
+
_ctx.$slots.more?.()?.length ? (openBlock(), createBlock(_sfc_main$1, {
|
40
|
+
key: 0,
|
41
|
+
"is-open": isOpen.value,
|
42
|
+
"max-width": 200,
|
43
|
+
"max-height": 300,
|
44
|
+
"horizontal-align": unref(HorizontalAlign).RIGHT_INNER
|
45
|
+
}, {
|
46
|
+
toggle: withCtx(() => [
|
47
|
+
createVNode(_sfc_main$2, {
|
48
|
+
title: "More",
|
49
|
+
icon: markRaw(unref(IconMore)),
|
50
|
+
"disable-message": _ctx.disableMessageMore,
|
51
|
+
onClick: _cache[0] || (_cache[0] = ($event) => isOpen.value = !isOpen.value)
|
52
|
+
}, null, 8, ["icon", "disable-message"])
|
53
|
+
]),
|
54
|
+
content: withCtx(() => [
|
55
|
+
createVNode(_sfc_main$3, {
|
56
|
+
class: "my-2 grid grid-cols-1 bg-default dark:bg-default-dark shadow-md rounded-xl overflow-hidden dark:outline dark:outline-1 dark:outline-gray-800",
|
57
|
+
onClick: _cache[1] || (_cache[1] = ($event) => isOpen.value = false)
|
58
|
+
}, {
|
59
|
+
default: withCtx(() => [
|
60
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.$slots.more?.(), (slot, index) => {
|
61
|
+
return openBlock(), createBlock(resolveDynamicComponent(slot), {
|
62
|
+
key: index,
|
63
|
+
class: "first:pt-2 last:pb-2"
|
64
|
+
});
|
65
|
+
}), 128))
|
66
|
+
]),
|
67
|
+
_: 1
|
68
|
+
})
|
69
|
+
]),
|
70
|
+
_: 1
|
71
|
+
}, 8, ["is-open", "horizontal-align"])) : createCommentVNode("", true)
|
27
72
|
]),
|
28
73
|
createVNode(Transition, {
|
29
74
|
"enter-active-class": "transition-opacity",
|
@@ -40,7 +85,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
40
85
|
]),
|
41
86
|
createElementVNode("div", {
|
42
87
|
class: "relative text-description sm-not:-px--inner-margin px-[1.125rem] flex items-center cursor-pointer select-none w-ripple w-ripple-hover",
|
43
|
-
onClick: _cache[
|
88
|
+
onClick: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("clear:selected"))
|
44
89
|
}, [
|
45
90
|
createVNode(unref(IconCancel))
|
46
91
|
])
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import { defineComponent, openBlock, createElementBlock,
|
1
|
+
import { defineComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, createBlock, resolveDynamicComponent, toDisplayString, withCtx, createCommentVNode } from 'vue';
|
2
2
|
import _sfc_main$1 from '../Tooltip/WTooltip.vue.js';
|
3
3
|
|
4
|
-
const _hoisted_1 =
|
5
|
-
const _hoisted_2 = ["
|
4
|
+
const _hoisted_1 = ["disabled"];
|
5
|
+
const _hoisted_2 = { class: "px-5 sm:px-[1.125rem] flex gap-2 items-center h-9" };
|
6
6
|
const _hoisted_3 = { class: "whitespace-nowrap font-normal text-base sm-not:hidden" };
|
7
7
|
const _hoisted_4 = { class: "whitespace-nowrap" };
|
8
8
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
@@ -16,26 +16,26 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
16
16
|
emits: ["click"],
|
17
17
|
setup(__props) {
|
18
18
|
return (_ctx, _cache) => {
|
19
|
-
return openBlock(), createElementBlock("
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
19
|
+
return openBlock(), createElementBlock("button", {
|
20
|
+
disabled: _ctx.disableMessage !== void 0,
|
21
|
+
class: normalizeClass(["relative select-none cursor-pointer no-underline outline-none bg-none disabled:text-description disabled:cursor-not-allowed", {
|
22
|
+
"w-ripple w-ripple-hover before:text-primary-default dark:before:text-primary-dark hover:text-primary-default dark:hover:text-primary-dark": !_ctx.disableMessage,
|
23
|
+
"text-primary-default dark:text-primary-dark": _ctx.active,
|
24
|
+
"text-accent": !_ctx.active
|
25
|
+
}]),
|
26
|
+
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click"))
|
27
|
+
}, [
|
28
|
+
createElementVNode("div", _hoisted_2, [
|
29
29
|
(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon))),
|
30
30
|
createElementVNode("div", _hoisted_3, toDisplayString(_ctx.title), 1)
|
31
|
-
]
|
31
|
+
]),
|
32
32
|
_ctx.disableMessage ? (openBlock(), createBlock(_sfc_main$1, { key: 0 }, {
|
33
33
|
default: withCtx(() => [
|
34
34
|
createElementVNode("div", _hoisted_4, toDisplayString(_ctx.disableMessage), 1)
|
35
35
|
]),
|
36
36
|
_: 1
|
37
37
|
})) : createCommentVNode("", true)
|
38
|
-
]);
|
38
|
+
], 10, _hoisted_1);
|
39
39
|
};
|
40
40
|
}
|
41
41
|
});
|