@namba_one/ui-kit-2 1.0.157 → 1.0.158

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.d.ts CHANGED
@@ -130,8 +130,6 @@ readonly isWide?: boolean | undefined;
130
130
  readonly iconLeft?: IconName | undefined;
131
131
  readonly iconRight?: IconName | undefined;
132
132
  readonly onClick?: ((e: Event) => any) | undefined;
133
- readonly "onLeft-icon-click"?: ((e: Event) => any) | undefined;
134
- readonly "onRight-icon-click"?: ((e: Event) => any) | undefined;
135
133
  } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
136
134
  $attrs: {
137
135
  [x: string]: unknown;
@@ -145,16 +143,12 @@ $slots: Readonly<{
145
143
  $root: ComponentPublicInstance | null;
146
144
  $parent: ComponentPublicInstance | null;
147
145
  $host: Element | null;
148
- $emit: ((event: "click", e: Event) => void) & ((event: "left-icon-click", e: Event) => void) & ((event: "right-icon-click", e: Event) => void);
146
+ $emit: (event: "click", e: Event) => void;
149
147
  $el: any;
150
148
  $options: ComponentOptionsBase<Readonly<ButtonProps> & Readonly<{
151
149
  onClick?: ((e: Event) => any) | undefined;
152
- "onLeft-icon-click"?: ((e: Event) => any) | undefined;
153
- "onRight-icon-click"?: ((e: Event) => any) | undefined;
154
150
  }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
155
151
  click: (e: Event) => any;
156
- "left-icon-click": (e: Event) => any;
157
- "right-icon-click": (e: Event) => any;
158
152
  }, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
159
153
  beforeCreate?: (() => void) | (() => void)[];
160
154
  created?: (() => void) | (() => void)[];
@@ -177,8 +171,6 @@ $nextTick: nextTick;
177
171
  $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions): WatchStopHandle;
178
172
  } & Readonly<{}> & Omit<Readonly<ButtonProps> & Readonly<{
179
173
  onClick?: ((e: Event) => any) | undefined;
180
- "onLeft-icon-click"?: ((e: Event) => any) | undefined;
181
- "onRight-icon-click"?: ((e: Event) => any) | undefined;
182
174
  }>, never> & ShallowUnwrapRef< {}> & {} & ComponentCustomProperties & {} & {
183
175
  $slots: {
184
176
  default?(_: {}): any;
@@ -415,12 +407,8 @@ declare const __VLS_component_4: DefineComponent<BadgeProps, {}, {}, {}, {}, Com
415
407
 
416
408
  declare const __VLS_component_5: DefineComponent<ButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
417
409
  click: (e: Event) => any;
418
- "left-icon-click": (e: Event) => any;
419
- "right-icon-click": (e: Event) => any;
420
410
  }, string, PublicProps, Readonly<ButtonProps> & Readonly<{
421
411
  onClick?: ((e: Event) => any) | undefined;
422
- "onLeft-icon-click"?: ((e: Event) => any) | undefined;
423
- "onRight-icon-click"?: ((e: Event) => any) | undefined;
424
412
  }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
425
413
 
426
414
  declare const __VLS_component_6: DefineComponent<ChipProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
@@ -452,10 +440,14 @@ declare const __VLS_component_9: DefineComponent<__VLS_PublicProps_4, {}, {}, {}
452
440
  } & {
453
441
  blur: () => any;
454
442
  "update:error": (value: boolean) => any;
443
+ "click-icon-left": () => any;
444
+ "click-icon-right": () => any;
455
445
  }, string, PublicProps, Readonly<__VLS_PublicProps_4> & Readonly<{
456
446
  onBlur?: (() => any) | undefined;
457
447
  "onUpdate:value"?: ((value: string | null | undefined) => any) | undefined;
458
448
  "onUpdate:error"?: ((value: boolean) => any) | undefined;
449
+ "onClick-icon-left"?: (() => any) | undefined;
450
+ "onClick-icon-right"?: (() => any) | undefined;
459
451
  }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
460
452
  inputRef: any;
461
453
  }, HTMLDivElement>;
@@ -889,8 +881,6 @@ declare function __VLS_template_29(): {
889
881
  readonly iconLeft?: IconName | undefined;
890
882
  readonly iconRight?: IconName | undefined;
891
883
  readonly onClick?: ((e: Event) => any) | undefined;
892
- readonly "onLeft-icon-click"?: ((e: Event) => any) | undefined;
893
- readonly "onRight-icon-click"?: ((e: Event) => any) | undefined;
894
884
  } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
