eco-vue-js 0.23.1 → 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.
- package/dist/assets/icons/IconInfo.js +27 -0
- package/dist/components/Button/WButtonSelection.vue.d.ts +5 -1
- package/dist/components/Button/WButtonSelection.vue.d.ts.map +1 -1
- package/dist/components/Button/WButtonSelection.vue_vue_type_script_setup_true_lang.js +68 -48
- package/dist/components/Button/WButtonSelectionAction.vue.d.ts +2 -0
- package/dist/components/Button/WButtonSelectionAction.vue.d.ts.map +1 -1
- package/dist/components/Button/WButtonSelectionAction.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/components/Button/WButtonTab.vue.d.ts +4 -1
- package/dist/components/Button/WButtonTab.vue.d.ts.map +1 -1
- package/dist/components/Button/WButtonTab.vue_vue_type_script_setup_true_lang.js +94 -81
- package/dist/components/FieldWrapper/WFieldWrapper.vue.d.ts.map +1 -1
- package/dist/components/FieldWrapper/WFieldWrapper.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/HeaderBar/WHeaderBar.vue.d.ts +1 -1
- package/dist/components/HeaderBar/WHeaderBar.vue.d.ts.map +1 -1
- package/dist/components/HeaderBar/WHeaderBar.vue_vue_type_script_setup_true_lang.js +63 -7
- package/dist/components/InfiniteList/components/InfiniteListHeaderPadding.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/components/InfiniteListHeaderPadding.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/components/InfoCard/WInfoCard.vue.d.ts +2 -0
- package/dist/components/InfoCard/WInfoCard.vue.d.ts.map +1 -1
- package/dist/components/InfoCard/WInfoCard.vue_vue_type_script_setup_true_lang.js +5 -8
- package/dist/components/Input/WInput.vue.d.ts +5 -5
- package/dist/components/Input/WInput.vue.d.ts.map +1 -1
- package/dist/components/Input/WInput.vue_vue_type_script_setup_true_lang.js +10 -7
- package/dist/components/Input/WInputAsync.vue.d.ts +5 -5
- package/dist/components/Input/WInputAsync.vue.d.ts.map +1 -1
- package/dist/components/Input/WInputAsync.vue_vue_type_script_setup_true_lang.js +5 -1
- package/dist/components/Input/WInputOptions.vue.d.ts +3 -3
- package/dist/components/Input/WInputOptions.vue.d.ts.map +1 -1
- package/dist/components/Input/WInputOptions.vue_vue_type_script_setup_true_lang.js +8 -2
- package/dist/components/Input/WInputSuggest.vue.d.ts +5 -5
- package/dist/components/Input/WInputSuggest.vue.d.ts.map +1 -1
- package/dist/components/Input/WInputSuggest.vue_vue_type_script_setup_true_lang.js +4 -0
- package/dist/components/Input/models/useInputAsync.d.ts +2 -2
- package/dist/components/Input/models/useInputAsync.d.ts.map +1 -1
- package/dist/components/Input/models/useInputAsync.js +3 -3
- package/dist/components/Input/types.d.ts +9 -6
- package/dist/components/Input/types.d.ts.map +1 -1
- package/dist/components/Link/WLink.vue.d.ts.map +1 -1
- package/dist/components/Link/WLink.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/List/WList.vue.d.ts +2 -0
- package/dist/components/List/WList.vue.d.ts.map +1 -1
- package/dist/components/List/WList.vue_vue_type_script_setup_true_lang.js +17 -9
- package/dist/components/List/WListFilter.vue.d.ts +2 -0
- package/dist/components/List/WListFilter.vue.d.ts.map +1 -1
- package/dist/components/List/WListFilter.vue_vue_type_script_setup_true_lang.js +3 -0
- package/dist/components/List/WListHeaderItem.vue.d.ts.map +1 -1
- package/dist/components/List/WListHeaderItem.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/List/components/HeaderSort.vue.d.ts.map +1 -1
- package/dist/components/List/components/HeaderSort.vue_vue_type_script_setup_true_lang.js +14 -9
- package/dist/components/List/components/ListFilterChip.vue.d.ts +24 -0
- package/dist/components/List/components/ListFilterChip.vue.d.ts.map +1 -0
- package/dist/components/List/components/ListFilterChip.vue.js +5 -0
- package/dist/components/List/components/ListFilterChip.vue_vue_type_script_setup_true_lang.js +77 -0
- package/dist/components/List/components/ListFilterGlobal.vue.d.ts +1 -0
- package/dist/components/List/components/ListFilterGlobal.vue.d.ts.map +1 -1
- package/dist/components/List/components/ListFilterGlobal.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/components/List/components/ListFilterGlobalItem.vue.d.ts +7 -1
- package/dist/components/List/components/ListFilterGlobalItem.vue.d.ts.map +1 -1
- package/dist/components/List/components/ListFilterGlobalItem.vue_vue_type_script_setup_true_lang.js +16 -7
- package/dist/components/List/components/ListFilterLocal.vue.d.ts +1 -0
- package/dist/components/List/components/ListFilterLocal.vue.d.ts.map +1 -1
- package/dist/components/List/components/ListFilterLocal.vue_vue_type_script_setup_true_lang.js +186 -26
- package/dist/components/List/components/ListFilterLocalItem.vue.d.ts +3 -0
- package/dist/components/List/components/ListFilterLocalItem.vue.d.ts.map +1 -1
- package/dist/components/List/components/ListFilterLocalItem.vue_vue_type_script_setup_true_lang.js +37 -32
- package/dist/components/List/components/ListFilterSearch.vue_vue_type_script_setup_true_lang.js +2 -6
- package/dist/components/List/components/ListToolbar.vue.d.ts +1 -0
- package/dist/components/List/components/ListToolbar.vue.d.ts.map +1 -1
- package/dist/components/List/components/ListToolbar.vue_vue_type_script_setup_true_lang.js +99 -76
- package/dist/components/List/components/ListToolbarFilter.vue.d.ts +14 -0
- package/dist/components/List/components/ListToolbarFilter.vue.d.ts.map +1 -0
- package/dist/components/List/components/ListToolbarFilter.vue.js +5 -0
- package/dist/components/List/components/ListToolbarFilter.vue_vue_type_script_setup_true_lang.js +14 -0
- package/dist/components/List/models/toolbar.d.ts +4 -0
- package/dist/components/List/models/toolbar.d.ts.map +1 -0
- package/dist/components/List/models/toolbar.js +5 -0
- package/dist/components/List/types.d.ts +2 -0
- package/dist/components/List/types.d.ts.map +1 -1
- package/dist/components/List/use/useListConfig.d.ts.map +1 -1
- package/dist/components/List/use/useListConfig.js +9 -1
- package/dist/components/Nav/WNavItem.vue.d.ts.map +1 -1
- package/dist/components/Nav/WNavItem.vue_vue_type_script_setup_true_lang.js +28 -20
- package/dist/components/Nav/types.d.ts +1 -1
- package/dist/components/Notify/WNotify.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/components/Notify/models/NotifyType.d.ts +1 -1
- package/dist/components/Notify/models/NotifyType.d.ts.map +1 -1
- package/dist/components/Notify/models/NotifyType.js +1 -1
- package/dist/components/Notify/models/notifyCenter.d.ts.map +1 -1
- package/dist/components/Notify/models/notifyCenter.js +4 -2
- package/dist/components/RouterLink/WRouterLink.vue.d.ts +2 -0
- package/dist/components/RouterLink/WRouterLink.vue.d.ts.map +1 -1
- package/dist/components/RouterLink/WRouterLink.vue_vue_type_script_setup_true_lang.js +5 -1
- package/dist/components/Select/WSelectAsyncSingle.vue.d.ts.map +1 -1
- package/dist/components/Select/WSelectAsyncSingle.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/Select/WSelectSingle.vue.d.ts.map +1 -1
- package/dist/components/Select/WSelectSingle.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/Select/types.d.ts +1 -1
- package/dist/components/Select/types.d.ts.map +1 -1
- package/dist/components/Slider/WSlider.vue.d.ts.map +1 -1
- package/dist/components/Slider/WSlider.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/components/Slider/WSliderRange.vue.d.ts.map +1 -1
- package/dist/components/Slider/WSliderRange.vue_vue_type_script_setup_true_lang.js +3 -4
- package/dist/components/Tabs/WTabs.vue.d.ts.map +1 -1
- package/dist/components/Tabs/WTabs.vue_vue_type_script_setup_true_lang.js +24 -6
- package/dist/components/Tabs/WTabsItem.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/components/Tabs/components/TabTitleButton.vue.d.ts +2 -0
- package/dist/components/Tabs/components/TabTitleButton.vue.d.ts.map +1 -1
- package/dist/components/Tabs/components/TabTitleButton.vue_vue_type_script_setup_true_lang.js +5 -2
- package/dist/components/Tabs/types.d.ts +10 -1
- package/dist/components/Tabs/types.d.ts.map +1 -1
- package/dist/composables/useOptionalRouter.d.ts +6 -2
- package/dist/composables/useOptionalRouter.d.ts.map +1 -1
- package/dist/composables/useOptionalRouter.js +21 -2
- package/dist/main.d.ts +3 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +5 -2
- package/dist/utils/queryCache.d.ts +5 -0
- package/dist/utils/queryCache.d.ts.map +1 -1
- package/dist/utils/queryCache.js +18 -1
- package/dist/utils/useClearValue.d.ts +4 -0
- package/dist/utils/useClearValue.d.ts.map +1 -0
- package/dist/{components/Select/models → utils}/useClearValue.js +3 -3
- package/dist/utils/useDefaultQuery.d.ts +7 -1
- package/dist/utils/useDefaultQuery.d.ts.map +1 -1
- package/dist/utils/useDefaultQuery.js +20 -9
- package/dist/utils/useRouteTitle.d.ts +22 -0
- package/dist/utils/useRouteTitle.d.ts.map +1 -0
- package/dist/utils/useRouteTitle.js +75 -0
- package/dist/utils/utils.d.ts.map +1 -1
- package/dist/utils/utils.js +13 -5
- package/docs/components/click-outside.md +1 -1
- package/docs/components/header-bar.md +30 -1
- package/docs/components/info-card.md +1 -0
- package/docs/components/input.md +13 -9
- package/docs/components/links.md +1 -0
- package/docs/components/list.md +12 -2
- package/docs/components/nav-bar.md +1 -1
- package/docs/components/notify.md +2 -2
- package/docs/components/tabs.md +18 -3
- package/docs/icons.md +2 -2
- package/docs/llms.txt +1 -1
- package/docs/recipes/list-with-fields.md +33 -21
- package/package.json +7 -1
- package/tailwind-base/css/default.css +9 -0
- package/tailwind-base/css/internal-variables.css +5 -0
- package/dist/components/Select/models/useClearValue.d.ts +0 -5
- package/dist/components/Select/models/useClearValue.d.ts.map +0 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { createElementBlock, createElementVNode, openBlock } from "vue";
|
|
2
|
+
//#region src/assets/icons/IconInfo.svg?component
|
|
3
|
+
var _hoisted_1 = {
|
|
4
|
+
width: "20",
|
|
5
|
+
height: "20",
|
|
6
|
+
viewBox: "0 0 24 24",
|
|
7
|
+
fill: "none",
|
|
8
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
9
|
+
};
|
|
10
|
+
function render(_ctx, _cache) {
|
|
11
|
+
return openBlock(), createElementBlock("svg", _hoisted_1, [..._cache[0] || (_cache[0] = [createElementVNode("path", {
|
|
12
|
+
d: "M12 2c5.5 0 10 4.5 10 10s-4.5 10-10 10S2 17.5 2 12 6.5 2 12 2m0 14v-5",
|
|
13
|
+
stroke: "currentcolor",
|
|
14
|
+
"stroke-linecap": "round",
|
|
15
|
+
"stroke-linejoin": "round",
|
|
16
|
+
"stroke-width": "1.5"
|
|
17
|
+
}, null, -1), createElementVNode("path", {
|
|
18
|
+
d: "M12 8z",
|
|
19
|
+
stroke: "currentcolor",
|
|
20
|
+
"stroke-linecap": "round",
|
|
21
|
+
"stroke-linejoin": "round",
|
|
22
|
+
"stroke-width": "2"
|
|
23
|
+
}, null, -1)])]);
|
|
24
|
+
}
|
|
25
|
+
var IconInfo_default = { render };
|
|
26
|
+
//#endregion
|
|
27
|
+
export { IconInfo_default as default, render };
|
|
@@ -23,8 +23,12 @@ type __VLS_Slots = {
|
|
|
23
23
|
cssClass: string;
|
|
24
24
|
visibleCount: number;
|
|
25
25
|
}) => VNode[];
|
|
26
|
+
/** Filters at the start of the bar while nothing is selected. The actions then move to the end, beside `settings`, and the selection replaces the filters. */
|
|
27
|
+
filter?: () => VNode[];
|
|
26
28
|
/** Content at the end of the bar while nothing is selected, such as list settings. */
|
|
27
|
-
settings?: (
|
|
29
|
+
settings?: (props: {
|
|
30
|
+
isFilterShown: boolean;
|
|
31
|
+
}) => VNode[];
|
|
28
32
|
};
|
|
29
33
|
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
30
34
|
"clear:selection": () => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WButtonSelection.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/WButtonSelection.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WButtonSelection.vue.d.ts","s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
|
|
@@ -3,16 +3,12 @@ import IconMore_default from "../../assets/icons/IconMore.js";
|
|
|
3
3
|
import WDropdownAdaptive_default from "../DropdownMenu/WDropdownAdaptive.vue.js";
|
|
4
4
|
import WButtonSelectionAction_default from "./WButtonSelectionAction.vue.js";
|
|
5
5
|
import WButtonSelectionState_default from "./WButtonSelectionState.vue.js";
|
|
6
|
-
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, guardReactiveProps, inject, markRaw, mergeProps, normalizeProps, onBeforeUnmount, onMounted, onUpdated, openBlock, provide, ref, renderSlot, toDisplayString, unref, useTemplateRef, withCtx } from "vue";
|
|
6
|
+
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, guardReactiveProps, inject, markRaw, mergeProps, normalizeClass, normalizeProps, normalizeStyle, onBeforeUnmount, onMounted, onUpdated, openBlock, provide, ref, renderSlot, toDisplayString, unref, useSlots, useTemplateRef, vShow, withCtx, withDirectives } from "vue";
|
|
7
7
|
//#region src/components/Button/WButtonSelection.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
-
var _hoisted_1 = { class: "
|
|
9
|
-
var _hoisted_2 = {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
var _hoisted_3 = { class: "py-2 grid" };
|
|
14
|
-
var _hoisted_4 = { class: "tone-primary text-tone font-semibold" };
|
|
15
|
-
var _hoisted_5 = { class: "sm-not:text-xs" };
|
|
8
|
+
var _hoisted_1 = { class: "py-2 grid" };
|
|
9
|
+
var _hoisted_2 = { class: "tone-primary text-tone font-semibold" };
|
|
10
|
+
var _hoisted_3 = { class: "sm-not:text-xs" };
|
|
11
|
+
var cellClass = "[--w-input-height:var(--w-list-toolbar-height,var(--w-list-toolbar-inherited-height))] [--w-button-height:var(--w-list-toolbar-height,var(--w-list-toolbar-inherited-height))]";
|
|
16
12
|
var WButtonSelection_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
17
13
|
__name: "WButtonSelection",
|
|
18
14
|
props: {
|
|
@@ -33,6 +29,7 @@ var WButtonSelection_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
33
29
|
const isOverflowing = ref(false);
|
|
34
30
|
const widths = /* @__PURE__ */ new WeakMap();
|
|
35
31
|
let moreWidth = 0;
|
|
32
|
+
const actionsMinWidth = ref(0);
|
|
36
33
|
const isShown = (element) => element.getClientRects().length > 0;
|
|
37
34
|
const update = () => {
|
|
38
35
|
const row = rowRef.value;
|
|
@@ -50,7 +47,9 @@ var WButtonSelection_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
50
47
|
return;
|
|
51
48
|
}
|
|
52
49
|
const available = row.clientWidth;
|
|
53
|
-
|
|
50
|
+
const total = items.reduce((sum, element) => sum + widths.get(element), 0);
|
|
51
|
+
actionsMinWidth.value = Math.ceil(more ? moreWidth : total);
|
|
52
|
+
if (total <= available || !more) {
|
|
54
53
|
visibleCount.value = Infinity;
|
|
55
54
|
isOverflowing.value = false;
|
|
56
55
|
return;
|
|
@@ -80,47 +79,68 @@ var WButtonSelection_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
80
79
|
observer?.disconnect();
|
|
81
80
|
observer = null;
|
|
82
81
|
});
|
|
82
|
+
const slots = useSlots();
|
|
83
|
+
const isFilterShown = computed(() => !!slots.filter && !props.selectedCount);
|
|
83
84
|
return (_ctx, _cache) => {
|
|
84
|
-
return openBlock(), createElementBlock("div",
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
"
|
|
98
|
-
|
|
99
|
-
class: ["shrink-0 border-l border-solid border-line", { hidden: !isOverflowing.value }]
|
|
100
|
-
}, { "data-selection-more": "" }, { onClick: _cache[0] || (_cache[0] = ($event) => isOpen.value = !isOpen.value) }), null, 16, [
|
|
101
|
-
"icon",
|
|
102
|
-
"aria-expanded",
|
|
103
|
-
"disable-message",
|
|
104
|
-
"class"
|
|
105
|
-
])]),
|
|
106
|
-
header: withCtx(() => [..._cache[3] || (_cache[3] = [createTextVNode(" More ", -1)])]),
|
|
107
|
-
content: withCtx(() => [createElementVNode("div", _hoisted_3, [renderSlot(_ctx.$slots, "more", normalizeProps(guardReactiveProps({
|
|
85
|
+
return openBlock(), createElementBlock("div", {
|
|
86
|
+
class: normalizeClass(["list:left---left-inner list:w---width-inner list:sticky grid w-full pb-3 [--w-list-toolbar-inherited-height:var(--w-input-height,2.75rem)]", {
|
|
87
|
+
"grid-cols-[1fr_auto]": !isFilterShown.value,
|
|
88
|
+
"w-selection-filter-grid": isFilterShown.value
|
|
89
|
+
}]),
|
|
90
|
+
style: normalizeStyle(actionsMinWidth.value ? { "--w-selection-actions-width": `${actionsMinWidth.value}px` } : void 0)
|
|
91
|
+
}, [
|
|
92
|
+
_ctx.$slots.filter ? withDirectives((openBlock(), createElementBlock("div", {
|
|
93
|
+
key: 0,
|
|
94
|
+
class: normalizeClass([cellClass, "min-w-0 sm:mr-12 sm-not:col-span-full sm-not:mr-0 sm-not:mb-2 sm-not:px-(--w-list-padding,1rem)"])
|
|
95
|
+
}, [renderSlot(_ctx.$slots, "filter")], 512)), [[vShow, isFilterShown.value]]) : createCommentVNode("", true),
|
|
96
|
+
createElementVNode("div", {
|
|
97
|
+
ref: "row",
|
|
98
|
+
class: normalizeClass(["flex min-w-0", [cellClass, { "justify-end": isFilterShown.value }]])
|
|
99
|
+
}, [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({
|
|
108
100
|
disableMessage: disableMessageValue.value,
|
|
109
|
-
cssClass: "",
|
|
101
|
+
cssClass: "shrink-0 first-not:border-l border-solid border-line",
|
|
110
102
|
visibleCount: visibleCount.value
|
|
111
|
-
})))
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
103
|
+
}))), _ctx.$slots.more ? (openBlock(), createBlock(WDropdownAdaptive_default, {
|
|
104
|
+
key: 0,
|
|
105
|
+
"is-open": isOpen.value,
|
|
106
|
+
"close-on-click": "",
|
|
107
|
+
onClose: _cache[1] || (_cache[1] = ($event) => isOpen.value = false)
|
|
108
|
+
}, {
|
|
109
|
+
toggle: withCtx(() => [createVNode(WButtonSelectionAction_default, mergeProps({
|
|
110
|
+
title: "More",
|
|
111
|
+
icon: markRaw(unref(IconMore_default)),
|
|
112
|
+
"aria-expanded": isOpen.value,
|
|
113
|
+
"disable-message": isFilterShown.value ? void 0 : disableMessageValue.value,
|
|
114
|
+
class: ["shrink-0 border-solid border-line", {
|
|
115
|
+
hidden: !isOverflowing.value,
|
|
116
|
+
"border-l": !isFilterShown.value || visibleCount.value !== 0
|
|
117
|
+
}]
|
|
118
|
+
}, { "data-selection-more": "" }, { onClick: _cache[0] || (_cache[0] = ($event) => isOpen.value = !isOpen.value) }), null, 16, [
|
|
119
|
+
"icon",
|
|
120
|
+
"aria-expanded",
|
|
121
|
+
"disable-message",
|
|
122
|
+
"class"
|
|
123
|
+
])]),
|
|
124
|
+
header: withCtx(() => [..._cache[3] || (_cache[3] = [createTextVNode(" More ", -1)])]),
|
|
125
|
+
content: withCtx(() => [createElementVNode("div", _hoisted_1, [renderSlot(_ctx.$slots, "more", normalizeProps(guardReactiveProps({
|
|
126
|
+
disableMessage: disableMessageValue.value,
|
|
127
|
+
cssClass: "",
|
|
128
|
+
visibleCount: visibleCount.value
|
|
129
|
+
})))])]),
|
|
130
|
+
_: 3
|
|
131
|
+
}, 8, ["is-open"])) : createCommentVNode("", true)], 2),
|
|
132
|
+
createElementVNode("div", { class: normalizeClass(cellClass) }, [__props.selectedCount ? (openBlock(), createBlock(WButtonSelectionState_default, {
|
|
133
|
+
key: 0,
|
|
134
|
+
onClick: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("clear:selection"))
|
|
135
|
+
}, {
|
|
136
|
+
default: withCtx(() => [
|
|
137
|
+
_cache[4] || (_cache[4] = createElementVNode("span", { class: "sm-not:hidden" }, "Selected\xA0", -1)),
|
|
138
|
+
createElementVNode("span", _hoisted_2, toDisplayString(unref(numberFormatter).format(__props.selectedCount)), 1),
|
|
139
|
+
createElementVNode("span", _hoisted_3, "\xA0" + toDisplayString(__props.title) + toDisplayString(__props.selectedCount === 1 ? "" : "s"), 1)
|
|
140
|
+
]),
|
|
141
|
+
_: 1
|
|
142
|
+
})) : renderSlot(_ctx.$slots, "settings", normalizeProps(guardReactiveProps({ isFilterShown: isFilterShown.value })), void 0, void 0, 1)])
|
|
143
|
+
], 6);
|
|
124
144
|
};
|
|
125
145
|
}
|
|
126
146
|
});
|
|
@@ -28,6 +28,8 @@ type __VLS_Props = {
|
|
|
28
28
|
replace?: boolean;
|
|
29
29
|
};
|
|
30
30
|
type __VLS_Slots = {
|
|
31
|
+
/** Slot for absolute positioned content, like counter */
|
|
32
|
+
default?: () => void;
|
|
31
33
|
/** Rich content of the tooltip, replacing `disableMessage` or `tooltipText`. */
|
|
32
34
|
tooltip?: () => void;
|
|
33
35
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WButtonSelectionAction.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/WButtonSelectionAction.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WButtonSelectionAction.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/WButtonSelectionAction.vue"],"names":[],"mappings":"AA2EA;AAAA,OAmIO,KAAK,EAAC,SAAS,EAAC,MAAM,eAAe,CAAA;AAS5C,KAAK,WAAW,GAAG;IACjB,sEAAsE;IACtE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,wEAAwE;IACxE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,0BAA0B;IAC1B,IAAI,EAAE,YAAY,CAAA;IAClB,wFAAwF;IACxF,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,6DAA6D;IAC7D,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,0DAA0D;IAC1D,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,oBAAoB;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,sFAAsF;IACtF,EAAE,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC,CAAA;IACpB,4FAA4F;IAC5F,GAAG,CAAC,EAAE,MAAM,qBAAqB,CAAA;IACjC,kCAAkC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,sCAAsC;IACtC,MAAM,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAA;IAChD,2EAA2E;IAC3E,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAC;AASF,KAAK,WAAW,GAAG;IACjB,yDAAyD;IACzD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,gFAAgF;IAChF,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB,CAAC;AAiOF,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"}
|
package/dist/components/Button/WButtonSelectionAction.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -66,7 +66,8 @@ var WButtonSelectionAction_vue_vue_type_script_setup_true_lang_default = /*@__PU
|
|
|
66
66
|
fn: withCtx(() => [renderSlot(_ctx.$slots, "tooltip")]),
|
|
67
67
|
key: "0"
|
|
68
68
|
} : void 0]), 1032, ["text"])) : createCommentVNode("", true),
|
|
69
|
-
!__props.disabled && !__props.disableMessage && !__props.loading && !unref(overlay) ? (openBlock(), createBlock(WShine_default, { key: 2 })) : createCommentVNode("", true)
|
|
69
|
+
!__props.disabled && !__props.disableMessage && !__props.loading && !unref(overlay) ? (openBlock(), createBlock(WShine_default, { key: 2 })) : createCommentVNode("", true),
|
|
70
|
+
renderSlot(_ctx.$slots, "default")
|
|
70
71
|
]),
|
|
71
72
|
_: 3
|
|
72
73
|
}, 16, [
|
|
@@ -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;
|
|
@@ -23,8 +24,10 @@ type __VLS_Props = {
|
|
|
23
24
|
showHasValue?: boolean;
|
|
24
25
|
/** Scrolls a title that doesn't fit into view on hover. */
|
|
25
26
|
enableOverflow?: boolean;
|
|
26
|
-
/** Number shown in
|
|
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":"
|
|
1
|
+
{"version":3,"file":"WButtonTab.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/WButtonTab.vue"],"names":[],"mappings":"AAiJA;AA4MA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,eAAe,CAAA;AAa5C,KAAK,WAAW,GAAG;IACjB,uEAAuE;IACvE,MAAM,CAAC,EAAE,OAAO,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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 =
|
|
11
|
-
var _hoisted_2 = {
|
|
11
|
+
var _hoisted_1 = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "p-8"
|
|
14
14
|
};
|
|
@@ -27,100 +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(),
|
|
36
|
-
|
|
37
|
-
|
|
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
|
-
}
|
|
47
|
-
"
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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:
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}, [
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
_: 1
|
|
80
|
-
})) : createCommentVNode("", true), createTextVNode(" " + toDisplayString(__props.title) + " " + toDisplayString(__props.count !== void 0 ? `(${unref(numberFormatter).format(__props.count)})` : ""), 1)]),
|
|
81
|
-
_: 1
|
|
82
|
-
}))], 2),
|
|
83
|
-
__props.statusIcon ? (openBlock(), createBlock(WStatusIcon_default, {
|
|
84
|
-
key: 0,
|
|
85
|
-
"has-value": __props.hasValue,
|
|
86
|
-
"has-error": __props.hasError,
|
|
87
|
-
class: "sm-not:mr---inner-margin square-4 ml-auto mr-4"
|
|
88
|
-
}, null, 8, ["has-value", "has-error"])) : createCommentVNode("", true),
|
|
89
|
-
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({
|
|
90
69
|
hasChanges: __props.hasChanges,
|
|
91
70
|
hasError: __props.hasError,
|
|
92
71
|
hasValue: __props.hasValue
|
|
93
|
-
})))
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
"enter-from-class": "opacity-0",
|
|
99
|
-
"leave-to-class": "opacity-0"
|
|
100
|
-
}, {
|
|
101
|
-
default: withCtx(() => [__props.hasChanges ? (openBlock(), createElementBlock("div", {
|
|
102
|
-
key: 0,
|
|
103
|
-
class: normalizeClass(["square-2 absolute right-1 top-1 rounded-full transition-colors duration-200", {
|
|
104
|
-
"tone-info bg-tone-fill": !__props.hasError,
|
|
105
|
-
"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
|
|
106
77
|
}])
|
|
107
|
-
},
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
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"]);
|
|
124
137
|
};
|
|
125
138
|
}
|
|
126
139
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WFieldWrapper.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/FieldWrapper/WFieldWrapper.vue"],"names":[],"mappings":"AAqLA;AAkUA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAA;AAE9C,OAAO,EAAkB,KAAK,KAAK,EAAuE,MAAM,KAAK,CAAA;AAerH,KAAK,WAAW,GAAG,iBAAiB,GAAG;IACnC,uJAAuJ;IACvJ,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAC;AAyGJ,KAAK,WAAW,GAAG;IACjB,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,KAAK,EAAE,CAAA;IACrB,+CAA+C;IAC/C,QAAQ,EAAE,MAAM,KAAK,EAAE,CAAA;IACvB,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,KAAK,EAAE,CAAA;IACrB,qDAAqD;IACrD,MAAM,EAAE,MAAM,KAAK,EAAE,CAAA;IACrB,2JAA2J;IAC3J,KAAK,EAAE,CAAC,KAAK,EAAE;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAC;QAAC,UAAU,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;QAAC,UAAU,EAAE,OAAO,CAAA;KAAC,KAAK,KAAK,EAAE,CAAA;IACpH,sGAAsG;IACtG,OAAO,EAAE,CAAC,KAAK,EAAE;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAC;QAAC,UAAU,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;QAAC,UAAU,EAAE,OAAO,CAAA;KAAC,KAAK,KAAK,EAAE,CAAA;CACvH,CAAC;
|
|
1
|
+
{"version":3,"file":"WFieldWrapper.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/FieldWrapper/WFieldWrapper.vue"],"names":[],"mappings":"AAqLA;AAkUA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAA;A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A;CACD,CAAC"}
|
|
@@ -15,7 +15,7 @@ var _hoisted_2 = {
|
|
|
15
15
|
};
|
|
16
16
|
var _hoisted_3 = {
|
|
17
17
|
key: 0,
|
|
18
|
-
class: "square-2 absolute right-0 top-0 rounded-full bg-(--has-changes-bg)
|
|
18
|
+
class: "square-2 absolute right-0 top-0 rounded-full bg-(--has-changes-bg)"
|
|
19
19
|
};
|
|
20
20
|
var _hoisted_4 = {
|
|
21
21
|
key: 2,
|
|
@@ -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":"
|
|
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 = {
|
|
9
|
-
|
|
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
|
-
|
|
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:
|
|
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",
|
|
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",
|
|
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":"InfiniteListHeaderPadding.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/InfiniteList/components/InfiniteListHeaderPadding.vue"],"names":[],"mappings":"AAGA;
|
|
1
|
+
{"version":3,"file":"InfiniteListHeaderPadding.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/InfiniteList/components/InfiniteListHeaderPadding.vue"],"names":[],"mappings":"AAGA;AAsCA,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,OAAO,GAAG,IAAI,CAAA;IAC9B,YAAY,EAAE,MAAM,CAAA;CACrB,CAAC;AAqCF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAC/C,QAAA,MAAM,UAAU,kSAEd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|