naive-ui 2.21.1 → 2.21.2
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/es/_internal/scrollbar/src/ScrollBar.d.ts +1 -0
- package/es/_internal/scrollbar/src/ScrollBar.js +9 -4
- package/es/_internal/select-menu/src/SelectMenu.d.ts +1 -0
- package/es/_internal/selection/src/Selection.d.ts +1 -0
- package/es/_styles/common/dark.js +2 -1
- package/es/_styles/common/light.d.ts +1 -0
- package/es/_styles/common/light.js +1 -1
- package/es/alert/src/Alert.d.ts +1 -0
- package/es/auto-complete/src/AutoComplete.d.ts +1 -0
- package/es/auto-complete/src/AutoComplete.js +4 -1
- package/es/calendar/src/Calendar.d.ts +1 -0
- package/es/card/src/Card.d.ts +1 -0
- package/es/cascader/src/Cascader.d.ts +1 -0
- package/es/cascader/src/CascaderOption.d.ts +1 -0
- package/es/cascader/src/CascaderSelectMenu.d.ts +1 -0
- package/es/cascader/src/CascaderSubmenu.d.ts +1 -0
- package/es/checkbox/src/Checkbox.d.ts +1 -0
- package/es/collapse/src/Collapse.d.ts +1 -0
- package/es/color-picker/src/ColorInputUnit.d.ts +1 -0
- package/es/data-table/src/DataTable.d.ts +1 -0
- package/es/data-table/src/HeaderButton/FilterButton.d.ts +1 -0
- package/es/data-table/src/HeaderButton/FilterMenu.d.ts +2 -1
- package/es/data-table/src/TableParts/Body.d.ts +1 -0
- package/es/data-table/src/TableParts/Cell.d.ts +2 -0
- package/es/data-table/src/TableParts/Header.d.ts +1 -0
- package/es/data-table/src/styles/index.cssr.js +2 -2
- package/es/data-table/src/use-table-data.js +3 -3
- package/es/data-table/styles/light.js +4 -4
- package/es/date-picker/src/DatePicker.d.ts +1 -0
- package/es/date-picker/src/panel/date.d.ts +2 -1
- package/es/date-picker/src/panel/daterange.d.ts +3 -2
- package/es/date-picker/src/panel/datetime.d.ts +2 -1
- package/es/date-picker/src/panel/datetimerange.d.ts +3 -2
- package/es/date-picker/src/panel/month.d.ts +2 -1
- package/es/date-picker/src/panel/use-calendar.d.ts +2 -1
- package/es/date-picker/src/panel/use-calendar.js +2 -0
- package/es/date-picker/src/panel/use-dual-calendar.d.ts +3 -2
- package/es/date-picker/src/panel/use-dual-calendar.js +4 -0
- package/es/date-picker/src/panel/use-panel-common.d.ts +1 -0
- package/es/dialog/src/Dialog.d.ts +1 -0
- package/es/drawer/src/Drawer.d.ts +1 -0
- package/es/drawer/src/DrawerBodyWrapper.d.ts +1 -0
- package/es/drawer/src/DrawerContent.d.ts +1 -0
- package/es/dropdown/src/Dropdown.d.ts +6 -5
- package/es/dynamic-input/src/DynamicInput.d.ts +1 -0
- package/es/dynamic-input/src/InputPreset.d.ts +1 -0
- package/es/dynamic-input/src/PairPreset.d.ts +1 -0
- package/es/dynamic-tags/src/DynamicTags.d.ts +1 -0
- package/es/ellipsis/src/Ellipsis.d.ts +1 -0
- package/es/input/src/Input.d.ts +1 -0
- package/es/input-number/src/InputNumber.d.ts +35 -0
- package/es/input-number/src/InputNumber.js +22 -6
- package/es/layout/src/Layout.d.ts +2 -0
- package/es/layout/src/LayoutContent.d.ts +1 -0
- package/es/layout/src/LayoutSider.d.ts +1 -0
- package/es/log/src/Log.d.ts +7 -25
- package/es/log/src/Log.js +2 -11
- package/es/log/src/LogLine.d.ts +1 -0
- package/es/log/src/LogLine.js +12 -10
- package/es/mention/src/Mention.d.ts +1 -0
- package/es/menu/src/Menu.d.ts +1 -0
- package/es/menu/src/MenuOption.d.ts +1 -0
- package/es/modal/src/BodyWrapper.d.ts +1 -0
- package/es/notification/src/NotificationContainer.d.ts +8 -0
- package/es/notification/src/NotificationContainer.js +7 -2
- package/es/notification/src/NotificationProvider.d.ts +17 -0
- package/es/notification/src/NotificationProvider.js +38 -3
- package/es/notification/src/styles/index.cssr.d.ts +2 -1
- package/es/notification/src/styles/index.cssr.js +41 -12
- package/es/pagination/src/Pagination.d.ts +1 -0
- package/es/popconfirm/src/Popconfirm.d.ts +6 -5
- package/es/popover/src/Popover.d.ts +6 -6
- package/es/popover/src/Popover.js +2 -5
- package/es/popover/src/PopoverBody.d.ts +5 -5
- package/es/popover/src/PopoverBody.js +2 -1
- package/es/popover/src/styles/index.cssr.js +0 -1
- package/es/popselect/src/Popselect.d.ts +6 -5
- package/es/popselect/src/PopselectPanel.d.ts +1 -0
- package/es/select/src/Select.d.ts +1 -0
- package/es/slider/src/Slider.d.ts +1 -0
- package/es/slider/src/Slider.js +70 -54
- package/es/table/styles/light.js +2 -2
- package/es/theme-editor/src/ThemeEditor.d.ts +1 -0
- package/es/time-picker/src/Panel.d.ts +1 -0
- package/es/time-picker/src/TimePicker.d.ts +1 -0
- package/es/tooltip/src/Tooltip.d.ts +6 -5
- package/es/transfer/src/Transfer.d.ts +1 -0
- package/es/transfer/src/TransferFilter.d.ts +1 -0
- package/es/transfer/src/TransferList.d.ts +1 -0
- package/es/transfer/src/TransferListItem.d.ts +1 -0
- package/es/tree/src/Tree.d.ts +1 -0
- package/es/tree/src/TreeNodeCheckbox.d.ts +1 -0
- package/es/tree-select/src/TreeSelect.d.ts +1 -0
- package/es/upload/index.d.ts +1 -2
- package/es/upload/src/Upload.d.ts +8 -9
- package/es/upload/src/Upload.js +69 -16
- package/es/upload/src/UploadFile.d.ts +1 -0
- package/es/upload/src/UploadProgress.d.ts +1 -0
- package/es/upload/src/interface.d.ts +14 -1
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/_internal/scrollbar/src/ScrollBar.d.ts +1 -0
- package/lib/_internal/scrollbar/src/ScrollBar.js +9 -4
- package/lib/_internal/select-menu/src/SelectMenu.d.ts +1 -0
- package/lib/_internal/selection/src/Selection.d.ts +1 -0
- package/lib/_styles/common/dark.js +2 -1
- package/lib/_styles/common/light.d.ts +1 -0
- package/lib/_styles/common/light.js +1 -1
- package/lib/alert/src/Alert.d.ts +1 -0
- package/lib/auto-complete/src/AutoComplete.d.ts +1 -0
- package/lib/auto-complete/src/AutoComplete.js +4 -1
- package/lib/calendar/src/Calendar.d.ts +1 -0
- package/lib/card/src/Card.d.ts +1 -0
- package/lib/cascader/src/Cascader.d.ts +1 -0
- package/lib/cascader/src/CascaderOption.d.ts +1 -0
- package/lib/cascader/src/CascaderSelectMenu.d.ts +1 -0
- package/lib/cascader/src/CascaderSubmenu.d.ts +1 -0
- package/lib/checkbox/src/Checkbox.d.ts +1 -0
- package/lib/collapse/src/Collapse.d.ts +1 -0
- package/lib/color-picker/src/ColorInputUnit.d.ts +1 -0
- package/lib/data-table/src/DataTable.d.ts +1 -0
- package/lib/data-table/src/HeaderButton/FilterButton.d.ts +1 -0
- package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +2 -1
- package/lib/data-table/src/TableParts/Body.d.ts +1 -0
- package/lib/data-table/src/TableParts/Cell.d.ts +2 -0
- package/lib/data-table/src/TableParts/Header.d.ts +1 -0
- package/lib/data-table/src/styles/index.cssr.js +2 -2
- package/lib/data-table/src/use-table-data.js +3 -3
- package/lib/data-table/styles/light.js +4 -4
- package/lib/date-picker/src/DatePicker.d.ts +1 -0
- package/lib/date-picker/src/panel/date.d.ts +2 -1
- package/lib/date-picker/src/panel/daterange.d.ts +3 -2
- package/lib/date-picker/src/panel/datetime.d.ts +2 -1
- package/lib/date-picker/src/panel/datetimerange.d.ts +3 -2
- package/lib/date-picker/src/panel/month.d.ts +2 -1
- package/lib/date-picker/src/panel/use-calendar.d.ts +2 -1
- package/lib/date-picker/src/panel/use-calendar.js +2 -0
- package/lib/date-picker/src/panel/use-dual-calendar.d.ts +3 -2
- package/lib/date-picker/src/panel/use-dual-calendar.js +4 -0
- package/lib/date-picker/src/panel/use-panel-common.d.ts +1 -0
- package/lib/dialog/src/Dialog.d.ts +1 -0
- package/lib/drawer/src/Drawer.d.ts +1 -0
- package/lib/drawer/src/DrawerBodyWrapper.d.ts +1 -0
- package/lib/drawer/src/DrawerContent.d.ts +1 -0
- package/lib/dropdown/src/Dropdown.d.ts +6 -5
- package/lib/dynamic-input/src/DynamicInput.d.ts +1 -0
- package/lib/dynamic-input/src/InputPreset.d.ts +1 -0
- package/lib/dynamic-input/src/PairPreset.d.ts +1 -0
- package/lib/dynamic-tags/src/DynamicTags.d.ts +1 -0
- package/lib/ellipsis/src/Ellipsis.d.ts +1 -0
- package/lib/input/src/Input.d.ts +1 -0
- package/lib/input-number/src/InputNumber.d.ts +35 -0
- package/lib/input-number/src/InputNumber.js +22 -6
- package/lib/layout/src/Layout.d.ts +2 -0
- package/lib/layout/src/LayoutContent.d.ts +1 -0
- package/lib/layout/src/LayoutSider.d.ts +1 -0
- package/lib/log/src/Log.d.ts +7 -25
- package/lib/log/src/Log.js +2 -11
- package/lib/log/src/LogLine.d.ts +1 -0
- package/lib/log/src/LogLine.js +11 -9
- package/lib/mention/src/Mention.d.ts +1 -0
- package/lib/menu/src/Menu.d.ts +1 -0
- package/lib/menu/src/MenuOption.d.ts +1 -0
- package/lib/modal/src/BodyWrapper.d.ts +1 -0
- package/lib/notification/src/NotificationContainer.d.ts +8 -0
- package/lib/notification/src/NotificationContainer.js +7 -2
- package/lib/notification/src/NotificationProvider.d.ts +17 -0
- package/lib/notification/src/NotificationProvider.js +38 -3
- package/lib/notification/src/styles/index.cssr.d.ts +2 -1
- package/lib/notification/src/styles/index.cssr.js +41 -12
- package/lib/pagination/src/Pagination.d.ts +1 -0
- package/lib/popconfirm/src/Popconfirm.d.ts +6 -5
- package/lib/popover/src/Popover.d.ts +6 -6
- package/lib/popover/src/Popover.js +2 -5
- package/lib/popover/src/PopoverBody.d.ts +5 -5
- package/lib/popover/src/PopoverBody.js +2 -1
- package/lib/popover/src/styles/index.cssr.js +0 -1
- package/lib/popselect/src/Popselect.d.ts +6 -5
- package/lib/popselect/src/PopselectPanel.d.ts +1 -0
- package/lib/select/src/Select.d.ts +1 -0
- package/lib/slider/src/Slider.d.ts +1 -0
- package/lib/slider/src/Slider.js +70 -54
- package/lib/table/styles/light.js +2 -2
- package/lib/theme-editor/src/ThemeEditor.d.ts +1 -0
- package/lib/time-picker/src/Panel.d.ts +1 -0
- package/lib/time-picker/src/TimePicker.d.ts +1 -0
- package/lib/tooltip/src/Tooltip.d.ts +6 -5
- package/lib/transfer/src/Transfer.d.ts +1 -0
- package/lib/transfer/src/TransferFilter.d.ts +1 -0
- package/lib/transfer/src/TransferList.d.ts +1 -0
- package/lib/transfer/src/TransferListItem.d.ts +1 -0
- package/lib/tree/src/Tree.d.ts +1 -0
- package/lib/tree/src/TreeNodeCheckbox.d.ts +1 -0
- package/lib/tree-select/src/TreeSelect.d.ts +1 -0
- package/lib/upload/index.d.ts +1 -2
- package/lib/upload/src/Upload.d.ts +8 -9
- package/lib/upload/src/Upload.js +69 -16
- package/lib/upload/src/UploadFile.d.ts +1 -0
- package/lib/upload/src/UploadProgress.d.ts +1 -0
- package/lib/upload/src/interface.d.ts +14 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +4 -3
- package/web-types.json +51 -6
|
@@ -295,7 +295,7 @@ declare const dropdownProps: {
|
|
|
295
295
|
default: string;
|
|
296
296
|
};
|
|
297
297
|
readonly arrowStyle: PropType<string | CSSProperties>;
|
|
298
|
-
readonly
|
|
298
|
+
readonly flip: {
|
|
299
299
|
type: BooleanConstructor;
|
|
300
300
|
default: boolean;
|
|
301
301
|
};
|
|
@@ -607,7 +607,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
607
607
|
default: string;
|
|
608
608
|
};
|
|
609
609
|
readonly arrowStyle: PropType<string | CSSProperties>;
|
|
610
|
-
readonly
|
|
610
|
+
readonly flip: {
|
|
611
611
|
type: BooleanConstructor;
|
|
612
612
|
default: boolean;
|
|
613
613
|
};
|
|
@@ -713,6 +713,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
713
713
|
tableHeaderColor: string;
|
|
714
714
|
hoverColor: string;
|
|
715
715
|
tableColorHover: string;
|
|
716
|
+
tableColorStriped: string;
|
|
716
717
|
pressedColor: string;
|
|
717
718
|
opacityDisabled: string;
|
|
718
719
|
inputColorDisabled: string;
|
|
@@ -859,7 +860,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
859
860
|
readonly getDisabled?: unknown;
|
|
860
861
|
readonly displayDirective?: unknown;
|
|
861
862
|
readonly arrowStyle?: unknown;
|
|
862
|
-
readonly
|
|
863
|
+
readonly flip?: unknown;
|
|
863
864
|
readonly width?: unknown;
|
|
864
865
|
readonly overlap?: unknown;
|
|
865
866
|
readonly internalExtraClass?: unknown;
|
|
@@ -877,6 +878,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
877
878
|
readonly maxWidth?: unknown;
|
|
878
879
|
} & {
|
|
879
880
|
size: "small" | "medium" | "large" | "huge";
|
|
881
|
+
flip: boolean;
|
|
880
882
|
disabled: boolean;
|
|
881
883
|
duration: number;
|
|
882
884
|
raw: boolean;
|
|
@@ -887,7 +889,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
887
889
|
showArrow: boolean;
|
|
888
890
|
delay: number;
|
|
889
891
|
displayDirective: "show" | "if";
|
|
890
|
-
filp: boolean;
|
|
891
892
|
animated: boolean;
|
|
892
893
|
defaultShow: boolean;
|
|
893
894
|
internalExtraClass: string[];
|
|
@@ -1132,6 +1133,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1132
1133
|
}>, {
|
|
1133
1134
|
size: "small" | "medium" | "large" | "huge";
|
|
1134
1135
|
show: boolean | undefined;
|
|
1136
|
+
flip: boolean;
|
|
1135
1137
|
width: number | "trigger";
|
|
1136
1138
|
disabled: boolean;
|
|
1137
1139
|
duration: number;
|
|
@@ -1144,7 +1146,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1144
1146
|
showArrow: boolean;
|
|
1145
1147
|
delay: number;
|
|
1146
1148
|
displayDirective: "show" | "if";
|
|
1147
|
-
filp: boolean;
|
|
1148
1149
|
animated: boolean;
|
|
1149
1150
|
defaultShow: boolean;
|
|
1150
1151
|
internalExtraClass: string[];
|
|
@@ -1783,6 +1783,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1783
1783
|
tableHeaderColor: string;
|
|
1784
1784
|
hoverColor: string;
|
|
1785
1785
|
tableColorHover: string;
|
|
1786
|
+
tableColorStriped: string;
|
|
1786
1787
|
pressedColor: string;
|
|
1787
1788
|
opacityDisabled: string;
|
|
1788
1789
|
inputColorDisabled: string;
|
|
@@ -2177,6 +2177,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2177
2177
|
tableHeaderColor: string;
|
|
2178
2178
|
hoverColor: string;
|
|
2179
2179
|
tableColorHover: string;
|
|
2180
|
+
tableColorStriped: string;
|
|
2180
2181
|
pressedColor: string;
|
|
2181
2182
|
opacityDisabled: string;
|
|
2182
2183
|
inputColorDisabled: string;
|
|
@@ -232,6 +232,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
232
232
|
tableHeaderColor: string;
|
|
233
233
|
hoverColor: string;
|
|
234
234
|
tableColorHover: string;
|
|
235
|
+
tableColorStriped: string;
|
|
235
236
|
pressedColor: string;
|
|
236
237
|
opacityDisabled: string;
|
|
237
238
|
inputColorDisabled: string;
|
package/es/input/src/Input.d.ts
CHANGED
|
@@ -646,6 +646,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
646
646
|
tableHeaderColor: string;
|
|
647
647
|
hoverColor: string;
|
|
648
648
|
tableColorHover: string;
|
|
649
|
+
tableColorStriped: string;
|
|
649
650
|
pressedColor: string;
|
|
650
651
|
opacityDisabled: string;
|
|
651
652
|
inputColorDisabled: string;
|
|
@@ -30,6 +30,17 @@ declare const inputNumberProps: {
|
|
|
30
30
|
};
|
|
31
31
|
readonly: BooleanConstructor;
|
|
32
32
|
clearable: BooleanConstructor;
|
|
33
|
+
keyboard: {
|
|
34
|
+
type: PropType<{
|
|
35
|
+
ArrowUp?: boolean | undefined;
|
|
36
|
+
ArrowDown?: boolean | undefined;
|
|
37
|
+
}>;
|
|
38
|
+
default: {};
|
|
39
|
+
};
|
|
40
|
+
updateValueOnInput: {
|
|
41
|
+
type: BooleanConstructor;
|
|
42
|
+
default: boolean;
|
|
43
|
+
};
|
|
33
44
|
'onUpdate:value': PropType<MaybeArray<OnUpdateValue>>;
|
|
34
45
|
onUpdateValue: PropType<MaybeArray<OnUpdateValue>>;
|
|
35
46
|
onFocus: PropType<MaybeArray<(e: FocusEvent) => void>>;
|
|
@@ -875,6 +886,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
875
886
|
};
|
|
876
887
|
readonly: BooleanConstructor;
|
|
877
888
|
clearable: BooleanConstructor;
|
|
889
|
+
keyboard: {
|
|
890
|
+
type: PropType<{
|
|
891
|
+
ArrowUp?: boolean | undefined;
|
|
892
|
+
ArrowDown?: boolean | undefined;
|
|
893
|
+
}>;
|
|
894
|
+
default: {};
|
|
895
|
+
};
|
|
896
|
+
updateValueOnInput: {
|
|
897
|
+
type: BooleanConstructor;
|
|
898
|
+
default: boolean;
|
|
899
|
+
};
|
|
878
900
|
'onUpdate:value': PropType<MaybeArray<OnUpdateValue>>;
|
|
879
901
|
onUpdateValue: PropType<MaybeArray<OnUpdateValue>>;
|
|
880
902
|
onFocus: PropType<MaybeArray<(e: FocusEvent) => void>>;
|
|
@@ -1796,6 +1818,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1796
1818
|
tableHeaderColor: string;
|
|
1797
1819
|
hoverColor: string;
|
|
1798
1820
|
tableColorHover: string;
|
|
1821
|
+
tableColorStriped: string;
|
|
1799
1822
|
pressedColor: string;
|
|
1800
1823
|
opacityDisabled: string;
|
|
1801
1824
|
inputColorDisabled: string;
|
|
@@ -2136,6 +2159,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2136
2159
|
showButton?: unknown;
|
|
2137
2160
|
readonly?: unknown;
|
|
2138
2161
|
clearable?: unknown;
|
|
2162
|
+
keyboard?: unknown;
|
|
2163
|
+
updateValueOnInput?: unknown;
|
|
2139
2164
|
'onUpdate:value'?: unknown;
|
|
2140
2165
|
onUpdateValue?: unknown;
|
|
2141
2166
|
onFocus?: unknown;
|
|
@@ -2150,7 +2175,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2150
2175
|
step: string | number;
|
|
2151
2176
|
clearable: boolean;
|
|
2152
2177
|
defaultValue: number | null;
|
|
2178
|
+
keyboard: {
|
|
2179
|
+
ArrowUp?: boolean | undefined;
|
|
2180
|
+
ArrowDown?: boolean | undefined;
|
|
2181
|
+
};
|
|
2153
2182
|
showButton: boolean;
|
|
2183
|
+
updateValueOnInput: boolean;
|
|
2154
2184
|
} & {
|
|
2155
2185
|
value?: number | null | undefined;
|
|
2156
2186
|
size?: "small" | "medium" | "large" | undefined;
|
|
@@ -2978,6 +3008,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2978
3008
|
bordered: boolean | undefined;
|
|
2979
3009
|
clearable: boolean;
|
|
2980
3010
|
defaultValue: number | null;
|
|
3011
|
+
keyboard: {
|
|
3012
|
+
ArrowUp?: boolean | undefined;
|
|
3013
|
+
ArrowDown?: boolean | undefined;
|
|
3014
|
+
};
|
|
2981
3015
|
showButton: boolean;
|
|
3016
|
+
updateValueOnInput: boolean;
|
|
2982
3017
|
}>;
|
|
2983
3018
|
export default _default;
|
|
@@ -25,7 +25,13 @@ const inputNumberProps = Object.assign(Object.assign({}, useTheme.props), { plac
|
|
|
25
25
|
}, showButton: {
|
|
26
26
|
type: Boolean,
|
|
27
27
|
default: true
|
|
28
|
-
}, readonly: Boolean, clearable: Boolean,
|
|
28
|
+
}, readonly: Boolean, clearable: Boolean, keyboard: {
|
|
29
|
+
type: Object,
|
|
30
|
+
default: {}
|
|
31
|
+
}, updateValueOnInput: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: true
|
|
34
|
+
}, 'onUpdate:value': [Function, Array], onUpdateValue: [Function, Array], onFocus: [Function, Array], onBlur: [Function, Array], onClear: [Function, Array],
|
|
29
35
|
// deprecated
|
|
30
36
|
onChange: {
|
|
31
37
|
type: [Function, Array],
|
|
@@ -91,8 +97,10 @@ export default defineComponent({
|
|
|
91
97
|
});
|
|
92
98
|
const doUpdateValue = (value) => {
|
|
93
99
|
const { value: mergedValue } = mergedValueRef;
|
|
94
|
-
if (value === mergedValue)
|
|
100
|
+
if (value === mergedValue) {
|
|
101
|
+
deriveDisplayedValueFromValue();
|
|
95
102
|
return;
|
|
103
|
+
}
|
|
96
104
|
const { 'onUpdate:value': _onUpdateValue, onUpdateValue, onChange } = props;
|
|
97
105
|
const { nTriggerFormInput, nTriggerFormChange } = formItem;
|
|
98
106
|
if (onChange)
|
|
@@ -105,7 +113,7 @@ export default defineComponent({
|
|
|
105
113
|
nTriggerFormInput();
|
|
106
114
|
nTriggerFormChange();
|
|
107
115
|
};
|
|
108
|
-
const deriveValueFromDisplayedValue = (offset = 0, doUpdateIfValid = true) => {
|
|
116
|
+
const deriveValueFromDisplayedValue = (offset = 0, doUpdateIfValid = true, applyMinMax = true) => {
|
|
109
117
|
const { value: displayedValue } = displayedValueRef;
|
|
110
118
|
const parsedValue = parse(displayedValue);
|
|
111
119
|
if (parsedValue === null) {
|
|
@@ -120,13 +128,15 @@ export default defineComponent({
|
|
|
120
128
|
const { value: mergedMax } = mergedMaxRef;
|
|
121
129
|
const { value: mergedMin } = mergedMinRef;
|
|
122
130
|
if (mergedMax !== null && nextValue > mergedMax) {
|
|
123
|
-
if (!doUpdateIfValid)
|
|
131
|
+
if (!doUpdateIfValid || !applyMinMax)
|
|
124
132
|
return false;
|
|
133
|
+
// if doUpdateIfValid=true, we try to make it a valid value
|
|
125
134
|
nextValue = mergedMax;
|
|
126
135
|
}
|
|
127
136
|
if (mergedMin !== null && nextValue < mergedMin) {
|
|
128
|
-
if (!doUpdateIfValid)
|
|
137
|
+
if (!doUpdateIfValid || !applyMinMax)
|
|
129
138
|
return false;
|
|
139
|
+
// if doUpdateIfValid=true, we try to make it a valid value
|
|
130
140
|
nextValue = mergedMin;
|
|
131
141
|
}
|
|
132
142
|
if (props.validator && !props.validator(nextValue))
|
|
@@ -294,12 +304,16 @@ export default defineComponent({
|
|
|
294
304
|
}
|
|
295
305
|
}
|
|
296
306
|
else if (e.code === 'ArrowUp') {
|
|
307
|
+
if (props.keyboard.ArrowUp === false)
|
|
308
|
+
return;
|
|
297
309
|
const value = deriveValueFromDisplayedValue();
|
|
298
310
|
if (value !== false) {
|
|
299
311
|
doAdd();
|
|
300
312
|
}
|
|
301
313
|
}
|
|
302
314
|
else if (e.code === 'ArrowDown') {
|
|
315
|
+
if (props.keyboard.ArrowDown === false)
|
|
316
|
+
return;
|
|
303
317
|
const value = deriveValueFromDisplayedValue();
|
|
304
318
|
if (value !== false) {
|
|
305
319
|
doMinus();
|
|
@@ -308,7 +322,9 @@ export default defineComponent({
|
|
|
308
322
|
}
|
|
309
323
|
function handleUpdateDisplayedValue(value) {
|
|
310
324
|
displayedValueRef.value = value;
|
|
311
|
-
|
|
325
|
+
if (props.updateValueOnInput) {
|
|
326
|
+
deriveValueFromDisplayedValue(0, true, false);
|
|
327
|
+
}
|
|
312
328
|
}
|
|
313
329
|
watch(mergedValueRef, () => {
|
|
314
330
|
deriveDisplayedValueFromValue();
|
|
@@ -218,6 +218,7 @@ export declare function createLayoutComponent(isContent: boolean): import("vue")
|
|
|
218
218
|
tableHeaderColor: string;
|
|
219
219
|
hoverColor: string;
|
|
220
220
|
tableColorHover: string;
|
|
221
|
+
tableColorStriped: string;
|
|
221
222
|
pressedColor: string;
|
|
222
223
|
opacityDisabled: string;
|
|
223
224
|
inputColorDisabled: string;
|
|
@@ -608,6 +609,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
608
609
|
tableHeaderColor: string;
|
|
609
610
|
hoverColor: string;
|
|
610
611
|
tableColorHover: string;
|
|
612
|
+
tableColorStriped: string;
|
|
611
613
|
pressedColor: string;
|
|
612
614
|
opacityDisabled: string;
|
|
613
615
|
inputColorDisabled: string;
|
|
@@ -191,6 +191,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
191
191
|
tableHeaderColor: string;
|
|
192
192
|
hoverColor: string;
|
|
193
193
|
tableColorHover: string;
|
|
194
|
+
tableColorStriped: string;
|
|
194
195
|
pressedColor: string;
|
|
195
196
|
opacityDisabled: string;
|
|
196
197
|
inputColorDisabled: string;
|
|
@@ -278,6 +278,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
278
278
|
tableHeaderColor: string;
|
|
279
279
|
hoverColor: string;
|
|
280
280
|
tableColorHover: string;
|
|
281
|
+
tableColorStriped: string;
|
|
281
282
|
pressedColor: string;
|
|
282
283
|
opacityDisabled: string;
|
|
283
284
|
inputColorDisabled: string;
|
package/es/log/src/Log.d.ts
CHANGED
|
@@ -10,14 +10,8 @@ export interface LogInjection {
|
|
|
10
10
|
}
|
|
11
11
|
export declare const logInjectionKey: InjectionKey<LogInjection>;
|
|
12
12
|
declare const logProps: {
|
|
13
|
-
readonly loading:
|
|
14
|
-
|
|
15
|
-
readonly default: false;
|
|
16
|
-
};
|
|
17
|
-
readonly trim: {
|
|
18
|
-
readonly type: BooleanConstructor;
|
|
19
|
-
readonly default: false;
|
|
20
|
-
};
|
|
13
|
+
readonly loading: BooleanConstructor;
|
|
14
|
+
readonly trim: BooleanConstructor;
|
|
21
15
|
readonly log: StringConstructor;
|
|
22
16
|
readonly fontSize: {
|
|
23
17
|
readonly type: NumberConstructor;
|
|
@@ -44,10 +38,7 @@ declare const logProps: {
|
|
|
44
38
|
readonly type: NumberConstructor;
|
|
45
39
|
readonly default: 0;
|
|
46
40
|
};
|
|
47
|
-
readonly hljs:
|
|
48
|
-
readonly type: ObjectConstructor;
|
|
49
|
-
readonly default: undefined;
|
|
50
|
-
};
|
|
41
|
+
readonly hljs: ObjectConstructor;
|
|
51
42
|
readonly onReachTop: PropType<() => void>;
|
|
52
43
|
readonly onReachBottom: PropType<() => void>;
|
|
53
44
|
readonly onRequireMore: PropType<(from: 'top' | 'bottom') => void>;
|
|
@@ -132,14 +123,8 @@ declare const logProps: {
|
|
|
132
123
|
};
|
|
133
124
|
export declare type LogProps = ExtractPublicPropTypes<typeof logProps>;
|
|
134
125
|
declare const _default: import("vue").DefineComponent<{
|
|
135
|
-
readonly loading:
|
|
136
|
-
|
|
137
|
-
readonly default: false;
|
|
138
|
-
};
|
|
139
|
-
readonly trim: {
|
|
140
|
-
readonly type: BooleanConstructor;
|
|
141
|
-
readonly default: false;
|
|
142
|
-
};
|
|
126
|
+
readonly loading: BooleanConstructor;
|
|
127
|
+
readonly trim: BooleanConstructor;
|
|
143
128
|
readonly log: StringConstructor;
|
|
144
129
|
readonly fontSize: {
|
|
145
130
|
readonly type: NumberConstructor;
|
|
@@ -166,10 +151,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
166
151
|
readonly type: NumberConstructor;
|
|
167
152
|
readonly default: 0;
|
|
168
153
|
};
|
|
169
|
-
readonly hljs:
|
|
170
|
-
readonly type: ObjectConstructor;
|
|
171
|
-
readonly default: undefined;
|
|
172
|
-
};
|
|
154
|
+
readonly hljs: ObjectConstructor;
|
|
173
155
|
readonly onReachTop: PropType<() => void>;
|
|
174
156
|
readonly onReachBottom: PropType<() => void>;
|
|
175
157
|
readonly onRequireMore: PropType<(from: "bottom" | "top") => void>;
|
|
@@ -330,6 +312,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
330
312
|
tableHeaderColor: string;
|
|
331
313
|
hoverColor: string;
|
|
332
314
|
tableColorHover: string;
|
|
315
|
+
tableColorStriped: string;
|
|
333
316
|
pressedColor: string;
|
|
334
317
|
opacityDisabled: string;
|
|
335
318
|
inputColorDisabled: string;
|
|
@@ -545,7 +528,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
545
528
|
lineHeight: number;
|
|
546
529
|
loading: boolean;
|
|
547
530
|
rows: number;
|
|
548
|
-
hljs: Record<string, any>;
|
|
549
531
|
offsetTop: number;
|
|
550
532
|
offsetBottom: number;
|
|
551
533
|
lines: string[];
|
package/es/log/src/Log.js
CHANGED
|
@@ -9,13 +9,7 @@ import NLogLoader from './LogLoader';
|
|
|
9
9
|
import NLogLine from './LogLine';
|
|
10
10
|
import style from './styles/index.cssr';
|
|
11
11
|
export const logInjectionKey = Symbol('log');
|
|
12
|
-
const logProps = Object.assign(Object.assign({}, useTheme.props), { loading: {
|
|
13
|
-
type: Boolean,
|
|
14
|
-
default: false
|
|
15
|
-
}, trim: {
|
|
16
|
-
type: Boolean,
|
|
17
|
-
default: false
|
|
18
|
-
}, log: String, fontSize: {
|
|
12
|
+
const logProps = Object.assign(Object.assign({}, useTheme.props), { loading: Boolean, trim: Boolean, log: String, fontSize: {
|
|
19
13
|
type: Number,
|
|
20
14
|
default: 14
|
|
21
15
|
}, lines: {
|
|
@@ -33,10 +27,7 @@ const logProps = Object.assign(Object.assign({}, useTheme.props), { loading: {
|
|
|
33
27
|
}, offsetBottom: {
|
|
34
28
|
type: Number,
|
|
35
29
|
default: 0
|
|
36
|
-
}, hljs:
|
|
37
|
-
type: Object,
|
|
38
|
-
default: undefined
|
|
39
|
-
}, onReachTop: Function, onReachBottom: Function, onRequireMore: Function });
|
|
30
|
+
}, hljs: Object, onReachTop: Function, onReachBottom: Function, onRequireMore: Function });
|
|
40
31
|
export default defineComponent({
|
|
41
32
|
name: 'Log',
|
|
42
33
|
props: logProps,
|
package/es/log/src/LogLine.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
6
6
|
}, {
|
|
7
7
|
highlight: import("vue").Ref<boolean>;
|
|
8
8
|
selfRef: import("vue").Ref<HTMLElement | null>;
|
|
9
|
+
maybeTrimmedLines: import("vue").ComputedRef<string>;
|
|
9
10
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
10
11
|
line?: unknown;
|
|
11
12
|
} & {
|
package/es/log/src/LogLine.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, defineComponent, inject, ref, onMounted, watch, toRef } from 'vue';
|
|
1
|
+
import { h, defineComponent, inject, ref, onMounted, watch, toRef, computed } from 'vue';
|
|
2
2
|
import { logInjectionKey } from './Log';
|
|
3
3
|
export default defineComponent({
|
|
4
4
|
props: {
|
|
@@ -8,18 +8,19 @@ export default defineComponent({
|
|
|
8
8
|
}
|
|
9
9
|
},
|
|
10
10
|
setup(props) {
|
|
11
|
+
const { trimRef, highlightRef, languageRef, mergedHljsRef } =
|
|
11
12
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
12
|
-
|
|
13
|
+
inject(logInjectionKey);
|
|
13
14
|
const selfRef = ref(null);
|
|
15
|
+
const maybeTrimmedLinesRef = computed(() => {
|
|
16
|
+
return trimRef.value ? props.line.trim() : props.line;
|
|
17
|
+
});
|
|
14
18
|
function setInnerHTML() {
|
|
15
|
-
const trimmedLine = trimRef.value ? (props.line || '').trim() : props.line;
|
|
16
19
|
if (selfRef.value) {
|
|
17
|
-
selfRef.value.innerHTML = generateCodeHTML(languageRef.value,
|
|
20
|
+
selfRef.value.innerHTML = generateCodeHTML(languageRef.value, maybeTrimmedLinesRef.value);
|
|
18
21
|
}
|
|
19
22
|
}
|
|
20
|
-
function generateCodeHTML(language, code
|
|
21
|
-
if (trim)
|
|
22
|
-
code = code.trim();
|
|
23
|
+
function generateCodeHTML(language, code) {
|
|
23
24
|
const { value: hljs } = mergedHljsRef;
|
|
24
25
|
if (hljs) {
|
|
25
26
|
if (language && hljs.getLanguage(language)) {
|
|
@@ -40,11 +41,12 @@ export default defineComponent({
|
|
|
40
41
|
});
|
|
41
42
|
return {
|
|
42
43
|
highlight: highlightRef,
|
|
43
|
-
selfRef
|
|
44
|
+
selfRef,
|
|
45
|
+
maybeTrimmedLines: maybeTrimmedLinesRef
|
|
44
46
|
};
|
|
45
47
|
},
|
|
46
48
|
render() {
|
|
47
|
-
const { highlight } = this;
|
|
48
|
-
return h("pre", { ref: "selfRef" }, highlight ? null :
|
|
49
|
+
const { highlight, maybeTrimmedLines } = this;
|
|
50
|
+
return h("pre", { ref: "selfRef" }, highlight ? null : maybeTrimmedLines);
|
|
49
51
|
}
|
|
50
52
|
});
|
|
@@ -878,6 +878,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
878
878
|
tableHeaderColor: string;
|
|
879
879
|
hoverColor: string;
|
|
880
880
|
tableColorHover: string;
|
|
881
|
+
tableColorStriped: string;
|
|
881
882
|
pressedColor: string;
|
|
882
883
|
opacityDisabled: string;
|
|
883
884
|
inputColorDisabled: string;
|
package/es/menu/src/Menu.d.ts
CHANGED
|
@@ -626,6 +626,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
626
626
|
tableHeaderColor: string;
|
|
627
627
|
hoverColor: string;
|
|
628
628
|
tableColorHover: string;
|
|
629
|
+
tableColorStriped: string;
|
|
629
630
|
pressedColor: string;
|
|
630
631
|
opacityDisabled: string;
|
|
631
632
|
inputColorDisabled: string;
|
|
@@ -118,6 +118,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
118
118
|
tableHeaderColor: string;
|
|
119
119
|
hoverColor: string;
|
|
120
120
|
tableColorHover: string;
|
|
121
|
+
tableColorStriped: string;
|
|
121
122
|
pressedColor: string;
|
|
122
123
|
opacityDisabled: string;
|
|
123
124
|
inputColorDisabled: string;
|
|
@@ -139,6 +139,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
139
139
|
tableHeaderColor: string;
|
|
140
140
|
hoverColor: string;
|
|
141
141
|
tableColorHover: string;
|
|
142
|
+
tableColorStriped: string;
|
|
142
143
|
pressedColor: string;
|
|
143
144
|
opacityDisabled: string;
|
|
144
145
|
inputColorDisabled: string;
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
1
2
|
declare const _default: import("vue").DefineComponent<{
|
|
2
3
|
scrollable: {
|
|
3
4
|
type: BooleanConstructor;
|
|
4
5
|
required: true;
|
|
5
6
|
};
|
|
7
|
+
placement: {
|
|
8
|
+
type: PropType<"top-left" | "top-right" | "bottom-left" | "bottom-right">;
|
|
9
|
+
required: true;
|
|
10
|
+
};
|
|
6
11
|
}, {
|
|
7
12
|
mergedTheme: import("vue").Ref<{
|
|
8
13
|
common: {
|
|
@@ -74,6 +79,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
74
79
|
tableHeaderColor: string;
|
|
75
80
|
hoverColor: string;
|
|
76
81
|
tableColorHover: string;
|
|
82
|
+
tableColorStriped: string;
|
|
77
83
|
pressedColor: string;
|
|
78
84
|
opacityDisabled: string;
|
|
79
85
|
inputColorDisabled: string;
|
|
@@ -148,7 +154,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
148
154
|
mergedClsPrefix: import("vue").Ref<string>;
|
|
149
155
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
150
156
|
scrollable?: unknown;
|
|
157
|
+
placement?: unknown;
|
|
151
158
|
} & {
|
|
159
|
+
placement: "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
152
160
|
scrollable: boolean;
|
|
153
161
|
} & {}>, {}>;
|
|
154
162
|
export default _default;
|
|
@@ -7,6 +7,10 @@ export default defineComponent({
|
|
|
7
7
|
scrollable: {
|
|
8
8
|
type: Boolean,
|
|
9
9
|
required: true
|
|
10
|
+
},
|
|
11
|
+
placement: {
|
|
12
|
+
type: String,
|
|
13
|
+
required: true
|
|
10
14
|
}
|
|
11
15
|
},
|
|
12
16
|
setup() {
|
|
@@ -18,10 +22,11 @@ export default defineComponent({
|
|
|
18
22
|
};
|
|
19
23
|
},
|
|
20
24
|
render() {
|
|
21
|
-
const { $slots, scrollable, mergedClsPrefix, mergedTheme } = this;
|
|
25
|
+
const { $slots, scrollable, mergedClsPrefix, mergedTheme, placement } = this;
|
|
22
26
|
return (h("div", { class: [
|
|
23
27
|
`${mergedClsPrefix}-notification-container`,
|
|
24
|
-
scrollable && `${mergedClsPrefix}-notification-container--scrollable
|
|
28
|
+
scrollable && `${mergedClsPrefix}-notification-container--scrollable`,
|
|
29
|
+
`${mergedClsPrefix}-notification-container--${placement}`
|
|
25
30
|
] }, scrollable ? (h(NScrollbar, { theme: mergedTheme.peers.Scrollbar, themeOverrides: mergedTheme.peerOverrides.Scrollbar }, $slots)) : ($slots)));
|
|
26
31
|
}
|
|
27
32
|
});
|
|
@@ -19,6 +19,7 @@ export interface NotificationApiInjection {
|
|
|
19
19
|
error: TypedCreate;
|
|
20
20
|
/** @deprecated */
|
|
21
21
|
open: Create;
|
|
22
|
+
destroyAll: () => void;
|
|
22
23
|
}
|
|
23
24
|
export declare type NotificationProviderInst = NotificationApiInjection;
|
|
24
25
|
export declare const notificationApiInjectionKey: InjectionKey<NotificationApiInjection>;
|
|
@@ -39,6 +40,11 @@ declare const notificationProviderProps: {
|
|
|
39
40
|
type: BooleanConstructor;
|
|
40
41
|
default: boolean;
|
|
41
42
|
};
|
|
43
|
+
max: NumberConstructor;
|
|
44
|
+
placement: {
|
|
45
|
+
type: PropType<"top-left" | "top-right" | "bottom-left" | "bottom-right">;
|
|
46
|
+
default: string;
|
|
47
|
+
};
|
|
42
48
|
theme: PropType<import("../../_mixins").Theme<"Notification", {
|
|
43
49
|
borderRadius: string;
|
|
44
50
|
lineHeight: string;
|
|
@@ -134,6 +140,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
134
140
|
type: BooleanConstructor;
|
|
135
141
|
default: boolean;
|
|
136
142
|
};
|
|
143
|
+
max: NumberConstructor;
|
|
144
|
+
placement: {
|
|
145
|
+
type: PropType<"top-left" | "top-right" | "bottom-left" | "bottom-right">;
|
|
146
|
+
default: string;
|
|
147
|
+
};
|
|
137
148
|
theme: PropType<import("../../_mixins").Theme<"Notification", {
|
|
138
149
|
borderRadius: string;
|
|
139
150
|
lineHeight: string;
|
|
@@ -254,15 +265,20 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
254
265
|
warning: (options: Omit<NotificationOptions, 'type'>) => NotificationReactive;
|
|
255
266
|
error: (options: Omit<NotificationOptions, 'type'>) => NotificationReactive;
|
|
256
267
|
open: (options: NotificationOptions) => NotificationReactive;
|
|
268
|
+
destroyAll: () => void;
|
|
257
269
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
258
270
|
to?: unknown;
|
|
259
271
|
scrollable?: unknown;
|
|
272
|
+
max?: unknown;
|
|
273
|
+
placement?: unknown;
|
|
260
274
|
theme?: unknown;
|
|
261
275
|
themeOverrides?: unknown;
|
|
262
276
|
builtinThemeOverrides?: unknown;
|
|
263
277
|
} & {
|
|
278
|
+
placement: "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
264
279
|
scrollable: boolean;
|
|
265
280
|
} & {
|
|
281
|
+
max?: number | undefined;
|
|
266
282
|
to?: string | HTMLElement | undefined;
|
|
267
283
|
theme?: import("../../_mixins").Theme<"Notification", {
|
|
268
284
|
borderRadius: string;
|
|
@@ -352,6 +368,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
352
368
|
}, any>;
|
|
353
369
|
}>> | undefined;
|
|
354
370
|
}>, {
|
|
371
|
+
placement: "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
355
372
|
scrollable: boolean;
|
|
356
373
|
}>;
|
|
357
374
|
export default _default;
|