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: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
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":"AA8BA;;;;;;;;;;;;;;AA6LA,wBAAwG;AACxG,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;AAC9M,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
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, renderSlot, createVNode, Transition, withCtx, toDisplayString, unref, createCommentVNode } from 'vue';
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: "flex h-12 pb-3 w-full" };
6
- const _hoisted_2 = { class: "flex flex-1" };
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
- renderSlot(_ctx.$slots, "default")
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[0] || (_cache[0] = ($event) => _ctx.$emit("clear:selected"))
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, createElementVNode, normalizeClass, createBlock, resolveDynamicComponent, toDisplayString, withCtx, createCommentVNode } from 'vue';
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 = { class: "border-r border-solid border-gray-300 dark:border-gray-700 last:border-r-0" };
5
- const _hoisted_2 = ["disabled"];
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("div", _hoisted_1, [
20
- createElementVNode("button", {
21
- disabled: _ctx.disableMessage !== void 0,
22
- class: normalizeClass(["relative h-9 flex gap-2 px-5 sm:px-[1.125rem] items-center select-none cursor-pointer no-underline outline-none border-none bg-none disabled:text-description disabled:cursor-not-allowed", {
23
- "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,
24
- "text-primary-default dark:text-primary-dark": _ctx.active,
25
- "text-accent": !_ctx.active
26
- }]),
27
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click"))
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
- ], 10, _hoisted_2),
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
  });
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "https://github.com/rsmple/eco-vue-js.git"
6
6
  },
7
- "version": "0.3.84",
7
+ "version": "0.3.85",
8
8
  "scripts": {
9
9
  "dev": "vite",
10
10
  "build": "run-p type-check build-only",