@uzum-tech/ui 1.12.9 → 1.12.11

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.
@@ -31,7 +31,7 @@ export default defineComponent({
31
31
  h(UIconSwitchTransition, null, {
32
32
  default: () => {
33
33
  var _a, _b;
34
- return this.show ? (h("div", { key: "dismiss", class: `${clsPrefix}-base-clear__clear`, onClick: this.onClear, onMousedown: this.handleMouseDown, "data-clear": true }, resolveSlot(this.$slots.icon, () => [
34
+ return this.show ? (h("div", { key: "dismiss", class: `${clsPrefix}-base-clear__clear`, onMousedown: this.handleMouseDown, "data-clear": true }, resolveSlot(this.$slots.icon, () => [
35
35
  h(UBaseIcon, { clsPrefix: clsPrefix }, {
36
36
  default: () => h(ClearIcon, null)
37
37
  })
@@ -199,16 +199,9 @@ export default defineComponent({
199
199
  }
200
200
  if (isGroupOption(option)) {
201
201
  const hasChildren = option.children && option.children.length > 0;
202
- const onClick = 'onClick' in option && typeof option.onClick === 'function'
203
- ? option.onClick
204
- : undefined;
205
202
  if (!hasChildren) {
206
203
  return (h("div", { key: key, class: `${blockClass}__menu-column-section` },
207
- h("div", { class: `${blockClass}__menu-column-title`, role: onClick ? 'button' : undefined, tabindex: onClick && !option.disabled ? 0 : undefined, onClick: onClick
208
- ? (e) => {
209
- onClick();
210
- }
211
- : undefined }, renderOptionLabel(option))));
204
+ h("div", { class: `${blockClass}__menu-column-title`, role: option.onClick ? 'button' : undefined, tabindex: option.onClick && !option.disabled ? 0 : undefined, onClick: option.onClick }, renderOptionLabel(option))));
212
205
  }
213
206
  const children = (_e = (_d = option.children) === null || _d === void 0 ? void 0 : _d.map((child, index) => renderMenuItem(child, `${key}-item-${index}`))) !== null && _e !== void 0 ? _e : [];
214
207
  const content = children.filter(isNotNull);
@@ -216,19 +209,11 @@ export default defineComponent({
216
209
  return null;
217
210
  if (asSection) {
218
211
  return (h("div", { key: key, class: `${blockClass}__menu-column-section` },
219
- h("div", { class: `${blockClass}__menu-column-title`, role: onClick ? 'button' : undefined, tabindex: onClick && !option.disabled ? 0 : undefined, onClick: onClick
220
- ? (e) => {
221
- onClick();
222
- }
223
- : undefined }, renderOptionLabel(option)),
212
+ h("div", { class: `${blockClass}__menu-column-title`, role: option.onClick ? 'button' : undefined, tabindex: option.onClick && !option.disabled ? 0 : undefined, onClick: option.onClick }, renderOptionLabel(option)),
224
213
  h("div", { class: `${blockClass}__menu-column-list` }, content)));
225
214
  }
226
215
  return (h("div", { key: key, class: `${blockClass}__menu-column` },
227
- h("div", { class: `${blockClass}__menu-column-title`, role: onClick ? 'button' : undefined, tabindex: onClick && !option.disabled ? 0 : undefined, onClick: onClick
228
- ? (e) => {
229
- onClick();
230
- }
231
- : undefined }, renderOptionLabel(option)),
216
+ h("div", { class: `${blockClass}__menu-column-title`, role: option.onClick ? 'button' : undefined, tabindex: option.onClick && !option.disabled ? 0 : undefined, onClick: option.onClick }, renderOptionLabel(option)),
232
217
  h("div", { class: `${blockClass}__menu-column-list` }, content)));
233
218
  }
234
219
  return (h("div", { key: key, class: [
@@ -2,8 +2,6 @@ import { type VNodeChild } from 'vue';
2
2
  import type { MenuOption as BaseMenuOption, MenuGroupOption, MenuDividerOption, Key } from '../../menu/src/interface';
3
3
  import type { TabsProps } from '../../tabs';
4
4
  import { ImageProps } from '../../image';
5
- export type HeaderMenuGroupOption = MenuGroupOption;
6
- export type HeaderMenuDividerOption = MenuDividerOption;
7
5
  export interface HeaderProps {
8
6
  menuOptions?: HeaderMenuOption[];
9
7
  langOptions?: LangOption[];
@@ -46,6 +44,10 @@ export interface HeaderSearchResult {
46
44
  onClick?: () => void;
47
45
  disabled?: boolean;
48
46
  }
47
+ export type HeaderMenuGroupOption = MenuGroupOption & {
48
+ onClick?: () => void;
49
+ };
50
+ export type HeaderMenuDividerOption = MenuDividerOption;
49
51
  export type HeaderSearchHandler = (query: string) => Promise<HeaderSearchResult[]> | HeaderSearchResult[];
50
52
  export type HeaderMenuChildOption = HeaderMenuColumnOption | HeaderMenuGroupOption | HeaderMenuDividerOption | HeaderMenuOption;
51
53
  export type HeaderMenuOption = Omit<BaseMenuOption, 'children'> & {
package/es/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "1.12.9";
1
+ declare const _default: "1.12.11";
2
2
  export default _default;
package/es/version.js CHANGED
@@ -1 +1 @@
1
- export default '1.12.9';
1
+ export default '1.12.11';
@@ -36,7 +36,7 @@ exports.default = (0, vue_1.defineComponent)({
36
36
  (0, vue_1.h)(icon_switch_transition_1.default, null, {
37
37
  default: () => {
38
38
  var _a, _b;
39
- return this.show ? ((0, vue_1.h)("div", { key: "dismiss", class: `${clsPrefix}-base-clear__clear`, onClick: this.onClear, onMousedown: this.handleMouseDown, "data-clear": true }, (0, _utils_1.resolveSlot)(this.$slots.icon, () => [
39
+ return this.show ? ((0, vue_1.h)("div", { key: "dismiss", class: `${clsPrefix}-base-clear__clear`, onMousedown: this.handleMouseDown, "data-clear": true }, (0, _utils_1.resolveSlot)(this.$slots.icon, () => [
40
40
  (0, vue_1.h)(icon_1.UBaseIcon, { clsPrefix: clsPrefix }, {
41
41
  default: () => (0, vue_1.h)(icons_1.ClearIcon, null)
42
42
  })
@@ -202,16 +202,9 @@ exports.default = (0, vue_1.defineComponent)({
202
202
  }
203
203
  if ((0, utils_1.isGroupOption)(option)) {
204
204
  const hasChildren = option.children && option.children.length > 0;
205
- const onClick = 'onClick' in option && typeof option.onClick === 'function'
206
- ? option.onClick
207
- : undefined;
208
205
  if (!hasChildren) {
209
206
  return ((0, vue_1.h)("div", { key: key, class: `${blockClass}__menu-column-section` },
210
- (0, vue_1.h)("div", { class: `${blockClass}__menu-column-title`, role: onClick ? 'button' : undefined, tabindex: onClick && !option.disabled ? 0 : undefined, onClick: onClick
211
- ? (e) => {
212
- onClick();
213
- }
214
- : undefined }, (0, utils_1.renderOptionLabel)(option))));
207
+ (0, vue_1.h)("div", { class: `${blockClass}__menu-column-title`, role: option.onClick ? 'button' : undefined, tabindex: option.onClick && !option.disabled ? 0 : undefined, onClick: option.onClick }, (0, utils_1.renderOptionLabel)(option))));
215
208
  }
216
209
  const children = (_e = (_d = option.children) === null || _d === void 0 ? void 0 : _d.map((child, index) => renderMenuItem(child, `${key}-item-${index}`))) !== null && _e !== void 0 ? _e : [];
217
210
  const content = children.filter(utils_1.isNotNull);
@@ -219,19 +212,11 @@ exports.default = (0, vue_1.defineComponent)({
219
212
  return null;
220
213
  if (asSection) {
221
214
  return ((0, vue_1.h)("div", { key: key, class: `${blockClass}__menu-column-section` },
222
- (0, vue_1.h)("div", { class: `${blockClass}__menu-column-title`, role: onClick ? 'button' : undefined, tabindex: onClick && !option.disabled ? 0 : undefined, onClick: onClick
223
- ? (e) => {
224
- onClick();
225
- }
226
- : undefined }, (0, utils_1.renderOptionLabel)(option)),
215
+ (0, vue_1.h)("div", { class: `${blockClass}__menu-column-title`, role: option.onClick ? 'button' : undefined, tabindex: option.onClick && !option.disabled ? 0 : undefined, onClick: option.onClick }, (0, utils_1.renderOptionLabel)(option)),
227
216
  (0, vue_1.h)("div", { class: `${blockClass}__menu-column-list` }, content)));
228
217
  }
229
218
  return ((0, vue_1.h)("div", { key: key, class: `${blockClass}__menu-column` },
230
- (0, vue_1.h)("div", { class: `${blockClass}__menu-column-title`, role: onClick ? 'button' : undefined, tabindex: onClick && !option.disabled ? 0 : undefined, onClick: onClick
231
- ? (e) => {
232
- onClick();
233
- }
234
- : undefined }, (0, utils_1.renderOptionLabel)(option)),
219
+ (0, vue_1.h)("div", { class: `${blockClass}__menu-column-title`, role: option.onClick ? 'button' : undefined, tabindex: option.onClick && !option.disabled ? 0 : undefined, onClick: option.onClick }, (0, utils_1.renderOptionLabel)(option)),
235
220
  (0, vue_1.h)("div", { class: `${blockClass}__menu-column-list` }, content)));
236
221
  }
237
222
  return ((0, vue_1.h)("div", { key: key, class: [
@@ -2,8 +2,6 @@ import { type VNodeChild } from 'vue';
2
2
  import type { MenuOption as BaseMenuOption, MenuGroupOption, MenuDividerOption, Key } from '../../menu/src/interface';
3
3
  import type { TabsProps } from '../../tabs';
4
4
  import { ImageProps } from '../../image';
5
- export type HeaderMenuGroupOption = MenuGroupOption;
6
- export type HeaderMenuDividerOption = MenuDividerOption;
7
5
  export interface HeaderProps {
8
6
  menuOptions?: HeaderMenuOption[];
9
7
  langOptions?: LangOption[];
@@ -46,6 +44,10 @@ export interface HeaderSearchResult {
46
44
  onClick?: () => void;
47
45
  disabled?: boolean;
48
46
  }
47
+ export type HeaderMenuGroupOption = MenuGroupOption & {
48
+ onClick?: () => void;
49
+ };
50
+ export type HeaderMenuDividerOption = MenuDividerOption;
49
51
  export type HeaderSearchHandler = (query: string) => Promise<HeaderSearchResult[]> | HeaderSearchResult[];
50
52
  export type HeaderMenuChildOption = HeaderMenuColumnOption | HeaderMenuGroupOption | HeaderMenuDividerOption | HeaderMenuOption;
51
53
  export type HeaderMenuOption = Omit<BaseMenuOption, 'children'> & {
package/lib/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "1.12.9";
1
+ declare const _default: "1.12.11";
2
2
  export default _default;
package/lib/version.js CHANGED
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = '1.12.9';
3
+ exports.default = '1.12.11';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uzum-tech/ui",
3
- "version": "1.12.9",
3
+ "version": "1.12.11",
4
4
  "description": "A Vue 3 Component Library. Fairly Complete, Theme Customizable, Uses TypeScript, Fast",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
package/web-types.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "framework": "vue",
4
4
  "name": "@uzum-tech/ui",
5
- "version": "1.12.9",
5
+ "version": "1.12.11",
6
6
  "js-types-syntax": "typescript",
7
7
  "contributions": {
8
8
  "html": {