eco-vue-js 0.24.0 → 0.25.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.
Files changed (45) hide show
  1. package/dist/components/Button/WButtonTab.vue.d.ts +3 -0
  2. package/dist/components/Button/WButtonTab.vue.d.ts.map +1 -1
  3. package/dist/components/Button/WButtonTab.vue_vue_type_script_setup_true_lang.js +94 -88
  4. package/dist/components/HeaderBar/WHeaderBar.vue.d.ts +1 -1
  5. package/dist/components/HeaderBar/WHeaderBar.vue.d.ts.map +1 -1
  6. package/dist/components/HeaderBar/WHeaderBar.vue_vue_type_script_setup_true_lang.js +63 -7
  7. package/dist/components/Link/WLink.vue.d.ts.map +1 -1
  8. package/dist/components/Link/WLink.vue_vue_type_script_setup_true_lang.js +1 -1
  9. package/dist/components/Nav/WNavItem.vue.d.ts.map +1 -1
  10. package/dist/components/Nav/WNavItem.vue_vue_type_script_setup_true_lang.js +28 -20
  11. package/dist/components/Nav/types.d.ts +1 -1
  12. package/dist/components/Notify/WNotify.vue_vue_type_script_setup_true_lang.js +3 -3
  13. package/dist/components/Notify/models/NotifyType.d.ts +1 -1
  14. package/dist/components/Notify/models/NotifyType.d.ts.map +1 -1
  15. package/dist/components/Notify/models/NotifyType.js +1 -1
  16. package/dist/components/Notify/models/notifyCenter.d.ts.map +1 -1
  17. package/dist/components/Notify/models/notifyCenter.js +4 -2
  18. package/dist/components/RouterLink/WRouterLink.vue.d.ts +2 -0
  19. package/dist/components/RouterLink/WRouterLink.vue.d.ts.map +1 -1
  20. package/dist/components/RouterLink/WRouterLink.vue_vue_type_script_setup_true_lang.js +5 -1
  21. package/dist/components/Tabs/WTabs.vue.d.ts.map +1 -1
  22. package/dist/components/Tabs/WTabs.vue_vue_type_script_setup_true_lang.js +19 -5
  23. package/dist/components/Tabs/WTabsItem.vue_vue_type_script_setup_true_lang.js +2 -1
  24. package/dist/components/Tabs/components/TabTitleButton.vue.d.ts +2 -0
  25. package/dist/components/Tabs/components/TabTitleButton.vue.d.ts.map +1 -1
  26. package/dist/components/Tabs/components/TabTitleButton.vue_vue_type_script_setup_true_lang.js +5 -2
  27. package/dist/components/Tabs/types.d.ts +7 -0
  28. package/dist/components/Tabs/types.d.ts.map +1 -1
  29. package/dist/composables/useOptionalRouter.d.ts +6 -2
  30. package/dist/composables/useOptionalRouter.d.ts.map +1 -1
  31. package/dist/composables/useOptionalRouter.js +21 -2
  32. package/dist/main.d.ts +1 -0
  33. package/dist/main.d.ts.map +1 -1
  34. package/dist/main.js +2 -1
  35. package/dist/utils/useRouteTitle.d.ts +22 -0
  36. package/dist/utils/useRouteTitle.d.ts.map +1 -0
  37. package/dist/utils/useRouteTitle.js +75 -0
  38. package/docs/components/header-bar.md +30 -1
  39. package/docs/components/links.md +1 -0
  40. package/docs/components/nav-bar.md +1 -1
  41. package/docs/components/notify.md +2 -2
  42. package/docs/components/tabs.md +13 -0
  43. package/docs/llms.txt +1 -1
  44. package/docs/recipes/list-with-fields.md +0 -1
  45. package/package.json +4 -1