895
885
  $attrs: {
896
886
  [x: string]: unknown;
@@ -904,16 +894,12 @@ declare function __VLS_template_29(): {
904
894
  $root: ComponentPublicInstance | null;
905
895
  $parent: ComponentPublicInstance | null;
906
896
  $host: Element | null;
907
- $emit: ((event: "click", e: Event) => void) & ((event: "left-icon-click", e: Event) => void) & ((event: "right-icon-click", e: Event) => void);
897
+ $emit: (event: "click", e: Event) => void;
908
898
  $el: any;
909
899
  $options: ComponentOptionsBase<Readonly<ButtonProps> & Readonly<{
910
900
  onClick?: ((e: Event) => any) | undefined;
911
- "onLeft-icon-click"?: ((e: Event) => any) | undefined;
912
- "onRight-icon-click"?: ((e: Event) => any) | undefined;
913
901
  }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
914
902
  click: (e: Event) => any;
915
- "left-icon-click": (e: Event) => any;
916
- "right-icon-click": (e: Event) => any;
917
903
  }, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
918
904
  beforeCreate?: (() => void) | (() => void)[];
919
905
  created?: (() => void) | (() => void)[];
@@ -936,8 +922,6 @@ declare function __VLS_template_29(): {
936
922
  $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions): WatchStopHandle;
937
923
  } & Readonly<{}> & Omit<Readonly<ButtonProps> & Readonly<{
938
924
  onClick?: ((e: Event) => any) | undefined;
939
- "onLeft-icon-click"?: ((e: Event) => any) | undefined;
940
- "onRight-icon-click"?: ((e: Event) => any) | undefined;
941
925
  }>, never> & ShallowUnwrapRef< {}> & {} & ComponentCustomProperties & {} & {
942
926
  $slots: {
943
927
  default?(_: {}): any;
@@ -1585,10 +1569,7 @@ export declare type ButtonBaseProps = {
1585
1569
  isDisabled?: boolean;
1586
1570
  };
1587
1571
 
1588
- export declare type ButtonEmits = ButtonBaseEmits & {
1589
- (event: 'left-icon-click', e: Event): void;
1590
- (event: 'right-icon-click', e: Event): void;
1591
- };
1572
+ export declare type ButtonEmits = ButtonBaseEmits;
1592
1573
 
1593
1574
  export declare const ButtonIcon: DefineComponent<ButtonIconProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
1594
1575
  click: (e: Event) => any;
@@ -1968,6 +1949,8 @@ readonly iconRight?: IconName | undefined;
1968
1949
  readonly onBlur?: (() => any) | undefined;
1969
1950
  readonly "onUpdate:value"?: ((value: string | null | undefined) => any) | undefined;
1970
1951
  readonly "onUpdate:error"?: ((value: boolean) => any) | undefined;
1952
+ readonly "onClick-icon-left"?: (() => any) | undefined;
1953
+ readonly "onClick-icon-right"?: (() => any) | undefined;
1971
1954
  } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
1972
1955
  $attrs: {
1973
1956
  [x: string]: unknown;
@@ -1983,7 +1966,7 @@ $slots: Readonly<{
1983
1966
  $root: ComponentPublicInstance | null;
1984
1967
  $parent: ComponentPublicInstance | null;
1985
1968
  $host: Element | null;
1986
- $emit: ((event: "blur") => void) & ((event: "update:value", value: string | null | undefined) => void) & ((event: "update:error", value: boolean) => void);
1969
+ $emit: ((event: "blur") => void) & ((event: "update:value", value: string | null | undefined) => void) & ((event: "update:error", value: boolean) => void) & ((event: "click-icon-left") => void) & ((event: "click-icon-right") => void);
1987
1970
  $el: HTMLDivElement;
1988
1971
  $options: ComponentOptionsBase<Readonly<{
1989
1972
  value?: InputProps["value"];
@@ -1991,11 +1974,15 @@ value?: InputProps["value"];
1991
1974
  onBlur?: (() => any) | undefined;
1992
1975
  "onUpdate:value"?: ((value: string | null | undefined) => any) | undefined;
1993
1976
  "onUpdate:error"?: ((value: boolean) => any) | undefined;
1977
+ "onClick-icon-left"?: (() => any) | undefined;
1978
+ "onClick-icon-right"?: (() => any) | undefined;
1994
1979
  }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1995
1980
  "update:value": (value: string | null | undefined) => any;
1996
1981
  } & {
1997
1982
  blur: () => any;
1998
1983
  "update:error": (value: boolean) => any;
1984
+ "click-icon-left": () => any;
1985
+ "click-icon-right": () => any;
1999
1986
  }, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
2000
1987
  beforeCreate?: (() => void) | (() => void)[];
2001
1988
  created?: (() => void) | (() => void)[];
@@ -2022,6 +2009,8 @@ value?: InputProps["value"];
2022
2009
  onBlur?: (() => any) | undefined;
2023
2010
  "onUpdate:value"?: ((value: string | null | undefined) => any) | undefined;
2024
2011
  "onUpdate:error"?: ((value: boolean) => any) | undefined;
2012
+ "onClick-icon-left"?: (() => any) | undefined;
2013
+ "onClick-icon-right"?: (() => any) | undefined;
2025
2014
  }>, never> & ShallowUnwrapRef< {}> & {} & ComponentCustomProperties & {} & {
2026
2015
  $slots: {
2027
2016
  default?(_: {}): any;
@@ -2051,6 +2040,8 @@ readonly iconRight?: IconName | undefined;
2051
2040
  readonly onBlur?: (() => any) | undefined;
2052
2041
  readonly "onUpdate:value"?: ((value: string | null | undefined) => any) | undefined;
2053
2042
  readonly "onUpdate:error"?: ((value: boolean) => any) | undefined;
2043
+ readonly "onClick-icon-left"?: (() => any) | undefined;
2044
+ readonly "onClick-icon-right"?: (() => any) | undefined;
2054
2045
  } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
2055
2046
  $attrs: {
2056
2047
  [x: string]: unknown;
@@ -2066,7 +2057,7 @@ $slots: Readonly<{
2066
2057
  $root: ComponentPublicInstance | null;
2067
2058
  $parent: ComponentPublicInstance | null;
2068
2059
  $host: Element | null;
2069
- $emit: ((event: "blur") => void) & ((event: "update:value", value: string | null | undefined) => void) & ((event: "update:error", value: boolean) => void);
2060
+ $emit: ((event: "blur") => void) & ((event: "update:value", value: string | null | undefined) => void) & ((event: "update:error", value: boolean) => void) & ((event: "click-icon-left") => void) & ((event: "click-icon-right") => void);
2070
2061
  $el: HTMLDivElement;
2071
2062
  $options: ComponentOptionsBase<Readonly<{
2072
2063
  value?: InputProps["value"];
@@ -2074,11 +2065,15 @@ value?: InputProps["value"];
2074
2065
  onBlur?: (() => any) | undefined;
2075
2066
  "onUpdate:value"?: ((value: string | null | undefined) => any) | undefined;
2076
2067
  "onUpdate:error"?: ((value: boolean) => any) | undefined;
2068
+ "onClick-icon-left"?: (() => any) | undefined;
2069
+ "onClick-icon-right"?: (() => any) | undefined;
2077
2070
  }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
2078
2071
  "update:value": (value: string | null | undefined) => any;
2079
2072
  } & {
2080
2073
  blur: () => any;
2081
2074
  "update:error": (value: boolean) => any;
2075
+ "click-icon-left": () => any;
2076
+ "click-icon-right": () => any;
2082
2077
  }, string, {}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
2083
2078
  beforeCreate?: (() => void) | (() => void)[];
2084
2079
  created?: (() => void) | (() => void)[];
@@ -2105,6 +2100,8 @@ value?: InputProps["value"];
2105
2100
  onBlur?: (() => any) | undefined;
2106
2101
  "onUpdate:value"?: ((value: string | null | undefined) => any) | undefined;
2107
2102
  "onUpdate:error"?: ((value: boolean) => any) | undefined;
2103
+ "onClick-icon-left"?: (() => any) | undefined;
2104
+ "onClick-icon-right"?: (() => any) | undefined;
2108
2105
  }>, never> & ShallowUnwrapRef< {}> & {} & ComponentCustomProperties & {} & {
2109
2106
  $slots: {
2110
2107
  default?(_: {}): any;
@@ -2262,7 +2259,11 @@ export declare type HeaderTextProps = {
2262
2259
  description: string;
2263
2260
  };
2264
2261
 
2265
- export declare const Icon: DefineComponent<IconBaseProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<IconBaseProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLElement>;
2262
+ export declare const Icon: DefineComponent<IconBaseProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
2263
+ click: () => any;
2264
+ }, string, PublicProps, Readonly<IconBaseProps> & Readonly<{
2265
+ onClick?: (() => any) | undefined;
2266
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLElement>;
2266
2267
 
2267
2268
  export declare type IconBaseProps = {
2268
2269
  name: IconName;
package/dist/index.es.js CHANGED
@@ -397,22 +397,24 @@ const os = {
397
397
  size: {},
398
398
  height: {}
399
399
  },
400
- setup(n) {
401
- const e = pn(), t = R(() => [
402
- e.root,
403
- e.color,
400
+ emits: ["click"],
401
+ setup(n, { emit: e }) {
402
+ const t = e, r = pn(), o = R(() => [
403
+ r.root,
404
+ r.color,
404
405
  { [n.color]: n.color !== "inherit" },
405
- e[n.name]
406
- ]), r = R(() => n.size ? { width: Ps(Number(n.size)), height: Ps(Number(n.height ?? n.size)) } : {});
407
- return (o, i) => (v(), S("i", {
408
- class: y(o.$style.wrapper)
406
+ r[n.name]
407
+ ]), i = R(() => n.size ? { width: Ps(Number(n.size)), height: Ps(Number(n.height ?? n.size)) } : {});
408
+ return (s, a) => (v(), S("i", {
409
+ class: y(s.$style.wrapper),
410
+ onClick: a[0] || (a[0] = (l) => t("click"))
409
411
  }, [
410
412
  (v(), S("svg", {
411
- class: y(t.value),
412
- style: je(r.value)
413
+ class: y(o.value),
414
+ style: je(i.value)
413
415
  }, [
414
416
  W("use", {
415
- "xlink:href": `#${o.name}`
417
+ "xlink:href": `#${s.name}`
416
418
  }, null, 8, qg)
417
419
  ], 6))
418
420
  ], 2));
@@ -659,7 +661,7 @@ const rb = /* @__PURE__ */ ue({
659
661
  iconLeft: {},
660
662
  iconRight: {}
661
663
  },
662
- emits: ["click", "left-icon-click", "right-icon-click"],
664
+ emits: ["click"],
663
665
  setup(n, { emit: e }) {
664
666
  const t = pn(), r = e, o = Wr(), i = R(() => cu({ isDisabled: n.isDisabled, href: n.href, tag: n.tag })), s = R(
665
667
  () => Qh({
@@ -7020,7 +7022,7 @@ const sw = {
7020
7022
  value: {},
7021
7023
  valueModifiers: {}
7022
7024
  }),
7023
- emits: /* @__PURE__ */ pt(["update:error", "blur"], ["update:value"]),
7025
+ emits: /* @__PURE__ */ pt(["update:error", "blur", "click-icon-left", "click-icon-right"], ["update:value"]),
7024
7026
  setup(n, { emit: e }) {
7025
7027
  const t = ut(n, "value"), r = Y(!1), o = Y(), i = e, s = Oi(
7026
7028
  {
@@ -7074,11 +7076,12 @@ const sw = {
7074
7076
  key: 0,
7075
7077
  name: h.iconLeft,
7076
7078
  size: 18,
7077
- color: "icon-input-base-primary"
7079
+ color: "icon-input-base-primary",
7080
+ onClick: m[0] || (m[0] = (g) => i("click-icon-left"))
7078
7081
  }, null, 8, ["name"])) : N("", !0),
7079
7082
  V(p(vu), tt({
7080
7083
  unmasked: t.value,
7081
- "onUpdate:unmasked": m[0] || (m[0] = (g) => t.value = g),
7084
+ "onUpdate:unmasked": m[1] || (m[1] = (g) => t.value = g),
7082
7085
  class: h.$style.field,
7083
7086
  type: h.type,
7084
7087
  ref_key: "inputRef",
@@ -7089,16 +7092,17 @@ const sw = {
7089
7092
  placeholder: l.value,
7090
7093
  autocomplete: h.autocomplete,
7091
7094
  inputmode: h.inputmode,
7092
- onFocus: m[1] || (m[1] = () => r.value = !0),
7095
+ onFocus: m[2] || (m[2] = () => r.value = !0),
7093
7096
  onBlur: u,
7094
- onAccept: m[2] || (m[2] = (g) => i("update:error", !1)),
7097
+ onAccept: m[3] || (m[3] = (g) => i("update:error", !1)),
7095
7098
  onInput: d
7096
7099
  }), null, 16, ["unmasked", "class", "type", "autofocus", "placeholder", "autocomplete", "inputmode"]),
7097
7100
  h.iconRight ? (v(), re(p(Ke), {
7098
7101
  key: 1,
7099
7102
  name: h.iconRight,
7100
7103
  size: 18,
7101
- color: "icon-input-base-primary"
7104
+ color: "icon-input-base-primary",
7105
+ onClick: m[4] || (m[4] = (g) => i("click-icon-right"))
7102
7106
  }, null, 8, ["name"])) : N("", !0),
7103
7107
  h.$slots.default ? (v(), S("div", {
7104
7108
  key: 2,