@uzum-tech/ui 2.4.5 → 2.4.6

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.
@@ -1,6 +1,7 @@
1
1
  import type { ButtonHTMLAttributes, ExtractPropTypes, PropType, SlotsType, VNode, VNodeChild } from 'vue';
2
2
  import type { BaseWaveRef } from '../../_internal';
3
3
  import type { ExtractPublicPropTypes, MaybeArray } from '../../_utils';
4
+ import type { IconProps } from '../../icon';
4
5
  import type { ButtonSize, ButtonType } from './public-types';
5
6
  export declare const buttonProps: {
6
7
  readonly color: StringConstructor;
@@ -36,6 +37,7 @@ export declare const buttonProps: {
36
37
  };
37
38
  readonly dashed: BooleanConstructor;
38
39
  readonly renderIcon: PropType<() => VNodeChild>;
40
+ readonly iconProps: PropType<IconProps>;
39
41
  readonly iconPlacement: {
40
42
  readonly type: PropType<"left" | "right">;
41
43
  readonly default: "left";
@@ -754,6 +756,7 @@ declare const Button: import("vue").DefineComponent<ExtractPropTypes<{
754
756
  };
755
757
  readonly dashed: BooleanConstructor;
756
758
  readonly renderIcon: PropType<() => VNodeChild>;
759
+ readonly iconProps: PropType<IconProps>;
757
760
  readonly iconPlacement: {
758
761
  readonly type: PropType<"left" | "right">;
759
762
  readonly default: "left";
@@ -1528,6 +1531,7 @@ declare const Button: import("vue").DefineComponent<ExtractPropTypes<{
1528
1531
  };
1529
1532
  readonly dashed: BooleanConstructor;
1530
1533
  readonly renderIcon: PropType<() => VNodeChild>;
1534
+ readonly iconProps: PropType<IconProps>;
1531
1535
  readonly iconPlacement: {
1532
1536
  readonly type: PropType<"left" | "right">;
1533
1537
  readonly default: "left";
@@ -8,6 +8,7 @@ import { call, color2Class, createKey, isSlotEmpty, resolveWrappedSlot, warnOnce
8
8
  import { createColor, createHoverColor, createPressedColor } from "../../_utils/color/index.mjs";
9
9
  import { isSafari } from "../../_utils/env/browser.mjs";
10
10
  import { buttonGroupInjectionKey } from "../../button-group/src/context.mjs";
11
+ import { UIcon } from "../../icon/index.mjs";
11
12
  import { buttonLight } from "../styles/index.mjs";
12
13
  import style from "./styles/index.cssr.mjs";
13
14
  export const buttonProps = Object.assign(Object.assign({}, useTheme.props), {
@@ -44,6 +45,7 @@ export const buttonProps = Object.assign(Object.assign({}, useTheme.props), {
44
45
  },
45
46
  dashed: Boolean,
46
47
  renderIcon: Function,
48
+ iconProps: Object,
47
49
  iconPlacement: {
48
50
  type: String,
49
51
  default: 'left'
@@ -517,7 +519,7 @@ const Button = defineComponent({
517
519
  }, this.iconPlacement === 'right' && children, h(UFadeInExpandTransition, {
518
520
  width: true
519
521
  }, {
520
- default: () => resolveWrappedSlot(this.$slots.icon, children => (this.loading || this.renderIcon || children) && h("span", {
522
+ default: () => resolveWrappedSlot(this.$slots.icon, children => (this.loading || children || this.renderIcon || this.iconProps) && h("span", {
521
523
  class: `${mergedClsPrefix}-button__icon`,
522
524
  style: {
523
525
  margin: isSlotEmpty(this.$slots.default) ? '0' : ''
@@ -532,7 +534,7 @@ const Button = defineComponent({
532
534
  key: "icon",
533
535
  class: `${mergedClsPrefix}-icon-slot`,
534
536
  role: "none"
535
- }, this.renderIcon ? this.renderIcon() : children)
537
+ }, children || (this.renderIcon ? this.renderIcon() : this.iconProps ? h(UIcon, Object.assign({}, this.iconProps)) : null))
536
538
  })))
537
539
  }), this.iconPlacement === 'left' && children, !this.text ? h(UBaseWave, {
538
540
  ref: "waveElRef",
@@ -9114,7 +9114,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
9114
9114
  }>> & Readonly<{}>, {
9115
9115
  readonly disabled: boolean;
9116
9116
  readonly show: boolean;
9117
- readonly buttonProps: Partial<ButtonProps>;
9118
9117
  readonly iconProps: Partial<IconProps>;
9118
+ readonly buttonProps: Partial<ButtonProps>;
9119
9119
  }, SlotsType<ChatAttachmentButtonSlots>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
9120
9120
  export default _default;
@@ -9225,12 +9225,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
9225
9225
  readonly closeButtonText: string;
9226
9226
  readonly shareButtonTooltip: string;
9227
9227
  readonly profileButtonTooltip: string;
9228
+ readonly iconProps: Partial<IconProps>;
9228
9229
  readonly typingChatIds: import("../../interface").ChatId[];
9229
9230
  readonly onChatClose: VoidFunction;
9230
9231
  readonly onChatShare: VoidFunction;
9231
9232
  readonly onUserProfile: VoidFunction;
9232
9233
  readonly buttonProps: Partial<ButtonProps>;
9233
- readonly iconProps: Partial<IconProps>;
9234
9234
  readonly selectedChat: ChatListItemData;
9235
9235
  readonly shareButtonProps: Partial<ButtonProps>;
9236
9236
  readonly profileButtonProps: Partial<ButtonProps>;
@@ -4252,6 +4252,7 @@ export declare const UButton: import("vue").DefineComponent<import("vue").Extrac
4252
4252
  };
4253
4253
  readonly dashed: BooleanConstructor;
4254
4254
  readonly renderIcon: import("vue").PropType<() => import("vue").VNodeChild>;
4255
+ readonly iconProps: import("vue").PropType<import("./icon").IconProps>;
4255
4256
  readonly iconPlacement: {
4256
4257
  readonly type: import("vue").PropType<"left" | "right">;
4257
4258
  readonly default: "left";
@@ -5026,6 +5027,7 @@ export declare const UButton: import("vue").DefineComponent<import("vue").Extrac
5026
5027
  };
5027
5028
  readonly dashed: BooleanConstructor;
5028
5029
  readonly renderIcon: import("vue").PropType<() => import("vue").VNodeChild>;
5030
+ readonly iconProps: import("vue").PropType<import("./icon").IconProps>;
5029
5031
  readonly iconPlacement: {
5030
5032
  readonly type: import("vue").PropType<"left" | "right">;
5031
5033
  readonly default: "left";
@@ -6415,6 +6417,7 @@ export declare const UxButton: new () => {
6415
6417
  readonly size?: import("./button").ButtonSize | undefined;
6416
6418
  readonly textColor?: string | undefined;
6417
6419
  readonly renderIcon?: (() => import("vue").VNodeChild) | undefined;
6420
+ readonly iconProps?: import("./icon").IconProps | undefined;
6418
6421
  } & {
6419
6422
  name?: string | undefined | undefined;
6420
6423
  placeholder?: string | undefined | undefined;
@@ -179615,8 +179618,8 @@ export declare const UText: import("vue").DefineComponent<import("vue").ExtractP
179615
179618
  color: string;
179616
179619
  code: boolean;
179617
179620
  strong: boolean;
179618
- text: string;
179619
179621
  delete: boolean;
179622
+ text: string;
179620
179623
  variant: import(".").TypographyVariant;
179621
179624
  italic: boolean;
179622
179625
  variantOptions: import(".").TypographyVariantOptions;