@@ -1,3 +1,4 @@
1
+ import { LinkProps } from '../../types/types';
1
2
  type __VLS_Props = {
2
3
  /** Marks the button as the open tab: primary text and an underline. */
3
4
  active?: boolean;
@@ -25,6 +26,8 @@ type __VLS_Props = {
25
26
  enableOverflow?: boolean;
26
27
  /** Number shown in a badge after the title, tinted while the tab is open. */
27
28
  count?: number;
29
+ /** Router location — renders a link that replaces the current history entry, unless `disabled`. */
30
+ to?: LinkProps['to'];
28
31
  };
29
32
  type __VLS_Slots = {
30
33
  /** Content of the button, replacing the title, icon, count and status icon. */
@@ -1 +1 @@
1
- {"version":3,"file":"WButtonTab.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/WButtonTab.vue"],"names":[],"mappings":"AAgJA;AAgNA,KAAK,WAAW,GAAG;IACjB,uEAAuE;IACvE,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,oDAAoD;IACpD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,o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,UAAU,CAAC,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAC,KAAK,IAAI,CAAA;CACzF,CAAC;AA0WF,QAAA,MAAM,UAAU;;;;kFAGd,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,14 +1,14 @@
1
1
  import { numberFormatter } from "../../utils/utils.js";
2
+ import WRouterLink_default from "../RouterLink/WRouterLink.vue.js";
2
3
  import IconCheckCircle_default from "../../assets/icons/IconCheckCircle.js";
3
4
  import IconClose_default from "../../assets/icons/IconClose.js";
4
5
  import IconNegativeInfo_default from "../../assets/icons/IconNegativeInfo.js";
5
6
  import WEmptyComponent_default from "../EmptyComponent/WEmptyComponent.vue.js";
6
7
  import WStatusIcon_default from "../Status/WStatusIcon.vue.js";
7
8
  import WTextOverflow_default from "../TextOverflow/WTextOverflow.vue.js";
8
- import { Suspense, Transition, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, guardReactiveProps, normalizeClass, normalizeProps, openBlock, renderSlot, resolveDynamicComponent, toDisplayString, unref, withCtx } from "vue";
9
+ import { Suspense, Transition, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeClass, normalizeProps, openBlock, renderSlot, resolveDynamicComponent, toDisplayString, unref, withCtx } from "vue";
9
10
  //#region src/components/Button/WButtonTab.vue?vue&type=script&setup=true&lang.ts
10
- var _hoisted_1 = ["disabled"];
11
- var _hoisted_2 = {
11
+ var _hoisted_1 = {
12
12
  key: 0,
13
13
  class: "p-8"
14
14
  };
@@ -27,107 +27,113 @@ var WButtonTab_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
27
27
  statusIcon: { type: Boolean },
28
28
  showHasValue: { type: Boolean },
29
29
  enableOverflow: { type: Boolean },
30
- count: {}
30
+ count: {},
31
+ to: {}
31
32
  },
32
33
  emits: ["click"],
33
34
  setup(__props) {
34
35
  return (_ctx, _cache) => {
35
- return openBlock(), createElementBlock("button", {
36
- disabled: __props.disabled,
37
- class: normalizeClass(["w-ripple-trigger grid select-none grid-cols-[auto_1fr] font-semibold outline-none", {
36
+ return openBlock(), createBlock(resolveDynamicComponent(__props.to && !__props.disabled ? WRouterLink_default : "button"), mergeProps(__props.to && !__props.disabled ? {
37
+ to: __props.to,
38
+ replace: true
39
+ } : { disabled: __props.disabled }, {
40
+ class: ["w-ripple-trigger grid select-none grid-cols-[auto_1fr] font-semibold outline-none", {
38
41
  "tone-primary text-tone": !__props.hasError && __props.active,
39
42
  "tone-negative text-tone": __props.hasError,
40
43
  "tone-positive text-tone": !__props.active && !__props.hasError && __props.hasValue && __props.showHasValue,
41
44
  "text-description": !__props.active && !__props.hasError && (!__props.showHasValue || !__props.hasValue),
42
45
  "cursor-not-allowed opacity-50": __props.disabled,
43
46
  "cursor-pointer": !__props.disabled
44
- }]),
47
+ }],
45
48
  onClick: _cache[0] || (_cache[0] = ($event) => !__props.disabled && _ctx.$emit("click", $event))
46
- }, [__props.indicator ? (openBlock(), createElementBlock("div", _hoisted_2, [createElementVNode("div", { class: normalizeClass(["text-surface rounded-full bg-inherit p-1 outline transition-[outline-width] duration-500", {
47
- "tone-negative bg-tone-fill outline-tone/10": __props.hasError,
48
- "tone-positive bg-tone-fill outline-tone/10": !__props.hasError && __props.hasValue && __props.showHasValue,
49
- "bg-track-strong outline-track-strong/10": !__props.hasError && (!__props.showHasValue || !__props.hasValue),
50
- "outline-[1.5rem]": __props.active
51
- }]) }, [__props.hasError ? (openBlock(), createBlock(unref(IconNegativeInfo_default), {
52
- key: 0,
53
- class: "size-8"
54
- })) : __props.hasValue ? (openBlock(), createBlock(unref(IconCheckCircle_default), {
55
- key: 1,
56
- class: "size-8"
57
- })) : (openBlock(), createBlock(unref(IconClose_default), {
58
- key: 2,
59
- class: "size-8"
60
- }))], 2)])) : createCommentVNode("", true), createElementVNode("div", { class: normalizeClass(["relative col-start-2 self-start", {
61
- "mt-3.5": __props.indicator,
62
- "w-ripple w-ripple-hover": !__props.disabled
63
- }]) }, [
64
- _ctx.$slots.title ? renderSlot(_ctx.$slots, "title", normalizeProps(guardReactiveProps({
65
- hasChanges: __props.hasChanges,
66
- hasError: __props.hasError,
67
- hasValue: __props.hasValue
68
- })), void 0, void 0, 0) : (openBlock(), createElementBlock("div", {
49
+ }), {
50
+ default: withCtx(() => [__props.indicator ? (openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("div", { class: normalizeClass(["text-surface rounded-full bg-inherit p-1 outline transition-[outline-width] duration-500", {
51
+ "tone-negative bg-tone-fill outline-tone/10": __props.hasError,
52
+ "tone-positive bg-tone-fill outline-tone/10": !__props.hasError && __props.hasValue && __props.showHasValue,
53
+ "bg-track-strong outline-track-strong/10": !__props.hasError && (!__props.showHasValue || !__props.hasValue),
54
+ "outline-[1.5rem]": __props.active
55
+ }]) }, [__props.hasError ? (openBlock(), createBlock(unref(IconNegativeInfo_default), {
56
+ key: 0,
57
+ class: "size-8"
58
+ })) : __props.hasValue ? (openBlock(), createBlock(unref(IconCheckCircle_default), {
69
59
  key: 1,
70
- class: normalizeClass(["group/overflow grid grid-cols-[1fr_auto] items-center py-2", {
71
- "justify-center text-center": !__props.side,
72
- "text-start": __props.side
73
- }])
74
- }, [
75
- createElementVNode("div", { class: normalizeClass(["whitespace-nowrap px-3", { "sm-not:pl---inner-margin": __props.side }]) }, [(openBlock(), createBlock(resolveDynamicComponent(__props.enableOverflow ? WTextOverflow_default : WEmptyComponent_default), null, {
76
- default: withCtx(() => [
77
- __props.icon !== void 0 ? (openBlock(), createBlock(Suspense, { key: 0 }, {
78
- fallback: withCtx(() => [..._cache[1] || (_cache[1] = [createElementVNode("svg", { class: "square-[1.25em] -mt-1 inline" }, [createElementVNode("g")], -1)])]),
79
- default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.icon), { class: "square-[1.25em] -mt-1 inline" }))]),
80
- _: 1
81
- })) : createCommentVNode("", true),
82
- createTextVNode(" " + toDisplayString(__props.title) + " ", 1),
83
- __props.count !== void 0 ? (openBlock(), createElementBlock("span", {
84
- key: 1,
85
- class: normalizeClass(["ml-0.5 inline-block min-w-[1.75em] rounded-full px-1.5 text-center text-xs/5 tabular-nums", __props.active && !__props.hasError ? "bg-tone-soft" : "bg-surface-muted text-description"])
86
- }, toDisplayString(unref(numberFormatter).format(__props.count)), 3)) : createCommentVNode("", true)
87
- ]),
88
- _: 1
89
- }))], 2),
90
- __props.statusIcon ? (openBlock(), createBlock(WStatusIcon_default, {
91
- key: 0,
92
- "has-value": __props.hasValue,
93
- "has-error": __props.hasError,
94
- class: "sm-not:mr---inner-margin square-4 ml-auto mr-4"
95
- }, null, 8, ["has-value", "has-error"])) : createCommentVNode("", true),
96
- renderSlot(_ctx.$slots, "suffix", normalizeProps(guardReactiveProps({
60
+ class: "size-8"
61
+ })) : (openBlock(), createBlock(unref(IconClose_default), {
62
+ key: 2,
63
+ class: "size-8"
64
+ }))], 2)])) : createCommentVNode("", true), createElementVNode("div", { class: normalizeClass(["relative col-start-2 self-start", {
65
+ "mt-3.5": __props.indicator,
66
+ "w-ripple w-ripple-hover": !__props.disabled
67
+ }]) }, [
68
+ _ctx.$slots.title ? renderSlot(_ctx.$slots, "title", normalizeProps(guardReactiveProps({
97
69
  hasChanges: __props.hasChanges,
98
70
  hasError: __props.hasError,
99
71
  hasValue: __props.hasValue
100
- })))
101
- ], 2)),
102
- createVNode(Transition, {
103
- "enter-active-class": "transition-opacity",
104
- "leave-active-class": "transition-opacity",
105
- "enter-from-class": "opacity-0",
106
- "leave-to-class": "opacity-0"
107
- }, {
108
- default: withCtx(() => [__props.hasChanges ? (openBlock(), createElementBlock("div", {
109
- key: 0,
110
- class: normalizeClass(["square-2 absolute right-1 top-1 rounded-full", {
111
- "tone-info bg-tone-fill": !__props.hasError,
112
- "tone-negative bg-tone-fill": __props.hasError
72
+ })), void 0, void 0, 0) : (openBlock(), createElementBlock("div", {
73
+ key: 1,
74
+ class: normalizeClass(["group/overflow grid grid-cols-[1fr_auto] items-center py-2", {
75
+ "justify-center text-center": !__props.side,
76
+ "text-start": __props.side
113
77
  }])
114
- }, null, 2)) : createCommentVNode("", true)]),
115
- _: 1
116
- }),
117
- createVNode(Transition, {
118
- "enter-active-class": "transition-[scale,opacity] origin-center duration-300",
119
- "leave-active-class": "transition-[scale,opacity] origin-center duration-300",
120
- "enter-from-class": "scale-x-0 opacity-0",
121
- "leave-to-class": "scale-x-0 opacity-0",
122
- css: !__props.indicator
123
- }, {
124
- default: withCtx(() => [__props.active || __props.indicator ? (openBlock(), createElementBlock("div", {
125
- key: 0,
126
- class: normalizeClass(["absolute inset-x-0 bg-current bottom-0 h-0.5 rounded-sm", { "sm-not:left---inner-margin": __props.side }])
127
- }, null, 2)) : createCommentVNode("", true)]),
128
- _: 1
129
- }, 8, ["css"])
130
- ], 2)], 10, _hoisted_1);
78
+ }, [
79
+ createElementVNode("div", { class: normalizeClass(["whitespace-nowrap px-3", { "sm-not:pl---inner-margin": __props.side }]) }, [(openBlock(), createBlock(resolveDynamicComponent(__props.enableOverflow ? WTextOverflow_default : WEmptyComponent_default), null, {
80
+ default: withCtx(() => [
81
+ __props.icon !== void 0 ? (openBlock(), createBlock(Suspense, { key: 0 }, {
82
+ fallback: withCtx(() => [..._cache[1] || (_cache[1] = [createElementVNode("svg", { class: "square-[1.25em] -mt-1 inline" }, [createElementVNode("g")], -1)])]),
83
+ default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.icon), { class: "square-[1.25em] -mt-1 inline" }))]),
84
+ _: 1
85
+ })) : createCommentVNode("", true),
86
+ createTextVNode(" " + toDisplayString(__props.title) + " ", 1),
87
+ __props.count !== void 0 ? (openBlock(), createElementBlock("span", {
88
+ key: 1,
89
+ class: normalizeClass(["ml-0.5 inline-block min-w-[1.75em] rounded-full px-1.5 text-center text-xs/5 tabular-nums", __props.active && !__props.hasError ? "bg-tone-soft" : "bg-surface-muted text-description"])
90
+ }, toDisplayString(unref(numberFormatter).format(__props.count)), 3)) : createCommentVNode("", true)
91
+ ]),
92
+ _: 1
93
+ }))], 2),
94
+ __props.statusIcon ? (openBlock(), createBlock(WStatusIcon_default, {
95
+ key: 0,
96
+ "has-value": __props.hasValue,
97
+ "has-error": __props.hasError,
98
+ class: "sm-not:mr---inner-margin square-4 ml-auto mr-4"
99
+ }, null, 8, ["has-value", "has-error"])) : createCommentVNode("", true),
100
+ renderSlot(_ctx.$slots, "suffix", normalizeProps(guardReactiveProps({
101
+ hasChanges: __props.hasChanges,
102
+ hasError: __props.hasError,
103
+ hasValue: __props.hasValue
104
+ })))
105
+ ], 2)),
106
+ createVNode(Transition, {
107
+ "enter-active-class": "transition-opacity",
108
+ "leave-active-class": "transition-opacity",
109
+ "enter-from-class": "opacity-0",
110
+ "leave-to-class": "opacity-0"
111
+ }, {
112
+ default: withCtx(() => [__props.hasChanges ? (openBlock(), createElementBlock("div", {
113
+ key: 0,
114
+ class: normalizeClass(["square-2 absolute right-1 top-1 rounded-full", {
115
+ "tone-info bg-tone-fill": !__props.hasError,
116
+ "tone-negative bg-tone-fill": __props.hasError
117
+ }])
118
+ }, null, 2)) : createCommentVNode("", true)]),
119
+ _: 1
120
+ }),
121
+ createVNode(Transition, {
122
+ "enter-active-class": "transition-[scale,opacity] origin-center duration-300",
123
+ "leave-active-class": "transition-[scale,opacity] origin-center duration-300",
124
+ "enter-from-class": "scale-x-0 opacity-0",
125
+ "leave-to-class": "scale-x-0 opacity-0",
126
+ css: !__props.indicator
127
+ }, {
128
+ default: withCtx(() => [__props.active || __props.indicator ? (openBlock(), createElementBlock("div", {
129
+ key: 0,
130
+ class: normalizeClass(["absolute inset-x-0 bg-current bottom-0 h-0.5 rounded-sm", { "sm-not:left---inner-margin": __props.side }])
131
+ }, null, 2)) : createCommentVNode("", true)]),
132
+ _: 1
133
+ }, 8, ["css"])
134
+ ], 2)]),
135
+ _: 3
136
+ }, 16, ["class"]);
131
137
  };
