@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 @@
1
+ export { default } from './src/AccountOption';
@@ -0,0 +1 @@
1
+ export { default } from './src/AccountOption';
@@ -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,56 @@
1
+ import { h, defineComponent, computed } from 'vue';
2
+ import { useConfig, useTheme } from '../../../_mixins';
3
+ import { UBaseIcon } from '../../icon';
4
+ import style from './styles/index.cssr';
5
+ import { accountOptionLight } from '../styles';
6
+ export default defineComponent({
7
+ name: 'BaseClear',
8
+ inheritAttrs: false,
9
+ props: Object.assign(Object.assign({}, useTheme.props), { icon: Function, avatar: Function, label: [String, Object], value: [String, Number] }),
10
+ setup(props) {
11
+ const { mergedClsPrefixRef } = useConfig(props);
12
+ const themeRef = useTheme('AccountOption', '-base-account-option', style, accountOptionLight, props, mergedClsPrefixRef);
13
+ const cssVarsRef = computed(() => {
14
+ const { self: { height, iconWidth, iconHeight, iconMargin, iconSize, labelMargin, labelColor, labelFontSize, labelFontWeight, labelLineHeight, valueFontSize, valueFontWeight, valueLineHeight, avatarWidth, avatarHeight, avatarRadius, avatarColor, avatarIconColor, avatarSize } } = themeRef.value;
15
+ return {
16
+ '--u-height': height,
17
+ '--u-icon-width': iconWidth,
18
+ '--u-icon-height': iconHeight,
19
+ '--u-icon-margin': iconMargin,
20
+ '--u-icon-size': iconSize,
21
+ '--u-label-margin': labelMargin,
22
+ '--u-label-color': labelColor,
23
+ '--u-label-font-size': labelFontSize,
24
+ '--u-label-font-weight': labelFontWeight,
25
+ '--u-label-line-height': labelLineHeight,
26
+ '--u-value-font-size': valueFontSize,
27
+ '--u-value-font-weight': valueFontWeight,
28
+ '--u-value-line-height': valueLineHeight,
29
+ '--u-avatar-width': avatarWidth,
30
+ '--u-avatar-height': avatarHeight,
31
+ '--u-avatar-radius': avatarRadius,
32
+ '--u-avatar-color': avatarColor,
33
+ '--u-avatar-icon-color': avatarIconColor,
34
+ '--u-avatar-size': avatarSize
35
+ };
36
+ });
37
+ return {
38
+ mergedClsPrefix: mergedClsPrefixRef,
39
+ cssVars: cssVarsRef
40
+ };
41
+ },
42
+ render() {
43
+ const { mergedClsPrefix, cssVars } = this;
44
+ const icon = this.avatar || this.icon ? (h("div", { class: `${mergedClsPrefix}-base-account-option__icon` }, h(UBaseIcon, { clsPrefix: mergedClsPrefix }, {
45
+ default: this.avatar || this.icon
46
+ }))) : null;
47
+ return (h("div", { class: [
48
+ `${mergedClsPrefix}-base-account-option`,
49
+ this.avatar && `${mergedClsPrefix}-base-account-option--avatar`
50
+ ], style: cssVars },
51
+ icon,
52
+ h("div", { class: `${mergedClsPrefix}-base-account-option__wrap` },
53
+ h("div", { class: `${mergedClsPrefix}-base-account-option__label` }, this.label),
54
+ h("div", { class: `${mergedClsPrefix}-base-account-option__value` }, this.value))));
55
+ }
56
+ });
@@ -0,0 +1,2 @@
1
+ declare const _default: import("css-render").CNode;
2
+ export default _default;
@@ -0,0 +1,40 @@
1
+ import { cB, cE, cM } from '../../../../_utils/cssr';
2
+ export default cB('base-account-option', `
3
+ display: flex;
4
+ align-items: center;
5
+ position: relative;
6
+ height: var(--u-height);
7
+ `, [cE('icon', `
8
+ display: flex;
9
+ align-items: center;
10
+ justify-content: center;
11
+ flex-shrink: 0;
12
+ width: var(--u-icon-width);
13
+ height: var(--u-icon-height);
14
+ margin: var(--u-icon-margin);
15
+ font-size: var(--u-icon-size);
16
+ `), cE('wrap', `
17
+ width: 10px;
18
+ flex-grow: 1;
19
+ `), cE('label', `
20
+ margin: var(--u-label-margin);
21
+ color: var(--u-label-color);
22
+ font-size: var(--u-label-font-size);
23
+ font-weight: var(--u-label-font-weight);
24
+ line-height: var(--u-label-line-height);
25
+ text-overflow: ellipsis;
26
+ overflow: hidden;
27
+ `), cE('value', `
28
+ font-size: var(--u-value-font-size);
29
+ font-weight: var(--u-value-font-weight);
30
+ line-height: var(--u-value-line-height);
31
+ text-overflow: ellipsis;
32
+ overflow: hidden;
33
+ `), cM('avatar', [cE('icon', `
34
+ width: var(--u-avatar-width);
35
+ height: var(--u-avatar-height);
36
+ border-radius: var(--u-avatar-radius);
37
+ background: var(--u-avatar-color);
38
+ color: var(--u-avatar-icon-color);
39
+ font-size: var(--u-avatar-size);
40
+ `)])]);
@@ -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,11 @@
1
+ export default {
2
+ iconWidth: '44px',
3
+ iconHeight: '44px',
4
+ iconMargin: '0 16px 0 0',
5
+ iconSize: '44px',
6
+ labelMargin: '0 0 4px 0',
7
+ avatarWidth: '44px',
8
+ avatarHeight: '28px',
9
+ avatarRadius: '4px',
10
+ avatarSize: '16px'
11
+ };
@@ -0,0 +1,2 @@
1
+ import { type AccountOptionTheme } from './light';
2
+ export declare const accountOptionDark: AccountOptionTheme;
@@ -0,0 +1,7 @@
1
+ import { commonDark } from '../../../_styles/common';
2
+ import { self } from './light';
3
+ export const accountOptionDark = {
4
+ name: 'AccountOption',
5
+ common: commonDark,
6
+ self
7
+ };
@@ -0,0 +1,3 @@
1
+ export { accountOptionDark } from './dark';
2
+ export { accountOptionLight } from './light';
3
+ export type { AccountOptionTheme, AccountOptionThemeVars } from './light';
@@ -0,0 +1,2 @@
1
+ export { accountOptionDark } from './dark';
2
+ export { accountOptionLight } from './light';
@@ -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,11 @@
1
+ import { commonLight } from '../../../_styles/common';
2
+ import commonVars from './_common';
3
+ export const self = (vars) => {
4
+ const { heightHuge, fontBodyLarge, fontTitleMedium, lineHeightBodyLarge, lineHeightTitleMedium, fontWeight, fontWeightStrong, textSecondary, elementsPrimary, elementsSecondary } = vars;
5
+ return Object.assign(Object.assign({}, commonVars), { height: heightHuge, labelColor: textSecondary, labelFontSize: fontBodyLarge, labelFontWeight: fontWeight, labelLineHeight: lineHeightBodyLarge, valueFontSize: fontTitleMedium, valueFontWeight: fontWeightStrong, valueLineHeight: lineHeightTitleMedium, avatarColor: elementsPrimary, avatarIconColor: elementsSecondary });
6
+ };
7
+ export const accountOptionLight = {
8
+ name: 'AccountOption',
9
+ common: commonLight,
10
+ self
11
+ };
@@ -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';
@@ -15,3 +15,4 @@ export { default as UBaseSuffix } from './suffix';
15
15
  export { UScrollbar, UxScrollbar } from './scrollbar';
