@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
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const vue_1 = require("vue");
7
+ const _mixins_1 = require("../../_mixins");
8
+ const styles_1 = require("../styles");
9
+ const injection_1 = require("./injection");
10
+ const interface_1 = require("./interface");
11
+ const Body_1 = __importDefault(require("./MappingCardParts/Body"));
12
+ const Header_1 = __importDefault(require("./MappingCardParts/Header"));
13
+ const index_cssr_1 = __importDefault(require("./styles/index.cssr"));
14
+ exports.default = (0, vue_1.defineComponent)({
15
+ name: 'MappingCard',
16
+ props: Object.assign(Object.assign({}, _mixins_1.useTheme.props), interface_1.mappingCardProps),
17
+ setup(props) {
18
+ const { mergedClsPrefixRef, inlineThemeDisabled } = (0, _mixins_1.useConfig)(props);
19
+ const { localeRef } = (0, _mixins_1.useLocale)('MappingCard');
20
+ const themeRef = (0, _mixins_1.useTheme)('MappingCard', '-mapping-card', index_cssr_1.default, styles_1.mappingCardLight, props, mergedClsPrefixRef);
21
+ const cssVarsRef = (0, vue_1.computed)(() => {
22
+ const { self: { backgroundColor, borderColor, borderRadius, headerPadding, bodyPadding, titleColor, descriptionColor, dividerBackgroundColor }, common: { cubicBezierEaseInOut } } = themeRef.value;
23
+ return {
24
+ '--u-bezier': cubicBezierEaseInOut,
25
+ '--u-background-color': backgroundColor,
26
+ '--u-border-color': borderColor,
27
+ '--u-border-radius': borderRadius,
28
+ '--u-header-padding': headerPadding,
29
+ '--u-body-padding': bodyPadding,
30
+ '--u-title-color': titleColor,
31
+ '--u-description-color': descriptionColor,
32
+ '--u-divider-background-color': dividerBackgroundColor
33
+ };
34
+ });
35
+ const themeClassHandle = inlineThemeDisabled
36
+ ? (0, _mixins_1.useThemeClass)('mapping-card', undefined, cssVarsRef, props)
37
+ : undefined;
38
+ (0, vue_1.provide)(injection_1.mappingCardInjectionKey, {
39
+ mergedClsPrefixRef,
40
+ mergedThemeRef: themeRef,
41
+ localeRef,
42
+ props
43
+ });
44
+ return {
45
+ mergedClsPrefix: mergedClsPrefixRef,
46
+ cssVars: inlineThemeDisabled ? undefined : cssVarsRef,
47
+ themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
48
+ onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender
49
+ };
50
+ },
51
+ render() {
52
+ const { cssVars, themeClass, onRender } = this;
53
+ onRender === null || onRender === void 0 ? void 0 : onRender();
54
+ return ((0, vue_1.h)("div", { class: [`${this.mergedClsPrefix}-mapping-card`, themeClass], style: cssVars },
55
+ (0, vue_1.h)(Header_1.default, null, { headerActions: this.$slots.headerActions }),
56
+ (0, vue_1.h)(Body_1.default, null)));
57
+ }
58
+ });
@@ -0,0 +1,36 @@
1
+ import type { PaginationProps } from '../../pagination';
2
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
3
+ readonly items: {
4
+ readonly type: import("vue").PropType<import("./interface").MappingCardProps[]>;
5
+ readonly default: () => never[];
6
+ };
7
+ readonly pagination: {
8
+ readonly type: import("vue").PropType<PaginationProps | false>;
9
+ readonly default: false;
10
+ };
11
+ readonly gap: {
12
+ readonly type: NumberConstructor;
13
+ readonly default: 16;
14
+ };
15
+ }>, {
16
+ mergedClsPrefix: import("vue").Ref<string, string>;
17
+ mergedPagination: import("vue").ComputedRef<PaginationProps | null>;
18
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
19
+ readonly items: {
20
+ readonly type: import("vue").PropType<import("./interface").MappingCardProps[]>;
21
+ readonly default: () => never[];
22
+ };
23
+ readonly pagination: {
24
+ readonly type: import("vue").PropType<PaginationProps | false>;
25
+ readonly default: false;
26
+ };
27
+ readonly gap: {
28
+ readonly type: NumberConstructor;
29
+ readonly default: 16;
30
+ };
31
+ }>> & Readonly<{}>, {
32
+ readonly gap: number;
33
+ readonly items: import("./interface").MappingCardProps[];
34
+ readonly pagination: false | PaginationProps;
35
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
36
+ export default _default;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const vue_1 = require("vue");
7
+ const _mixins_1 = require("../../_mixins");
8
+ const flex_1 = require("../../flex");
9
+ const pagination_1 = require("../../pagination");
10
+ const interface_1 = require("./interface");
11
+ const MappingCard_1 = __importDefault(require("./MappingCard"));
12
+ exports.default = (0, vue_1.defineComponent)({
13
+ name: 'MappingCardList',
14
+ props: interface_1.mappingCardListProps,
15
+ setup(props) {
16
+ const { mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
17
+ const mergedPaginationRef = (0, vue_1.computed)(() => {
18
+ const { pagination } = props;
19
+ if (pagination === false)
20
+ return null;
21
+ return pagination;
22
+ });
23
+ return {
24
+ mergedClsPrefix: mergedClsPrefixRef,
25
+ mergedPagination: mergedPaginationRef
26
+ };
27
+ },
28
+ render() {
29
+ const { mergedClsPrefix, mergedPagination, gap, items } = this;
30
+ return ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-mapping-card-list` },
31
+ (0, vue_1.h)(flex_1.UFlex, { vertical: true, size: gap, class: `${mergedClsPrefix}-mapping-card-list__items` }, {
32
+ default: () => items.map((item, index) => (0, vue_1.h)(MappingCard_1.default, Object.assign({ key: index }, item)))
33
+ }),
34
+ mergedPagination ? ((0, vue_1.h)(flex_1.UFlex, { justify: "flex-end", class: `${mergedClsPrefix}-mapping-card-list__pagination` }, {
35
+ default: () => (0, vue_1.h)(pagination_1.UPagination, Object.assign({}, mergedPagination))
36
+ })) : null));
37
+ }
38
+ });
@@ -0,0 +1,4 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {
2
+ injection: import("../injection").MappingCardInjection;
3
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
4
+ export default _default;
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const vue_1 = require("vue");
4
+ const component_renderer_1 = require("../../../_internal/component-renderer");
5
+ const grid_1 = require("../../../grid");
6
+ const list_1 = require("../../../list");
7
+ const injection_1 = require("../injection");
8
+ exports.default = (0, vue_1.defineComponent)({
9
+ name: 'MappingCardBody',
10
+ setup() {
11
+ const injection = (0, vue_1.inject)(injection_1.mappingCardInjectionKey);
12
+ return { injection };
13
+ },
14
+ render() {
15
+ var _a;
16
+ const { injection } = this;
17
+ const { mergedClsPrefixRef, props } = injection;
18
+ const prefix = mergedClsPrefixRef.value;
19
+ const rows = (_a = props.rows) !== null && _a !== void 0 ? _a : [];
20
+ const renderRowItem = (item, index) => {
21
+ var _a, _b;
22
+ const span = (_b = (_a = item.span) !== null && _a !== void 0 ? _a : props.defaultSpan) !== null && _b !== void 0 ? _b : 1;
23
+ return ((0, vue_1.h)("div", { key: index, class: [
24
+ `${prefix}-mapping-card__body-item`,
25
+ item.type && `${prefix}-mapping-card__body-item--${item.type}`
26
+ ], style: { gridColumn: `span ${span}` } }, item.render
27
+ ? item.render()
28
+ : (0, component_renderer_1.renderConfig)({
29
+ type: item.type,
30
+ params: item.params,
31
+ slots: item.slots
32
+ })));
33
+ };
34
+ return ((0, vue_1.h)("div", { class: `${prefix}-mapping-card__body` }, rows.map((group, index) => {
35
+ var _a;
36
+ return ((0, vue_1.h)("div", { key: (_a = group.id) !== null && _a !== void 0 ? _a : index, class: `${prefix}-mapping-card__body-group` },
37
+ (0, vue_1.h)(list_1.UList, { showDivider: false, showIcon: false }, {
38
+ default: () => {
39
+ var _a;
40
+ return ((0, vue_1.h)(grid_1.UGrid, { cols: (_a = props.cols) !== null && _a !== void 0 ? _a : 3, layoutShiftDisabled: true, class: `${prefix}-mapping-card__body-items` }, {
41
+ default: () => group.items.map(renderRowItem)
42
+ }));
43
+ }
44
+ }),
45
+ group.icon && ((0, vue_1.h)("div", { class: `${prefix}-mapping-card__body-group-icon` }, group.icon()))));
46
+ })));
47
+ }
48
+ });
@@ -0,0 +1,7 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {
2
+ injection: import("../injection").MappingCardInjection;
3
+ slots: Readonly<{
4
+ [name: string]: import("vue").Slot<any> | undefined;
5
+ }>;
6
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
7
+ export default _default;
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const vue_1 = require("vue");
4
+ const icons_1 = require("../../../_internal/icons");
5
+ const _utils_1 = require("../../../_utils");
6
+ const button_1 = require("../../../button");
7
+ const flex_1 = require("../../../flex");
8
+ const icon_1 = require("../../../icon");
9
+ const switch_1 = require("../../../switch");
10
+ const tooltip_1 = require("../../../tooltip");
11
+ const injection_1 = require("../injection");
12
+ exports.default = (0, vue_1.defineComponent)({
13
+ name: 'MappingCardHeader',
14
+ setup(_, { slots }) {
15
+ const injection = (0, vue_1.inject)(injection_1.mappingCardInjectionKey);
16
+ return { injection, slots };
17
+ },
18
+ render() {
19
+ const { injection, slots } = this;
20
+ const { mergedClsPrefixRef, mergedThemeRef, localeRef, props } = injection;
21
+ const prefix = mergedClsPrefixRef.value;
22
+ const theme = mergedThemeRef.value;
23
+ const locale = localeRef.value;
24
+ const renderTextProp = (value) => typeof value === 'function' ? value() : value;
25
+ return ((0, vue_1.h)("div", { class: `${prefix}-mapping-card__header` },
26
+ (0, vue_1.h)(flex_1.UFlex, { align: "center", size: "small", class: `${prefix}-mapping-card__header-info` }, {
27
+ default: () => ((0, vue_1.h)(vue_1.Fragment, null,
28
+ (0, vue_1.h)("div", { class: `${prefix}-mapping-card__header-info-text` },
29
+ (0, vue_1.h)("div", { class: `${prefix}-mapping-card__header-title` }, renderTextProp(props.title)),
30
+ props.description && ((0, vue_1.h)("div", { class: `${prefix}-mapping-card__header-description` }, renderTextProp(props.description)))),
31
+ !props.hideCopy && ((0, vue_1.h)(tooltip_1.UTooltip, null, {
32
+ trigger: () => {
33
+ var _a;
34
+ return ((0, vue_1.h)(button_1.UButton, Object.assign({ quaternary: true, circle: true }, ((_a = props.copyButtonProps) !== null && _a !== void 0 ? _a : {}), { theme: theme.peers.Button, themeOverrides: theme.peerOverrides.Button, onClick: () => { var _a; return (_a = props.onCopy) === null || _a === void 0 ? void 0 : _a.call(props); } }), {
35
+ icon: () => {
36
+ var _a;
37
+ return ((0, vue_1.h)(icon_1.UIcon, Object.assign({}, ((_a = props.copyIconProps) !== null && _a !== void 0 ? _a : {}), { theme: theme.peers.CopyIcon, themeOverrides: theme.peerOverrides.CopyIcon }), { default: () => (0, vue_1.h)(icons_1.ContentCopy, null) }));
38
+ }
39
+ }));
40
+ },
41
+ default: () => locale.copyTooltip
42
+ }))))
43
+ }),
44
+ (0, vue_1.h)(flex_1.UFlex, { align: "center", size: "small" }, {
45
+ default: () => (0, _utils_1.resolveSlot)(slots.headerActions, () => {
46
+ var _a, _b;
47
+ const buttons = [];
48
+ buttons.push((0, vue_1.h)(tooltip_1.UTooltip, null, {
49
+ trigger: () => {
50
+ var _a;
51
+ return ((0, vue_1.h)(switch_1.USwitch, Object.assign({}, ((_a = props.headerSwitchProps) !== null && _a !== void 0 ? _a : {}), { theme: theme.peers.Switch, themeOverrides: theme.peerOverrides.Switch, onUpdateValue: (val) => { var _a; return (_a = props.onSwitchChange) === null || _a === void 0 ? void 0 : _a.call(props, val); } })));
52
+ },
53
+ default: () => locale.switchTooltip
54
+ }));
55
+ buttons.push((0, vue_1.h)(button_1.UButton, Object.assign({ round: true, secondary: true, size: "small" }, ((_a = props.headerEditButtonProps) !== null && _a !== void 0 ? _a : {}), { theme: theme.peers.Button, themeOverrides: theme.peerOverrides.Button, onClick: () => { var _a; return (_a = props.onEdit) === null || _a === void 0 ? void 0 : _a.call(props); } }), {
56
+ icon: () => {
57
+ var _a;
58
+ return ((0, vue_1.h)(icon_1.UIcon, Object.assign({}, ((_a = props.headerEditIconProps) !== null && _a !== void 0 ? _a : {}), { theme: theme.peers.EditIcon, themeOverrides: theme.peerOverrides.EditIcon }), {
59
+ default: () => props.headerEditIcon ? (props.headerEditIcon()) : ((0, vue_1.h)(icons_1.EditIcon, null))
60
+ }));
61
+ },
62
+ default: () => locale.editTooltip
63
+ }));
64
+ buttons.push((0, vue_1.h)(button_1.UButton, Object.assign({ round: true, tertiary: true, size: "small" }, ((_b = props.headerDeleteButtonProps) !== null && _b !== void 0 ? _b : {}), { theme: theme.peers.Button, themeOverrides: theme.peerOverrides.Button, onClick: () => { var _a; return (_a = props.onDelete) === null || _a === void 0 ? void 0 : _a.call(props); } }), {
65
+ icon: () => {
66
+ var _a;
67
+ return ((0, vue_1.h)(icon_1.UIcon, Object.assign({}, ((_a = props.headerDeleteIconProps) !== null && _a !== void 0 ? _a : {}), { theme: theme.peers.DeleteIcon, themeOverrides: theme.peerOverrides.DeleteIcon }), {
68
+ default: () => props.headerDeleteIcon ? (props.headerDeleteIcon()) : ((0, vue_1.h)(icons_1.TrashIcon, null))
69
+ }));
70
+ },
71
+ default: () => locale.deleteTooltip
72
+ }));
73
+ return buttons;
74
+ })
75
+ })));
76
+ }
77
+ });
@@ -0,0 +1,17 @@
1
+ import type { Ref } from 'vue';
2
+ import type { MergedTheme } from '../../_mixins';
3
+ import type { MappingCardTheme } from '../styles';
4
+ import type { MappingCardProps } from './interface';
5
+ export interface MappingCardLocale {
6
+ copyTooltip: string;
7
+ editTooltip: string;
8
+ deleteTooltip: string;
9
+ switchTooltip: string;
10
+ }
11
+ export interface MappingCardInjection {
12
+ mergedClsPrefixRef: Ref<string>;
13
+ mergedThemeRef: Ref<MergedTheme<MappingCardTheme>>;
14
+ localeRef: Ref<MappingCardLocale>;
15
+ props: MappingCardProps;
16
+ }
17
+ export declare const mappingCardInjectionKey: import("vue").InjectionKey<MappingCardInjection>;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mappingCardInjectionKey = void 0;
4
+ const _utils_1 = require("../../_utils");
5
+ exports.mappingCardInjectionKey = (0, _utils_1.createInjectionKey)('u-mapping-card');
@@ -0,0 +1,105 @@
1
+ import type { PropType, VNodeChild } from 'vue';
2
+ import type { BuiltinType, BuiltinTypeMap, ComponentConfig } from '../../_internal/component-renderer';
3
+ import type { ExtractPublicPropTypes } from '../../_utils';
4
+ import type { ButtonProps } from '../../button';
5
+ import type { IconProps } from '../../icon';
6
+ import type { PaginationProps } from '../../pagination';
7
+ import type { SwitchProps } from '../../switch';
8
+ interface MappingRowItemBase {
9
+ span?: number;
10
+ }
11
+ type MappingRowItemTyped = {
12
+ [T in BuiltinType]: MappingRowItemBase & {
13
+ type: T;
14
+ params?: BuiltinTypeMap[T];
15
+ slots?: Record<string, ComponentConfig>;
16
+ render?: never;
17
+ };
18
+ }[BuiltinType];
19
+ type MappingRowItemCustom = MappingRowItemBase & {
20
+ type?: never;
21
+ params?: never;
22
+ slots?: never;
23
+ render: () => VNodeChild;
24
+ };
25
+ export type MappingRowItem = MappingRowItemTyped | MappingRowItemCustom;
26
+ export interface MappingRow {
27
+ id?: string;
28
+ icon?: () => VNodeChild;
29
+ items: MappingRowItem[];
30
+ }
31
+ export interface MappingCardInterface {
32
+ title: string | (() => VNodeChild);
33
+ description: string | (() => VNodeChild);
34
+ rows: MappingRow[];
35
+ cols?: number;
36
+ defaultSpan?: number;
37
+ copy?: () => string;
38
+ hideCopy?: boolean;
39
+ copyButtonProps?: Partial<ButtonProps>;
40
+ copyIconProps?: Partial<IconProps>;
41
+ headerEditButtonProps?: Partial<ButtonProps>;
42
+ headerEditIconProps?: Partial<IconProps>;
43
+ headerEditIcon?: () => VNodeChild;
44
+ headerDeleteButtonProps?: Partial<ButtonProps>;
45
+ headerDeleteIconProps?: Partial<IconProps>;
46
+ headerDeleteIcon?: () => VNodeChild;
47
+ headerSwitchProps?: Partial<SwitchProps>;
48
+ onCopy?: () => void;
49
+ onEdit?: () => void;
50
+ onDelete?: () => void;
51
+ onSwitchChange?: (value: boolean) => void;
52
+ }
53
+ export interface MappingCardListInterface {
54
+ items?: MappingCardProps[];
55
+ pagination?: PaginationProps | false;
56
+ gap?: number;
57
+ }
58
+ export declare const mappingCardProps: {
59
+ readonly title: PropType<MappingCardInterface["title"]>;
60
+ readonly description: PropType<MappingCardInterface["description"]>;
61
+ readonly rows: PropType<MappingCardInterface["rows"]>;
62
+ readonly cols: {
63
+ readonly type: PropType<MappingCardInterface["cols"]>;
64
+ readonly default: 3;
65
+ };
66
+ readonly defaultSpan: {
67
+ readonly type: PropType<MappingCardInterface["defaultSpan"]>;
68
+ readonly default: 1;
69
+ };
70
+ readonly copy: PropType<MappingCardInterface["copy"]>;
71
+ readonly hideCopy: {
72
+ readonly type: PropType<MappingCardInterface["hideCopy"]>;
73
+ readonly default: false;
74
+ };
75
+ readonly copyButtonProps: PropType<MappingCardInterface["copyButtonProps"]>;
76
+ readonly copyIconProps: PropType<MappingCardInterface["copyIconProps"]>;
77
+ readonly headerEditButtonProps: PropType<MappingCardInterface["headerEditButtonProps"]>;
78
+ readonly headerEditIconProps: PropType<MappingCardInterface["headerEditIconProps"]>;
79
+ readonly headerEditIcon: PropType<MappingCardInterface["headerEditIcon"]>;
80
+ readonly headerDeleteButtonProps: PropType<MappingCardInterface["headerDeleteButtonProps"]>;
81
+ readonly headerDeleteIconProps: PropType<MappingCardInterface["headerDeleteIconProps"]>;
82
+ readonly headerDeleteIcon: PropType<MappingCardInterface["headerDeleteIcon"]>;
83
+ readonly headerSwitchProps: PropType<MappingCardInterface["headerSwitchProps"]>;
84
+ readonly onCopy: PropType<MappingCardInterface["onCopy"]>;
85
+ readonly onEdit: PropType<MappingCardInterface["onEdit"]>;
86
+ readonly onDelete: PropType<MappingCardInterface["onDelete"]>;
87
+ readonly onSwitchChange: PropType<MappingCardInterface["onSwitchChange"]>;
88
+ };
89
+ export declare const mappingCardListProps: {
90
+ readonly items: {
91
+ readonly type: PropType<MappingCardProps[]>;
92
+ readonly default: () => never[];
93
+ };
94
+ readonly pagination: {
95
+ readonly type: PropType<PaginationProps | false>;
96
+ readonly default: false;
97
+ };
98
+ readonly gap: {
99
+ readonly type: NumberConstructor;
100
+ readonly default: 16;
101
+ };
102
+ };
103
+ export type MappingCardProps = ExtractPublicPropTypes<typeof mappingCardProps>;
104
+ export type MappingCardListProps = ExtractPublicPropTypes<typeof mappingCardListProps>;
105
+ export {};
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mappingCardListProps = exports.mappingCardProps = void 0;
4
+ exports.mappingCardProps = {
5
+ title: [String, Function],
6
+ description: [String, Function],
7
+ rows: Array,
8
+ cols: {
9
+ type: Number,
10
+ default: 3
11
+ },
12
+ defaultSpan: {
13
+ type: Number,
14
+ default: 1
15
+ },
16
+ copy: Function,
17
+ hideCopy: {
18
+ type: Boolean,
19
+ default: false
20
+ },
21
+ copyButtonProps: Object,
22
+ copyIconProps: Object,
23
+ headerEditButtonProps: Object,
24
+ headerEditIconProps: Object,
25
+ headerEditIcon: Function,
26
+ headerDeleteButtonProps: Object,
27
+ headerDeleteIconProps: Object,
28
+ headerDeleteIcon: Function,
29
+ headerSwitchProps: Object,
30
+ onCopy: Function,
31
+ onEdit: Function,
32
+ onDelete: Function,
33
+ onSwitchChange: Function
34
+ };
35
+ exports.mappingCardListProps = {
36
+ items: {
37
+ type: Array,
38
+ default: () => []
39
+ },
40
+ pagination: {
41
+ type: [Object, Boolean],
42
+ default: false
43
+ },
44
+ gap: {
45
+ type: Number,
46
+ default: 16
47
+ }
48
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: import("css-render").CNode;
2
+ export default _default;
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ const cssr_1 = require("../../../_utils/cssr");
7
+ // vars:
8
+ // --u-bezier
9
+ // --u-background-color
10
+ // --u-border-color
11
+ // --u-border-radius
12
+ // --u-header-padding
13
+ // --u-body-padding
14
+ // --u-title-color
15
+ // --u-description-color
16
+ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('mapping-card', `
17
+ background-color: var(--u-background-color);
18
+ border: 1px solid var(--u-border-color);
19
+ border-radius: var(--u-border-radius);
20
+ overflow: hidden;
21
+ box-sizing: border-box;
22
+ `, [(0, cssr_1.cE)('header', `
23
+ padding: var(--u-header-padding);
24
+ display: flex;
25
+ align-items: center;
26
+ justify-content: space-between;
27
+ gap: 8px;
28
+ position: relative;
29
+ `, [(0, cssr_1.c)('&::after', `
30
+ content: '';
31
+ position: absolute;
32
+ left: 24px;
33
+ right: 24px;
34
+ bottom: 0;
35
+ height: 1px;
36
+ background: var(--u-border-color);
37
+ `)]), (0, cssr_1.cE)('header-info', `
38
+ min-width: 0;
39
+ `), (0, cssr_1.cE)('header-info-text', `
40
+ min-width: 0;
41
+ `), (0, cssr_1.cE)('header-title', `
42
+ color: var(--u-title-color);
43
+ `), (0, cssr_1.cE)('header-description', `
44
+ color: var(--u-description-color);
45
+ margin-top: 2px;
46
+ `), (0, cssr_1.cE)('body', `
47
+ display: flex;
48
+ padding: var(--u-body-padding);
49
+ `), (0, cssr_1.cE)('body-group', `
50
+ flex: 1;
51
+ position: relative;
52
+ `, [(0, cssr_1.c)('&:last-child', `
53
+ padding: 0 0 12px 20px;
54
+ `), (0, cssr_1.c)('&:first-child', `
55
+ padding: 0 20px 12px 0;
56
+ `), (0, cssr_1.c)('&:only-child', `
57
+ padding: 0 0 12px 0;
58
+ `), (0, cssr_1.c)('&::after', `
59
+ content: '';
60
+ position: absolute;
61
+ right: 0;
62
+ top: 0;
63
+ width: 1px;
64
+ height: calc(100% - 12px);
65
+ background: var(--u-border-color);
66
+ `), (0, cssr_1.c)('&:last-child::after', `
67
+ display: none;
68
+ `)]), (0, cssr_1.cE)('body-items', `
69
+ align-items: center;
70
+ `), (0, cssr_1.cE)('body-item', [(0, cssr_1.cM)('text', `
71
+ padding: 0 24px;
72
+ `)]), (0, cssr_1.cE)('body-group-icon', `
73
+ position: absolute;
74
+ right: 0;
75
+ top: 50%;
76
+ transform: translate(50%, -50%);
77
+ z-index: 1;
78
+ display: flex;
79
+ align-items: center;
80
+ height: 44px;
81
+ width: 44px;
82
+ border-radius: 100px;
83
+ justify-content: center;
84
+ background-color: var(--u-divider-background-color);
85
+ `), (0, cssr_1.cE)('side', `
86
+ flex: 1;
87
+ min-width: 0;
88
+ `), (0, cssr_1.cE)('arrow', `
89
+ display: flex;
90
+ align-items: center;
91
+ padding-top: 32px;
92
+ color: var(--u-arrow-color);
93
+ font-size: 16px;
94
+ flex-shrink: 0;
95
+ `)]), (0, cssr_1.cB)('mapping-card-list', [(0, cssr_1.cE)('pagination', `
96
+ margin-top: 16px;
97
+ `)])]);