@uzum-tech/ui 1.12.0 → 1.12.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/dist/index.js +22930 -22766
- package/dist/index.prod.js +3 -3
- package/es/_internal/close/src/Close.d.ts +2 -2
- package/es/_internal/loading/src/Loading.d.ts +1 -1
- package/es/_internal/safe-top-scrollbar/src/SafeTopScrollbar.d.ts +2 -2
- package/es/_internal/scrollbar/src/Scrollbar.d.ts +2 -2
- package/es/_internal/select-menu/src/SelectMenu.d.ts +7 -7
- package/es/_internal/selection/src/Selection.d.ts +13 -13
- package/es/_internal/skeleton/src/Skeleton.d.ts +1 -1
- package/es/_internal/typography/index.d.ts +1 -0
- package/es/_internal/typography/src/text.d.ts +42 -3
- package/es/_internal/typography/src/text.js +17 -4
- package/es/_internal/typography/src/variants.d.ts +105 -4
- package/es/_internal/typography/src/variants.js +84 -42
- package/es/_internal/typography/styles/dark.js +1 -1
- package/es/_internal/typography/styles/light.d.ts +1 -1
- package/es/_internal/typography/styles/light.js +1 -1
- package/es/affix/src/Affix.d.ts +3 -3
- package/es/alert/src/Alert.d.ts +3 -3
- package/es/anchor/src/AnchorAdapter.d.ts +5 -5
- package/es/auto-complete/src/AutoComplete.d.ts +3 -3
- package/es/avatar/src/Avatar.d.ts +1 -1
- package/es/avatar-group/src/AvatarGroup.d.ts +1 -1
- package/es/back-top/src/BackTop.d.ts +1 -1
- package/es/badge/src/Badge.d.ts +1 -1
- package/es/button/src/Button.d.ts +7 -7
- package/es/card/src/Card.d.ts +3 -3
- package/es/card-list/src/CardList.d.ts +2 -2
- package/es/card-list/src/CardListItem.d.ts +1 -1
- package/es/carousel/src/Carousel.d.ts +8 -8
- package/es/carousel/src/CarouselDots.d.ts +2 -2
- package/es/cascader/src/Cascader.d.ts +12 -12
- package/es/cascader/src/CascaderMenu.d.ts +1 -1
- package/es/cascader/src/CascaderSelectMenu.d.ts +1 -1
- package/es/checkbox/src/Checkbox.d.ts +5 -5
- package/es/code/src/Code.d.ts +1 -1
- package/es/collapse/src/Collapse.d.ts +1 -1
- package/es/collapse-transition/src/CollapseTransition.d.ts +1 -1
- package/es/color-picker/src/ColorPicker.d.ts +3 -3
- package/es/config-provider/src/ConfigProvider.d.ts +7 -1
- package/es/config-provider/src/ConfigProvider.js +83 -12
- package/es/config-provider/src/interface.d.ts +1 -1
- package/es/config-provider/src/internal-interface.d.ts +198 -34
- package/es/countdown/src/Countdown.d.ts +1 -1
- package/es/create.js +34 -3
- package/es/data-table/src/DataTable.d.ts +6 -6
- package/es/data-table/src/HeaderButton/RenderFilter.d.ts +1 -1
- package/es/date-picker/src/DatePicker.d.ts +4 -4
- package/es/date-picker/src/panel/date.d.ts +1 -1
- package/es/date-picker/src/panel/daterange.d.ts +1 -1
- package/es/date-picker/src/panel/datetime.d.ts +1 -1
- package/es/date-picker/src/panel/datetimerange.d.ts +1 -1
- package/es/date-picker/src/panel/panelMonth.d.ts +9 -9
- package/es/date-picker/src/panel/panelMonthContent.d.ts +1 -1
- package/es/date-picker/src/panel/panelYear.d.ts +9 -9
- package/es/date-picker/src/panel/panelYearContent.d.ts +1 -1
- package/es/descriptions/src/Descriptions.d.ts +3 -3
- package/es/dialog/src/Dialog.d.ts +1 -1
- package/es/dialog/src/DialogEnvironment.d.ts +3 -3
- package/es/dialog/src/DialogProvider.d.ts +29 -29
- package/es/dialog/src/dialogProps.d.ts +1 -1
- package/es/drawer/src/Drawer.d.ts +7 -7
- package/es/drawer/src/DrawerBodyWrapper.d.ts +2 -2
- package/es/dropdown/src/Dropdown.d.ts +15 -15
- package/es/dropdown/src/DropdownMenu.d.ts +2 -2
- package/es/dropdown/src/DropdownOption.d.ts +1 -1
- package/es/dynamic-input/src/DynamicInput.d.ts +1 -1
- package/es/dynamic-tags/src/DynamicTags.d.ts +2 -2
- package/es/empty/src/Empty.d.ts +1 -1
- package/es/flex/src/Flex.d.ts +1 -1
- package/es/form/src/FormItem.d.ts +3 -3
- package/es/form/src/FormItemCol.d.ts +2 -2
- package/es/form/src/FormItemGridItem.d.ts +2 -2
- package/es/form/src/FormItemRow.d.ts +2 -2
- package/es/form/src/utils.d.ts +1 -1
- package/es/gradient-text/src/GradientText.d.ts +2 -2
- package/es/grid/src/Grid.d.ts +4 -4
- package/es/header/src/HeaderNavigation.d.ts +1 -1
- package/es/icon-bar/src/IconBar.d.ts +1 -1
- package/es/icon-wrapper/src/IconWrapper.d.ts +1 -1
- package/es/input/src/Input.d.ts +8 -8
- package/es/input-number/src/InputNumber.d.ts +3 -3
- package/es/input-otp/src/InputOtp.d.ts +1 -1
- package/es/layout/src/LayoutSider.d.ts +2 -2
- package/es/legacy-grid/src/Row.d.ts +1 -1
- package/es/legacy-transfer/src/Transfer.d.ts +2 -2
- package/es/list/src/List.d.ts +6 -6
- package/es/list/src/ListItem.d.ts +4 -4
- package/es/log/src/Log.d.ts +2 -2
- package/es/mention/src/Mention.d.ts +3 -3
- package/es/menu/src/Menu.d.ts +5 -5
- package/es/menu/src/MenuOption.d.ts +1 -1
- package/es/menu/src/MenuOptionContent.d.ts +1 -1
- package/es/menu/src/MenuOptionGroup.d.ts +1 -1
- package/es/menu/src/Submenu.d.ts +1 -1
- package/es/message/src/MessageProvider.d.ts +1 -1
- package/es/modal/src/BodyWrapper.d.ts +3 -3
- package/es/modal/src/Modal.d.ts +6 -6
- package/es/modal/src/presetProps.d.ts +1 -1
- package/es/modal-fullscreen/src/ModalFull.d.ts +2 -2
- package/es/notification/src/Notification.d.ts +2 -2
- package/es/notification/src/NotificationEnvironment.d.ts +1 -1
- package/es/notification/src/NotificationProvider.d.ts +9 -9
- package/es/number-animation/src/NumberAnimation.d.ts +2 -2
- package/es/pagination/src/Pagination.d.ts +1 -1
- package/es/popconfirm/src/Popconfirm.d.ts +8 -8
- package/es/popover/src/Popover.d.ts +8 -8
- package/es/popover/src/PopoverBody.d.ts +2 -2
- package/es/popselect/src/Popselect.d.ts +81 -81
- package/es/popselect/src/PopselectPanel.d.ts +4 -4
- package/es/progress/src/Circle.d.ts +1 -1
- package/es/progress/src/MultipleCircle.d.ts +1 -1
- package/es/progress/src/Progress.d.ts +4 -4
- package/es/qr-code/src/QrCode.d.ts +2 -2
- package/es/radio/src/Radio.d.ts +1 -1
- package/es/rate/src/Rate.d.ts +3 -3
- package/es/result/src/Result.d.ts +1 -1
- package/es/select/src/Select.d.ts +19 -19
- package/es/skeleton/src/Skeleton.d.ts +1 -1
- package/es/slider/src/Slider.d.ts +4 -4
- package/es/space/src/Space.d.ts +1 -1
- package/es/spin/src/Spin.d.ts +2 -2
- package/es/steps/src/Steps.d.ts +1 -1
- package/es/switch/src/Switch.d.ts +1 -1
- package/es/tabs/src/Tab.d.ts +1 -1
- package/es/tabs/src/Tabs.d.ts +4 -4
- package/es/tag/src/Tag.d.ts +2 -2
- package/es/tag/src/TagGroup.d.ts +1 -1
- package/es/time/src/Time.d.ts +1 -1
- package/es/time-picker/src/Panel.d.ts +1 -1
- package/es/time-picker/src/TimePicker.d.ts +5 -5
- package/es/timeline/src/TimelineItem.d.ts +1 -1
- package/es/tooltip/src/Tooltip.d.ts +8 -8
- package/es/transfer/src/Transfer.d.ts +3 -3
- package/es/tree/src/Tree.d.ts +18 -18
- package/es/tree/src/TreeNodeCheckbox.d.ts +1 -1
- package/es/tree-select/src/TreeSelect.d.ts +15 -15
- package/es/typography/index.d.ts +1 -0
- package/es/typography/src/create-header.d.ts +1 -1
- package/es/typography/src/headers.d.ts +6 -6
- package/es/typography/src/text.d.ts +44 -5
- package/es/upload/src/Upload.d.ts +11 -11
- package/es/upload/src/UploadFile.d.ts +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/es/virtual-list/src/VirtualList.d.ts +2 -2
- package/es/watermark/src/Watermark.d.ts +7 -7
- package/lib/_internal/close/src/Close.d.ts +2 -2
- package/lib/_internal/loading/src/Loading.d.ts +1 -1
- package/lib/_internal/safe-top-scrollbar/src/SafeTopScrollbar.d.ts +2 -2
- package/lib/_internal/scrollbar/src/Scrollbar.d.ts +2 -2
- package/lib/_internal/select-menu/src/SelectMenu.d.ts +7 -7
- package/lib/_internal/selection/src/Selection.d.ts +13 -13
- package/lib/_internal/skeleton/src/Skeleton.d.ts +1 -1
- package/lib/_internal/typography/index.d.ts +1 -0
- package/lib/_internal/typography/src/text.d.ts +42 -3
- package/lib/_internal/typography/src/text.js +18 -5
- package/lib/_internal/typography/src/variants.d.ts +105 -4
- package/lib/_internal/typography/src/variants.js +87 -43
- package/lib/_internal/typography/styles/dark.js +2 -2
- package/lib/_internal/typography/styles/light.d.ts +1 -1
- package/lib/_internal/typography/styles/light.js +2 -2
- package/lib/affix/src/Affix.d.ts +3 -3
- package/lib/alert/src/Alert.d.ts +3 -3
- package/lib/anchor/src/AnchorAdapter.d.ts +5 -5
- package/lib/auto-complete/src/AutoComplete.d.ts +3 -3
- package/lib/avatar/src/Avatar.d.ts +1 -1
- package/lib/avatar-group/src/AvatarGroup.d.ts +1 -1
- package/lib/back-top/src/BackTop.d.ts +1 -1
- package/lib/badge/src/Badge.d.ts +1 -1
- package/lib/button/src/Button.d.ts +7 -7
- package/lib/card/src/Card.d.ts +3 -3
- package/lib/card-list/src/CardList.d.ts +2 -2
- package/lib/card-list/src/CardListItem.d.ts +1 -1
- package/lib/carousel/src/Carousel.d.ts +8 -8
- package/lib/carousel/src/CarouselDots.d.ts +2 -2
- package/lib/cascader/src/Cascader.d.ts +12 -12
- package/lib/cascader/src/CascaderMenu.d.ts +1 -1
- package/lib/cascader/src/CascaderSelectMenu.d.ts +1 -1
- package/lib/checkbox/src/Checkbox.d.ts +5 -5
- package/lib/code/src/Code.d.ts +1 -1
- package/lib/collapse/src/Collapse.d.ts +1 -1
- package/lib/collapse-transition/src/CollapseTransition.d.ts +1 -1
- package/lib/color-picker/src/ColorPicker.d.ts +3 -3
- package/lib/config-provider/src/ConfigProvider.d.ts +7 -1
- package/lib/config-provider/src/ConfigProvider.js +81 -10
- package/lib/config-provider/src/interface.d.ts +1 -1
- package/lib/config-provider/src/internal-interface.d.ts +198 -34
- package/lib/countdown/src/Countdown.d.ts +1 -1
- package/lib/create.js +34 -3
- package/lib/data-table/src/DataTable.d.ts +6 -6
- package/lib/data-table/src/HeaderButton/RenderFilter.d.ts +1 -1
- package/lib/date-picker/src/DatePicker.d.ts +4 -4
- package/lib/date-picker/src/panel/date.d.ts +1 -1
- package/lib/date-picker/src/panel/daterange.d.ts +1 -1
- package/lib/date-picker/src/panel/datetime.d.ts +1 -1
- package/lib/date-picker/src/panel/datetimerange.d.ts +1 -1
- package/lib/date-picker/src/panel/panelMonth.d.ts +9 -9
- package/lib/date-picker/src/panel/panelMonthContent.d.ts +1 -1
- package/lib/date-picker/src/panel/panelYear.d.ts +9 -9
- package/lib/date-picker/src/panel/panelYearContent.d.ts +1 -1
- package/lib/descriptions/src/Descriptions.d.ts +3 -3
- package/lib/dialog/src/Dialog.d.ts +1 -1
- package/lib/dialog/src/DialogEnvironment.d.ts +3 -3
- package/lib/dialog/src/DialogProvider.d.ts +29 -29
- package/lib/dialog/src/dialogProps.d.ts +1 -1
- package/lib/drawer/src/Drawer.d.ts +7 -7
- package/lib/drawer/src/DrawerBodyWrapper.d.ts +2 -2
- package/lib/dropdown/src/Dropdown.d.ts +15 -15
- package/lib/dropdown/src/DropdownMenu.d.ts +2 -2
- package/lib/dropdown/src/DropdownOption.d.ts +1 -1
- package/lib/dynamic-input/src/DynamicInput.d.ts +1 -1
- package/lib/dynamic-tags/src/DynamicTags.d.ts +2 -2
- package/lib/empty/src/Empty.d.ts +1 -1
- package/lib/flex/src/Flex.d.ts +1 -1
- package/lib/form/src/FormItem.d.ts +3 -3
- package/lib/form/src/FormItemCol.d.ts +2 -2
- package/lib/form/src/FormItemGridItem.d.ts +2 -2
- package/lib/form/src/FormItemRow.d.ts +2 -2
- package/lib/form/src/utils.d.ts +1 -1
- package/lib/gradient-text/src/GradientText.d.ts +2 -2
- package/lib/grid/src/Grid.d.ts +4 -4
- package/lib/header/src/HeaderNavigation.d.ts +1 -1
- package/lib/icon-bar/src/IconBar.d.ts +1 -1
- package/lib/icon-wrapper/src/IconWrapper.d.ts +1 -1
- package/lib/input/src/Input.d.ts +8 -8
- package/lib/input-number/src/InputNumber.d.ts +3 -3
- package/lib/input-otp/src/InputOtp.d.ts +1 -1
- package/lib/layout/src/LayoutSider.d.ts +2 -2
- package/lib/legacy-grid/src/Row.d.ts +1 -1
- package/lib/legacy-transfer/src/Transfer.d.ts +2 -2
- package/lib/list/src/List.d.ts +6 -6
- package/lib/list/src/ListItem.d.ts +4 -4
- package/lib/log/src/Log.d.ts +2 -2
- package/lib/mention/src/Mention.d.ts +3 -3
- package/lib/menu/src/Menu.d.ts +5 -5
- package/lib/menu/src/MenuOption.d.ts +1 -1
- package/lib/menu/src/MenuOptionContent.d.ts +1 -1
- package/lib/menu/src/MenuOptionGroup.d.ts +1 -1
- package/lib/menu/src/Submenu.d.ts +1 -1
- package/lib/message/src/MessageProvider.d.ts +1 -1
- package/lib/modal/src/BodyWrapper.d.ts +3 -3
- package/lib/modal/src/Modal.d.ts +6 -6
- package/lib/modal/src/presetProps.d.ts +1 -1
- package/lib/modal-fullscreen/src/ModalFull.d.ts +2 -2
- package/lib/notification/src/Notification.d.ts +2 -2
- package/lib/notification/src/NotificationEnvironment.d.ts +1 -1
- package/lib/notification/src/NotificationProvider.d.ts +9 -9
- package/lib/number-animation/src/NumberAnimation.d.ts +2 -2
- package/lib/pagination/src/Pagination.d.ts +1 -1
- package/lib/popconfirm/src/Popconfirm.d.ts +8 -8
- package/lib/popover/src/Popover.d.ts +8 -8
- package/lib/popover/src/PopoverBody.d.ts +2 -2
- package/lib/popselect/src/Popselect.d.ts +81 -81
- package/lib/popselect/src/PopselectPanel.d.ts +4 -4
- package/lib/progress/src/Circle.d.ts +1 -1
- package/lib/progress/src/MultipleCircle.d.ts +1 -1
- package/lib/progress/src/Progress.d.ts +4 -4
- package/lib/qr-code/src/QrCode.d.ts +2 -2
- package/lib/radio/src/Radio.d.ts +1 -1
- package/lib/rate/src/Rate.d.ts +3 -3
- package/lib/result/src/Result.d.ts +1 -1
- package/lib/select/src/Select.d.ts +19 -19
- package/lib/skeleton/src/Skeleton.d.ts +1 -1
- package/lib/slider/src/Slider.d.ts +4 -4
- package/lib/space/src/Space.d.ts +1 -1
- package/lib/spin/src/Spin.d.ts +2 -2
- package/lib/steps/src/Steps.d.ts +1 -1
- package/lib/switch/src/Switch.d.ts +1 -1
- package/lib/tabs/src/Tab.d.ts +1 -1
- package/lib/tabs/src/Tabs.d.ts +4 -4
- package/lib/tag/src/Tag.d.ts +2 -2
- package/lib/tag/src/TagGroup.d.ts +1 -1
- package/lib/time/src/Time.d.ts +1 -1
- package/lib/time-picker/src/Panel.d.ts +1 -1
- package/lib/time-picker/src/TimePicker.d.ts +5 -5
- package/lib/timeline/src/TimelineItem.d.ts +1 -1
- package/lib/tooltip/src/Tooltip.d.ts +8 -8
- package/lib/transfer/src/Transfer.d.ts +3 -3
- package/lib/tree/src/Tree.d.ts +18 -18
- package/lib/tree/src/TreeNodeCheckbox.d.ts +1 -1
- package/lib/tree-select/src/TreeSelect.d.ts +15 -15
- package/lib/typography/index.d.ts +1 -0
- package/lib/typography/src/create-header.d.ts +1 -1
- package/lib/typography/src/headers.d.ts +6 -6
- package/lib/typography/src/text.d.ts +44 -5
- package/lib/upload/src/Upload.d.ts +11 -11
- package/lib/upload/src/UploadFile.d.ts +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/virtual-list/src/VirtualList.d.ts +2 -2
- package/lib/watermark/src/Watermark.d.ts +7 -7
- package/package.json +1 -1
- package/web-types.json +59 -2
|
@@ -30,6 +30,8 @@ exports.configProviderProps = {
|
|
|
30
30
|
componentOptions: Object,
|
|
31
31
|
icons: Object,
|
|
32
32
|
breakpoints: Object,
|
|
33
|
+
breakpointProps: Object,
|
|
34
|
+
breakpointThemeOverrides: Object,
|
|
33
35
|
preflightStyleDisabled: Boolean,
|
|
34
36
|
inlineThemeDisabled: {
|
|
35
37
|
type: Boolean,
|
|
@@ -62,26 +64,51 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
62
64
|
? theme
|
|
63
65
|
: Object.assign({}, inheritedTheme, theme);
|
|
64
66
|
});
|
|
67
|
+
const getActiveBreakpointValue = (breakpointMap) => {
|
|
68
|
+
if (!breakpointMap || !_utils_1.isBrowser) {
|
|
69
|
+
return undefined;
|
|
70
|
+
}
|
|
71
|
+
const currentWidth = windowWidthRef.value;
|
|
72
|
+
const breakpointWidths = Object.keys(breakpointMap)
|
|
73
|
+
.map(Number)
|
|
74
|
+
.filter((width) => width <= currentWidth)
|
|
75
|
+
.sort((a, b) => b - a);
|
|
76
|
+
if (breakpointWidths.length === 0) {
|
|
77
|
+
return undefined;
|
|
78
|
+
}
|
|
79
|
+
const activeBreakpoint = breakpointWidths[0];
|
|
80
|
+
return breakpointMap[activeBreakpoint];
|
|
81
|
+
};
|
|
82
|
+
const activeBreakPointThemeOverridesRef = (0, vue_1.computed)(() => {
|
|
83
|
+
const { breakpointThemeOverrides } = props;
|
|
84
|
+
const breakpointThemeOverridesToUse = breakpointThemeOverrides !== null && breakpointThemeOverrides !== void 0 ? breakpointThemeOverrides : UConfigProvider === null || UConfigProvider === void 0 ? void 0 : UConfigProvider.mergedBreakpointThemeOverridesRef.value;
|
|
85
|
+
return getActiveBreakpointValue(breakpointThemeOverridesToUse);
|
|
86
|
+
});
|
|
65
87
|
const mergedThemeOverridesRef = (0, vue_1.computed)(() => {
|
|
66
88
|
const { themeOverrides } = props;
|
|
67
|
-
// stop inheriting themeOverrides
|
|
68
89
|
if (themeOverrides === null)
|
|
69
90
|
return undefined;
|
|
70
|
-
|
|
91
|
+
let baseThemeOverrides;
|
|
71
92
|
if (themeOverrides === undefined) {
|
|
72
|
-
|
|
93
|
+
baseThemeOverrides = UConfigProvider === null || UConfigProvider === void 0 ? void 0 : UConfigProvider.mergedThemeOverridesRef.value;
|
|
73
94
|
}
|
|
74
95
|
else {
|
|
75
96
|
const inheritedThemeOverrides = UConfigProvider === null || UConfigProvider === void 0 ? void 0 : UConfigProvider.mergedThemeOverridesRef.value;
|
|
76
97
|
if (inheritedThemeOverrides === undefined) {
|
|
77
|
-
|
|
78
|
-
return themeOverrides;
|
|
98
|
+
baseThemeOverrides = themeOverrides;
|
|
79
99
|
}
|
|
80
100
|
else {
|
|
81
|
-
|
|
82
|
-
return (0, lodash_1.merge)({}, inheritedThemeOverrides, themeOverrides);
|
|
101
|
+
baseThemeOverrides = (0, lodash_1.merge)({}, inheritedThemeOverrides, themeOverrides);
|
|
83
102
|
}
|
|
84
103
|
}
|
|
104
|
+
const activeBreakPointThemeOverrides = activeBreakPointThemeOverridesRef.value;
|
|
105
|
+
if (!activeBreakPointThemeOverrides) {
|
|
106
|
+
return baseThemeOverrides;
|
|
107
|
+
}
|
|
108
|
+
if (!baseThemeOverrides) {
|
|
109
|
+
return activeBreakPointThemeOverrides;
|
|
110
|
+
}
|
|
111
|
+
return (0, lodash_1.merge)({}, baseThemeOverrides, activeBreakPointThemeOverrides);
|
|
85
112
|
});
|
|
86
113
|
const mergedNamespaceRef = (0, vooks_1.useMemo)(() => {
|
|
87
114
|
const { namespace } = props;
|
|
@@ -99,11 +126,41 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
99
126
|
const { icons } = props;
|
|
100
127
|
return icons === undefined ? UConfigProvider === null || UConfigProvider === void 0 ? void 0 : UConfigProvider.mergedIconsRef.value : icons;
|
|
101
128
|
});
|
|
129
|
+
const windowWidthRef = (0, vue_1.ref)(_utils_1.isBrowser ? window.innerWidth : 1920);
|
|
130
|
+
const updateWindowWidth = () => {
|
|
131
|
+
if (_utils_1.isBrowser) {
|
|
132
|
+
windowWidthRef.value = window.innerWidth;
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
(0, vue_1.onMounted)(() => {
|
|
136
|
+
if (_utils_1.isBrowser) {
|
|
137
|
+
windowWidthRef.value = window.innerWidth;
|
|
138
|
+
window.addEventListener('resize', updateWindowWidth);
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
(0, vue_1.onBeforeUnmount)(() => {
|
|
142
|
+
if (_utils_1.isBrowser) {
|
|
143
|
+
window.removeEventListener('resize', updateWindowWidth);
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
const activeBreakPointPropsRef = (0, vue_1.computed)(() => {
|
|
147
|
+
const { breakpointProps } = props;
|
|
148
|
+
const breakpointPropsToUse = breakpointProps !== null && breakpointProps !== void 0 ? breakpointProps : UConfigProvider === null || UConfigProvider === void 0 ? void 0 : UConfigProvider.mergedBreakpointPropsRef.value;
|
|
149
|
+
return getActiveBreakpointValue(breakpointPropsToUse);
|
|
150
|
+
});
|
|
102
151
|
const mergedComponentPropsRef = (0, vue_1.computed)(() => {
|
|
103
152
|
const { componentOptions } = props;
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
153
|
+
const baseComponentOptions = componentOptions !== undefined
|
|
154
|
+
? componentOptions
|
|
155
|
+
: UConfigProvider === null || UConfigProvider === void 0 ? void 0 : UConfigProvider.mergedComponentPropsRef.value;
|
|
156
|
+
const activeBreakPointProps = activeBreakPointPropsRef.value;
|
|
157
|
+
if (!activeBreakPointProps) {
|
|
158
|
+
return baseComponentOptions;
|
|
159
|
+
}
|
|
160
|
+
if (!baseComponentOptions) {
|
|
161
|
+
return activeBreakPointProps;
|
|
162
|
+
}
|
|
163
|
+
return (0, lodash_1.merge)({}, baseComponentOptions, activeBreakPointProps);
|
|
107
164
|
});
|
|
108
165
|
const mergedClsPrefixRef = (0, vue_1.computed)(() => {
|
|
109
166
|
const { clsPrefix } = props;
|
|
@@ -133,6 +190,18 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
133
190
|
const mergedBreakpointsRef = (0, vue_1.computed)(() => {
|
|
134
191
|
return props.breakpoints || (UConfigProvider === null || UConfigProvider === void 0 ? void 0 : UConfigProvider.mergedBreakpointsRef.value);
|
|
135
192
|
});
|
|
193
|
+
const mergedBreakpointPropsRef = (0, vue_1.computed)(() => {
|
|
194
|
+
const { breakpointProps } = props;
|
|
195
|
+
return breakpointProps !== undefined
|
|
196
|
+
? breakpointProps
|
|
197
|
+
: UConfigProvider === null || UConfigProvider === void 0 ? void 0 : UConfigProvider.mergedBreakpointPropsRef.value;
|
|
198
|
+
});
|
|
199
|
+
const mergedBreakpointThemeOverridesRef = (0, vue_1.computed)(() => {
|
|
200
|
+
const { breakpointThemeOverrides } = props;
|
|
201
|
+
return breakpointThemeOverrides !== undefined
|
|
202
|
+
? breakpointThemeOverrides
|
|
203
|
+
: UConfigProvider === null || UConfigProvider === void 0 ? void 0 : UConfigProvider.mergedBreakpointThemeOverridesRef.value;
|
|
204
|
+
});
|
|
136
205
|
const inlineThemeDisabled = props.inlineThemeDisabled || (UConfigProvider === null || UConfigProvider === void 0 ? void 0 : UConfigProvider.inlineThemeDisabled);
|
|
137
206
|
const preflightStyleDisabled = props.preflightStyleDisabled || (UConfigProvider === null || UConfigProvider === void 0 ? void 0 : UConfigProvider.preflightStyleDisabled);
|
|
138
207
|
const mergedThemeHashRef = (0, vue_1.computed)(() => {
|
|
@@ -159,6 +228,8 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
159
228
|
mergedRtlRef,
|
|
160
229
|
mergedIconsRef,
|
|
161
230
|
mergedComponentPropsRef,
|
|
231
|
+
mergedBreakpointPropsRef,
|
|
232
|
+
mergedBreakpointThemeOverridesRef,
|
|
162
233
|
mergedBorderedRef,
|
|
163
234
|
mergedNamespaceRef,
|
|
164
235
|
mergedClsPrefixRef,
|
|
@@ -13,4 +13,4 @@ export type GlobalThemeOverrides = {
|
|
|
13
13
|
} & {
|
|
14
14
|
[key in keyof GlobalThemeWithoutCommon]?: ExtractThemeOverrides<GlobalThemeWithoutCommon[key]>;
|
|
15
15
|
};
|
|
16
|
-
export type { GlobalIconConfig, GlobalComponentConfig } from './internal-interface';
|
|
16
|
+
export type { GlobalIconConfig, GlobalComponentConfig, BreakpointProps, BreakpointThemeOverrides } from './internal-interface';
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import type { VNodeChild, Ref } from 'vue';
|
|
2
2
|
import type { CNode } from 'css-render';
|
|
3
|
+
import type { Hljs } from '../../_mixins';
|
|
4
|
+
import type { UDateLocale, ULocale } from '../../locales';
|
|
5
|
+
import type { GlobalTheme, GlobalThemeOverrides } from './interface';
|
|
6
|
+
import type { Katex } from './katex';
|
|
7
|
+
import type { AccountOptionTheme } from '../../_internal/account-option/styles';
|
|
8
|
+
import type { InternalSelectMenuTheme } from '../../_internal/select-menu/styles';
|
|
9
|
+
import type { InternalSelectionTheme } from '../../_internal/selection/styles';
|
|
10
|
+
import type { ScrollbarTheme } from '../../_internal/scrollbar/styles';
|
|
11
|
+
import type { ActionCardTheme } from '../../action-card/styles';
|
|
3
12
|
import type { AlertTheme } from '../../alert/styles';
|
|
4
13
|
import type { AnchorTheme } from '../../anchor/styles';
|
|
5
14
|
import type { AutoCompleteTheme } from '../../auto-complete/styles';
|
|
@@ -9,13 +18,16 @@ import type { BackTopTheme } from '../../back-top/styles';
|
|
|
9
18
|
import type { BadgeTheme } from '../../badge/styles';
|
|
10
19
|
import type { BreadcrumbTheme } from '../../breadcrumb/styles';
|
|
11
20
|
import type { ButtonTheme } from '../../button/styles';
|
|
21
|
+
import type { ButtonGroupTheme } from '../../button-group/styles/light';
|
|
12
22
|
import type { CalendarTheme } from '../../calendar/styles';
|
|
13
23
|
import type { CardTheme } from '../../card/styles';
|
|
24
|
+
import type { CardListTheme } from '../../card-list/styles';
|
|
14
25
|
import type { CarouselTheme } from '../../carousel/styles';
|
|
15
26
|
import type { CascaderTheme } from '../../cascader/styles';
|
|
16
27
|
import type { CheckboxTheme } from '../../checkbox/styles';
|
|
17
28
|
import type { CodeTheme } from '../../code/styles';
|
|
18
29
|
import type { CollapseTheme } from '../../collapse/styles';
|
|
30
|
+
import type { CollapseTransitionTheme } from '../../collapse-transition/styles';
|
|
19
31
|
import type { ColorPickerTheme } from '../../color-picker/styles';
|
|
20
32
|
import type { DataTableTheme } from '../../data-table/styles';
|
|
21
33
|
import type { DatePickerTheme } from '../../date-picker/styles';
|
|
@@ -30,6 +42,7 @@ import type { ElementTheme } from '../../element/styles';
|
|
|
30
42
|
import type { EllipsisTheme } from '../../ellipsis/styles';
|
|
31
43
|
import type { EmptyTheme } from '../../empty/styles';
|
|
32
44
|
import type { EquationTheme } from '../../equation/styles';
|
|
45
|
+
import type { FlexTheme } from '../../flex/styles';
|
|
33
46
|
import type { FormTheme } from '../../form/styles';
|
|
34
47
|
import type { GradientTextTheme } from '../../gradient-text/styles';
|
|
35
48
|
import type { IconTheme } from '../../icon/styles';
|
|
@@ -57,7 +70,7 @@ import type { ProgressTheme } from '../../progress/styles';
|
|
|
57
70
|
import type { RadioTheme } from '../../radio/styles';
|
|
58
71
|
import type { RateTheme } from '../../rate/styles';
|
|
59
72
|
import type { ResultTheme } from '../../result/styles';
|
|
60
|
-
import type {
|
|
73
|
+
import type { RowTheme } from '../../legacy-grid/styles';
|
|
61
74
|
import type { SelectTheme } from '../../select/styles';
|
|
62
75
|
import type { SkeletonTheme } from '../../skeleton/styles';
|
|
63
76
|
import type { SliderTheme } from '../../slider/styles';
|
|
@@ -73,6 +86,7 @@ import type { TagTheme } from '../../tag/styles';
|
|
|
73
86
|
import type { ThingTheme } from '../../thing/styles';
|
|
74
87
|
import type { TimePickerTheme } from '../../time-picker/styles';
|
|
75
88
|
import type { TimelineTheme } from '../../timeline/styles';
|
|
89
|
+
import type { ToggleButtonTheme } from '../../toggle-button/styles';
|
|
76
90
|
import type { TooltipTheme } from '../../tooltip/styles';
|
|
77
91
|
import type { TransferTheme } from '../../transfer/styles';
|
|
78
92
|
import type { TreeTheme } from '../../tree/styles';
|
|
@@ -80,32 +94,98 @@ import type { TreeSelectTheme } from '../../tree-select/styles';
|
|
|
80
94
|
import type { TypographyTheme } from '../../typography/styles';
|
|
81
95
|
import type { UploadTheme } from '../../upload/styles';
|
|
82
96
|
import type { WatermarkTheme } from '../../watermark/styles';
|
|
83
|
-
import type {
|
|
84
|
-
import type {
|
|
85
|
-
import type {
|
|
86
|
-
import type {
|
|
87
|
-
import type {
|
|
88
|
-
import type {
|
|
89
|
-
import type {
|
|
97
|
+
import type { ChatTheme } from '../../chat/styles';
|
|
98
|
+
import type { ActionCardProps } from '../../action-card';
|
|
99
|
+
import type { AlertProps } from '../../alert';
|
|
100
|
+
import type { AnchorProps } from '../../anchor';
|
|
101
|
+
import type { AutoCompleteProps } from '../../auto-complete';
|
|
102
|
+
import type { AvatarProps } from '../../avatar';
|
|
103
|
+
import type { AvatarGroupProps } from '../../avatar-group';
|
|
104
|
+
import type { BackTopProps } from '../../back-top';
|
|
105
|
+
import type { BadgeProps } from '../../badge';
|
|
106
|
+
import type { BreadcrumbProps } from '../../breadcrumb';
|
|
107
|
+
import type { ButtonProps } from '../../button';
|
|
90
108
|
import type { Size as ButtonSize } from '../../button/src/interface';
|
|
91
|
-
import type {
|
|
92
|
-
import type {
|
|
93
|
-
import type {
|
|
109
|
+
import type { ButtonGroupProps } from '../../button-group';
|
|
110
|
+
import type { CalendarProps } from '../../calendar';
|
|
111
|
+
import type { CardProps } from '../../card';
|
|
112
|
+
import type { CardListProps } from '../../card-list';
|
|
113
|
+
import type { CarouselProps } from '../../carousel';
|
|
114
|
+
import type { CascaderProps } from '../../cascader';
|
|
115
|
+
import type { CheckboxProps } from '../../checkbox';
|
|
116
|
+
import type { CodeProps } from '../../code';
|
|
117
|
+
import type { CollapseProps } from '../../collapse';
|
|
118
|
+
import type { CollapseTransitionProps } from '../../collapse-transition';
|
|
119
|
+
import type { ColorPickerProps } from '../../color-picker';
|
|
120
|
+
import type { DataTableProps, DataTableRenderFilter, DataTableRenderSorter } from '../../data-table';
|
|
121
|
+
import type { DatePickerProps } from '../../date-picker';
|
|
122
|
+
import type { DescriptionsProps } from '../../descriptions';
|
|
123
|
+
import type { DialogProps } from '../../dialog';
|
|
124
|
+
import type { DividerProps } from '../../divider';
|
|
125
|
+
import type { DrawerProps } from '../../drawer';
|
|
126
|
+
import type { DropdownProps } from '../../dropdown';
|
|
127
|
+
import type { DynamicInputProps } from '../../dynamic-input';
|
|
128
|
+
import type { DynamicTagsProps } from '../../dynamic-tags';
|
|
129
|
+
import type { ElementProps } from '../../element';
|
|
130
|
+
import type { EllipsisProps } from '../../ellipsis';
|
|
94
131
|
import type { EmptyProps } from '../../empty';
|
|
95
|
-
import
|
|
96
|
-
import type {
|
|
97
|
-
import type {
|
|
98
|
-
import type {
|
|
99
|
-
import type {
|
|
100
|
-
import type {
|
|
101
|
-
import type {
|
|
102
|
-
import {
|
|
103
|
-
import {
|
|
104
|
-
import {
|
|
132
|
+
import { IconBarTheme } from '../../icon-bar/styles';
|
|
133
|
+
import type { FlexProps } from '../../flex';
|
|
134
|
+
import type { FormProps } from '../../form';
|
|
135
|
+
import type { GradientTextProps } from '../../gradient-text';
|
|
136
|
+
import type { IconProps } from '../../icon';
|
|
137
|
+
import type { IconWrapperProps } from '../../icon-wrapper';
|
|
138
|
+
import type { ImageProps } from '../../image';
|
|
139
|
+
import type { InputProps, InputSize } from '../../input';
|
|
140
|
+
import type { InputNumberProps } from '../../input-number';
|
|
141
|
+
import type { InputOtpProps } from '../../input-otp';
|
|
142
|
+
import type { LayoutProps } from '../../layout';
|
|
143
|
+
import type { ListProps } from '../../list';
|
|
144
|
+
import type { LogProps } from '../../log';
|
|
145
|
+
import type { MenuProps } from '../../menu';
|
|
146
|
+
import type { MentionProps } from '../../mention';
|
|
147
|
+
import type { ModalProps } from '../../modal';
|
|
148
|
+
import type { PageHeaderProps } from '../../page-header';
|
|
149
|
+
import type { PaginationProps } from '../../pagination';
|
|
150
|
+
import type { PopconfirmProps } from '../../popconfirm';
|
|
151
|
+
import type { PopoverProps } from '../../popover';
|
|
152
|
+
import type { PopselectProps } from '../../popselect';
|
|
153
|
+
import type { ProgressProps } from '../../progress';
|
|
154
|
+
import type { RadioProps } from '../../radio';
|
|
155
|
+
import type { RateProps } from '../../rate';
|
|
156
|
+
import type { ResultProps } from '../../result';
|
|
157
|
+
import type { RowProps } from '../../legacy-grid';
|
|
158
|
+
import type { SelectProps } from '../../select';
|
|
159
|
+
import type { SkeletonProps } from '../../skeleton';
|
|
160
|
+
import type { SliderProps } from '../../slider';
|
|
161
|
+
import type { SpaceProps } from '../../space';
|
|
162
|
+
import type { SpinProps } from '../../spin';
|
|
163
|
+
import type { StatisticProps } from '../../statistic';
|
|
164
|
+
import type { StatusProps } from '../../status';
|
|
165
|
+
import type { StepsProps } from '../../steps';
|
|
166
|
+
import type { SwitchProps } from '../../switch';
|
|
167
|
+
import type { TableProps } from '../../table';
|
|
168
|
+
import type { TabsProps } from '../../tabs';
|
|
169
|
+
import type { TagProps } from '../../tag';
|
|
170
|
+
import type { ThingProps } from '../../thing';
|
|
171
|
+
import type { TimePickerProps } from '../../time-picker';
|
|
172
|
+
import type { Size as TimePickerSize } from '../../time-picker/src/interface';
|
|
173
|
+
import type { TimelineProps } from '../../timeline';
|
|
174
|
+
import type { ToggleButtonProps } from '../../toggle-button';
|
|
175
|
+
import type { TooltipProps } from '../../tooltip';
|
|
176
|
+
import type { TransferProps } from '../../transfer';
|
|
177
|
+
import type { TreeProps } from '../../tree';
|
|
178
|
+
import type { TreeSelectProps } from '../../tree-select';
|
|
179
|
+
import type { UploadProps } from '../../upload';
|
|
180
|
+
import type { WatermarkProps } from '../../watermark';
|
|
181
|
+
import type { ChatProps } from '../../chat';
|
|
182
|
+
import type { ScrollbarProps } from '../../scrollbar';
|
|
183
|
+
import type { TextProps } from '../../typography';
|
|
184
|
+
import { SelectSize } from '../../_internal/selection';
|
|
185
|
+
import { IconPlacement } from '../../dialog/src/interface';
|
|
105
186
|
import { ModalFullscreenTheme } from '../../modal-fullscreen/styles';
|
|
106
187
|
import { CropTheme } from '../../crop/styles';
|
|
107
188
|
import { SafeTopScrollbarTheme } from '../../_internal/safe-top-scrollbar/styles';
|
|
108
|
-
import { IconBarTheme } from '../../icon-bar/styles';
|
|
109
189
|
import { HeaderTheme } from '../../header/styles';
|
|
110
190
|
import { QrCodeTheme } from '../../qr-code/styles';
|
|
111
191
|
export interface GlobalThemeWithoutCommon {
|
|
@@ -160,7 +240,10 @@ export interface GlobalThemeWithoutCommon {
|
|
|
160
240
|
Modal?: ModalTheme;
|
|
161
241
|
Notification?: NotificationTheme;
|
|
162
242
|
PageHeader?: PageHeaderTheme;
|
|
163
|
-
Pagination?: PaginationTheme
|
|
243
|
+
Pagination?: PaginationTheme & {
|
|
244
|
+
inputSize?: InputSize;
|
|
245
|
+
selectSize?: SelectSize;
|
|
246
|
+
};
|
|
164
247
|
Popconfirm?: PopconfirmTheme;
|
|
165
248
|
Popover?: PopoverTheme;
|
|
166
249
|
Popselect?: PopselectTheme;
|
|
@@ -208,24 +291,101 @@ export interface GlobalThemeWithoutCommon {
|
|
|
208
291
|
Header?: HeaderTheme;
|
|
209
292
|
}
|
|
210
293
|
export interface GlobalComponentConfig {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
294
|
+
Alert?: AlertProps;
|
|
295
|
+
Anchor?: AnchorProps;
|
|
296
|
+
AutoComplete?: AutoCompleteProps;
|
|
297
|
+
Avatar?: AvatarProps;
|
|
298
|
+
AvatarGroup?: AvatarGroupProps;
|
|
299
|
+
BackTop?: BackTopProps;
|
|
300
|
+
Badge?: BadgeProps;
|
|
301
|
+
Breadcrumb?: BreadcrumbProps;
|
|
302
|
+
Button?: ButtonProps;
|
|
303
|
+
ButtonGroup?: ButtonGroupProps;
|
|
304
|
+
Calendar?: CalendarProps;
|
|
305
|
+
ActionCard?: ActionCardProps;
|
|
306
|
+
Card?: CardProps;
|
|
307
|
+
Carousel?: CarouselProps;
|
|
308
|
+
Cascader?: CascaderProps;
|
|
309
|
+
Checkbox?: CheckboxProps;
|
|
310
|
+
Code?: CodeProps;
|
|
311
|
+
Collapse?: CollapseProps;
|
|
312
|
+
CollapseTransition?: CollapseTransitionProps;
|
|
313
|
+
ColorPicker?: ColorPickerProps;
|
|
314
|
+
DataTable?: DataTableProps & {
|
|
315
|
+
renderFilter?: DataTableRenderFilter;
|
|
316
|
+
renderSorter?: DataTableRenderSorter;
|
|
214
317
|
};
|
|
215
|
-
DatePicker?: {
|
|
318
|
+
DatePicker?: DatePickerProps & {
|
|
216
319
|
timePickerSize?: TimePickerSize;
|
|
217
320
|
};
|
|
218
|
-
|
|
321
|
+
Descriptions?: DescriptionsProps;
|
|
322
|
+
Dialog?: DialogProps & {
|
|
219
323
|
iconPlacement?: IconPlacement;
|
|
220
324
|
};
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
DynamicInput?: {
|
|
325
|
+
Divider?: DividerProps;
|
|
326
|
+
Drawer?: DrawerProps;
|
|
327
|
+
Dropdown?: DropdownProps;
|
|
328
|
+
DynamicInput?: DynamicInputProps & {
|
|
226
329
|
buttonSize?: ButtonSize;
|
|
227
330
|
};
|
|
228
|
-
|
|
331
|
+
DynamicTags?: DynamicTagsProps;
|
|
332
|
+
Element?: ElementProps;
|
|
333
|
+
Ellipsis?: EllipsisProps;
|
|
334
|
+
Empty?: EmptyProps;
|
|
335
|
+
Form?: FormProps;
|
|
336
|
+
GradientText?: GradientTextProps;
|
|
337
|
+
Icon?: IconProps;
|
|
338
|
+
IconWrapper?: IconWrapperProps;
|
|
339
|
+
Image?: ImageProps;
|
|
340
|
+
Input?: InputProps;
|
|
341
|
+
InputNumber?: InputNumberProps;
|
|
342
|
+
Layout?: LayoutProps;
|
|
343
|
+
List?: ListProps;
|
|
344
|
+
Log?: LogProps;
|
|
345
|
+
Menu?: MenuProps;
|
|
346
|
+
Mention?: MentionProps;
|
|
347
|
+
Modal?: ModalProps;
|
|
348
|
+
PageHeader?: PageHeaderProps;
|
|
349
|
+
Pagination?: PaginationProps & {
|
|
350
|
+
inputSize?: InputSize;
|
|
351
|
+
selectSize?: SelectSize;
|
|
352
|
+
};
|
|
353
|
+
Popconfirm?: PopconfirmProps;
|
|
354
|
+
Popover?: PopoverProps;
|
|
355
|
+
Popselect?: PopselectProps;
|
|
356
|
+
Progress?: ProgressProps;
|
|
357
|
+
Radio?: RadioProps;
|
|
358
|
+
Rate?: RateProps;
|
|
359
|
+
Result?: ResultProps;
|
|
360
|
+
Scrollbar?: ScrollbarProps;
|
|
361
|
+
Select?: SelectProps;
|
|
362
|
+
Skeleton?: SkeletonProps;
|
|
363
|
+
Slider?: SliderProps;
|
|
364
|
+
Space?: SpaceProps;
|
|
365
|
+
Spin?: SpinProps;
|
|
366
|
+
Statistic?: StatisticProps;
|
|
367
|
+
Status?: StatusProps;
|
|
368
|
+
Steps?: StepsProps;
|
|
369
|
+
Switch?: SwitchProps;
|
|
370
|
+
Table?: TableProps;
|
|
371
|
+
Tabs?: TabsProps;
|
|
372
|
+
Tag?: TagProps;
|
|
373
|
+
Thing?: ThingProps;
|
|
374
|
+
TimePicker?: TimePickerProps;
|
|
375
|
+
Timeline?: TimelineProps;
|
|
376
|
+
Tooltip?: TooltipProps;
|
|
377
|
+
Transfer?: TransferProps;
|
|
378
|
+
Tree?: TreeProps;
|
|
379
|
+
TreeSelect?: TreeSelectProps;
|
|
380
|
+
Upload?: UploadProps;
|
|
381
|
+
Watermark?: WatermarkProps;
|
|
382
|
+
Row?: RowProps;
|
|
383
|
+
ToggleButton?: ToggleButtonProps;
|
|
384
|
+
Flex?: FlexProps;
|
|
385
|
+
CardList?: CardListProps;
|
|
386
|
+
Chat?: ChatProps;
|
|
387
|
+
Text?: TextProps;
|
|
388
|
+
InputOtp?: InputOtpProps;
|
|
229
389
|
}
|
|
230
390
|
export interface GlobalIconConfig {
|
|
231
391
|
attach?: () => VNodeChild;
|
|
@@ -267,6 +427,8 @@ export interface RtlItem {
|
|
|
267
427
|
export type RtlProp = RtlItem[];
|
|
268
428
|
export type RtlEnabledState = Partial<Record<keyof GlobalThemeWithoutCommon, RtlItem>>;
|
|
269
429
|
export type Breakpoints = Record<string, number> | undefined;
|
|
430
|
+
export type BreakpointProps = Record<number, GlobalComponentConfig> | undefined;
|
|
431
|
+
export type BreakpointThemeOverrides = Record<number, GlobalThemeOverrides> | undefined;
|
|
270
432
|
export interface ConfigProviderInjection {
|
|
271
433
|
mergedBreakpointsRef: Ref<Breakpoints | undefined>;
|
|
272
434
|
mergedClsPrefixRef: Ref<string>;
|
|
@@ -282,6 +444,8 @@ export interface ConfigProviderInjection {
|
|
|
282
444
|
mergedThemeOverridesRef: Ref<GlobalThemeOverrides | undefined>;
|
|
283
445
|
mergedRtlRef: Ref<RtlEnabledState | undefined>;
|
|
284
446
|
mergedThemeHashRef: Ref<string>;
|
|
447
|
+
mergedBreakpointPropsRef: Ref<BreakpointProps | undefined>;
|
|
448
|
+
mergedBreakpointThemeOverridesRef: Ref<BreakpointThemeOverrides | undefined>;
|
|
285
449
|
inlineThemeDisabled: boolean;
|
|
286
450
|
preflightStyleDisabled: boolean;
|
|
287
451
|
}
|
|
@@ -61,8 +61,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
61
61
|
render: PropType<(props: CountdownTimeInfo) => VNodeChild>;
|
|
62
62
|
onFinish: PropType<() => void>;
|
|
63
63
|
}>>, {
|
|
64
|
-
active: boolean;
|
|
65
64
|
duration: number;
|
|
66
65
|
precision: 0 | 1 | 2 | 3;
|
|
66
|
+
active: boolean;
|
|
67
67
|
}, {}>;
|
|
68
68
|
export default _default;
|
package/lib/create.js
CHANGED
|
@@ -3,13 +3,44 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const vue_1 = require("vue");
|
|
6
7
|
const version_1 = __importDefault(require("./version"));
|
|
8
|
+
const context_1 = require("./config-provider/src/context");
|
|
7
9
|
function create({ componentPrefix = 'U', components = [] } = {}) {
|
|
8
10
|
const installTargets = [];
|
|
11
|
+
function findConfig(instance) {
|
|
12
|
+
var _a;
|
|
13
|
+
let parent = instance.parent;
|
|
14
|
+
while (parent) {
|
|
15
|
+
const p = (_a = parent.provides) === null || _a === void 0 ? void 0 : _a[context_1.configProviderInjectionKey];
|
|
16
|
+
if (p)
|
|
17
|
+
return p;
|
|
18
|
+
parent = parent.parent;
|
|
19
|
+
}
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
function wrap(component) {
|
|
23
|
+
const wrapped = {
|
|
24
|
+
name: component.name,
|
|
25
|
+
inheritAttrs: false,
|
|
26
|
+
setup(props, ctx) {
|
|
27
|
+
const instance = (0, vue_1.getCurrentInstance)();
|
|
28
|
+
const config = instance ? findConfig(instance) : null;
|
|
29
|
+
const mergedProps = (0, vue_1.computed)(() => {
|
|
30
|
+
var _a, _b;
|
|
31
|
+
if (!config)
|
|
32
|
+
return props;
|
|
33
|
+
const defaults = ((_b = (_a = config.mergedComponentPropsRef) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b[component.name]) || {};
|
|
34
|
+
return Object.assign(Object.assign({}, defaults), props);
|
|
35
|
+
});
|
|
36
|
+
return () => (0, vue_1.h)(component, Object.assign(Object.assign(Object.assign({}, mergedProps.value), ctx.attrs), props), ctx.slots);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
return wrapped;
|
|
40
|
+
}
|
|
9
41
|
function registerComponent(app, name, component) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
app.component(componentPrefix + name, component);
|
|
42
|
+
if (!app.component(componentPrefix + name)) {
|
|
43
|
+
app.component(componentPrefix + name, wrap(component));
|
|
13
44
|
}
|
|
14
45
|
}
|
|
15
46
|
function install(app) {
|
|
@@ -7373,14 +7373,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
7373
7373
|
readonly loading: boolean;
|
|
7374
7374
|
readonly bordered: boolean | undefined;
|
|
7375
7375
|
readonly size: "small" | "medium" | "large";
|
|
7376
|
-
readonly pagination: false | import("../../pagination").PaginationProps;
|
|
7377
7376
|
readonly data: import("./interface").RowData[];
|
|
7378
|
-
readonly virtualScroll: boolean;
|
|
7379
|
-
readonly tableLayout: "auto" | "fixed";
|
|
7380
|
-
readonly columns: import("./interface").TableColumns<any>;
|
|
7381
7377
|
readonly loadingSkeleton: boolean;
|
|
7378
|
+
readonly allowCheckingNotLoaded: boolean;
|
|
7382
7379
|
readonly remote: boolean;
|
|
7380
|
+
readonly cascade: boolean;
|
|
7381
|
+
readonly virtualScroll: boolean;
|
|
7382
|
+
readonly pagination: false | import("../../pagination").PaginationProps;
|
|
7383
7383
|
readonly paginateSinglePage: boolean;
|
|
7384
|
+
readonly columns: import("./interface").TableColumns<any>;
|
|
7384
7385
|
readonly bottomBordered: boolean | undefined;
|
|
7385
7386
|
readonly striped: boolean;
|
|
7386
7387
|
readonly defaultCheckedRowKeys: RowKey[];
|
|
@@ -7389,8 +7390,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
7389
7390
|
readonly defaultExpandedRowKeys: RowKey[];
|
|
7390
7391
|
readonly defaultExpandAll: boolean;
|
|
7391
7392
|
readonly stickyExpandedRows: boolean;
|
|
7392
|
-
readonly
|
|
7393
|
-
readonly cascade: boolean;
|
|
7393
|
+
readonly tableLayout: "auto" | "fixed";
|
|
7394
7394
|
readonly childrenKey: string;
|
|
7395
7395
|
readonly indent: number;
|
|
7396
7396
|
readonly flexHeight: boolean;
|
|
@@ -9111,15 +9111,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
9111
9111
|
readonly type: DatePickerType;
|
|
9112
9112
|
readonly disabled: boolean | undefined;
|
|
9113
9113
|
readonly bordered: boolean | undefined;
|
|
9114
|
-
readonly round: boolean;
|
|
9115
9114
|
readonly to: string | boolean | HTMLElement;
|
|
9116
|
-
readonly show: boolean | undefined;
|
|
9117
|
-
readonly placement: FollowerPlacement;
|
|
9118
9115
|
readonly clearable: boolean;
|
|
9116
|
+
readonly placement: FollowerPlacement;
|
|
9117
|
+
readonly round: boolean;
|
|
9118
|
+
readonly show: boolean | undefined;
|
|
9119
9119
|
readonly inputReadonly: boolean;
|
|
9120
|
-
readonly panel: boolean;
|
|
9121
9120
|
readonly updateValueOnClose: boolean;
|
|
9122
9121
|
readonly defaultShortcuts: boolean;
|
|
9122
|
+
readonly panel: boolean;
|
|
9123
9123
|
readonly closeOnSelect: boolean;
|
|
9124
9124
|
readonly bindCalendarMonths: boolean;
|
|
9125
9125
|
readonly triggerPreset: TriggerPreset;
|
|
@@ -1336,8 +1336,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1336
1336
|
readonly panel: BooleanConstructor;
|
|
1337
1337
|
}>>, {
|
|
1338
1338
|
readonly value: import("../interface").Value | null;
|
|
1339
|
-
readonly active: boolean;
|
|
1340
1339
|
readonly actions: string[];
|
|
1341
1340
|
readonly panel: boolean;
|
|
1341
|
+
readonly active: boolean;
|
|
1342
1342
|
}, {}>;
|
|
1343
1343
|
export default _default;
|
|
@@ -1375,9 +1375,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1375
1375
|
readonly panel: BooleanConstructor;
|
|
1376
1376
|
}>>, {
|
|
1377
1377
|
readonly value: import("../interface").Value | null;
|
|
1378
|
-
readonly active: boolean;
|
|
1379
1378
|
readonly actions: unknown[];
|
|
1380
1379
|
readonly panel: boolean;
|
|
1381
1380
|
readonly bindCalendarMonths: boolean;
|
|
1381
|
+
readonly active: boolean;
|
|
1382
1382
|
}, {}>;
|
|
1383
1383
|
export default _default;
|
|
@@ -1329,8 +1329,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1329
1329
|
readonly panel: BooleanConstructor;
|
|
1330
1330
|
}>>, {
|
|
1331
1331
|
readonly value: import("../interface").Value | null;
|
|
1332
|
-
readonly active: boolean;
|
|
1333
1332
|
readonly actions: string[];
|
|
1334
1333
|
readonly panel: boolean;
|
|
1334
|
+
readonly active: boolean;
|
|
1335
1335
|
}, {}>;
|
|
1336
1336
|
export default _default;
|
|
@@ -1366,9 +1366,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1366
1366
|
readonly panel: BooleanConstructor;
|
|
1367
1367
|
}>>, {
|
|
1368
1368
|
readonly value: import("../interface").Value | null;
|
|
1369
|
-
readonly active: boolean;
|
|
1370
1369
|
readonly actions: unknown[];
|
|
1371
1370
|
readonly panel: boolean;
|
|
1372
1371
|
readonly bindCalendarMonths: boolean;
|
|
1372
|
+
readonly active: boolean;
|
|
1373
1373
|
}, {}>;
|
|
1374
1374
|
export default _default;
|