eco-vue-js 0.8.20 → 0.8.22

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. package/dist/assets/icons/default/IconMore.svg.js +3 -17
  2. package/dist/assets/icons/sax/IconTableSettings.svg.js +40 -0
  3. package/dist/components/Button/WButtonMore.vue.d.ts +5 -1
  4. package/dist/components/Button/WButtonMore.vue.d.ts.map +1 -1
  5. package/dist/components/Button/WButtonMore.vue.js +6 -5
  6. package/dist/components/DropdownMenu/WDropdownMenu.vue.d.ts +68 -1
  7. package/dist/components/DropdownMenu/WDropdownMenu.vue.d.ts.map +1 -1
  8. package/dist/components/DropdownMenu/WDropdownMenu.vue.js +9 -12
  9. package/dist/components/Input/WInputSuggest.vue.d.ts.map +1 -1
  10. package/dist/components/Input/WInputSuggest.vue.js +2 -1
  11. package/dist/components/List/WList.vue.d.ts.map +1 -1
  12. package/dist/components/List/WList.vue.js +65 -53
  13. package/dist/components/List/WListCard.vue.d.ts.map +1 -1
  14. package/dist/components/List/WListCard.vue.js +18 -5
  15. package/dist/components/List/WListCardField.vue.d.ts +2 -1
  16. package/dist/components/List/WListCardField.vue.d.ts.map +1 -1
  17. package/dist/components/List/WListCardField.vue.js +10 -23
  18. package/dist/components/List/WListHeader.vue.d.ts +1 -0
  19. package/dist/components/List/WListHeader.vue.d.ts.map +1 -1
  20. package/dist/components/List/WListHeader.vue.js +3 -1
  21. package/dist/components/List/components/HeaderSettings.vue.d.ts +24 -0
  22. package/dist/components/List/components/HeaderSettings.vue.d.ts.map +1 -0
  23. package/dist/components/List/components/HeaderSettings.vue.js +79 -0
  24. package/dist/components/List/components/HeaderSettings.vue2.js +5 -0
  25. package/dist/components/List/components/HeaderSettingsItem.vue.d.ts +32 -0
  26. package/dist/components/List/components/HeaderSettingsItem.vue.d.ts.map +1 -0
  27. package/dist/components/List/components/HeaderSettingsItem.vue.js +64 -0
  28. package/dist/components/List/components/HeaderSettingsItem.vue2.js +5 -0
  29. package/dist/components/List/types.d.ts +6 -1
  30. package/dist/components/List/types.d.ts.map +1 -1
  31. package/dist/components/Tooltip/WTooltip.vue.d.ts +3 -1
  32. package/dist/components/Tooltip/WTooltip.vue.d.ts.map +1 -1
  33. package/dist/components/Tooltip/WTooltip.vue.js +9 -9
  34. package/package.json +1 -1
  35. package/tailwind-base/plugins/default.cjs +3 -0
