@uzum-tech/ui 1.0.3 → 1.1.1

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 (132) hide show
  1. package/dist/index.js +372 -113
  2. package/dist/index.prod.js +1 -1
  3. package/es/_internal/account-option/index.d.ts +1 -0
  4. package/es/_internal/account-option/index.js +1 -0
  5. package/es/_internal/account-option/src/AccountOption.d.ts +162 -0
  6. package/es/_internal/account-option/src/AccountOption.js +56 -0
  7. package/es/_internal/account-option/src/styles/index.cssr.d.ts +2 -0
  8. package/es/_internal/account-option/src/styles/index.cssr.js +40 -0
  9. package/es/_internal/account-option/styles/_common.d.ts +12 -0
  10. package/es/_internal/account-option/styles/_common.js +11 -0
  11. package/es/_internal/account-option/styles/dark.d.ts +2 -0
  12. package/es/_internal/account-option/styles/dark.js +7 -0
  13. package/es/_internal/account-option/styles/index.d.ts +3 -0
  14. package/es/_internal/account-option/styles/index.js +2 -0
  15. package/es/_internal/account-option/styles/light.d.ts +26 -0
  16. package/es/_internal/account-option/styles/light.js +11 -0
  17. package/es/_internal/index.d.ts +1 -0
  18. package/es/_internal/index.js +1 -0
  19. package/es/_internal/select-menu/src/SelectMenu.d.ts +3 -0
  20. package/es/_internal/select-menu/src/SelectMenu.js +2 -1
  21. package/es/_internal/select-menu/src/SelectOption.d.ts +1 -0
  22. package/es/_internal/select-menu/src/SelectOption.js +14 -8
  23. package/es/_internal/select-menu/src/interface.d.ts +1 -0
  24. package/es/_internal/select-menu/src/styles/index.cssr.js +4 -3
  25. package/es/_internal/selection/src/Selection.d.ts +35 -8
  26. package/es/_internal/selection/src/Selection.js +44 -25
  27. package/es/_internal/selection/src/styles/index.cssr.js +12 -3
  28. package/es/_internal/selection/styles/light.d.ts +4 -0
  29. package/es/_internal/selection/styles/light.js +2 -0
  30. package/es/badge/src/Badge.d.ts +71 -4
  31. package/es/badge/src/Badge.js +5 -4
  32. package/es/badge/src/styles/index.cssr.js +1 -1
  33. package/es/badge/styles/light.d.ts +7 -0
  34. package/es/badge/styles/light.js +9 -2
  35. package/es/cascader/src/Cascader.d.ts +20 -0
  36. package/es/cascader/src/CascaderMenu.d.ts +2 -0
  37. package/es/cascader/src/CascaderOption.d.ts +2 -0
  38. package/es/cascader/src/CascaderSelectMenu.d.ts +2 -0
  39. package/es/cascader/src/CascaderSubmenu.d.ts +2 -0
  40. package/es/cascader/styles/light.d.ts +2 -0
  41. package/es/config-provider/src/internal-interface.d.ts +2 -0
  42. package/es/data-table/src/DataTable.d.ts +16 -0
  43. package/es/data-table/src/HeaderButton/FilterButton.d.ts +4 -0
  44. package/es/data-table/src/HeaderButton/FilterMenu.d.ts +6 -2
  45. package/es/data-table/src/TableParts/Body.d.ts +4 -0
  46. package/es/data-table/src/TableParts/Cell.d.ts +8 -0
  47. package/es/data-table/src/TableParts/Header.d.ts +4 -0
  48. package/es/data-table/src/interface.d.ts +6 -0
  49. package/es/data-table/styles/light.d.ts +2 -0
  50. package/es/list/src/List.d.ts +1 -1
  51. package/es/list/src/ListItem.d.ts +1 -1
  52. package/es/pagination/src/Pagination.d.ts +22 -0
  53. package/es/pagination/styles/light.d.ts +2 -0
  54. package/es/select/demos/enUS/flag.d.ts +2 -0
  55. package/es/select/demos/enUS/flag.js +25 -0
  56. package/es/select/src/Select.d.ts +35 -1
  57. package/es/select/src/Select.js +10 -5
  58. package/es/select/src/interface.d.ts +2 -0
  59. package/es/select/styles/light.d.ts +2 -0
  60. package/es/theme-editor/src/ThemeEditor.js +2 -2
  61. package/es/themes/dark.js +2 -0
  62. package/es/themes/light.js +2 -0
  63. package/es/tree-select/src/TreeSelect.d.ts +20 -0
  64. package/es/tree-select/styles/light.d.ts +2 -0
  65. package/es/version.d.ts +1 -1
  66. package/es/version.js +1 -1
  67. package/lib/_internal/account-option/index.d.ts +1 -0
  68. package/lib/_internal/account-option/index.js +8 -0
  69. package/lib/_internal/account-option/src/AccountOption.d.ts +162 -0
  70. package/lib/_internal/account-option/src/AccountOption.js +61 -0
  71. package/lib/_internal/account-option/src/styles/index.cssr.d.ts +2 -0
  72. package/lib/_internal/account-option/src/styles/index.cssr.js +45 -0
  73. package/lib/_internal/account-option/styles/_common.d.ts +12 -0
  74. package/lib/_internal/account-option/styles/_common.js +13 -0
  75. package/lib/_internal/account-option/styles/dark.d.ts +2 -0
  76. package/lib/_internal/account-option/styles/dark.js +10 -0
  77. package/lib/_internal/account-option/styles/index.d.ts +3 -0
  78. package/lib/_internal/account-option/styles/index.js +7 -0
  79. package/lib/_internal/account-option/styles/light.d.ts +26 -0
  80. package/lib/_internal/account-option/styles/light.js +18 -0
  81. package/lib/_internal/index.d.ts +1 -0
  82. package/lib/_internal/index.js +3 -1
  83. package/lib/_internal/select-menu/src/SelectMenu.d.ts +3 -0
  84. package/lib/_internal/select-menu/src/SelectMenu.js +2 -1
  85. package/lib/_internal/select-menu/src/SelectOption.d.ts +1 -0
  86. package/lib/_internal/select-menu/src/SelectOption.js +14 -8
  87. package/lib/_internal/select-menu/src/interface.d.ts +1 -0
  88. package/lib/_internal/select-menu/src/styles/index.cssr.js +4 -3
  89. package/lib/_internal/selection/src/Selection.d.ts +35 -8
  90. package/lib/_internal/selection/src/Selection.js +43 -24
  91. package/lib/_internal/selection/src/styles/index.cssr.js +12 -3
  92. package/lib/_internal/selection/styles/light.d.ts +4 -0
  93. package/lib/_internal/selection/styles/light.js +2 -0
  94. package/lib/badge/src/Badge.d.ts +71 -4
  95. package/lib/badge/src/Badge.js +5 -4
  96. package/lib/badge/src/styles/index.cssr.js +1 -1
  97. package/lib/badge/styles/light.d.ts +7 -0
  98. package/lib/badge/styles/light.js +9 -2
  99. package/lib/cascader/src/Cascader.d.ts +20 -0
  100. package/lib/cascader/src/CascaderMenu.d.ts +2 -0
  101. package/lib/cascader/src/CascaderOption.d.ts +2 -0
  102. package/lib/cascader/src/CascaderSelectMenu.d.ts +2 -0
  103. package/lib/cascader/src/CascaderSubmenu.d.ts +2 -0
  104. package/lib/cascader/styles/light.d.ts +2 -0
  105. package/lib/config-provider/src/internal-interface.d.ts +2 -0
  106. package/lib/data-table/src/DataTable.d.ts +16 -0
  107. package/lib/data-table/src/HeaderButton/FilterButton.d.ts +4 -0
  108. package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +6 -2
  109. package/lib/data-table/src/TableParts/Body.d.ts +4 -0
  110. package/lib/data-table/src/TableParts/Cell.d.ts +8 -0
  111. package/lib/data-table/src/TableParts/Header.d.ts +4 -0
  112. package/lib/data-table/src/interface.d.ts +6 -0
  113. package/lib/data-table/styles/light.d.ts +2 -0
  114. package/lib/list/src/List.d.ts +1 -1
  115. package/lib/list/src/ListItem.d.ts +1 -1
  116. package/lib/pagination/src/Pagination.d.ts +22 -0
  117. package/lib/pagination/styles/light.d.ts +2 -0
  118. package/lib/select/demos/enUS/flag.d.ts +2 -0
  119. package/lib/select/demos/enUS/flag.js +27 -0
  120. package/lib/select/src/Select.d.ts +35 -1
  121. package/lib/select/src/Select.js +10 -5
  122. package/lib/select/src/interface.d.ts +2 -0
  123. package/lib/select/styles/light.d.ts +2 -0
  124. package/lib/theme-editor/src/ThemeEditor.js +2 -2
  125. package/lib/themes/dark.js +2 -0
  126. package/lib/themes/light.js +2 -0
  127. package/lib/tree-select/src/TreeSelect.d.ts +20 -0
  128. package/lib/tree-select/styles/light.d.ts +2 -0
  129. package/lib/version.d.ts +1 -1
  130. package/lib/version.js +1 -1
  131. package/package.json +1 -1
  132. package/web-types.json +41 -6