132
138
  }
133
139
  });
@@ -1,5 +1,5 @@
1
1
  type __VLS_Props = {
2
- /** Title of the page. The `title` slot replaces it. */
2
+ /** Title of the page. The `title` slot replaces it. Without both, the header shows the titles of the current route: a breadcrumb of its parents and the page title, see `useRouteTitle`. */
3
3
  title?: string;
4
4
  };
5
5
  type __VLS_Slots = {
@@ -1 +1 @@
1
- {"version":3,"file":"WHeaderBar.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/HeaderBar/WHeaderBar.vue"],"names":[],"mappings":"AAuDA;AAoIA,KAAK,WAAW,GAAG;IACjB,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAC;AAGF,KAAK,WAAW,GAAG;IACjB,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,IAAI,CAAA;IAClB,yDAAyD;IACzD,KAAK,CAAC,EAAE,MAAM,IAAI,CAAA;CACnB,CAAC;AA2LF,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"}
1
+ {"version":3,"file":"WHeaderBar.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/HeaderBar/WHeaderBar.vue"],"names":[],"mappings":"AA+HA;AA0NA,KAAK,WAAW,GAAG;IACjB,4LAA4L;IAC5L,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAC;AAGF,KAAK,WAAW,GAAG;IACjB,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,IAAI,CAAA;IAClB,yDAAyD;IACzD,KAAK,CAAC,EAAE,MAAM,IAAI,CAAA;CACnB,CAAC;AAqUF,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"}
@@ -1,13 +1,41 @@
1
1
  import { wBaseZIndex } from "../../utils/utils.js";
