@uzum-tech/ui 2.0.0-beta.3 → 2.0.0-beta.5

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.
Files changed (183) hide show
  1. package/dist/index.js +2467 -1507
  2. package/dist/index.mjs +2461 -1506
  3. package/dist/index.prod.js +2 -2
  4. package/dist/index.prod.mjs +2 -2
  5. package/es/_internal/component-renderer/index.d.ts +2 -0
  6. package/es/_internal/component-renderer/index.mjs +1 -0
  7. package/es/_internal/component-renderer/src/interface.d.ts +29 -0
  8. package/es/_internal/component-renderer/src/interface.mjs +1 -0
  9. package/es/_internal/component-renderer/src/renderer.d.ts +3 -0
  10. package/es/_internal/component-renderer/src/renderer.mjs +20 -0
  11. package/es/_internal/select-menu/src/SelectOption.mjs +9 -5
  12. package/es/_internal/select-menu/src/styles/index.cssr.mjs +4 -3
  13. package/es/_internal/selection/src/styles/index.cssr.mjs +3 -0
  14. package/es/card-list/src/CardList.d.ts +1 -1
  15. package/es/checkbox/src/Checkbox.d.ts +2 -2
  16. package/es/components.d.ts +1 -0
  17. package/es/components.mjs +1 -0
  18. package/es/config-provider/src/internal-interface.d.ts +3 -1
  19. package/es/data-table/src/DataTable.d.ts +25 -5
  20. package/es/data-table/src/DataTable.mjs +125 -4
  21. package/es/data-table/src/HeaderButton/FilterMenu.mjs +1 -1
  22. package/es/data-table/src/TableParts/Body.d.ts +9 -6
  23. package/es/data-table/src/TableParts/Body.mjs +30 -6
  24. package/es/data-table/src/TableParts/Cell.mjs +17 -17
  25. package/es/data-table/src/TableParts/Header.d.ts +4 -2
  26. package/es/data-table/src/TableParts/Header.mjs +65 -22
  27. package/es/data-table/src/interface.d.ts +16 -0
  28. package/es/data-table/src/interface.mjs +9 -0
  29. package/es/data-table/src/use-group-header.mjs +2 -2
  30. package/es/data-table/src/use-mask.mjs +1 -1
  31. package/es/data-table/src/use-resizable.d.ts +1 -0
  32. package/es/data-table/src/use-resizable.mjs +5 -2
  33. package/es/data-table/src/use-scroll.d.ts +5 -4
  34. package/es/data-table/src/use-scroll.mjs +29 -25
  35. package/es/data-table/src/use-sorter.mjs +1 -1
  36. package/es/data-table/src/use-table-data.mjs +1 -1
  37. package/es/data-table/src/utils/column-utils.d.ts +13 -0
  38. package/es/data-table/src/utils/column-utils.mjs +84 -0
  39. package/es/data-table/src/utils/csv-utils.d.ts +3 -0
  40. package/es/data-table/src/utils/csv-utils.mjs +21 -0
  41. package/es/data-table/src/utils/index.d.ts +7 -0
  42. package/es/data-table/src/utils/index.mjs +7 -0
  43. package/es/data-table/src/utils/mask-defaults.d.ts +6 -0
  44. package/es/data-table/src/utils/mask-defaults.mjs +16 -0
  45. package/es/data-table/src/utils/resize-orchestrator-utils.d.ts +6 -0
  46. package/es/data-table/src/utils/resize-orchestrator-utils.mjs +21 -0
  47. package/es/data-table/src/utils/sort-filter-utils.d.ts +6 -0
  48. package/es/data-table/src/utils/sort-filter-utils.mjs +38 -0
  49. package/es/data-table/src/utils/width-utils.d.ts +20 -0
  50. package/es/data-table/src/utils/width-utils.mjs +174 -0
  51. package/es/data-table/src/utils.d.ts +1 -25
  52. package/es/data-table/src/utils.mjs +1 -165
  53. package/es/grid/src/Grid.d.ts +1 -1
  54. package/es/header/src/HeaderSearchResults.d.ts +1 -1
  55. package/es/icon-bar/src/IconBar.d.ts +1 -1
  56. package/es/input/src/Input.d.ts +1 -1
  57. package/es/list/src/ListItem.d.ts +2 -2
  58. package/es/list/src/ListItem.mjs +19 -12
  59. package/es/list/src/props.d.ts +3 -1
  60. package/es/list/src/styles/index.cssr.mjs +4 -2
  61. package/es/locales/common/enUS.d.ts +6 -0
  62. package/es/locales/common/enUS.mjs +6 -0
  63. package/es/locales/common/ruRU.mjs +6 -0
  64. package/es/mapping-card/index.d.ts +7 -0
  65. package/es/mapping-card/index.mjs +4 -0
  66. package/es/mapping-card/src/MappingCard.d.ts +2091 -0
  67. package/es/mapping-card/src/MappingCard.mjs +77 -0
  68. package/es/mapping-card/src/MappingCardList.d.ts +36 -0
  69. package/es/mapping-card/src/MappingCardList.mjs +50 -0
  70. package/es/mapping-card/src/MappingCardParts/Body.d.ts +4 -0
  71. package/es/mapping-card/src/MappingCardParts/Body.mjs +66 -0
  72. package/es/mapping-card/src/MappingCardParts/Header.d.ts +7 -0
  73. package/es/mapping-card/src/MappingCardParts/Header.mjs +147 -0
  74. package/es/mapping-card/src/injection.d.ts +17 -0
  75. package/es/mapping-card/src/injection.mjs +2 -0
  76. package/es/mapping-card/src/interface.d.ts +105 -0
  77. package/es/mapping-card/src/interface.mjs +45 -0
  78. package/es/mapping-card/src/styles/index.cssr.d.ts +2 -0
  79. package/es/mapping-card/src/styles/index.cssr.mjs +92 -0
  80. package/es/mapping-card/styles/dark.d.ts +337 -0
  81. package/es/mapping-card/styles/dark.mjs +22 -0
  82. package/es/mapping-card/styles/index.d.ts +3 -0
  83. package/es/mapping-card/styles/index.mjs +2 -0
  84. package/es/mapping-card/styles/light.d.ts +352 -0
  85. package/es/mapping-card/styles/light.mjs +45 -0
  86. package/es/progress/src/MultipleCircle.d.ts +1 -1
  87. package/es/radio/src/Radio.d.ts +1 -1
  88. package/es/radio/src/RadioButton.d.ts +3 -3
  89. package/es/tabs/src/Tabs.d.ts +2 -6
  90. package/es/themes/dark.mjs +2 -0
  91. package/es/themes/light.mjs +2 -0
  92. package/es/toggle-button/src/ToggleButton.d.ts +2 -2
  93. package/es/version.d.ts +1 -1
  94. package/es/version.mjs +1 -1
  95. package/lib/_internal/component-renderer/index.d.ts +2 -0
  96. package/lib/_internal/component-renderer/index.js +5 -0
  97. package/lib/_internal/component-renderer/src/interface.d.ts +29 -0
  98. package/lib/_internal/component-renderer/src/interface.js +2 -0
  99. package/lib/_internal/component-renderer/src/renderer.d.ts +3 -0
  100. package/lib/_internal/component-renderer/src/renderer.js +28 -0
  101. package/lib/_internal/select-menu/src/SelectOption.js +11 -12
  102. package/lib/_internal/select-menu/src/styles/index.cssr.js +4 -3
  103. package/lib/_internal/selection/src/styles/index.cssr.js +3 -0
  104. package/lib/card-list/src/CardList.d.ts +1 -1
  105. package/lib/checkbox/src/Checkbox.d.ts +2 -2
  106. package/lib/components.d.ts +1 -0
  107. package/lib/components.js +1 -0
  108. package/lib/config-provider/src/internal-interface.d.ts +3 -1
  109. package/lib/data-table/src/DataTable.d.ts +25 -5
  110. package/lib/data-table/src/DataTable.js +131 -4
  111. package/lib/data-table/src/TableParts/Body.d.ts +9 -6
  112. package/lib/data-table/src/TableParts/Body.js +30 -8
  113. package/lib/data-table/src/TableParts/Cell.js +16 -16
  114. package/lib/data-table/src/TableParts/Header.d.ts +4 -2
  115. package/lib/data-table/src/TableParts/Header.js +55 -23
  116. package/lib/data-table/src/interface.d.ts +16 -0
  117. package/lib/data-table/src/interface.js +6 -0
  118. package/lib/data-table/src/use-group-header.js +1 -1
  119. package/lib/data-table/src/use-resizable.d.ts +1 -0
  120. package/lib/data-table/src/use-resizable.js +5 -2
  121. package/lib/data-table/src/use-scroll.d.ts +5 -4
  122. package/lib/data-table/src/use-scroll.js +31 -28
  123. package/lib/data-table/src/utils/column-utils.d.ts +13 -0
  124. package/lib/data-table/src/utils/column-utils.js +116 -0
  125. package/lib/data-table/src/utils/csv-utils.d.ts +3 -0
  126. package/lib/data-table/src/utils/csv-utils.js +34 -0
  127. package/lib/data-table/src/utils/index.d.ts +7 -0
  128. package/lib/data-table/src/utils/index.js +26 -0
  129. package/lib/data-table/src/utils/mask-defaults.d.ts +6 -0
  130. package/lib/data-table/src/utils/mask-defaults.js +22 -0
  131. package/lib/data-table/src/utils/resize-orchestrator-utils.d.ts +6 -0
  132. package/lib/data-table/src/utils/resize-orchestrator-utils.js +35 -0
  133. package/lib/data-table/src/utils/sort-filter-utils.d.ts +6 -0
  134. package/lib/data-table/src/utils/sort-filter-utils.js +54 -0
  135. package/lib/data-table/src/utils/width-utils.d.ts +20 -0
  136. package/lib/data-table/src/utils/width-utils.js +182 -0
  137. package/lib/data-table/src/utils.d.ts +1 -25
  138. package/lib/data-table/src/utils.js +15 -229
  139. package/lib/grid/src/Grid.d.ts +1 -1
  140. package/lib/header/src/HeaderSearchResults.d.ts +1 -1
  141. package/lib/icon-bar/src/IconBar.d.ts +1 -1
  142. package/lib/input/src/Input.d.ts +1 -1
  143. package/lib/list/src/ListItem.d.ts +2 -2
  144. package/lib/list/src/ListItem.js +31 -10
  145. package/lib/list/src/props.d.ts +3 -1
  146. package/lib/list/src/styles/index.cssr.js +4 -2
  147. package/lib/locales/common/enUS.d.ts +6 -0
  148. package/lib/locales/common/enUS.js +6 -0
  149. package/lib/locales/common/ruRU.js +6 -0
  150. package/lib/mapping-card/index.d.ts +7 -0
  151. package/lib/mapping-card/index.js +15 -0
  152. package/lib/mapping-card/src/MappingCard.d.ts +2091 -0
  153. package/lib/mapping-card/src/MappingCard.js +58 -0
  154. package/lib/mapping-card/src/MappingCardList.d.ts +36 -0
  155. package/lib/mapping-card/src/MappingCardList.js +38 -0
  156. package/lib/mapping-card/src/MappingCardParts/Body.d.ts +4 -0
  157. package/lib/mapping-card/src/MappingCardParts/Body.js +48 -0
  158. package/lib/mapping-card/src/MappingCardParts/Header.d.ts +7 -0
  159. package/lib/mapping-card/src/MappingCardParts/Header.js +77 -0
  160. package/lib/mapping-card/src/injection.d.ts +17 -0
  161. package/lib/mapping-card/src/injection.js +5 -0
  162. package/lib/mapping-card/src/interface.d.ts +105 -0
  163. package/lib/mapping-card/src/interface.js +48 -0
  164. package/lib/mapping-card/src/styles/index.cssr.d.ts +2 -0
  165. package/lib/mapping-card/src/styles/index.cssr.js +97 -0
  166. package/lib/mapping-card/styles/dark.d.ts +337 -0
  167. package/lib/mapping-card/styles/dark.js +24 -0
  168. package/lib/mapping-card/styles/index.d.ts +3 -0
  169. package/lib/mapping-card/styles/index.js +10 -0
  170. package/lib/mapping-card/styles/light.d.ts +352 -0
  171. package/lib/mapping-card/styles/light.js +40 -0
  172. package/lib/progress/src/MultipleCircle.d.ts +1 -1
  173. package/lib/radio/src/Radio.d.ts +1 -1
  174. package/lib/radio/src/RadioButton.d.ts +3 -3
  175. package/lib/tabs/src/Tabs.d.ts +2 -6
  176. package/lib/themes/dark.js +84 -82
  177. package/lib/themes/light.js +82 -80
  178. package/lib/toggle-button/src/ToggleButton.d.ts +2 -2
  179. package/lib/version.d.ts +1 -1
  180. package/lib/version.js +1 -1
  181. package/package.json +1 -1
  182. package/volar.d.ts +2 -0
  183. package/web-types.json +207 -2
