@uzum-tech/ui 2.4.2 → 2.4.3

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 (158) hide show
  1. package/dist/index.js +162 -32
  2. package/dist/index.mjs +162 -32
  3. package/dist/index.prod.js +3 -3
  4. package/dist/index.prod.mjs +3 -3
  5. package/es/_internal/selection/src/Selection.d.ts +27 -0
  6. package/es/_internal/selection/src/Selection.mjs +54 -26
  7. package/es/_internal/selection/src/SelectionParts/CounterPlaceholder/CounterPlaceholder.d.ts +35 -0
  8. package/es/_internal/selection/src/SelectionParts/CounterPlaceholder/CounterPlaceholder.mjs +15 -0
  9. package/es/_internal/selection/src/SelectionParts/CounterPlaceholder/counter-placeholder.types.d.ts +17 -0
  10. package/es/_internal/selection/src/SelectionParts/CounterPlaceholder/counter-placeholder.types.mjs +16 -0
  11. package/es/_internal/selection/src/styles/index.cssr.mjs +45 -4
  12. package/es/_internal/selection/styles/light.d.ts +6 -0
  13. package/es/_internal/selection/styles/light.mjs +3 -0
  14. package/es/cascader/src/Cascader.d.ts +30 -0
  15. package/es/cascader/src/CascaderMenu.d.ts +6 -0
  16. package/es/cascader/src/CascaderOption.d.ts +6 -0
  17. package/es/cascader/src/CascaderSelectMenu.d.ts +6 -0
  18. package/es/cascader/src/CascaderSubmenu.d.ts +6 -0
  19. package/es/cascader/styles/light.d.ts +3 -0
  20. package/es/chat/src/Chat.d.ts +132 -0
  21. package/es/chat/src/ChatListItems.d.ts +45 -0
  22. package/es/chat/src/ChatMainArea.d.ts +45 -0
  23. package/es/chat/src/ChatMessages.d.ts +45 -0
  24. package/es/chat/src/ChatParts/ChatAttachmentButton/ChatAttachmentButton.d.ts +36 -0
  25. package/es/chat/src/ChatParts/ChatAttachmentButton/interface.d.ts +9 -0
  26. package/es/chat/src/ChatParts/ChatEditingBlock/ChatEditingBlock.d.ts +36 -0
  27. package/es/chat/src/ChatParts/ChatEditingBlock/interface.d.ts +9 -0
  28. package/es/chat/src/ChatParts/ChatHeader/ChatHeader.d.ts +36 -0
  29. package/es/chat/src/ChatParts/ChatHeader/interface.d.ts +9 -0
  30. package/es/chat/src/ChatParts/ChatLegacyInput/ChatLegacyInput.d.ts +36 -0
  31. package/es/chat/src/ChatParts/ChatLegacyInput/interface.d.ts +9 -0
  32. package/es/chat/src/ChatParts/Sidebar.d.ts +12 -0
  33. package/es/chat/src/interface.d.ts +9 -0
  34. package/es/chat/styles/dark.d.ts +3 -0
  35. package/es/chat/styles/light.d.ts +3 -0
  36. package/es/components.d.ts +453 -0
  37. package/es/data-table/src/DataTable.d.ts +24 -0
  38. package/es/data-table/src/HeaderButton/FilterButton.d.ts +12 -0
  39. package/es/data-table/src/HeaderButton/FilterMenu.d.ts +12 -0
  40. package/es/data-table/src/TableParts/Body.d.ts +12 -0
  41. package/es/data-table/src/TableParts/Header.d.ts +12 -0
  42. package/es/data-table/src/interface.d.ts +9 -0
  43. package/es/data-table/styles/light.d.ts +3 -0
  44. package/es/date-picker/src/DatePicker.d.ts +30 -0
  45. package/es/date-picker/src/panel/date.d.ts +6 -0
  46. package/es/date-picker/src/panel/daterange.d.ts +6 -0
  47. package/es/date-picker/src/panel/datetime.d.ts +6 -0
  48. package/es/date-picker/src/panel/datetimerange.d.ts +6 -0
  49. package/es/date-picker/src/panel/panelMonth.d.ts +24 -0
  50. package/es/date-picker/src/panel/panelMonthContent.d.ts +6 -0
  51. package/es/date-picker/src/panel/panelYear.d.ts +24 -0
  52. package/es/date-picker/src/panel/panelYearContent.d.ts +6 -0
  53. package/es/date-picker/src/panel/use-calendar.d.ts +6 -0
  54. package/es/date-picker/src/panel/use-dual-calendar.d.ts +6 -0
  55. package/es/date-picker/src/panel/use-panel-common.d.ts +6 -0
  56. package/es/date-picker/styles/light.d.ts +3 -0
  57. package/es/date-picker-v2/src/DatePickerV2.d.ts +30 -0
  58. package/es/date-picker-v2/styles/dark.d.ts +3 -0
  59. package/es/date-picker-v2/styles/light.d.ts +3 -0
  60. package/es/editor/src/Editor.d.ts +18 -0
  61. package/es/editor/src/EditorParts/EditorContent/EditorContent.d.ts +18 -0
  62. package/es/editor/src/EditorParts/EditorContent/interface.d.ts +9 -0
  63. package/es/editor/src/EditorParts/EditorToolbar/EditorToolbar.d.ts +21 -0
  64. package/es/editor/src/EditorParts/EditorToolbar/interface.d.ts +9 -0
  65. package/es/editor/src/interface.d.ts +9 -0
  66. package/es/editor/styles/dark.d.ts +3 -0
  67. package/es/editor/styles/light.d.ts +3 -0
  68. package/es/pagination/src/Pagination.d.ts +24 -0
  69. package/es/pagination/src/interface.d.ts +9 -0
  70. package/es/pagination/styles/light.d.ts +3 -0
  71. package/es/select/src/Select.d.ts +24 -0
  72. package/es/select/src/Select.mjs +2 -1
  73. package/es/select/src/interface.d.ts +10 -0
  74. package/es/select/src/interface.mjs +1 -0
  75. package/es/select/src/styles/index.cssr.mjs +4 -1
  76. package/es/select/styles/light.d.ts +3 -0
  77. package/es/tree-select/src/TreeSelect.d.ts +30 -0
  78. package/es/tree-select/styles/light.d.ts +3 -0
  79. package/es/version.d.ts +1 -1
  80. package/es/version.mjs +1 -1
  81. package/lib/_internal/selection/src/Selection.d.ts +27 -0
  82. package/lib/_internal/selection/src/Selection.js +43 -35
  83. package/lib/_internal/selection/src/SelectionParts/CounterPlaceholder/CounterPlaceholder.d.ts +35 -0
  84. package/lib/_internal/selection/src/SelectionParts/CounterPlaceholder/CounterPlaceholder.js +13 -0
  85. package/lib/_internal/selection/src/SelectionParts/CounterPlaceholder/counter-placeholder.types.d.ts +17 -0
  86. package/lib/_internal/selection/src/SelectionParts/CounterPlaceholder/counter-placeholder.types.js +19 -0
  87. package/lib/_internal/selection/src/styles/index.cssr.js +45 -4
  88. package/lib/_internal/selection/styles/light.d.ts +6 -0
  89. package/lib/_internal/selection/styles/light.js +3 -0
  90. package/lib/cascader/src/Cascader.d.ts +30 -0
  91. package/lib/cascader/src/CascaderMenu.d.ts +6 -0
  92. package/lib/cascader/src/CascaderOption.d.ts +6 -0
  93. package/lib/cascader/src/CascaderSelectMenu.d.ts +6 -0
  94. package/lib/cascader/src/CascaderSubmenu.d.ts +6 -0
  95. package/lib/cascader/styles/light.d.ts +3 -0
  96. package/lib/chat/src/Chat.d.ts +132 -0
  97. package/lib/chat/src/ChatListItems.d.ts +45 -0
  98. package/lib/chat/src/ChatMainArea.d.ts +45 -0
  99. package/lib/chat/src/ChatMessages.d.ts +45 -0
  100. package/lib/chat/src/ChatParts/ChatAttachmentButton/ChatAttachmentButton.d.ts +36 -0
  101. package/lib/chat/src/ChatParts/ChatAttachmentButton/interface.d.ts +9 -0
  102. package/lib/chat/src/ChatParts/ChatEditingBlock/ChatEditingBlock.d.ts +36 -0
  103. package/lib/chat/src/ChatParts/ChatEditingBlock/interface.d.ts +9 -0
  104. package/lib/chat/src/ChatParts/ChatHeader/ChatHeader.d.ts +36 -0
  105. package/lib/chat/src/ChatParts/ChatHeader/interface.d.ts +9 -0
  106. package/lib/chat/src/ChatParts/ChatLegacyInput/ChatLegacyInput.d.ts +36 -0
  107. package/lib/chat/src/ChatParts/ChatLegacyInput/interface.d.ts +9 -0
  108. package/lib/chat/src/ChatParts/Sidebar.d.ts +12 -0
  109. package/lib/chat/src/interface.d.ts +9 -0
  110. package/lib/chat/styles/dark.d.ts +3 -0
  111. package/lib/chat/styles/light.d.ts +3 -0
  112. package/lib/components.d.ts +453 -0
  113. package/lib/data-table/src/DataTable.d.ts +24 -0
  114. package/lib/data-table/src/HeaderButton/FilterButton.d.ts +12 -0
  115. package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +12 -0
  116. package/lib/data-table/src/TableParts/Body.d.ts +12 -0
  117. package/lib/data-table/src/TableParts/Header.d.ts +12 -0
  118. package/lib/data-table/src/interface.d.ts +9 -0
  119. package/lib/data-table/styles/light.d.ts +3 -0
  120. package/lib/date-picker/src/DatePicker.d.ts +30 -0
  121. package/lib/date-picker/src/panel/date.d.ts +6 -0
  122. package/lib/date-picker/src/panel/daterange.d.ts +6 -0
  123. package/lib/date-picker/src/panel/datetime.d.ts +6 -0
  124. package/lib/date-picker/src/panel/datetimerange.d.ts +6 -0
  125. package/lib/date-picker/src/panel/panelMonth.d.ts +24 -0
  126. package/lib/date-picker/src/panel/panelMonthContent.d.ts +6 -0
  127. package/lib/date-picker/src/panel/panelYear.d.ts +24 -0
  128. package/lib/date-picker/src/panel/panelYearContent.d.ts +6 -0
  129. package/lib/date-picker/src/panel/use-calendar.d.ts +6 -0
  130. package/lib/date-picker/src/panel/use-dual-calendar.d.ts +6 -0
  131. package/lib/date-picker/src/panel/use-panel-common.d.ts +6 -0
  132. package/lib/date-picker/styles/light.d.ts +3 -0
  133. package/lib/date-picker-v2/src/DatePickerV2.d.ts +30 -0
  134. package/lib/date-picker-v2/styles/dark.d.ts +3 -0
  135. package/lib/date-picker-v2/styles/light.d.ts +3 -0
  136. package/lib/editor/src/Editor.d.ts +18 -0
  137. package/lib/editor/src/EditorParts/EditorContent/EditorContent.d.ts +18 -0
  138. package/lib/editor/src/EditorParts/EditorContent/interface.d.ts +9 -0
  139. package/lib/editor/src/EditorParts/EditorToolbar/EditorToolbar.d.ts +21 -0
  140. package/lib/editor/src/EditorParts/EditorToolbar/interface.d.ts +9 -0
  141. package/lib/editor/src/interface.d.ts +9 -0
  142. package/lib/editor/styles/dark.d.ts +3 -0
  143. package/lib/editor/styles/light.d.ts +3 -0
  144. package/lib/pagination/src/Pagination.d.ts +24 -0
  145. package/lib/pagination/src/interface.d.ts +9 -0
  146. package/lib/pagination/styles/light.d.ts +3 -0
  147. package/lib/select/src/Select.d.ts +24 -0
  148. package/lib/select/src/Select.js +5 -2
  149. package/lib/select/src/interface.d.ts +10 -0
  150. package/lib/select/src/interface.js +1 -1
  151. package/lib/select/src/styles/index.cssr.js +3 -0
  152. package/lib/select/styles/light.d.ts +3 -0
  153. package/lib/tree-select/src/TreeSelect.d.ts +30 -0
  154. package/lib/tree-select/styles/light.d.ts +3 -0
  155. package/lib/version.d.ts +1 -1
  156. package/lib/version.js +1 -1
  157. package/package.json +1 -1
  158. package/web-types.json +11 -1