2
+ import WRouterLink_default from "../RouterLink/WRouterLink.vue.js";
3
+ import WSkeleton_default from "../Skeleton/WSkeleton.vue.js";
4
+ import WTooltip_default from "../Tooltip/WTooltip.vue.js";
2
5
  import IconSearch_default from "../../assets/icons/IconSearch.js";
6
+ import { getRouteTitleShort, useRouteTitles } from "../../utils/useRouteTitle.js";
3
7
  import { useHeader } from "./use/useHeader.js";
4
8
  import { useHeaderSearch } from "./use/useHeaderSearch.js";
5
9
  import { useHeaderSearchVisible } from "./use/useHeaderSearchVisible.js";
6
- import { Fragment, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, openBlock, provide, ref, renderList, renderSlot, resolveDynamicComponent, toDisplayString, unref, useTemplateRef, vShow, withDirectives } from "vue";
10
+ import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, openBlock, provide, ref, renderList, renderSlot, resolveDynamicComponent, toDisplayString, unref, useTemplateRef, vShow, withCtx, withDirectives } from "vue";
7
11
  //#region src/components/HeaderBar/WHeaderBar.vue?vue&type=script&setup=true&lang.ts
8
- var _hoisted_1 = { class: "text-accent sm:text-2.5xl flex-1 truncate text-xl font-semibold" };
9
- var _hoisted_2 = { class: "w-ripple w-ripple-hover sm-not:px---inner-margin relative flex h-full items-center px-(--w-list-padding,1rem)" };
12
+ var _hoisted_1 = {
13
+ key: 0,
14
+ class: "text-accent sm:text-2.5xl flex-1 truncate text-xl font-semibold"
15
+ };
16
+ var _hoisted_2 = {
17
+ key: 1,
18
+ class: "flex min-w-0 flex-1 items-baseline gap-2 text-lg leading-tight sm:text-xl"
19
+ };
10
20
  var _hoisted_3 = {
21
+ key: 0,
22
+ "aria-label": "Breadcrumb",
23
+ class: "sm-not:hidden text-description flex shrink-0 items-baseline gap-2"
24
+ };
25
+ var _hoisted_4 = {
26
+ key: 1,
27
+ class: "max-w-64 truncate"
28
+ };
29
+ var _hoisted_5 = {
30
+ key: 1,
31
+ class: "text-accent min-w-0 truncate font-semibold"
32
+ };
33
+ var _hoisted_6 = {
34
+ key: 2,
35
+ class: "flex min-w-max flex-1 items-center self-center"
36
+ };
37
+ var _hoisted_7 = { class: "w-ripple w-ripple-hover sm-not:px---inner-margin relative flex h-full items-center px-(--w-list-padding,1rem)" };
38
+ var _hoisted_8 = {
11
39
  key: 0,
12
40
  class: "xl-not:pl---header-height px---inner-margin grid items-center"
13
41
  };
@@ -19,6 +47,9 @@ var WHeaderBar_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
19
47
  const { headerPadding, updateHeaderHeight } = useHeader();
20
48
  const { search } = useHeaderSearch();
21
49
  const { visible, updateVisible } = useHeaderSearchVisible();
50
+ const { titles } = useRouteTitles();
51
+ const parentTitles = computed(() => titles.value.slice(0, -1));
52
+ const currentTitle = computed(() => titles.value.at(-1));
22
53
  const elementRef = useTemplateRef("element");
23
54
  const isTransparent = ref(false);
24
55
  let timeout;
@@ -57,16 +88,41 @@ var WHeaderBar_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
57
88
  style: normalizeStyle({ "--header-height-padding": unref(headerPadding) + "px" })
58
89
  }, null, 6)),
