@zeedhi/vuetify 3.0.11 → 3.1.0
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/zd-vuetify.css +60 -58
- package/dist/zd-vuetify.min.css +1 -1
- package/dist/zd-vuetify.min.js +14 -14
- package/dist/zd-vuetify.mjs +1061 -792
- package/environments.json +16 -0
- package/package.json +3 -3
- package/src/components/index.ts +3 -1
- package/src/components/zd-alert/ZdAlert.ts +1 -1
- package/src/components/zd-badge/ZdBadge.ts +1 -1
- package/src/components/zd-breadcrumbs/ZdBreadcrumbs.ts +2 -1
- package/src/components/zd-button/ZdButton.ts +1 -1
- package/src/components/zd-button-group/ZdButtonGroup.ts +1 -1
- package/src/components/zd-card/ZdCard.ts +1 -1
- package/src/components/zd-card/ZdCard.vue +2 -2
- package/src/components/zd-carousel/ZdCarousel.ts +3 -1
- package/src/components/zd-checkbox/ZdCheckbox.ts +1 -1
- package/src/components/zd-checkbox-multiple/ZdCheckboxMultiple.ts +3 -1
- package/src/components/zd-chip/ZdChip.ts +1 -1
- package/src/components/zd-code-viewer/ZdCodeViewer.ts +1 -1
- package/src/components/zd-col/ZdCol.ts +1 -1
- package/src/components/zd-collapse-card/ZdCollapseCard.ts +3 -1
- package/src/components/zd-component/ZdComponent.ts +23 -1
- package/src/components/zd-component/ZdComponentRender.ts +2 -0
- package/src/components/zd-container/ZdContainer.ts +1 -1
- package/src/components/zd-currency/ZdCurrency.ts +1 -1
- package/src/components/zd-date-input/ZdDateInput.ts +1 -1
- package/src/components/zd-date-range/ZdDateRange.ts +1 -1
- package/src/components/zd-divider/ZdDivider.ts +1 -1
- package/src/components/zd-dropdown/ZdDropdown.ts +2 -1
- package/src/components/zd-dropdown/ZdDropdown.vue +1 -1
- package/src/components/zd-footer/ZdFooter.ts +1 -1
- package/src/components/zd-form/ZdForm.ts +2 -1
- package/src/components/zd-frame/ZdFrame.ts +3 -1
- package/src/components/zd-frame-page/ZdFramePage.ts +1 -1
- package/src/components/zd-frame-page/ZdFramePage.vue +1 -1
- package/src/components/zd-grid/ZdGrid.ts +10 -2
- package/src/components/zd-grid/ZdGrid.vue +1 -1
- package/src/components/zd-grid/cell/ZdGridCellContent.vue +5 -7
- package/src/components/zd-grid/column-header/ZdGridColumnHeader.vue +4 -7
- package/src/components/zd-grid-editable/ZdGridEditable.ts +9 -2
- package/src/components/zd-grid-editable/cell/ZdGridEditableCell.vue +1 -0
- package/src/components/zd-header/ZdHeader.ts +4 -1
- package/src/components/zd-icon/ZdIcon.ts +1 -1
- package/src/components/zd-image/ZdImage.ts +1 -1
- package/src/components/zd-increment/ZdIncrement.ts +1 -1
- package/src/components/zd-input/ZdInput.ts +10 -3
- package/src/components/zd-iterable/ZdIterable.ts +2 -0
- package/src/components/zd-iterable/zd-iterable-columns-button/ZdIterableColumnsButton.ts +6 -1
- package/src/components/zd-iterable/zd-iterable-page-info/ZdIterablePageInfo.ts +1 -1
- package/src/components/zd-iterable/zd-iterable-page-size/ZdIterablePageSize.ts +2 -1
- package/src/components/zd-iterable/zd-iterable-pagination/ZdIterablePagination.ts +8 -3
- package/src/components/zd-iterable/zd-search/ZdSearch.ts +1 -1
- package/src/components/zd-iterable-component-render/ZdIterableComponentRender.ts +12 -1
- package/src/components/zd-layout/ZdLayout.ts +1 -1
- package/src/components/zd-list/ZdList.scss +3 -0
- package/src/components/zd-list/ZdList.ts +2 -1
- package/src/components/zd-list/ZdListGroup.ts +2 -1
- package/src/components/zd-list/ZdListGroup.vue +14 -16
- package/src/components/zd-list/ZdListItem.ts +1 -1
- package/src/components/zd-loading/ZdLoading.ts +1 -1
- package/src/components/zd-loading/ZdLoading.vue +30 -53
- package/src/components/zd-login/ZdLogin.ts +3 -1
- package/src/components/zd-login/ZdLoginButton.ts +1 -1
- package/src/components/zd-main/ZdMain.ts +1 -1
- package/src/components/zd-master-detail/ZdMasterDetail.ts +1 -1
- package/src/components/zd-menu/ZdMenu.ts +9 -4
- package/src/components/zd-menu/ZdMenu.vue +6 -5
- package/src/components/zd-menu/ZdMenuButton.ts +1 -1
- package/src/components/zd-menu/ZdMenuGroup.ts +2 -1
- package/src/components/zd-menu/ZdMenuLink.ts +1 -1
- package/src/components/zd-menu/ZdMenuSeparator.ts +1 -1
- package/src/components/zd-modal/ZdModal.ts +1 -21
- package/src/components/zd-modal/ZdModal.vue +18 -77
- package/src/components/zd-modal/ZdModalCard.ts +100 -0
- package/src/components/zd-modal/ZdModalCard.vue +47 -0
- package/src/components/zd-modal/ZdModalCloseButton.ts +1 -1
- package/src/components/zd-month/ZdMonth.ts +1 -1
- package/src/components/zd-number-input/ZdNumberInput.ts +1 -1
- package/src/components/zd-password/ZdPassword.ts +1 -1
- package/src/components/zd-progress/ZdProgress.ts +2 -1
- package/src/components/zd-radio/ZdRadio.ts +2 -1
- package/src/components/zd-row/ZdRow.ts +1 -1
- package/src/components/zd-select/ZdSelect.ts +10 -2
- package/src/components/zd-select/ZdSelect.vue +2 -6
- package/src/components/zd-select-multiple/ZdSelectMultiple.ts +6 -1
- package/src/components/zd-select-multiple/ZdSelectMultiple.vue +1 -1
- package/src/components/zd-svg-map/ZdSvgMap.ts +1 -1
- package/src/components/zd-switch/ZdSwitch.ts +1 -1
- package/src/components/zd-table/ZdTable.ts +1 -1
- package/src/components/zd-tabs/ZdTab.ts +1 -1
- package/src/components/zd-tabs/ZdTabItem.vue +1 -0
- package/src/components/zd-tabs/ZdTabs.ts +4 -3
- package/src/components/zd-tabs/ZdTabs.vue +14 -5
- package/src/components/zd-tag/ZdTag.ts +1 -1
- package/src/components/zd-text/ZdText.ts +1 -1
- package/src/components/zd-text-input/ZdTextInput.ts +1 -1
- package/src/components/zd-text-input/ZdTextInput.vue +2 -2
- package/src/components/zd-textarea/ZdTextarea.ts +5 -1
- package/src/components/zd-textarea/ZdTextarea.vue +5 -2
- package/src/components/zd-time/ZdTime.ts +1 -1
- package/src/components/zd-tooltip/ZdTooltip.ts +1 -1
- package/src/components/zd-tooltip-overflow/ZdTooltipOverflow.vue +45 -0
- package/src/components/zd-tree/ZdTree.ts +5 -1
- package/src/components/zd-tree-grid/ZdTreeGrid.ts +2 -1
- package/src/composables/columnDrag.ts +9 -11
- package/src/composables/tableNavigation.ts +5 -1
- package/src/composables/useTooltipManager.ts +24 -0
- package/src/directives/index.ts +1 -0
- package/src/directives/v-tooltip-overflow.ts +97 -0
- package/src/index.ts +11 -0
- package/src/styles/_zd-input.scss +3 -2
- package/src/utils/fillHeight.ts +3 -2
- package/src/utils/index.ts +1 -0
- package/src/utils/plugins/getIconPlugin.ts +4 -3
- package/src/utils/tooltip-overflow/index.ts +2 -0
- package/src/utils/tooltip-overflow/install.ts +27 -0
- package/src/utils/tooltip-overflow/uninstall.ts +32 -0
- package/types/components/zd-alert/ZdAlert.d.ts +429 -351
- package/types/components/zd-badge/ZdBadge.d.ts +235 -211
- package/types/components/zd-breadcrumbs/ZdBreadcrumbs.d.ts +249 -222
- package/types/components/zd-button/ZdButton.d.ts +251 -227
- package/types/components/zd-button-group/ZdButtonGroup.d.ts +227 -212
- package/types/components/zd-card/ZdCard.d.ts +246 -222
- package/types/components/zd-carousel/ZdCarousel.d.ts +705 -701
- package/types/components/zd-checkbox/ZdCheckbox.d.ts +41 -14
- package/types/components/zd-checkbox-multiple/ZdCheckboxMultiple.d.ts +779 -746
- package/types/components/zd-chip/ZdChip.d.ts +246 -222
- package/types/components/zd-code-viewer/ZdCodeViewer.d.ts +264 -234
- package/types/components/zd-col/ZdCol.d.ts +244 -220
- package/types/components/zd-collapse-card/ZdCollapseCard.d.ts +541 -457
- package/types/components/zd-component/ZdComponent.d.ts +12 -5
- package/types/components/zd-component/ZdComponentRender.d.ts +12 -4
- package/types/components/zd-container/ZdContainer.d.ts +247 -223
- package/types/components/zd-currency/ZdCurrency.d.ts +765 -738
- package/types/components/zd-date-input/ZdDateInput.d.ts +62 -29
- package/types/components/zd-date-range/ZdDateRange.d.ts +776 -749
- package/types/components/zd-dialog/ZdDialog.d.ts +36 -12
- package/types/components/zd-divider/ZdDivider.d.ts +244 -220
- package/types/components/zd-dropdown/ZdDropdown.d.ts +342 -324
- package/types/components/zd-footer/ZdFooter.d.ts +624 -562
- package/types/components/zd-form/ZdForm.d.ts +12 -4
- package/types/components/zd-frame/ZdFrame.d.ts +13 -4
- package/types/components/zd-frame-page/ZdFramePage.d.ts +242 -215
- package/types/components/zd-grid/ZdGrid.d.ts +4500 -4527
- package/types/components/zd-grid/cell/ZdGridAction.d.ts +2 -2
- package/types/components/zd-grid/cell/ZdGridCell.d.ts +4 -4
- package/types/components/zd-grid/cell/ZdGridCellContent.d.ts +4 -4
- package/types/components/zd-grid/column-header/ZdGridColumnHeader.d.ts +2 -2
- package/types/components/zd-grid/composables/grid-instance.d.ts +1927 -1238
- package/types/components/zd-grid/footer/ZdGridFooter.d.ts +1927 -1238
- package/types/components/zd-grid/row/ZdGridRow.d.ts +6 -6
- package/types/components/zd-grid/toolbar/ZdGridToolbar.d.ts +1927 -1238
- package/types/components/zd-grid-editable/ZdGridEditable.d.ts +5102 -6303
- package/types/components/zd-grid-editable/cell/ZdGridEditableCell.d.ts +341 -341
- package/types/components/zd-grid-editable/row/ZdGridEditableRow.d.ts +6 -6
- package/types/components/zd-header/ZdHeader.d.ts +640 -582
- package/types/components/zd-icon/ZdIcon.d.ts +39 -15
- package/types/components/zd-image/ZdImage.d.ts +241 -220
- package/types/components/zd-increment/ZdIncrement.d.ts +765 -738
- package/types/components/zd-input/ZdInput.d.ts +15 -6
- package/types/components/zd-iterable/ZdIterable.d.ts +26 -12
- package/types/components/zd-iterable/ZdIterableNoData.d.ts +1927 -1238
- package/types/components/zd-iterable/zd-iterable-columns-button/ZdIterableColumnsButton.d.ts +753 -470
- package/types/components/zd-iterable/zd-iterable-page-info/ZdIterablePageInfo.d.ts +750 -461
- package/types/components/zd-iterable/zd-iterable-page-size/ZdIterablePageSize.d.ts +1659 -987
- package/types/components/zd-iterable/zd-iterable-pagination/ZdIterablePagination.d.ts +762 -470
- package/types/components/zd-iterable/zd-search/ZdSearch.d.ts +50 -23
- package/types/components/zd-iterable-component-render/ZdIterableComponentRender.d.ts +1224 -1080
- package/types/components/zd-layout/ZdLayout.d.ts +243 -222
- package/types/components/zd-list/ZdList.d.ts +671 -432
- package/types/components/zd-list/ZdListGroup.d.ts +809 -570
- package/types/components/zd-list/ZdListItem.d.ts +424 -294
- package/types/components/zd-loading/ZdLoading.d.ts +35 -14
- package/types/components/zd-login/ZdLogin.d.ts +455 -425
- package/types/components/zd-login/ZdLoginButton.d.ts +678 -654
- package/types/components/zd-main/ZdMain.d.ts +241 -220
- package/types/components/zd-master-detail/ZdMasterDetail.d.ts +261 -237
- package/types/components/zd-menu/ZdMenu.d.ts +1257 -3206
- package/types/components/zd-menu/ZdMenuButton.d.ts +244 -220
- package/types/components/zd-menu/ZdMenuGroup.d.ts +1219 -5391
- package/types/components/zd-menu/ZdMenuLink.d.ts +2042 -9432
- package/types/components/zd-menu/ZdMenuSeparator.d.ts +244 -220
- package/types/components/zd-modal/ZdModal.d.ts +0 -2
- package/types/components/zd-modal/ZdModalCard.d.ts +125 -0
- package/types/components/zd-modal/ZdModalCloseButton.d.ts +244 -220
- package/types/components/zd-month/ZdMonth.d.ts +774 -747
- package/types/components/zd-number-input/ZdNumberInput.d.ts +766 -739
- package/types/components/zd-password/ZdPassword.d.ts +765 -738
- package/types/components/zd-progress/ZdProgress.d.ts +363 -336
- package/types/components/zd-radio/ZdRadio.d.ts +44 -14
- package/types/components/zd-row/ZdRow.d.ts +244 -220
- package/types/components/zd-select/ZdSelect.d.ts +17 -5
- package/types/components/zd-select-multiple/ZdSelectMultiple.d.ts +17 -5
- package/types/components/zd-svg-map/ZdSvgMap.d.ts +37 -13
- package/types/components/zd-switch/ZdSwitch.d.ts +764 -737
- package/types/components/zd-table/ZdTable.d.ts +547 -346
- package/types/components/zd-tabs/ZdTab.d.ts +233 -156
- package/types/components/zd-tabs/ZdTabItem.d.ts +36 -12
- package/types/components/zd-tabs/ZdTabs.d.ts +492 -306
- package/types/components/zd-tag/ZdTag.d.ts +244 -220
- package/types/components/zd-text/ZdText.d.ts +264 -234
- package/types/components/zd-text-input/ZdTextInput.d.ts +41 -14
- package/types/components/zd-textarea/ZdTextarea.d.ts +55 -15
- package/types/components/zd-time/ZdTime.d.ts +774 -747
- package/types/components/zd-toggleable/ZdToggleable.d.ts +13 -4
- package/types/components/zd-tooltip/ZdTooltip.d.ts +250 -226
- package/types/components/zd-tree/ZdTree.d.ts +799 -763
- package/types/components/zd-tree/ZdTreeAfterTitle.d.ts +3 -3
- package/types/components/zd-tree/ZdTreeCheckbox.d.ts +5 -5
- package/types/components/zd-tree-grid/ZdTreeGrid.d.ts +2230 -2214
- package/types/components/zd-tree-grid/cell/ZdTreeGridCell.d.ts +4 -4
- package/types/components/zd-tree-grid/row/ZdTreeGridRow.d.ts +6 -6
- package/types/composables/cellSelection.d.ts +2 -264
- package/types/composables/gridColumns.d.ts +200 -147
- package/types/composables/gridSorting.d.ts +1 -1
- package/types/composables/tableNavigation.d.ts +3 -2
- package/types/composables/useTooltipManager.d.ts +13 -0
- package/types/directives/index.d.ts +1 -0
- package/types/directives/v-tooltip-overflow.d.ts +12 -0
- package/types/index.d.ts +1 -0
- package/types/utils/fillHeight.d.ts +1 -1
- package/types/utils/index.d.ts +1 -0
- package/types/utils/tooltip-overflow/index.d.ts +2 -0
- package/types/utils/tooltip-overflow/install.d.ts +13 -0
- package/types/utils/tooltip-overflow/uninstall.d.ts +14 -0
- package/src/components/tooltip-overflow/ZdTooltipOverflow.ts +0 -63
- package/src/components/tooltip-overflow/ZdTooltipOverflow.vue +0 -63
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
v-model="instance.showTooltip"
|
|
11
11
|
:attach="instance.tooltipAnchor"
|
|
12
12
|
:content-props="instance.tooltipContentProps"
|
|
13
|
-
:theme="
|
|
13
|
+
:theme="menuTheme"
|
|
14
14
|
location="end"
|
|
15
15
|
class="zd-menu-tooltip"
|
|
16
16
|
>
|
|
@@ -31,14 +31,14 @@
|
|
|
31
31
|
width: instance.width,
|
|
32
32
|
absolute: !!instance.absolute,
|
|
33
33
|
rail: instance.miniState,
|
|
34
|
-
theme:
|
|
34
|
+
theme: menuTheme,
|
|
35
35
|
'rail-width': instance.miniWidth,
|
|
36
|
-
'expand-on-hover':
|
|
36
|
+
'expand-on-hover': !instance.mini,
|
|
37
37
|
permanent: !!instance.permanent,
|
|
38
38
|
'disable-route-watcher': instance.disableRouteWatcher,
|
|
39
39
|
}"
|
|
40
40
|
>
|
|
41
|
-
<v-list nav :dense="instance.dense" expand :theme="
|
|
41
|
+
<v-list nav :dense="instance.dense" expand :theme="menuTheme">
|
|
42
42
|
<!-- SLOT -->
|
|
43
43
|
<span
|
|
44
44
|
class="zd-menu-top-slot"
|
|
@@ -143,7 +143,8 @@
|
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
&.theme--dark
|
|
146
|
+
&.theme--dark,
|
|
147
|
+
&.v-theme--dark {
|
|
147
148
|
.v-list {
|
|
148
149
|
.v-list-item {
|
|
149
150
|
.v-list-item-title {
|
|
@@ -28,7 +28,7 @@ const menuButtonComponent = defineComponent({
|
|
|
28
28
|
props: ZdMenuButtonProps,
|
|
29
29
|
inheritAttrs: false,
|
|
30
30
|
setup(props, ctx) {
|
|
31
|
-
const { instance, root } = useCreateInstance<MenuButton>(props, ctx, MenuButton);
|
|
31
|
+
const { instance, root } = useCreateInstance<MenuButton>(props, ctx, MenuButton, ZdMenuButtonProps);
|
|
32
32
|
|
|
33
33
|
const { click, focus, blur, mouseenter, mouseleave } = useGetMethods(instance, root);
|
|
34
34
|
|
|
@@ -22,6 +22,7 @@ export const ZdMenuGroupProps = buildProps({
|
|
|
22
22
|
items: {
|
|
23
23
|
type: Array<IMenuItem>,
|
|
24
24
|
default: () => [] as IMenuItem[],
|
|
25
|
+
watch: false,
|
|
25
26
|
},
|
|
26
27
|
menuLevel: {
|
|
27
28
|
type: Number,
|
|
@@ -46,7 +47,7 @@ const menuGroupComponent = defineComponent({
|
|
|
46
47
|
props: ZdMenuGroupProps,
|
|
47
48
|
inheritAttrs: false,
|
|
48
49
|
setup(props, ctx) {
|
|
49
|
-
const { instance, root } = useCreateInstance<MenuGroup>(props, ctx, MenuGroup);
|
|
50
|
+
const { instance, root } = useCreateInstance<MenuGroup>(props, ctx, MenuGroup, ZdMenuGroupProps);
|
|
50
51
|
|
|
51
52
|
const { click, focus, blur, mouseenter, mouseleave } = useGetMethods(instance, root);
|
|
52
53
|
|
|
@@ -38,7 +38,7 @@ const menuLinkComponent = defineComponent({
|
|
|
38
38
|
props: ZdMenuLinkProps,
|
|
39
39
|
inheritAttrs: false,
|
|
40
40
|
setup(props, ctx) {
|
|
41
|
-
const { instance, root } = useCreateInstance<MenuLink>(props, ctx, MenuLink);
|
|
41
|
+
const { instance, root } = useCreateInstance<MenuLink>(props, ctx, MenuLink, ZdMenuLinkProps);
|
|
42
42
|
|
|
43
43
|
const { click, focus, blur, mouseenter, mouseleave } = useGetMethods(instance, root);
|
|
44
44
|
|
|
@@ -12,7 +12,7 @@ const menuSeparatorComponent = defineComponent({
|
|
|
12
12
|
props: ZdMenuSeparatorProps,
|
|
13
13
|
inheritAttrs: false,
|
|
14
14
|
setup(props, ctx) {
|
|
15
|
-
const { instance, root } = useCreateInstance<MenuSeparator>(props, ctx, MenuSeparator);
|
|
15
|
+
const { instance, root } = useCreateInstance<MenuSeparator>(props, ctx, MenuSeparator, ZdMenuSeparatorProps);
|
|
16
16
|
|
|
17
17
|
const { click, focus, blur, mouseenter, mouseleave } = useGetMethods(instance, root);
|
|
18
18
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Modal, ModalService } from '@zeedhi/common';
|
|
2
2
|
import { RendererNode, defineComponent, reactive } from 'vue';
|
|
3
3
|
|
|
4
4
|
export default defineComponent({
|
|
@@ -12,13 +12,6 @@ export default defineComponent({
|
|
|
12
12
|
let elDragged: RendererNode | null = null;
|
|
13
13
|
let dragHandle: HTMLElement | null = null;
|
|
14
14
|
|
|
15
|
-
const getGridClasses = (grid: IModalGrid) =>
|
|
16
|
-
Object.keys(grid).reduce((previous, key) => `${previous} zd-col-${key}-${grid[key as keyof IModalGrid]}`, '');
|
|
17
|
-
|
|
18
|
-
const getSizeClass = (modal: Modal): string => {
|
|
19
|
-
return !modal.fullscreen ? getGridClasses(modal.grid) : '';
|
|
20
|
-
};
|
|
21
|
-
|
|
22
15
|
const initializeModalPosition = (modalEl: HTMLElement) => {
|
|
23
16
|
const rect = modalEl.getBoundingClientRect();
|
|
24
17
|
|
|
@@ -107,17 +100,6 @@ export default defineComponent({
|
|
|
107
100
|
};
|
|
108
101
|
};
|
|
109
102
|
|
|
110
|
-
const getContentClass = (modal: Modal) => {
|
|
111
|
-
const classes: string[] = [
|
|
112
|
-
'zd-modal-content',
|
|
113
|
-
getSizeClass(modal),
|
|
114
|
-
modal.cssClass,
|
|
115
|
-
modal.draggable ? 'zd-modal-draggable' : '',
|
|
116
|
-
modal.draggable && !modal.dragHandle ? 'zd-modal-draggable-handle' : '',
|
|
117
|
-
];
|
|
118
|
-
return classes.join(' ');
|
|
119
|
-
};
|
|
120
|
-
|
|
121
103
|
const registerDragEvents = (modal: Modal, el: RendererNode | null) => {
|
|
122
104
|
if (!el || !(el instanceof HTMLElement)) return;
|
|
123
105
|
|
|
@@ -137,8 +119,6 @@ export default defineComponent({
|
|
|
137
119
|
|
|
138
120
|
return {
|
|
139
121
|
modals,
|
|
140
|
-
dragStart,
|
|
141
|
-
getContentClass,
|
|
142
122
|
registerDragEvents,
|
|
143
123
|
unregisterDragEvents,
|
|
144
124
|
};
|
|
@@ -13,47 +13,28 @@
|
|
|
13
13
|
:fullscreen="modal.fullscreen"
|
|
14
14
|
:theme="modal.theme"
|
|
15
15
|
>
|
|
16
|
-
<
|
|
17
|
-
:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
16
|
+
<zd-modal-card
|
|
17
|
+
:name="modal.name"
|
|
18
|
+
:title="modal.title"
|
|
19
|
+
:children="modal.children"
|
|
20
|
+
:css-class="modal.cssClass"
|
|
21
|
+
:css-style="modal.cssStyle"
|
|
22
|
+
:fullscreen="modal.fullscreen"
|
|
23
|
+
:grid="modal.grid"
|
|
24
|
+
:draggable="modal.draggable"
|
|
25
|
+
:drag-handle="modal.dragHandle"
|
|
26
|
+
:parent="modal"
|
|
27
|
+
:register-drag-events="registerDragEvents"
|
|
28
|
+
:unregister-drag-events="unregisterDragEvents"
|
|
29
29
|
>
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
</v-card-title>
|
|
33
|
-
<v-card-text class="zd-modal-card-text">
|
|
34
|
-
<v-container
|
|
35
|
-
fluid
|
|
36
|
-
class="zd-modal-container"
|
|
37
|
-
>
|
|
38
|
-
<v-layout style="flex-direction: column;">
|
|
39
|
-
<component
|
|
40
|
-
v-for="(child) in modal.children"
|
|
41
|
-
v-bind="child"
|
|
42
|
-
:key="child.name"
|
|
43
|
-
:is="child.component"
|
|
44
|
-
:parent="modal">
|
|
45
|
-
</component>
|
|
46
|
-
<slot></slot>
|
|
47
|
-
</v-layout>
|
|
48
|
-
</v-container>
|
|
49
|
-
</v-card-text>
|
|
50
|
-
</v-card>
|
|
30
|
+
<slot></slot>
|
|
31
|
+
</zd-modal-card>
|
|
51
32
|
</v-dialog>
|
|
52
33
|
</div>
|
|
53
34
|
</template>
|
|
54
|
-
|
|
35
|
+
|
|
55
36
|
<script lang="ts" src="./ZdModal.ts"></script>
|
|
56
|
-
|
|
37
|
+
|
|
57
38
|
<style lang="scss">
|
|
58
39
|
.zd-modal {
|
|
59
40
|
&-title {
|
|
@@ -94,10 +75,6 @@
|
|
|
94
75
|
}
|
|
95
76
|
}
|
|
96
77
|
|
|
97
|
-
.v-dialog .v-overlay__content .v-card .v-card-text{
|
|
98
|
-
padding: 0px !important;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
78
|
.v-overlay.v-dialog {
|
|
102
79
|
> .v-overlay__content {
|
|
103
80
|
flex-direction: row;
|
|
@@ -105,40 +82,4 @@
|
|
|
105
82
|
max-width: none;
|
|
106
83
|
}
|
|
107
84
|
}
|
|
108
|
-
|
|
109
|
-
.zd-modal-content {
|
|
110
|
-
> .zd-modal-card {
|
|
111
|
-
> .zd-modal-title {
|
|
112
|
-
padding: var(--zd-default-padding);
|
|
113
|
-
padding-bottom: 0px;
|
|
114
|
-
font-size: var(--zd-font-title-size);
|
|
115
|
-
font-weight: var(--zd-font-title-weight);
|
|
116
|
-
color: var(--zd-font-color);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
> .zd-modal-card-text {
|
|
120
|
-
padding: var(--zd-default-padding);
|
|
121
|
-
display: flex;
|
|
122
|
-
flex: 1 1 auto;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.zd-modal-content {
|
|
127
|
-
> .zd-modal-card {
|
|
128
|
-
> .zd-modal-title {
|
|
129
|
-
padding: var(--zd-default-padding);
|
|
130
|
-
padding-bottom: 0px;
|
|
131
|
-
font-size: var(--zd-font-title-size);
|
|
132
|
-
font-weight: var(--zd-font-title-weight);
|
|
133
|
-
color: var(--zd-font-color);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
> .zd-modal-card-text {
|
|
137
|
-
padding: var(--zd-default-padding);
|
|
138
|
-
display: flex;
|
|
139
|
-
flex: 1 1 auto;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
</style>
|
|
85
|
+
</style>
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { IModalGrid, Modal } from '@zeedhi/common';
|
|
2
|
+
import { PropType, defineComponent } from 'vue';
|
|
3
|
+
|
|
4
|
+
export default defineComponent({
|
|
5
|
+
inheritAttrs: false,
|
|
6
|
+
props: {
|
|
7
|
+
name: {
|
|
8
|
+
type: String,
|
|
9
|
+
required: true,
|
|
10
|
+
},
|
|
11
|
+
title: {
|
|
12
|
+
type: String,
|
|
13
|
+
required: false,
|
|
14
|
+
},
|
|
15
|
+
children: {
|
|
16
|
+
type: Array as PropType<any[]>,
|
|
17
|
+
required: false,
|
|
18
|
+
default: () => [],
|
|
19
|
+
},
|
|
20
|
+
cssClass: {
|
|
21
|
+
type: String,
|
|
22
|
+
required: false,
|
|
23
|
+
default: '',
|
|
24
|
+
},
|
|
25
|
+
cssStyle: {
|
|
26
|
+
type: String,
|
|
27
|
+
required: false,
|
|
28
|
+
default: '',
|
|
29
|
+
},
|
|
30
|
+
fullscreen: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
required: false,
|
|
33
|
+
default: false,
|
|
34
|
+
},
|
|
35
|
+
grid: {
|
|
36
|
+
type: Object as PropType<IModalGrid>,
|
|
37
|
+
required: false,
|
|
38
|
+
default: () => ({}),
|
|
39
|
+
},
|
|
40
|
+
draggable: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
required: false,
|
|
43
|
+
default: false,
|
|
44
|
+
},
|
|
45
|
+
dragHandle: {
|
|
46
|
+
type: String,
|
|
47
|
+
required: false,
|
|
48
|
+
},
|
|
49
|
+
parent: {
|
|
50
|
+
type: Object as PropType<Modal>,
|
|
51
|
+
required: false,
|
|
52
|
+
},
|
|
53
|
+
registerDragEvents: {
|
|
54
|
+
type: Function as PropType<(modal: Modal, el: any) => void>,
|
|
55
|
+
required: false,
|
|
56
|
+
},
|
|
57
|
+
unregisterDragEvents: {
|
|
58
|
+
type: Function as PropType<(modal: Modal, el: any) => void>,
|
|
59
|
+
required: false,
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
setup(props) {
|
|
63
|
+
const getGridClasses = (grid: IModalGrid) =>
|
|
64
|
+
Object.keys(grid).reduce((previous, key) => `${previous} zd-col-${key}-${grid[key as keyof IModalGrid]}`, '');
|
|
65
|
+
|
|
66
|
+
const getSizeClass = (): string => {
|
|
67
|
+
return !props.fullscreen ? getGridClasses(props.grid) : '';
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const getContentClass = () => {
|
|
71
|
+
const classes: string[] = [
|
|
72
|
+
getSizeClass(),
|
|
73
|
+
props.cssClass,
|
|
74
|
+
props.draggable ? 'zd-modal-draggable' : '',
|
|
75
|
+
props.draggable && !props.dragHandle ? 'zd-modal-draggable-handle' : '',
|
|
76
|
+
];
|
|
77
|
+
return classes.join(' ');
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
const handleMounted = (modal: Modal, el: any) => {
|
|
81
|
+
modal.onMounted(el);
|
|
82
|
+
|
|
83
|
+
if (props.draggable && props.registerDragEvents) {
|
|
84
|
+
props.registerDragEvents(modal, el);
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
const handleDestroyed = (modal: Modal, el: any) => {
|
|
89
|
+
if (props.draggable && props.unregisterDragEvents) {
|
|
90
|
+
props.unregisterDragEvents(modal, el);
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
return {
|
|
95
|
+
getContentClass,
|
|
96
|
+
handleMounted,
|
|
97
|
+
handleDestroyed,
|
|
98
|
+
};
|
|
99
|
+
},
|
|
100
|
+
});
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-card
|
|
3
|
+
:class="[
|
|
4
|
+
'zd-modal-card',
|
|
5
|
+
'zd-modal-card-' + name,
|
|
6
|
+
'zd-display-flex',
|
|
7
|
+
'zd-flex-column',
|
|
8
|
+
cssClass,
|
|
9
|
+
getContentClass()
|
|
10
|
+
]"
|
|
11
|
+
:style="cssStyle"
|
|
12
|
+
ref="root"
|
|
13
|
+
@vue:mounted="parent && handleMounted(parent, $event.el)"
|
|
14
|
+
@vue:destroyed="parent && handleDestroyed(parent, $event.el)"
|
|
15
|
+
>
|
|
16
|
+
<v-card-title v-if="title" class="zd-theme-font-title zd-modal-title">
|
|
17
|
+
{{ $t(title) }}
|
|
18
|
+
</v-card-title>
|
|
19
|
+
<v-card-text class="zd-modal-card-text">
|
|
20
|
+
<v-container
|
|
21
|
+
fluid
|
|
22
|
+
class="zd-modal-container"
|
|
23
|
+
>
|
|
24
|
+
<v-layout style="flex-direction: column;">
|
|
25
|
+
<component
|
|
26
|
+
v-for="(child) in children"
|
|
27
|
+
v-bind="child"
|
|
28
|
+
:key="child.name"
|
|
29
|
+
:is="child.component"
|
|
30
|
+
:parent="parent">
|
|
31
|
+
</component>
|
|
32
|
+
<slot></slot>
|
|
33
|
+
</v-layout>
|
|
34
|
+
</v-container>
|
|
35
|
+
</v-card-text>
|
|
36
|
+
</v-card>
|
|
37
|
+
</template>
|
|
38
|
+
|
|
39
|
+
<script lang="ts" src="./ZdModalCard.ts"></script>
|
|
40
|
+
|
|
41
|
+
<style lang="scss">
|
|
42
|
+
.zd-modal-card {
|
|
43
|
+
&-text {
|
|
44
|
+
padding: 0px !important;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
</style>
|
|
@@ -28,7 +28,7 @@ const modalCloseButton = defineComponent({
|
|
|
28
28
|
props: ZdModalCloseButtonProps,
|
|
29
29
|
inheritAttrs: false,
|
|
30
30
|
setup(props, ctx) {
|
|
31
|
-
const { instance, root } = useCreateInstance<ModalCloseButton>(props, ctx, ModalCloseButton);
|
|
31
|
+
const { instance, root } = useCreateInstance<ModalCloseButton>(props, ctx, ModalCloseButton, ZdModalCloseButtonProps);
|
|
32
32
|
|
|
33
33
|
return {
|
|
34
34
|
instance,
|
|
@@ -19,7 +19,7 @@ export default defineComponent({
|
|
|
19
19
|
props: ZdMonthProps,
|
|
20
20
|
inheritAttrs: false,
|
|
21
21
|
setup(props, ctx) {
|
|
22
|
-
const { instance, root } = useCreateInstance<Month>(props, ctx, Month);
|
|
22
|
+
const { instance, root } = useCreateInstance<Month>(props, ctx, Month, ZdMonthProps);
|
|
23
23
|
|
|
24
24
|
watch(
|
|
25
25
|
() => instance.viewMode,
|
|
@@ -25,7 +25,7 @@ const numberInputComponent = defineComponent({
|
|
|
25
25
|
props: ZdNumberInputProps,
|
|
26
26
|
inheritAttrs: false,
|
|
27
27
|
setup(props, ctx) {
|
|
28
|
-
const { instance, root } = useCreateInstance<NumberInput>(props, ctx, NumberInput);
|
|
28
|
+
const { instance, root } = useCreateInstance<NumberInput>(props, ctx, NumberInput, ZdNumberInputProps);
|
|
29
29
|
|
|
30
30
|
const autoNumericInit = ref(false);
|
|
31
31
|
|
|
@@ -15,7 +15,7 @@ const passwordComponent = defineComponent({
|
|
|
15
15
|
props: ZdPasswordProps,
|
|
16
16
|
inheritAttrs: false,
|
|
17
17
|
setup(props, ctx) {
|
|
18
|
-
const { instance, root } = useCreateInstance<Password>(props, ctx, Password);
|
|
18
|
+
const { instance, root } = useCreateInstance<Password>(props, ctx, Password, ZdPasswordProps);
|
|
19
19
|
|
|
20
20
|
return {
|
|
21
21
|
instance,
|
|
@@ -30,6 +30,7 @@ export const ZdProgressProps = buildProps({
|
|
|
30
30
|
centerSlot: {
|
|
31
31
|
type: [Array, String] as PropType<IComponentRender[] | string>,
|
|
32
32
|
default: () => [],
|
|
33
|
+
watch: false,
|
|
33
34
|
},
|
|
34
35
|
value: {
|
|
35
36
|
type: [Number, String] as PropType<number | string>,
|
|
@@ -40,7 +41,7 @@ const progressComponent = defineComponent({
|
|
|
40
41
|
props: ZdProgressProps,
|
|
41
42
|
inheritAttrs: false,
|
|
42
43
|
setup(props, ctx) {
|
|
43
|
-
const { instance, root } = useCreateInstance<Progress>(props, ctx, Progress);
|
|
44
|
+
const { instance, root } = useCreateInstance<Progress>(props, ctx, Progress, ZdProgressProps);
|
|
44
45
|
const { click, mouseenter, mouseleave } = useGetMethods(instance, root);
|
|
45
46
|
|
|
46
47
|
return {
|
|
@@ -22,6 +22,7 @@ export const ZdRadioProps = buildProps({
|
|
|
22
22
|
defaut() {
|
|
23
23
|
return {};
|
|
24
24
|
},
|
|
25
|
+
watch: false,
|
|
25
26
|
},
|
|
26
27
|
dataValue: {
|
|
27
28
|
type: String,
|
|
@@ -37,7 +38,7 @@ const radioComponent = defineComponent({
|
|
|
37
38
|
props: ZdRadioProps,
|
|
38
39
|
inheritAttrs: false,
|
|
39
40
|
setup(props, ctx) {
|
|
40
|
-
const { instance, root } = useCreateInstance<Radio>(props, ctx, Radio);
|
|
41
|
+
const { instance, root } = useCreateInstance<Radio>(props, ctx, Radio, ZdRadioProps);
|
|
41
42
|
|
|
42
43
|
const radioScope = useRadio(instance, ctx, root);
|
|
43
44
|
|
|
@@ -29,7 +29,7 @@ const rowComponent = defineComponent({
|
|
|
29
29
|
props: ZdRowProps,
|
|
30
30
|
inheritAttrs: false,
|
|
31
31
|
setup(props, ctx) {
|
|
32
|
-
const { instance, root } = useCreateInstance<Row>(props, ctx, Row);
|
|
32
|
+
const { instance, root } = useCreateInstance<Row>(props, ctx, Row, ZdRowProps);
|
|
33
33
|
|
|
34
34
|
const { click, focus, blur, mouseenter, mouseleave } = useGetMethods(instance, root);
|
|
35
35
|
|
|
@@ -56,6 +56,7 @@ export const ZdSelectProps = buildProps({
|
|
|
56
56
|
datasource: {
|
|
57
57
|
type: Object,
|
|
58
58
|
default: () => ({}),
|
|
59
|
+
watch: false,
|
|
59
60
|
},
|
|
60
61
|
value: {
|
|
61
62
|
type: [String, Number, Object],
|
|
@@ -72,10 +73,12 @@ export const ZdSelectProps = buildProps({
|
|
|
72
73
|
itemAfterSlot: {
|
|
73
74
|
type: Array,
|
|
74
75
|
default: () => [],
|
|
76
|
+
watch: false,
|
|
75
77
|
},
|
|
76
78
|
itemBeforeSlot: {
|
|
77
79
|
type: Array,
|
|
78
80
|
default: () => [],
|
|
81
|
+
watch: false,
|
|
79
82
|
},
|
|
80
83
|
manualMode: {
|
|
81
84
|
type: [Boolean, String],
|
|
@@ -100,7 +103,12 @@ const selectComponent: any = defineComponent({
|
|
|
100
103
|
props: ZdSelectProps,
|
|
101
104
|
inheritAttrs: false,
|
|
102
105
|
setup(props, ctx) {
|
|
103
|
-
const { instance, root } = useCreateInputInstance<Select>(
|
|
106
|
+
const { instance, root } = useCreateInputInstance<Select>(
|
|
107
|
+
props,
|
|
108
|
+
ctx,
|
|
109
|
+
Select,
|
|
110
|
+
ZdSelectProps,
|
|
111
|
+
);
|
|
104
112
|
|
|
105
113
|
const selectScope = useSelect(instance, ctx, root);
|
|
106
114
|
|
|
@@ -127,7 +135,7 @@ export function useSelect<TG extends Select>(
|
|
|
127
135
|
const hasItemAfterSlot = !!slots.itemAfterSlot;
|
|
128
136
|
|
|
129
137
|
const items = computed<IDictionary[]>(() => {
|
|
130
|
-
const data = instance.items;
|
|
138
|
+
const data = instance.items || [];
|
|
131
139
|
|
|
132
140
|
const disabledValues = instance.disabledItems.map((item: IDictionary) => {
|
|
133
141
|
if (item && typeof item === 'object') {
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
!instance.showHelper &&
|
|
21
21
|
!(
|
|
22
22
|
instance.alwaysShowError &&
|
|
23
|
-
$refs.
|
|
24
|
-
$refs.
|
|
23
|
+
$refs.root &&
|
|
24
|
+
$refs.root.errorMessages.length
|
|
25
25
|
),
|
|
26
26
|
'zd-no-border': !instance.showBorder,
|
|
27
27
|
'zd-dense': instance.dense,
|
|
@@ -174,10 +174,6 @@
|
|
|
174
174
|
font-size: var(--zd-font-body1-size);
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
-
.v-label {
|
|
178
|
-
opacity: 1;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
177
|
&.zd-dense .v-field__input {
|
|
182
178
|
min-height: 22px;
|
|
183
179
|
padding: 0;
|
|
@@ -42,7 +42,12 @@ const selectMultipleComponent: any = defineComponent({
|
|
|
42
42
|
props: ZdSelectMultipleProps,
|
|
43
43
|
inheritAttrs: false,
|
|
44
44
|
setup(props, ctx) {
|
|
45
|
-
const { instance, root } = useCreateInputInstance<SelectMultiple>(
|
|
45
|
+
const { instance, root } = useCreateInputInstance<SelectMultiple>(
|
|
46
|
+
props,
|
|
47
|
+
ctx,
|
|
48
|
+
SelectMultiple,
|
|
49
|
+
ZdSelectMultipleProps,
|
|
50
|
+
);
|
|
46
51
|
const selectScope = useSelect(instance, ctx, root);
|
|
47
52
|
const element = ref<HTMLElement>();
|
|
48
53
|
const checkboxItem = ref<Array<any>>([]);
|
|
@@ -57,7 +57,7 @@ export default defineComponent({
|
|
|
57
57
|
|
|
58
58
|
setup(props, ctx) {
|
|
59
59
|
const container = ref<HTMLElement | null>(null);
|
|
60
|
-
const { instance, root } = useCreateInputInstance<any>(props, ctx, SvgMap);
|
|
60
|
+
const { instance, root } = useCreateInputInstance<any>(props, ctx, SvgMap, ZdSvgMapProps);
|
|
61
61
|
const componentScope = useGetMethods(instance, root);
|
|
62
62
|
const theme = useTheme();
|
|
63
63
|
|
|
@@ -19,7 +19,7 @@ const switchComponent = defineComponent({
|
|
|
19
19
|
props: ZdSwitchProps,
|
|
20
20
|
inheritAttrs: false,
|
|
21
21
|
setup(props, ctx) {
|
|
22
|
-
const { instance, root } = useCreateInstance<Switch>(props, ctx, Switch);
|
|
22
|
+
const { instance, root } = useCreateInstance<Switch>(props, ctx, Switch, ZdSwitchProps);
|
|
23
23
|
|
|
24
24
|
const { click, focus, blur, mouseenter, mouseleave } = useGetMethods(instance, root);
|
|
25
25
|
|
|
@@ -28,7 +28,7 @@ const tableComponent = defineComponent({
|
|
|
28
28
|
props: ZdTableProps,
|
|
29
29
|
inheritAttrs: false,
|
|
30
30
|
setup(props, ctx) {
|
|
31
|
-
const { instance, root } = useCreateInstance<Table>(props, ctx, Table);
|
|
31
|
+
const { instance, root } = useCreateInstance<Table>(props, ctx, Table, ZdTableProps);
|
|
32
32
|
|
|
33
33
|
const { click, focus, blur, mouseenter, mouseleave } = useGetMethods(instance, root);
|
|
34
34
|
|
|
@@ -65,7 +65,7 @@ const tabComponent = defineComponent({
|
|
|
65
65
|
props: ZdTabProps,
|
|
66
66
|
inheritAttrs: false,
|
|
67
67
|
setup(props, ctx) {
|
|
68
|
-
const { instance, root } = useCreateInstance<Tab>(props, ctx, Tab);
|
|
68
|
+
const { instance, root } = useCreateInstance<Tab>(props, ctx, Tab, ZdTabProps);
|
|
69
69
|
const { density } = useDensity({ instance });
|
|
70
70
|
|
|
71
71
|
const { click, focus, blur, mouseenter, mouseleave } = useGetMethods(instance, root);
|
|
@@ -16,6 +16,7 @@ export const ZdTabsProps = buildProps({
|
|
|
16
16
|
tabs: {
|
|
17
17
|
type: [Array],
|
|
18
18
|
default: () => [],
|
|
19
|
+
watch: false,
|
|
19
20
|
},
|
|
20
21
|
color: {
|
|
21
22
|
type: [String],
|
|
@@ -53,14 +54,14 @@ const tabsComponent = defineComponent({
|
|
|
53
54
|
props: ZdTabsProps,
|
|
54
55
|
inheritAttrs: false,
|
|
55
56
|
setup(props, ctx) {
|
|
56
|
-
const { instance, root } = useCreateInstance<Tabs>(props, ctx, Tabs);
|
|
57
|
+
const { instance, root } = useCreateInstance<Tabs>(props, ctx, Tabs, ZdTabsProps);
|
|
57
58
|
const { density } = useDensity({ instance });
|
|
58
59
|
|
|
59
60
|
const { click, focus, blur, mouseenter, mouseleave } = useGetMethods(instance, root);
|
|
60
61
|
|
|
61
|
-
const change = (
|
|
62
|
+
const change = () => {
|
|
62
63
|
const rootElement = getRootElement(root);
|
|
63
|
-
instance.change(
|
|
64
|
+
instance.change(new Event('change'), rootElement.value);
|
|
64
65
|
};
|
|
65
66
|
|
|
66
67
|
const keydown = (event: Event, index: number) => {
|