@uzum-tech/ui 1.12.21 → 1.12.22
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/index.js +41 -5
- package/dist/index.prod.js +1 -1
- package/es/header/src/Header.js +4 -1
- package/es/header/src/HeaderSearchDesktop.d.ts +12 -0
- package/es/header/src/HeaderSearchDesktop.js +21 -4
- package/es/header/src/HeaderSearchMobile.d.ts +12 -0
- package/es/header/src/HeaderSearchMobile.js +8 -2
- package/es/header/src/mobile/HeaderMobile.js +18 -3
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/header/src/Header.js +4 -1
- package/lib/header/src/HeaderSearchDesktop.d.ts +12 -0
- package/lib/header/src/HeaderSearchDesktop.js +20 -3
- package/lib/header/src/HeaderSearchMobile.d.ts +12 -0
- package/lib/header/src/HeaderSearchMobile.js +7 -1
- package/lib/header/src/mobile/HeaderMobile.js +18 -3
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/web-types.json +16 -1
package/dist/index.js
CHANGED
|
@@ -126022,6 +126022,18 @@
|
|
|
126022
126022
|
(child, index) => renderGroupItem(child, item.key, index)
|
|
126023
126023
|
)));
|
|
126024
126024
|
};
|
|
126025
|
+
const renderSearchAction = () => {
|
|
126026
|
+
if (this.$slots.search) return this.$slots.search();
|
|
126027
|
+
return /* @__PURE__ */ vue.h(Button, { text: true, onClick: this.onSearchClick }, () => /* @__PURE__ */ vue.h(UIcon, { size: 24 }, () => /* @__PURE__ */ vue.h(SearchIcon, null)));
|
|
126028
|
+
};
|
|
126029
|
+
const renderPreviewAction = () => {
|
|
126030
|
+
if (this.$slots.preview) return this.$slots.preview();
|
|
126031
|
+
return /* @__PURE__ */ vue.h(Button, { text: true, onClick: this.onPreview }, () => /* @__PURE__ */ vue.h(UIcon, { size: 24 }, () => /* @__PURE__ */ vue.h(EyeIcon, null)));
|
|
126032
|
+
};
|
|
126033
|
+
const renderLogoutAction = () => {
|
|
126034
|
+
if (this.$slots.logout) return this.$slots.logout();
|
|
126035
|
+
return /* @__PURE__ */ vue.h(Button, { text: true, onClick: this.onLogout }, () => /* @__PURE__ */ vue.h(UIcon, { size: 24 }, () => /* @__PURE__ */ vue.h(LogoutIcon, null)));
|
|
126036
|
+
};
|
|
126025
126037
|
const mobileMenuContent = /* @__PURE__ */ vue.h("div", { class: mobileMenuClass, style: this.cssVars }, /* @__PURE__ */ vue.h("div", { class: `${mobileMenuClass}__header` }, this.$slots.actions ? /* @__PURE__ */ vue.h("div", { class: `${mobileMenuClass}__actions` }, this.$slots.actions()) : this.showHeaderActions ? /* @__PURE__ */ vue.h("div", { class: `${mobileMenuClass}__actions` }, /* @__PURE__ */ vue.h(
|
|
126026
126038
|
UDropdown,
|
|
126027
126039
|
{
|
|
@@ -126056,7 +126068,7 @@
|
|
|
126056
126068
|
)
|
|
126057
126069
|
}
|
|
126058
126070
|
), /* @__PURE__ */ vue.h(UFlex, { size: 24 }, {
|
|
126059
|
-
default: () => /* @__PURE__ */ vue.h(vue.Fragment, null,
|
|
126071
|
+
default: () => /* @__PURE__ */ vue.h(vue.Fragment, null, renderSearchAction(), renderPreviewAction(), renderLogoutAction())
|
|
126060
126072
|
})) : null, /* @__PURE__ */ vue.h(
|
|
126061
126073
|
Button,
|
|
126062
126074
|
{
|
|
@@ -126195,15 +126207,20 @@
|
|
|
126195
126207
|
const search = vue.ref("");
|
|
126196
126208
|
const searchText = vue.computed(() => localeRef.value.desktopSearchTitle);
|
|
126197
126209
|
const placeholder = vue.computed(() => localeRef.value.searchPlaceholder);
|
|
126210
|
+
const inputInstRef = vue.ref(null);
|
|
126211
|
+
vue.onMounted(() => {
|
|
126212
|
+
inputInstRef.value?.focus();
|
|
126213
|
+
});
|
|
126198
126214
|
return {
|
|
126199
126215
|
search,
|
|
126200
126216
|
searchText,
|
|
126201
|
-
placeholder
|
|
126217
|
+
placeholder,
|
|
126218
|
+
inputInstRef
|
|
126202
126219
|
};
|
|
126203
126220
|
},
|
|
126204
126221
|
render() {
|
|
126205
126222
|
const blockClass = `${this.mergedClsPrefix}-header-search-desktop`;
|
|
126206
|
-
|
|
126223
|
+
const content = /* @__PURE__ */ vue.h("div", { class: blockClass, style: this.cssVars }, /* @__PURE__ */ vue.h(
|
|
126207
126224
|
Button,
|
|
126208
126225
|
{
|
|
126209
126226
|
text: true,
|
|
@@ -126216,6 +126233,7 @@
|
|
|
126216
126233
|
), /* @__PURE__ */ vue.h(UFlex, { class: `${blockClass}__title`, justify: "space-between" }, /* @__PURE__ */ vue.h(UText, { variant: "title-l-medium", text: this.searchText })), /* @__PURE__ */ vue.h("div", { class: `${blockClass}__content` }, /* @__PURE__ */ vue.h("div", { class: `${blockClass}__input-wrapper` }, /* @__PURE__ */ vue.h(
|
|
126217
126234
|
UInput,
|
|
126218
126235
|
{
|
|
126236
|
+
ref: "inputInstRef",
|
|
126219
126237
|
value: this.searchValue,
|
|
126220
126238
|
class: `${blockClass}__input`,
|
|
126221
126239
|
placeholder: this.placeholder,
|
|
@@ -126240,6 +126258,15 @@
|
|
|
126240
126258
|
cssVars: this.cssVars,
|
|
126241
126259
|
onSelect: this.onResultSelect
|
|
126242
126260
|
}));
|
|
126261
|
+
if (!this.onSearchClose) return content;
|
|
126262
|
+
return vue.withDirectives(content, [
|
|
126263
|
+
[
|
|
126264
|
+
clickoutside,
|
|
126265
|
+
this.onSearchClose,
|
|
126266
|
+
void 0,
|
|
126267
|
+
{ capture: true }
|
|
126268
|
+
]
|
|
126269
|
+
]);
|
|
126243
126270
|
}
|
|
126244
126271
|
});
|
|
126245
126272
|
|
|
@@ -126488,6 +126515,7 @@
|
|
|
126488
126515
|
const searchValue = vue.ref("");
|
|
126489
126516
|
const searchResults = vue.ref([]);
|
|
126490
126517
|
const searchLoading = vue.ref(false);
|
|
126518
|
+
const inputInstRef = vue.ref(null);
|
|
126491
126519
|
const placeholder = vue.computed(() => localeRef.value.searchPlaceholder);
|
|
126492
126520
|
const handleSearch = async () => {
|
|
126493
126521
|
const query = searchValue.value.trim();
|
|
@@ -126527,11 +126555,15 @@
|
|
|
126527
126555
|
void handleSearch();
|
|
126528
126556
|
}, SEARCH_DEBOUNCE_MS);
|
|
126529
126557
|
});
|
|
126558
|
+
vue.onMounted(() => {
|
|
126559
|
+
inputInstRef.value?.focus();
|
|
126560
|
+
});
|
|
126530
126561
|
return {
|
|
126531
126562
|
placeholder,
|
|
126532
126563
|
searchValue,
|
|
126533
126564
|
searchResults,
|
|
126534
126565
|
searchLoading,
|
|
126566
|
+
inputInstRef,
|
|
126535
126567
|
handleSearchInput,
|
|
126536
126568
|
handleSearch,
|
|
126537
126569
|
handleClose,
|
|
@@ -126564,6 +126596,7 @@
|
|
|
126564
126596
|
), /* @__PURE__ */ vue.h("div", { class: `${blockClass}__input-wrapper` }, /* @__PURE__ */ vue.h(UIcon, { size: 20, class: `${blockClass}__input-icon` }, () => /* @__PURE__ */ vue.h(SearchIcon, null)), /* @__PURE__ */ vue.h(
|
|
126565
126597
|
UInput,
|
|
126566
126598
|
{
|
|
126599
|
+
ref: "inputInstRef",
|
|
126567
126600
|
value: this.searchValue,
|
|
126568
126601
|
placeholder: this.placeholder,
|
|
126569
126602
|
onKeyup: (e) => {
|
|
@@ -126997,7 +127030,10 @@
|
|
|
126997
127030
|
},
|
|
126998
127031
|
{
|
|
126999
127032
|
actions: $slots["mobile-actions"],
|
|
127000
|
-
footer: $slots["mobile-footer"]
|
|
127033
|
+
footer: $slots["mobile-footer"],
|
|
127034
|
+
search: $slots["mobile-search"],
|
|
127035
|
+
preview: $slots["mobile-preview"],
|
|
127036
|
+
logout: $slots["mobile-logout"]
|
|
127001
127037
|
}
|
|
127002
127038
|
) : null;
|
|
127003
127039
|
const langNode = resolveWrappedSlot($slots.lang, (children) => children);
|
|
@@ -128776,7 +128812,7 @@
|
|
|
128776
128812
|
watermarkProps: watermarkProps
|
|
128777
128813
|
});
|
|
128778
128814
|
|
|
128779
|
-
var version = "1.12.
|
|
128815
|
+
var version = "1.12.22";
|
|
128780
128816
|
|
|
128781
128817
|
function useExposeProxy(targetRef) {
|
|
128782
128818
|
return new Proxy({}, {
|