eco-vue-js 0.10.30 → 0.10.32

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.
Files changed (31) hide show
  1. package/dist/components/Button/WButtonSelectionAction.vue.js +1 -1
  2. package/dist/components/Expansion/WExpansion.vue.js +2 -2
  3. package/dist/components/Expansion/WExpansionItem.vue.d.ts +6 -2
  4. package/dist/components/Expansion/WExpansionItem.vue.d.ts.map +1 -1
  5. package/dist/components/Expansion/WExpansionItem.vue.js +21 -7
  6. package/dist/components/FilterWrapper/WFilterWrapper.vue.d.ts.map +1 -1
  7. package/dist/components/FilterWrapper/WFilterWrapper.vue.js +26 -30
  8. package/dist/components/HeaderBar/WHeaderBar.vue.js +4 -4
  9. package/dist/components/InfoCard/WInfoCard.vue.d.ts +4 -0
  10. package/dist/components/InfoCard/WInfoCard.vue.d.ts.map +1 -1
  11. package/dist/components/InfoCard/WInfoCard.vue.js +21 -10
  12. package/dist/components/InfoCard/models/utils.d.ts +4 -0
  13. package/dist/components/InfoCard/models/utils.d.ts.map +1 -0
  14. package/dist/components/InfoCard/models/utils.js +20 -0
  15. package/dist/components/Input/WInput.vue.js +3 -3
  16. package/dist/components/List/components/ListCardAction.vue.js +1 -1
  17. package/dist/components/Page/WPage.vue.d.ts.map +1 -1
  18. package/dist/components/Tabs/WTabs.vue.d.ts.map +1 -1
  19. package/dist/components/Tabs/WTabs.vue.js +1 -1
  20. package/dist/components/Tooltip/WTooltip.vue.d.ts.map +1 -1
  21. package/dist/components/Tooltip/WTooltip.vue.js +0 -1
  22. package/dist/components/Tooltip/WTooltipContainer.vue.d.ts.map +1 -1
  23. package/dist/components/Tooltip/WTooltipContainer.vue.js +3 -2
  24. package/dist/components/Tooltip/components/TooltipContainer.vue.d.ts.map +1 -1
  25. package/dist/components/Tooltip/components/TooltipContainer.vue.js +34 -19
  26. package/dist/utils/Tooltip.d.ts +0 -1
  27. package/dist/utils/Tooltip.d.ts.map +1 -1
  28. package/dist/utils/useDefaultQuery.d.ts +1 -1
  29. package/dist/utils/useDefaultQuery.d.ts.map +1 -1
  30. package/dist/utils/useDefaultQuery.js +19 -15
  31. package/package.json +2 -2
