@uzum-tech/ui 1.12.18 → 1.12.20

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/README.md ADDED
@@ -0,0 +1,73 @@
1
+ <p align="center">
2
+ <img width="144px" src="https://ik.imagekit.io/jbalancer/uzum-logo.svg?updatedAt=1692012347116" />
3
+ </p>
4
+
5
+ <h1 align="center">Uzum UI</h1>
6
+ <p align="center">A Vue 3 Component Library</p>
7
+ <p align="center"><b>Fairly Complete, Theme Customizable, Uses TypeScript, Fast</b></p>
8
+
9
+ <p align="center">English</p>
10
+
11
+ ## Documentation
12
+
13
+ [www.uzumui.com](http://www.uzumui.com)
14
+
15
+ ## Features
16
+
17
+ ### Fairly Complete
18
+
19
+ There are more than 80 components. Hope they can help you write less code.
20
+
21
+ What's more, they are all treeshakable.
22
+
23
+ ### Theme Customizable
24
+
25
+ We provide an advanced type safe theme system built using TypeScript. All you need is to provide a theme overrides object in JS. Then all the stuff will be done by us.
26
+
27
+ What's more, no less/sass/css variables, no webpack loaders are required.
28
+
29
+ ### Uses TypeScript
30
+
31
+ All the stuff in Uzum UI is written in TypeScript. It can work with your typescript project seamlessly.
32
+
33
+ What's more, you don't need to import any CSS to use the components.
34
+
35
+ ### Fast
36
+
37
+ I try to make it not rather slow. At least select, tree, transfer, table and cascader work with virtual list.
38
+
39
+ What's more, ..., no more. Just enjoy it.
40
+
41
+ ## Installation
42
+
43
+ ### npm
44
+
45
+ Use npm to install.
46
+
47
+ ```bash
48
+ npm i -D @uzum-tech/ui
49
+ ```
50
+
51
+ ### Fonts
52
+
53
+ ```bash
54
+ npm i -D vfonts
55
+ ```
56
+
57
+ ### Icons
58
+
59
+ Uzum UI recommends using [xicons](https://www.xicons.org) as icon library.
60
+
61
+ ### Design Resources
62
+
63
+ [Uzum UI (Figma)](https://www.figma.com/file/yKEpk8950c0bZ2fA51psBI/Components-Web?type=design&t=brzuYK7mC2iOHJJ1-6).
64
+
65
+ ## Contributing
66
+
67
+ Later...
68
+
69
+ ## License
70
+
71
+ Uzum UI is licensed under the [MIT license](https://opensource.org/licenses/MIT).
72
+
73
+ Graphics resouces of `result` component is licensed under the [CC-BY 4.0](https://creativecommons.org/licenses/by/4.0/). The graphics resources come from [Twemoji](https://github.com/twitter/twemoji).
package/dist/index.js CHANGED
@@ -54291,7 +54291,7 @@
54291
54291
  },
54292
54292
  uploadProps: {
54293
54293
  type: Object,
54294
- default: () => ({})
54294
+ default: void 0
54295
54295
  },
54296
54296
  withPadding: {
54297
54297
  type: Boolean,
@@ -54326,8 +54326,8 @@
54326
54326
  };
54327
54327
  const renderAttachment = () => {
54328
54328
  const fileList = props.attachments.map(
54329
- (attachment, index) => ({
54330
- id: `${String(props.message.id)}-attachment-${index}`,
54329
+ (attachment) => ({
54330
+ id: `${String(attachment.id)}`,
54331
54331
  name: attachment.name,
54332
54332
  status: attachment.status || ChatAttachmentStatus.FINISHED,
54333
54333
  percentage: attachment.percentage ?? null,
@@ -54342,7 +54342,6 @@
54342
54342
  UUpload,
54343
54343
  {
54344
54344
  abstract: true,
54345
- ...props.uploadProps,
54346
54345
  fileList,
54347
54346
  fileListStyle: props.withPadding ? {
54348
54347
  display: "flex",
@@ -54357,7 +54356,8 @@
54357
54356
  showRetryButton: props.attachments.some(
54358
54357
  (attachment) => attachment.status === ChatAttachmentStatus.ERROR
54359
54358
  ),
54360
- onDownload: handleDownload
54359
+ onDownload: handleDownload,
54360
+ ...props.uploadProps
54361
54361
  },
54362
54362
  {
54363
54363
  default: () => /* @__PURE__ */ vue.h(UUploadFileList, null, {
@@ -126268,6 +126268,10 @@
126268
126268
  type: Boolean,
126269
126269
  default: true
126270
126270
  },
126271
+ actionsVisibility: {
126272
+ type: Object,
126273
+ required: false
126274
+ },
126271
126275
  cssVars: Object,
126272
126276
  onSearch: Function,
126273
126277
  onPreview: Function,
@@ -126341,12 +126345,14 @@
126341
126345
  };
126342
126346
  },
126343
126347
  render() {
126348
+ const { $slots } = this;
126344
126349
  const blockClass = `${this.mergedClsPrefix}-header`;
126345
126350
  if (this.responsive && this.isMobile && this.mobileActionsCollapse) {
126346
- return /* @__PURE__ */ vue.h("div", { class: `${blockClass}__actions` }, /* @__PURE__ */ vue.h(UFlex, { size: 32 }, { default: () => this.$slots.mobile?.() }));
126351
+ return /* @__PURE__ */ vue.h("div", { class: `${blockClass}__actions` }, /* @__PURE__ */ vue.h(UFlex, { size: 32 }, { default: () => $slots.mobile?.() }));
126347
126352
  }
126348
- return /* @__PURE__ */ vue.h("div", { class: `${blockClass}__actions` }, /* @__PURE__ */ vue.h(UFlex, { class: `${blockClass}__actions-block`, size: 32 }, {
126349
- default: () => /* @__PURE__ */ vue.h(vue.Fragment, null, /* @__PURE__ */ vue.h(
126353
+ const langNode = () => {
126354
+ if (this.actionsVisibility?.lang === false) return null;
126355
+ return $slots.lang ? $slots.lang() : /* @__PURE__ */ vue.h(
126350
126356
  UDropdown,
126351
126357
  {
126352
126358
  options: this.langOptions,
@@ -126365,7 +126371,11 @@
126365
126371
  }
126366
126372
  )
126367
126373
  }
126368
- ), /* @__PURE__ */ vue.h("div", { class: `${blockClass}__search-wrapper` }, /* @__PURE__ */ vue.h(Button, { text: true, onClick: this.handleSearchClick }, {
126374
+ );
126375
+ };
126376
+ const searchNode = () => {
126377
+ if (this.actionsVisibility?.search === false) return null;
126378
+ return $slots.search ? $slots.search() : /* @__PURE__ */ vue.h("div", { class: `${blockClass}__search-wrapper` }, /* @__PURE__ */ vue.h(Button, { text: true, onClick: this.handleSearchClick }, {
126369
126379
  default: () => /* @__PURE__ */ vue.h(UIcon, { size: 24 }, { default: () => /* @__PURE__ */ vue.h(SearchIcon, null) })
126370
126380
  }), /* @__PURE__ */ vue.h(vue.Transition, { name: "fade-in-scale-up" }, {
126371
126381
  default: () => this.searchVisible ? vue.h(HeaderSearchDesktop, {
@@ -126381,11 +126391,22 @@
126381
126391
  },
126382
126392
  onResultSelect: this.handleResultSelect
126383
126393
  }) : null
126384
- })), /* @__PURE__ */ vue.h(Button, { text: true, onClick: this.onPreview }, {
126394
+ }));
126395
+ };
126396
+ const accessibilityNode = () => {
126397
+ if (this.actionsVisibility?.accessibility === false) return null;
126398
+ return $slots.accessibility ? $slots.accessibility() : /* @__PURE__ */ vue.h(Button, { text: true, onClick: this.onPreview }, {
126385
126399
  default: () => /* @__PURE__ */ vue.h(UIcon, { size: 24 }, { default: () => /* @__PURE__ */ vue.h(EyeIcon, null) })
126386
- }), /* @__PURE__ */ vue.h(Button, { text: true, onClick: this.onLogout }, {
126400
+ });
126401
+ };
126402
+ const logoutNode = () => {
126403
+ if (this.actionsVisibility?.logout === false) return null;
126404
+ return $slots.logout ? $slots.logout() : /* @__PURE__ */ vue.h(Button, { text: true, onClick: this.onLogout }, {
126387
126405
  default: () => /* @__PURE__ */ vue.h(UIcon, { size: 24 }, { default: () => /* @__PURE__ */ vue.h(LogoutIcon, null) })
126388
- }))
126406
+ });
126407
+ };
126408
+ return /* @__PURE__ */ vue.h("div", { class: `${blockClass}__actions` }, /* @__PURE__ */ vue.h(UFlex, { class: `${blockClass}__actions-block`, size: 32 }, {
126409
+ default: () => /* @__PURE__ */ vue.h(vue.Fragment, null, langNode(), searchNode(), accessibilityNode(), logoutNode())
126389
126410
  }));
126390
126411
  }
126391
126412
  });
@@ -126665,6 +126686,9 @@
126665
126686
  type: Boolean,
126666
126687
  default: true
126667
126688
  },
126689
+ actionsProps: {
126690
+ type: Object
126691
+ },
126668
126692
  onSearch: Function,
126669
126693
  "onUpdate:menuValue": [Function, Array],
126670
126694
  onUpdateMenuValue: [Function, Array],
@@ -126971,6 +126995,21 @@
126971
126995
  footer: $slots["mobile-footer"]
126972
126996
  }
126973
126997
  ) : null;
126998
+ const langNode = resolveWrappedSlot($slots.lang, (children) => children);
126999
+ const searchNode = resolveWrappedSlot($slots.search, (children) => children);
127000
+ const accessibilityNode = resolveWrappedSlot(
127001
+ $slots.accessibility,
127002
+ (children) => children ?? null
127003
+ );
127004
+ const logoutNode = resolveWrappedSlot($slots.logout, (children) => children);
127005
+ const resolveActionSlots = () => {
127006
+ return {
127007
+ ...$slots.lang ? { lang: () => langNode } : {},
127008
+ ...$slots.search ? { search: () => searchNode } : {},
127009
+ ...$slots.accessibility ? { accessibility: () => accessibilityNode } : {},
127010
+ ...$slots.logout ? { logout: () => logoutNode } : {}
127011
+ };
127012
+ };
126974
127013
  const actionsNode = resolveWrappedSlot(
126975
127014
  $slots.action,
126976
127015
  (children) => children ? /* @__PURE__ */ vue.h("div", { class: `${blockClass}__actions` }, children) : null
@@ -126988,13 +127027,18 @@
126988
127027
  onSearchResultSelect: this.handleSearchResultSelect,
126989
127028
  onPreview: this.handlePreviewClick,
126990
127029
  onLogout: this.handleLogoutClick,
126991
- onLanguageSelect: this.handleSelectLang
127030
+ onLanguageSelect: this.handleSelectLang,
127031
+ ...vue.mergeProps(
127032
+ this.$attrs,
127033
+ this.actionsProps
127034
+ )
126992
127035
  },
126993
127036
  {
126994
- mobile: () => mobileNode
127037
+ mobile: () => mobileNode,
127038
+ ...resolveActionSlots()
126995
127039
  }
126996
127040
  );
126997
- const searchNode = this.responsive && this.isMobile && this.searchVisible ? vue.h(HeaderSearchMobile, {
127041
+ const searchMobileNode = this.responsive && this.isMobile && this.searchVisible ? vue.h(HeaderSearchMobile, {
126998
127042
  mergedClsPrefix,
126999
127043
  show: this.searchVisible,
127000
127044
  cssVars: this.cssVars,
@@ -127017,7 +127061,7 @@
127017
127061
  actions: () => actionsNode
127018
127062
  }
127019
127063
  ),
127020
- searchNode
127064
+ searchMobileNode
127021
127065
  ]);
127022
127066
  }
127023
127067
  return vue.h(
@@ -128727,7 +128771,7 @@
128727
128771
  watermarkProps: watermarkProps
128728
128772
  });
128729
128773
 
128730
- var version = "1.12.18";
128774
+ var version = "1.12.20";
128731
128775
 
128732
128776
  function useExposeProxy(targetRef) {
128733
128777
  return new Proxy({}, {