eco-vue-js 0.26.3 → 0.26.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Button/WButton.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/Button/WButtonInput.vue.d.ts +2 -0
- package/dist/components/Button/WButtonInput.vue.d.ts.map +1 -1
- package/dist/components/Button/WButtonInput.vue_vue_type_script_setup_true_lang.js +5 -3
- package/dist/components/Button/WButtonMore.vue.d.ts +11 -0
- package/dist/components/Button/WButtonMore.vue.d.ts.map +1 -1
- package/dist/components/Button/WButtonMore.vue_vue_type_script_setup_true_lang.js +12 -5
- package/dist/components/Checkbox/WCheckbox.vue.d.ts.map +1 -1
- package/dist/components/Checkbox/WCheckbox.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/InfiniteList/components/InfiniteListPage.vue.d.ts +2 -0
- package/dist/components/InfiniteList/components/InfiniteListPage.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/components/InfiniteListPage.vue_vue_type_script_setup_true_lang.js +2 -0
- package/dist/components/InfiniteList/components/InfiniteListPages.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/components/InfiniteListPages.vue_vue_type_script_setup_true_lang.js +41 -25
- package/dist/components/Modal/components/OverlayLayerProvider.vue.d.ts.map +1 -1
- package/dist/components/Modal/components/OverlayLayerProvider.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/Nav/WNavItem.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/Tabs/WTabs.vue.d.ts.map +1 -1
- package/dist/components/Tabs/WTabs.vue_vue_type_script_setup_true_lang.js +1 -1
- package/docs/components/button.md +1 -0
- package/docs/components/dropdown-menu.md +26 -1
- package/docs/llms.txt +1 -1
- package/package.json +1 -1
- package/tailwind-base/css/internal-variables.css +9 -0
- package/tailwind-base/plugins/w-ripple.ts +1 -4
|
@@ -104,7 +104,7 @@ var WButton_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCo
|
|
|
104
104
|
} : {}
|
|
105
105
|
}, {
|
|
106
106
|
ref: "container",
|
|
107
|
-
class: ["relative isolate flex min-h---button-height items-center justify-center rounded-(--w-button-rounded,1rem) [border-width:var(--w-button-border,1px)] px-(--w-button-padding) font-medium whitespace-nowrap select-none w-ripple-
|
|
107
|
+
class: ["relative isolate flex min-h---button-height items-center justify-center rounded-(--w-button-rounded,1rem) [border-width:var(--w-button-border,1px)] px-(--w-button-padding) font-medium whitespace-nowrap select-none w-ripple-border-(--w-button-border,1px)", {
|
|
108
108
|
[unref(semanticTypeButtonBackgroundMap)[__props.semanticType] ?? unref(semanticTypeBackgroundMap)[__props.semanticType]]: !__props.outline,
|
|
109
109
|
"before:text-tone-fill": __props.outline,
|
|
110
110
|
[unref(semanticTypeBorderMap)[__props.semanticType]]: true,
|
|
@@ -12,6 +12,8 @@ type __VLS_Props = {
|
|
|
12
12
|
skeleton?: boolean;
|
|
13
13
|
/** Grays the button out and ignores clicks. */
|
|
14
14
|
disabled?: boolean;
|
|
15
|
+
/** Highlights the button, such as while the menu it opens is shown. */
|
|
16
|
+
active?: boolean;
|
|
15
17
|
};
|
|
16
18
|
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
17
19
|
click: (value: MouseEvent) => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WButtonInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/WButtonInput.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WButtonInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/WButtonInput.vue"],"names":[],"mappings":"AA2CA;AA2EA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,eAAe,CAAA;AAO5C,KAAK,WAAW,GAAG;IACjB,0BAA0B;IAC1B,IAAI,EAAE,YAAY,CAAA;IAClB,sFAAsF;IACtF,EAAE,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC,CAAA;IACpB,iDAAiD;IACjD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,8DAA8D;IAC9D,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,iDAAiD;IACjD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,uEAAuE;IACvE,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAC;AAuKF,QAAA,MAAM,YAAY;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -12,7 +12,8 @@ var WButtonInput_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
|
|
|
12
12
|
tooltipText: {},
|
|
13
13
|
loading: { type: Boolean },
|
|
14
14
|
skeleton: { type: Boolean },
|
|
15
|
-
disabled: { type: Boolean }
|
|
15
|
+
disabled: { type: Boolean },
|
|
16
|
+
active: { type: Boolean }
|
|
16
17
|
},
|
|
17
18
|
emits: ["click"],
|
|
18
19
|
setup(__props) {
|
|
@@ -21,10 +22,11 @@ var WButtonInput_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
|
|
|
21
22
|
key: 0,
|
|
22
23
|
class: "square---w-input-height w-skeleton-rounded-(--w-input-rounded,0.75rem)"
|
|
23
24
|
})) : (openBlock(), createBlock(resolveDynamicComponent(__props.to ? WRouterLink_default : "button"), mergeProps({ key: 1 }, __props.to ? { to: __props.to } : void 0, {
|
|
24
|
-
class: ["square---w-input-height bg-surface relative flex select-none items-center justify-center rounded-(--w-input-rounded,0.75rem) border border-solid border-line-subtle", {
|
|
25
|
+
class: ["square---w-input-height bg-surface relative flex select-none items-center justify-center rounded-(--w-input-rounded,0.75rem) border border-solid border-line-subtle w-ripple-border", {
|
|
25
26
|
"cursor-not-allowed opacity-50": __props.disabled,
|
|
26
27
|
"w-ripple w-ripple-hover cursor-pointer": !__props.disabled,
|
|
27
|
-
"cursor-progress": __props.loading
|
|
28
|
+
"cursor-progress": __props.loading,
|
|
29
|
+
"tone-primary text-tone border-tone-line": __props.active
|
|
28
30
|
}],
|
|
29
31
|
disabled: __props.disabled,
|
|
30
32
|
"aria-label": __props.tooltipText,
|
|
@@ -13,6 +13,17 @@ type __VLS_Slots = {
|
|
|
13
13
|
* A confirm opened from an item with `useOverlay` takes the menu's place at the same anchor.
|
|
14
14
|
*/
|
|
15
15
|
default?: () => void;
|
|
16
|
+
/**
|
|
17
|
+
* Replaces the three-dots button, such as with WButtonInput: call `toggle` on click, bind `attrs` to the button
|
|
18
|
+
* and `active` to its highlight — `active` stays off while the menu is open at a custom anchor.
|
|
19
|
+
*/
|
|
20
|
+
toggle?: (props: {
|
|
21
|
+
toggle: () => void;
|
|
22
|
+
active: boolean;
|
|
23
|
+
attrs: {
|
|
24
|
+
'aria-expanded': boolean;
|
|
25
|
+
};
|
|
26
|
+
}) => void;
|
|
16
27
|
};
|
|
17
28
|
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {
|
|
18
29
|
open: (anchor?: OverlayAnchor) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WButtonMore.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/WButtonMore.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WButtonMore.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/WButtonMore.vue"],"names":[],"mappings":"AA6CA;AA6JA,OAAO,EAAC,KAAK,aAAa,EAAa,MAAM,iBAAiB,CAAA;AAE9D,KAAK,WAAW,GAAG;IACjB,kDAAkD;IAClD,IAAI,CAAC,EAAE,YAAY,CAAA;IACnB,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,sIAAsI;IACtI,MAAM,CAAC,EAAE,aAAa,CAAA;CACvB,CAAC;AASF,KAAK,WAAW,GAAG;IACjB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB;;;OAGG;IACH,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE;QAAC,MAAM,EAAE,MAAM,IAAI,CAAC;QAAC,MAAM,EAAE,OAAO,CAAC;QAAC,KAAK,EAAE;YAAC,eAAe,EAAE,OAAO,CAAA;SAAC,CAAA;KAAC,KAAK,IAAI,CAAA;CACnG,CAAC;AA+JF,QAAA,MAAM,UAAU;oBAxIO,aAAa,KAAG,IAAI;iBA8BzB,IAAI;;IAepB,wDAAwD;;;;;;kFA+FxD,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { hasAnchorLayer } from "../Modal/models/overlayRegistry.js";
|
|
2
2
|
import { useOverlay } from "../../utils/Overlay.js";
|
|
3
3
|
import IconMore_default from "../../assets/icons/IconMore.js";
|
|
4
|
-
import { computed, createBlock, createElementBlock, createElementVNode, defineComponent, markRaw, mergeProps, normalizeClass, openBlock, ref, resolveDynamicComponent, shallowRef, unref, useSlots, useTemplateRef } from "vue";
|
|
4
|
+
import { computed, createBlock, createElementBlock, createElementVNode, defineComponent, markRaw, mergeProps, normalizeClass, openBlock, ref, renderSlot, resolveDynamicComponent, shallowRef, unref, useSlots, useTemplateRef } from "vue";
|
|
5
5
|
//#region src/components/Button/WButtonMore.vue?vue&type=script&setup=true&lang.ts
|
|
6
6
|
var _hoisted_1 = [
|
|
7
7
|
"disabled",
|
|
@@ -20,7 +20,7 @@ var WButtonMore_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
20
20
|
const props = __props;
|
|
21
21
|
const emit = __emit;
|
|
22
22
|
const slots = useSlots();
|
|
23
|
-
const renderSlot = markRaw(() => slots.default?.());
|
|
23
|
+
const renderSlot$1 = markRaw(() => slots.default?.());
|
|
24
24
|
const buttonRef = useTemplateRef("button");
|
|
25
25
|
const overlay = useOverlay();
|
|
26
26
|
let closeMenu = null;
|
|
@@ -36,7 +36,7 @@ var WButtonMore_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
36
36
|
const value = overlay.open({
|
|
37
37
|
present: "dropdown",
|
|
38
38
|
anchor: opened,
|
|
39
|
-
content: renderSlot,
|
|
39
|
+
content: renderSlot$1,
|
|
40
40
|
dropdown: {
|
|
41
41
|
cornered: target !== void 0,
|
|
42
42
|
closeOnClick: true
|
|
@@ -69,7 +69,14 @@ var WButtonMore_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
69
69
|
isActive
|
|
70
70
|
});
|
|
71
71
|
return (_ctx, _cache) => {
|
|
72
|
-
return openBlock(), createElementBlock("
|
|
72
|
+
return _ctx.$slots.toggle ? (openBlock(), createElementBlock("div", mergeProps({ key: 0 }, _ctx.$attrs, {
|
|
73
|
+
ref: "button",
|
|
74
|
+
class: "inline-flex"
|
|
75
|
+
}), [renderSlot(_ctx.$slots, "toggle", {
|
|
76
|
+
toggle,
|
|
77
|
+
active: isOpen.value && !isCustomAnchor.value,
|
|
78
|
+
attrs: { "aria-expanded": isOpen.value }
|
|
79
|
+
})], 16)) : (openBlock(), createElementBlock("button", mergeProps({ key: 1 }, _ctx.$attrs, {
|
|
73
80
|
ref: "button",
|
|
74
81
|
disabled: __props.disabled,
|
|
75
82
|
class: [{
|
|
@@ -84,7 +91,7 @@ var WButtonMore_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
84
91
|
"w-hover-circle": !__props.disabled,
|
|
85
92
|
"text-description": !isOpen.value || isCustomAnchor.value,
|
|
86
93
|
"tone-primary text-tone": isOpen.value && !isCustomAnchor.value
|
|
87
|
-
}]) }, [(openBlock(), createBlock(resolveDynamicComponent(__props.icon ?? unref(IconMore_default)), { class: "square-[1.125em]" }))], 2)], 16, _hoisted_1);
|
|
94
|
+
}]) }, [(openBlock(), createBlock(resolveDynamicComponent(__props.icon ?? unref(IconMore_default)), { class: "square-[1.125em]" }))], 2)], 16, _hoisted_1));
|
|
88
95
|
};
|
|
89
96
|
}
|
|
90
97
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WCheckbox.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Checkbox/WCheckbox.vue"],"names":[],"mappings":"AAkGA;AAkJA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,SAAS,CAAA;AAiC1C,KAAK,WAAW,GAAG;IACjB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB,CAAC;
|
|
1
|
+
{"version":3,"file":"WCheckbox.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Checkbox/WCheckbox.vue"],"names":[],"mappings":"AAkGA;AAkJA,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,SAAS,CAAA;AAiC1C,KAAK,WAAW,GAAG;IACjB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB,CAAC;AAyPF,QAAA,MAAM,UAAU;;;;;;;;;;6EAId,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -80,7 +80,7 @@ var WCheckbox_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
80
80
|
"text-tone-on": __props.modelValue && !unref(isDisabled) && !unref(isSkeleton),
|
|
81
81
|
"tone-primary text-tone": !__props.modelValue && !unref(isDisabled) && !unref(isSkeleton),
|
|
82
82
|
"text-subtle": !__props.modelValue && unref(isDisabled) && !unref(isSkeleton),
|
|
83
|
-
"w-ripple w-hover-circle before:text-accent after:text-accent": !unref(isDisabled) && !unref(isReadonly) && !unref(isSkeleton),
|
|
83
|
+
"w-ripple w-ripple-border w-hover-circle before:text-accent after:text-accent": !unref(isDisabled) && !unref(isReadonly) && !unref(isSkeleton),
|
|
84
84
|
"rounded-full": __props.radio,
|
|
85
85
|
"rounded-md": !__props.radio,
|
|
86
86
|
"border-line": unref(isDisabled) || unref(isSkeleton),
|
|
@@ -20,6 +20,7 @@ declare const __VLS_export: <Model extends number | string, Data extends Default
|
|
|
20
20
|
onRefetch?: (() => any) | undefined;
|
|
21
21
|
"onUpdate:count"?: ((value: number) => any) | undefined;
|
|
22
22
|
"onUpdate:pages-count"?: ((value: number) => any) | undefined;
|
|
23
|
+
"onUpdate:page-size"?: ((value: number) => any) | undefined;
|
|
23
24
|
"onUpdate:next-page"?: ((value: number | null) => any) | undefined;
|
|
24
25
|
"onUpdate:previous-page"?: ((value: number | null) => any) | undefined;
|
|
25
26
|
"onRemove:page"?: ((value: number) => any) | undefined;
|
|
@@ -62,6 +63,7 @@ declare const __VLS_export: <Model extends number | string, Data extends Default
|
|
|
62
63
|
emit: {
|
|
63
64
|
(e: "update:count", value: number): void;
|
|
64
65
|
(e: "update:pages-count", value: number): void;
|
|
66
|
+
(e: "update:page-size", value: number): void;
|
|
65
67
|
(e: "update:next-page", value: number | null): void;
|
|
66
68
|
(e: "update:previous-page", value: number | null): void;
|
|
67
69
|
(e: "remove:page", value: number): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InfiniteListPage.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/InfiniteList/components/InfiniteListPage.vue"],"names":[],"mappings":"AAiEA;
|
|
1
|
+
{"version":3,"file":"InfiniteListPage.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/InfiniteList/components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CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,CAAC,GAAG,EAAE,CAAC"}
|
|
@@ -35,6 +35,7 @@ var InfiniteListPage_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
35
35
|
emits: [
|
|
36
36
|
"update:count",
|
|
37
37
|
"update:pages-count",
|
|
38
|
+
"update:page-size",
|
|
38
39
|
"update:next-page",
|
|
39
40
|
"update:previous-page",
|
|
40
41
|
"remove:page",
|
|
@@ -162,6 +163,7 @@ var InfiniteListPage_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
162
163
|
if (props.firstPage && value?.previous !== void 0) emit("update:previous-page", value.previous);
|
|
163
164
|
if (props.lastPage && value?.next !== void 0) emit("update:next-page", value.next);
|
|
164
165
|
if (value?.pages_count !== void 0) emit("update:pages-count", value.pages_count);
|
|
166
|
+
if (value?.next && value.results.length !== 0) emit("update:page-size", value.results.length);
|
|
165
167
|
if (value?.count !== void 0) emit("update:count", value.count);
|
|
166
168
|
}, { immediate: true });
|
|
167
169
|
const errorStatusList = [404, 400];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InfiniteListPages.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/InfiniteList/components/InfiniteListPages.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InfiniteListPages.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/InfiniteList/components/InfiniteListPages.vue"],"names":[],"mappings":"AAuEA;AAipBA,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,aAAa,CAAA;AACzC,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,yBAAyB,CAAA;AAYhE,QAAA,MAAM,YAAY,GAAK,KAAK,SAAS,MAAM,GAAG,MAAM,EAAE,IAAI,SAAS,WAAW,EAAE,WAAW,EAC1F,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC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E,MAAM,CAAA;YACZ,KAAK,EAAE,MAAM,CAAA;YACb,KAAK,EAAE,KAAK,CAAA;YACZ,OAAO,EAAE,IAAI,EAAE,GAAG,SAAS,CAAA;YAC3B,YAAY,EAAE,OAAO,CAAA;SACtB,KAAK,IAAI;gBACF,MAAM,IAAI;;;YAvhBd,aAAa,SAAS,MAAM,GAAG,SAAS,GAAG,IAAI;YAC/C,cAAc,SAAS,MAAM,GAAG,IAAI;YACpC,cAAc,SAAS,QAAQ,GAAG,IAAI;;EA8wBxC,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAA;CAAI,CAAC;wBACpE,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,mBAAmB,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,GAAG,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,CAAC,GAAG,EAAE,CAAC"}
|
|
@@ -45,6 +45,8 @@ var InfiniteListPages_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*
|
|
|
45
45
|
const slotIds = ref([slotIdCounter]);
|
|
46
46
|
const pagesCount = ref(1);
|
|
47
47
|
const count = ref(0);
|
|
48
|
+
/** Items on a full page as the API returns them, which can differ from the `size` the list asks for. */
|
|
49
|
+
const pageSize = ref(props.pageLength);
|
|
48
50
|
const nextPage = computed(() => {
|
|
49
51
|
if (pagesCount.value === 0) return null;
|
|
50
52
|
const max = Math.max(...pages.value, 0);
|
|
@@ -58,10 +60,16 @@ var InfiniteListPages_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*
|
|
|
58
60
|
const isResettingPage = ref(false);
|
|
59
61
|
const disabledSlots = reactive(/* @__PURE__ */ new Set());
|
|
60
62
|
let activationGen = 0;
|
|
63
|
+
/** Items on the page by the total count, a full page while the count is not known. */
|
|
64
|
+
const getPageItemCount = (page) => {
|
|
65
|
+
const remaining = count.value - (page - 1) * pageSize.value;
|
|
66
|
+
return remaining > 0 ? Math.min(remaining, pageSize.value) : pageSize.value;
|
|
67
|
+
};
|
|
61
68
|
const getSkeletonLength = (pagesBefore) => {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
69
|
+
const itemCount = getPageItemCount(pagesBefore + 1);
|
|
70
|
+
if (props.skeletonLength === void 0) return itemCount;
|
|
71
|
+
const length = Math.min(props.skeletonLength - pagesBefore * pageSize.value, itemCount);
|
|
72
|
+
return length < 0 ? itemCount : length;
|
|
65
73
|
};
|
|
66
74
|
const pageComponentRef = useTemplateRef("pageComponent");
|
|
67
75
|
const topSentinelRef = useTemplateRef("topSentinel");
|
|
@@ -73,9 +81,12 @@ var InfiniteListPages_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*
|
|
|
73
81
|
const updatePagesCount = (value) => {
|
|
74
82
|
pagesCount.value = Math.max(value, 1);
|
|
75
83
|
};
|
|
84
|
+
/** The end a page was last added at, whose sentinel is observed anew once the pages have rendered. */
|
|
85
|
+
let grownTowards = null;
|
|
76
86
|
const addNextPage = (silent) => {
|
|
77
87
|
if (!nextPage.value) return;
|
|
78
88
|
if (pages.value.includes(nextPage.value)) return;
|
|
89
|
+
grownTowards = "bottom";
|
|
79
90
|
if (pages.value.length >= props.maxPages) {
|
|
80
91
|
const recycledSlotId = slotIds.value.shift();
|
|
81
92
|
pages.value.shift();
|
|
@@ -90,6 +101,7 @@ var InfiniteListPages_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*
|
|
|
90
101
|
const addPreviousPage = (silent) => {
|
|
91
102
|
if (!previousPage.value) return;
|
|
92
103
|
if (pages.value.includes(previousPage.value)) return;
|
|
104
|
+
grownTowards = "top";
|
|
93
105
|
if (pages.value.length >= props.maxPages) {
|
|
94
106
|
const recycledSlotId = slotIds.value.pop();
|
|
95
107
|
pages.value.pop();
|
|
@@ -104,25 +116,30 @@ var InfiniteListPages_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*
|
|
|
104
116
|
let resizeObserver = null;
|
|
105
117
|
const pageHeights = reactive(/* @__PURE__ */ new Map());
|
|
106
118
|
const observedElements = /* @__PURE__ */ new Map();
|
|
107
|
-
const
|
|
119
|
+
const avgItemHeight = computed(() => {
|
|
108
120
|
let sum = 0;
|
|
109
|
-
let
|
|
110
|
-
for (
|
|
111
|
-
|
|
121
|
+
let itemCount = 0;
|
|
122
|
+
for (let i = 0; i < slotIds.value.length; i++) {
|
|
123
|
+
const h = pageHeights.get(slotIds.value[i]);
|
|
124
|
+
const page = pages.value[i];
|
|
125
|
+
if (!h || h <= 0 || page === void 0) continue;
|
|
112
126
|
sum += h;
|
|
113
|
-
|
|
127
|
+
itemCount += getPageItemCount(page);
|
|
114
128
|
}
|
|
115
|
-
return
|
|
129
|
+
return itemCount === 0 ? 0 : sum / itemCount;
|
|
116
130
|
});
|
|
131
|
+
const avgPageHeight = computed(() => Math.round(avgItemHeight.value * pageSize.value));
|
|
117
132
|
const topSpacerHeight = computed(() => {
|
|
118
133
|
if (!avgPageHeight.value) return 0;
|
|
119
134
|
const firstRendered = pages.value[0] ?? 1;
|
|
120
135
|
return Math.max(0, (firstRendered - 1) * avgPageHeight.value);
|
|
121
136
|
});
|
|
122
137
|
const bottomSpacerHeight = computed(() => {
|
|
123
|
-
if (!
|
|
138
|
+
if (!avgItemHeight.value) return 0;
|
|
124
139
|
const lastRendered = pages.value[pages.value.length - 1] ?? 1;
|
|
125
|
-
|
|
140
|
+
let itemCount = 0;
|
|
141
|
+
for (let page = lastRendered + 1; page <= pagesCount.value; page++) itemCount += getPageItemCount(page);
|
|
142
|
+
return Math.round(itemCount * avgItemHeight.value);
|
|
126
143
|
});
|
|
127
144
|
const getScrollElementTop = (element) => {
|
|
128
145
|
if (element === document.scrollingElement || element === document.body || element === document.documentElement) return 0;
|
|
@@ -210,19 +227,16 @@ var InfiniteListPages_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*
|
|
|
210
227
|
watch(nextPage, (value, oldValue) => {
|
|
211
228
|
if (oldValue === null && value !== null && bottomSentinelIntersecting.value) addNextPage();
|
|
212
229
|
});
|
|
213
|
-
const
|
|
214
|
-
if (
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
top: 0,
|
|
218
|
-
bottom: window.innerHeight
|
|
219
|
-
};
|
|
220
|
-
return rect.bottom >= viewport.top - SENTINEL_MARGIN && rect.top <= viewport.bottom + SENTINEL_MARGIN;
|
|
230
|
+
const reobserve = (element) => {
|
|
231
|
+
if (!intersectionObserver || !element) return;
|
|
232
|
+
intersectionObserver.unobserve(element);
|
|
233
|
+
intersectionObserver.observe(element);
|
|
221
234
|
};
|
|
222
235
|
watch(pages, () => {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
236
|
+
const towards = grownTowards;
|
|
237
|
+
grownTowards = null;
|
|
238
|
+
if (pages.value.length < props.maxPages || towards === "bottom") reobserve(bottomSentinelRef.value);
|
|
239
|
+
if (pages.value.length < props.maxPages || towards === "top") reobserve(topSentinelRef.value);
|
|
226
240
|
}, {
|
|
227
241
|
deep: true,
|
|
228
242
|
flush: "post"
|
|
@@ -265,6 +279,7 @@ var InfiniteListPages_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*
|
|
|
265
279
|
const index = pages.value.indexOf(page);
|
|
266
280
|
const recycledSlotId = index !== -1 ? slotIds.value[index] : void 0;
|
|
267
281
|
pagesCount.value = 1;
|
|
282
|
+
count.value = 0;
|
|
268
283
|
pages.value = [page];
|
|
269
284
|
slotIds.value = [recycledSlotId ?? ++slotIdCounter];
|
|
270
285
|
};
|
|
@@ -336,7 +351,7 @@ var InfiniteListPages_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*
|
|
|
336
351
|
scrollEl,
|
|
337
352
|
isDocumentScroll,
|
|
338
353
|
scrollTop,
|
|
339
|
-
containerTop:
|
|
354
|
+
containerTop: containerEl.getBoundingClientRect().top - getScrollElementTop(scrollEl) + scrollTop
|
|
340
355
|
};
|
|
341
356
|
};
|
|
342
357
|
/** Scrolls to `y` px from the top of the list. */
|
|
@@ -441,10 +456,11 @@ var InfiniteListPages_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*
|
|
|
441
456
|
_ctx.$emit("update:count", $event);
|
|
442
457
|
}),
|
|
443
458
|
"onUpdate:pagesCount": updatePagesCount,
|
|
459
|
+
"onUpdate:pageSize": _cache[1] || (_cache[1] = ($event) => pageSize.value = $event),
|
|
444
460
|
"onRemove:page": removePage,
|
|
445
461
|
onRefetch: ($event) => unref(refetchNextPages)(page),
|
|
446
|
-
onFetched: _cache[
|
|
447
|
-
"onUpdate:error": _cache[
|
|
462
|
+
onFetched: _cache[2] || (_cache[2] = ($event) => isResettingPage.value = false),
|
|
463
|
+
"onUpdate:error": _cache[3] || (_cache[3] = ($event) => _ctx.$emit("update:error", $event))
|
|
448
464
|
}, createSlots({
|
|
449
465
|
default: withCtx(({ item, setter, skeleton, refetch, previous, next, first, last, page: itemPage, index: itemIndex, results, intersecting }) => [renderSlot(_ctx.$slots, "default", {
|
|
450
466
|
item,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OverlayLayerProvider.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/Modal/components/OverlayLayerProvider.vue"],"names":[],"mappings":"AAGA;
|
|
1
|
+
{"version":3,"file":"OverlayLayerProvider.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/Modal/components/OverlayLayerProvider.vue"],"names":[],"mappings":"AAGA;AA4CA,KAAK,WAAW,GAAG;IACjB,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAA;IACb,gIAAgI;IAChI,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE,OAAO,CAAC,CAAA;IAC3C,6GAA6G;IAC7G,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAC;AAiCF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAC/C,QAAA,MAAM,UAAU,kSAEd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
package/dist/components/Modal/components/OverlayLayerProvider.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -14,7 +14,7 @@ var OverlayLayerProvider_vue_vue_type_script_setup_true_lang_default = /*@__PURE
|
|
|
14
14
|
const props = __props;
|
|
15
15
|
const instance = getCurrentInstance();
|
|
16
16
|
if (props.provides) setInstanceProvides(instance, Object.create(props.provides));
|
|
17
|
-
provide(wBaseZIndex, BASE_ZINDEX_MODAL);
|
|
17
|
+
provide(wBaseZIndex, Math.max(BASE_ZINDEX_MODAL, props.provides?.[wBaseZIndex] ?? 0));
|
|
18
18
|
provide(wOverlayLayer, () => props.layer);
|
|
19
19
|
provide(wOverlayFrame, "modal");
|
|
20
20
|
provide(wOverlayRegions, null);
|
|
@@ -100,7 +100,7 @@ var WNavItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
100
100
|
}),
|
|
101
101
|
!__props.skeleton ? (openBlock(), createElementBlock("span", _hoisted_7, toDisplayString(typeof __props.count === "number" ? `\u00A0(${unref(numberCompactFormatter).format(__props.count)})` : ""), 1)) : (openBlock(), createBlock(WSkeleton_default, {
|
|
102
102
|
key: 1,
|
|
103
|
-
class: "ml-1 inline-flex
|
|
103
|
+
class: "w-skeleton-w-10 ml-1 inline-flex shrink-0"
|
|
104
104
|
})),
|
|
105
105
|
!__props.skeleton && __props.counter !== void 0 && __props.counter !== 0 ? (openBlock(), createBlock(WCounter_default, {
|
|
106
106
|
key: 2,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WTabs.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Tabs/WTabs.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WTabs.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Tabs/WTabs.vue"],"names":[],"mappings":"AA+KA;AA0kBA,OAAO,KAAK,EAAgB,SAAS,EAAC,MAAM,SAAS,CAAA;AAErD,OAAO,EAA0D,KAAK,KAAK,EAAqH,MAAM,KAAK,CAAA;AAmD3M,KAAK,WAAW,GAAG;IACjB,2EAA2E;IAC3E,OAAO,EAAE,MAAM,KAAK,EAAE,CAAA;CACvB,CAAC;AA+xBF,QAAA,MAAM,UAAU;2BA7qBc,MAAM;yBAIR,MAAM;gCAkFG,OAAO,CAAC,IAAI,CAAC;oBAM7B,IAAI;iBAIL,MAAM,UAAU,OAAO;;;;;;;;;;;;;;;;;;;;;kFAilBzC,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -350,7 +350,7 @@ var WTabs_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
|
|
|
350
350
|
"sm-not:snap-start grid grid-cols-[1fr_auto]": __props.side,
|
|
351
351
|
"no-scrollbar mb-4 flex overflow-x-auto overscroll-x-contain": !__props.side,
|
|
352
352
|
"w-frame-bleed px-(--w-frame-padding)": !__props.side && unref(frame) !== null,
|
|
353
|
-
"sm-not:pl
|
|
353
|
+
"sm-not:w-frame-bleed sm-not:pl-[var(--w-frame-padding,var(--inner-margin))] sm-not:pr-[var(--w-frame-padding,0px)]": !__props.side && unref(frame) === null,
|
|
354
354
|
"flex-wrap": !__props.side && __props.wrap,
|
|
355
355
|
"shadow-[inset_0_-1px_var(--color-line-subtle)]": !__props.side && __props.divider,
|
|
356
356
|
[__props.headerClass ?? ""]: true
|
|
@@ -224,6 +224,7 @@ import WButtonInput from 'eco-vue-js/dist/components/Button/WButtonInput.vue'
|
|
|
224
224
|
| `loading` | `boolean` | — | Shows a spinner instead of the icon and ignores clicks. |
|
|
225
225
|
| `skeleton` | `boolean` | — | Shows a placeholder instead of the button. |
|
|
226
226
|
| `disabled` | `boolean` | — | Grays the button out and ignores clicks. |
|
|
227
|
+
| `active` | `boolean` | — | Highlights the button, such as while the menu it opens is shown. |
|
|
227
228
|
|
|
228
229
|
#### Events
|
|
229
230
|
|
|
@@ -4,7 +4,7 @@ For a menu of actions, use a ready-made button. For anything else anchored to an
|
|
|
4
4
|
|
|
5
5
|
## Action menus
|
|
6
6
|
|
|
7
|
-
- `WButtonMore` is the "⋯" button: its default slot is the menu, and any click closes it. Only one menu is open at a time, and on phones it opens as a bottom sheet. The menu is rendered by `WModal` at the app root, with the slot keeping its context, and a confirm opened from an item with `useOverlay` takes its place — see [Anchored confirm](./modal.md#anchored-confirm).
|
|
7
|
+
- `WButtonMore` is the "⋯" button: its default slot is the menu, and any click closes it. Only one menu is open at a time, and on phones it opens as a bottom sheet. The menu is rendered by `WModal` at the app root, with the slot keeping its context, and a confirm opened from an item with `useOverlay` takes its place — see [Anchored confirm](./modal.md#anchored-confirm). The `toggle` slot swaps the "⋯" for another button, such as a `WButtonInput`: it gets `toggle` for the click, `attrs` for the button and `active` for its highlight.
|
|
8
8
|
- `WButtonDropdown` is a button with an arrow next to it: the `button` slot holds the main action and the `content` slot the others. The `content` slot gets `close`.
|
|
9
9
|
|
|
10
10
|
Menu items are `WButtonMoreItem`s: a `text` (or the default slot), an `icon`, and `to` or `href` to make the item a link. A disabled item can explain itself with `tooltipText`. `semanticType` colors an item, like the red Delete below.
|
|
@@ -61,6 +61,28 @@ Menu items are `WButtonMoreItem`s: a `text` (or the default slot), an `icon`, an
|
|
|
61
61
|
/>
|
|
62
62
|
</template>
|
|
63
63
|
</WButtonDropdown>
|
|
64
|
+
|
|
65
|
+
<WButtonMore>
|
|
66
|
+
<template #toggle="{toggle, active, attrs}">
|
|
67
|
+
<WButtonInput
|
|
68
|
+
:icon="markRaw(IconSort)"
|
|
69
|
+
tooltip-text="Sort beds"
|
|
70
|
+
:active="active"
|
|
71
|
+
v-bind="attrs"
|
|
72
|
+
@click="toggle"
|
|
73
|
+
/>
|
|
74
|
+
</template>
|
|
75
|
+
|
|
76
|
+
<WButtonMoreItem
|
|
77
|
+
text="Sort by name"
|
|
78
|
+
@click="action = 'Sort by name'"
|
|
79
|
+
/>
|
|
80
|
+
|
|
81
|
+
<WButtonMoreItem
|
|
82
|
+
text="Sort by planting date"
|
|
83
|
+
@click="action = 'Sort by planting date'"
|
|
84
|
+
/>
|
|
85
|
+
</WButtonMore>
|
|
64
86
|
</div>
|
|
65
87
|
|
|
66
88
|
<p class="text-description mt-4 text-sm">
|
|
@@ -75,12 +97,14 @@ import {SemanticType} from 'eco-vue-js/dist/utils/SemanticType'
|
|
|
75
97
|
|
|
76
98
|
import WButton from 'eco-vue-js/dist/components/Button/WButton.vue'
|
|
77
99
|
import WButtonDropdown from 'eco-vue-js/dist/components/Button/WButtonDropdown.vue'
|
|
100
|
+
import WButtonInput from 'eco-vue-js/dist/components/Button/WButtonInput.vue'
|
|
78
101
|
import WButtonMore from 'eco-vue-js/dist/components/Button/WButtonMore.vue'
|
|
79
102
|
import WButtonMoreItem from 'eco-vue-js/dist/components/Button/WButtonMoreItem.vue'
|
|
80
103
|
|
|
81
104
|
import IconArchiveBook from 'eco-vue-js/dist/assets/icons/IconArchiveBook'
|
|
82
105
|
import IconCopy from 'eco-vue-js/dist/assets/icons/IconCopy'
|
|
83
106
|
import IconEdit from 'eco-vue-js/dist/assets/icons/IconEdit'
|
|
107
|
+
import IconSort from 'eco-vue-js/dist/assets/icons/IconSort'
|
|
84
108
|
import IconTrash from 'eco-vue-js/dist/assets/icons/IconTrash'
|
|
85
109
|
|
|
86
110
|
const action = ref<string>()
|
|
@@ -250,6 +274,7 @@ import WButtonMore from 'eco-vue-js/dist/components/Button/WButtonMore.vue'
|
|
|
250
274
|
| Slot | Props | Description |
|
|
251
275
|
| --- | --- | --- |
|
|
252
276
|
| `default` | — | Menu items, usually WButtonMoreItem. A click inside closes the menu. Only one menu is open at a time, and on phones it is a bottom sheet. A confirm opened from an item with `useOverlay` takes the menu's place at the same anchor. |
|
|
277
|
+
| `toggle` | `{ toggle: () => void; active: boolean; attrs: { 'aria-expanded': boolean; }; }` | Replaces the three-dots button, such as with WButtonInput: call `toggle` on click, bind `attrs` to the button and `active` to its highlight — `active` stays off while the menu is open at a custom anchor. |
|
|
253
278
|
|
|
254
279
|
### WButtonDropdown
|
|
255
280
|
|
package/docs/llms.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# eco-vue-js
|
|
2
2
|
|
|
3
|
-
> Vue 3 UI kit with Tailwind v4 — components, utilities, icons and recipes. These are the docs of version 0.26.
|
|
3
|
+
> Vue 3 UI kit with Tailwind v4 — components, utilities, icons and recipes. These are the docs of version 0.26.5, the one installed next to them. Start with Getting started and Conventions; each component page lists its props, events and slots with examples.
|
|
4
4
|
|
|
5
5
|
Release notes, for what changed between versions: https://github.com/rsmple/eco-vue-js/releases. The docs site, with live demos: https://rsmple.github.io/eco-vue-js/
|
|
6
6
|
|
package/package.json
CHANGED
|
@@ -231,6 +231,15 @@
|
|
|
231
231
|
--w-ripple-rounded: --value(--radius-*, --w-radius-*, [*]);
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
+
@utility w-ripple-border {
|
|
235
|
+
--w-ripple-border: 1px;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
@utility w-ripple-border-* {
|
|
239
|
+
--w-ripple-border: calc(--value(integer) * 1px);
|
|
240
|
+
--w-ripple-border: --value([length], [*]);
|
|
241
|
+
}
|
|
242
|
+
|
|
234
243
|
@utility w-list-rounded-* {
|
|
235
244
|
--w-list-rounded: --value(--radius-*, --w-radius-*, [*]);
|
|
236
245
|
}
|
|
@@ -6,10 +6,7 @@ const pluginRipple = plugin(function ({matchUtilities, addUtilities, addBase}) {
|
|
|
6
6
|
'&::before': {
|
|
7
7
|
content: '""',
|
|
8
8
|
position: 'absolute',
|
|
9
|
-
|
|
10
|
-
left: '0',
|
|
11
|
-
height: '100%',
|
|
12
|
-
width: '100%',
|
|
9
|
+
inset: 'calc(var(--w-ripple-border, 0px) * -1)',
|
|
13
10
|
'border-radius': 'var(--w-ripple-rounded,inherit)',
|
|
14
11
|
'background-color': 'currentColor',
|
|
15
12
|
'pointer-events': 'none',
|