@@ -1,6 +1,6 @@
1
1
  import type { Component, ComputedRef, Slot } from 'vue';
2
2
  import type { ArrayEmptyHandler, ArrayFocusHandler, ArrayKeyboardHandler, ArrayMouseHandler, KeyboardEventHandler, MouseEventHandler } from '../../_utils';
3
- import type { Size } from './interface';
3
+ import type { RenderableType, Size } from './interface';
4
4
  import type { DescriptionPropsObject, HeaderPropObject } from './props';
5
5
  declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
6
6
  avatar: {
@@ -155,7 +155,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
155
155
  loadingSkeleton: import("./interface").BooleanProp;
156
156
  icon: import("./interface").RenderableProp;
157
157
  }>> & Readonly<{}>, {
158
- icon: import("./interface").RenderableType;
158
+ icon: RenderableType;
159
159
  avatar: import("../..").AvatarProps & {
160
160
  icon: Component;
161
161
  hasBadge?: boolean;
@@ -104,7 +104,6 @@ export default defineComponent({
104
104
  };
105
105
  },
106
106
  render() {
107
- var _a, _b, _c, _d, _e, _f;
108
107
  const {
109
108
  $slots,
110
109
  mergedClsPrefix,
@@ -156,8 +155,12 @@ export default defineComponent({
156
155
  borderRadius: `${prefixSkeletonborderRadius}px`
157
156
  }
158
157
  }) : $slots.prefix ? $slots.prefix() : renderAvatar()) : null;
159
- const header = ((_a = this.header) === null || _a === void 0 ? void 0 : _a.text) || resolveSlot('header');
160
- const description = ((_b = this.description) === null || _b === void 0 ? void 0 : _b.text) || resolveSlot('description');
158
+ const headerValue = this.header;
159
+ const descriptionValue = this.description;
160
+ const headerSideValue = this.headerSide;
161
+ const descriptionSideValue = this.descriptionSide;
162
+ const header = typeof headerValue === 'function' ? headerValue : (headerValue === null || headerValue === void 0 ? void 0 : headerValue.text) || resolveSlot('header');
163
+ const description = typeof descriptionValue === 'function' ? descriptionValue : (descriptionValue === null || descriptionValue === void 0 ? void 0 : descriptionValue.text) || resolveSlot('description');
161
164
  const hasLeft = !!(header || description);
162
165
  const textVariant = {
163
166
  large: {
@@ -190,11 +193,13 @@ export default defineComponent({
190
193
  height: '24px'
191
194
  }
192
195
  };
193
- const headerProps = Object.assign(Object.assign(Object.assign({}, defaultHeaderProps), this.header), {
194
- skeleton: Object.assign(Object.assign({}, defaultHeaderProps.skeleton), (_c = this.header) === null || _c === void 0 ? void 0 : _c.skeleton)
196
+ const headerPropObj = typeof headerValue !== 'function' ? headerValue : undefined;
197
+ const descriptionPropObj = typeof descriptionValue !== 'function' ? descriptionValue : undefined;
198
+ const headerProps = Object.assign(Object.assign(Object.assign({}, defaultHeaderProps), headerPropObj), {
199
+ skeleton: Object.assign(Object.assign({}, defaultHeaderProps.skeleton), headerPropObj === null || headerPropObj === void 0 ? void 0 : headerPropObj.skeleton)
195
200
  });
196
- const descriptionProps = Object.assign(Object.assign(Object.assign({}, defaultDescriptionProps), this.description), {
197
- skeleton: Object.assign(Object.assign({}, defaultDescriptionProps.skeleton), (_d = this.description) === null || _d === void 0 ? void 0 : _d.skeleton)
201
+ const descriptionProps = Object.assign(Object.assign(Object.assign({}, defaultDescriptionProps), descriptionPropObj), {
202
+ skeleton: Object.assign(Object.assign({}, defaultDescriptionProps.skeleton), descriptionPropObj === null || descriptionPropObj === void 0 ? void 0 : descriptionPropObj.skeleton)
198
203
  });
199
204
  function renderTextNode(content, props, classSuffix) {
200
205
  return content ? h(InternalUText, Object.assign({}, props, {
@@ -212,11 +217,13 @@ export default defineComponent({
212
217
  }
213
218
  const headerNode = renderTextNode(header, headerProps, 'title');
214
219
  const descriptionNode = renderTextNode(description, descriptionProps, 'subtitle');
215
- const headerSide = ((_e = this.headerSide) === null || _e === void 0 ? void 0 : _e.text) || resolveSlot('headerSide');
216
- const descriptionSide = ((_f = this.descriptionSide) === null || _f === void 0 ? void 0 : _f.text) || resolveSlot('descriptionSide');
220
+ const headerSidePropObj = typeof headerSideValue !== 'function' ? headerSideValue : undefined;
221
+ const descriptionSidePropObj = typeof descriptionSideValue !== 'function' ? descriptionSideValue : undefined;
222
+ const headerSide = typeof headerSideValue === 'function' ? headerSideValue : (headerSidePropObj === null || headerSidePropObj === void 0 ? void 0 : headerSidePropObj.text) || resolveSlot('headerSide');
223
+ const descriptionSide = typeof descriptionSideValue === 'function' ? descriptionSideValue : (descriptionSidePropObj === null || descriptionSidePropObj === void 0 ? void 0 : descriptionSidePropObj.text) || resolveSlot('descriptionSide');
217
224
  const hasRight = !!(headerSide || descriptionSide);
218
- const headerSideProps = Object.assign(Object.assign({}, defaultHeaderProps), this.headerSide);
219
- const descriptionSideProps = Object.assign(Object.assign({}, defaultDescriptionProps), this.descriptionSide);
225
+ const headerSideProps = Object.assign(Object.assign({}, defaultHeaderProps), headerSidePropObj);
226
+ const descriptionSideProps = Object.assign(Object.assign({}, defaultDescriptionProps), descriptionSidePropObj);
220
227
  const headerSideNode = renderTextNode(headerSide, headerSideProps, 'title');
221
228
  const descriptionSideNode = renderTextNode(descriptionSide, descriptionSideProps, 'subtitle');
222
229
  const leftNode = hasLeft ? h("div", {
@@ -241,7 +248,7 @@ export default defineComponent({
241
248
  }, sharedAttrs), [prefixNode, h("div", {
242
249
  class: `${mergedClsPrefix}-list-item__main`
243
250
  }, h("div", {
244
- class: `${mergedClsPrefix}-list-item__text`
251
+ class: [`${mergedClsPrefix}-list-item__text`, hasRight && `${mergedClsPrefix}-list-item__text--has-right`]
245
252
  }, $slots.default ? $slots.default() : [leftNode, rightNode])), suffixNode, showDivider && h("hr", {
246
253
  class: `${mergedClsPrefix}-list-item__divider`
247
254
  })]);
@@ -4,7 +4,7 @@ import type { InternalTextProps } from '../../_internal/typography';
4
4
  import type { ArrayEmptyHandler, ArrayFocusHandler, ArrayKeyboardHandler, ArrayMouseHandler, ExtractPublicPropTypes } from '../../_utils';
5
5
  import type { AvatarProps } from '../../avatar';
6
6
  import type { BadgeProps } from '../../badge';
7
- import type { ExtractIntoInjection, ListInjectionBoolean, ListInjectionRenderable, ListItemPropsBoolean, ListItemPropsRenderable, Size } from './interface';
7
+ import type { ExtractIntoInjection, ListInjectionBoolean, ListInjectionRenderable, ListItemPropsBoolean, ListItemPropsRenderable, RenderableType, Size } from './interface';
8
8
  export declare const listItemPropsBoolean: Array<keyof ListItemPropsBoolean>;
9
9
  export declare const listItemPropsRenderable: Array<keyof ListItemPropsRenderable>;
10
10
  export declare const listItemBaseProps: {
@@ -254,6 +254,8 @@ export declare const listProps: {
254
254
  suffixSize: string;
255
255
  }, any>>>;
256
256
  };
257
+ export type HeaderValue = HeaderPropObject | RenderableType | undefined;
258
+ export type DescriptionValue = DescriptionPropsObject | RenderableType | undefined;
257
259
  export type ListInjection = ExtractIntoInjection<typeof listItemBaseProps> & ListInjectionBoolean & ListInjectionRenderable & {
258
260
  mergedClsPrefix: Ref<string>;
259
261
  tag: Ref<string>;
@@ -83,9 +83,11 @@ export default c([cB('align-start', `
83
83
  })]), cE('text', `
84
84
  display: grid;
85
85
  gap: 16px;
86
- grid-template-columns: 1fr 1fr;
86
+ grid-template-columns: 1fr;
87
87
  height: 100%
88
- `), cE('title', `
88
+ `, [cM('has-right', `
89
+ grid-template-columns: 1fr 1fr;
90
+ `)]), cE('title', `
89
91
  flex-grow: 1;
90
92
  `), cE('subtitle', `
91
93
  flex-grow: 1;
@@ -140,6 +140,12 @@ declare const enUS: {
140
140
  deleteText: string;
141
141
  editingTitle: string;
142
142
  };
143
+ MappingCard: {
144
+ copyTooltip: string;
145
+ editTooltip: string;
146
+ deleteTooltip: string;
147
+ switchTooltip: string;
148
+ };
143
149
  Header: {
144
150
  desktopSearchTitle: string;
145
151
  searchPlaceholder: string;
@@ -141,6 +141,12 @@ const enUS = {
141
141
  deleteText: 'Delete',
142
142
  editingTitle: 'Editing'
143
143
  },
144
+ MappingCard: {
145
+ copyTooltip: 'Copy',
146
+ editTooltip: 'Edit',
147
+ deleteTooltip: 'Delete',
148
+ switchTooltip: 'Toggle'
149
+ },
144
150
  Header: {
145
151
  desktopSearchTitle: 'Search',
146
152
  searchPlaceholder: 'Search the site',
@@ -145,6 +145,12 @@ const ruRu = {
145
145
  deleteText: 'Удалить',
146
146
  editingTitle: 'Редактирование'
147
147
  },
148
+ MappingCard: {
149
+ copyTooltip: 'Копировать',
150
+ editTooltip: 'Редактировать',
151
+ deleteTooltip: 'Удалить',
152
+ switchTooltip: 'Переключить'
153
+ },
148
154
  Header: {
149
155
  desktopSearchTitle: 'Поиск',
150
156
  searchPlaceholder: 'Поиск по сайту',
@@ -0,0 +1,7 @@
1
+ export { renderConfig } from '../_internal/component-renderer';
2
+ export type { ComponentConfig } from '../_internal/component-renderer';
3
+ export type { MappingCardListProps, MappingCardProps, MappingRow, MappingRowItem } from './src/interface';
4
+ export { default as UMappingCard } from './src/MappingCard';
5
+ export { default as UMappingCardList } from './src/MappingCardList';
6
+ export { mappingCardDark, mappingCardLight } from './styles';
7
+ export type { MappingCardTheme, MappingCardThemeVars } from './styles';
@@ -0,0 +1,4 @@
1
+ export { renderConfig } from "../_internal/component-renderer/index.mjs";
2
+ export { default as UMappingCard } from "./src/MappingCard.mjs";
3
+ export { default as UMappingCardList } from "./src/MappingCardList.mjs";
4
+ export { mappingCardDark, mappingCardLight } from "./styles/index.mjs";