@uzum-tech/ui 1.12.20 → 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 CHANGED
@@ -124753,6 +124753,7 @@
124753
124753
  opacity: .5;
124754
124754
  `), c$1("& .u-tabs-tab--checked", `
124755
124755
  color: var(--u-header-tab-text-color-active);
124756
+ border-color: var(--u-header-tab-indicator-color);
124756
124757
  `), c$1("& .u-tabs-tab:hover", `
124757
124758
  color: var(--u-header-tab-text-color-hover);
124758
124759
  `), c$1("& .u-tabs-bar", `
@@ -124807,6 +124808,7 @@
124807
124808
  background-color: var(--u-header-card-bg-color);
124808
124809
  border-radius: var(--u-header-card-radius);
124809
124810
  padding: var(--u-header-card-padding);
124811
+ box-shadow: var(--u-header-card-shadow);
124810
124812
  `), cE("menu-grid", `
124811
124813
  display: grid;
124812
124814
  gap: var(--u-header-card-gap);
@@ -126020,6 +126022,18 @@
126020
126022
  (child, index) => renderGroupItem(child, item.key, index)
126021
126023
  )));
126022
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
+ };
126023
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(
126024
126038
  UDropdown,
126025
126039
  {
@@ -126054,7 +126068,7 @@
126054
126068
  )
126055
126069
  }
