@uzum-tech/ui 2.4.1 → 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.
- package/dist/index.js +243 -74
- package/dist/index.mjs +244 -75
- package/dist/index.prod.js +3 -3
- package/dist/index.prod.mjs +3 -3
- package/es/_internal/selection/src/Selection.d.ts +27 -0
- package/es/_internal/selection/src/Selection.mjs +54 -26
- package/es/_internal/selection/src/SelectionParts/CounterPlaceholder/CounterPlaceholder.d.ts +35 -0
- package/es/_internal/selection/src/SelectionParts/CounterPlaceholder/CounterPlaceholder.mjs +15 -0
- package/es/_internal/selection/src/SelectionParts/CounterPlaceholder/counter-placeholder.types.d.ts +17 -0
- package/es/_internal/selection/src/SelectionParts/CounterPlaceholder/counter-placeholder.types.mjs +16 -0
- package/es/_internal/selection/src/styles/index.cssr.mjs +45 -4
- package/es/_internal/selection/styles/light.d.ts +6 -0
- package/es/_internal/selection/styles/light.mjs +3 -0
- package/es/_utils/index.d.ts +1 -1
- package/es/_utils/index.mjs +1 -1
- package/es/_utils/markdown/constants.d.ts +1 -0
- package/es/_utils/markdown/constants.mjs +1 -0
- package/es/_utils/markdown/index.d.ts +1 -1
- package/es/_utils/markdown/index.mjs +1 -1
- package/es/_utils/markdown/render-markdown.d.ts +3 -0
- package/es/_utils/markdown/render-markdown.mjs +18 -3
- package/es/_utils/vue/index.d.ts +1 -0
- package/es/_utils/vue/index.mjs +1 -0
- package/es/_utils/vue/resolve-reactive.d.ts +3 -0
- package/es/_utils/vue/resolve-reactive.mjs +9 -0
- package/es/cascader/src/Cascader.d.ts +30 -0
- package/es/cascader/src/CascaderMenu.d.ts +6 -0
- package/es/cascader/src/CascaderOption.d.ts +6 -0
- package/es/cascader/src/CascaderSelectMenu.d.ts +6 -0
- package/es/cascader/src/CascaderSubmenu.d.ts +6 -0
- package/es/cascader/styles/light.d.ts +3 -0
- package/es/chat/src/Chat.d.ts +132 -0
- package/es/chat/src/ChatListItems.d.ts +45 -0
- package/es/chat/src/ChatListItems.mjs +16 -11
- package/es/chat/src/ChatMainArea.d.ts +45 -0
- package/es/chat/src/ChatMainArea.mjs +2 -1
- package/es/chat/src/ChatMessages.d.ts +46 -1
- package/es/chat/src/ChatMessages.mjs +6 -5
- package/es/chat/src/ChatParts/ChatAttachmentButton/ChatAttachmentButton.d.ts +36 -0
- package/es/chat/src/ChatParts/ChatAttachmentButton/interface.d.ts +9 -0
- package/es/chat/src/ChatParts/ChatEditingBlock/ChatEditingBlock.d.ts +36 -0
- package/es/chat/src/ChatParts/ChatEditingBlock/ChatEditingBlock.mjs +2 -1
- package/es/chat/src/ChatParts/ChatEditingBlock/interface.d.ts +9 -0
- package/es/chat/src/ChatParts/ChatHeader/ChatHeader.d.ts +36 -0
- package/es/chat/src/ChatParts/ChatHeader/ChatHeader.mjs +3 -6
- package/es/chat/src/ChatParts/ChatHeader/interface.d.ts +9 -0
- package/es/chat/src/ChatParts/ChatLegacyInput/ChatLegacyInput.d.ts +36 -0
- package/es/chat/src/ChatParts/ChatLegacyInput/interface.d.ts +9 -0
- package/es/chat/src/ChatParts/Sidebar.d.ts +12 -0
- package/es/chat/src/interface.d.ts +26 -34
- package/es/chat/styles/dark.d.ts +3 -0
- package/es/chat/styles/light.d.ts +3 -0
- package/es/chat/tests/utils/constants.d.ts +12 -0
- package/es/chat/tests/utils/constants.mjs +12 -0
- package/es/chat/tests/utils/create-chat-item-mock.d.ts +2 -0
- package/es/chat/tests/utils/create-chat-item-mock.mjs +9 -0
- package/es/chat/tests/utils/create-chat-message-mock.d.ts +2 -0
- package/es/chat/tests/utils/create-chat-message-mock.mjs +13 -0
- package/es/components.d.ts +457 -4
- package/es/data-table/src/DataTable.d.ts +24 -0
- package/es/data-table/src/HeaderButton/FilterButton.d.ts +12 -0
- package/es/data-table/src/HeaderButton/FilterMenu.d.ts +12 -0
- package/es/data-table/src/TableParts/Body.d.ts +12 -0
- package/es/data-table/src/TableParts/Header.d.ts +12 -0
- package/es/data-table/src/interface.d.ts +9 -0
- package/es/data-table/styles/light.d.ts +3 -0
- package/es/date-picker/src/DatePicker.d.ts +30 -0
- package/es/date-picker/src/panel/date.d.ts +6 -0
- package/es/date-picker/src/panel/daterange.d.ts +6 -0
- package/es/date-picker/src/panel/datetime.d.ts +6 -0
- package/es/date-picker/src/panel/datetimerange.d.ts +6 -0
- package/es/date-picker/src/panel/panelMonth.d.ts +24 -0
- package/es/date-picker/src/panel/panelMonthContent.d.ts +6 -0
- package/es/date-picker/src/panel/panelYear.d.ts +24 -0
- package/es/date-picker/src/panel/panelYearContent.d.ts +6 -0
- package/es/date-picker/src/panel/use-calendar.d.ts +6 -0
- package/es/date-picker/src/panel/use-dual-calendar.d.ts +6 -0
- package/es/date-picker/src/panel/use-panel-common.d.ts +6 -0
- package/es/date-picker/styles/light.d.ts +3 -0
- package/es/date-picker-v2/src/DatePickerV2.d.ts +30 -0
- package/es/date-picker-v2/styles/dark.d.ts +3 -0
- package/es/date-picker-v2/styles/light.d.ts +3 -0
- package/es/editor/src/Editor.d.ts +18 -0
- package/es/editor/src/Editor.mjs +14 -2
- package/es/editor/src/EditorParts/EditorContent/EditorContent.d.ts +18 -0
- package/es/editor/src/EditorParts/EditorContent/interface.d.ts +9 -0
- package/es/editor/src/EditorParts/EditorToolbar/EditorToolbar.d.ts +21 -0
- package/es/editor/src/EditorParts/EditorToolbar/interface.d.ts +9 -0
- package/es/editor/src/interface.d.ts +9 -0
- package/es/editor/styles/dark.d.ts +3 -0
- package/es/editor/styles/light.d.ts +3 -0
- package/es/message-bubble/src/MessageBubble.d.ts +10 -10
- package/es/message-bubble/src/MessageBubble.mjs +13 -17
- package/es/message-bubble/src/interface.d.ts +5 -5
- package/es/message-bubble/src/interface.mjs +3 -3
- package/es/pagination/src/Pagination.d.ts +24 -0
- package/es/pagination/src/interface.d.ts +9 -0
- package/es/pagination/styles/light.d.ts +3 -0
- package/es/select/src/Select.d.ts +24 -0
- package/es/select/src/Select.mjs +2 -1
- package/es/select/src/interface.d.ts +10 -0
- package/es/select/src/interface.mjs +1 -0
- package/es/select/src/styles/index.cssr.mjs +4 -1
- package/es/select/styles/light.d.ts +3 -0
- package/es/tree-select/src/TreeSelect.d.ts +30 -0
- package/es/tree-select/styles/light.d.ts +3 -0
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/lib/_internal/selection/src/Selection.d.ts +27 -0
- package/lib/_internal/selection/src/Selection.js +43 -35
- package/lib/_internal/selection/src/SelectionParts/CounterPlaceholder/CounterPlaceholder.d.ts +35 -0
- package/lib/_internal/selection/src/SelectionParts/CounterPlaceholder/CounterPlaceholder.js +13 -0
- package/lib/_internal/selection/src/SelectionParts/CounterPlaceholder/counter-placeholder.types.d.ts +17 -0
- package/lib/_internal/selection/src/SelectionParts/CounterPlaceholder/counter-placeholder.types.js +19 -0
- package/lib/_internal/selection/src/styles/index.cssr.js +45 -4
- package/lib/_internal/selection/styles/light.d.ts +6 -0
- package/lib/_internal/selection/styles/light.js +3 -0
- package/lib/_utils/index.d.ts +1 -1
- package/lib/_utils/index.js +3 -1
- package/lib/_utils/markdown/constants.d.ts +1 -0
- package/lib/_utils/markdown/constants.js +2 -1
- package/lib/_utils/markdown/index.d.ts +1 -1
- package/lib/_utils/markdown/index.js +4 -1
- package/lib/_utils/markdown/render-markdown.d.ts +3 -0
- package/lib/_utils/markdown/render-markdown.js +20 -2
- package/lib/_utils/vue/index.d.ts +1 -0
- package/lib/_utils/vue/index.js +4 -1
- package/lib/_utils/vue/resolve-reactive.d.ts +3 -0
- package/lib/_utils/vue/resolve-reactive.js +17 -0
- package/lib/cascader/src/Cascader.d.ts +30 -0
- package/lib/cascader/src/CascaderMenu.d.ts +6 -0
- package/lib/cascader/src/CascaderOption.d.ts +6 -0
- package/lib/cascader/src/CascaderSelectMenu.d.ts +6 -0
- package/lib/cascader/src/CascaderSubmenu.d.ts +6 -0
- package/lib/cascader/styles/light.d.ts +3 -0
- package/lib/chat/src/Chat.d.ts +132 -0
- package/lib/chat/src/ChatListItems.d.ts +45 -0
- package/lib/chat/src/ChatListItems.js +20 -17
- package/lib/chat/src/ChatMainArea.d.ts +45 -0
- package/lib/chat/src/ChatMainArea.js +2 -2
- package/lib/chat/src/ChatMessages.d.ts +46 -1
- package/lib/chat/src/ChatMessages.js +6 -5
- package/lib/chat/src/ChatParts/ChatAttachmentButton/ChatAttachmentButton.d.ts +36 -0
- package/lib/chat/src/ChatParts/ChatAttachmentButton/interface.d.ts +9 -0
- package/lib/chat/src/ChatParts/ChatEditingBlock/ChatEditingBlock.d.ts +36 -0
- package/lib/chat/src/ChatParts/ChatEditingBlock/ChatEditingBlock.js +4 -1
- package/lib/chat/src/ChatParts/ChatEditingBlock/interface.d.ts +9 -0
- package/lib/chat/src/ChatParts/ChatHeader/ChatHeader.d.ts +36 -0
- package/lib/chat/src/ChatParts/ChatHeader/ChatHeader.js +2 -2
- package/lib/chat/src/ChatParts/ChatHeader/interface.d.ts +9 -0
- package/lib/chat/src/ChatParts/ChatLegacyInput/ChatLegacyInput.d.ts +36 -0
- package/lib/chat/src/ChatParts/ChatLegacyInput/interface.d.ts +9 -0
- package/lib/chat/src/ChatParts/Sidebar.d.ts +12 -0
- package/lib/chat/src/interface.d.ts +26 -34
- package/lib/chat/styles/dark.d.ts +3 -0
- package/lib/chat/styles/light.d.ts +3 -0
- package/lib/chat/tests/utils/constants.d.ts +12 -0
- package/lib/chat/tests/utils/constants.js +15 -0
- package/lib/chat/tests/utils/create-chat-item-mock.d.ts +2 -0
- package/lib/chat/tests/utils/create-chat-item-mock.js +10 -0
- package/lib/chat/tests/utils/create-chat-message-mock.d.ts +2 -0
- package/lib/chat/tests/utils/create-chat-message-mock.js +14 -0
- package/lib/components.d.ts +457 -4
- package/lib/data-table/src/DataTable.d.ts +24 -0
- package/lib/data-table/src/HeaderButton/FilterButton.d.ts +12 -0
- package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +12 -0
- package/lib/data-table/src/TableParts/Body.d.ts +12 -0
- package/lib/data-table/src/TableParts/Header.d.ts +12 -0
- package/lib/data-table/src/interface.d.ts +9 -0
- package/lib/data-table/styles/light.d.ts +3 -0
- package/lib/date-picker/src/DatePicker.d.ts +30 -0
- package/lib/date-picker/src/panel/date.d.ts +6 -0
- package/lib/date-picker/src/panel/daterange.d.ts +6 -0
- package/lib/date-picker/src/panel/datetime.d.ts +6 -0
- package/lib/date-picker/src/panel/datetimerange.d.ts +6 -0
- package/lib/date-picker/src/panel/panelMonth.d.ts +24 -0
- package/lib/date-picker/src/panel/panelMonthContent.d.ts +6 -0
- package/lib/date-picker/src/panel/panelYear.d.ts +24 -0
- package/lib/date-picker/src/panel/panelYearContent.d.ts +6 -0
- package/lib/date-picker/src/panel/use-calendar.d.ts +6 -0
- package/lib/date-picker/src/panel/use-dual-calendar.d.ts +6 -0
- package/lib/date-picker/src/panel/use-panel-common.d.ts +6 -0
- package/lib/date-picker/styles/light.d.ts +3 -0
- package/lib/date-picker-v2/src/DatePickerV2.d.ts +30 -0
- package/lib/date-picker-v2/styles/dark.d.ts +3 -0
- package/lib/date-picker-v2/styles/light.d.ts +3 -0
- package/lib/editor/src/Editor.d.ts +20 -2
- package/lib/editor/src/Editor.js +13 -1
- package/lib/editor/src/EditorParts/EditorContent/EditorContent.d.ts +18 -0
- package/lib/editor/src/EditorParts/EditorContent/interface.d.ts +9 -0
- package/lib/editor/src/EditorParts/EditorToolbar/EditorToolbar.d.ts +21 -0
- package/lib/editor/src/EditorParts/EditorToolbar/interface.d.ts +9 -0
- package/lib/editor/src/interface.d.ts +9 -0
- package/lib/editor/styles/dark.d.ts +3 -0
- package/lib/editor/styles/light.d.ts +3 -0
- package/lib/message-bubble/src/MessageBubble.d.ts +10 -10
- package/lib/message-bubble/src/MessageBubble.js +15 -19
- package/lib/message-bubble/src/interface.d.ts +5 -5
- package/lib/message-bubble/src/interface.js +3 -3
- package/lib/pagination/src/Pagination.d.ts +24 -0
- package/lib/pagination/src/interface.d.ts +9 -0
- package/lib/pagination/styles/light.d.ts +3 -0
- package/lib/select/src/Select.d.ts +24 -0
- package/lib/select/src/Select.js +5 -2
- package/lib/select/src/interface.d.ts +10 -0
- package/lib/select/src/interface.js +1 -1
- package/lib/select/src/styles/index.cssr.js +3 -0
- package/lib/select/styles/light.d.ts +3 -0
- package/lib/tree-select/src/TreeSelect.d.ts +30 -0
- package/lib/tree-select/styles/light.d.ts +3 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/web-types.json +17 -7
|
@@ -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.
|
|
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:
|
|
694
|
-
showArrow:
|
|
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 ?
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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,
|
|
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
|
+
});
|
package/es/_internal/selection/src/SelectionParts/CounterPlaceholder/counter-placeholder.types.d.ts
ADDED
|
@@ -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
|
+
};
|
|
@@ -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:
|
|
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
|
-
})])
|
|
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',
|
package/es/_utils/index.d.ts
CHANGED
|
@@ -11,5 +11,5 @@ export type * from './ts/ts';
|
|
|
11
11
|
export * from './types';
|
|
12
12
|
export { getTitleAttribute, isArrayShallowEqual, largerSize, smallerSize, throwError, warn, warnOnce } from './uzum';
|
|
13
13
|
export type { ExtractInternalPropTypes, ExtractPublicPropTypes, Mutable } from './uzum';
|
|
14
|
-
export { call, createDataKey, createInjectionKey, createRefSetter, flatten, getFirstSlotVNode, getFirstSlotVNodeWithTypedProps, getSlot, getVNodeChildren, isNodeVShowFalse, isSlotEmpty, keep, keysOf, mergeEventHandlers, omit, render, resolveSlot, resolveSlotWithProps, resolveSlotWithTypedProps, resolveWrappedSlot, resolveWrappedSlotWithProps, Wrapper } from './vue';
|
|
14
|
+
export { call, createDataKey, createInjectionKey, createRefSetter, flatten, getFirstSlotVNode, getFirstSlotVNodeWithTypedProps, getSlot, getVNodeChildren, isNodeVShowFalse, isSlotEmpty, keep, keysOf, mergeEventHandlers, omit, render, resolveReactiveContent, resolveReactiveText, resolveSlot, resolveSlotWithProps, resolveSlotWithTypedProps, resolveWrappedSlot, resolveWrappedSlotWithProps, Wrapper } from './vue';
|
|
15
15
|
export type { MaybeArray } from './vue';
|
package/es/_utils/index.mjs
CHANGED
|
@@ -9,4 +9,4 @@ export * from "./inject/index.mjs";
|
|
|
9
9
|
export { createStylesWithSingleColor } from "./themes/index.mjs";
|
|
10
10
|
export * from "./types/index.mjs";
|
|
11
11
|
export { getTitleAttribute, isArrayShallowEqual, largerSize, smallerSize, throwError, warn, warnOnce } from "./uzum/index.mjs";
|
|
12
|
-
export { call, createDataKey, createInjectionKey, createRefSetter, flatten, getFirstSlotVNode, getFirstSlotVNodeWithTypedProps, getSlot, getVNodeChildren, isNodeVShowFalse, isSlotEmpty, keep, keysOf, mergeEventHandlers, omit, render, resolveSlot, resolveSlotWithProps, resolveSlotWithTypedProps, resolveWrappedSlot, resolveWrappedSlotWithProps, Wrapper } from "./vue/index.mjs";
|
|
12
|
+
export { call, createDataKey, createInjectionKey, createRefSetter, flatten, getFirstSlotVNode, getFirstSlotVNodeWithTypedProps, getSlot, getVNodeChildren, isNodeVShowFalse, isSlotEmpty, keep, keysOf, mergeEventHandlers, omit, render, resolveReactiveContent, resolveReactiveText, resolveSlot, resolveSlotWithProps, resolveSlotWithTypedProps, resolveWrappedSlot, resolveWrappedSlotWithProps, Wrapper } from "./vue/index.mjs";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export const MARKDOWN_OPTIONS_KEYS_SEPARATOR = '|';
|
|
1
2
|
export const HTML_COMMENT_REGEX = /<!--[\s\S]*?-->/g;
|
|
2
3
|
export const HTML_CDATA_REGEX = /<!\[CDATA\[[\s\S]*?\]\]>/g;
|
|
3
4
|
export const HTML_RAW_BLOCK_REGEX = /<(script|style|iframe|object|embed|template|svg|math|noscript)\b[^>]*>[\s\S]*?<\/\1\s*>/gi;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { createMarkdownRenderer } from './create-markdown-renderer';
|
|
2
2
|
export type { MarkdownFeature, MarkdownOptions, NormalizedMarkdownOptions } from './interface';
|
|
3
|
-
export { normalizeOptions, renderMarkdown, sanitizeMarkdown } from './render-markdown';
|
|
3
|
+
export { clearMarkdownRendererCache, getMarkdownOptionsKey, getMarkdownRendererCacheSize, normalizeOptions, renderMarkdown, sanitizeMarkdown } from './render-markdown';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { createMarkdownRenderer } from "./create-markdown-renderer.mjs";
|
|
2
|
-
export { normalizeOptions, renderMarkdown, sanitizeMarkdown } from "./render-markdown.mjs";
|
|
2
|
+
export { clearMarkdownRendererCache, getMarkdownOptionsKey, getMarkdownRendererCacheSize, normalizeOptions, renderMarkdown, sanitizeMarkdown } from "./render-markdown.mjs";
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import type { MarkdownOptions, NormalizedMarkdownOptions } from './interface';
|
|
2
2
|
export declare function normalizeOptions(options?: MarkdownOptions): NormalizedMarkdownOptions;
|
|
3
|
+
export declare function getMarkdownRendererCacheSize(): number;
|
|
4
|
+
export declare function clearMarkdownRendererCache(): void;
|
|
5
|
+
export declare function getMarkdownOptionsKey(options: NormalizedMarkdownOptions): string;
|
|
3
6
|
export declare function renderMarkdown(content: string, options?: MarkdownOptions): string;
|
|
4
7
|
export declare function sanitizeMarkdown(content: string, options?: MarkdownOptions): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ALL_MARKDOWN_FEATURES, ANY_HTML_TAG_REGEX, HTML_ENTITY_REPLACEMENTS, MAX_HEADING_LEVEL, WHITESPACE_REGEX } from "./constants.mjs";
|
|
1
|
+
import { ALL_MARKDOWN_FEATURES, ANY_HTML_TAG_REGEX, HTML_ENTITY_REPLACEMENTS, MARKDOWN_OPTIONS_KEYS_SEPARATOR, MAX_HEADING_LEVEL, WHITESPACE_REGEX } from "./constants.mjs";
|
|
2
2
|
import { createMarkdownRenderer } from "./create-markdown-renderer.mjs";
|
|
3
3
|
const rendererCache = new Map();
|
|
4
4
|
export function normalizeOptions(options) {
|
|
@@ -9,12 +9,27 @@ export function normalizeOptions(options) {
|
|
|
9
9
|
breaks: (_c = options === null || options === void 0 ? void 0 : options.breaks) !== null && _c !== void 0 ? _c : true
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
+
export function getMarkdownRendererCacheSize() {
|
|
13
|
+
return rendererCache.size;
|
|
14
|
+
}
|
|
15
|
+
export function clearMarkdownRendererCache() {
|
|
16
|
+
rendererCache.clear();
|
|
17
|
+
}
|
|
18
|
+
export function getMarkdownOptionsKey(options) {
|
|
19
|
+
const tags = {
|
|
20
|
+
features: [...new Set(options.features)].sort().join(','),
|
|
21
|
+
maxHeadingLevel: String(options.maxHeadingLevel),
|
|
22
|
+
breaks: options.breaks ? '1' : '0'
|
|
23
|
+
};
|
|
24
|
+
return [tags.features, tags.maxHeadingLevel, tags.breaks].join(MARKDOWN_OPTIONS_KEYS_SEPARATOR);
|
|
25
|
+
}
|
|
12
26
|
function getMarkdownRenderer(options) {
|
|
13
27
|
const normalizedOptions = normalizeOptions(options);
|
|
14
|
-
const
|
|
28
|
+
const key = getMarkdownOptionsKey(normalizedOptions);
|
|
29
|
+
const instance = rendererCache.get(key);
|
|
15
30
|
if (!instance) {
|
|
16
31
|
const renderer = createMarkdownRenderer(normalizedOptions);
|
|
17
|
-
rendererCache.set(
|
|
32
|
+
rendererCache.set(key, renderer);
|
|
18
33
|
return renderer;
|
|
19
34
|
}
|
|
20
35
|
return instance;
|
package/es/_utils/vue/index.d.ts
CHANGED
|
@@ -13,5 +13,6 @@ export { keysOf } from './keysOf';
|
|
|
13
13
|
export { mergeEventHandlers } from './merge-handlers';
|
|
14
14
|
export { omit } from './omit';
|
|
15
15
|
export { render } from './render';
|
|
16
|
+
export { resolveReactiveContent, resolveReactiveText } from './resolve-reactive';
|
|
16
17
|
export { isSlotEmpty, resolveSlot, resolveSlotWithProps, resolveSlotWithTypedProps, resolveWrappedSlot, resolveWrappedSlotWithProps } from './resolve-slot';
|
|
17
18
|
export { Wrapper } from './wrapper';
|
package/es/_utils/vue/index.mjs
CHANGED
|
@@ -12,5 +12,6 @@ export { keysOf } from "./keysOf.mjs";
|
|
|
12
12
|
export { mergeEventHandlers } from "./merge-handlers.mjs";
|
|
13
13
|
export { omit } from "./omit.mjs";
|
|
14
14
|
export { render } from "./render.mjs";
|
|
15
|
+
export { resolveReactiveContent, resolveReactiveText } from "./resolve-reactive.mjs";
|
|
15
16
|
export { isSlotEmpty, resolveSlot, resolveSlotWithProps, resolveSlotWithTypedProps, resolveWrappedSlot, resolveWrappedSlotWithProps } from "./resolve-slot.mjs";
|
|
16
17
|
export { Wrapper } from "./wrapper.mjs";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { MaybeRefOrGetter, VNodeChild } from 'vue';
|
|
2
|
+
export declare function resolveReactiveContent(content?: MaybeRefOrGetter<string | number | Date> | (() => VNodeChild)): VNodeChild;
|
|
3
|
+
export declare function resolveReactiveText(content?: MaybeRefOrGetter<string | number | Date> | (() => VNodeChild)): string;
|