eco-vue-js 0.26.30 → 0.27.0
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/List/WList.vue.d.ts +14 -1
- package/dist/components/List/WList.vue.d.ts.map +1 -1
- package/dist/components/List/WList.vue_vue_type_script_setup_true_lang.js +25 -4
- package/dist/components/Nav/WNavItem.vue.d.ts.map +1 -1
- package/dist/components/Nav/WNavItem.vue_vue_type_script_setup_true_lang.js +34 -23
- package/dist/components/Nav/WNavItemExpand.vue.d.ts.map +1 -1
- package/dist/components/Nav/WNavItemExpand.vue_vue_type_script_setup_true_lang.js +23 -13
- package/dist/components/Nav/types.d.ts +10 -6
- package/dist/components/Surface/WSection.vue.d.ts.map +1 -1
- package/dist/components/Surface/WSection.vue_vue_type_script_setup_true_lang.js +35 -25
- package/dist/components/Surface/components/SectionHeading.vue.d.ts +22 -0
- package/dist/components/Surface/components/SectionHeading.vue.d.ts.map +1 -0
- package/dist/components/Surface/components/SectionHeading.vue.js +4 -0
- package/dist/components/Surface/components/SectionHeading.vue_vue_type_script_setup_true_lang.js +35 -0
- package/dist/composables/useOptionalRouter.d.ts +2 -1
- package/dist/composables/useOptionalRouter.d.ts.map +1 -1
- package/dist/composables/useOptionalRouter.js +2 -0
- package/docs/components/list.md +5 -1
- package/docs/components/nav-bar.md +8 -4
- package/docs/llms.txt +1 -1
- package/package.json +1 -1
- package/tailwind-base/css/surfaces.css +48 -5
|
@@ -7,6 +7,13 @@ import { Selection } from '../../utils/useSelected';
|
|
|
7
7
|
import { ListMode } from '../../utils/utils';
|
|
8
8
|
declare const __VLS_export: <Data extends DefaultData, QueryParams, Fields extends ListFields<Data, QueryParams>, CardColumns extends readonly GridCol[]>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
9
9
|
props: import('vue').PublicProps & __VLS_PrettifyLocal<{
|
|
10
|
+
/**
|
|
11
|
+
* Heading of the list, as a section's: the list is a section of its own on the page, and a part of a section or a
|
|
12
|
+
* modal, with a smaller heading and a line above it after other content. The `title` slot replaces it.
|
|
13
|
+
*/
|
|
14
|
+
title?: string;
|
|
15
|
+
/** A line under the heading on what the list holds. The `description` slot replaces it. */
|
|
16
|
+
description?: string;
|
|
10
17
|
/** Total number of items, when known in advance. Sizes the skeleton and the select-all. Defaults to the count the query returns. */
|
|
11
18
|
count?: number;
|
|
12
19
|
/** Field components, one per column, each with a `meta` export for its title, label, ordering field and classes. A meta with `fields` groups nested fields. */
|
|
@@ -114,7 +121,13 @@ declare const __VLS_export: <Data extends DefaultData, QueryParams, Fields exten
|
|
|
114
121
|
expose: (exposed: {}) => void;
|
|
115
122
|
attrs: any;
|
|
116
123
|
slots: {
|
|
117
|
-
/**
|
|
124
|
+
/** Heading of the list, in place of `title`, with the count returned by the query. */
|
|
125
|
+
title?: (props: {
|
|
126
|
+
count: number | undefined;
|
|
127
|
+
}) => void;
|
|
128
|
+
/** Line under the heading, in place of `description`. */
|
|
129
|
+
description?: () => void;
|
|
130
|
+
/** Content above the selection bar, under the heading, with the count returned by the query. */
|
|
118
131
|
header?: (props: {
|
|
119
132
|
count: number | undefined;
|
|
120
133
|
}) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WList.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/List/WList.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WList.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/List/WList.vue"],"names":[],"mappings":"AAqQA;AAyuBA,OAAO,KAAK,EAAC,eAAe,EAAE,aAAa,EAAE,gBAAgB,EAAE,SAAS,EAAc,kBAAkB,EAAe,cAAc,EAAE,OAAO,EAAkB,UAAU,EAAE,aAAa,EAAC,MAAM,S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AC;YAAC,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;YAAC,UAAU,EAAE,OAAO,CAAA;SAAC,KAAK,IAAI;;;YA5BpF,cAAc,SAAS,QAAQ,GAAG,IAAI;YAEtC,cAAc,SAAS,gBAAgB,CAAC,IAAI,CAAC,GAAG,IAAI;YAEpD,qBAAqB,SAAS,WAAW,GAAG,IAAI;YAEhD,cAAc,SAAS,MAAM,GAAG,SAAS,GAAG,IAAI;YAEhD,kBAAkB,SAAS,SAAS,CAAC,MAAM,CAAC,GAAG,IAAI;;EAu6BrD,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"}
|
|
@@ -2,6 +2,7 @@ import WEmptyComponent_default from "../EmptyComponent/WEmptyComponent.vue.js";
|
|
|
2
2
|
import WInfiniteList_default from "../InfiniteList/WInfiniteList.vue.js";
|
|
3
3
|
import { wScrollingElement } from "../InfiniteList/models/injection.js";
|
|
4
4
|
import { wIsModal } from "../Modal/models/injection.js";
|
|
5
|
+
import SectionHeading_default from "../Surface/components/SectionHeading.vue.js";
|
|
5
6
|
import { wSectionNested } from "../Surface/models/injection.js";
|
|
6
7
|
import { useIsMobile } from "../../utils/mobile.js";
|
|
7
8
|
import { encodeOrdering, parseOrdering } from "../../utils/order.js";
|
|
@@ -18,7 +19,7 @@ import { isField } from "./models/utils.js";
|
|
|
18
19
|
import "./types.js";
|
|
19
20
|
import { filterFields, forEachField, getFieldStylesSticky, getFieldTracks, sortFieldsDeep, useListConfig } from "./use/useListConfig.js";
|
|
20
21
|
import { usePageTableMark, useStickyPath } from "./use/useStickyPath.js";
|
|
21
|
-
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createVNode, defineComponent, guardReactiveProps, inject, normalizeClass, normalizeProps, normalizeStyle, onBeforeUnmount, onMounted, openBlock, provide, ref, renderList, renderSlot, resolveDynamicComponent, toRef, unref, useTemplateRef, watch, watchEffect, withCtx } from "vue";
|
|
22
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createVNode, defineComponent, guardReactiveProps, inject, normalizeClass, normalizeProps, normalizeStyle, onBeforeUnmount, onMounted, openBlock, provide, ref, renderList, renderSlot, resolveDynamicComponent, toRef, unref, useSlots, useTemplateRef, watch, watchEffect, withCtx } from "vue";
|
|
22
23
|
// src/components/List/WList.vue?vue&type=script&setup=true&lang.ts
|
|
23
24
|
var _hoisted_1 = { class: "w-list-page-strip" };
|
|
24
25
|
var _hoisted_2 = { class: "w-list-page-strip-track" };
|
|
@@ -26,6 +27,8 @@ var WList_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
|
|
|
26
27
|
inheritAttrs: false,
|
|
27
28
|
__name: "WList",
|
|
28
29
|
props: {
|
|
30
|
+
title: { default: void 0 },
|
|
31
|
+
description: { default: void 0 },
|
|
29
32
|
count: { default: void 0 },
|
|
30
33
|
fields: {},
|
|
31
34
|
expansion: {
|
|
@@ -114,6 +117,9 @@ var WList_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
|
|
|
114
117
|
const isPage = !isModal && inject(wScrollingElement, null) === null && !isSectionNested;
|
|
115
118
|
const frame = isPage ? inject(wListPageFrame, null) : null;
|
|
116
119
|
const isPageOwn = isPage && !frame;
|
|
120
|
+
const slots = useSlots();
|
|
121
|
+
const hasHeading = computed(() => !!(props.title || props.description || slots.title || slots.description));
|
|
122
|
+
const isHeadingNested = !isPageOwn;
|
|
117
123
|
provide(wListPageFrame, null);
|
|
118
124
|
provide(wListPageFrameHeader, frame ? {
|
|
119
125
|
target: computed(() => frame.shown.value ? frame.target.value : null),
|
|
@@ -290,7 +296,8 @@ var WList_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
|
|
|
290
296
|
class: normalizeClass([listClasses.value, {
|
|
291
297
|
"w-list-page": unref(isPageOwn),
|
|
292
298
|
"w-list-page-table": unref(isPageOwn) && !unref(isGrid),
|
|
293
|
-
"w-list-page-repaint": unref(isPageOwn) && isRepaint.value
|
|
299
|
+
"w-list-page-repaint": unref(isPageOwn) && isRepaint.value,
|
|
300
|
+
"w-list-section": hasHeading.value
|
|
294
301
|
}])
|
|
295
302
|
}, [(openBlock(), createBlock(resolveDynamicComponent(unref(isPageOwn) ? ListPageSurface_default : WEmptyComponent_default), null, {
|
|
296
303
|
default: withCtx(() => [createVNode(WInfiniteList_default, {
|
|
@@ -365,9 +372,23 @@ var WList_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
|
|
|
365
372
|
"onSave:width": unref(save),
|
|
366
373
|
"onClick:reset": resetConfig
|
|
367
374
|
}, createSlots({ _: 2 }, [
|
|
368
|
-
_ctx.$slots.header ? {
|
|
375
|
+
_ctx.$slots.header || hasHeading.value ? {
|
|
369
376
|
name: "header",
|
|
370
|
-
fn: withCtx((scope) => [
|
|
377
|
+
fn: withCtx((scope) => [hasHeading.value ? (openBlock(), createBlock(SectionHeading_default, {
|
|
378
|
+
key: 0,
|
|
379
|
+
title: __props.title,
|
|
380
|
+
description: __props.description,
|
|
381
|
+
nested: isHeadingNested,
|
|
382
|
+
class: "w-list-heading pb-2"
|
|
383
|
+
}, createSlots({ _: 2 }, [_ctx.$slots.title ? {
|
|
384
|
+
name: "title",
|
|
385
|
+
fn: withCtx(() => [renderSlot(_ctx.$slots, "title", normalizeProps(guardReactiveProps(scope)))]),
|
|
386
|
+
key: "0"
|
|
387
|
+
} : void 0, _ctx.$slots.description ? {
|
|
388
|
+
name: "description",
|
|
389
|
+
fn: withCtx(() => [renderSlot(_ctx.$slots, "description")]),
|
|
390
|
+
key: "1"
|
|
391
|
+
} : void 0]), 1032, ["title", "description"])) : createCommentVNode("", true), renderSlot(_ctx.$slots, "header", normalizeProps(guardReactiveProps(scope)))]),
|
|
371
392
|
key: "0"
|
|
372
393
|
} : void 0,
|
|
373
394
|
_ctx.$slots.filter ? {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WNavItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Nav/WNavItem.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WNavItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Nav/WNavItem.vue"],"names":[],"mappings":"AAuGA;AAqKA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,SAAS,CAAA;AAqBzC,KAAK,WAAW,GAAG;IACjB,qFAAqF;IACrF,IAAI,CAAC,EAAE,MAAM,IAAI,CAAA;IACjB,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,IAAI,CAAA;CACnB,CAAC;AAySF,QAAA,MAAM,UAAU;;;qPAGd,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"}
|
|
@@ -5,29 +5,29 @@ import WTextOverflow_default from "../TextOverflow/WTextOverflow.vue.js";
|
|
|
5
5
|
import { useOptionalRoute, useOptionalRouter } from "../../composables/useOptionalRouter.js";
|
|
6
6
|
import { getRouteTitle, getRouteTitleShort } from "../../utils/useRouteTitle.js";
|
|
7
7
|
import { isEqualObj, numberCompactFormatter } from "../../utils/utils.js";
|
|
8
|
-
import { Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, renderSlot, resolveDynamicComponent, toDisplayString, unref, useTemplateRef, withCtx } from "vue";
|
|
8
|
+
import { Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, renderSlot, resolveDynamicComponent, toDisplayString, unref, useTemplateRef, withCtx } from "vue";
|
|
9
9
|
// src/components/Nav/WNavItem.vue?vue&type=script&setup=true&lang.ts
|
|
10
10
|
var _hoisted_1 = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "w-nav-item-indicator tone-primary bg-tone-fill absolute left-0 top-0 h-full w-1"
|
|
13
13
|
};
|
|
14
14
|
var _hoisted_2 = {
|
|
15
|
-
key: 0,
|
|
16
|
-
class: "absolute left-3 top-0 flex h-full items-center"
|
|
17
|
-
};
|
|
18
|
-
var _hoisted_3 = {
|
|
19
15
|
ref: "anchor",
|
|
20
16
|
"aria-hidden": "true",
|
|
21
17
|
class: "w-nav-item-anchor pointer-events-none absolute inset-x-0"
|
|
22
18
|
};
|
|
23
|
-
var
|
|
24
|
-
var
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
19
|
+
var _hoisted_3 = { class: "[overflow:inherit]" };
|
|
20
|
+
var _hoisted_4 = {
|
|
21
|
+
key: 0,
|
|
22
|
+
class: "flex items-center"
|
|
23
|
+
};
|
|
24
|
+
var _hoisted_5 = { class: "last-not:pr-1 min-w-0 font-normal" };
|
|
25
|
+
var _hoisted_6 = { class: "relative inline-flex max-w-full items-center whitespace-nowrap tracking-wide" };
|
|
26
|
+
var _hoisted_7 = {
|
|
28
27
|
key: 0,
|
|
29
28
|
class: "shrink-0"
|
|
30
29
|
};
|
|
30
|
+
var INDENT_STEP = 2;
|
|
31
31
|
var WNavItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
32
32
|
__name: "WNavItem",
|
|
33
33
|
props: {
|
|
@@ -38,14 +38,16 @@ var WNavItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
38
38
|
skeleton: { type: Boolean },
|
|
39
39
|
hasActive: { type: Boolean },
|
|
40
40
|
expand: { type: Boolean },
|
|
41
|
-
indent: {
|
|
41
|
+
indent: {},
|
|
42
42
|
queryFields: {},
|
|
43
|
+
paramFields: {},
|
|
43
44
|
hovered: { type: Boolean },
|
|
44
45
|
even: { type: Boolean },
|
|
45
46
|
to: {}
|
|
46
47
|
},
|
|
47
48
|
setup(__props, { expose: __expose }) {
|
|
48
49
|
const EXCLUDE_QUERY_FIELDS = ["ordering", "page"];
|
|
50
|
+
const getParamValue = (value) => [value ?? ""].flat().join("/");
|
|
49
51
|
const props = __props;
|
|
50
52
|
const route = useOptionalRoute();
|
|
51
53
|
const router = useOptionalRouter();
|
|
@@ -53,11 +55,13 @@ var WNavItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
53
55
|
const isActive = computed(() => {
|
|
54
56
|
if (!route) return false;
|
|
55
57
|
if (routeTo.value?.name !== route?.name) return false;
|
|
58
|
+
if (props.paramFields?.some((field) => getParamValue(route.params[field]) !== getParamValue(routeTo.value.params[field]))) return false;
|
|
56
59
|
return isEqualObj(route.query, routeTo.value.query ?? {}, EXCLUDE_QUERY_FIELDS, props.queryFields);
|
|
57
60
|
});
|
|
58
61
|
const routeTitle = computed(() => getRouteTitle(routeTo.value?.matched ?? []));
|
|
59
62
|
const iconLocal = computed(() => props.icon ?? routeTo.value?.meta?.icon);
|
|
60
63
|
const titleLocal = computed(() => props.title ?? (routeTitle.value ? getRouteTitleShort(routeTitle.value) : void 0) ?? (typeof routeTo.value?.meta?.titleShort === "string" ? routeTo.value.meta.titleShort : typeof routeTo.value?.meta?.title === "string" ? routeTo.value.meta.title : ""));
|
|
64
|
+
const getIndentLength = (base) => `calc(var(--spacing) * ${base + INDENT_STEP * (props.indent ?? 0)})`;
|
|
61
65
|
const isTextColor = computed(() => props.hasActive ? !props.indent : isActive.value);
|
|
62
66
|
__expose({
|
|
63
67
|
isActive,
|
|
@@ -89,25 +93,32 @@ var WNavItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
89
93
|
"enter-from-class": "opacity-0",
|
|
90
94
|
"leave-to-class": "opacity-0"
|
|
91
95
|
}, {
|
|
92
|
-
default: withCtx(() => [__props.indent && !__props.expand && isActive.value ? (openBlock(), createElementBlock("div",
|
|
96
|
+
default: withCtx(() => [__props.indent && !__props.expand && isActive.value ? (openBlock(), createElementBlock("div", {
|
|
97
|
+
key: 0,
|
|
98
|
+
class: "absolute top-0 flex h-full items-center",
|
|
99
|
+
style: normalizeStyle({ left: getIndentLength(1) })
|
|
100
|
+
}, [..._cache[0] || (_cache[0] = [createElementVNode("div", { class: "square-1.5 rounded-full bg-(--w-nav-item-dot-color)" }, null, -1)])], 4)) : createCommentVNode("", true)]),
|
|
93
101
|
_: 1
|
|
94
102
|
}),
|
|
95
|
-
createElementVNode("span",
|
|
96
|
-
createElementVNode("div",
|
|
97
|
-
"
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
103
|
+
createElementVNode("span", _hoisted_2, null, 512),
|
|
104
|
+
createElementVNode("div", _hoisted_3, [createElementVNode("div", {
|
|
105
|
+
class: normalizeClass(["w-ripple w-ripple-hover relative grid items-center rounded-(--w-nav-item-rounded,var(--radius-lg)) pr-2", {
|
|
106
|
+
"before:opacity-10": __props.hovered,
|
|
107
|
+
"grid-cols-[1.5rem_1fr_auto]": iconLocal.value || _ctx.$slots.icon,
|
|
108
|
+
"grid-cols-[1fr_auto]": !iconLocal.value && !_ctx.$slots.icon
|
|
109
|
+
}]),
|
|
110
|
+
style: normalizeStyle({ paddingLeft: getIndentLength(2) })
|
|
111
|
+
}, [
|
|
112
|
+
iconLocal.value || _ctx.$slots.icon ? (openBlock(), createElementBlock("div", _hoisted_4, [iconLocal.value ? (openBlock(), createBlock(resolveDynamicComponent(iconLocal.value), {
|
|
102
113
|
key: 0,
|
|
103
114
|
class: "square-[1.25em]"
|
|
104
|
-
})) : renderSlot(_ctx.$slots, "icon", {}, void 0, void 0, 1)]),
|
|
105
|
-
createElementVNode("div",
|
|
115
|
+
})) : renderSlot(_ctx.$slots, "icon", {}, void 0, void 0, 1)])) : createCommentVNode("", true),
|
|
116
|
+
createElementVNode("div", _hoisted_5, [createElementVNode("span", _hoisted_6, [
|
|
106
117
|
createVNode(WTextOverflow_default, { class: "min-w-0 leading-loose" }, {
|
|
107
118
|
default: withCtx(() => [createTextVNode(toDisplayString(titleLocal.value), 1)]),
|
|
108
119
|
_: 1
|
|
109
120
|
}),
|
|
110
|
-
!__props.skeleton ? (openBlock(), createElementBlock("span",
|
|
121
|
+
!__props.skeleton ? (openBlock(), createElementBlock("span", _hoisted_7, toDisplayString(typeof __props.count === "number" ? `\u00A0(${unref(numberCompactFormatter).format(__props.count)})` : ""), 1)) : (openBlock(), createBlock(WSkeleton_default, {
|
|
111
122
|
key: 1,
|
|
112
123
|
class: "w-skeleton-w-10 ml-1 inline-flex shrink-0"
|
|
113
124
|
})),
|
|
@@ -119,7 +130,7 @@ var WNavItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
119
130
|
}, null, 8, ["count"])) : createCommentVNode("", true)
|
|
120
131
|
])]),
|
|
121
132
|
renderSlot(_ctx.$slots, "right")
|
|
122
|
-
],
|
|
133
|
+
], 6)])
|
|
123
134
|
]),
|
|
124
135
|
_: 3
|
|
125
136
|
}, 8, ["to", "class"]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WNavItemExpand.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Nav/WNavItemExpand.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WNavItemExpand.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Nav/WNavItemExpand.vue"],"names":[],"mappings":"AAwGA;AAkLA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,SAAS,CAAA;AAG/C,OAAO,EAAC,KAAK,KAAK,EAA2D,MAAM,KAAK,CAAA;AAwDxF,KAAK,WAAW,GAAG;IACjB,4HAA4H;IAC5H,OAAO,CAAC,EAAE,MAAM,KAAK,EAAE,CAAA;IACvB,oDAAoD;IACpD,IAAI,CAAC,EAAE,MAAM,KAAK,EAAE,CAAA;CACrB,CAAC;AAwVF,QAAA,MAAM,UAAU;;;2PAGd,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"}
|
|
@@ -8,7 +8,7 @@ import WNavItem_default from "./WNavItem.vue.js";
|
|
|
8
8
|
import WNavItemTransition_default from "./WNavItemTransition.vue.js";
|
|
9
9
|
import { useNavGroupDropdown } from "./use/useNavGroupDropdown.js";
|
|
10
10
|
import WClickOutside_default from "../ClickOutside/WClickOutside.vue.js";
|
|
11
|
-
import { Fragment, computed, createBlock, createElementBlock, createElementVNode, createVNode, defineComponent, mergeProps, nextTick, normalizeClass, normalizeProps, openBlock, ref, renderList, renderSlot, resolveDynamicComponent, unref, useSlots, useTemplateRef, watch, withCtx } from "vue";
|
|
11
|
+
import { Fragment, computed, createBlock, createElementBlock, createElementVNode, createSlots, createVNode, defineComponent, mergeProps, nextTick, normalizeClass, normalizeProps, openBlock, ref, renderList, renderSlot, resolveDynamicComponent, unref, useSlots, useTemplateRef, watch, withCtx } from "vue";
|
|
12
12
|
// src/components/Nav/WNavItemExpand.vue?vue&type=script&setup=true&lang.ts
|
|
13
13
|
var _hoisted_1 = { key: 1 };
|
|
14
14
|
var _hoisted_2 = { class: "w-nav-bar w-nav-bar-dropdown w-nav-bar-width overflow-y-auto overscroll-contain border border-solid border-line-raised text-start font-normal shadow" };
|
|
@@ -20,8 +20,9 @@ var WNavItemExpand_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
20
20
|
count: {},
|
|
21
21
|
counter: {},
|
|
22
22
|
skeleton: { type: Boolean },
|
|
23
|
-
indent: {
|
|
23
|
+
indent: {},
|
|
24
24
|
queryFields: {},
|
|
25
|
+
paramFields: {},
|
|
25
26
|
even: { type: Boolean },
|
|
26
27
|
to: {}
|
|
27
28
|
},
|
|
@@ -33,14 +34,17 @@ var WNavItemExpand_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
33
34
|
const innerRef = useTemplateRef("inner");
|
|
34
35
|
const { isOpen: isDropdownOpen, show: showDropdown, hide: hideDropdown, close: closeDropdown } = useNavGroupDropdown();
|
|
35
36
|
const hasActive = ref(false);
|
|
36
|
-
const isActive = computed(() => hasActive.value || (componentRef.value?.isActive ?? false));
|
|
37
37
|
const hasInnerActive = computed(() => innerRef.value?.some((item) => item.isActive) ?? false);
|
|
38
|
+
const isActive = computed(() => hasInnerActive.value || hasActive.value || (componentRef.value?.isActive ?? false));
|
|
38
39
|
const isVisible = computed(() => isDropdownOpen.value || isActive.value);
|
|
39
40
|
const updateHasActive = async () => {
|
|
40
41
|
await nextTick();
|
|
41
42
|
hasActive.value = innerRef.value?.some((item) => item.isActive) ?? false;
|
|
42
43
|
};
|
|
43
|
-
watch(hasInnerActive,
|
|
44
|
+
watch(hasInnerActive, (value) => {
|
|
45
|
+
hasActive.value = value;
|
|
46
|
+
updateHasActive();
|
|
47
|
+
}, { immediate: true });
|
|
44
48
|
watch(isActive, updateHasActive, { immediate: true });
|
|
45
49
|
watch(slotsDefault, updateHasActive, { immediate: true });
|
|
46
50
|
watch(hasActive, closeDropdown, { immediate: true });
|
|
@@ -49,10 +53,11 @@ var WNavItemExpand_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
49
53
|
isVisible
|
|
50
54
|
});
|
|
51
55
|
return (_ctx, _cache) => {
|
|
52
|
-
return !slotsDefault.value.length ? (openBlock(), createBlock(WNavItem_default, normalizeProps(mergeProps({ key: 0 }, _ctx.$props)), {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
+
return !slotsDefault.value.length ? (openBlock(), createBlock(WNavItem_default, normalizeProps(mergeProps({ key: 0 }, _ctx.$props)), createSlots({ _: 2 }, [_ctx.$slots.icon ? {
|
|
57
|
+
name: "icon",
|
|
58
|
+
fn: withCtx(() => [renderSlot(_ctx.$slots, "icon")]),
|
|
59
|
+
key: "0"
|
|
60
|
+
} : void 0]), 1040)) : (openBlock(), createElementBlock("div", _hoisted_1, [createVNode(WDropdownMenu_default, {
|
|
56
61
|
"is-open": unref(isDropdownOpen) && !isActive.value,
|
|
57
62
|
"horizontal-align": unref(HorizontalAlign).RIGHT_OUTER,
|
|
58
63
|
"parent-element": componentRef.value?.anchorRef ?? void 0,
|
|
@@ -74,12 +79,16 @@ var WNavItemExpand_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
74
79
|
even: __props.even,
|
|
75
80
|
expand: !__props.to,
|
|
76
81
|
"query-fields": __props.queryFields,
|
|
82
|
+
"param-fields": __props.paramFields,
|
|
77
83
|
hovered: unref(isDropdownOpen) && !hasActive.value
|
|
78
|
-
}), {
|
|
79
|
-
icon: withCtx(() => [renderSlot(_ctx.$slots, "icon")]),
|
|
84
|
+
}), createSlots({
|
|
80
85
|
right: withCtx(() => [createVNode(unref(IconArrow_default), { class: normalizeClass(["square-3 transition-transform", { "-rotate-90": !hasActive.value && !__props.even }]) }, null, 8, ["class"])]),
|
|
81
|
-
_:
|
|
82
|
-
},
|
|
86
|
+
_: 2
|
|
87
|
+
}, [_ctx.$slots.icon ? {
|
|
88
|
+
name: "icon",
|
|
89
|
+
fn: withCtx(() => [renderSlot(_ctx.$slots, "icon")]),
|
|
90
|
+
key: "0"
|
|
91
|
+
} : void 0]), 1040, [
|
|
83
92
|
"to",
|
|
84
93
|
"title",
|
|
85
94
|
"icon",
|
|
@@ -91,6 +100,7 @@ var WNavItemExpand_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
91
100
|
"even",
|
|
92
101
|
"expand",
|
|
93
102
|
"query-fields",
|
|
103
|
+
"param-fields",
|
|
94
104
|
"hovered"
|
|
95
105
|
])]),
|
|
96
106
|
content: withCtx(() => [createVNode(WClickOutside_default, {
|
|
@@ -128,7 +138,7 @@ var WNavItemExpand_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
128
138
|
ref_for: true,
|
|
129
139
|
ref: "inner",
|
|
130
140
|
even: __props.even,
|
|
131
|
-
indent:
|
|
141
|
+
indent: __props.even ? void 0 : (__props.indent ?? 0) + 1
|
|
132
142
|
}, null, 8, ["even", "indent"]);
|
|
133
143
|
}), 128))]),
|
|
134
144
|
_: 1
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LinkProps } from '../../types/types';
|
|
2
2
|
export interface NavItemProps extends LinkProps {
|
|
3
|
-
/** Icon before the title. Defaults to the route's `meta.icon`. */
|
|
3
|
+
/** Icon before the title. Defaults to the route's `meta.icon`. Without an icon the title takes its place. */
|
|
4
4
|
icon?: SVGComponent
|
|
5
5
|
/** Title of the item. Defaults to the title the route's page registers with `useRouteTitle` while it is open, then the route's `meta.titleShort`, then `meta.title`. */
|
|
6
6
|
title?: string
|
|
@@ -14,10 +14,12 @@ export interface NavItemProps extends LinkProps {
|
|
|
14
14
|
hasActive?: boolean
|
|
15
15
|
/** Marks the item as the toggle of a group without a route of its own. Set by WNavItemExpand. */
|
|
16
16
|
expand?: boolean
|
|
17
|
-
/**
|
|
18
|
-
indent?:
|
|
17
|
+
/** How many groups the item is nested in, which sets its indent. Set by WNavItemExpand. */
|
|
18
|
+
indent?: number
|
|
19
19
|
/** Query params that must match the current route's for the item to be active, besides its route name. Other params, such as filters, are ignored. */
|
|
20
20
|
queryFields?: string[]
|
|
21
|
+
/** Route params that must match the current route's for the item to be active, besides its route name. Other route params are ignored. */
|
|
22
|
+
paramFields?: string[]
|
|
21
23
|
/** Highlights the item as hovered. Set by WNavItemExpand while its menu is open. */
|
|
22
24
|
hovered?: boolean
|
|
23
25
|
/** Lays the item out without the indent of a group. Set by WNavItemExpand. */
|
|
@@ -25,7 +27,7 @@ export interface NavItemProps extends LinkProps {
|
|
|
25
27
|
}
|
|
26
28
|
|
|
27
29
|
export interface NavItemExpandProps extends Partial<LinkProps> {
|
|
28
|
-
/** Icon before the title. */
|
|
30
|
+
/** Icon before the title. Without an icon the title takes its place. */
|
|
29
31
|
icon?: SVGComponent
|
|
30
32
|
/** Title of the group. */
|
|
31
33
|
title: string
|
|
@@ -35,10 +37,12 @@ export interface NavItemExpandProps extends Partial<LinkProps> {
|
|
|
35
37
|
counter?: number
|
|
36
38
|
/** Shows a placeholder for `count` and hides `counter`, while they load. */
|
|
37
39
|
skeleton?: boolean
|
|
38
|
-
/**
|
|
39
|
-
indent?:
|
|
40
|
+
/** How many groups the group is nested in, which sets its indent. Set by a parent WNavItemExpand. */
|
|
41
|
+
indent?: number
|
|
40
42
|
/** Query params that must match the current route's for the group's own route to be active. */
|
|
41
43
|
queryFields?: string[]
|
|
44
|
+
/** Route params that must match the current route's for the group's own route to be active. */
|
|
45
|
+
paramFields?: string[]
|
|
42
46
|
/** Keeps the items always shown, without indent and without the menu on hover, e.g. for a nav inside a page. */
|
|
43
47
|
even?: boolean
|
|
44
48
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Surface/WSection.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Surface/WSection.vue"],"names":[],"mappings":"AA0DA;AAmIA,OAAO,EAAC,YAAY,EAAC,MAAM,sBAAsB,CAAA;AAMjD,KAAK,WAAW,GAAG;IACf,4DAA4D;IAC5D,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,6DAA6D;IAC7D,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,yBAAyB;IACzB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ;;;OAGG;IACH,YAAY,CAAC,EAAE,YAAY,CAAA;IAC3B;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAC;AAYJ,KAAK,WAAW,GAAG;IACjB,8BAA8B;IAC9B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,mDAAmD;IACnD,KAAK,CAAC,EAAE,MAAM,IAAI,CAAA;IAClB,yDAAyD;IACzD,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB,kCAAkC;IAClC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,IAAI,CAAA;IACjB,kGAAkG;IAClG,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;CACpB,CAAC;AA2IF,QAAA,MAAM,UAAU;WA5LJ,MAAM;iBAOA,MAAM;kBAOL,YAAY;SALrB,MAAM;aAPF,MAAM;6EA6LlB,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"}
|
|
@@ -1,27 +1,15 @@
|
|
|
1
1
|
import { wIsModal } from "../Modal/models/injection.js";
|
|
2
2
|
import { SemanticType } from "../../utils/SemanticType.js";
|
|
3
|
+
import SectionHeading_default from "./components/SectionHeading.vue.js";
|
|
3
4
|
import { wSectionNested } from "./models/injection.js";
|
|
4
5
|
import { sectionToneMap } from "./models/utils.js";
|
|
5
|
-
import { createBlock, createCommentVNode, createElementBlock,
|
|
6
|
+
import { createBlock, createCommentVNode, createElementBlock, createSlots, defineComponent, inject, normalizeClass, openBlock, provide, renderSlot, resolveDynamicComponent, unref, withCtx } from "vue";
|
|
6
7
|
// src/components/Surface/WSection.vue?vue&type=script&setup=true&lang.ts
|
|
7
8
|
var _hoisted_1 = {
|
|
8
|
-
key: 0,
|
|
9
|
-
class: "flex flex-wrap items-center gap-x-4 gap-y-2"
|
|
10
|
-
};
|
|
11
|
-
var _hoisted_2 = { class: "mr-auto grid gap-1" };
|
|
12
|
-
var _hoisted_3 = {
|
|
13
|
-
key: 0,
|
|
14
|
-
class: "text-description text-xs font-semibold tracking-wider uppercase"
|
|
15
|
-
};
|
|
16
|
-
var _hoisted_4 = {
|
|
17
|
-
key: 1,
|
|
18
|
-
class: "text-description max-w-prose text-sm text-pretty"
|
|
19
|
-
};
|
|
20
|
-
var _hoisted_5 = {
|
|
21
9
|
key: 1,
|
|
22
10
|
class: "surface-section-body grid content-start gap-4"
|
|
23
11
|
};
|
|
24
|
-
var
|
|
12
|
+
var _hoisted_2 = {
|
|
25
13
|
key: 3,
|
|
26
14
|
class: "surface-section-footer flex flex-wrap items-center gap-2"
|
|
27
15
|
};
|
|
@@ -41,17 +29,39 @@ var WSection_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
41
29
|
return (_ctx, _cache) => {
|
|
42
30
|
return openBlock(), createBlock(resolveDynamicComponent(__props.tag), { class: normalizeClass(["surface-section gap-4", [__props.scroll ? "surface-section-scroll flex flex-col" : "grid", __props.semanticType && __props.semanticType !== unref(SemanticType).SECONDARY ? ["surface-section-tone", unref(sectionToneMap)[__props.semanticType]] : void 0]]) }, {
|
|
43
31
|
default: withCtx(() => [
|
|
44
|
-
__props.title || __props.eyebrow || __props.description || _ctx.$slots.title || _ctx.$slots.description || _ctx.$slots.actions ? (openBlock(),
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
__props.
|
|
51
|
-
|
|
32
|
+
__props.title || __props.eyebrow || __props.description || _ctx.$slots.title || _ctx.$slots.description || _ctx.$slots.actions ? (openBlock(), createBlock(SectionHeading_default, {
|
|
33
|
+
key: 0,
|
|
34
|
+
title: __props.title,
|
|
35
|
+
eyebrow: __props.eyebrow,
|
|
36
|
+
description: __props.description,
|
|
37
|
+
nested: unref(isNested),
|
|
38
|
+
toned: !!__props.semanticType && __props.semanticType !== unref(SemanticType).SECONDARY
|
|
39
|
+
}, createSlots({ _: 2 }, [
|
|
40
|
+
_ctx.$slots.title ? {
|
|
41
|
+
name: "title",
|
|
42
|
+
fn: withCtx(() => [renderSlot(_ctx.$slots, "title")]),
|
|
43
|
+
key: "0"
|
|
44
|
+
} : void 0,
|
|
45
|
+
_ctx.$slots.description ? {
|
|
46
|
+
name: "description",
|
|
47
|
+
fn: withCtx(() => [renderSlot(_ctx.$slots, "description")]),
|
|
48
|
+
key: "1"
|
|
49
|
+
} : void 0,
|
|
50
|
+
_ctx.$slots.actions ? {
|
|
51
|
+
name: "actions",
|
|
52
|
+
fn: withCtx(() => [renderSlot(_ctx.$slots, "actions")]),
|
|
53
|
+
key: "2"
|
|
54
|
+
} : void 0
|
|
55
|
+
]), 1032, [
|
|
56
|
+
"title",
|
|
57
|
+
"eyebrow",
|
|
58
|
+
"description",
|
|
59
|
+
"nested",
|
|
60
|
+
"toned"
|
|
61
|
+
])) : createCommentVNode("", true),
|
|
52
62
|
renderSlot(_ctx.$slots, "head"),
|
|
53
|
-
__props.scroll ? (openBlock(), createElementBlock("div",
|
|
54
|
-
_ctx.$slots.footer ? (openBlock(), createElementBlock("div",
|
|
63
|
+
__props.scroll ? (openBlock(), createElementBlock("div", _hoisted_1, [renderSlot(_ctx.$slots, "default")])) : renderSlot(_ctx.$slots, "default", {}, void 0, void 0, 2),
|
|
64
|
+
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_2, [renderSlot(_ctx.$slots, "footer")])) : createCommentVNode("", true)
|
|
55
65
|
]),
|
|
56
66
|
_: 3
|
|
57
67
|
}, 8, ["class"]);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
title?: string;
|
|
3
|
+
eyebrow?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
nested: boolean;
|
|
6
|
+
toned?: boolean;
|
|
7
|
+
};
|
|
8
|
+
type __VLS_Slots = {
|
|
9
|
+
title?: () => void;
|
|
10
|
+
description?: () => void;
|
|
11
|
+
actions?: () => void;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=SectionHeading.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SectionHeading.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/Surface/components/SectionHeading.vue"],"names":[],"mappings":"AAiCA;AAmDA,KAAK,WAAW,GAAG;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,EAAE,OAAO,CAAA;IACf,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAC;AAGF,KAAK,WAAW,GAAG;IACjB,KAAK,CAAC,EAAE,MAAM,IAAI,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB,CAAC;AA6EF,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"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import SectionHeading_vue_vue_type_script_setup_true_lang_default from "./SectionHeading.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
+
// src/components/Surface/components/SectionHeading.vue
|
|
3
|
+
var SectionHeading_default = SectionHeading_vue_vue_type_script_setup_true_lang_default;
|
|
4
|
+
export { SectionHeading_default as default };
|
package/dist/components/Surface/components/SectionHeading.vue_vue_type_script_setup_true_lang.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, normalizeClass, openBlock, renderSlot, resolveDynamicComponent, toDisplayString, withCtx } from "vue";
|
|
2
|
+
// src/components/Surface/components/SectionHeading.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
+
var _hoisted_1 = { class: "flex flex-wrap items-center gap-x-4 gap-y-2" };
|
|
4
|
+
var _hoisted_2 = { class: "mr-auto grid gap-1" };
|
|
5
|
+
var _hoisted_3 = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "text-description text-xs font-semibold tracking-wider uppercase"
|
|
8
|
+
};
|
|
9
|
+
var _hoisted_4 = {
|
|
10
|
+
key: 1,
|
|
11
|
+
class: "text-description max-w-prose text-sm text-pretty"
|
|
12
|
+
};
|
|
13
|
+
var SectionHeading_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
14
|
+
__name: "SectionHeading",
|
|
15
|
+
props: {
|
|
16
|
+
title: {},
|
|
17
|
+
eyebrow: {},
|
|
18
|
+
description: {},
|
|
19
|
+
nested: { type: Boolean },
|
|
20
|
+
toned: { type: Boolean }
|
|
21
|
+
},
|
|
22
|
+
setup(__props) {
|
|
23
|
+
return (_ctx, _cache) => {
|
|
24
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("div", _hoisted_2, [
|
|
25
|
+
__props.eyebrow ? (openBlock(), createElementBlock("div", _hoisted_3, toDisplayString(__props.eyebrow), 1)) : createCommentVNode("", true),
|
|
26
|
+
(openBlock(), createBlock(resolveDynamicComponent(__props.nested ? "h3" : "h2"), { class: normalizeClass(["font-semibold", [__props.nested ? "text-base" : "text-xl", __props.toned ? "text-tone" : "text-accent"]]) }, {
|
|
27
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "title", {}, () => [createTextVNode(toDisplayString(__props.title), 1)])]),
|
|
28
|
+
_: 3
|
|
29
|
+
}, 8, ["class"])),
|
|
30
|
+
__props.description || _ctx.$slots.description ? (openBlock(), createElementBlock("p", _hoisted_4, [renderSlot(_ctx.$slots, "description", {}, () => [createTextVNode(toDisplayString(__props.description), 1)])])) : createCommentVNode("", true)
|
|
31
|
+
]), renderSlot(_ctx.$slots, "actions")]);
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
export { SectionHeading_vue_vue_type_script_setup_true_lang_default as default };
|
|
@@ -3,7 +3,7 @@ import { ComputedRef } from 'vue';
|
|
|
3
3
|
type Router = ReturnType<typeof useRouter>;
|
|
4
4
|
export type FallbackRouter = {
|
|
5
5
|
push: Router['push'];
|
|
6
|
-
resolve(to: RouteLocationRaw): Pick<ReturnType<Router['resolve']>, 'name' | 'path' | 'query' | 'href' | 'matched'> & {
|
|
6
|
+
resolve(to: RouteLocationRaw): Pick<ReturnType<Router['resolve']>, 'name' | 'path' | 'query' | 'href' | 'matched' | 'params'> & {
|
|
7
7
|
meta: Record<string, string> | undefined;
|
|
8
8
|
name: string;
|
|
9
9
|
};
|
|
@@ -16,6 +16,7 @@ export type FallbackRoute = {
|
|
|
16
16
|
name: string;
|
|
17
17
|
path: Route['path'];
|
|
18
18
|
query: LocationQuery;
|
|
19
|
+
params: Route['params'];
|
|
19
20
|
hash: Route['hash'];
|
|
20
21
|
fullPath: Route['fullPath'];
|
|
21
22
|
matched: Route['matched'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOptionalRouter.d.ts","sourceRoot":"","sources":["../../../src/composables/useOptionalRouter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,QAAQ,EAAE,SAAS,EAAC,MAAM,YAAY,CAAA;AAE3G,OAAO,EAAW,KAAK,WAAW,EAAoC,MAAM,KAAK,CAAA;AAkBjF,KAAK,MAAM,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAA;AAE1C,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,CAAA;IACpB,OAAO,CAAC,EAAE,EAAE,gBAAgB,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC,GAAG;QAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"useOptionalRouter.d.ts","sourceRoot":"","sources":["../../../src/composables/useOptionalRouter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,aAAa,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,QAAQ,EAAE,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AAC,qBAAqB,GAAG,SAAS,CAAC,GAAG,SAkB3F,CAAA"}
|
|
@@ -19,6 +19,7 @@ var fallbackRouter = {
|
|
|
19
19
|
href: typeof to === "string" ? to : "href" in to && typeof to.href === "string" ? to.href : to.path ?? "",
|
|
20
20
|
path: typeof to === "string" ? to.split(/[?#]/)[0] : "path" in to ? to.path ?? "" : "",
|
|
21
21
|
query: typeof to === "string" ? {} : to.query ?? {},
|
|
22
|
+
params: {},
|
|
22
23
|
meta: void 0
|
|
23
24
|
};
|
|
24
25
|
return {
|
|
@@ -63,6 +64,7 @@ var useOptionalRoute = () => {
|
|
|
63
64
|
const url = new URL(window.location.href);
|
|
64
65
|
return {
|
|
65
66
|
query: Object.fromEntries(url.searchParams.entries()),
|
|
67
|
+
params: {},
|
|
66
68
|
name: url.pathname,
|
|
67
69
|
path: url.pathname,
|
|
68
70
|
hash: url.hash,
|
package/docs/components/list.md
CHANGED
|
@@ -101,6 +101,8 @@ import WList from 'eco-vue-js/dist/components/List/WList.vue'
|
|
|
101
101
|
|
|
102
102
|
| Prop | Type | Default | Description |
|
|
103
103
|
| --- | --- | --- | --- |
|
|
104
|
+
| `title` | `string` | — | Heading of the list, as a section's: the list is a section of its own on the page, and a part of a section or a modal, with a smaller heading and a line above it after other content. The `title` slot replaces it. |
|
|
105
|
+
| `description` | `string` | — | A line under the heading on what the list holds. The `description` slot replaces it. |
|
|
104
106
|
| `count` | `number` | — | Total number of items, when known in advance. Sizes the skeleton and the select-all. Defaults to the count the query returns. |
|
|
105
107
|
| `fields` | `Fields` | **required** | Field components, one per column, each with a `meta` export for its title, label, ordering field and classes. A meta with `fields` groups nested fields. |
|
|
106
108
|
| `expansion` | `ExpansionComponent<Data, QueryParams>` | — | Detail component shown under a row when the row is clicked. Receives the same props as a field, except `config`. |
|
|
@@ -162,7 +164,9 @@ import WList from 'eco-vue-js/dist/components/List/WList.vue'
|
|
|
162
164
|
|
|
163
165
|
| Slot | Props | Description |
|
|
164
166
|
| --- | --- | --- |
|
|
165
|
-
| `
|
|
167
|
+
| `title` | `{ count: number \| undefined; }` | Heading of the list, in place of `title`, with the count returned by the query. |
|
|
168
|
+
| `description` | — | Line under the heading, in place of `description`. |
|
|
169
|
+
| `header` | `{ count: number \| undefined; }` | Content above the selection bar, under the heading, with the count returned by the query. |
|
|
166
170
|
| `filter` | — | Filters at the start of the selection bar, usually a WListFilter. They keep to one line, the chips that do not fit go to a menu, the list actions move to the end and fold into More first, and a selection replaces them. `--w-list-toolbar-height` sets the bar's height, the inherited input height by default. |
|
|
167
171
|
| `selection` | — | Replaces the buttons at the end of the selection bar — range select, refetch, sort and column settings. |
|
|
168
172
|
| `group` | `{ item: Data; previous: Data \| undefined; skeleton: boolean; }` | Content of the heading before each group of rows, with `groupBy`. The heading spans the whole row, sticks under the toolbar and, in list mode, to the left edge while the rows scroll sideways. Its content is laid out by the slot. `skeleton` is true while the page loads. |
|
|
@@ -26,6 +26,8 @@ The `footer` slot is the nav's bottom, such as a back button or the app's versio
|
|
|
26
26
|
|
|
27
27
|
`WNavItemExpand` groups items under a title. The items show under it while one of them is active; otherwise hovering the group opens them in a menu to the right. One group's menu is open at a time, so moving down the nav switches it. The menu lines up with the group by its top, or by its bottom low on the screen, and shifts to stay on screen when it is taller than the room there — it scrolls once taller than the screen. With `to`, the group is a link of its own. `even` keeps the items always shown and not indented, for a nav inside a page.
|
|
28
28
|
|
|
29
|
+
Groups can nest, and each level indents further. Items without an icon, from neither `icon`, the `icon` slot nor `meta.icon`, start with the title.
|
|
30
|
+
|
|
29
31
|
`WNavItemTransition` wraps a list of items so that the ones added or removed with `v-if` — such as an item for the current record — expand and collapse.
|
|
30
32
|
|
|
31
33
|
The demo below uses `even` to show a group inside a page. Its items link to pages of this site, so the one you're on is active.
|
|
@@ -169,15 +171,16 @@ import WNavItem from 'eco-vue-js/dist/components/Nav/WNavItem.vue'
|
|
|
169
171
|
|
|
170
172
|
| Prop | Type | Default | Description |
|
|
171
173
|
| --- | --- | --- | --- |
|
|
172
|
-
| `icon` | `SVGComponent` | — | Icon before the title. Defaults to the route's `meta.icon`. |
|
|
174
|
+
| `icon` | `SVGComponent` | — | Icon before the title. Defaults to the route's `meta.icon`. Without an icon the title takes its place. |
|
|
173
175
|
| `title` | `string` | — | Title of the item. Defaults to the title the route's page registers with `useRouteTitle` while it is open, then the route's `meta.titleShort`, then `meta.title`. |
|
|
174
176
|
| `count` | `number` | — | Number after the title in brackets, such as the number of items on the page it opens. |
|
|
175
177
|
| `counter` | `number` | — | Number in a badge over the end of the title, such as unread items. Hidden at 0. |
|
|
176
178
|
| `skeleton` | `boolean` | — | Shows a placeholder for `count` and hides `counter`, while they load. |
|
|
177
179
|
| `hasActive` | `boolean` | — | Marks the item as the parent of the active item. Set by WNavItemExpand. |
|
|
178
180
|
| `expand` | `boolean` | — | Marks the item as the toggle of a group without a route of its own. Set by WNavItemExpand. |
|
|
179
|
-
| `indent` | `
|
|
181
|
+
| `indent` | `number` | — | How many groups the item is nested in, which sets its indent. Set by WNavItemExpand. |
|
|
180
182
|
| `queryFields` | `string[]` | — | Query params that must match the current route's for the item to be active, besides its route name. Other params, such as filters, are ignored. |
|
|
183
|
+
| `paramFields` | `string[]` | — | Route params that must match the current route's for the item to be active, besides its route name. Other route params are ignored. |
|
|
181
184
|
| `hovered` | `boolean` | — | Highlights the item as hovered. Set by WNavItemExpand while its menu is open. |
|
|
182
185
|
| `even` | `boolean` | — | Lays the item out without the indent of a group. Set by WNavItemExpand. |
|
|
183
186
|
| `to` | `RouteLocationRaw` | **required** | Router location — renders a router link. Needs vue-router installed in the app. |
|
|
@@ -199,13 +202,14 @@ import WNavItemExpand from 'eco-vue-js/dist/components/Nav/WNavItemExpand.vue'
|
|
|
199
202
|
|
|
200
203
|
| Prop | Type | Default | Description |
|
|
201
204
|
| --- | --- | --- | --- |
|
|
202
|
-
| `icon` | `SVGComponent` | — | Icon before the title. |
|
|
205
|
+
| `icon` | `SVGComponent` | — | Icon before the title. Without an icon the title takes its place. |
|
|
203
206
|
| `title` | `string` | **required** | Title of the group. |
|
|
204
207
|
| `count` | `number` | — | Number after the title in brackets. |
|
|
205
208
|
| `counter` | `number` | — | Number in a badge over the end of the title. Hidden at 0. |
|
|
206
209
|
| `skeleton` | `boolean` | — | Shows a placeholder for `count` and hides `counter`, while they load. |
|
|
207
|
-
| `indent` | `
|
|
210
|
+
| `indent` | `number` | — | How many groups the group is nested in, which sets its indent. Set by a parent WNavItemExpand. |
|
|
208
211
|
| `queryFields` | `string[]` | — | Query params that must match the current route's for the group's own route to be active. |
|
|
212
|
+
| `paramFields` | `string[]` | — | Route params that must match the current route's for the group's own route to be active. |
|
|
209
213
|
| `even` | `boolean` | — | Keeps the items always shown, without indent and without the menu on hover, e.g. for a nav inside a page. |
|
|
210
214
|
| `to` | `RouteLocationRaw` | — | Router location — renders a router link. Needs vue-router installed in the app. |
|
|
211
215
|
|
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.
|
|
3
|
+
> Vue 3 UI kit with Tailwind v4 — components, utilities, icons and recipes. These are the docs of version 0.27.0, 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
|
@@ -253,6 +253,36 @@
|
|
|
253
253
|
padding-top: max(0px, 1rem - var(--w-section-padding));
|
|
254
254
|
}
|
|
255
255
|
|
|
256
|
+
/*
|
|
257
|
+
* A joined section has no top edge, so neither the lit top edge of a glass shadow. Its shadow is drawn from a box
|
|
258
|
+
* running on up behind the head, and stops at the section's top as the head's stops at its bottom: clipping the section
|
|
259
|
+
* itself would leave a seam between the two fills. A section after another in a stack there is not joined, and its
|
|
260
|
+
* shadow box is its own. Positioned under the utilities, so a sticky section stays sticky.
|
|
261
|
+
*/
|
|
262
|
+
@layer components {
|
|
263
|
+
:where(.surface-section-joined .surface-section:not(.surface-section *, .surface-section-tone)) {
|
|
264
|
+
--w-joined-reach: calc(3rem * var(--w-joined, 0));
|
|
265
|
+
|
|
266
|
+
position: relative;
|
|
267
|
+
|
|
268
|
+
&::before {
|
|
269
|
+
content: "";
|
|
270
|
+
position: absolute;
|
|
271
|
+
inset: calc(var(--w-joined-reach) * -1 - var(--w-section-border) * (1 - var(--w-joined, 0))) calc(var(--w-section-border) * -1) calc(var(--w-section-border) * -1);
|
|
272
|
+
border-radius: inherit;
|
|
273
|
+
box-shadow: var(--w-section-shadow);
|
|
274
|
+
clip-path: inset(calc(var(--w-joined-reach) - 100vh * (1 - var(--w-joined, 0))) -100vw -100vh);
|
|
275
|
+
pointer-events: none;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
@layer utilities {
|
|
281
|
+
.surface-section-joined .surface-section:not(.surface-section *, .surface-section-tone) {
|
|
282
|
+
box-shadow: none;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
256
286
|
/* Reaches into the page gutter like a section: for a row of cards on the canvas. On phones the cards keep the page inset. */
|
|
257
287
|
@utility w-page-bleed {
|
|
258
288
|
margin-inline: calc(var(--w-page-bleed, 0px) * -1);
|
|
@@ -322,7 +352,7 @@
|
|
|
322
352
|
|
|
323
353
|
/*
|
|
324
354
|
* Blocks one after another on the page — sections, stacks of them, page lists, rows of cards, tabs over a section —
|
|
325
|
-
* are apart through the wrappers of any page, as in `surface-stack-divided`: a page needs no stack of its own. In card
|
|
355
|
+
* are apart through the wrappers of any page, and after a wrapper that ends with one, such as a form of sections, as in `surface-stack-divided`: a page needs no stack of its own. In card
|
|
326
356
|
* and glass `--w-section-gap` separates the surfaces; in flat, where sections paint nothing, the blocks are
|
|
327
357
|
* `--w-stack-divide` apart and a section after a section has a line above its content, so its groups read apart there
|
|
328
358
|
* too. Only in block flow, as a grid or a flex box spaces its children itself, not inside a section, where blocks are
|
|
@@ -339,7 +369,7 @@
|
|
|
339
369
|
|
|
340
370
|
@scope (.w-page) to (.surface-section *, .surface-root *) {
|
|
341
371
|
:where(:scope, :scope :not(.grid, .flex, .inline-grid, .inline-flex, .surface-columns, .surface-stack, .surface-stack-divided))
|
|
342
|
-
> :where(.surface-section, .surface-stack, .surface-stack-divided, .surface-columns, .w-list-page, .w-page-bleed, .w-tabs-section)
|
|
372
|
+
> :where(.surface-section, .surface-stack, .surface-stack-divided, .surface-columns, .w-list-page, .w-page-bleed, .w-tabs-section, :has(> :where(.surface-section, .surface-stack, .surface-stack-divided, .surface-columns, .w-list-page, .w-page-bleed, .w-tabs-section):last-child))
|
|
343
373
|
+ :where(.surface-section, .surface-stack, .surface-stack-divided, .surface-columns, .w-list-page, .w-page-bleed, .w-tabs-section) {
|
|
344
374
|
/* 1 in flat, where sections paint nothing, 0 where they do. */
|
|
345
375
|
--w-stack-flat: calc(1 - min(1, var(--w-section-opacity) * 100));
|
|
@@ -362,6 +392,12 @@
|
|
|
362
392
|
padding-top: calc(var(--w-section-padding) + var(--w-stack-divide, 2rem) * var(--w-stack-flat));
|
|
363
393
|
border-top-width: calc(var(--w-section-border) + 1px * var(--w-stack-flat));
|
|
364
394
|
}
|
|
395
|
+
|
|
396
|
+
/* A page list is a section: after a block, the line goes on its surface, which keeps to the view. */
|
|
397
|
+
:where(:scope, :scope :not(.grid, .flex, .inline-grid, .inline-flex, .surface-columns, .surface-stack, .surface-stack-divided))
|
|
398
|
+
> :where(.surface-section, .surface-stack, .surface-stack-divided, .surface-columns, .w-list-page, .w-page-bleed, .w-tabs-section, :has(> :where(.surface-section, .surface-stack, .surface-stack-divided, .surface-columns, .w-list-page, .w-page-bleed, .w-tabs-section):last-child)) + .w-list-page {
|
|
399
|
+
--w-list-line: var(--w-stack-flat);
|
|
400
|
+
}
|
|
365
401
|
}
|
|
366
402
|
}
|
|
367
403
|
|
|
@@ -492,9 +528,11 @@
|
|
|
492
528
|
}
|
|
493
529
|
|
|
494
530
|
/* A part after other content: a line above it, as between the groups of a form. */
|
|
495
|
-
:scope * + .surface-section
|
|
531
|
+
:scope * + .surface-section,
|
|
532
|
+
:scope * + .w-list-section .w-list-heading {
|
|
496
533
|
border-top: 1px solid var(--w-line-subtle);
|
|
497
|
-
padding-top: var(--w-subsection-divide,
|
|
534
|
+
padding-top: var(--w-subsection-divide, 2rem);
|
|
535
|
+
margin-top: var(--w-subsection-divide, 2rem);
|
|
498
536
|
}
|
|
499
537
|
}
|
|
500
538
|
|
|
@@ -1003,8 +1041,11 @@
|
|
|
1003
1041
|
transparent
|
|
1004
1042
|
);
|
|
1005
1043
|
|
|
1044
|
+
/* 1 after a block on the page in flat: a line above the list, `--w-stack-divide` over its content. */
|
|
1045
|
+
--w-list-divide: calc(var(--w-stack-divide, 2rem) * var(--w-list-line, 0));
|
|
1046
|
+
|
|
1006
1047
|
display: grid;
|
|
1007
|
-
padding-block: var(--w-section-padding);
|
|
1048
|
+
padding-block: calc(var(--w-section-padding) + var(--w-list-divide)) var(--w-section-padding);
|
|
1008
1049
|
|
|
1009
1050
|
@variant sm-not {
|
|
1010
1051
|
--w-section-border: 0px;
|
|
@@ -1099,8 +1140,10 @@
|
|
|
1099
1140
|
}
|
|
1100
1141
|
|
|
1101
1142
|
.w-list-page-surface {
|
|
1143
|
+
margin-top: calc((var(--w-section-padding) + var(--w-list-divide)) * -1);
|
|
1102
1144
|
background-color: var(--w-section-paint);
|
|
1103
1145
|
border: var(--w-section-border) solid var(--w-line-subtle);
|
|
1146
|
+
border-top-width: calc(var(--w-section-border) + 1px * var(--w-list-line, 0));
|
|
1104
1147
|
backdrop-filter: var(--w-section-backdrop);
|
|
1105
1148
|
}
|
|
1106
1149
|
|