@@ -88,6 +88,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
88
88
  round: BooleanConstructor;
89
89
  counter: BooleanConstructor;
90
90
  secondary: BooleanConstructor;
91
+ autoWidth: BooleanConstructor;
91
92
  account: BooleanConstructor;
92
93
  theme: PropType<import("../../../_mixins").Theme<"InternalSelection", {
93
94
  paddingTiny: string;
@@ -171,8 +172,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
171
172
  caretColorSecondary: string;
172
173
  filterCounterTextColor: string;
173
174
  filterCounterTextColorDisabled: string;
175
+ filterCounterGap: string;
176
+ filterSuffixWrapperGap: string;
174
177
  arrowColorSecondary: string;
175
178
  clearColorSecondary: string;
179
+ loadingColorSecondary: string;
176
180
  colorSecondary: string;
177
181
  textColorSecondary: string;
178
182
  borderSecondary: string;
@@ -294,8 +298,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
294
298
  caretColorSecondary: string;
295
299
  filterCounterTextColor: string;
296
300
  filterCounterTextColorDisabled: string;
301
+ filterCounterGap: string;
302
+ filterSuffixWrapperGap: string;
297
303
  arrowColorSecondary: string;
298
304
  clearColorSecondary: string;
305
+ loadingColorSecondary: string;
299
306
  colorSecondary: string;
300
307
  textColorSecondary: string;
301
308
  borderSecondary: string;
@@ -417,8 +424,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
417
424
  caretColorSecondary: string;
418
425
  filterCounterTextColor: string;
419
426
  filterCounterTextColorDisabled: string;
427
+ filterCounterGap: string;
428
+ filterSuffixWrapperGap: string;
420
429
  arrowColorSecondary: string;
421
430
  clearColorSecondary: string;
431
+ loadingColorSecondary: string;
422
432
  colorSecondary: string;
423
433
  textColorSecondary: string;
424
434
  borderSecondary: string;
@@ -543,8 +553,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
543
553
  caretColorSecondary: string;
544
554
  filterCounterTextColor: string;
545
555
  filterCounterTextColorDisabled: string;
556
+ filterCounterGap: string;
557
+ filterSuffixWrapperGap: string;
546
558
  arrowColorSecondary: string;
547
559
  clearColorSecondary: string;
560
+ loadingColorSecondary: string;
548
561
  colorSecondary: string;
549
562
  textColorSecondary: string;
550
563
  borderSecondary: string;
@@ -707,8 +720,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
707
720
  '--u-caret-color-secondary': string;
708
721
  '--u-filter-counter-text-color': string;
709
722
  '--u-filter-counter-text-color-disabled': string;
723
+ '--u-filter-counter-gap': string;
724
+ '--u-suffix-wrapper-gap': string;
710
725
  '--u-arrow-color-secondary': string;
711
726
  '--u-clear-color-secondary': string;
727
+ '--u-loading-color-secondary': string;
712
728
  '--u-color-secondary': string;
713
729
  '--u-text-color-secondary': string;
714
730
  '--u-border-secondary': string;
@@ -814,6 +830,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
814
830
  round: BooleanConstructor;
815
831
  counter: BooleanConstructor;
816
832
  secondary: BooleanConstructor;
833
+ autoWidth: BooleanConstructor;
817
834
  account: BooleanConstructor;
818
835
  theme: PropType<import("../../../_mixins").Theme<"InternalSelection", {
819
836
  paddingTiny: string;
@@ -897,8 +914,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
897
914
  caretColorSecondary: string;
898
915
  filterCounterTextColor: string;
899
916
  filterCounterTextColorDisabled: string;
917
+ filterCounterGap: string;
918
+ filterSuffixWrapperGap: string;
900
919
  arrowColorSecondary: string;
901
920
  clearColorSecondary: string;
921
+ loadingColorSecondary: string;
902
922
  colorSecondary: string;
903
923
  textColorSecondary: string;
904
924
  borderSecondary: string;
@@ -1020,8 +1040,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1020
1040
  caretColorSecondary: string;
1021
1041
  filterCounterTextColor: string;
1022
1042
  filterCounterTextColorDisabled: string;
1043
+ filterCounterGap: string;
1044
+ filterSuffixWrapperGap: string;
1023
1045
  arrowColorSecondary: string;
1024
1046
  clearColorSecondary: string;
1047
+ loadingColorSecondary: string;
1025
1048
  colorSecondary: string;
1026
1049
  textColorSecondary: string;
1027
1050
  borderSecondary: string;
@@ -1143,8 +1166,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1143
1166
  caretColorSecondary: string;
1144
1167
  filterCounterTextColor: string;
1145
1168
  filterCounterTextColorDisabled: string;
1169
+ filterCounterGap: string;
1170
+ filterSuffixWrapperGap: string;
1146
1171
  arrowColorSecondary: string;
1147
1172
  clearColorSecondary: string;
1173
+ loadingColorSecondary: string;
1148
1174
  colorSecondary: string;
1149
1175
  textColorSecondary: string;
1150
1176
  borderSecondary: string;
@@ -1202,6 +1228,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1202
1228
  filled: boolean;
1203
1229
  ignoreComposition: boolean;
1204
1230
  counter: boolean;
1231
+ autoWidth: boolean;
1205
1232
  account: boolean;
1206
1233
  autofocus: boolean;
1207
1234
  pattern: string;
@@ -8,9 +8,11 @@ import { UTag } from "../../../tag/index.mjs";
8
8
  import UBaseAccountOption from "../../account-option/index.mjs";
9
9
  import UBaseClear from "../../clear/index.mjs";
10
10
  import { UBaseIcon } from "../../icon/index.mjs";
11
+ import UBaseLoading from "../../loading/index.mjs";
11
12
  import UBaseSkeleton from "../../skeleton/index.mjs";
12
13
  import Suffix from "../../suffix/index.mjs";
13
14
  import { internalSelectionLight } from "../styles/index.mjs";
15
+ import CounterPlaceholder from "./SelectionParts/CounterPlaceholder/CounterPlaceholder.mjs";
14
16
  import style from "./styles/index.cssr.mjs";
15
17
  export default defineComponent({
16
18
  name: 'InternalSelection',
@@ -88,6 +90,7 @@ export default defineComponent({
88
90
  round: Boolean,
89
91
  counter: Boolean,
90
92
  secondary: Boolean,
93
+ autoWidth: Boolean,
91
94
  account: Boolean
92
95
  }),
93
96
  setup(props) {
@@ -461,6 +464,7 @@ export default defineComponent({
461
464
  // secondary
462
465
  arrowColorSecondary,
463
466
  clearColorSecondary,
467
+ loadingColorSecondary,
464
468
  colorSecondary,
465
469
  textColorSecondary,
466
470
  borderSecondary,
@@ -476,6 +480,8 @@ export default defineComponent({
476
480
  borderHoverSecondary,
477
481
  filterCounterTextColor,
478
482
  filterCounterTextColorDisabled,
483
+ filterCounterGap,
484
+ filterSuffixWrapperGap,
479
485
  caretColorSecondary,
480
486
  arrowColorActiveSecondary,
481
487
  clearColorActiveSecondary,
@@ -570,8 +576,11 @@ export default defineComponent({
570
576
  '--u-caret-color-secondary': caretColorSecondary,
571
577
  '--u-filter-counter-text-color': filterCounterTextColor,
572
578
  '--u-filter-counter-text-color-disabled': filterCounterTextColorDisabled,
579
+ '--u-filter-counter-gap': filterCounterGap,
580
+ '--u-suffix-wrapper-gap': filterSuffixWrapperGap,
573
581
  '--u-arrow-color-secondary': arrowColorSecondary,
574
582
  '--u-clear-color-secondary': clearColorSecondary,
583
+ '--u-loading-color-secondary': loadingColorSecondary,
575
584
  '--u-color-secondary': colorSecondary,
576
585
  '--u-text-color-secondary': textColorSecondary,
577
586
  '--u-border-secondary': borderSecondary,
@@ -680,18 +689,26 @@ export default defineComponent({
680
689
  const filterCounterEl = this.filterCounterVisible && !this.disabled ? h("div", {
681
690
  class: [`${clsPrefix}-base-selection__filter-counter`]
682
691
  }, this.filterCounterLength) : null;
683
- const clear = this.filterCounterClearable ? h(UBaseClear, {
692
+ const clear = this.filterCounterVisible && this.loading ? h(UBaseLoading, {
693
+ clsPrefix: clsPrefix,
694
+ class: `${clsPrefix}-base-suffix`,
695
+ strokeWidth: 24,
696
+ scale: 0.85,
697
+ show: true
698
+ }) : this.filterCounterClearable ? h(UBaseClear, {
684
699
  clsPrefix: clsPrefix,
685
700
  show: true,
686
701
  onClear: this.handleClear
687
702
  }) : null;
703
+ const suffixShowArrow = this.showArrow || this.counter && this.filterCounterLength === 0;
704
+ const suffixLoading = this.loading && !this.filterCounterVisible;
688
705
  const suffix = h(Wrapper, null, {
689
706
  default: () => h("div", {
690
707
  class: [`${clsPrefix}-base-selection__suffix-wrapper`]
691
- }, h(Suffix, {
708
+ }, suffixShowArrow ? h(Suffix, {
692
709
  clsPrefix: clsPrefix,
693
- loading: this.loading,
694
- showArrow: this.showArrow || this.counter && this.filterCounterLength === 0,
710
+ loading: suffixLoading,
711
+ showArrow: suffixShowArrow,
695
712
  showClear: this.showSuffixClear,
696
713
  onClear: this.handleClear
697
714
  }, {
@@ -699,9 +716,21 @@ export default defineComponent({
699
716
  var _a, _b;
700
717
  return [(_b = (_a = this.$slots).arrow) === null || _b === void 0 ? void 0 : _b.call(_a)];
701
718
  }
702
- }), filterCounterEl, clear)
719
+ }) : null, filterCounterEl, clear)
703
720
  });
704
721
  let body;
722
+ const renderVisibleLabel = () => {
723
+ if (renderTag) {
724
+ return renderTag({
725
+ option: this.selectedOption,
726
+ handleClose: () => {}
727
+ });
728
+ }
729
+ const label = renderLabel ? renderLabel(this.selectedOption, true) : render(this.label, this.selectedOption, true);
730
+ return account ? h(UBaseAccountOption, Object.assign({}, this.selectedOption, {
731
+ label: label
732
+ })) : label;
733
+ };
705
734
  if (multiple) {
706
735
  const {
707
736
  labelField
@@ -785,7 +814,7 @@ export default defineComponent({
785
814
  }));
786
815
  }
787
816
  }
788
- const tags = this.filterCounterVisible ? this.pattern ? null : this.placeholder : maxTagCountResponsive ? filterable ? h(VOverflow, {
817
+ const tags = this.filterCounterVisible ? null : maxTagCountResponsive ? filterable ? h(VOverflow, {
789
818
  ref: "overflowRef",
790
819
  updateCounter: this.updateCounter,
791
820
  getCounter: this.getCounter,
@@ -825,35 +854,35 @@ export default defineComponent({
825
854
  theme: this.mergedTheme.peers.Popover,
826
855
  themeOverrides: this.mergedTheme.peerOverrides.Popover
827
856
  }, ellipsisTagPopoverProps) : null;
828
- const showPlaceholder = this.selected ? false : this.active ? !this.pattern && !this.isComposing : true;
857
+ const showPlaceholder = this.selected && !this.filterCounterVisible ? false : this.active ? !this.pattern && !this.isComposing : true;
829
858
  const placeholder = showPlaceholder ? h("div", {
830
859
  class: `${clsPrefix}-base-selection-placeholder ${clsPrefix}-base-selection-overlay`
831
860
  }, h("div", {
832
861
  class: `${clsPrefix}-base-selection-placeholder__inner`
833
862
  }, this.placeholder)) : null;
863
+ const counterPlaceholderHidden = !!(this.pattern || this.isComposing);
864
+ const counterPlaceholder = this.filterCounterVisible ? h(CounterPlaceholder, {
865
+ clsPrefix: clsPrefix,
866
+ placeholder: this.placeholder,
867
+ "placeholder-hidden": counterPlaceholderHidden,
868
+ input: input
869
+ }) : null;
834
870
  const popoverTrigger = filterable ? h("div", {
835
871
  ref: "patternInputWrapperRef",
836
872
  class: `${clsPrefix}-base-selection-tags`
837
- }, tags, maxTagCountResponsive ? null : input, suffix) : h("div", {
873
+ }, counterPlaceholder !== null && counterPlaceholder !== void 0 ? counterPlaceholder : tags, counterPlaceholder || maxTagCountResponsive ? null : input, suffix) : h("div", {
838
874
  ref: "multipleElRef",
839
875
  class: `${clsPrefix}-base-selection-tags`,
840
876
  tabindex: disabled ? undefined : 0
841
- }, tags, suffix);
877
+ }, counterPlaceholder !== null && counterPlaceholder !== void 0 ? counterPlaceholder : tags, suffix);
842
878
  body = h(Fragment, null, useMaxTagCount ? h(UPopover, Object.assign({}, popoverProps, {
843
879
  scrollable: true,
844
880
  style: "max-height: calc(var(--v-target-height) * 6.6);"
845
881
  }), {
846
882
  trigger: () => popoverTrigger,
847
883
  default: renderPopover
848
- }) : popoverTrigger, placeholder);
884
+ }) : popoverTrigger, counterPlaceholder ? null : placeholder);
849
885
  } else {
850
- let children;
851
- if (this.label !== undefined) {
852
- const label = renderLabel ? renderLabel(this.selectedOption, true) : render(this.label, this.selectedOption, true);
853
- children = account && h(UBaseAccountOption, Object.assign({}, this.selectedOption, {
854
- label: label
855
- })) || label;
856
- }
857
886
  if (filterable) {
858
887
  const hasInput = this.pattern || this.isComposing;
859
888
  const isAccountFocused = this.patternInputFocused && this.account;
@@ -881,10 +910,7 @@ export default defineComponent({
881
910
  key: "input"
882
911
  }, h("div", {
883
912
  class: `${clsPrefix}-base-selection-overlay__wrapper`
884
- }, renderTag ? renderTag({
885
- option: this.selectedOption,
886
- handleClose: () => {}
887
- }) : children)) : null, showPlaceholder ? h("div", {
913
+ }, renderVisibleLabel())) : null, showPlaceholder ? h("div", {
888
914
  class: `${clsPrefix}-base-selection-placeholder ${clsPrefix}-base-selection-overlay`,
889
915
  key: "placeholder"
890
916
  }, h("div", {
@@ -901,10 +927,7 @@ export default defineComponent({
901
927
  key: "input"
902
928
  }, h("div", {
903
929
  class: `${clsPrefix}-base-selection-input__content`
904
- }, renderTag ? renderTag({
905
- option: this.selectedOption,
906
- handleClose: () => {}
907
- }) : children)) : h("div", {
930
+ }, renderVisibleLabel())) : h("div", {
908
931
  class: `${clsPrefix}-base-selection-placeholder ${clsPrefix}-base-selection-overlay`,
909
932
  key: "placeholder"
910
933
  }, h("div", {
@@ -918,10 +941,12 @@ export default defineComponent({
918
941
  [`${clsPrefix}-base-selection--active`]: this.active,
919
942
  [`${clsPrefix}-base-selection--secondary`]: this.secondary,
920
943
  [`${clsPrefix}-base-selection--secondary-selected`]: this.secondary && this.selected,
944
+ [`${clsPrefix}-base-selection--counter-selected`]: this.filterCounterVisible,
921
945
  [`${clsPrefix}-base-selection--selected`]: this.selected || this.active && this.pattern,
922
946
  [`${clsPrefix}-base-selection--disabled`]: this.disabled,
923
947
  [`${clsPrefix}-base-selection--multiple`]: this.multiple,
924
948
  [`${clsPrefix}-base-selection--filled`]: this.filled,
949
+ [`${clsPrefix}-base-selection--auto-width`]: this.autoWidth,
925
950
  [`${clsPrefix}-base-selection--skeleton`]: this.loadingSkeleton,
926
951
  // focus is not controlled by selection itself since it always need
927
952
  // to be managed together with menu. provide :focus style will cause
@@ -940,7 +965,10 @@ export default defineComponent({
940
965
  sharp: false,
941
966
  round: this.round,
942
967
  class: [`${clsPrefix}-base-selection__loading`, `${clsPrefix}-base-selection__loading--skeleton`]
943
- }) : [body, bordered ? h("div", {
968
+ }) : [body, this.autoWidth ? h("div", {
969
+ "aria-hidden": "true",
970
+ class: [`${clsPrefix}-base-selection-overlay`, `${clsPrefix}-base-selection-placeholder`, `${clsPrefix}-base-selection__sizer`]
971
+ }, h("div", null, this.placeholder), !this.multiple && this.selectedOption ? h("div", null, renderVisibleLabel()) : null) : null, bordered ? h("div", {
944
972
  class: `${clsPrefix}-base-selection__border`
945
973
  }) : null, bordered ? h("div", {
946
974
  class: `${clsPrefix}-base-selection__state-border`
@@ -0,0 +1,35 @@
1
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ readonly clsPrefix: {
3
+ readonly type: StringConstructor;
4
+ readonly required: true;
5
+ };
6
+ readonly placeholder: {
7
+ readonly type: StringConstructor;
8
+ readonly default: "";
9
+ };
10
+ readonly placeholderHidden: {
11
+ readonly type: BooleanConstructor;
12
+ };
13
+ readonly input: {
14
+ readonly type: import("vue").PropType<import("vue").VNode | null>;
15
+ };
16
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
17
+ readonly clsPrefix: {
18
+ readonly type: StringConstructor;
19
+ readonly required: true;
20
+ };
21
+ readonly placeholder: {
22
+ readonly type: StringConstructor;
23
+ readonly default: "";
24
+ };
25
+ readonly placeholderHidden: {
26
+ readonly type: BooleanConstructor;
27
+ };
28
+ readonly input: {
29
+ readonly type: import("vue").PropType<import("vue").VNode | null>;
30
+ };
31
+ }>> & Readonly<{}>, {
32
+ readonly placeholder: string;
33
+ readonly placeholderHidden: boolean;
34
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
35
+ export default _default;
@@ -0,0 +1,15 @@
1
+ import { defineComponent, h } from 'vue';
2
+ import { counterPlaceholderProps } from "./counter-placeholder.types.mjs";
3
+ export default defineComponent({
4
+ name: 'CounterPlaceholder',
5
+ props: counterPlaceholderProps,
6
+ render() {
7
+ return h("div", {
8
+ class: `${this.clsPrefix}-base-selection-placeholder ${this.clsPrefix}-base-selection__counter-placeholder`
9
+ }, h("span", {
10
+ style: this.placeholderHidden ? {
11
+ visibility: 'hidden'
12
+ } : undefined
13
+ }, this.placeholder), this.input);
14
+ }
15
+ });
@@ -0,0 +1,17 @@
1
+ import type { PropType, VNode } from 'vue';
2
+ export declare const counterPlaceholderProps: {
3
+ readonly clsPrefix: {
4
+ readonly type: StringConstructor;
5
+ readonly required: true;
6
+ };
7
+ readonly placeholder: {
8
+ readonly type: StringConstructor;
9
+ readonly default: "";
10
+ };
11
+ readonly placeholderHidden: {
12
+ readonly type: BooleanConstructor;
13
+ };
14
+ readonly input: {
15
+ readonly type: PropType<VNode | null>;
16
+ };
17
+ };
@@ -0,0 +1,16 @@
1
+ export const counterPlaceholderProps = {
2
+ clsPrefix: {
3
+ type: String,
4
+ required: true
5
+ },
6
+ placeholder: {
7
+ type: String,
8
+ default: ''
9
+ },
10
+ placeholderHidden: {
11
+ type: Boolean
12
+ },
13
+ input: {
14
+ type: Object
15
+ }
16
+ };
@@ -57,6 +57,7 @@ import { c, cB, cE, cM, cNotM } from "../../../../_utils/cssr/index.mjs";
57
57
  // --u-filter-counter-text-color-disabled
58
58
  // --u-arrow-color-secondary
59
59
  // --u-clear-color-secondary
60
+ // --u-loading-color-secondary
60
61
  // --u-color-secondary
61
62
  // --u-text-color-secondary
62
63
  // --u-border-secondary
@@ -93,6 +94,8 @@ function generateSecondaryStates(state) {
93
94
  `)]), cB('base-selection-tags', `
94
95
  background-color: var(--u-color${state}-secondary);
95
96
  color: var(--u-text-color${state}-secondary);
97
+ `), cB('base-selection-placeholder', `
98
+ color: var(--u-text-color${state}-secondary);
96
99
  `), cE('border,state-border', `
97
100
  border: var(--u-border${state}-secondary);
98
101
  `), cB('base-clear', [cE('clear', `
@@ -140,12 +143,11 @@ export default c([cB('base-selection', `
140
143
  top: 50%;
141
144
  transform: translateY(-50%);
142
145
  right: var(--u-padding-right);
146
+ gap: var(--u-suffix-wrapper-gap);
143
147
  `, [cB('base-clear', `
144
148
  font-size: var(--u-clear-size);
145
149
  `)]), cE('filter-counter', `
146
- width: 28px;
147
- margin-left: 6px;
148
- padding-left: 2px;
150
+ width: 13px;
149
151
  text-align: center;
150
152
  color: var(--u-filter-counter-text-color);
151
153
  `), cB('base-suffix', `
@@ -235,6 +237,8 @@ export default c([cB('base-selection', `
235
237
  color: var(--u-text-color);
236
238
  `)]), cNotM('disabled', [cM('secondary', [cB('base-selection-placeholder', `
237
239
  color: var(--u-text-color);
240
+ `)]), cM('secondary-selected', [cB('base-selection-placeholder', `
241
+ color: var(--u-text-color-secondary);
238
242
  `)]), c('&:hover', [cE('state-border', `
239
243
  box-shadow: var(--u-box-shadow-hover);
240
244
  border: var(--u-border-hover);
@@ -324,6 +328,8 @@ export default c([cB('base-selection', `
324
328
  caret-color: var(--u-caret-color-secondary);
325
329
  `), cB('base-selection-tags', `
326
330
  padding-right: calc(var(--u-padding-right) + var(--u-arrow-size) + 37px + var(--u-clear-size));
331
+ `), cB('base-loading', `
332
+ color: var(--u-loading-color-secondary);
327
333
  `), cNotM('disabled', [c('&:hover', [generateSecondaryStates('-hover'), cB('base-clear', '--u-clear-color-hover: var(--u-clear-color-hover-secondary)')]), cM('focus', [generateSecondaryStates('-focus')]), cM('active', [generateSecondaryStates('-active')])])]), ['warning', 'error'].map(status => cM(`${status}-status`, [cE('state-border', `border: var(--u-border-${status});`), cNotM('secondary-selected', [cNotM('disabled', [cNotM('filled', [cM('active', [cB('base-selection-label', `background-color: var(--u-color-active-${status});`), cB('base-selection-tags', `background-color: var(--u-color-active-${status});`)])])])]), cNotM('disabled', [cM('active', [cE('state-border', `
328
334
  box-shadow: var(--u-box-shadow-active-${status});
329
335
  border: var(--u-border-active-${status});
@@ -342,7 +348,42 @@ export default c([cB('base-selection', `
342
348
  zIndex: 2,
343
349
  borderRadius: 'var(--u-border-radius)',
344
350
  cursor: 'wait'
345
- })])]), cB('base-selection-popover', `
351
+ })]), cM('auto-width', [cB('base-selection-label, base-selection-tags', `
352
+ width: 0;
353
+ min-width: 100%;
354
+ `), cE('sizer', `
355
+ position: static;
356
+ display: block;
357
+ height: 0;
358
+ padding-top: 0;
359
+ padding-bottom: 0;
360
+ overflow: hidden;
361
+ visibility: hidden;
362
+ `, [cB('base-account-option', [cE('wrap', `
363
+ width: auto;
364
+ flex-grow: 0;
365
+ `)])]), cNotM('secondary-selected', [cB('base-selection-placeholder', `
366
+ padding-right: calc(var(--u-padding-right) + var(--u-arrow-size) + 8px);
367
+ `)]), cM('counter-selected', [cB('base-selection-tags', 'width: auto;')])]), cM('counter-selected', [cB('base-selection-tags', `
368
+ flex-wrap: nowrap;
369
+ gap: var(--u-filter-counter-gap);
370
+ padding-right: var(--u-padding-right);
371
+ `), cE('counter-placeholder', `
372
+ position: relative;
373
+ flex: 1 1 auto;
374
+ min-width: 0;
375
+ white-space: nowrap;
376
+ overflow: hidden;
377
+ text-overflow: ellipsis;
378
+ `, [cB('base-selection-input-tag', `
379
+ position: absolute;
380
+ top: 0;
381
+ left: 0;
382
+ `)]), cE('suffix-wrapper', `
383
+ position: static;
384
+ transform: none;
385
+ flex-shrink: 0;
386
+ `)])]), cB('base-selection-popover', `
346
387
  margin-bottom: -3px;
347
388
  display: flex;
348
389
  flex-wrap: wrap;
@@ -81,8 +81,11 @@ export declare function self(vars: ThemeCommonVars): {
81
81
  caretColorSecondary: string;
82
82
  filterCounterTextColor: string;
83
83
  filterCounterTextColorDisabled: string;
84
+ filterCounterGap: string;
85
+ filterSuffixWrapperGap: string;
84
86
  arrowColorSecondary: string;
85
87
  clearColorSecondary: string;
88
+ loadingColorSecondary: string;
86
89
  colorSecondary: string;
87
90
  textColorSecondary: string;
88
91
  borderSecondary: string;
@@ -190,8 +193,11 @@ declare const internalSelectionLight: import("../../../_mixins").Theme<"Internal
190
193
  caretColorSecondary: string;
191
194
  filterCounterTextColor: string;
192
195
  filterCounterTextColorDisabled: string;
196
+ filterCounterGap: string;
197
+ filterSuffixWrapperGap: string;
193
198
  arrowColorSecondary: string;
194
199
  clearColorSecondary: string;
200
+ loadingColorSecondary: string;
195
201
  colorSecondary: string;
196
202
  textColorSecondary: string;
197
203
  borderSecondary: string;
@@ -127,8 +127,11 @@ export function self(vars) {
127
127
  caretColorSecondary: elementsPrimary,
128
128
  filterCounterTextColor: textSecondary,
129
129
  filterCounterTextColorDisabled: textSecondary,
130
+ filterCounterGap: '8px',
131
+ filterSuffixWrapperGap: '4px',
130
132
  arrowColorSecondary: elementsSecondary,
131
133
  clearColorSecondary: elementsSecondary,
134
+ loadingColorSecondary: elementsSecondary,
132
135
  colorSecondary: elementsPrimary,
133
136
  textColorSecondary: textQuaternary,
134
137
  borderSecondary: 'none',
@@ -390,8 +390,11 @@ export declare const cascaderProps: {
390
390
  caretColorSecondary: string;
391
391
  filterCounterTextColor: string;
392
392
  filterCounterTextColorDisabled: string;
393
+ filterCounterGap: string;
394
+ filterSuffixWrapperGap: string;
393
395
  arrowColorSecondary: string;
394
396
  clearColorSecondary: string;
397
+ loadingColorSecondary: string;
395
398
  colorSecondary: string;
396
399
  textColorSecondary: string;
397
400
  borderSecondary: string;
@@ -802,8 +805,11 @@ export declare const cascaderProps: {
802
805
  caretColorSecondary: string;
803
806
  filterCounterTextColor: string;
804
807
  filterCounterTextColorDisabled: string;
808
+ filterCounterGap: string;
809
+ filterSuffixWrapperGap: string;
805
810
  arrowColorSecondary: string;
806
811
  clearColorSecondary: string;
812
+ loadingColorSecondary: string;
807
813
  colorSecondary: string;
808
814
  textColorSecondary: string;
809
815
  borderSecondary: string;
@@ -1214,8 +1220,11 @@ export declare const cascaderProps: {
1214
1220
  caretColorSecondary: string;
1215
1221
  filterCounterTextColor: string;
1216
1222
  filterCounterTextColorDisabled: string;
1223
+ filterCounterGap: string;
1224
+ filterSuffixWrapperGap: string;
1217
1225
  arrowColorSecondary: string;
1218
1226
  clearColorSecondary: string;
1227
+ loadingColorSecondary: string;
1219
1228
  colorSecondary: string;
1220
1229
  textColorSecondary: string;
1221
1230
  borderSecondary: string;
@@ -1730,8 +1739,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1730
1739
  caretColorSecondary: string;
1731
1740
  filterCounterTextColor: string;
1732
1741
  filterCounterTextColorDisabled: string;
1742
+ filterCounterGap: string;
1743
+ filterSuffixWrapperGap: string;
1733
1744
  arrowColorSecondary: string;
1734
1745
  clearColorSecondary: string;
1746
+ loadingColorSecondary: string;
1735
1747
  colorSecondary: string;
1736
1748
  textColorSecondary: string;
1737
1749
  borderSecondary: string;
@@ -2142,8 +2154,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
2142
2154
  caretColorSecondary: string;
2143
2155
  filterCounterTextColor: string;
2144
2156
  filterCounterTextColorDisabled: string;
2157
+ filterCounterGap: string;
2158
+ filterSuffixWrapperGap: string;
2145
2159
  arrowColorSecondary: string;
2146
2160
  clearColorSecondary: string;
2161
+ loadingColorSecondary: string;
2147
2162
  colorSecondary: string;
2148
2163
  textColorSecondary: string;
2149
2164
  borderSecondary: string;
@@ -2554,8 +2569,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
2554
2569
  caretColorSecondary: string;
2555
2570
  filterCounterTextColor: string;
2556
2571
  filterCounterTextColorDisabled: string;
2572
+ filterCounterGap: string;
2573
+ filterSuffixWrapperGap: string;
2557
2574
  arrowColorSecondary: string;
2558
2575
  clearColorSecondary: string;
2576
+ loadingColorSecondary: string;
2559
2577
  colorSecondary: string;
2560
2578
  textColorSecondary: string;
2561
2579
  borderSecondary: string;
@@ -3050,8 +3068,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
3050
3068
  caretColorSecondary: string;
3051
3069
  filterCounterTextColor: string;
3052
3070
  filterCounterTextColorDisabled: string;
3071
+ filterCounterGap: string;
3072
+ filterSuffixWrapperGap: string;
3053
3073
  arrowColorSecondary: string;
3054
3074
  clearColorSecondary: string;
3075
+ loadingColorSecondary: string;
3055
3076
  colorSecondary: string;
3056
3077
  textColorSecondary: string;
3057
3078
  borderSecondary: string;
@@ -3783,8 +3804,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
3783
3804
  caretColorSecondary: string;
3784
3805
  filterCounterTextColor: string;
3785
3806
  filterCounterTextColorDisabled: string;
3807
+ filterCounterGap: string;
3808
+ filterSuffixWrapperGap: string;
3786
3809
  arrowColorSecondary: string;
3787
3810
  clearColorSecondary: string;
3811
+ loadingColorSecondary: string;
3788
3812
  colorSecondary: string;
3789
3813
  textColorSecondary: string;
3790
3814
  borderSecondary: string;
@@ -4195,8 +4219,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
4195
4219
  caretColorSecondary: string;
4196
4220
  filterCounterTextColor: string;
4197
4221
  filterCounterTextColorDisabled: string;
4222
+ filterCounterGap: string;
4223
+ filterSuffixWrapperGap: string;
4198
4224
  arrowColorSecondary: string;
4199
4225
  clearColorSecondary: string;
4226
+ loadingColorSecondary: string;
4200
4227
  colorSecondary: string;
4201
4228
  textColorSecondary: string;
4202
4229
  borderSecondary: string;
@@ -4607,8 +4634,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
4607
4634
  caretColorSecondary: string;
4608
4635
  filterCounterTextColor: string;
4609
4636
  filterCounterTextColorDisabled: string;
4637
+ filterCounterGap: string;
4638
+ filterSuffixWrapperGap: string;
4610
4639
  arrowColorSecondary: string;
4611
4640
  clearColorSecondary: string;
4641
+ loadingColorSecondary: string;
4612
4642
  colorSecondary: string;
4613
4643
  textColorSecondary: string;
4614
4644
  borderSecondary: string;