126056
126070
  ), /* @__PURE__ */ vue.h(UFlex, { size: 24 }, {
126057
- default: () => /* @__PURE__ */ vue.h(vue.Fragment, null, /* @__PURE__ */ vue.h(Button, { text: true, onClick: this.onSearchClick }, () => /* @__PURE__ */ vue.h(UIcon, { size: 24 }, () => /* @__PURE__ */ vue.h(SearchIcon, null))), /* @__PURE__ */ vue.h(Button, { text: true, onClick: this.onPreview }, () => /* @__PURE__ */ vue.h(UIcon, { size: 24 }, () => /* @__PURE__ */ vue.h(EyeIcon, null))), /* @__PURE__ */ vue.h(Button, { text: true, onClick: this.onLogout }, () => /* @__PURE__ */ vue.h(UIcon, { size: 24 }, () => /* @__PURE__ */ vue.h(LogoutIcon, null))))
126071
+ default: () => /* @__PURE__ */ vue.h(vue.Fragment, null, renderSearchAction(), renderPreviewAction(), renderLogoutAction())
126058
126072
  })) : null, /* @__PURE__ */ vue.h(
126059
126073
  Button,
126060
126074
  {
@@ -126193,15 +126207,20 @@
126193
126207
  const search = vue.ref("");
126194
126208
  const searchText = vue.computed(() => localeRef.value.desktopSearchTitle);
126195
126209
  const placeholder = vue.computed(() => localeRef.value.searchPlaceholder);
126210
+ const inputInstRef = vue.ref(null);
126211
+ vue.onMounted(() => {
126212
+ inputInstRef.value?.focus();
126213
+ });
126196
126214
  return {
126197
126215
  search,
126198
126216
  searchText,
126199
- placeholder
126217
+ placeholder,
126218
+ inputInstRef
126200
126219
  };
126201
126220
  },
126202
126221
  render() {
126203
126222
  const blockClass = `${this.mergedClsPrefix}-header-search-desktop`;
126204
- return /* @__PURE__ */ vue.h("div", { class: blockClass, style: this.cssVars }, /* @__PURE__ */ vue.h(
126223
+ const content = /* @__PURE__ */ vue.h("div", { class: blockClass, style: this.cssVars }, /* @__PURE__ */ vue.h(
126205
126224
  Button,
126206
126225
  {
126207
126226
  text: true,
@@ -126214,6 +126233,7 @@
126214
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(
126215
126234
  UInput,
126216
126235
  {
126236
+ ref: "inputInstRef",
126217
126237
  value: this.searchValue,
126218
126238
  class: `${blockClass}__input`,
126219
126239
  placeholder: this.placeholder,
@@ -126238,6 +126258,15 @@
126238
126258
  cssVars: this.cssVars,
126239
126259
  onSelect: this.onResultSelect
126240
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
+ ]);
126241
126270
  }
126242
126271
  });
126243
126272
 
@@ -126273,6 +126302,7 @@
126273
126302
  required: false
126274
126303
  },
126275
126304
  cssVars: Object,
126305
+ langDropdownThemeOverrides: Object,
126276
126306
  onSearch: Function,
126277
126307
  onPreview: Function,
126278
126308
  onLogout: Function,
@@ -126356,7 +126386,8 @@
126356
126386
  UDropdown,
126357
126387
  {
126358
126388
  options: this.langOptions,
126359
- onSelect: this.onLanguageSelect
126389
+ onSelect: this.onLanguageSelect,
126390
+ themeOverrides: this.langDropdownThemeOverrides
126360
126391
  },
126361
126392
  {
126362
126393
  default: () => /* @__PURE__ */ vue.h(
@@ -126484,6 +126515,7 @@
126484
126515
  const searchValue = vue.ref("");
126485
126516
  const searchResults = vue.ref([]);
126486
126517
  const searchLoading = vue.ref(false);
126518
+ const inputInstRef = vue.ref(null);
126487
126519
  const placeholder = vue.computed(() => localeRef.value.searchPlaceholder);
126488
126520
  const handleSearch = async () => {
126489
126521
  const query = searchValue.value.trim();
@@ -126523,11 +126555,15 @@
126523
126555
  void handleSearch();
126524
126556
  }, SEARCH_DEBOUNCE_MS);
126525
126557
  });
126558
+ vue.onMounted(() => {
126559
+ inputInstRef.value?.focus();
126560
+ });
126526
126561
  return {
126527
126562
  placeholder,
126528
126563
  searchValue,
126529
126564
  searchResults,
126530
126565
  searchLoading,
126566
+ inputInstRef,
126531
126567
  handleSearchInput,
126532
126568
  handleSearch,
126533
126569
  handleClose,
@@ -126560,6 +126596,7 @@
126560
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(
126561
126597
  UInput,
126562
126598
  {
126599
+ ref: "inputInstRef",
126563
126600
  value: this.searchValue,
126564
126601
  placeholder: this.placeholder,
126565
126602
  onKeyup: (e) => {
@@ -126788,6 +126825,7 @@
126788
126825
  "--u-header-card-divider-color": self.cardDividerColor,
126789
126826
  "--u-header-card-gap": self.cardGap,
126790
126827
  "--u-header-card-padding": self.cardPadding,
126828
+ "--u-header-card-shadow": self.cardShadow,
126791
126829
  "--u-header-badge-bg-color": self.badgeBackgroundColor,
126792
126830
  "--u-header-badge-text-color": self.badgeTextColor,
126793
126831
  "--u-header-action-icon-color": self.actionIconColor,
@@ -126992,7 +127030,10 @@
126992
127030
  },
126993
127031
  {
126994
127032
  actions: $slots["mobile-actions"],
126995
- footer: $slots["mobile-footer"]
127033
+ footer: $slots["mobile-footer"],
127034
+ search: $slots["mobile-search"],
127035
+ preview: $slots["mobile-preview"],
127036
+ logout: $slots["mobile-logout"]
126996
127037
  }
126997
127038
  ) : null;
126998
127039
  const langNode = resolveWrappedSlot($slots.lang, (children) => children);
@@ -128771,7 +128812,7 @@
128771
128812
  watermarkProps: watermarkProps
128772
128813
  });
128773
128814
 
128774
- var version = "1.12.20";
128815
+ var version = "1.12.22";
128775
128816
 
128776
128817
  function useExposeProxy(targetRef) {
128777
128818
  return new Proxy({}, {