@@ -2,7 +2,7 @@ import { defineComponent, createElementBlock, openBlock, normalizeClass, createE
2
2
  import _sfc_main$1 from '../Tooltip/WTooltip.vue.js';
3
3
 
4
4
  const _hoisted_1 = ["disabled"];
5
- const _hoisted_2 = { class: "-h--w-input-height flex items-center gap-2 px-[--w-list-padding,1rem]" };
5
+ const _hoisted_2 = { class: "-h--w-input-height sm-not:-px--inner-margin flex items-center gap-2 px-[--w-list-padding,1rem]" };
6
6
  const _hoisted_3 = {
7
7
  key: 0,
8
8
  class: "sm-not:hidden whitespace-nowrap font-normal"
@@ -15,10 +15,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
15
15
  setup(__props) {
16
16
  return (_ctx, _cache) => {
17
17
  return openBlock(), createBlock(Transition, {
18
- "enter-active-class": "transition-[grid-template-rows] overflow-hidden grid",
18
+ "enter-active-class": "transition-[grid-template-rows] overflow-y-hidden grid",
19
19
  "enter-from-class": "grid-rows-[0fr]",
20
20
  "enter-to-class": "grid-rows-[1fr]",
21
- "leave-active-class": "transition-[grid-template-rows] overflow-hidden grid",
21
+ "leave-active-class": "transition-[grid-template-rows] overflow-y-hidden grid",
22
22
  "leave-from-class": "grid-rows-[1fr]",
23
23
  "leave-to-class": "grid-rows-[0fr]",
24
24
  onBeforeEnter: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:visible", true)),
@@ -15,7 +15,9 @@ declare function __VLS_template(): {
15
15
  default?: () => VNode[];
16
16
  title?: () => VNode[];
17
17
  };
18
- refs: {};
18
+ refs: {
19
+ button: unknown;
20
+ };
19
21
  rootEl: any;
20
22
  };
21
23
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
@@ -23,7 +25,9 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
23
25
  toggle: () => any;
24
26
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
25
27
  onToggle?: (() => any) | undefined;
26
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
28
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
29
+ button: unknown;
30
+ }, any>;
27
31
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
28
32
  export default _default;
29
33
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1 +1 @@
1
- {"version":3,"file":"WExpansionItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Expansion/WExpansionItem.vue"],"names":[],"mappings":"AAkDA;AA6EA,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,KAAK,CAAA;AAM9B,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,YAAY,CAAA;IACnB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAC;AAeF,iBAAS,cAAc;WA0GT,OAAO,IAA6B;;kBAhHtC,MAAM,KAAK,EAAE;gBACf,MAAM,KAAK,EAAE;;kBADX,MAAM,KAAK,EAAE;gBACf,MAAM,KAAK,EAAE;;;;EAoHtB;AAWD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;kFAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"WExpansionItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Expansion/WExpansionItem.vue"],"names":[],"mappings":"AAuDA;AA4FA,OAAO,EAAC,KAAK,KAAK,EAAiB,MAAM,KAAK,CAAA;AAM9C,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,YAAY,CAAA;IACnB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAC;AAyBF,iBAAS,cAAc;WA0HT,OAAO,IAA6B;;kBA1ItC,MAAM,KAAK,EAAE;gBACf,MAAM,KAAK,EAAE;;kBADX,MAAM,KAAK,EAAE;gBACf,MAAM,KAAK,EAAE;;;;;;EA8ItB;AAYD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;OAQnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,4 +1,4 @@
1
- import { defineComponent, createElementBlock, openBlock, Fragment, createBlock, createVNode, resolveDynamicComponent, withCtx, createCommentVNode, createElementVNode, normalizeClass, createTextVNode, toDisplayString, Transition, unref, renderSlot } from 'vue';
1
+ import { defineComponent, useTemplateRef, createElementBlock, openBlock, Fragment, createBlock, createVNode, resolveDynamicComponent, withKeys, withCtx, createCommentVNode, createElementVNode, normalizeClass, createTextVNode, toDisplayString, Transition, unref, renderSlot } from 'vue';
2
2
  import IconArrow from '../../assets/icons/default/IconArrow.svg.js';
3
3
  import _sfc_main$1 from './WExpansion.vue.js';
4
4
 
@@ -18,12 +18,26 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
18
18
  minTitle: { type: Boolean }
19
19
  },
20
20
  emits: ["toggle"],
21
- setup(__props) {
21
+ setup(__props, { emit: __emit }) {
22
+ const emit = __emit;
23
+ const buttonRef = useTemplateRef("button");
24
+ const toggle = () => {
25
+ emit("toggle");
26
+ const element = buttonRef.value?.$el instanceof Element ? buttonRef.value.$el : buttonRef.value;
27
+ if (element instanceof HTMLElement) element.blur();
28
+ };
22
29
  return (_ctx, _cache) => {
23
30
  return openBlock(), createElementBlock(Fragment, null, [
24
- (openBlock(), createBlock(resolveDynamicComponent(_ctx.$slots.title?.()?.[0] ?? "button"), {
25
- class: "w-ripple w-ripple-hover -px--inner-margin relative grid w-full cursor-pointer select-none grid-cols-[auto,1fr,auto] items-center py-3 text-start",
26
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("toggle"))
31
+ (openBlock(), createBlock(resolveDynamicComponent(_ctx.$slots.title?.()?.[0] ?? "div"), {
32
+ ref: "button",
33
+ role: "button",
34
+ tabindex: "0",
35
+ class: "w-ripple w-ripple-hover -px--inner-margin -mx---inner-margin relative grid cursor-pointer select-none grid-cols-[auto,1fr,auto] items-center py-3 text-start",
36
+ onClick: toggle,
37
+ onKeydown: [
38
+ withKeys(toggle, ["enter"]),
39
+ withKeys(toggle, ["space"])
40
+ ]
27
41
  }, {
28
42
  default: withCtx(() => [
29
43
  _ctx.icon ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon), {
@@ -55,10 +69,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
55
69
  ])
56
70
  ]),
57
71
  _: 1
58
- })),
72
+ }, 544)),
59
73
  createVNode(_sfc_main$1, {
60
74
  "is-open": _ctx.isOpen,
61
- class: normalizeClass([_ctx.$attrs.class, "mt-2"])
75
+ class: normalizeClass([_ctx.$attrs.class, "-px--inner-margin -mx---inner-margin py-2"])
62
76
  }, {
63
77
  default: withCtx(() => [
64
78
  renderSlot(_ctx.$slots, "default")
@@ -1 +1 @@
1
- {"version":3,"file":"WFilterWrapper.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/FilterWrapper/WFilterWrapper.vue"],"names":[],"mappings":"AAsCA;AAuHA,OAAO,EAAC,KAAK,KAAK,EAAoC,MAAM,KAAK,CAAA;AAWjE,KAAK,WAAW,GAAG;IACjB,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAA;CAC9B,CAAC;AAiEF,iBAAS,cAAc;WAyFT,OAAO,IAA6B;;iBA/FvC,MAAM,KAAK,EAAE;gBACd,MAAM,KAAK,EAAE;;iBADZ,MAAM,KAAK,EAAE;gBACd,MAAM,KAAK,EAAE;;;;EAmGtB;AAiBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;6FAQnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"WFilterWrapper.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/FilterWrapper/WFilterWrapper.vue"],"names":[],"mappings":"AAkCA;AAmHA,OAAO,EAAC,KAAK,KAAK,EAAoC,MAAM,KAAK,CAAA;AAWjE,KAAK,WAAW,GAAG;IACjB,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAA;CAC9B,CAAC;AAiEF,iBAAS,cAAc;WAqFT,OAAO,IAA6B;;iBA3FvC,MAAM,KAAK,EAAE;gBACd,MAAM,KAAK,EAAE;;iBADZ,MAAM,KAAK,EAAE;gBACd,MAAM,KAAK,EAAE;;;;EA+FtB;AAiBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;6FAQnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -6,8 +6,8 @@ import { Modal } from '../../utils/Modal.js';
6
6
  import { SemanticType } from '../../utils/SemanticType.js';
7
7
  import { throttle } from '../../utils/utils.js';
8
8
 
9
- const _hoisted_1 = { class: "pb-16" };
10
- const _hoisted_2 = { class: "-px--inner-margin grid grid-cols-2 gap-4" };
9
+ const _hoisted_1 = { class: "-px--inner-margin pb-16" };
10
+ const _hoisted_2 = { class: "grid grid-cols-2 gap-4" };
11
11
  const _sfc_main = /* @__PURE__ */ defineComponent({
12
12
  __name: "WFilterWrapper",
13
13
  props: {
@@ -55,34 +55,30 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
55
55
  });
56
56
  return (_ctx, _cache) => {
57
57
  return openBlock(), createElementBlock("div", _hoisted_1, [
58
- _cache[2] || (_cache[2] = createElementVNode("div", { class: "text-accent -h--header-height -mx--inner-margin flex items-center text-xl font-semibold" }, " Filters ", -1)),
59
- createElementVNode("div", null, [
60
- createElementVNode("div", null, [
61
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.$slots.default?.(), (slot, index) => {
62
- return openBlock(), createBlock(resolveDynamicComponent(slot), {
63
- key: index,
64
- "is-open": index === selectedIndex.value,
65
- onToggle: ($event) => unref(setSelectedIndex)(index),
66
- "onUpdate:hasChanges": ($event) => hasChangesMap.value[index.toString()] = $event
67
- }, null, 40, ["is-open", "onToggle", "onUpdate:hasChanges"]);
68
- }), 128))
69
- ]),
70
- _cache[1] || (_cache[1] = createElementVNode("div", { class: "-mx--inner-margin my-8 h-0.5 rounded bg-gray-400" }, null, -1)),
71
- createElementVNode("div", _hoisted_2, [
72
- renderSlot(_ctx.$slots, "bottom"),
73
- createVNode(_sfc_main$1, {
74
- "semantic-type": unref(SemanticType).SECONDARY,
75
- disabled: !changesCount.value,
76
- class: "col-start-2",
77
- onClick: openConfirmReset
78
- }, {
79
- default: withCtx(() => [
80
- createVNode(unref(IconFilterRemove)),
81
- _cache[0] || (_cache[0] = createTextVNode(" Reset Filters "))
82
- ]),
83
- _: 1
84
- }, 8, ["semantic-type", "disabled"])
85
- ])
58
+ _cache[1] || (_cache[1] = createElementVNode("div", { class: "text-accent -h--header-height flex items-center text-xl font-semibold" }, " Filters ", -1)),
59
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.$slots.default?.(), (slot, index) => {
60
+ return openBlock(), createBlock(resolveDynamicComponent(slot), {
61
+ key: index,
62
+ "is-open": index === selectedIndex.value,
63
+ onToggle: ($event) => unref(setSelectedIndex)(index),
64
+ "onUpdate:hasChanges": ($event) => hasChangesMap.value[index.toString()] = $event
65
+ }, null, 40, ["is-open", "onToggle", "onUpdate:hasChanges"]);
66
+ }), 128)),
67
+ _cache[2] || (_cache[2] = createElementVNode("div", { class: "my-8 h-0.5 rounded bg-gray-400" }, null, -1)),
68
+ createElementVNode("div", _hoisted_2, [
69
+ renderSlot(_ctx.$slots, "bottom"),
70
+ createVNode(_sfc_main$1, {
71
+ "semantic-type": unref(SemanticType).SECONDARY,
72
+ disabled: !changesCount.value,
73
+ class: "col-start-2",
74
+ onClick: openConfirmReset
75
+ }, {
76
+ default: withCtx(() => [
77
+ createVNode(unref(IconFilterRemove)),
78
+ _cache[0] || (_cache[0] = createTextVNode(" Reset Filters "))
79
+ ]),
80
+ _: 1
81
+ }, 8, ["semantic-type", "disabled"])
86
82
  ])
87
83
  ]);
88
84
  };
@@ -10,10 +10,10 @@ const _hoisted_1 = {
10
10
  class: "-h--header-height fixed inset-x-0 top-0 z-10 flex print:hidden"
11
11
  };
12
12
  const _hoisted_2 = { class: "text-accent sm:text-2.5xl flex-1 truncate text-xl font-semibold" };
13
- const _hoisted_3 = { class: "w-ripple w-ripple-hover relative flex h-full items-center px-[--w-list-padding,1rem]" };
13
+ const _hoisted_3 = { class: "w-ripple w-ripple-hover sm-not:-px--inner-margin relative flex h-full items-center px-[--w-list-padding,1rem]" };
14
14
  const _hoisted_4 = {
15
15
  key: 0,
16
- class: "-pl--inner-margin xl-not:pl-[3.75rem] -pr--inner-margin relative flex w-full flex-1 items-center gap-2"
16
+ class: "xl-not:pl-[3.75rem] -px--inner-margin relative flex w-full flex-1 items-center gap-2"
17
17
  };
18
18
  const _sfc_main = /* @__PURE__ */ defineComponent({
19
19
  __name: "WHeaderBar",
@@ -65,7 +65,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
65
65
  style: normalizeStyle({ "--header-height-padding": unref(headerPadding) + "px" })
66
66
  }, null, 6)),
67
67
  withDirectives(createElementVNode("div", {
68
- class: normalizeClass(["-pl--inner-margin xl-not:pl-[3.75rem] relative flex max-w-full flex-1 items-center", {
68
+ class: normalizeClass(["-pl--inner-margin xl-not:-pl--header-height relative flex max-w-full flex-1 items-center", {
69
69
  "-pr--inner-margin": !_ctx.searchEnabled
70
70
  }])
71
71
  }, [
@@ -76,7 +76,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
76
76
  ]),
77
77
  _ctx.searchEnabled ? (openBlock(), createElementBlock("button", {
78
78
  key: 0,
79
- class: "w-ripple-trigger -pr--inner-margin h-full select-none",
79
+ class: "w-ripple-trigger sm:-pr--inner-margin h-full select-none",
80
80
  onClick: openSearch
81
81
  }, [
82
82
  createElementVNode("div", _hoisted_3, [
@@ -1,10 +1,14 @@
1
+ import { SemanticType } from '../../utils/SemanticType';
1
2
  type __VLS_Props = {
2
3
  noBg?: boolean;
3
4
  noIcon?: boolean;
5
+ icon?: SVGComponent;
6
+ semanticType?: SemanticType;
4
7
  };
5
8
  declare function __VLS_template(): {
6
9
  attrs: Partial<{}>;
7
10
  slots: {
11
+ top?(_: {}): any;
8
12
  default?(_: {}): any;
9
13
  };
10
14
  refs: {};
@@ -1 +1 @@
1
- {"version":3,"file":"WInfoCard.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/InfoCard/WInfoCard.vue"],"names":[],"mappings":"AAiBA;AA6BA,KAAK,WAAW,GAAG;IACjB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAC;AAKF,iBAAS,cAAc;WAyCT,OAAO,IAA6B;;yBAVrB,GAAG;;;;EAe/B;AASD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,6SAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"WInfoCard.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/InfoCard/WInfoCard.vue"],"names":[],"mappings":"AA0BA;AA4CA,OAAO,EAAC,YAAY,EAAC,MAAM,sBAAsB,CAAA;AAIjD,KAAK,WAAW,GAAG;IACjB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,IAAI,CAAC,EAAE,YAAY,CAAA;IACnB,YAAY,CAAC,EAAE,YAAY,CAAA;CAC5B,CAAC;AAKF,iBAAS,cAAc;WAsDT,OAAO,IAA6B;;qBAXzB,GAAG;yBACC,GAAG;;;;EAe/B;AAYD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,6SAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,26 +1,37 @@
1
- import { defineComponent, createElementBlock, openBlock, normalizeClass, createBlock, createCommentVNode, createElementVNode, unref, renderSlot } from 'vue';
1
+ import { defineComponent, createElementBlock, openBlock, normalizeClass, unref, renderSlot, createElementVNode, createBlock, createCommentVNode, resolveDynamicComponent } from 'vue';
2
2
  import IconNegativeInfo from '../../assets/icons/sax/IconNegativeInfo.svg.js';
3
+ import { SemanticType } from '../../utils/SemanticType.js';
4
+ import { infoCardSemanticTypeMap, infoCardIconSemanticTypeMap } from './models/utils.js';
3
5
 
4
- const _hoisted_1 = { class: "text-pretty py-1" };
6
+ const _hoisted_1 = { class: "-gap--inner-margin grid grid-cols-[auto,1fr]" };
7
+ const _hoisted_2 = { class: "text-pretty py-1 leading-relaxed" };
5
8
  const _sfc_main = /* @__PURE__ */ defineComponent({
6
9
  __name: "WInfoCard",
7
10
  props: {
8
11
  noBg: { type: Boolean },
9
- noIcon: { type: Boolean }
12
+ noIcon: { type: Boolean },
13
+ icon: {},
14
+ semanticType: {}
10
15
  },
11
16
  setup(__props) {
12
17
  return (_ctx, _cache) => {
13
18
  return openBlock(), createElementBlock("div", {
14
- class: normalizeClass(["sm-not:-px--inner-margin flex gap-3.5 p-4 leading-7 sm:rounded-3xl", {
15
- "bg-gray-100 dark:bg-gray-800": !_ctx.noBg
19
+ class: normalizeClass(["sm-not:-px--inner-margin sm-not:-mx---inner-margin p-4 sm:rounded-3xl", {
20
+ [unref(infoCardSemanticTypeMap)[_ctx.semanticType ?? unref(SemanticType).SECONDARY]]: !_ctx.noBg
16
21
  }])
17
22
  }, [
18
- !_ctx.noIcon ? (openBlock(), createBlock(unref(IconNegativeInfo), {
19
- key: 0,
20
- class: "square-8 sm-not:square-7 sm-not:-ml-1 text-description inline-block rotate-180"
21
- })) : createCommentVNode("", true),
23
+ renderSlot(_ctx.$slots, "top"),
22
24
  createElementVNode("div", _hoisted_1, [
23
- renderSlot(_ctx.$slots, "default")
25
+ !_ctx.noIcon ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon ?? unref(IconNegativeInfo)), {
26
+ key: 0,
27
+ class: normalizeClass(["square-6 sm-not:-mx-1 inline-block", {
28
+ [unref(infoCardIconSemanticTypeMap)[_ctx.semanticType ?? unref(SemanticType).SECONDARY]]: true,
29
+ "rotate-180": !_ctx.icon
30
+ }])
31
+ }, null, 8, ["class"])) : createCommentVNode("", true),
32
+ createElementVNode("div", _hoisted_2, [
33
+ renderSlot(_ctx.$slots, "default")
34
+ ])
24
35
  ])
25
36
  ], 2);
26
37
  };
@@ -0,0 +1,4 @@
1
+ import { SemanticType } from '../../../utils/SemanticType';
2
+ export declare const infoCardSemanticTypeMap: Record<SemanticType, string>;
3
+ export declare const infoCardIconSemanticTypeMap: Record<SemanticType, string>;
4
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/components/InfoCard/models/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,sBAAsB,CAAA;AAEjD,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAOhE,CAAA;AAED,eAAO,MAAM,2BAA2B,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAOpE,CAAA"}
@@ -0,0 +1,20 @@
1
+ import { SemanticType } from '../../../utils/SemanticType.js';
2
+
3
+ const infoCardSemanticTypeMap = {
4
+ [SemanticType.PRIMARY]: "bg-primary-default/10 dark:bg-primary-dark/10",
5
+ [SemanticType.SECONDARY]: "bg-gray-100 dark:bg-gray-800",
6
+ [SemanticType.POSITIVE]: "bg-positive/10 dark:bg-positive-dark/10",
7
+ [SemanticType.NEGARIVE]: "bg-negative/10 dark:bg-negative-dark/10",
8
+ [SemanticType.WARNING]: "bg-warning/10 dark:bg-warning-dark/10",
9
+ [SemanticType.INFO]: "bg-info/10 dark:bg-info-dark/10"
10
+ };
11
+ const infoCardIconSemanticTypeMap = {
12
+ [SemanticType.PRIMARY]: "text-primary-default dark:text-primary-dark",
13
+ [SemanticType.SECONDARY]: "text-description",
14
+ [SemanticType.POSITIVE]: "text-positive dark:text-positive-dark",
15
+ [SemanticType.NEGARIVE]: "text-negative dark:text-negative-dark",
16
+ [SemanticType.WARNING]: "text-warning dark:text-warning-dark",
17
+ [SemanticType.INFO]: "text-info dark:text-info-dark"
18
+ };
19
+
20
+ export { infoCardIconSemanticTypeMap, infoCardSemanticTypeMap };
@@ -240,7 +240,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
240
240
  }, [
241
241
  createElementVNode("div", {
242
242
  class: normalizeClass(["flex flex-wrap gap-[--w-input-gap,0.25rem]", {
243
- "[&:not(:has(.w-option-has-bg))]:-px--w-option-padding": !_ctx.icon
243
+ "[&:not(:has(.w-option-has-bg))]:-px--w-option-padding": !_ctx.icon && !_ctx.textarea
244
244
  }])
245
245
  }, [
246
246
  renderSlot(_ctx.$slots, "prefix"),
@@ -254,8 +254,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
254
254
  (openBlock(), createBlock(resolveDynamicComponent(_ctx.textarea ? "textarea" : "input"), {
255
255
  id,
256
256
  ref: "input",
257
- class: normalizeClass(["w-input max-w-full flex-1 appearance-none border-none bg-[inherit] font-normal outline-0 placeholder:text-gray-400 disabled:cursor-not-allowed disabled:opacity-80 dark:placeholder:text-gray-500", {
258
- "-py--w-option-padding min-h-[--w-textarea-height,10rem] w-full": _ctx.textarea,
257
+ class: normalizeClass(["w-input max-w-full flex-1 basis-auto appearance-none border-none bg-[inherit] font-normal outline-0 placeholder:text-gray-400 disabled:cursor-not-allowed disabled:opacity-80 dark:placeholder:text-gray-500", {
258
+ "-p--w-option-padding min-h-[--w-textarea-height,10rem] w-full": _ctx.textarea,
259
259
  "resize-y": _ctx.resize && _ctx.textarea,
260
260
  "resize-none": !_ctx.resize && _ctx.textarea,
261
261
  "h-[calc(var(--w-input-height,2.75rem)-2px)]": !_ctx.textarea && !_ctx.$slots.suffix,
@@ -12,7 +12,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
12
12
  return (_ctx, _cache) => {
13
13
  return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), mergeProps(_ctx.props, {
14
14
  class: ["w-ripple w-ripple-hover w-ripple-has w-ripple-opacity-[0.04] absolute inset-0 cursor-pointer select-none", {
15
- "w-ripple-rounded-[--w-list-rounded,unset] rounded-[--w-list-rounded,unset]": _ctx.card
15
+ "sm:w-ripple-rounded-[--w-list-rounded,unset] sm:rounded-[--w-list-rounded,unset]": _ctx.card
16
16
  }],
17
17
  onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click", $event))
18
18
  }), null, 16, ["class"]);
@@ -1 +1 @@
1
- {"version":3,"file":"WPage.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Page/WPage.vue"],"names":[],"mappings":"AA6FA;AA6RA,OAAO,EAAC,KAAK,SAAS,EAAmE,MAAM,KAAK,CAAA;AAUpG,KAAK,WAAW,GAAG;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,aAAa,CAAC,EAAE,SAAS,CAAA;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,WAAW,CAAC,EAAE,WAAW,EAAE,CAAA;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,EAAE,MAAM,GAAG,SAAS,CAAA;CAC9B,CAAC;AA4KF,iBAAS,cAAc;WAkJT,OAAO,IAA6B;;wBAhBtB,GAAG;wBAGF,GAAG;;kCA3RL,IAAI;;YAyRF,GAAG;sBACN,GAAG;sBAEF,GAAG;;;;;;;EAiB7B;AAaD,KAAK,o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H2B,GAAG,8CACL,GAAG,yBAC3B,GAAG,6DACP,GAAG;;;;;;;;;;;;;;;;;;OAoOhB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -210,7 +210,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
210
210
  ref: "buttonContainer",
211
211
  class: normalizeClass(["relative", {
212
212
  "sm-not:snap-start grid grid-cols-[1fr,auto]": _ctx.side,
213
- "no-scrollbar sm-not:-pl--inner-margin flex snap-x snap-mandatory snap-always overflow-x-auto overscroll-x-contain pr-[50%]": !_ctx.side
213
+ "no-scrollbar sm-not:-pl--inner-margin sm-not:-mx---inner-margin flex snap-x snap-mandatory snap-always overflow-x-auto overscroll-x-contain pr-[50%]": !_ctx.side
214
214
  }])
215
215
  }, [
216
216
  (openBlock(true), createElementBlock(Fragment, null, renderList(defaultSlotsAll.value, (slot, index) => {
@@ -1 +1 @@
1
- {"version":3,"file":"WTooltip.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Tooltip/WTooltip.vue"],"names":[],"mappings":"AAOA;AA4FA,OAAO,EAAC,KAAK,KAAK,EAAkF,MAAM,KAAK,CAAA;AAO/G,KAAK,WAAW,GAAG;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAC;AAoEF,iBAAS,c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AC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -41,7 +41,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
41
41
  parent: parent.value,
42
42
  slot: slot ? markRaw(slot) : void 0,
43
43
  text: props.text,
44
- light: props.light,
45
44
  key: getIncrement(),
46
45
  maxHeight: props.maxHeight,
47
46
  left: props.left,
@@ -1 +1 @@
1
- {"version":3,"file":"WTooltipContainer.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Tooltip/WTooltipContainer.vue"],"names":[],"mappings":"AAgDA;;AA4TA,wBAMG"}
1
+ {"version":3,"file":"WTooltipContainer.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Tooltip/WTooltipContainer.vue"],"names":[],"mappings":"AAiDA;;AAoUA,wBAMG"}
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, onBeforeMount, onMounted, onBeforeUnmount, onUnmounted, createBlock, openBlock, Transition, withCtx, createCommentVNode, unref, createVNode, createElementBlock, resolveDynamicComponent, toDisplayString, markRaw } from 'vue';
1
+ import { defineComponent, ref, computed, onBeforeMount, onMounted, onBeforeUnmount, onUnmounted, createBlock, openBlock, Transition, withCtx, createCommentVNode, unref, createVNode, createElementBlock, resolveDynamicComponent, toDisplayString, markRaw } from 'vue';
2
2
  import _sfc_main$1 from '../Dropdown/WDropdown.vue.js';
3
3
  import { HorizontalAlign } from '../../utils/HorizontalAlign.js';
4
4
  import { initTooltip } from '../../utils/Tooltip.js';
@@ -27,6 +27,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
27
27
  }, 25);
28
28
  }
29
29
  };
30
+ const dropdownKey = computed(() => tooltipMeta.value?.left ? HorizontalAlign.LEFT_OUTER : tooltipMeta.value?.right ? HorizontalAlign.RIGHT_OUTER : HorizontalAlign.CENTER);
30
31
  const close = () => {
31
32
  clearTimeoutOnClose();
32
33
  tooltipMeta.value = null;
@@ -57,7 +58,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
57
58
  }, {
58
59
  default: withCtx(() => [
59
60
  tooltipMeta.value ? (openBlock(), createBlock(_sfc_main$1, {
60
- key: 0,
61
+ key: dropdownKey.value,
61
62
  "parent-element": tooltipMeta.value.parent,
62
63
  "horizontal-align": tooltipMeta.value.left ? unref(HorizontalAlign).LEFT_OUTER : tooltipMeta.value.right ? unref(HorizontalAlign).RIGHT_OUTER : unref(HorizontalAlign).CENTER,
63
64
  "max-height": tooltipMeta.value?.maxHeight ?? 120,
@@ -1 +1 @@
1
- {"version":3,"file":"TooltipContainer.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/Tooltip/components/TooltipContainer.vue"],"names":[],"mappings":"AA8CA;AAAA,OA8JO,KAAK,EAAC,WAAW,EAAC,MAAM,iBAAiB,CAAA;AAQhD,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,WAAW,CAAA;IACxB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAC;AAgGF,iBAAS,cAAc;WAuET,OAAO,IAA6B;;yBAXrB,GAAG;;;;;;EAgB/B;AAWD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;kBASnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"TooltipContainer.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/Tooltip/components/TooltipContainer.vue"],"names":[],"mappings":"AAgEA;AAAA,OAgLO,KAAK,EAAC,WAAW,EAAC,MAAM,iBAAiB,CAAA;AAQhD,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,WAAW,CAAA;IACxB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAC;AAgGF,iBAAS,cAAc;WAkFT,OAAO,IAA6B;;yBAXrB,GAAG;;;;;;EAgB/B;AAWD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;kBASnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,6 +1,8 @@
1
1
  import { defineComponent, useTemplateRef, ref, watch, toRef, onMounted, createElementBlock, openBlock, normalizeClass, createElementVNode, normalizeStyle, renderSlot, nextTick } from 'vue';
2
2
  import { isClientSide } from '../../../utils/utils.js';
3
3
 
4
+ const _hoisted_1 = ["viewBox"];
5
+ const _hoisted_2 = ["transform"];
4
6
  const MARGIN = 12;
5
7
  const _sfc_main = /* @__PURE__ */ defineComponent({
6
8
  __name: "TooltipContainer",
@@ -77,29 +79,42 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
77
79
  }])
78
80
  }, [
79
81
  (openBlock(), createElementBlock("svg", {
80
- viewBox: "0 0 16 16",
81
- class: normalizeClass(["square-5 pointer-events-auto z-10", {
82
- "text-black-default dark:text-gray-800": !_ctx.tooltipMeta.light,
83
- "text-default dark:text-gray-800": _ctx.tooltipMeta.light,
84
- "order-2 -mb-1 rotate-180": _ctx.isTop,
85
- "order-2 -mr-1 rotate-90": _ctx.isLeft,
86
- "-ml-1 -rotate-90": _ctx.isRight,
87
- "-mt-1": !_ctx.isTop && !_ctx.isLeft && !_ctx.isRight
82
+ viewBox: _ctx.isLeft || _ctx.isRight ? "0 0 8 16" : "0 0 16 8",
83
+ class: normalizeClass(["pointer-events-auto z-10", {
84
+ "width-4 order-2 -mt-px mb-1": _ctx.isTop,
85
+ "width-2 order-2 -ml-px mr-1": _ctx.isLeft,
86
+ "width-2 -mr-px ml-1": _ctx.isRight,
87
+ "width-4 -mb-px mt-1": !_ctx.isTop && !_ctx.isLeft && !_ctx.isRight
88
88
  }]),
89
89
  onMouseover: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("over")),
90
90
  onMouseleave: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("leave"))
91
- }, _cache[4] || (_cache[4] = [
92
- createElementVNode("path", {
93
- d: "M7.16933 9.81927C5.84985 12.8991 5.05085 15.1582 0 16H16.0042C10.9498 15.1582 10.1503 12.8991 8.83068 9.81926C8.50615 9.06181 7.49384 9.06181 7.16933 9.81927Z",
94
- fill: "currentColor"
95
- }, null, -1)
96
- ]), 34)),
91
+ }, [
92
+ createElementVNode("g", {
93
+ transform: `rotate(${_ctx.isTop ? 0 : _ctx.isLeft ? -90 : _ctx.isRight ? 90 : 180} ${_ctx.isLeft || _ctx.isRight ? "4 0" : "0 0"})`,
94
+ "transform-origin": "center center"
95
+ }, _cache[4] || (_cache[4] = [
96
+ createElementVNode("rect", {
97
+ width: "16",
98
+ height: "8",
99
+ fill: "none"
100
+ }, null, -1),
101
+ createElementVNode("path", {
102
+ d: "M7.03676 5.8704C5.7908 2.94938 4.87965 0.813274 0 0H16.0042C11.1205 0.813374 10.2091 2.9499 8.96281 5.87147C8.91924 5.97361 8.87526 6.07671 8.83068 6.18074C8.50615 6.93819 7.49384 6.93819 7.16933 6.18073C7.1246 6.07634 7.08048 5.97289 7.03676 5.8704Z",
103
+ fill: "currentColor",
104
+ class: "text-black-default dark:text-gray-800"
105
+ }, null, -1),
106
+ createElementVNode("path", {
107
+ d: "M0 0.5C5.05085 1.34181 5.84985 3.6009 7.16933 6.68073C7.49384 7.43819 8.50615 7.43819 8.83068 6.68074C10.1503 3.6009 10.9498 1.34181 16.0042 0.5",
108
+ stroke: "currentColor",
109
+ "stroke-width": "1",
110
+ fill: "none",
111
+ class: "text-gray-400 dark:text-gray-600"
112
+ }, null, -1)
113
+ ]), 8, _hoisted_2)
114
+ ], 42, _hoisted_1)),
97
115
  createElementVNode("div", {
98
116
  ref: "container",
99
- class: normalizeClass(["pointer-events-auto max-w-[calc(100vw-1.5rem)] translate-x-[var(--t-translate-x)] translate-y-[var(--t-translate-y)] rounded-lg px-3 py-2 text-center text-xs font-medium", {
100
- "bg-black-default text-default dark:bg-gray-800": !_ctx.tooltipMeta.light,
101
- "bg-default text-accent dark:bg-gray-800": _ctx.tooltipMeta.light
102
- }]),
117
+ class: "bg-black-default text-default pointer-events-auto max-w-[calc(100vw-1.5rem)] translate-x-[var(--t-translate-x)] translate-y-[var(--t-translate-y)] rounded-lg border border-solid border-gray-400 px-3 py-2 text-center text-xs font-medium shadow-md dark:border-gray-600 dark:bg-gray-800",
103
118
  style: normalizeStyle({
104
119
  "--t-translate-x": transformX.value + "px",
105
120
  "--t-translate-y": transformY.value + "px"
@@ -108,7 +123,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
108
123
  onMouseleave: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("leave"))
109
124
  }, [
110
125
  renderSlot(_ctx.$slots, "default")
111
- ], 38)
126
+ ], 36)
112
127
  ], 2);
113
128
  };
114
129
  }
@@ -3,7 +3,6 @@ export type TooltipMeta = {
3
3
  parent: HTMLElement;
4
4
  slot?: VNode;
5
5
  text?: string;
6
- light?: boolean;
7
6
  key: number;
8
7
  maxHeight?: number;
9
8
  left?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../src/utils/Tooltip.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,KAAK,CAAA;AAE9B,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,EAAE,WAAW,CAAA;IACnB,IAAI,CAAC,EAAE,KAAK,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,GAAG,EAAE,MAAM,CAAA;IACX,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,cAAc,GAAG,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAA;AAI/D,eAAO,MAAM,WAAW,GAAI,OAAO,cAAc,GAAG,SAAS,SAE5D,CAAA;AAED,eAAO,MAAM,OAAO;cACR,WAAW,GAAG,IAAI;aAGnB,IAAI;CAGd,CAAA"}
1
+ {"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../src/utils/Tooltip.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,KAAK,CAAA;AAE9B,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,EAAE,WAAW,CAAA;IACnB,IAAI,CAAC,EAAE,KAAK,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,cAAc,GAAG,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAA;AAI/D,eAAO,MAAM,WAAW,GAAI,OAAO,cAAc,GAAG,SAAS,SAE5D,CAAA;AAED,eAAO,MAAM,OAAO;cACR,WAAW,GAAG,IAAI;aAGnB,IAAI;CAGd,CAAA"}
@@ -9,7 +9,7 @@ export declare const useDefaultQuery: <TQueryFnData = unknown, TData = TQueryFnD
9
9
  export declare const PAGE_LENGTH = 24;
10
10
  export declare const makeQueryPaginated: <Data, QueryParams extends {
11
11
  page?: number;
12
- }>(key: string, getter: (queryParams: QueryParams) => Data[], setter?: (data: Data[]) => void, pageLength?: number) => UseQueryPaginated<Data, QueryParams>;
12
+ }>(key: string, getter: (queryParams: QueryParams) => Data[] | undefined, setter?: (data: Data[]) => void, pageLength?: number) => UseQueryPaginated<Data, QueryParams>;
13
13
  export declare const wrapUseQueryPaginated: <Data, QueryParams extends {
14
14
  page?: number;
15
15
  }>(key: string, queryFn: UseQueryDefault<Data[]>) => UseQueryPaginated<Data, QueryParams>;
@@ -1 +1 @@
1
- {"version":3,"file":"useDefaultQuery.d.ts","sourceRoot":"","sources":["../../../src/utils/useDefaultQuery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,WAAW,EAAE,KAAK,QAAQ,EAAE,KAAK,kBAAkB,EAAE,QAAQ,EAAiB,MAAM,qBAAqB,CAAA;AAGtH,OAAO,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAA;AAE9B,KAAK,MAAM,GAAG,UAAU,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC,CAAA;AAEvD,KAAK,OAAO,CAAC,YAAY,GAAG,OAAO,IAAI,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,UAAU,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC,CAAA;AAEhI,KAAK,yBAAyB,CAAC,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A"}
@@ -13,20 +13,23 @@ const makeQueryPaginated = (key, getter, setter, pageLength = PAGE_LENGTH) => {
13
13
  return (queryParams, options = {}) => {
14
14
  const query = useDefaultQuery({
15
15
  queryKey: [key, queryParams],
16
- queryFn: () => new Promise((resolve, reject) => {
17
- const currentList = getter(unref(queryParams));
18
- const current = Math.max(unref(queryParams).page ?? 1, 1);
19
- const pages_count = Math.max(Math.ceil(currentList.length / pageLength), 1);
20
- if (current > pages_count) reject(new ApiError({ status: 404 }));
21
- else resolve({
22
- count: currentList.length,
23
- pages_count,
24
- current,
25
- next: pages_count > current ? current + 1 : null,
26
- previous: current !== 1 ? current - 1 : null,
27
- results: currentList.slice(pageLength * (current - 1), pageLength * current)
16
+ queryFn: () => {
17
+ return new Promise((resolve, reject) => {
18
+ const currentList = getter(unref(queryParams));
19
+ if (!currentList) return resolve(null);
20
+ const current = Math.max(unref(queryParams).page ?? 1, 1);
21
+ const pages_count = Math.max(Math.ceil(currentList.length / pageLength), 1);
22
+ if (current > pages_count) reject(new ApiError({ status: 404 }));
23
+ else resolve({
24
+ count: currentList.length,
25
+ pages_count,
26
+ current,
27
+ next: pages_count > current ? current + 1 : null,
28
+ previous: current !== 1 ? current - 1 : null,
29
+ results: currentList.slice(pageLength * (current - 1), pageLength * current)
30
+ });
28
31
  });
29
- }),
32
+ },
30
33
  ...options
31
34
  });
32
35
  const setDataOld = query.setData;
@@ -34,7 +37,7 @@ const makeQueryPaginated = (key, getter, setter, pageLength = PAGE_LENGTH) => {
34
37
  if (setter && unref(options2)?.index !== void 0) {
35
38
  const index = unref(unref(options2)?.index);
36
39
  if (index !== void 0) {
37
- const newList = getter({}).slice();
40
+ const newList = getter({})?.slice() ?? [];
38
41
  const oldItem = query.data.value?.results[index];
39
42
  if (oldItem !== void 0) {
40
43
  const itemIndex = newList.findIndex((item) => item.id === oldItem.id);
@@ -55,8 +58,9 @@ const makeQueryPaginated = (key, getter, setter, pageLength = PAGE_LENGTH) => {
55
58
  const wrapUseQueryPaginated = (key, queryFn) => {
56
59
  return (queryParams, options = {}) => {
57
60
  const query = queryFn(options);
58
- const newQuery = makeQueryPaginated(key, () => query.data.value ?? [], query.setData)(queryParams, options);
61
+ const newQuery = makeQueryPaginated(key, () => query.data.value, query.setData)(queryParams, options);
59
62
  watch(query.data, () => {
63
+ console.log("refetch");
60
64
  newQuery.refetch();
61
65
  });
62
66
  return newQuery;
package/package.json CHANGED
@@ -4,10 +4,10 @@
4
4
  "type": "git",
5
5
  "url": "https://github.com/rsmple/eco-vue-js.git"
6
6
  },
7
- "version": "0.10.30",
7
+ "version": "0.10.32",
8
8
  "scripts": {
9
9
  "build": "run-p type-check \"build-only {@}\" --",
10
- "dev": "vite build --watch",
10
+ "dev": "vite build --mode development --watch",
11
11
  "build-only": "vite build",
12
12
  "type-check": "vue-tsc --build --force",
13
13
  "lint": "eslint . --fix",