59
90
  withDirectives(createElementVNode("div", { class: normalizeClass(["pl---inner-margin xl-not:pl---header-height relative flex items-center", { "pr---inner-margin": !unref(search) }]) }, [
60
- createElementVNode("h1", _hoisted_1, [renderSlot(_ctx.$slots, "title", {}, () => [createTextVNode(toDisplayString(__props.title), 1)])]),
91
+ __props.title !== void 0 || _ctx.$slots.title ? (openBlock(), createElementBlock("h1", _hoisted_1, [renderSlot(_ctx.$slots, "title", {}, () => [createTextVNode(toDisplayString(__props.title), 1)])])) : (openBlock(), createElementBlock("div", _hoisted_2, [
92
+ parentTitles.value.length ? (openBlock(), createElementBlock("nav", _hoisted_3, [(openBlock(true), createElementBlock(Fragment, null, renderList(parentTitles.value, (item, index) => {
93
+ return openBlock(), createElementBlock(Fragment, { key: index }, [item.to ? (openBlock(), createBlock(WRouterLink_default, {
94
+ key: 0,
95
+ to: item.to,
96
+ class: "hover:text-accent max-w-64 truncate no-underline transition-colors"
97
+ }, {
98
+ default: withCtx(() => [unref(getRouteTitleShort)(item) !== void 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(toDisplayString(unref(getRouteTitleShort)(item)), 1)], 64)) : (openBlock(), createBlock(WSkeleton_default, {
99
+ key: 1,
100
+ class: "inline-flex w-24"
101
+ }))]),
102
+ _: 2
103
+ }, 1032, ["to"])) : (openBlock(), createElementBlock("span", _hoisted_4, toDisplayString(unref(getRouteTitleShort)(item)), 1)), _cache[1] || (_cache[1] = createElementVNode("span", {
104
+ "aria-hidden": "true",
105
+ class: "opacity-50"
106
+ }, "/", -1))], 64);
107
+ }), 128))])) : createCommentVNode("", true),
108
+ currentTitle.value ? (openBlock(), createElementBlock("h1", _hoisted_5, [currentTitle.value.title !== void 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(toDisplayString(currentTitle.value.title) + " ", 1), createVNode(WTooltip_default, {
109
+ text: currentTitle.value.title,
110
+ "overflow-only": ""
111
+ }, null, 8, ["text"])], 64)) : (openBlock(), createBlock(WSkeleton_default, {
112
+ key: 1,
113
+ class: "inline-flex w-40"
114
+ }))])) : createCommentVNode("", true),
115
+ currentTitle.value?.suffix ? (openBlock(), createElementBlock("div", _hoisted_6, [(openBlock(), createBlock(resolveDynamicComponent(currentTitle.value.suffix)))])) : createCommentVNode("", true)
116
+ ])),
61
117
  renderSlot(_ctx.$slots, "right"),
62
118
  unref(search) ? (openBlock(), createElementBlock("button", {
63
- key: 0,
119
+ key: 2,
64
120
  class: "w-ripple-trigger sm:pr---inner-margin h-full select-none",
65
121
  "aria-label": "Open search",
66
122
  onClick: _cache[0] || (_cache[0] = ($event) => unref(updateVisible)(true))
67
- }, [createElementVNode("div", _hoisted_2, [createVNode(unref(IconSearch_default), { class: "square-[1.25em] text-accent" })])])) : createCommentVNode("", true)
123
+ }, [createElementVNode("div", _hoisted_7, [createVNode(unref(IconSearch_default), { class: "square-[1.25em] text-accent" })])])) : createCommentVNode("", true)
68
124
  ], 2), [[vShow, !unref(visible)]]),
69
- unref(search) ? withDirectives((openBlock(), createElementBlock("div", _hoisted_3, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(search), (slot, index) => {
125
+ unref(search) ? withDirectives((openBlock(), createElementBlock("div", _hoisted_8, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(search), (slot, index) => {
70
126
  return openBlock(), createBlock(resolveDynamicComponent(slot), { key: index });
71
127
  }), 128))], 512)), [[vShow, unref(visible)]]) : createCommentVNode("", true)
72
128
  ], 4);
@@ -1 +1 @@
1
- {"version":3,"file":"WLink.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Link/WLink.vue"],"names":[],"mappings":"AAcA;AA8DA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,eAAe,CAAA;AAM5C,OAAO,EAAC,YAAY,EAAiD,MAAM,sBAAsB,CAAA;AAEjG,UAAU,KAAM,SAAQ,OAAO,CAAC,SAAS,CAAC;IACxC,8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IACnC,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,sDAAsD;IACtD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,6CAA6C;IAC7C,YAAY,CAAC,EAAE,YAAY,CAAA;IAC3B,gEAAgE;IAChE,IAAI,CAAC,EAAE,YAAY,CAAA;CACpB;AAgBD,KAAK,WAAW,GAAG;IACjB,0CAA0C;IAC1C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB,CAAC;AA+EF,QAAA,MAAM,UAAU;;UAvGP,MAAM;UAIN,YAAY;kBAFJ,YAAY;UARpB,MAAM;YAEJ,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM;SAE1C,MAAM;6EA4GZ,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"}
@@ -26,7 +26,7 @@ var WLink_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
26
26
  to: __props.to,
27
27
  target: __props.target,
28
28
  rel: __props.rel
29
- }, { class: ["cursor-pointer overflow-hidden truncate whitespace-normal font-normal no-underline hover:underline", unref(semanticTypeTextMap)[__props.semanticType]] }), {
29
+ }, { class: ["cursor-pointer whitespace-normal font-normal no-underline hover:underline", unref(semanticTypeTextMap)[__props.semanticType]] }), {
30
30
  default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(__props.icon ?? unref(IconLink_default)), { class: normalizeClass(["square-[1.25em] mr-[0.25em] mt-[-0.25em] inline rounded-[0.5em] p-px", unref(semanticTypeChipMap)[__props.semanticType]]) }, null, 8, ["class"])), renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(__props.text), 1)])]),
31
31
  _: 3
32
32
  }, 16, ["class"]);
@@ -1 +1 @@
1
- {"version":3,"file":"WNavItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Nav/WNavItem.vue"],"names":[],"mappings":"AAyFA;AAuIA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,SAAS,CAAA;AAgBzC,KAAK,WAAW,GAAG;IACjB,qFAAqF;IACrF,IAAI,CAAC,EAAE,MAAM,IAAI,CAAA;IACjB,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,IAAI,CAAA;CACnB,CAAC;AA+PF,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"}
1
+ {"version":3,"file":"WNavItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Nav/WNavItem.vue"],"names":[],"mappings":"AA4FA;AAgJA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,SAAS,CAAA;AAkBzC,KAAK,WAAW,GAAG;IACjB,qFAAqF;IACrF,IAAI,CAAC,EAAE,MAAM,IAAI,CAAA;IACjB,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,IAAI,CAAA;CACnB,CAAC;AAmRF,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"}
@@ -3,6 +3,8 @@ import WCounter_default from "../Counter/WCounter.vue.js";
3
3
  import WRouterLink_default from "../RouterLink/WRouterLink.vue.js";