@@ -10,23 +10,9 @@ const _hoisted_1 = {
10
10
 
11
11
  function render(_ctx, _cache) {
12
12
  return (openBlock(), createElementBlock("svg", _hoisted_1, _cache[0] || (_cache[0] = [
13
- createElementVNode("circle", {
14
- cx: "3",
15
- cy: "12",
16
- r: "2.5",
17
- fill: "currentColor"
18
- }, null, -1),
19
- createElementVNode("circle", {
20
- cx: "12",
21
- cy: "12",
22
- r: "2.5",
23
- fill: "currentColor"
24
- }, null, -1),
25
- createElementVNode("circle", {
26
- cx: "21",
27
- cy: "12",
28
- r: "2.5",
29
- fill: "currentColor"
13
+ createElementVNode("path", {
14
+ fill: "currentColor",
15
+ d: "M14.5 21a2.5 2.5 0 1 0-5 0 2.5 2.5 0 0 0 5 0ZM14.5 12a2.5 2.5 0 1 0-5 0 2.5 2.5 0 0 0 5 0ZM14.5 3a2.5 2.5 0 1 0-5 0 2.5 2.5 0 0 0 5 0Z"
30
16
  }, null, -1)
31
17
  ])))
32
18
  }
@@ -0,0 +1,40 @@
1
+ import { openBlock, createElementBlock, createElementVNode } from 'vue';
2
+
3
+ const _hoisted_1 = {
4
+ xmlns: "http://www.w3.org/2000/svg",
5
+ width: "20",
6
+ height: "20",
7
+ fill: "none",
8
+ viewBox: "0 0 24 24"
9
+ };
10
+
11
+ function render(_ctx, _cache) {
12
+ return (openBlock(), createElementBlock("svg", _hoisted_1, _cache[0] || (_cache[0] = [
13
+ createElementVNode("path", {
14
+ stroke: "currentColor",
15
+ "stroke-linecap": "round",
16
+ "stroke-linejoin": "round",
17
+ "stroke-width": "1.5",
18
+ d: "M22 11V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7h1M2.03 8.5H22M2.03 15.5H9.324M8.51 21.99V2.01M15.51 2.01v7.748"
19
+ }, null, -1),
20
+ createElementVNode("path", {
21
+ stroke: "currentColor",
22
+ "stroke-linecap": "round",
23
+ "stroke-linejoin": "round",
24
+ "stroke-miterlimit": "10",
25
+ "stroke-width": "1.5",
26
+ d: "M16.72 18.599a1.59 1.59 0 1 0 0-3.18 1.59 1.59 0 0 0 0 3.18Z"
27
+ }, null, -1),
28
+ createElementVNode("path", {
29
+ stroke: "currentColor",
30
+ "stroke-linecap": "round",
31
+ "stroke-linejoin": "round",
32
+ "stroke-miterlimit": "10",
33
+ "stroke-width": "1.5",
34
+ d: "M11.42 17.469v-.93c0-.55.45-1 1-1 .96 0 1.35-.68.87-1.51a1 1 0 0 1 .37-1.37l.91-.53c.42-.25.96-.1 1.21.32l.06.1c.48.83 1.26.83 1.74 0l.06-.1c.25-.42.79-.56 1.21-.32l.91.53c.48.28.65.89.37 1.37-.48.83-.09 1.51.87 1.51.55 0 1 .45 1 1v.93c0 .55-.45 1-1 1-.96 0-1.35.68-.87 1.51a1 1 0 0 1-.37 1.37l-.91.53c-.42.25-.96.1-1.21-.32l-.06-.1c-.48-.83-1.26-.83-1.74 0l-.06.1c-.25.42-.79.56-1.21.32l-.91-.53c-.48-.28-.65-.89-.37-1.37.48-.83.09-1.51-.87-1.51a.99.99 0 0 1-1-1Z"
35
+ }, null, -1)
36
+ ])))
37
+ }
38
+ const IconTableSettings = { render: render };
39
+
40
+ export { IconTableSettings as default, render };
@@ -1,14 +1,18 @@
1
1
  declare function __VLS_template(): {
2
2
  slots: {
3
- default?(_: {}): any;
3
+ default?(_: {
4
+ close: () => void;
5
+ }): any;
4
6
  };
5
7
  refs: {};
6
8
  attrs: Partial<{}>;
7
9
  };
8
10
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
9
11
  declare const __VLS_component: import('vue').DefineComponent<{
12
+ icon?: SVGComponent;
10
13
  disabled?: boolean;
11
14
  }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
15
+ icon?: SVGComponent;
12
16
  disabled?: boolean;
13
17
  }> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
14
18
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
@@ -1 +1 @@
1
- {"version":3,"file":"WButtonMore.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Button/WButtonMore.vue"],"names":[],"mappings":"AAmGA,iBAAS,cAAc;;yBA2GO,GAAG;;;WASnB,OAAO,IAA6B;EAEjD;AAeD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;eA3JR,OAAO;;eAAP,OAAO;iGAiKlB,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
+ {"version":3,"file":"WButtonMore.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Button/WButtonMore.vue"],"names":[],"mappings":"AAqGA,iBAAS,cAAc;;;yBATL,IAAI;YA6GQ,GAAG;;;WASnB,OAAO,IAA6B;EAEjD;AAeD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;WArJZ,YAAY;eACR,OAAO;;WADX,YAAY;eACR,OAAO;iGA0JlB,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,4 +1,4 @@
1
- import { defineComponent, ref, openBlock, createElementBlock, normalizeClass, createVNode, unref, withCtx, createElementVNode, renderSlot } from 'vue';
1
+ import { defineComponent, ref, openBlock, createElementBlock, normalizeClass, createVNode, unref, withCtx, createElementVNode, createBlock, resolveDynamicComponent, renderSlot } from 'vue';
2
2
  import _sfc_main$1 from '../DropdownMenu/WDropdownMenu.vue.js';
3
3
  import { HorizontalAlign } from '../../utils/HorizontalAlign.js';
4
4
  import IconMore from '../../assets/icons/default/IconMore.svg.js';
@@ -8,6 +8,7 @@ const _hoisted_1 = ["disabled"];
8
8
  const _sfc_main = /* @__PURE__ */ defineComponent({
9
9
  __name: "WButtonMore",
10
10
  props: {
11
+ icon: {},
11
12
  disabled: { type: Boolean }
12
13
  },
13
14
  setup(__props) {
@@ -26,7 +27,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
26
27
  class: normalizeClass([{
27
28
  "w-hover-circle-trigger cursor-pointer": !_ctx.disabled,
28
29
  "cursor-not-allowed opacity-50": _ctx.disabled
29
- }, "outline-none"]),
30
+ }, "outline-none flex items-center justify-center"]),
30
31
  onClick: toggle
31
32
  }, [
32
33
  createVNode(_sfc_main$1, {
@@ -40,13 +41,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
40
41
  }, {
41
42
  toggle: withCtx(() => [
42
43
  createElementVNode("div", {
43
- class: normalizeClass(["relative rounded-full square-6 sm-not:square-5 sm-not:my-0.5 flex items-center justify-center outline-none", {
44
+ class: normalizeClass(["relative p-px", {
44
45
  "w-hover-circle": !_ctx.disabled,
45
46
  "text-description": !isOpen.value,
46
47
  "text-primary-default dark:text-primary-dark": isOpen.value
47
48
  }])
48
49
  }, [
49
- createVNode(unref(IconMore), { class: "rotate-90" })
50
+ (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon ?? unref(IconMore))))
50
51
  ], 2)
51
52
  ]),
52
53
  content: withCtx(() => [
@@ -55,7 +56,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
55
56
  onClick: close
56
57
  }, {
57
58
  default: withCtx(() => [
58
- renderSlot(_ctx.$slots, "default")
59
+ renderSlot(_ctx.$slots, "default", { close })
59
60
  ]),
60
61
  _: 3
61
62
  })
@@ -87,7 +87,74 @@ declare const __VLS_component: import('vue').DefineComponent<DropdownMenuProps,
87
87
  "update:rect": () => any;
88
88
  }, string, import('vue').PublicProps, Readonly<DropdownMenuProps> & Readonly<{
89
89
  "onUpdate:rect"?: (() => any) | undefined;
90
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
90
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
91
+ container: HTMLDivElement;
92
+ dropdown: ({
93
+ $: import('vue').ComponentInternalInstance;
94
+ $data: {};
95
+ $props: {
96
+ readonly maxHeight: number;
97
+ readonly maxWidth: number;
98
+ readonly horizontalAlign: import('../../main').HorizontalAlign;
99
+ readonly parentElement: Element;
100
+ readonly updateAlign?: boolean | undefined;
101
+ readonly emitUpdate?: boolean | undefined;
102
+ readonly "onUpdate:rect"?: (() => any) | undefined;
103
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
104
+ $attrs: {
105
+ [x: string]: unknown;
106
+ };
107
+ $refs: {
108
+ [x: string]: unknown;
109
+ };
110
+ $slots: Readonly<{
111
+ [name: string]: import('vue').Slot<any> | undefined;
112
+ }>;
113
+ $root: import('vue').ComponentPublicInstance | null;
114
+ $parent: import('vue').ComponentPublicInstance | null;
115
+ $host: Element | null;
116
+ $emit: (event: "update:rect") => void;
117
+ $el: any;
118
+ $options: import('vue').ComponentOptionsBase<Readonly<import('../Dropdown/types').DropdownProps> & Readonly<{
119
+ "onUpdate:rect"?: (() => any) | undefined;
120
+ }>, {
121
+ update: () => void;
122
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
123
+ "update:rect": () => any;
124
+ }, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
125
+ beforeCreate?: (() => void) | (() => void)[];
126
+ created?: (() => void) | (() => void)[];
127
+ beforeMount?: (() => void) | (() => void)[];
128
+ mounted?: (() => void) | (() => void)[];
129
+ beforeUpdate?: (() => void) | (() => void)[];
130
+ updated?: (() => void) | (() => void)[];
131
+ activated?: (() => void) | (() => void)[];
132
+ deactivated?: (() => void) | (() => void)[];
133
+ beforeDestroy?: (() => void) | (() => void)[];
134
+ beforeUnmount?: (() => void) | (() => void)[];
135
+ destroyed?: (() => void) | (() => void)[];
136
+ unmounted?: (() => void) | (() => void)[];
137
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
138
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
139
+ errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
140
+ };
141
+ $forceUpdate: () => void;
142
+ $nextTick: typeof import('vue').nextTick;
143
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
144
+ } & Readonly<{}> & Omit<Readonly<import('../Dropdown/types').DropdownProps> & Readonly<{
145
+ "onUpdate:rect"?: (() => any) | undefined;
146
+ }>, "update"> & import('vue').ShallowUnwrapRef<{
147
+ update: () => void;
148
+ }> & {} & import('vue').ComponentCustomProperties & {} & {
149
+ $slots: {
150
+ default?(_: {
151
+ left: string;
152
+ right: string;
153
+ istop: boolean;
154
+ }): any;
155
+ };
156
+ }) | null;
157
+ }, any>;
91
158
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
92
159
  export default _default;
93
160
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1 +1 @@
1
- {"version":3,"file":"WDropdownMenu.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DropdownMenu/WDropdownMenu.vue"],"names":[],"mappings":"AAsEA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAA;AAiC9C,iBAAS,cAAc;;;;YAyFK,GAAG;;;;;YACD,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAwDg6hB,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;WA7CziiB,OAAO,IAA6B;EAEjD;AAcD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;kFAUnB,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
+ {"version":3,"file":"WDropdownMenu.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DropdownMenu/WDropdownMenu.vue"],"names":[],"mappings":"AAsEA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAA;AAiC9C,iBAAS,cAAc;;;;YAyFK,GAAG;;;;;YACD,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAuD8rhB,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;WA5Cv0hB,OAAO,IAA6B;EAEjD;AAYD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCA6B0shB,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;OAlBn1hB,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,6 +1,7 @@
1
- import { defineComponent, ref, openBlock, createElementBlock, renderSlot, createBlock, Teleport, createVNode, Transition, withCtx, normalizeClass, normalizeProps, guardReactiveProps, createCommentVNode } from 'vue';
1
+ import { defineComponent, useTemplateRef, openBlock, createElementBlock, renderSlot, createBlock, Teleport, createVNode, Transition, withCtx, unref, normalizeClass, normalizeProps, guardReactiveProps, createCommentVNode } from 'vue';
2
2
  import _sfc_main$1 from '../Dropdown/WDropdown.vue.js';
3
3
 
4
+ const _hoisted_1 = { ref: "container" };
4
5
  const _sfc_main = /* @__PURE__ */ defineComponent({
5
6
  __name: "WDropdownMenu",
6
7
  props: {
@@ -15,18 +16,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
15
16
  },
16
17
  emits: ["update:rect"],
17
18
  setup(__props, { expose: __expose }) {
18
- const container = ref();
19
- const dropdown = ref();
19
+ const containerRef = useTemplateRef("container");
20
+ const dropdownRef = useTemplateRef("dropdown");
20
21
  __expose({
21
22
  updateDropdown: () => {
22
- dropdown.value?.update();
23
+ dropdownRef.value?.update();
23
24
  }
24
25
  });
25
26
  return (_ctx, _cache) => {
26
- return openBlock(), createElementBlock("div", {
27
- ref_key: "container",
28
- ref: container
29
- }, [
27
+ return openBlock(), createElementBlock("div", _hoisted_1, [
30
28
  renderSlot(_ctx.$slots, "toggle", { unclickable: false }),
31
29
  (openBlock(), createBlock(Teleport, {
32
30
  to: "body",
@@ -39,11 +37,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
39
37
  "leave-to-class": "opacity-0"
40
38
  }, {
41
39
  default: withCtx(() => [
42
- container.value && _ctx.isOpen ? (openBlock(), createBlock(_sfc_main$1, {
40
+ unref(containerRef) && _ctx.isOpen ? (openBlock(), createBlock(_sfc_main$1, {
43
41
  key: 0,
44
- ref_key: "dropdown",
45
- ref: dropdown,
46
- "parent-element": container.value,
42
+ ref: "dropdown",
43
+ "parent-element": unref(containerRef),
47
44
  "horizontal-align": _ctx.horizontalAlign,
48
45
  "update-align": _ctx.updateAlign,
49
46
  "max-height": _ctx.maxHeight,
@@ -1 +1 @@
1
- {"version":3,"file":"WInputSuggest.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Input/WInputSuggest.vue"],"names":[],"mappings":"AAgOA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAA;yBAG7B,IAAI,SAAS,SAAS,wBACzB,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WAmfxD,mBAAmB,CAAC,6BAAyD,CAAC,4BAA2B;oBAChG,OAAO,KAAK,EAAE,gBAAgB;;;;;MAAsB,GAAG,IAAI;WACpE,GAAG;;gBAraH,MAAM,IAAI;mBACP,MAAM,IAAI;iBACZ,CAAC,KAAK,EAAE;YAAC,WAAW,CAAC,EAAE,OAAO,CAAA;SAAC,KAAK,IAAI;gBACzC,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAA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IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -103,7 +103,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
103
103
  maxWidth: _ctx.maxWidth,
104
104
  horizontalAlign: _ctx.horizontalAlign,
105
105
  updateAlign: true,
106
- teleport: _ctx.teleport
106
+ teleport: _ctx.teleport,
107
+ noZIndex: _ctx.noZIndex
107
108
  }), {
108
109
  toggle: withCtx(({ unclickable }) => [
109
110
  createVNode(_sfc_main$3, mergeProps({
@@ -1 +1 @@
1
- {"version":3,"file":"WList.vue.d.ts","sourceRoot":"","sources":["../../../src/components/List/WList.vue"],"names":[],"mappings":"AAiRA,OAAO,KAAK,EAAC,aAAa,EAAE,cAAc,EAAE,SAAS,EAAE,aAAa,EAAC,MAAM,SAAS,CAAA;yBAOnE,IAAI,SAAS,WAAW,EAAE,WAAW,eACxC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WA6jBxD,mBAAmB,CAAC;;;gBAjjBpB,MAAM;gBACN,SAAS,CAAC,IAAI,EAAE,WAAW,CAAC,EAAE;oBAC1B,cAAc,CAAC,IAAI,CAAC;oBACpB,iBAAiB,CAAC,IAAI,EAAE,WAAW,CAAC;qBACnC,WAAW;6BACH,MAAM;wBACX,MAAM;eACf,aAAa,CAAC,WAAW,CAAC,EAAE;mBACxB,aAAa,CAAC,WAAW,CAAC,EAAE;cACjC,aAAa,CAAC,IAAI,CAAC,EAAE;yBACV,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO;oBAC5B,MAAM;6BACG,CAAC,UAAU,EAA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AAK,OAAO;oBAC5B,MAAM;6BACG,CAAC,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM;oBACvD,OAAO;qBACN,OAAO;KA0iBiE,CAAC,4BAA2B;oBAChG,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;cAviBP,uBAAuB,SAAS,MAAM,KAAG,IAAI;;;;YA4iBP,OAAO,CAAC,OAAO,WAAW,CAAC;;AA1kBvE,wBA0kB4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -1,12 +1,13 @@
1
- import { defineComponent, ref, computed, openBlock, createBlock, unref, withCtx, createSlots, createElementBlock, Fragment, renderList, resolveDynamicComponent, normalizeClass, createCommentVNode, normalizeStyle, createVNode } from 'vue';
1
+ import { defineComponent, ref, computed, openBlock, createBlock, unref, withCtx, createSlots, createElementBlock, Fragment, renderList, resolveDynamicComponent, normalizeClass, createCommentVNode, createVNode, normalizeStyle } from 'vue';
2
2
  import _sfc_main$1 from '../InfiniteList/WInfiniteList.vue.js';
3
3
  import { getIsMobile } from '../../utils/mobile.js';
4
4
  import { useSelected, getPosition } from '../../utils/useSelected.js';
5
- import _sfc_main$5 from './WListCard.vue.js';
5
+ import _sfc_main$6 from './WListCard.vue.js';
6
6
  import _sfc_main$3 from './WListHeader.vue.js';
7
- import _sfc_main$4 from './WListHeaderItem.vue.js';
7
+ import _sfc_main$5 from './WListHeaderItem.vue.js';
8
8
  import { parseOrdering } from '../../utils/order.js';
9
9
  import _sfc_main$2 from '../Button/WButtonSelection.vue.js';
10
+ import _sfc_main$4 from './components/HeaderSettings.vue.js';
10
11
 
11
12
  const PAGE_LENGTH = 24;
12
13
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -34,8 +35,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
34
35
  const props = __props;
35
36
  const listCount = ref(0);
36
37
  const selectionCount = ref(0);
37
- const fieldConfig = ref(props.fields.map(() => ({ width: 0 })));
38
+ const fieldsConfig = ref(props.fields.reduce((result, field, index) => {
39
+ result[field.label] = {
40
+ width: 0,
41
+ visible: true,
42
+ order: index
43
+ };
44
+ return result;
45
+ }, {}));
46
+ const fieldsVisible = computed(() => props.fields.filter((field) => field.visibleGetter?.(props.queryParams) ?? true));
47
+ const fieldsFiltered = computed(() => {
48
+ if (isMobile) return fieldsVisible.value;
49
+ return fieldsVisible.value.filter((field) => fieldsConfig.value[field.label].visible).sort((a, b) => fieldsConfig.value[a.label].order - fieldsConfig.value[b.label].order);
50
+ });
38
51
  const allowSelect = computed(() => props.bulk !== void 0);
52
+ const allowOpen = computed(() => props.expansion !== void 0);
39
53
  const {
40
54
  selected,
41
55
  reverse,
@@ -93,8 +107,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
93
107
  onSelect: unref(setSelected),
94
108
  onSelectReverse: unref(setSelectedReverse),
95
109
  onSelectRange: unref(setSelectedRange),
96
- "onUpdate:headerPadding": _cache[4] || (_cache[4] = ($event) => _ctx.$emit("update:header-padding", $event)),
97
- "onUpdate:count": _cache[5] || (_cache[5] = ($event) => listCount.value = $event)
110
+ "onUpdate:headerPadding": _cache[5] || (_cache[5] = ($event) => _ctx.$emit("update:header-padding", $event)),
111
+ "onUpdate:count": _cache[6] || (_cache[6] = ($event) => listCount.value = $event)
98
112
  }, {
99
113
  header: withCtx(({ selectAllValue }) => [
100
114
  allowSelect.value ? (openBlock(), createBlock(_sfc_main$2, {
@@ -142,67 +156,45 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
142
156
  "tooltip-text": _ctx.selectAllTextGetter(selectAllValue !== true, _ctx.count ?? listCount.value),
143
157
  count: _ctx.count ?? listCount.value,
144
158
  selection: selectAllValue,
145
- "onToggle:selection": _cache[3] || (_cache[3] = ($event) => $event ? unref(setSelectedReverse)([]) : unref(setSelected)([]))
159
+ "onToggle:selection": _cache[4] || (_cache[4] = ($event) => $event ? unref(setSelectedReverse)([]) : unref(setSelected)([]))
146
160
  }, {
161
+ settings: withCtx(() => [
162
+ createVNode(_sfc_main$4, {
163
+ fields: _ctx.fields,
164
+ "fields-config": fieldsConfig.value,
165
+ "query-params": _ctx.queryParams,
166
+ "onUpdate:fieldsConfig": _cache[3] || (_cache[3] = ($event) => fieldsConfig.value = { ...fieldsConfig.value, ...$event })
167
+ }, null, 8, ["fields", "fields-config", "query-params"])
168
+ ]),
147
169
  default: withCtx(() => [
148
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.fields, (field, index) => {
149
- return openBlock(), createElementBlock(Fragment, { key: index }, [
150
- field.visibleGetter?.(_ctx.queryParams) ?? true ? (openBlock(), createBlock(_sfc_main$4, {
151
- key: 0,
152
- title: typeof field.title === "string" ? field.title : field.title(_ctx.queryParams),
153
- field: typeof field.field === "string" ? field.field : field.field?.(_ctx.queryParams),
154
- class: normalizeClass([field.cssClass, index === _ctx.fields.length - 1 ? "z-[1]" : void 0]),
155
- ordering: ordering.value,
156
- disabled: !field.field,
157
- "allow-resize": field.allowResize,
158
- style: normalizeStyle({
159
- minWidth: !unref(isMobile) && fieldConfig.value[index]?.width ? fieldConfig.value[index].width + "px" : void 0
160
- }),
161
- "onUpdate:width": ($event) => fieldConfig.value[index].width = $event
162
- }, null, 8, ["title", "field", "class", "ordering", "disabled", "allow-resize", "style", "onUpdate:width"])) : createCommentVNode("", true)
163
- ], 64);
170
+ (openBlock(true), createElementBlock(Fragment, null, renderList(fieldsFiltered.value, (field) => {
171
+ return openBlock(), createBlock(_sfc_main$5, {
172
+ key: field.label,
173
+ title: typeof field.title === "string" ? field.title : field.title(_ctx.queryParams),
174
+ field: typeof field.field === "string" ? field.field : field.field?.(_ctx.queryParams),
175
+ class: normalizeClass(field.cssClass),
176
+ ordering: ordering.value,
177
+ disabled: !field.field,
178
+ "allow-resize": field.allowResize,
179
+ style: normalizeStyle({
180
+ minWidth: !unref(isMobile) && fieldsConfig.value[field.label]?.width ? fieldsConfig.value[field.label].width + "px" : void 0
181
+ }),
182
+ "onUpdate:width": ($event) => fieldsConfig.value[field.label].width = $event
183
+ }, null, 8, ["title", "field", "class", "ordering", "disabled", "allow-resize", "style", "onUpdate:width"]);
164
184
  }), 128))
165
185
  ]),
166
186
  _: 2
167
187
  }, 1032, ["query-params", "allow-select", "tooltip-text", "count", "selection"])) : createCommentVNode("", true)
168
188
  ]),
169
189
  default: withCtx(({ item, skeleton, setter, refetch }) => [
170
- createVNode(_sfc_main$5, {
190
+ createVNode(_sfc_main$6, {
171
191
  disabled: skeleton,
172
192
  mobile: unref(isMobile),
173
193
  "card-class": _ctx.cardClass,
174
194
  "has-border": _ctx.hasBorder,
175
195
  "more-bottom": _ctx.moreBottom,
176
- "allow-open": _ctx.fields.some((item2) => item2.allowOpen) && !skeleton
196
+ "allow-open": allowOpen.value && !skeleton
177
197
  }, createSlots({
178
- default: withCtx(({ toggle, isOpen }) => [
179
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.fields, (field, index) => {
180
- return openBlock(), createElementBlock(Fragment, { key: index }, [
181
- field.visibleGetter?.(_ctx.queryParams) ?? true ? (openBlock(), createBlock(resolveDynamicComponent(field.component), {
182
- key: 0,
183
- item,
184
- readonly: _ctx.readonlyGetter?.(item),
185
- skeleton,
186
- mobile: unref(isMobile),
187
- class: normalizeClass({
188
- [field.cssClass ?? ""]: true,
189
- "cursor-pointer w-ripple w-ripple-hover w-ripple-has w-ripple-opacity-[0.04]": field.allowOpen && !skeleton,
190
- "sm:border-y border-gray-300 dark:border-gray-700": _ctx.hasBorder,
191
- "sm:border-b-[transparent] sm:dark:border-b-[transparent]": _ctx.hasBorder && isOpen
192
- }),
193
- style: normalizeStyle({
194
- minWidth: !unref(isMobile) && fieldConfig.value[index]?.width ? fieldConfig.value[index].width + "px" : void 0
195
- }),
196
- "onUpdate:item": setter,
197
- "onDelete:item": ($event) => {
198
- setter();
199
- refetch();
200
- },
201
- onClick: ($event) => field.allowOpen && !skeleton && toggle()
202
- }, null, 40, ["item", "readonly", "skeleton", "mobile", "class", "style", "onUpdate:item", "onDelete:item", "onClick"])) : createCommentVNode("", true)
203
- ], 64);
204
- }), 128))
205
- ]),
206
198
  more: withCtx(() => [
207
199
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.menu, (menuItem, menuIndex) => {
208
200
  return openBlock(), createBlock(resolveDynamicComponent(menuItem), {
@@ -217,6 +209,26 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
217
209
  }, null, 40, ["item", "readonly", "onUpdate:item", "onDelete:item"]);
218
210
  }), 128))
219
211
  ]),
212
+ default: withCtx(() => [
213
+ (openBlock(true), createElementBlock(Fragment, null, renderList(fieldsFiltered.value, (field) => {
214
+ return openBlock(), createBlock(resolveDynamicComponent(field.component), {
215
+ key: field.label,
216
+ item,
217
+ readonly: _ctx.readonlyGetter?.(item),
218
+ skeleton,
219
+ mobile: unref(isMobile),
220
+ class: normalizeClass(field.cssClass),
221
+ style: normalizeStyle({
222
+ minWidth: !unref(isMobile) && fieldsConfig.value[field.label]?.width ? fieldsConfig.value[field.label].width + "px" : void 0
223
+ }),
224
+ "onUpdate:item": setter,
225
+ "onDelete:item": ($event) => {
226
+ setter();
227
+ refetch();
228
+ }
229
+ }, null, 40, ["item", "readonly", "skeleton", "mobile", "class", "style", "onUpdate:item", "onDelete:item"]);
230
+ }), 128))
231
+ ]),
220
232
  _: 2
221
233
  }, [
222
234
  _ctx.expansion ? {
@@ -1 +1 @@
1
- {"version":3,"file":"WListCard.vue.d.ts","sourceRoot":"","sources":["../../../src/components/List/WListCard.vue"],"names":[],"mappings":"AAqQA,iBAAS,cAAc;;;;;YAuSO,GAAG;sBACN,GAAG;2BACE,GAAG;;;WASrB,OAAO,IAA6B;EAEjD;AA4BD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;eAlZR,OAAO;eACP,OAAO;aACT,OAAO;iBACH,OAAO;eACT,OAAO;gBACN,OAAO;gBACP,MAAM;gBACN,OAAO;;;;;;;eAPR,OAAO;eACP,OAAO;aACT,OAAO;iBACH,OAAO;eACT,OAAO;gBACN,OAAO;gBACP,MAAM;gBACN,OAAO;;;;kFAsZnB,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
+ {"version":3,"file":"WListCard.vue.d.ts","sourceRoot":"","sources":["../../../src/components/List/WListCard.vue"],"names":[],"mappings":"AAmRA,iBAAS,cAAc;;;;;YAqUO,GAAG;sBACN,GAAG;2BACE,GAAG;;;WASrB,OAAO,IAA6B;EAEjD;AA4BD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;eAhbR,OAAO;eACP,OAAO;aACT,OAAO;iBACH,OAAO;eACT,OAAO;gBACN,OAAO;gBACP,MAAM;gBACN,OAAO;;;;;;;eAPR,OAAO;eACP,OAAO;aACT,OAAO;iBACH,OAAO;eACT,OAAO;gBACN,OAAO;gBACP,MAAM;gBACN,OAAO;;;;kFAobnB,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"}
@@ -61,8 +61,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
61
61
  return (_ctx, _cache) => {
62
62
  return openBlock(), createElementBlock(Fragment, null, [
63
63
  createElementVNode("div", {
64
- class: normalizeClass(["relative w-full grid sm:flex isolate sm:mt-4 first:mt-0 sm-not:group-even:bg-gray-50 sm-not:dark:group-even:bg-primary-darkest/25 sm-not:pt-2 sm-not:-px--inner-margin", {
65
- [_ctx.cardClass ?? ""]: true,
64
+ class: normalizeClass(["relative grid sm-not:grid-cols-1 sm:flex isolate sm:mt-4 first:mt-0 sm-not:group-even:bg-gray-50 sm-not:dark:group-even:bg-primary-darkest/25 sm-not:pt-2", {
66
65
  "w-ripple-trigger-has": _ctx.allowOpen
67
66
  }])
68
67
  }, [
@@ -108,7 +107,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
108
107
  }, null, 8, ["model-value", "disabled", "allow-shift", "align-top", "class"])) : createCommentVNode("", true)
109
108
  ], 2)
110
109
  ], 2)) : createCommentVNode("", true),
111
- renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ toggle, isOpen: isOpen.value }))),
110
+ createElementVNode("div", {
111
+ class: normalizeClass(["grid sm:flex sm:flex-1 sm-not:-px--inner-margin isolate", {
112
+ [_ctx.cardClass ?? ""]: true,
113
+ "sm:border-y border-gray-300 dark:border-gray-700": _ctx.hasBorder,
114
+ "sm:border-b-[transparent] sm:dark:border-b-[transparent]": _ctx.hasBorder && isOpen.value,
115
+ "isolate": _ctx.allowOpen
116
+ }])
117
+ }, [
118
+ renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ toggle, isOpen: isOpen.value }))),
119
+ _ctx.allowOpen ? (openBlock(), createElementBlock("button", {
120
+ key: 0,
121
+ class: "cursor-pointer w-ripple w-ripple-hover w-ripple-has w-ripple-opacity-[0.04] absolute top-0 left-0 h-full w-full -z-[1]",
122
+ onClick: toggle
123
+ })) : createCommentVNode("", true)
124
+ ], 2),
112
125
  createElementVNode("div", {
113
126
  class: normalizeClass(["sm:sticky sm:z-[1] sm:right-inner sm:bg-default sm:dark:bg-default-dark", {
114
127
  "width-14": !_ctx.hideMore,
@@ -121,7 +134,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
121
134
  "sm:border sm:border-l-0 border-gray-300 dark:border-gray-700 sm:rounded-tr-3xl": _ctx.hasBorder,
122
135
  "sm:rounded-br-3xl": _ctx.hasBorder && !isOpen.value,
123
136
  "sm:border-b-[transparent] sm:dark:border-b-[transparent]": _ctx.hasBorder && isOpen.value,
124
- "w-ripple-has-only w-ripple-hover w-ripple-opacity-[0.04]": _ctx.allowOpen
137
+ "w-ripple-has-only w-ripple-hover w-ripple-opacity-[0.04]": !_ctx.mobile && _ctx.allowOpen
125
138
  }])
126
139
  }, [
127
140
  !_ctx.hideMore ? (openBlock(), createBlock(_sfc_main$2, {
@@ -151,7 +164,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
151
164
  _ctx.$slots.expansion ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
152
165
  isOpen.value ? (openBlock(), createElementBlock("div", {
153
166
  key: 0,
154
- class: normalizeClass(["sm:sticky sm:w-inner sm:left-inner", {
167
+ class: normalizeClass(["sm:sticky sm:w-inner sm:left-inner sm:-mt-px", {
155
168
  "sm:px-5 sm:border sm:border-t-0 border-gray-300 dark:border-gray-700 sm:rounded-b-3xl": _ctx.hasBorder
156
169
  }])
157
170
  }, [
@@ -2,7 +2,6 @@ declare function __VLS_template(): {
2
2
  slots: {
3
3
  default?(_: {}): any;
4
4
  inner?(_: {}): any;
5
- inner?(_: {}): any;
6
5
  };
7
6
  refs: {};
8
7
  attrs: Partial<{}>;
@@ -11,9 +10,11 @@ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
10
  declare const __VLS_component: import('vue').DefineComponent<{
12
11
  modelValue?: string | number;
13
12
  skeleton?: boolean;
13
+ allowOpen?: boolean;
14
14
  }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
15
15
  modelValue?: string | number;
16
16
  skeleton?: boolean;
17
+ allowOpen?: boolean;
17
18
  }> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
18
19
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
19
20
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"WListCardField.vue.d.ts","sourceRoot":"","sources":["../../../src/components/List/WListCardField.vue"],"names":[],"mappings":"AAuDA,iBAAS,cAAc;;yBA8DM,GAAG;uBACL,GAAG;uBACF,GAAG;;;WASjB,OAAO,IAA6B;EAEjD;AAUD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;iBAhGN,MAAM,GAAG,MAAM;eACjB,OAAO;;iBADL,MAAM,GAAG,MAAM;eACjB,OAAO;iGAqGlB,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
+ {"version":3,"file":"WListCardField.vue.d.ts","sourceRoot":"","sources":["../../../src/components/List/WListCardField.vue"],"names":[],"mappings":"AA+CA,iBAAS,cAAc;;yBA+CM,GAAG;uBACL,GAAG;;;WAShB,OAAO,IAA6B;EAEjD;AASD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;iBAhFN,MAAM,GAAG,MAAM;eACjB,OAAO;gBACN,OAAO;;iBAFN,MAAM,GAAG,MAAM;eACjB,OAAO;gBACN,OAAO;iGAoFnB,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,40 +1,27 @@
1
- import { defineComponent, openBlock, createElementBlock, createBlock, renderSlot, createElementVNode, createTextVNode, toDisplayString, createVNode, withCtx } from 'vue';
1
+ import { defineComponent, openBlock, createElementBlock, normalizeClass, createBlock, renderSlot, createElementVNode, createTextVNode, toDisplayString } from 'vue';
2
2
  import WSkeleton from '../Skeleton/WSkeleton.vue.js';
3
- import _sfc_main$1 from '../Tooltip/WTooltip.vue.js';
4
3
 
5
- const _hoisted_1 = { class: "grid grid-cols-1 items-center sm:h-16 sm:pr-6" };
6
- const _hoisted_2 = { class: "truncate" };
7
- const _hoisted_3 = { class: "min-w-[12rem] max-w-xl overflow-hidden" };
4
+ const _hoisted_1 = { class: "truncate" };
8
5
  const _sfc_main = /* @__PURE__ */ defineComponent({
9
6
  __name: "WListCardField",
10
7
  props: {
11
8
  modelValue: {},
12
- skeleton: { type: Boolean }
9
+ skeleton: { type: Boolean },
10
+ allowOpen: { type: Boolean }
13
11
  },
14
12
  setup(__props) {
15
13
  return (_ctx, _cache) => {
16
- return openBlock(), createElementBlock("div", _hoisted_1, [
14
+ return openBlock(), createElementBlock("div", {
15
+ class: normalizeClass(["grid grid-cols-1 items-center sm:h-16 sm:pr-6", { "pointer-events-none": _ctx.allowOpen }])
16
+ }, [
17
17
  _ctx.skeleton ? (openBlock(), createBlock(WSkeleton, { key: 0 })) : renderSlot(_ctx.$slots, "default", { key: 1 }, () => [
18
- createElementVNode("div", _hoisted_2, [
18
+ createElementVNode("div", _hoisted_1, [
19
19
  renderSlot(_ctx.$slots, "inner", {}, () => [
20
20
  createTextVNode(toDisplayString(_ctx.modelValue), 1)
21
- ]),
22
- createVNode(_sfc_main$1, {
23
- "no-touch": "",
24
- "overflow-only": ""
25
- }, {
26
- default: withCtx(() => [
27
- createElementVNode("div", _hoisted_3, [
28
- renderSlot(_ctx.$slots, "inner", {}, () => [
29
- createTextVNode(toDisplayString(_ctx.modelValue), 1)
30
- ])
31
- ])
32
- ]),
33
- _: 3
34
- })
21
+ ])
35
22
  ])
36
23
  ])
37
- ]);
24
+ ], 2);
38
25
  };
39
26
  }
40
27
  });
@@ -1,6 +1,7 @@
1
1
  declare function __VLS_template(): {
2
2
  slots: {
3
3
  default?(_: {}): any;
4
+ settings?(_: {}): any;
4
5
  };
5
6
  refs: {};
6
7
  attrs: Partial<{}>;
@@ -1 +1 @@
1
- {"version":3,"file":"WListHeader.vue.d.ts","sourceRoot":"","sources":["../../../src/components/List/WListHeader.vue"],"names":[],"mappings":"AAsFA,iBAAS,cAAc;;yBAsIM,GAAG;;;WASlB,OAAO,IAA6B;EAEjD;AAYD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;kBAnLL,OAAO;eACV,OAAO;eACP,OAAO;YACV,MAAM;gBACF,OAAO,GAAG,IAAI;iBACb,MAAM;;;;kBALL,OAAO;eACV,OAAO;eACP,OAAO;YACV,MAAM;gBACF,OAAO,GAAG,IAAI;iBACb,MAAM;;;kFAuLnB,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
+ {"version":3,"file":"WListHeader.vue.d.ts","sourceRoot":"","sources":["../../../src/components/List/WListHeader.vue"],"names":[],"mappings":"AAwFA,iBAAS,cAAc;;yBAwIM,GAAG;0BACF,GAAG;;;WASnB,OAAO,IAA6B;EAEjD;AAYD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;kBAtLL,OAAO;eACV,OAAO;eACP,OAAO;YACV,MAAM;gBACF,OAAO,GAAG,IAAI;iBACb,MAAM;;;;kBALL,OAAO;eACV,OAAO;eACP,OAAO;YACV,MAAM;gBACF,OAAO,GAAG,IAAI;iBACb,MAAM;;;kFA0LnB,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"}
@@ -48,7 +48,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
48
48
  "width-14": !_ctx.hideMore,
49
49
  "width-4": _ctx.hideMore
50
50
  }])
51
- }, null, 2)
51
+ }, [
52
+ renderSlot(_ctx.$slots, "settings")
53
+ ], 2)
52
54
  ])
53
55
  ]);
54
56
  };
@@ -0,0 +1,24 @@
1
+ import { FieldConfig, ListField } from '../types';
2
+ declare const _default: <Data extends DefaultData, QueryParams>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
4
+ readonly "onUpdate:fields-config"?: ((value: Record<string, FieldConfig>) => any) | undefined;
5
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:fields-config"> & {
6
+ fields: ListField<Data, QueryParams>[];
7
+ fieldsConfig: Record<string, FieldConfig>;
8
+ queryParams: QueryParams;
9
+ disabled?: boolean;
10
+ }> & import('vue').PublicProps;
11
+ expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
12
+ attrs: any;
13
+ slots: {};
14
+ emit: (e: "update:fields-config", value: Record<string, FieldConfig>) => void;
15
+ }>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
16
+ [key: string]: any;
17
+ }> & {
18
+ __ctx?: Awaited<typeof __VLS_setup>;
19
+ };
20
+ export default _default;
21
+ type __VLS_PrettifyLocal<T> = {
22
+ [K in keyof T]: T[K];
23
+ } & {};
24
+ //# sourceMappingURL=HeaderSettings.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HeaderSettings.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/List/components/HeaderSettings.vue"],"names":[],"mappings":"AA4FA,OAAO,KAAK,EAAC,WAAW,EAAE,SAAS,EAAC,MAAM,UAAU,CAAA;yBAInC,IAAI,SAAS,WAAW,EAAE,WAAW,eACxC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WAmNxD,mBAAmB,CAAC;;;gBA/MpB,SAAS,CAAC,IAAI,EAAE,WAAW,CAAC,EAAE;sBACxB,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC;qBAC5B,WAAW;mBACb,OAAO;KA4MmE,CAAC,4BAA2B;oBAChG,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;cAzMP,sBAAsB,SAAS,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,KAAG,IAAI;;;;YA8M3B,OAAO,CAAC,OAAO,WAAW,CAAC;;AA7NvE,wBA6N4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -0,0 +1,79 @@
1
+ import { defineComponent, ref, openBlock, createBlock, markRaw, unref, withCtx, createElementVNode, createElementBlock, Fragment, renderList, normalizeStyle } from 'vue';
2
+ import _sfc_main$1 from '../../Button/WButtonMore.vue.js';
3
+ import IconTableSettings from '../../../assets/icons/sax/IconTableSettings.svg.js';
4
+ import _sfc_main$2 from './HeaderSettingsItem.vue.js';
5
+
6
+ const _hoisted_1 = { class: "p-4" };
7
+ const _hoisted_2 = { class: "flex flex-col" };
8
+ const _sfc_main = /* @__PURE__ */ defineComponent({
9
+ __name: "HeaderSettings",
10
+ props: {
11
+ fields: {},
12
+ fieldsConfig: {},
13
+ queryParams: {},
14
+ disabled: { type: Boolean }
15
+ },
16
+ emits: ["update:fields-config"],
17
+ setup(__props, { emit: __emit }) {
18
+ const props = __props;
19
+ const emit = __emit;
20
+ const dragItem = ref(null);
21
+ const dragItemNewOrder = ref(null);
22
+ const getOrder = (field) => {
23
+ if (dragItem.value === null || dragItemNewOrder.value === null) return props.fieldsConfig[field.label].order;
24
+ if (field.label === dragItem.value) return dragItemNewOrder.value;
25
+ if (props.fieldsConfig[field.label].order <= dragItemNewOrder.value) return props.fieldsConfig[field.label].order - 1;
26
+ return props.fieldsConfig[field.label].order;
27
+ };
28
+ const dragEnter = (field) => {
29
+ dragItemNewOrder.value = getOrder(field);
30
+ };
31
+ const dragEnd = () => {
32
+ dragItem.value = null;
33
+ dragItemNewOrder.value = null;
34
+ };
35
+ const drop = () => {
36
+ const newConfig = props.fields.reduce((result, field) => {
37
+ result[field.label] = { ...props.fieldsConfig[field.label], order: getOrder(field) };
38
+ return result;
39
+ }, {});
40
+ if (Object.keys(newConfig).some((key) => props.fieldsConfig[key].order !== newConfig[key].order)) emit("update:fields-config", newConfig);
41
+ dragEnd();
42
+ };
43
+ return (_ctx, _cache) => {
44
+ return openBlock(), createBlock(_sfc_main$1, {
45
+ icon: markRaw(unref(IconTableSettings)),
46
+ disabled: _ctx.disabled,
47
+ class: "h-full w-full"
48
+ }, {
49
+ default: withCtx(() => [
50
+ createElementVNode("div", _hoisted_1, [
51
+ createElementVNode("div", _hoisted_2, [
52
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.fields, (field) => {
53
+ return openBlock(), createBlock(_sfc_main$2, {
54
+ key: field.label,
55
+ field,
56
+ "field-config": _ctx.fieldsConfig[field.label],
57
+ "query-params": _ctx.queryParams,
58
+ disabled: _ctx.disabled,
59
+ style: normalizeStyle({
60
+ order: getOrder(field)
61
+ }),
62
+ "onDrag:start": ($event) => dragItem.value = field.label,
63
+ "onDrag:enter": ($event) => dragEnter(field),
64
+ "onDrag:end": drop,
65
+ "onUpdate:fieldsConfig": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:fields-config", $event))
66
+ }, null, 8, ["field", "field-config", "query-params", "disabled", "style", "onDrag:start", "onDrag:enter"]);
67
+ }), 128))
68
+ ]),
69
+ _cache[1] || (_cache[1] = createElementVNode("div", { class: "border-b border-solid border-gray-200 dark:border-gray-700 my-4" }, null, -1)),
70
+ _cache[2] || (_cache[2] = createElementVNode("button", { class: "relative py-1 px-2 rounded-lg w-ripple w-ripple-hover bg-gray-100 dark:bg-gray-800" }, " Reset ", -1))
71
+ ])
72
+ ]),
73
+ _: 1
74
+ }, 8, ["icon", "disabled"]);
75
+ };
76
+ }
77
+ });
78
+
79
+ export { _sfc_main as default };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from './HeaderSettings.vue.js';
2
+
3
+
4
+
5
+ export { _sfc_main as default };
@@ -0,0 +1,32 @@
1
+ import { FieldConfig, ListField } from '../types';
2
+ declare const _default: <Data extends DefaultData, QueryParams>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
4
+ readonly "onUpdate:fields-config"?: ((value: Record<string, FieldConfig>) => any) | undefined;
5
+ readonly "onDrag:start"?: (() => any) | undefined;
6
+ readonly "onDrag:enter"?: (() => any) | undefined;
7
+ readonly "onDrag:end"?: (() => any) | undefined;
8
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:fields-config" | "onDrag:start" | "onDrag:enter" | "onDrag:end"> & {
9
+ field: ListField<Data, QueryParams>;
10
+ fieldConfig: FieldConfig;
11
+ queryParams: QueryParams;
12
+ disabled?: boolean;
13
+ }> & import('vue').PublicProps;
14
+ expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
15
+ attrs: any;
16
+ slots: {};
17
+ emit: {
18
+ (e: "update:fields-config", value: Record<string, FieldConfig>): void;
19
+ (e: "drag:start"): void;
20
+ (e: "drag:enter"): void;
21
+ (e: "drag:end"): void;
22
+ };
23
+ }>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
24
+ [key: string]: any;
25
+ }> & {
26
+ __ctx?: Awaited<typeof __VLS_setup>;
27
+ };
28
+ export default _default;
29
+ type __VLS_PrettifyLocal<T> = {
30
+ [K in keyof T]: T[K];
31
+ } & {};
32
+ //# sourceMappingURL=HeaderSettingsItem.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HeaderSettingsItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/List/components/HeaderSettingsItem.vue"],"names":[],"mappings":"AAiFA,OAAO,KAAK,EAAC,WAAW,EAAE,SAAS,EAAC,MAAM,UAAU,CAAA;yBAKnC,IAAI,SAAS,WAAW,EAAE,WAAW,eACxC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WA0JxD,mBAAmB,CAAC;;;;;;eAtJrB,SAAS,CAAC,IAAI,EAAE,WAAW,CAAC;qBACtB,WAAW;qBACX,WAAW;mBACb,OAAO;KAmJmE,CAAC,4BAA2B;oBAChG,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;;YAhJP,sBAAsB,SAAS,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,GAAG,IAAI;YACjE,YAAY,GAAG,IAAI;YACnB,YAAY,GAAG,IAAI;YACnB,UAAU,GAAG,IAAI;;;;;YAkJqB,OAAO,CAAC,OAAO,WAAW,CAAC;;AApKvE,wBAoK4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -0,0 +1,64 @@
1
+ import { defineComponent, ref, openBlock, createElementBlock, normalizeClass, withModifiers, createElementVNode, createVNode, unref, toDisplayString, createBlock, resolveDynamicComponent } from 'vue';
2
+ import IconDrag from '../../../assets/icons/sax/IconDrag.svg.js';
3
+ import IconEye from '../../../assets/icons/sax/IconEye.svg.js';
4
+ import IconEyeSlash from '../../../assets/icons/sax/IconEyeSlash.svg.js';
5
+
6
+ const _hoisted_1 = ["draggable"];
7
+ const _hoisted_2 = { class: "px-2 py-1 self-center font-semibold" };
8
+ const _sfc_main = /* @__PURE__ */ defineComponent({
9
+ __name: "HeaderSettingsItem",
10
+ props: {
11
+ field: {},
12
+ fieldConfig: {},
13
+ queryParams: {},
14
+ disabled: { type: Boolean }
15
+ },
16
+ emits: ["update:fields-config", "drag:start", "drag:enter", "drag:end"],
17
+ setup(__props, { emit: __emit }) {
18
+ const emit = __emit;
19
+ const isDraggable = ref(false);
20
+ const isDragging = ref(false);
21
+ const initDrag = () => {
22
+ isDraggable.value = true;
23
+ };
24
+ const startDrag = () => {
25
+ isDragging.value = true;
26
+ emit("drag:start");
27
+ };
28
+ const endDrag = () => {
29
+ isDraggable.value = false;
30
+ isDragging.value = false;
31
+ emit("drag:end");
32
+ };
33
+ return (_ctx, _cache) => {
34
+ return openBlock(), createElementBlock("div", {
35
+ draggable: isDraggable.value,
36
+ class: normalizeClass(["grid grid-cols-[auto,1fr,auto] text-description select-none bg-default dark:bg-default-dark", {
37
+ "opacity-[0.001]": isDragging.value,
38
+ "opacity-50": !_ctx.fieldConfig.visible && !isDragging.value
39
+ }]),
40
+ onDragstart: startDrag,
41
+ onDragend: endDrag,
42
+ onDragenter: _cache[1] || (_cache[1] = ($event) => !isDraggable.value && _ctx.$emit("drag:enter")),
43
+ onDragover: _cache[2] || (_cache[2] = withModifiers(() => {
44
+ }, ["stop", "prevent"]))
45
+ }, [
46
+ createElementVNode("button", {
47
+ class: "relative w-ripple w-ripple-hover px-2 flex items-center",
48
+ onMousedown: initDrag
49
+ }, [
50
+ createVNode(unref(IconDrag), { class: "rotate-90" })
51
+ ], 32),
52
+ createElementVNode("div", _hoisted_2, toDisplayString(typeof _ctx.field.title === "string" ? _ctx.field.title : _ctx.field.title(_ctx.queryParams)), 1),
53
+ createElementVNode("button", {
54
+ class: "relative w-ripple w-ripple-hover px-2 flex items-center",
55
+ onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:fields-config", { [_ctx.field.label]: { ..._ctx.fieldConfig, visible: !_ctx.fieldConfig.visible } }))
56
+ }, [
57
+ (openBlock(), createBlock(resolveDynamicComponent(_ctx.fieldConfig.visible ? unref(IconEye) : unref(IconEyeSlash)), { class: "pointer-events-none" }))
58
+ ])
59
+ ], 42, _hoisted_1);
60
+ };
61
+ }
62
+ });
63
+
64
+ export { _sfc_main as default };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from './HeaderSettingsItem.vue.js';
2
+
3
+
4
+
5
+ export { _sfc_main as default };
@@ -8,10 +8,10 @@ export type FieldComponent<Data> = Component<{
8
8
  export type ListField<Data, QueryParams = unknown> = {
9
9
  component: Raw<FieldComponent<Data>>;
10
10
  title: string | ((params: QueryParams) => string);
11
+ label: string;
11
12
  cssClass?: string;
12
13
  field?: Extract<keyof Data, string> | ((params: QueryParams) => Extract<keyof Data, string>);
13
14
  visibleGetter?: (params: QueryParams) => boolean;
14
- allowOpen?: boolean;
15
15
  allowResize?: boolean;
16
16
  };
17
17
  export type MenuComponent<Data> = Component<{
@@ -23,4 +23,9 @@ export type BulkComponent<QueryParams> = Component<{
23
23
  selectionCount: number;
24
24
  disableMessage?: string;
25
25
  }>;
26
+ export type FieldConfig = {
27
+ width: number;
28
+ visible: boolean;
29
+ order: number;
30
+ };
26
31
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/List/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAE,GAAG,EAAC,MAAM,KAAK,CAAA;AAEvC,MAAM,MAAM,cAAc,CAAC,IAAI,IAAI,SAAS,CAAC;IAC3C,IAAI,EAAE,IAAI,CAAA;IACV,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAC,CAAA;AAEF,MAAM,MAAM,SAAS,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,IAAI;IACnD,SAAS,EAAE,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAA;IACpC,KAAK,EAAE,MAAM,GAAG,CAAC,CAAC,MAAM,EAAE,WAAW,KAAK,MAAM,CAAC,CAAA;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC,MAAM,IAAI,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,WAAW,KAAK,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AAC,CAAC,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,MAAM,IAAI,EAAE,MAAM,CAAC,CAAC,CAAA;IAC5F,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,OAAO,CAAA;IAChD,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,aAAa,CAAC,IAAI,IAAI,SAAS,CAAC;IAC1C,IAAI,EAAE,IAAI,CAAA;IACV,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAC,CAAA;AAEF,MAAM,MAAM,aAAa,CAAC,WAAW,IAAI,SAAS,CAAC;IACjD,iBAAiB,EAAE,MAAM,WAAW,CAAA;IACpC,cAAc,EAAE,MAAM,CAAA;IACtB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAC,CAAA;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;CACd,CAAA"}
@@ -12,6 +12,8 @@ declare const _default: import('vue').DefineComponent<{
12
12
  light?: boolean;
13
13
  trigger?: Element;
14
14
  maxHeight?: number;
15
- }> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
15
+ }> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
16
+ container: HTMLSpanElement;
17
+ }, any>;
16
18
  export default _default;
17
19
  //# sourceMappingURL=WTooltip.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"WTooltip.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Tooltip/WTooltip.vue"],"names":[],"mappings":";WA2FS,MAAM;cACH,OAAO;mBACF,OAAO;YACd,OAAO;cACL,OAAO;gBACL,MAAM;;WALX,MAAM;cACH,OAAO;mBACF,OAAO;YACd,OAAO;cACL,OAAO;gBACL,MAAM;;AAqHpB,wBAMG"}
1
+ {"version":3,"file":"WTooltip.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Tooltip/WTooltip.vue"],"names":[],"mappings":";WA2FS,MAAM;cACH,OAAO;mBACF,OAAO;YACd,OAAO;cACL,OAAO;gBACL,MAAM;;WALX,MAAM;cACH,OAAO;mBACF,OAAO;YACd,OAAO;cACL,OAAO;gBACL,MAAM;;;;AAoHpB,wBAOG"}
@@ -1,8 +1,13 @@
1
- import { defineComponent, useSlots, ref, computed, watch, toRef, onBeforeUnmount, unref, openBlock, createElementBlock, createCommentVNode, markRaw } from 'vue';
1
+ import { defineComponent, useSlots, useTemplateRef, ref, computed, watch, toRef, onBeforeUnmount, unref, openBlock, createElementBlock, createCommentVNode, markRaw } from 'vue';
2
2
  import { getIsTouchDevice } from '../../utils/mobile.js';
3
3
  import { Tooltip } from '../../utils/Tooltip.js';
4
4
  import { getIncrement } from './models/utils.js';
5
5
 
6
+ const _hoisted_1 = {
7
+ key: 0,
8
+ ref: "container",
9
+ class: "hidden"
10
+ };
6
11
  const _sfc_main = /* @__PURE__ */ defineComponent({
7
12
  __name: "WTooltip",
8
13
  props: {
@@ -17,9 +22,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
17
22
  const props = __props;
18
23
  const slots = useSlots();
19
24
  const isTouchDevice = getIsTouchDevice();
20
- const container = ref();
25
+ const containerRef = useTemplateRef("container");
21
26
  const isOpen = ref(false);
22
- const parent = computed(() => container.value?.parentElement ?? null);
27
+ const parent = computed(() => containerRef.value?.parentElement ?? null);
23
28
  const triggerElement = computed(() => props.trigger ?? parent.value);
24
29
  const open = () => {
25
30
  const slot = slots.default?.()?.[0];
@@ -58,12 +63,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
58
63
  close();
59
64
  });
60
65
  return (_ctx, _cache) => {
61
- return !(_ctx.noTouch && unref(isTouchDevice)) ? (openBlock(), createElementBlock("span", {
62
- key: 0,
63
- ref_key: "container",
64
- ref: container,
65
- class: "hidden"
66
- }, null, 512)) : createCommentVNode("", true);
66
+ return !(_ctx.noTouch && unref(isTouchDevice)) ? (openBlock(), createElementBlock("span", _hoisted_1, null, 512)) : createCommentVNode("", true);
67
67
  };
68
68
  }
69
69
  });
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.8.20",
7
+ "version": "0.8.22",
8
8
  "scripts": {
9
9
  "dev": "vite",
10
10
  "build": "run-p type-check build-only",
@@ -215,6 +215,9 @@ module.exports = plugin(function ({matchUtilities, addVariant, addUtilities, add
215
215
  'color': theme('colors.gray.700'),
216
216
  },
217
217
  },
218
+ '*:focus-visible': {
219
+ 'outline': 'none',
220
+ },
218
221
  })
219
222
 
220
223
  matchUtilities(