16
16
  export { checkboxGroupInjectionKey, checkboxBaseProps, useCheckbox } from './checkbox';
17
17
  export { radioBaseProps, radioGroupInjectionKey, useRadio } from './radio';
18
+ export { default as UBaseAccountOption } from './account-option';
@@ -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;
@@ -25,7 +25,7 @@ export default defineComponent({
25
25
  }, treeMate: {
26
26
  type: Object,
27
27
  required: true
28
- }, multiple: Boolean, size: {
28
+ }, multiple: Boolean, account: Boolean, size: {
29
29
  type: String,
30
30
  default: 'medium'
31
31
  }, value: {
@@ -246,6 +246,7 @@ export default defineComponent({
246
246
  nodePropsRef: toRef(props, 'nodeProps'),
247
247
  showCheckmarkRef: toRef(props, 'showCheckmark'),
248
248
  multipleRef: toRef(props, 'multiple'),
249
+ accountRef: toRef(props, 'account'),
249
250
  valueRef: toRef(props, 'value'),
250
251
  renderLabelRef: toRef(props, 'renderLabel'),
251
252
  renderOptionRef: 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>;
@@ -4,6 +4,7 @@ import { render, mergeEventHandlers } from '../../../_utils';
4
4
  import { CheckmarkIcon } from '../../icons';
5
5
  import { UBaseIcon } from '../../icon';
6
6
  import { internalSelectionMenuInjectionKey } from './interface';
7
+ import { UBaseAccountOption } from '../..';
7
8
  function renderCheckMark(show, clsPrefix) {
8
9
  return (h(Transition, { name: "fade-in-scale-up-transition" }, {
9
10
  default: () => show ? (h(UBaseIcon, { clsPrefix: clsPrefix, class: `${clsPrefix}-base-select-option__check` }, {
@@ -24,7 +25,7 @@ export default defineComponent({
24
25
  }
25
26
  },
26
27
  setup(props) {
27
- const { valueRef, pendingTmNodeRef, multipleRef, valueSetRef, renderLabelRef, renderOptionRef, labelFieldRef, valueFieldRef, showCheckmarkRef, nodePropsRef, handleOptionClick, handleOptionMouseEnter
28
+ const { valueRef, pendingTmNodeRef, multipleRef, accountRef, valueSetRef, renderLabelRef, renderOptionRef, labelFieldRef, valueFieldRef, showCheckmarkRef, nodePropsRef, handleOptionClick, handleOptionMouseEnter
28
29
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
29
30
  } = inject(internalSelectionMenuInjectionKey);
30
31
  const isPendingRef = useMemo(() => {
@@ -54,6 +55,7 @@ export default defineComponent({
54
55
  }
55
56
  return {
56
57
  multiple: multipleRef,
58
+ account: accountRef,
57
59
  isGrouped: useMemo(() => {
58
60
  const { tmNode } = props;
59
61
  const { parent } = tmNode;
@@ -85,14 +87,17 @@ export default defineComponent({
85
87
  };
86
88
  },
87
89
  render() {
88
- const { clsPrefix, tmNode: { rawNode }, isSelected, isPending, isGrouped, showCheckmark, nodeProps, renderOption, renderLabel, handleClick, handleMouseEnter, handleMouseMove } = this;
90
+ const { clsPrefix, tmNode: { rawNode }, isSelected, isPending, isGrouped, showCheckmark, nodeProps, renderOption, renderLabel, handleClick, handleMouseEnter, handleMouseMove, account } = this;
89
91
  const checkmark = renderCheckMark(isSelected, clsPrefix);
90
- const children = renderLabel
91
- ? [renderLabel(rawNode, isSelected), showCheckmark && checkmark]
92
- : [
93
- render(rawNode[this.labelField], rawNode, isSelected),
92
+ const label = renderLabel
93
+ ? renderLabel(rawNode, isSelected)
94
+ : render(rawNode[this.labelField], rawNode, isSelected);
95
+ const children = account
96
+ ? [
97
+ h(UBaseAccountOption, Object.assign({}, rawNode, { label: label })),
94
98
  showCheckmark && checkmark
95
- ];
99
+ ]
100
+ : [label, showCheckmark && checkmark];
96
101
  const attrs = nodeProps === null || nodeProps === void 0 ? void 0 : nodeProps(rawNode);
97
102
  const node = (h("div", Object.assign({}, attrs, { class: [
98
103
  `${clsPrefix}-base-select-option`,
@@ -103,7 +108,8 @@ export default defineComponent({
103
108
  [`${clsPrefix}-base-select-option--selected`]: isSelected,
104
109
  [`${clsPrefix}-base-select-option--grouped`]: isGrouped,
105
110
  [`${clsPrefix}-base-select-option--pending`]: isPending,
106
- [`${clsPrefix}-base-select-option--show-checkmark`]: showCheckmark
111
+ [`${clsPrefix}-base-select-option--show-checkmark`]: showCheckmark,
112
+ [`${clsPrefix}-base-select-option--account`]: account
107
113
  }
108
114
  ], style: [(attrs === null || attrs === void 0 ? void 0 : attrs.style) || '', rawNode.style || ''], onClick: mergeEventHandlers([handleClick, attrs === null || attrs === void 0 ? void 0 : attrs.onClick]), onMouseenter: mergeEventHandlers([
109
115
  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>;
@@ -68,6 +68,7 @@ export default cB('base-select-menu', `
68
68
  white-space: nowrap;
69
69
  text-overflow: ellipsis;
70
70
  overflow: hidden;
71
+ width: 100%;
71
72
  `), cM('show-checkmark', `
72
73
  padding-right: calc(var(--u-option-padding-right) + 20px);
73
74
  `), c('&::before', `
@@ -91,9 +92,9 @@ export default cB('base-select-menu', `
91
92
  padding-left: var(--u-option-padding-left);
92
93
  `), cM('pending', [c('&::before', `
93
94
  background-color: var(--u-option-color-pending);
94
- `)]), cM('selected', `
95
+ `)]), cM('selected', [cNotM('account', `
95
96
  color: var(--u-option-text-color-active);
96
- `, [c('&::before', `
97
+ `), c('&::before', `
97
98
  background-color: var(--u-option-color-active);
98
99
  `), cM('pending', [c('&::before', `
99
100
  background-color: var(--u-option-color-active-pending);
@@ -104,7 +105,7 @@ export default cB('base-select-menu', `
104
105
  `), cM('selected', `
105
106
  opacity: var(--u-option-opacity-disabled);
106
107
  `)]), cE('check', `
107
- font-size: 16px;
108
+ font-size: 24px;
108
109
  position: absolute;
109
110
  right: calc(var(--u-option-padding-right) - 4px);
110
111
  top: calc(50% - 7px);