4
4
  import WSkeleton_default from "../Skeleton/WSkeleton.vue.js";
5
5
  import { useOptionalRoute, useOptionalRouter } from "../../composables/useOptionalRouter.js";
6
+ import WTextOverflow_default from "../TextOverflow/WTextOverflow.vue.js";
7
+ import { getRouteTitle, getRouteTitleShort } from "../../utils/useRouteTitle.js";
6
8
  import { Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, renderSlot, resolveDynamicComponent, toDisplayString, unref, withCtx } from "vue";
7
9
  //#region src/components/Nav/WNavItem.vue?vue&type=script&setup=true&lang.ts
8
10
  var _hoisted_1 = {
@@ -15,11 +17,12 @@ var _hoisted_2 = {
15
17
  };
16
18
  var _hoisted_3 = { class: "[overflow:inherit]" };
17
19
  var _hoisted_4 = { class: "flex items-center" };
18
- var _hoisted_5 = { class: "last-not:pr-1 whitespace-nowrap font-normal" };
19
- var _hoisted_6 = { class: "relative" };
20
- var _hoisted_7 = { class: "tracking-wide" };
21
- var _hoisted_8 = { class: "leading-loose" };
22
- var _hoisted_9 = { key: 0 };
20
+ var _hoisted_5 = { class: "last-not:pr-1 min-w-0 font-normal" };
21
+ var _hoisted_6 = { class: "relative inline-flex max-w-full items-center whitespace-nowrap tracking-wide" };
22
+ var _hoisted_7 = {
23
+ key: 0,
24
+ class: "shrink-0"
25
+ };
23
26
  var WNavItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
24
27
  __name: "WNavItem",
25
28
  props: {
@@ -47,13 +50,15 @@ var WNavItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
47
50
  if (routeTo.value?.name !== route?.name) return false;
48
51
  return isEqualObj(route.query, routeTo.value.query ?? {}, EXCLUDE_QUERY_FIELDS, props.queryFields);
49
52
  });
50
- const titleLocal = computed(() => props.title ?? (typeof routeTo.value?.meta?.titleShort === "string" ? routeTo.value.meta.titleShort : typeof routeTo.value?.meta?.title === "string" ? routeTo.value.meta.title : ""));
53
+ const routeTitle = computed(() => getRouteTitle(routeTo.value?.matched.at(-1)));
54
+ const iconLocal = computed(() => props.icon ?? routeTo.value?.meta?.icon);
55
+ 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 : ""));
51
56
  const isTextColor = computed(() => props.hasActive ? !props.indent : isActive.value);
52
57
  __expose({ isActive });