@@ -0,0 +1,162 @@
1
+ import { type PropType, VNodeChild } from 'vue';
2
+ declare const _default: import("vue").DefineComponent<{
3
+ icon: PropType<() => VNodeChild>;
4
+ avatar: PropType<() => VNodeChild>;
5
+ label: PropType<VNodeChild>;
6
+ value: (StringConstructor | NumberConstructor)[];
7
+ theme: PropType<import("../../../_mixins").Theme<"AccountOption", {
8
+ height: string;
9
+ labelColor: string;
10
+ labelFontSize: string;
11
+ labelFontWeight: string;
12
+ labelLineHeight: string;
13
+ valueFontSize: string;
14
+ valueFontWeight: string;
15
+ valueLineHeight: string;
16
+ avatarColor: string;
17
+ avatarIconColor: string;
18
+ iconWidth: string;
19
+ iconHeight: string;
20
+ iconMargin: string;
21
+ iconSize: string;
22
+ labelMargin: string;
23
+ avatarWidth: string;
24
+ avatarHeight: string;
25
+ avatarRadius: string;
26
+ avatarSize: string;
27
+ }, any>>;
28
+ themeOverrides: PropType<import("../../../_mixins/use-theme").ExtractThemeOverrides<import("../../../_mixins").Theme<"AccountOption", {
29
+ height: string;
30
+ labelColor: string;
31
+ labelFontSize: string;
32
+ labelFontWeight: string;
33
+ labelLineHeight: string;
34
+ valueFontSize: string;
35
+ valueFontWeight: string;
36
+ valueLineHeight: string;
37
+ avatarColor: string;
38
+ avatarIconColor: string;
39
+ iconWidth: string;
40
+ iconHeight: string;
41
+ iconMargin: string;
42
+ iconSize: string;
43
+ labelMargin: string;
44
+ avatarWidth: string;
45
+ avatarHeight: string;
46
+ avatarRadius: string;
47
+ avatarSize: string;
48
+ }, any>>>;
49
+ builtinThemeOverrides: PropType<import("../../../_mixins/use-theme").ExtractThemeOverrides<import("../../../_mixins").Theme<"AccountOption", {
50
+ height: string;
51
+ labelColor: string;
52
+ labelFontSize: string;
53
+ labelFontWeight: string;
54
+ labelLineHeight: string;
55
+ valueFontSize: string;
56
+ valueFontWeight: string;
57
+ valueLineHeight: string;
58
+ avatarColor: string;
59
+ avatarIconColor: string;
60
+ iconWidth: string;
61
+ iconHeight: string;
62
+ iconMargin: string;
63
+ iconSize: string;
64
+ labelMargin: string;
65
+ avatarWidth: string;
66
+ avatarHeight: string;
67
+ avatarRadius: string;
68
+ avatarSize: string;
69
+ }, any>>>;
70
+ }, {
71
+ mergedClsPrefix: import("vue").Ref<string>;
72
+ cssVars: import("vue").ComputedRef<{
73
+ '--u-height': string;
74
+ '--u-icon-width': string;
75
+ '--u-icon-height': string;
76
+ '--u-icon-margin': string;
77
+ '--u-icon-size': string;
78
+ '--u-label-margin': string;
79
+ '--u-label-color': string;
80
+ '--u-label-font-size': string;
81
+ '--u-label-font-weight': string;
82
+ '--u-label-line-height': string;
83
+ '--u-value-font-size': string;
84
+ '--u-value-font-weight': string;
85
+ '--u-value-line-height': string;
86
+ '--u-avatar-width': string;
87
+ '--u-avatar-height': string;
88
+ '--u-avatar-radius': string;
89
+ '--u-avatar-color': string;
90
+ '--u-avatar-icon-color': string;
91
+ '--u-avatar-size': string;
92
+ }>;
93
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
94
+ icon: PropType<() => VNodeChild>;
95
+ avatar: PropType<() => VNodeChild>;
96
+ label: PropType<VNodeChild>;
97
+ value: (StringConstructor | NumberConstructor)[];
98
+ theme: PropType<import("../../../_mixins").Theme<"AccountOption", {
99
+ height: string;
100
+ labelColor: string;
101
+ labelFontSize: string;
102
+ labelFontWeight: string;
103
+ labelLineHeight: string;
104
+ valueFontSize: string;
105
+ valueFontWeight: string;
106
+ valueLineHeight: string;
107
+ avatarColor: string;
108
+ avatarIconColor: string;
109
+ iconWidth: string;
110
+ iconHeight: string;
111
+ iconMargin: string;
112
+ iconSize: string;
113
+ labelMargin: string;
114
+ avatarWidth: string;
115
+ avatarHeight: string;
116
+ avatarRadius: string;
117
+ avatarSize: string;
118
+ }, any>>;
119
+ themeOverrides: PropType<import("../../../_mixins/use-theme").ExtractThemeOverrides<import("../../../_mixins").Theme<"AccountOption", {
120
+ height: string;
121
+ labelColor: string;
122
+ labelFontSize: string;
123
+ labelFontWeight: string;
124
+ labelLineHeight: string;
125
+ valueFontSize: string;
126
+ valueFontWeight: string;
127
+ valueLineHeight: string;
128
+ avatarColor: string;
129
+ avatarIconColor: string;
130
+ iconWidth: string;
131
+ iconHeight: string;
132
+ iconMargin: string;
133
+ iconSize: string;
134
+ labelMargin: string;
135
+ avatarWidth: string;
136
+ avatarHeight: string;
137
+ avatarRadius: string;
138
+ avatarSize: string;
139
+ }, any>>>;
140
+ builtinThemeOverrides: PropType<import("../../../_mixins/use-theme").ExtractThemeOverrides<import("../../../_mixins").Theme<"AccountOption", {
141
+ height: string;
142
+ labelColor: string;
143
+ labelFontSize: string;
144
+ labelFontWeight: string;
145
+ labelLineHeight: string;
146
+ valueFontSize: string;
147
+ valueFontWeight: string;
148
+ valueLineHeight: string;
149
+ avatarColor: string;
150
+ avatarIconColor: string;
151
+ iconWidth: string;
152
+ iconHeight: string;
153
+ iconMargin: string;
154
+ iconSize: string;
155
+ labelMargin: string;
156
+ avatarWidth: string;
157
+ avatarHeight: string;
158
+ avatarRadius: string;
159
+ avatarSize: string;
160
+ }, any>>>;
161
+ }>>, {}, {}>;
162
+ export default _default;
@@ -0,0 +1,61 @@
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 icon_1 = require("../../icon");
9
+ const index_cssr_1 = __importDefault(require("./styles/index.cssr"));
10
+ const styles_1 = require("../styles");
11
+ exports.default = (0, vue_1.defineComponent)({
12
+ name: 'BaseClear',
13
+ inheritAttrs: false,
14
+ props: Object.assign(Object.assign({}, _mixins_1.useTheme.props), { icon: Function, avatar: Function, label: [String, Object], value: [String, Number] }),
15
+ setup(props) {
16
+ const { mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
17
+ const themeRef = (0, _mixins_1.useTheme)('AccountOption', '-base-account-option', index_cssr_1.default, styles_1.accountOptionLight, props, mergedClsPrefixRef);
18
+ const cssVarsRef = (0, vue_1.computed)(() => {
19
+ const { self: { height, iconWidth, iconHeight, iconMargin, iconSize, labelMargin, labelColor, labelFontSize, labelFontWeight, labelLineHeight, valueFontSize, valueFontWeight, valueLineHeight, avatarWidth, avatarHeight, avatarRadius, avatarColor, avatarIconColor, avatarSize } } = themeRef.value;
20
+ return {
21
+ '--u-height': height,
22
+ '--u-icon-width': iconWidth,
23
+ '--u-icon-height': iconHeight,
24
+ '--u-icon-margin': iconMargin,
25
+ '--u-icon-size': iconSize,
26
+ '--u-label-margin': labelMargin,
27
+ '--u-label-color': labelColor,
28
+ '--u-label-font-size': labelFontSize,
29
+ '--u-label-font-weight': labelFontWeight,
30
+ '--u-label-line-height': labelLineHeight,
31
+ '--u-value-font-size': valueFontSize,
32
+ '--u-value-font-weight': valueFontWeight,
33
+ '--u-value-line-height': valueLineHeight,
34
+ '--u-avatar-width': avatarWidth,
35
+ '--u-avatar-height': avatarHeight,
36
+ '--u-avatar-radius': avatarRadius,
37
+ '--u-avatar-color': avatarColor,
38
+ '--u-avatar-icon-color': avatarIconColor,
39
+ '--u-avatar-size': avatarSize
40
+ };
41
+ });
42
+ return {
43
+ mergedClsPrefix: mergedClsPrefixRef,
44
+ cssVars: cssVarsRef
45
+ };
46
+ },
47
+ render() {
48
+ const { mergedClsPrefix, cssVars } = this;
49
+ const icon = this.avatar || this.icon ? ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-base-account-option__icon` }, (0, vue_1.h)(icon_1.UBaseIcon, { clsPrefix: mergedClsPrefix }, {
50
+ default: this.avatar || this.icon
51
+ }))) : null;
52
+ return ((0, vue_1.h)("div", { class: [
53
+ `${mergedClsPrefix}-base-account-option`,
54
+ this.avatar && `${mergedClsPrefix}-base-account-option--avatar`
55
+ ], style: cssVars },
56
+ icon,
57
+ (0, vue_1.h)("div", { class: `${mergedClsPrefix}-base-account-option__wrap` },
58
+ (0, vue_1.h)("div", { class: `${mergedClsPrefix}-base-account-option__label` }, this.label),
59
+ (0, vue_1.h)("div", { class: `${mergedClsPrefix}-base-account-option__value` }, this.value))));
60
+ }
61
+ });
@@ -0,0 +1,2 @@
1
+ declare const _default: import("css-render").CNode;
2
+ export default _default;
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ const cssr_1 = require("../../../../_utils/cssr");
7
+ exports.default = (0, cssr_1.cB)('base-account-option', `
8
+ display: flex;
9
+ align-items: center;
10
+ position: relative;
11
+ height: var(--u-height);
12
+ `, [(0, cssr_1.cE)('icon', `
13
+ display: flex;
14
+ align-items: center;
15
+ justify-content: center;
16
+ flex-shrink: 0;
17
+ width: var(--u-icon-width);
18
+ height: var(--u-icon-height);
19
+ margin: var(--u-icon-margin);
20
+ font-size: var(--u-icon-size);
21
+ `), (0, cssr_1.cE)('wrap', `
22
+ width: 10px;
23
+ flex-grow: 1;
24
+ `), (0, cssr_1.cE)('label', `
25
+ margin: var(--u-label-margin);
26
+ color: var(--u-label-color);
27
+ font-size: var(--u-label-font-size);
28
+ font-weight: var(--u-label-font-weight);
29
+ line-height: var(--u-label-line-height);
30
+ text-overflow: ellipsis;
31
+ overflow: hidden;
32
+ `), (0, cssr_1.cE)('value', `
33
+ font-size: var(--u-value-font-size);
34
+ font-weight: var(--u-value-font-weight);
35
+ line-height: var(--u-value-line-height);
36
+ text-overflow: ellipsis;
37
+ overflow: hidden;
38
+ `), (0, cssr_1.cM)('avatar', [(0, cssr_1.cE)('icon', `
39
+ width: var(--u-avatar-width);
40
+ height: var(--u-avatar-height);
41
+ border-radius: var(--u-avatar-radius);
42
+ background: var(--u-avatar-color);
43
+ color: var(--u-avatar-icon-color);
44
+ font-size: var(--u-avatar-size);
45
+ `)])]);
@@ -0,0 +1,12 @@
1
+ declare const _default: {
2
+ iconWidth: string;
3
+ iconHeight: string;
4
+ iconMargin: string;
5
+ iconSize: string;
6
+ labelMargin: string;
7
+ avatarWidth: string;
8
+ avatarHeight: string;
9
+ avatarRadius: string;
10
+ avatarSize: string;
11
+ };
12
+ export default _default;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = {
4
+ iconWidth: '44px',
5
+ iconHeight: '44px',
6
+ iconMargin: '0 16px 0 0',
7
+ iconSize: '44px',
8
+ labelMargin: '0 0 4px 0',
9
+ avatarWidth: '44px',
10
+ avatarHeight: '28px',
11
+ avatarRadius: '4px',
12
+ avatarSize: '16px'
13
+ };
@@ -0,0 +1,2 @@
1
+ import { type AccountOptionTheme } from './light';
2
+ export declare const accountOptionDark: AccountOptionTheme;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.accountOptionDark = void 0;
4
+ const common_1 = require("../../../_styles/common");
5
+ const light_1 = require("./light");
6
+ exports.accountOptionDark = {
7
+ name: 'AccountOption',
8
+ common: common_1.commonDark,
9
+ self: light_1.self
10
+ };
@@ -0,0 +1,3 @@
1
+ export { accountOptionDark } from './dark';
2
+ export { accountOptionLight } from './light';
3
+ export type { AccountOptionTheme, AccountOptionThemeVars } from './light';
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.accountOptionLight = exports.accountOptionDark = void 0;
4
+ var dark_1 = require("./dark");
5
+ Object.defineProperty(exports, "accountOptionDark", { enumerable: true, get: function () { return dark_1.accountOptionDark; } });
6
+ var light_1 = require("./light");
7
+ Object.defineProperty(exports, "accountOptionLight", { enumerable: true, get: function () { return light_1.accountOptionLight; } });
@@ -0,0 +1,26 @@
1
+ import type { ThemeCommonVars } from '../../../_styles/common';
2
+ import { type Theme } from '../../../_mixins';
3
+ export declare const self: (vars: ThemeCommonVars) => {
4
+ height: string;
5
+ labelColor: string;
6
+ labelFontSize: string;
7
+ labelFontWeight: string;
8
+ labelLineHeight: string;
9
+ valueFontSize: string;
10
+ valueFontWeight: string;
11
+ valueLineHeight: string;
12
+ avatarColor: string;
13
+ avatarIconColor: string;
14
+ iconWidth: string;
15
+ iconHeight: string;
16
+ iconMargin: string;
17
+ iconSize: string;
18
+ labelMargin: string;
19
+ avatarWidth: string;
20
+ avatarHeight: string;
21
+ avatarRadius: string;
22
+ avatarSize: string;
23
+ };
24
+ export type AccountOptionThemeVars = ReturnType<typeof self>;
25
+ export declare const accountOptionLight: Theme<'AccountOption', AccountOptionThemeVars>;
26
+ export type AccountOptionTheme = typeof accountOptionLight;
@@ -0,0 +1,18 @@
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
+ exports.accountOptionLight = exports.self = void 0;
7
+ const common_1 = require("../../../_styles/common");
8
+ const _common_1 = __importDefault(require("./_common"));
9
+ const self = (vars) => {
10
+ const { heightHuge, fontBodyLarge, fontTitleMedium, lineHeightBodyLarge, lineHeightTitleMedium, fontWeight, fontWeightStrong, textSecondary, elementsPrimary, elementsSecondary } = vars;
11
+ return Object.assign(Object.assign({}, _common_1.default), { height: heightHuge, labelColor: textSecondary, labelFontSize: fontBodyLarge, labelFontWeight: fontWeight, labelLineHeight: lineHeightBodyLarge, valueFontSize: fontTitleMedium, valueFontWeight: fontWeightStrong, valueLineHeight: lineHeightTitleMedium, avatarColor: elementsPrimary, avatarIconColor: elementsSecondary });
12
+ };
13
+ exports.self = self;
14
+ exports.accountOptionLight = {
15
+ name: 'AccountOption',
16
+ common: common_1.commonLight,
17
+ self: exports.self
18
+ };
@@ -22,3 +22,4 @@ export { checkboxGroupInjectionKey, checkboxBaseProps, useCheckbox } from './che
22
22
  export type { CheckboxBaseProps, UseCheckbox, OnUpdateChecked, OnUpdateCheckedImpl, CheckboxInst } from './checkbox';
23
23
  export { radioBaseProps, radioGroupInjectionKey, useRadio } from './radio';
24
24
  export type { OnUpdateValue, OnUpdateValueImpl, RadioGroupInjection, UseRadio, RadioBaseProps } from './radio';
25
+ export { default as UBaseAccountOption } from './account-option';
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.useRadio = exports.radioGroupInjectionKey = exports.radioBaseProps = exports.useCheckbox = exports.checkboxBaseProps = exports.checkboxGroupInjectionKey = exports.UxScrollbar = exports.UScrollbar = exports.UBaseSuffix = exports.UBaseClear = exports.UBaseSlotMachine = exports.UInternalSelection = exports.UBaseMenuMask = exports.UBaseWave = exports.UInternalSelectMenu = exports.UBaseSkeleton = exports.UBaseLoading = exports.UBaseFocusDetector = exports.UBaseIcon = exports.UBaseClose = exports.UFadeInExpandTransition = exports.UIconSwitchTransition = void 0;
6
+ exports.UBaseAccountOption = exports.useRadio = exports.radioGroupInjectionKey = exports.radioBaseProps = exports.useCheckbox = exports.checkboxBaseProps = exports.checkboxGroupInjectionKey = exports.UxScrollbar = exports.UScrollbar = exports.UBaseSuffix = exports.UBaseClear = exports.UBaseSlotMachine = exports.UInternalSelection = exports.UBaseMenuMask = exports.UBaseWave = exports.UInternalSelectMenu = exports.UBaseSkeleton = exports.UBaseLoading = exports.UBaseFocusDetector = exports.UBaseIcon = exports.UBaseClose = exports.UFadeInExpandTransition = exports.UIconSwitchTransition = void 0;
7
7
  var icon_switch_transition_1 = require("./icon-switch-transition");
8
8
  Object.defineProperty(exports, "UIconSwitchTransition", { enumerable: true, get: function () { return __importDefault(icon_switch_transition_1).default; } });
9
9
  var fade_in_expand_transition_1 = require("./fade-in-expand-transition");
@@ -43,3 +43,5 @@ var radio_1 = require("./radio");
43
43
  Object.defineProperty(exports, "radioBaseProps", { enumerable: true, get: function () { return radio_1.radioBaseProps; } });
44
44
  Object.defineProperty(exports, "radioGroupInjectionKey", { enumerable: true, get: function () { return radio_1.radioGroupInjectionKey; } });
45
45
  Object.defineProperty(exports, "useRadio", { enumerable: true, get: function () { return radio_1.useRadio; } });
46
+ var account_option_1 = require("./account-option");
47
+ Object.defineProperty(exports, "UBaseAccountOption", { enumerable: true, get: function () { return __importDefault(account_option_1).default; } });
@@ -16,6 +16,7 @@ declare const _default: import("vue").DefineComponent<{
16
16
  required: true;
17
17
  };
18
18
  multiple: BooleanConstructor;
19
+ account: BooleanConstructor;
19
20
  size: {
20
21
  type: PropType<Size>;
21
22
  default: string;
@@ -474,6 +475,7 @@ declare const _default: import("vue").DefineComponent<{
474
475
  required: true;
475
476
  };
476
477
  multiple: BooleanConstructor;
478
+ account: BooleanConstructor;
477
479
  size: {
478
480
  type: PropType<Size>;
479
481
  default: string;
@@ -686,6 +688,7 @@ declare const _default: import("vue").DefineComponent<{
686
688
  loading: boolean;
687
689
  inlineThemeDisabled: boolean;
688
690
  scrollable: boolean;
691
+ account: boolean;
689
692
  showCheckmark: boolean;
690
693
  labelField: string;
691
694
  autoPending: boolean;
@@ -30,7 +30,7 @@ exports.default = (0, vue_1.defineComponent)({
30
30
  }, treeMate: {
31
31
  type: Object,
32
32
  required: true
33
- }, multiple: Boolean, size: {
33
+ }, multiple: Boolean, account: Boolean, size: {
34
34
  type: String,
35
35
  default: 'medium'
36
36
  }, value: {
@@ -251,6 +251,7 @@ exports.default = (0, vue_1.defineComponent)({
251
251
  nodePropsRef: (0, vue_1.toRef)(props, 'nodeProps'),
252
252
  showCheckmarkRef: (0, vue_1.toRef)(props, 'showCheckmark'),
253
253
  multipleRef: (0, vue_1.toRef)(props, 'multiple'),
254
+ accountRef: (0, vue_1.toRef)(props, 'account'),
254
255
  valueRef: (0, vue_1.toRef)(props, 'value'),
255
256
  renderLabelRef: (0, vue_1.toRef)(props, 'renderLabel'),
256
257
  renderOptionRef: (0, vue_1.toRef)(props, 'renderOption'),
@@ -13,6 +13,7 @@ declare const _default: import("vue").DefineComponent<{
13
13
  };
14
14
  }, {
15
15
  multiple: Ref<boolean>;
16
+ account: Ref<boolean>;
16
17
  isGrouped: import("vue").ComputedRef<boolean | null>;
17
18
  showCheckmark: Ref<boolean>;
18
19
  nodeProps: Ref<import("./interface").NodeProps | undefined>;
@@ -6,6 +6,7 @@ const _utils_1 = require("../../../_utils");
6
6
  const icons_1 = require("../../icons");
7
7
  const icon_1 = require("../../icon");
8
8
  const interface_1 = require("./interface");
9
+ const __1 = require("../..");
9
10
  function renderCheckMark(show, clsPrefix) {
10
11
  return ((0, vue_1.h)(vue_1.Transition, { name: "fade-in-scale-up-transition" }, {
11
12
  default: () => show ? ((0, vue_1.h)(icon_1.UBaseIcon, { clsPrefix: clsPrefix, class: `${clsPrefix}-base-select-option__check` }, {
@@ -26,7 +27,7 @@ exports.default = (0, vue_1.defineComponent)({
26
27
  }
27
28
  },
28
29
  setup(props) {
29
- const { valueRef, pendingTmNodeRef, multipleRef, valueSetRef, renderLabelRef, renderOptionRef, labelFieldRef, valueFieldRef, showCheckmarkRef, nodePropsRef, handleOptionClick, handleOptionMouseEnter
30
+ const { valueRef, pendingTmNodeRef, multipleRef, accountRef, valueSetRef, renderLabelRef, renderOptionRef, labelFieldRef, valueFieldRef, showCheckmarkRef, nodePropsRef, handleOptionClick, handleOptionMouseEnter
30
31
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
31
32
  } = (0, vue_1.inject)(interface_1.internalSelectionMenuInjectionKey);
32
33
  const isPendingRef = (0, vooks_1.useMemo)(() => {
@@ -56,6 +57,7 @@ exports.default = (0, vue_1.defineComponent)({
56
57
  }
57
58
  return {
58
59
  multiple: multipleRef,
60
+ account: accountRef,
59
61
  isGrouped: (0, vooks_1.useMemo)(() => {
60
62
  const { tmNode } = props;
61
63
  const { parent } = tmNode;
@@ -87,14 +89,17 @@ exports.default = (0, vue_1.defineComponent)({
87
89
  };
88
90
  },
89
91
  render() {
90
- const { clsPrefix, tmNode: { rawNode }, isSelected, isPending, isGrouped, showCheckmark, nodeProps, renderOption, renderLabel, handleClick, handleMouseEnter, handleMouseMove } = this;
92
+ const { clsPrefix, tmNode: { rawNode }, isSelected, isPending, isGrouped, showCheckmark, nodeProps, renderOption, renderLabel, handleClick, handleMouseEnter, handleMouseMove, account } = this;
91
93
  const checkmark = renderCheckMark(isSelected, clsPrefix);
92
- const children = renderLabel
93
- ? [renderLabel(rawNode, isSelected), showCheckmark && checkmark]
94
- : [
95
- (0, _utils_1.render)(rawNode[this.labelField], rawNode, isSelected),
94
+ const label = renderLabel
95
+ ? renderLabel(rawNode, isSelected)
96
+ : (0, _utils_1.render)(rawNode[this.labelField], rawNode, isSelected);
97
+ const children = account
98
+ ? [
99
+ (0, vue_1.h)(__1.UBaseAccountOption, Object.assign({}, rawNode, { label: label })),
96
100
  showCheckmark && checkmark
97
- ];
101
+ ]
102
+ : [label, showCheckmark && checkmark];
98
103
  const attrs = nodeProps === null || nodeProps === void 0 ? void 0 : nodeProps(rawNode);
99
104
  const node = ((0, vue_1.h)("div", Object.assign({}, attrs, { class: [
100
105
  `${clsPrefix}-base-select-option`,
@@ -105,7 +110,8 @@ exports.default = (0, vue_1.defineComponent)({
105
110
  [`${clsPrefix}-base-select-option--selected`]: isSelected,
106
111
  [`${clsPrefix}-base-select-option--grouped`]: isGrouped,
107
112
  [`${clsPrefix}-base-select-option--pending`]: isPending,
108
- [`${clsPrefix}-base-select-option--show-checkmark`]: showCheckmark
113
+ [`${clsPrefix}-base-select-option--show-checkmark`]: showCheckmark,
114
+ [`${clsPrefix}-base-select-option--account`]: account
109
115
  }
110
116
  ], style: [(attrs === null || attrs === void 0 ? void 0 : attrs.style) || '', rawNode.style || ''], onClick: (0, _utils_1.mergeEventHandlers)([handleClick, attrs === null || attrs === void 0 ? void 0 : attrs.onClick]), onMouseenter: (0, _utils_1.mergeEventHandlers)([
111
117
  handleMouseEnter,
@@ -22,6 +22,7 @@ export interface InternalSelectMenuInjection {
22
22
  valueSetRef: Ref<Set<number | string>>;
23
23
  pendingTmNodeRef: Ref<TreeNode<SelectBaseOption> | null>;
24
24
  multipleRef: Ref<boolean>;
25
+ accountRef: Ref<boolean>;
25
26
  valueRef: Ref<string | number | Array<string | number> | null>;
26
27
  renderLabelRef: Ref<RenderLabel | undefined>;
27
28
  renderOptionRef: Ref<RenderOption | undefined>;
@@ -73,6 +73,7 @@ exports.default = (0, cssr_1.cB)('base-select-menu', `
73
73
  white-space: nowrap;
74
74
  text-overflow: ellipsis;
75
75
  overflow: hidden;
76
+ width: 100%;
76
77
  `), (0, cssr_1.cM)('show-checkmark', `
77
78
  padding-right: calc(var(--u-option-padding-right) + 20px);
78
79
  `), (0, cssr_1.c)('&::before', `
@@ -96,9 +97,9 @@ exports.default = (0, cssr_1.cB)('base-select-menu', `
96
97
  padding-left: var(--u-option-padding-left);
97
98
  `), (0, cssr_1.cM)('pending', [(0, cssr_1.c)('&::before', `
98
99
  background-color: var(--u-option-color-pending);
99
- `)]), (0, cssr_1.cM)('selected', `
100
+ `)]), (0, cssr_1.cM)('selected', [(0, cssr_1.cNotM)('account', `
100
101
  color: var(--u-option-text-color-active);
101
- `, [(0, cssr_1.c)('&::before', `
102
+ `), (0, cssr_1.c)('&::before', `
102
103
  background-color: var(--u-option-color-active);
103
104
  `), (0, cssr_1.cM)('pending', [(0, cssr_1.c)('&::before', `
104
105
  background-color: var(--u-option-color-active-pending);
@@ -109,7 +110,7 @@ exports.default = (0, cssr_1.cB)('base-select-menu', `
109
110
  `), (0, cssr_1.cM)('selected', `
110
111
  opacity: var(--u-option-opacity-disabled);
111
112
  `)]), (0, cssr_1.cE)('check', `
112
- font-size: 16px;
113
+ font-size: 24px;
113
114
  position: absolute;
114
115
  right: calc(var(--u-option-padding-right) - 4px);
115
116
  top: calc(50% - 7px);