53
58
  return (_ctx, _cache) => {
54
59
  return openBlock(), createBlock(WRouterLink_default, {
55
60
  to: __props.to,
56
- class: normalizeClass(["w-ripple-trigger relative block py-1 no-underline", {
61
+ class: normalizeClass(["w-ripple-trigger group/overflow relative block py-1 no-underline", {
57
62
  "tone-primary text-tone": isTextColor.value,
58
63
  "text-accent": !isTextColor.value,
59
64
  "px-1": __props.even,
@@ -84,23 +89,26 @@ var WNavItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
84
89
  "pl-4": __props.indent,
85
90
  "pl-2": !__props.indent
86
91
  }]) }, [
87
- createElementVNode("div", _hoisted_4, [__props.icon ?? routeTo.value?.meta?.icon ? (openBlock(), createBlock(resolveDynamicComponent(__props.icon ?? routeTo.value?.meta?.icon), {
92
+ createElementVNode("div", _hoisted_4, [iconLocal.value ? (openBlock(), createBlock(resolveDynamicComponent(iconLocal.value), {
88
93
  key: 0,
89
94
  class: "square-[1.25em]"
90
95
  })) : renderSlot(_ctx.$slots, "icon", {}, void 0, void 0, 1)]),
91
- createElementVNode("div", _hoisted_5, [createElementVNode("span", _hoisted_6, [createElementVNode("span", _hoisted_7, [
92
- createElementVNode("span", _hoisted_8, toDisplayString(titleLocal.value), 1),
93
- _cache[1] || (_cache[1] = createTextVNode("\xA0", -1)),
94
- !__props.skeleton ? (openBlock(), createElementBlock("span", _hoisted_9, toDisplayString(typeof __props.count === "number" ? `(${unref(numberCompactFormatter).format(__props.count)})` : ""), 1)) : (openBlock(), createBlock(WSkeleton_default, {
96
+ createElementVNode("div", _hoisted_5, [createElementVNode("span", _hoisted_6, [
97
+ createVNode(WTextOverflow_default, { class: "min-w-0 leading-loose" }, {
98
+ default: withCtx(() => [createTextVNode(toDisplayString(titleLocal.value), 1)]),
99
+ _: 1
100
+ }),
101
+ !__props.skeleton ? (openBlock(), createElementBlock("span", _hoisted_7, toDisplayString(typeof __props.count === "number" ? `\u00A0(${unref(numberCompactFormatter).format(__props.count)})` : ""), 1)) : (openBlock(), createBlock(WSkeleton_default, {
95
102
  key: 1,
96
- class: "inline-flex max-w-10"
97
- }))
98
- ]), !__props.skeleton && __props.counter !== void 0 && __props.counter !== 0 ? (openBlock(), createBlock(WCounter_default, {
99
- key: 0,
100
- count: __props.counter,
101
- trigger: 1,
102
- class: "text-2xs absolute -top-2.5 right-[-1em]"
103
- }, null, 8, ["count"])) : createCommentVNode("", true)])]),
103
+ class: "ml-1 inline-flex max-w-10 shrink-0"
104
+ })),
105
+ !__props.skeleton && __props.counter !== void 0 && __props.counter !== 0 ? (openBlock(), createBlock(WCounter_default, {
106
+ key: 2,
107
+ count: __props.counter,
108
+ trigger: 1,
109
+ class: "text-2xs absolute -top-2.5 right-[-1em]"
110
+ }, null, 8, ["count"])) : createCommentVNode("", true)
111
+ ])]),
104
112
  renderSlot(_ctx.$slots, "right")
105
113
  ], 2)])
106
114
  ]),
@@ -2,7 +2,7 @@ import { LinkProps } from '../../types/types';
2
2
  export interface NavItemProps extends LinkProps {
3
3
  /** Icon before the title. Defaults to the route's `meta.icon`. */
4
4
  icon?: SVGComponent
5
- /** Title of the item. Defaults to the route's `meta.titleShort`, then `meta.title`. */
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
7
7
  /** Number after the title in brackets, such as the number of items on the page it opens. */
8
8
  count?: number
@@ -20,9 +20,9 @@ var WNotify_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCo
20
20
  return (_ctx, _cache) => {
21
21
  return openBlock(), createElementBlock("div", {
22
22
  class: normalizeClass(["sm-not:top-[max(env(safe-area-inset-top),0.5rem)] fixed isolate z-10000", {
23
- "sm:top-(--w-top-inner,0.5rem)": isTop.value,
24
- "sm:bottom-[calc(var(--w-bottom-inner,0.5rem)+0.5rem)]": !isTop.value,
25
- "right-(--w-right-inner,0.5rem)": !isCenter.value,
23
+ "sm:top-[max(env(safe-area-inset-top),0.5rem)]": isTop.value,
24
+ "sm:bottom-[max(env(safe-area-inset-bottom),0.5rem)]": !isTop.value,
25
+ "right-[max(env(safe-area-inset-right),0.5rem)]": !isCenter.value,
26
26
  "left-1/2 -translate-x-1/2": isCenter.value
27
27
  }]),
28
28
  onPointerenter: _cache[1] || (_cache[1] = ($event) => unref(setToastsPaused)(true)),
@@ -2,7 +2,7 @@ export declare enum NotifyType {
2
2
  SUCCESS = "success",
3
3
  WARN = "warn",
4
4
  DANGER = "danger",
5
- /** Something in progress, shown with a spinner until it is updated to another type. */
5
+ /** Something in progress, shown with a spinner until it is updated to another type. Its toast stays on screen until then. */
6
6
  PENDING = "pending"
7
7
  }
8
8
  /** Where a notification sits in the notify center. */
@@ -1 +1 @@
1
- {"version":3,"file":"NotifyType.d.ts","sourceRoot":"","sources":["../../../../../src/components/Notify/models/NotifyType.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU;IACpB,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,uFAAuF;IACvF,OAAO,YAAY;CACpB;AAED,sDAAsD;AACtD,oBAAY,aAAa;IACvB,iGAAiG;IACjG,QAAQ,aAAa;IACrB,sGAAsG;IACtG,MAAM,WAAW;CAClB"}
1
+ {"version":3,"file":"NotifyType.d.ts","sourceRoot":"","sources":["../../../../../src/components/Notify/models/NotifyType.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU;IACpB,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,6HAA6H;IAC7H,OAAO,YAAY;CACpB;AAED,sDAAsD;AACtD,oBAAY,aAAa;IACvB,iGAAiG;IACjG,QAAQ,aAAa;IACrB,sGAAsG;IACtG,MAAM,WAAW;CAClB"}
@@ -3,7 +3,7 @@ var NotifyType = /* @__PURE__ */ function(NotifyType) {
3
3
  NotifyType["SUCCESS"] = "success";
4
4
  NotifyType["WARN"] = "warn";
5
5
  NotifyType["DANGER"] = "danger";
6
- /** Something in progress, shown with a spinner until it is updated to another type. */
6
+ /** Something in progress, shown with a spinner until it is updated to another type. Its toast stays on screen until then. */
7
7
  NotifyType["PENDING"] = "pending";
8
8
  return NotifyType;
9
9
  }({});
@@ -1 +1 @@
1
- {"version":3,"file":"notifyCenter.d.ts","sourceRoot":"","sources":["../../../../../src/components/Notify/models/notifyCenter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAe,UAAU,EAAE,WAAW,EAAC,MAAM,SAAS,CAAA;AAE/E,OAAO,EAAC,KAAK,WAAW,EAAE,KAAK,GAAG,EAAgC,MAAM,KAAK,CAAA;AAO7E,OAAO,EAAC,YAAY,EAAC,MAAM,sBAAsB,CAAA;AAEjD,OAAO,EAAgB,UAAU,EAAC,MAAM,cAAc,CAAA;AAEtD,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,UAAU,EAAE,YAAY,CAKtE,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,UAAU,EAAE,YAAY,CAK9D,CAAA;AAgBD,gEAAgE;AAChE,eAAO,MAAM,kBAAkB,uBAAa,CAAA;AAE5C,eAAO,MAAM,iBAAiB,EAAE,WAAW,CAAC,UAAU,EAAE,CAA+B,CAAA;AAIvF,eAAO,MAAM,eAAe,GAAI,MAAM,UAAU,YAAqC,CAAA;AAErF,eAAO,MAAM,uBAAuB,EAAE,WAAW,CAAC,UAAU,EAAE,CAAwD,CAAA;AA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H,eAAO,MAAM,eAAe,GAAI,OAAO,OAAO,KAAG,IAWhD,CAAA;AAuDD,iGAAiG;AACjG,eAAO,MAAM,SAAS,GAAI,QAAQ,YAAY,KAAG,MAAM,GAAG,SA2BzD,CAAA;AAED,0FAA0F;AAC1F,eAAO,MAAM,YAAY,GAAI,IAAI,MAAM,EAAE,OAAO,WAAW,KAAG,IAY7D,CAAA;AAUD,6DAA6D;AAC7D,eAAO,MAAM,aAAa,GAAI,IAAI,MAAM,KAAG,IAI1C,CAAA;AAED,gGAAgG;AAChG,eAAO,MAAM,YAAY,GAAI,IAAI,MAAM,KAAG,IAQzC,CAAA;AAED,eAAO,MAAM,iBAAiB,GAAI,OAAO,UAAU,KAAG,IAWrD,CAAA;AAED,qGAAqG;AACrG,eAAO,MAAM,kBAAkB,QAAO,IAErC,CAAA;AAID,8EAA8E;AAC9E,eAAO,MAAM,oBAAoB,GAAI,OAAO,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,KAAG,IAEjE,CAAA;AAED,mFAAmF;AACnF,eAAO,MAAM,iBAAiB,QAAO,IAEpC,CAAA"}
@@ -36,6 +36,8 @@ var isNotifyCenterOpen = ref(false);
36
36
  var notifyCenterItems = computed(() => items.value);
37
37
  var isActionRequired = (item) => item.channel === NotifyChannel.ACTION;
38
38
  var isNotifyPending = (item) => item.type === NotifyType.PENDING;
39
+ /** Stays on screen until the user closes it or, for a pending one, until it finishes. */
40
+ var isToastPinned = (item) => isActionRequired(item) || isNotifyPending(item);
39
41
  var notifyCenterActionItems = computed(() => items.value.filter(isActionRequired));
40
42
  var notifyCenterActivityItems = computed(() => items.value.filter((item) => !isActionRequired(item)));
41
43
  var getNotifyItemKey = (item) => item.items ? `group:${item.key}` : `item:${item.id}`;
@@ -102,7 +104,7 @@ var getToastGroupIds = (id) => {
102
104
  var hideToastGroup = (id) => {
103
105
  const ids = getToastGroupIds(id).filter((value) => {
104
106
  const item = findItem(value);
105
- return value === id || !item || !isActionRequired(item);
107
+ return value === id || !item || !isToastPinned(item);
106
108
  });
107
109
  ids.forEach(clearToastTimer);
108
110
  toastIds.value = toastIds.value.filter((value) => !ids.includes(value));
@@ -114,7 +116,7 @@ var startToastTimer = (timer, id) => {
114
116
  var scheduleToastHide = (id) => {
115
117
  clearToastTimer(id);
116
118
  const item = findItem(id);
117
- if (item && isActionRequired(item)) return;
119
+ if (item && isToastPinned(item)) return;
118
120
  const timer = {
119
121
  remaining: TOAST_DELAY,
120
122
  startedAt: 0
@@ -2,6 +2,8 @@ import { LinkProps } from '../../types/types';
2
2
  interface Props extends LinkProps {
3
3
  /** URL of a plain link, used when `to` is empty. */
4
4
  href?: string;
5
+ /** Replaces the current history entry instead of adding one, with `to`. */
6
+ replace?: boolean;
5
7
  }
6
8
  type __VLS_Slots = {
7
9
  /** Content of the link. */
@@ -1 +1 @@
1
- {"version":3,"file":"WRouterLink.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/RouterLink/WRouterLink.vue"],"names":[],"mappings":"AAQA;AA+BA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,eAAe,CAAA;AAK5C,UAAU,KAAM,SAAQ,SAAS;IAC/B,oDAAoD;IACpD,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAKD,KAAK,WAAW,GAAG;IACjB,2BAA2B;IAC3B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB,CAAC;AA0CF,QAAA,MAAM,UAAU,sRAEd,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
+ {"version":3,"file":"WRouterLink.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/RouterLink/WRouterLink.vue"],"names":[],"mappings":"AAQA;AAiCA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,eAAe,CAAA;AAK5C,UAAU,KAAM,SAAQ,SAAS;IAC/B,oDAAoD;IACpD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,2EAA2E;IAC3E,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAKD,KAAK,WAAW,GAAG;IACjB,2BAA2B;IAC3B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB,CAAC;AA0CF,QAAA,MAAM,UAAU,sRAEd,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"}
@@ -4,12 +4,16 @@ var WRouterLink_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
4
4
  __name: "WRouterLink",
5
5
  props: {
6
6
  href: {},
7
+ replace: { type: Boolean },
7
8
  to: {}
8
9
  },
9
10
  setup(__props) {
10
11
  const RouterLinkComponent = getCurrentInstance()?.appContext.components.RouterLink;
11
12
  return (_ctx, _cache) => {
12
- return openBlock(), createBlock(resolveDynamicComponent(__props.to && unref(RouterLinkComponent) ? unref(RouterLinkComponent) : "a"), normalizeProps(guardReactiveProps(__props.to && unref(RouterLinkComponent) ? { to: __props.to } : { href: __props.href })), {
13
+ return openBlock(), createBlock(resolveDynamicComponent(__props.to && unref(RouterLinkComponent) ? unref(RouterLinkComponent) : "a"), normalizeProps(guardReactiveProps(__props.to && unref(RouterLinkComponent) ? {
14
+ to: __props.to,
15
+ replace: __props.replace
16
+ } : { href: __props.href })), {
13
17
  default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
14
18
  _: 3
15
19
  }, 16);
@@ -1 +1 @@
1
- {"version":3,"file":"WTabs.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Tabs/WTabs.vue"],"names":[],"mappings":"AA6KA;AAqjBA,OAAO,KAAK,EAAgB,SAAS,EAAC,MAAM,SAAS,CAAA;AAErD,OAAO,EAA0D,KAAK,KAAK,EAAqH,MAAM,KAAK,CAAA;AAkD3M,KAAK,WAAW,GAAG;IACjB,2EAA2E;IAC3E,OAAO,EAAE,MAAM,KAAK,EAAE,CAAA;CACvB,CAAC;AAuwBF,QAAA,MAAM,UAAU;2BA5pBc,MAAM;yBAIR,MAAM;gCAuEG,OAAO,CAAC,IAAI,CAAC;oBAM7B,IAAI;iBAIL,MAAM,UAAU,OAAO;;;;;;;;;;;;;;;;;;;;;kFA2kBzC,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
+ {"version":3,"file":"WTabs.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Tabs/WTabs.vue"],"names":[],"mappings":"AA8KA;AAykBA,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;AA4xBF,QAAA,MAAM,UAAU;2BA1qBc,MAAM;yBAIR,MAAM;gCAkFG,OAAO,CAAC,IAAI,CAAC;oBAM7B,IAAI;iBAIL,MAAM,UAAU,OAAO;;;;;;;;;;;;;;;;;;;;;kFA8kBzC,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wB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