naive-ui 2.23.0 → 2.23.1
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/_utils/composable/use-houdini.js +10 -7
- package/es/auto-complete/src/AutoComplete.d.ts +2 -2
- package/es/auto-complete/src/AutoComplete.js +2 -2
- package/es/auto-complete/src/styles/index.cssr.js +4 -4
- package/es/avatar/src/Avatar.d.ts +5 -5
- package/es/avatar/src/Avatar.js +5 -5
- package/es/avatar/src/styles/index.cssr.js +13 -13
- package/es/back-top/src/BackTop.d.ts +13 -13
- package/es/back-top/src/BackTop.js +13 -13
- package/es/back-top/src/styles/index.cssr.js +29 -29
- package/es/data-table/src/TableParts/Cell.js +2 -3
- package/es/data-table/src/TableParts/Header.js +1 -1
- package/es/date-picker/src/panel/date.d.ts +4 -9
- package/es/date-picker/src/panel/daterange.d.ts +4 -9
- package/es/date-picker/src/panel/datetime.d.ts +4 -9
- package/es/date-picker/src/panel/datetimerange.d.ts +4 -9
- package/es/date-picker/src/panel/month.d.ts +4 -9
- package/es/date-picker/src/panel/use-calendar.d.ts +2 -5
- package/es/date-picker/src/panel/use-calendar.js +6 -5
- package/es/date-picker/src/panel/use-dual-calendar.d.ts +2 -5
- package/es/date-picker/src/panel/use-dual-calendar.js +12 -13
- package/es/date-picker/src/panel/use-panel-common.d.ts +2 -5
- package/es/date-picker/src/panel/use-panel-common.js +2 -6
- package/es/dialog/src/Dialog.d.ts +21 -21
- package/es/dialog/src/Dialog.js +21 -21
- package/es/dialog/src/styles/index.cssr.js +45 -45
- package/es/dynamic-tags/src/DynamicTags.d.ts +1 -1
- package/es/dynamic-tags/src/DynamicTags.js +1 -1
- package/es/dynamic-tags/src/styles/index.cssr.js +1 -1
- package/es/form/src/Form.d.ts +27 -27
- package/es/form/src/FormItem.d.ts +27 -27
- package/es/form/src/FormItemCol.d.ts +27 -27
- package/es/form/src/FormItemGridItem.d.ts +27 -27
- package/es/form/src/FormItemRow.d.ts +27 -27
- package/es/form/styles/_common.d.ts +0 -3
- package/es/form/styles/_common.js +0 -3
- package/es/form/styles/light.d.ts +3 -3
- package/es/form/styles/light.js +2 -2
- package/es/log/src/Log.d.ts +6 -6
- package/es/log/src/Log.js +6 -6
- package/es/log/src/styles/index.cssr.js +16 -18
- package/es/steps/src/Step.d.ts +12 -12
- package/es/steps/src/Step.js +12 -12
- package/es/steps/src/styles/index.cssr.js +46 -46
- package/es/switch/src/Switch.d.ts +19 -19
- package/es/switch/src/Switch.js +19 -19
- package/es/switch/src/styles/index.cssr.js +57 -57
- package/es/tag/src/Tag.d.ts +26 -26
- package/es/tag/src/Tag.js +26 -26
- package/es/tag/src/styles/index.cssr.js +54 -54
- package/es/tag/src/styles/rtl.cssr.js +1 -1
- package/es/time-picker/src/TimePicker.d.ts +17 -17
- package/es/time-picker/src/TimePicker.js +17 -17
- package/es/time-picker/src/styles/index.cssr.js +47 -47
- package/es/timeline/src/TimelineItem.d.ts +12 -12
- package/es/timeline/src/TimelineItem.js +12 -12
- package/es/timeline/src/styles/index.cssr.js +44 -44
- package/es/transfer/src/styles/index.cssr.js +9 -4
- package/es/tree/src/Tree.d.ts +11 -11
- package/es/tree/src/Tree.js +11 -11
- package/es/tree/src/dnd.js +2 -2
- package/es/tree/src/styles/index.cssr.js +33 -33
- package/es/tree-select/src/TreeSelect.d.ts +8 -8
- package/es/tree-select/src/TreeSelect.js +8 -8
- package/es/tree-select/src/styles/index.cssr.js +18 -18
- package/es/upload/src/Upload.js +16 -16
- package/es/upload/src/styles/index.cssr.js +36 -36
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/_utils/composable/use-houdini.js +10 -7
- package/lib/auto-complete/src/AutoComplete.d.ts +2 -2
- package/lib/auto-complete/src/AutoComplete.js +2 -2
- package/lib/auto-complete/src/styles/index.cssr.js +4 -4
- package/lib/avatar/src/Avatar.d.ts +5 -5
- package/lib/avatar/src/Avatar.js +5 -5
- package/lib/avatar/src/styles/index.cssr.js +13 -13
- package/lib/back-top/src/BackTop.d.ts +13 -13
- package/lib/back-top/src/BackTop.js +13 -13
- package/lib/back-top/src/styles/index.cssr.js +29 -29
- package/lib/data-table/src/TableParts/Cell.js +2 -3
- package/lib/data-table/src/TableParts/Header.js +1 -1
- package/lib/date-picker/src/panel/date.d.ts +4 -9
- package/lib/date-picker/src/panel/daterange.d.ts +4 -9
- package/lib/date-picker/src/panel/datetime.d.ts +4 -9
- package/lib/date-picker/src/panel/datetimerange.d.ts +4 -9
- package/lib/date-picker/src/panel/month.d.ts +4 -9
- package/lib/date-picker/src/panel/use-calendar.d.ts +2 -5
- package/lib/date-picker/src/panel/use-calendar.js +6 -5
- package/lib/date-picker/src/panel/use-dual-calendar.d.ts +2 -5
- package/lib/date-picker/src/panel/use-dual-calendar.js +12 -13
- package/lib/date-picker/src/panel/use-panel-common.d.ts +2 -5
- package/lib/date-picker/src/panel/use-panel-common.js +2 -6
- package/lib/dialog/src/Dialog.d.ts +21 -21
- package/lib/dialog/src/Dialog.js +21 -21
- package/lib/dialog/src/styles/index.cssr.js +45 -45
- package/lib/dynamic-tags/src/DynamicTags.d.ts +1 -1
- package/lib/dynamic-tags/src/DynamicTags.js +1 -1
- package/lib/dynamic-tags/src/styles/index.cssr.js +1 -1
- package/lib/form/src/Form.d.ts +27 -27
- package/lib/form/src/FormItem.d.ts +27 -27
- package/lib/form/src/FormItemCol.d.ts +27 -27
- package/lib/form/src/FormItemGridItem.d.ts +27 -27
- package/lib/form/src/FormItemRow.d.ts +27 -27
- package/lib/form/styles/_common.d.ts +0 -3
- package/lib/form/styles/_common.js +0 -3
- package/lib/form/styles/light.d.ts +3 -3
- package/lib/form/styles/light.js +2 -2
- package/lib/log/src/Log.d.ts +6 -6
- package/lib/log/src/Log.js +6 -6
- package/lib/log/src/styles/index.cssr.js +16 -18
- package/lib/steps/src/Step.d.ts +12 -12
- package/lib/steps/src/Step.js +12 -12
- package/lib/steps/src/styles/index.cssr.js +46 -46
- package/lib/switch/src/Switch.d.ts +19 -19
- package/lib/switch/src/Switch.js +19 -19
- package/lib/switch/src/styles/index.cssr.js +57 -57
- package/lib/tag/src/Tag.d.ts +26 -26
- package/lib/tag/src/Tag.js +26 -26
- package/lib/tag/src/styles/index.cssr.js +54 -54
- package/lib/tag/src/styles/rtl.cssr.js +1 -1
- package/lib/time-picker/src/TimePicker.d.ts +17 -17
- package/lib/time-picker/src/TimePicker.js +17 -17
- package/lib/time-picker/src/styles/index.cssr.js +47 -47
- package/lib/timeline/src/TimelineItem.d.ts +12 -12
- package/lib/timeline/src/TimelineItem.js +12 -12
- package/lib/timeline/src/styles/index.cssr.js +44 -44
- package/lib/transfer/src/styles/index.cssr.js +9 -4
- package/lib/tree/src/Tree.d.ts +11 -11
- package/lib/tree/src/Tree.js +11 -11
- package/lib/tree/src/dnd.js +2 -2
- package/lib/tree/src/styles/index.cssr.js +33 -33
- package/lib/tree-select/src/TreeSelect.d.ts +8 -8
- package/lib/tree-select/src/TreeSelect.js +8 -8
- package/lib/tree-select/src/styles/index.cssr.js +18 -18
- package/lib/upload/src/Upload.js +16 -16
- package/lib/upload/src/styles/index.cssr.js +36 -36
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +26 -26
- package/web-types.json +1 -1
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { onBeforeMount } from 'vue';
|
|
2
1
|
let houdiniRegistered = false;
|
|
3
2
|
export function useHoudini() {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
if (typeof window === 'undefined')
|
|
4
|
+
return;
|
|
5
|
+
if (!window.CSS)
|
|
6
|
+
return;
|
|
7
|
+
if (!houdiniRegistered) {
|
|
8
|
+
houdiniRegistered = true;
|
|
9
|
+
if ('registerProperty' in (window === null || window === void 0 ? void 0 : window.CSS)) {
|
|
10
|
+
try {
|
|
9
11
|
;
|
|
10
12
|
CSS.registerProperty({
|
|
11
13
|
name: '--color-start',
|
|
@@ -20,6 +22,7 @@ export function useHoudini() {
|
|
|
20
22
|
initialValue: '#0000'
|
|
21
23
|
});
|
|
22
24
|
}
|
|
25
|
+
catch (e) { }
|
|
23
26
|
}
|
|
24
|
-
}
|
|
27
|
+
}
|
|
25
28
|
}
|
|
@@ -1072,8 +1072,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1072
1072
|
};
|
|
1073
1073
|
}>;
|
|
1074
1074
|
cssVars: import("vue").ComputedRef<{
|
|
1075
|
-
'--menu-box-shadow': string;
|
|
1076
|
-
'--bezier': string;
|
|
1075
|
+
'--n-menu-box-shadow': string;
|
|
1076
|
+
'--n-bezier': string;
|
|
1077
1077
|
}>;
|
|
1078
1078
|
mergedBordered: import("vue").ComputedRef<boolean>;
|
|
1079
1079
|
namespace: import("vue").ComputedRef<string | undefined>;
|
|
@@ -206,8 +206,8 @@ export default defineComponent({
|
|
|
206
206
|
cssVars: computed(() => {
|
|
207
207
|
const { common: { cubicBezierEaseInOut }, self: { menuBoxShadow } } = themeRef.value;
|
|
208
208
|
return {
|
|
209
|
-
'--menu-box-shadow': menuBoxShadow,
|
|
210
|
-
'--bezier': cubicBezierEaseInOut
|
|
209
|
+
'--n-menu-box-shadow': menuBoxShadow,
|
|
210
|
+
'--n-bezier': cubicBezierEaseInOut
|
|
211
211
|
};
|
|
212
212
|
}),
|
|
213
213
|
mergedBordered: mergedBorderedRef,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c, cB } from '../../../_utils/cssr';
|
|
2
2
|
import fadeInScaleUpTransition from '../../../_styles/transitions/fade-in-scale-up.cssr'; // vars:
|
|
3
|
-
// --bezier
|
|
4
|
-
// --menu-box-shadow
|
|
3
|
+
// --n-bezier
|
|
4
|
+
// --n-menu-box-shadow
|
|
5
5
|
|
|
6
6
|
export default c([cB('auto-complete', `
|
|
7
7
|
z-index: auto;
|
|
@@ -10,7 +10,7 @@ export default c([cB('auto-complete', `
|
|
|
10
10
|
width: 100%;
|
|
11
11
|
`), cB('auto-complete-menu', `
|
|
12
12
|
margin: 4px 0;
|
|
13
|
-
box-shadow: var(--menu-box-shadow);
|
|
13
|
+
box-shadow: var(--n-menu-box-shadow);
|
|
14
14
|
`, [fadeInScaleUpTransition({
|
|
15
|
-
originalTransition: 'background-color .3s var(--bezier)'
|
|
15
|
+
originalTransition: 'background-color .3s var(--n-bezier)'
|
|
16
16
|
})])]);
|
|
@@ -101,11 +101,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
101
101
|
mergedClsPrefix: import("vue").ComputedRef<string>;
|
|
102
102
|
fitTextTransform: () => void;
|
|
103
103
|
cssVars: import("vue").ComputedRef<{
|
|
104
|
-
'--font-size': string;
|
|
105
|
-
'--border-radius': string;
|
|
106
|
-
'--color': string;
|
|
107
|
-
'--bezier': string;
|
|
108
|
-
'--merged-size': string;
|
|
104
|
+
'--n-font-size': string;
|
|
105
|
+
'--n-border-radius': string;
|
|
106
|
+
'--n-color': string;
|
|
107
|
+
'--n-bezier': string;
|
|
108
|
+
'--n-merged-size': string;
|
|
109
109
|
}>;
|
|
110
110
|
hasLoadError: import("vue").Ref<boolean>;
|
|
111
111
|
handleError: (e: Event) => void;
|
package/es/avatar/src/Avatar.js
CHANGED
|
@@ -74,11 +74,11 @@ export default defineComponent({
|
|
|
74
74
|
height = themeRef.value.self[createKey('height', size)];
|
|
75
75
|
}
|
|
76
76
|
return {
|
|
77
|
-
'--font-size': fontSize,
|
|
78
|
-
'--border-radius': mergedRoundRef.value ? '50%' : borderRadius,
|
|
79
|
-
'--color': propColor || color,
|
|
80
|
-
'--bezier': cubicBezierEaseInOut,
|
|
81
|
-
'--merged-size': `var(--avatar-size-override, ${height})`
|
|
77
|
+
'--n-font-size': fontSize,
|
|
78
|
+
'--n-border-radius': mergedRoundRef.value ? '50%' : borderRadius,
|
|
79
|
+
'--n-color': propColor || color,
|
|
80
|
+
'--n-bezier': cubicBezierEaseInOut,
|
|
81
|
+
'--n-merged-size': `var(--n-avatar-size-override, ${height})`
|
|
82
82
|
};
|
|
83
83
|
}),
|
|
84
84
|
hasLoadError: hasLoadErrorRef,
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { c, cE, cB } from '../../../_utils/cssr'; // vars:
|
|
2
|
-
// --font-size
|
|
3
|
-
// --border-radius
|
|
4
|
-
// --color
|
|
5
|
-
// --bezier
|
|
6
|
-
// --merged-size
|
|
2
|
+
// --n-font-size
|
|
3
|
+
// --n-border-radius
|
|
4
|
+
// --n-color
|
|
5
|
+
// --n-bezier
|
|
6
|
+
// --n-merged-size
|
|
7
7
|
|
|
8
8
|
export default cB('avatar', `
|
|
9
|
-
width: var(--merged-size);
|
|
10
|
-
height: var(--merged-size);
|
|
9
|
+
width: var(--n-merged-size);
|
|
10
|
+
height: var(--n-merged-size);
|
|
11
11
|
color: #FFF;
|
|
12
|
-
font-size: var(--font-size);
|
|
12
|
+
font-size: var(--n-font-size);
|
|
13
13
|
display: inline-flex;
|
|
14
14
|
position: relative;
|
|
15
15
|
overflow: hidden;
|
|
16
16
|
text-align: center;
|
|
17
|
-
border-radius: var(--border-radius);
|
|
18
|
-
background-color: var(--color);
|
|
17
|
+
border-radius: var(--n-border-radius);
|
|
18
|
+
background-color: var(--n-color);
|
|
19
19
|
transition:
|
|
20
|
-
background-color .3s var(--bezier),
|
|
21
|
-
color .3s var(--bezier);
|
|
20
|
+
background-color .3s var(--n-bezier),
|
|
21
|
+
color .3s var(--n-bezier);
|
|
22
22
|
`, [c('img', `
|
|
23
23
|
width: 100%;
|
|
24
24
|
height: 100%;
|
|
@@ -30,5 +30,5 @@ export default cB('avatar', `
|
|
|
30
30
|
top: 50%;
|
|
31
31
|
`), cB('icon', `
|
|
32
32
|
vertical-align: bottom;
|
|
33
|
-
font-size: calc(var(--merged-size) - 6px);
|
|
33
|
+
font-size: calc(var(--n-merged-size) - 6px);
|
|
34
34
|
`), cE('text', 'line-height: 1.25')]);
|
|
@@ -185,19 +185,19 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
185
185
|
handleScroll: () => void;
|
|
186
186
|
handleClick: (e: MouseEvent) => void;
|
|
187
187
|
cssVars: import("vue").ComputedRef<{
|
|
188
|
-
'--bezier': string;
|
|
189
|
-
'--border-radius': string;
|
|
190
|
-
'--height': string;
|
|
191
|
-
'--width': string;
|
|
192
|
-
'--box-shadow': string;
|
|
193
|
-
'--box-shadow-hover': string;
|
|
194
|
-
'--box-shadow-pressed': string;
|
|
195
|
-
'--color': string;
|
|
196
|
-
'--icon-size': string;
|
|
197
|
-
'--icon-color': string;
|
|
198
|
-
'--icon-color-hover': string;
|
|
199
|
-
'--icon-color-pressed': string;
|
|
200
|
-
'--text-color': string;
|
|
188
|
+
'--n-bezier': string;
|
|
189
|
+
'--n-border-radius': string;
|
|
190
|
+
'--n-height': string;
|
|
191
|
+
'--n-width': string;
|
|
192
|
+
'--n-box-shadow': string;
|
|
193
|
+
'--n-box-shadow-hover': string;
|
|
194
|
+
'--n-box-shadow-pressed': string;
|
|
195
|
+
'--n-color': string;
|
|
196
|
+
'--n-icon-size': string;
|
|
197
|
+
'--n-icon-color': string;
|
|
198
|
+
'--n-icon-color-hover': string;
|
|
199
|
+
'--n-icon-color-pressed': string;
|
|
200
|
+
'--n-text-color': string;
|
|
201
201
|
}>;
|
|
202
202
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
203
203
|
readonly show?: unknown;
|
|
@@ -173,19 +173,19 @@ export default defineComponent({
|
|
|
173
173
|
cssVars: computed(() => {
|
|
174
174
|
const { self: { color, boxShadow, boxShadowHover, boxShadowPressed, iconColor, iconColorHover, iconColorPressed, width, height, iconSize, borderRadius, textColor }, common: { cubicBezierEaseInOut } } = themeRef.value;
|
|
175
175
|
return {
|
|
176
|
-
'--bezier': cubicBezierEaseInOut,
|
|
177
|
-
'--border-radius': borderRadius,
|
|
178
|
-
'--height': height,
|
|
179
|
-
'--width': width,
|
|
180
|
-
'--box-shadow': boxShadow,
|
|
181
|
-
'--box-shadow-hover': boxShadowHover,
|
|
182
|
-
'--box-shadow-pressed': boxShadowPressed,
|
|
183
|
-
'--color': color,
|
|
184
|
-
'--icon-size': iconSize,
|
|
185
|
-
'--icon-color': iconColor,
|
|
186
|
-
'--icon-color-hover': iconColorHover,
|
|
187
|
-
'--icon-color-pressed': iconColorPressed,
|
|
188
|
-
'--text-color': textColor
|
|
176
|
+
'--n-bezier': cubicBezierEaseInOut,
|
|
177
|
+
'--n-border-radius': borderRadius,
|
|
178
|
+
'--n-height': height,
|
|
179
|
+
'--n-width': width,
|
|
180
|
+
'--n-box-shadow': boxShadow,
|
|
181
|
+
'--n-box-shadow-hover': boxShadowHover,
|
|
182
|
+
'--n-box-shadow-pressed': boxShadowPressed,
|
|
183
|
+
'--n-color': color,
|
|
184
|
+
'--n-icon-size': iconSize,
|
|
185
|
+
'--n-icon-color': iconColor,
|
|
186
|
+
'--n-icon-color-hover': iconColorHover,
|
|
187
|
+
'--n-icon-color-pressed': iconColorPressed,
|
|
188
|
+
'--n-text-color': textColor
|
|
189
189
|
};
|
|
190
190
|
})
|
|
191
191
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { c, cB, cM } from '../../../_utils/cssr';
|
|
2
2
|
import fadeInScaleUpTransition from '../../../_styles/transitions/fade-in-scale-up.cssr'; // vars:
|
|
3
|
-
// --bezier
|
|
4
|
-
// --border-radius
|
|
5
|
-
// --height
|
|
6
|
-
// --width
|
|
7
|
-
// --box-shadow
|
|
8
|
-
// --box-shadow-hover
|
|
9
|
-
// --box-shadow-pressed
|
|
10
|
-
// --color
|
|
11
|
-
// --icon-size
|
|
12
|
-
// --icon-color
|
|
13
|
-
// --icon-color-hover
|
|
14
|
-
// --icon-color-pressed
|
|
15
|
-
// --text-color
|
|
3
|
+
// --n-bezier
|
|
4
|
+
// --n-border-radius
|
|
5
|
+
// --n-height
|
|
6
|
+
// --n-width
|
|
7
|
+
// --n-box-shadow
|
|
8
|
+
// --n-box-shadow-hover
|
|
9
|
+
// --n-box-shadow-pressed
|
|
10
|
+
// --n-color
|
|
11
|
+
// --n-icon-size
|
|
12
|
+
// --n-icon-color
|
|
13
|
+
// --n-icon-color-hover
|
|
14
|
+
// --n-icon-color-pressed
|
|
15
|
+
// --n-text-color
|
|
16
16
|
|
|
17
17
|
export default cB('back-top', `
|
|
18
18
|
position: fixed;
|
|
@@ -22,30 +22,30 @@ export default cB('back-top', `
|
|
|
22
22
|
display: flex;
|
|
23
23
|
align-items: center;
|
|
24
24
|
justify-content: center;
|
|
25
|
-
color: var(--text-color);
|
|
25
|
+
color: var(--n-text-color);
|
|
26
26
|
transition:
|
|
27
|
-
color .3s var(--bezier),
|
|
28
|
-
box-shadow .3s var(--bezier),
|
|
29
|
-
background-color .3s var(--bezier);
|
|
30
|
-
border-radius: var(--border-radius);
|
|
31
|
-
height: var(--height);
|
|
32
|
-
min-width: var(--width);
|
|
33
|
-
box-shadow: var(--box-shadow);
|
|
34
|
-
background-color: var(--color);
|
|
27
|
+
color .3s var(--n-bezier),
|
|
28
|
+
box-shadow .3s var(--n-bezier),
|
|
29
|
+
background-color .3s var(--n-bezier);
|
|
30
|
+
border-radius: var(--n-border-radius);
|
|
31
|
+
height: var(--n-height);
|
|
32
|
+
min-width: var(--n-width);
|
|
33
|
+
box-shadow: var(--n-box-shadow);
|
|
34
|
+
background-color: var(--n-color);
|
|
35
35
|
`, [fadeInScaleUpTransition(), cM('transition-disabled', {
|
|
36
36
|
transition: 'none !important'
|
|
37
37
|
}), cB('base-icon', `
|
|
38
|
-
font-size: var(--icon-size);
|
|
39
|
-
color: var(--icon-color);
|
|
40
|
-
transition: color .3s var(--bezier);
|
|
38
|
+
font-size: var(--n-icon-size);
|
|
39
|
+
color: var(--n-icon-color);
|
|
40
|
+
transition: color .3s var(--n-bezier);
|
|
41
41
|
`), c('svg', {
|
|
42
42
|
pointerEvents: 'none'
|
|
43
43
|
}), c('&:hover', {
|
|
44
|
-
boxShadow: 'var(--box-shadow-hover)'
|
|
44
|
+
boxShadow: 'var(--n-box-shadow-hover)'
|
|
45
45
|
}, [cB('base-icon', {
|
|
46
|
-
color: 'var(--icon-color-hover)'
|
|
46
|
+
color: 'var(--n-icon-color-hover)'
|
|
47
47
|
})]), c('&:active', {
|
|
48
|
-
boxShadow: 'var(--box-shadow-pressed)'
|
|
48
|
+
boxShadow: 'var(--n-box-shadow-pressed)'
|
|
49
49
|
}, [cB('base-icon', {
|
|
50
|
-
color: 'var(--icon-color-pressed)'
|
|
50
|
+
color: 'var(--n-icon-color-pressed)'
|
|
51
51
|
})])]);
|
|
@@ -36,10 +36,9 @@ export default defineComponent({
|
|
|
36
36
|
cell = get(row, key);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
|
|
40
|
-
if (tooltip) {
|
|
39
|
+
if (ellipsis && typeof ellipsis === 'object') {
|
|
41
40
|
const { mergedTheme } = this;
|
|
42
|
-
return (h(NEllipsis, {
|
|
41
|
+
return (h(NEllipsis, Object.assign({}, ellipsis, { theme: mergedTheme.peers.Ellipsis, themeOverrides: mergedTheme.peerOverrides.Ellipsis }), { default: () => cell }));
|
|
43
42
|
}
|
|
44
43
|
return cell;
|
|
45
44
|
}
|
|
@@ -105,7 +105,7 @@ export default defineComponent({
|
|
|
105
105
|
column.type === 'selection' ? (h(Fragment, null,
|
|
106
106
|
h(NCheckbox, { key: currentPage, privateInsideTable: true, checked: allRowsChecked, indeterminate: someRowsChecked, disabled: headerCheckboxDisabled, onUpdateChecked: handleCheckboxUpdateChecked }),
|
|
107
107
|
checkOptions ? (h(SelectionMenu, { clsPrefix: mergedClsPrefix })) : null)) : ellipsis === true || (ellipsis && !ellipsis.tooltip) ? (h("div", { class: `${mergedClsPrefix}-data-table-th__ellipsis` }, renderTitle(column))) // eslint-disable-next-line @typescript-eslint/prefer-optional-chain
|
|
108
|
-
: ellipsis && ellipsis
|
|
108
|
+
: ellipsis && typeof ellipsis === 'object' ? (h(NEllipsis, Object.assign({}, ellipsis, { theme: mergedTheme.peers.Ellipsis, themeOverrides: mergedTheme.peerOverrides.Ellipsis }), {
|
|
109
109
|
default: () => renderTitle(column)
|
|
110
110
|
})) : (renderTitle(column)),
|
|
111
111
|
isColumnSortable(column) ? (h(SortButton, { column: column })) : null,
|
|
@@ -4,13 +4,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4
4
|
readonly default: () => string[];
|
|
5
5
|
};
|
|
6
6
|
readonly active: BooleanConstructor;
|
|
7
|
-
readonly dateFormat:
|
|
8
|
-
readonly type: StringConstructor;
|
|
9
|
-
readonly default: "yyyy-MM-dd";
|
|
10
|
-
};
|
|
7
|
+
readonly dateFormat: StringConstructor;
|
|
11
8
|
readonly timeFormat: {
|
|
12
9
|
readonly type: StringConstructor;
|
|
13
|
-
readonly
|
|
10
|
+
readonly value: "HH:mm:ss";
|
|
14
11
|
};
|
|
15
12
|
readonly value: {
|
|
16
13
|
readonly type: import("vue").PropType<import("../interface").Value | null>;
|
|
@@ -1149,22 +1146,20 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1149
1146
|
} & {
|
|
1150
1147
|
value: import("../interface").Value | null;
|
|
1151
1148
|
active: boolean;
|
|
1152
|
-
dateFormat: string;
|
|
1153
1149
|
onUpdateValue: import("../interface").OnPanelUpdateValue;
|
|
1154
1150
|
actions: string[];
|
|
1155
|
-
timeFormat: string;
|
|
1156
1151
|
} & {
|
|
1152
|
+
dateFormat?: string | undefined;
|
|
1157
1153
|
onTabOut?: Function | undefined;
|
|
1158
1154
|
onClose?: import("../interface").OnClose | undefined;
|
|
1159
1155
|
onConfirm?: Function | undefined;
|
|
1160
1156
|
defaultTime?: import("../interface").DefaultTime | undefined;
|
|
1157
|
+
timeFormat?: string | undefined;
|
|
1161
1158
|
shortcuts?: import("../interface").Shortcuts | undefined;
|
|
1162
1159
|
}>, {
|
|
1163
1160
|
value: import("../interface").Value | null;
|
|
1164
1161
|
active: boolean;
|
|
1165
|
-
dateFormat: string;
|
|
1166
1162
|
actions: string[];
|
|
1167
|
-
timeFormat: string;
|
|
1168
1163
|
}>;
|
|
1169
1164
|
/**
|
|
1170
1165
|
* Date Panel
|
|
@@ -4,13 +4,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4
4
|
readonly default: () => string[];
|
|
5
5
|
};
|
|
6
6
|
readonly active: BooleanConstructor;
|
|
7
|
-
readonly dateFormat:
|
|
8
|
-
readonly type: StringConstructor;
|
|
9
|
-
readonly default: "yyyy-MM-dd";
|
|
10
|
-
};
|
|
7
|
+
readonly dateFormat: StringConstructor;
|
|
11
8
|
readonly timeFormat: {
|
|
12
9
|
readonly type: StringConstructor;
|
|
13
|
-
readonly
|
|
10
|
+
readonly value: "HH:mm:ss";
|
|
14
11
|
};
|
|
15
12
|
readonly value: {
|
|
16
13
|
readonly type: import("vue").PropType<import("../interface").Value | null>;
|
|
@@ -1148,21 +1145,19 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1148
1145
|
} & {
|
|
1149
1146
|
value: import("../interface").Value | null;
|
|
1150
1147
|
active: boolean;
|
|
1151
|
-
dateFormat: string;
|
|
1152
1148
|
onUpdateValue: import("../interface").OnPanelUpdateValue;
|
|
1153
1149
|
actions: unknown[];
|
|
1154
|
-
timeFormat: string;
|
|
1155
1150
|
} & {
|
|
1151
|
+
dateFormat?: string | undefined;
|
|
1156
1152
|
onTabOut?: Function | undefined;
|
|
1157
1153
|
onClose?: import("../interface").OnClose | undefined;
|
|
1158
1154
|
onConfirm?: Function | undefined;
|
|
1159
1155
|
defaultTime?: import("../interface").DefaultTime | undefined;
|
|
1156
|
+
timeFormat?: string | undefined;
|
|
1160
1157
|
shortcuts?: import("../interface").Shortcuts | undefined;
|
|
1161
1158
|
}>, {
|
|
1162
1159
|
value: import("../interface").Value | null;
|
|
1163
1160
|
active: boolean;
|
|
1164
|
-
dateFormat: string;
|
|
1165
1161
|
actions: unknown[];
|
|
1166
|
-
timeFormat: string;
|
|
1167
1162
|
}>;
|
|
1168
1163
|
export default _default;
|
|
@@ -4,13 +4,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4
4
|
readonly default: () => string[];
|
|
5
5
|
};
|
|
6
6
|
readonly active: BooleanConstructor;
|
|
7
|
-
readonly dateFormat:
|
|
8
|
-
readonly type: StringConstructor;
|
|
9
|
-
readonly default: "yyyy-MM-dd";
|
|
10
|
-
};
|
|
7
|
+
readonly dateFormat: StringConstructor;
|
|
11
8
|
readonly timeFormat: {
|
|
12
9
|
readonly type: StringConstructor;
|
|
13
|
-
readonly
|
|
10
|
+
readonly value: "HH:mm:ss";
|
|
14
11
|
};
|
|
15
12
|
readonly value: {
|
|
16
13
|
readonly type: import("vue").PropType<import("../interface").Value | null>;
|
|
@@ -1149,22 +1146,20 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1149
1146
|
} & {
|
|
1150
1147
|
value: import("../interface").Value | null;
|
|
1151
1148
|
active: boolean;
|
|
1152
|
-
dateFormat: string;
|
|
1153
1149
|
onUpdateValue: import("../interface").OnPanelUpdateValue;
|
|
1154
1150
|
actions: string[];
|
|
1155
|
-
timeFormat: string;
|
|
1156
1151
|
} & {
|
|
1152
|
+
dateFormat?: string | undefined;
|
|
1157
1153
|
onTabOut?: Function | undefined;
|
|
1158
1154
|
onClose?: import("../interface").OnClose | undefined;
|
|
1159
1155
|
onConfirm?: Function | undefined;
|
|
1160
1156
|
defaultTime?: import("../interface").DefaultTime | undefined;
|
|
1157
|
+
timeFormat?: string | undefined;
|
|
1161
1158
|
shortcuts?: import("../interface").Shortcuts | undefined;
|
|
1162
1159
|
}>, {
|
|
1163
1160
|
value: import("../interface").Value | null;
|
|
1164
1161
|
active: boolean;
|
|
1165
|
-
dateFormat: string;
|
|
1166
1162
|
actions: string[];
|
|
1167
|
-
timeFormat: string;
|
|
1168
1163
|
}>;
|
|
1169
1164
|
/**
|
|
1170
1165
|
* DateTime Panel
|
|
@@ -4,13 +4,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4
4
|
readonly default: () => string[];
|
|
5
5
|
};
|
|
6
6
|
readonly active: BooleanConstructor;
|
|
7
|
-
readonly dateFormat:
|
|
8
|
-
readonly type: StringConstructor;
|
|
9
|
-
readonly default: "yyyy-MM-dd";
|
|
10
|
-
};
|
|
7
|
+
readonly dateFormat: StringConstructor;
|
|
11
8
|
readonly timeFormat: {
|
|
12
9
|
readonly type: StringConstructor;
|
|
13
|
-
readonly
|
|
10
|
+
readonly value: "HH:mm:ss";
|
|
14
11
|
};
|
|
15
12
|
readonly value: {
|
|
16
13
|
readonly type: import("vue").PropType<import("../interface").Value | null>;
|
|
@@ -1148,21 +1145,19 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1148
1145
|
} & {
|
|
1149
1146
|
value: import("../interface").Value | null;
|
|
1150
1147
|
active: boolean;
|
|
1151
|
-
dateFormat: string;
|
|
1152
1148
|
onUpdateValue: import("../interface").OnPanelUpdateValue;
|
|
1153
1149
|
actions: unknown[];
|
|
1154
|
-
timeFormat: string;
|
|
1155
1150
|
} & {
|
|
1151
|
+
dateFormat?: string | undefined;
|
|
1156
1152
|
onTabOut?: Function | undefined;
|
|
1157
1153
|
onClose?: import("../interface").OnClose | undefined;
|
|
1158
1154
|
onConfirm?: Function | undefined;
|
|
1159
1155
|
defaultTime?: import("../interface").DefaultTime | undefined;
|
|
1156
|
+
timeFormat?: string | undefined;
|
|
1160
1157
|
shortcuts?: import("../interface").Shortcuts | undefined;
|
|
1161
1158
|
}>, {
|
|
1162
1159
|
value: import("../interface").Value | null;
|
|
1163
1160
|
active: boolean;
|
|
1164
|
-
dateFormat: string;
|
|
1165
1161
|
actions: unknown[];
|
|
1166
|
-
timeFormat: string;
|
|
1167
1162
|
}>;
|
|
1168
1163
|
export default _default;
|
|
@@ -10,13 +10,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
10
10
|
readonly default: () => string[];
|
|
11
11
|
};
|
|
12
12
|
active: BooleanConstructor;
|
|
13
|
-
dateFormat:
|
|
14
|
-
readonly type: StringConstructor;
|
|
15
|
-
readonly default: "yyyy-MM-dd";
|
|
16
|
-
};
|
|
13
|
+
dateFormat: StringConstructor;
|
|
17
14
|
timeFormat: {
|
|
18
15
|
readonly type: StringConstructor;
|
|
19
|
-
readonly
|
|
16
|
+
readonly value: "HH:mm:ss";
|
|
20
17
|
};
|
|
21
18
|
value: {
|
|
22
19
|
readonly type: PropType<import("../interface").Value | null>;
|
|
@@ -1158,22 +1155,20 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1158
1155
|
type: "month" | "year" | "quarter";
|
|
1159
1156
|
value: import("../interface").Value | null;
|
|
1160
1157
|
active: boolean;
|
|
1161
|
-
dateFormat: string;
|
|
1162
1158
|
onUpdateValue: import("../interface").OnPanelUpdateValue;
|
|
1163
1159
|
actions: string[];
|
|
1164
|
-
timeFormat: string;
|
|
1165
1160
|
} & {
|
|
1161
|
+
dateFormat?: string | undefined;
|
|
1166
1162
|
onTabOut?: Function | undefined;
|
|
1167
1163
|
onClose?: import("../interface").OnClose | undefined;
|
|
1168
1164
|
onConfirm?: Function | undefined;
|
|
1169
1165
|
defaultTime?: import("../interface").DefaultTime | undefined;
|
|
1166
|
+
timeFormat?: string | undefined;
|
|
1170
1167
|
shortcuts?: import("../interface").Shortcuts | undefined;
|
|
1171
1168
|
}>, {
|
|
1172
1169
|
value: import("../interface").Value | null;
|
|
1173
1170
|
active: boolean;
|
|
1174
|
-
dateFormat: string;
|
|
1175
1171
|
actions: string[];
|
|
1176
|
-
timeFormat: string;
|
|
1177
1172
|
}>;
|
|
1178
1173
|
/**
|
|
1179
1174
|
* Month Panel
|
|
@@ -7,13 +7,10 @@ declare const useCalendarProps: {
|
|
|
7
7
|
readonly default: () => string[];
|
|
8
8
|
};
|
|
9
9
|
readonly active: BooleanConstructor;
|
|
10
|
-
readonly dateFormat:
|
|
11
|
-
readonly type: StringConstructor;
|
|
12
|
-
readonly default: "yyyy-MM-dd";
|
|
13
|
-
};
|
|
10
|
+
readonly dateFormat: StringConstructor;
|
|
14
11
|
readonly timeFormat: {
|
|
15
12
|
readonly type: StringConstructor;
|
|
16
|
-
readonly
|
|
13
|
+
readonly value: "HH:mm:ss";
|
|
17
14
|
};
|
|
18
15
|
readonly value: {
|
|
19
16
|
readonly type: PropType<import("../interface").Value | null>;
|
|
@@ -23,9 +23,10 @@ function useCalendar(props, type) {
|
|
|
23
23
|
isMinuteDisabled: isMinuteDisabledRef,
|
|
24
24
|
isSecondDisabled: isSecondDisabledRef
|
|
25
25
|
};
|
|
26
|
+
const mergedDateFormatRef = computed(() => props.dateFormat || localeRef.value.dateFormat);
|
|
26
27
|
const dateInputValueRef = ref(props.value === null || Array.isArray(props.value)
|
|
27
28
|
? ''
|
|
28
|
-
: format(props.value,
|
|
29
|
+
: format(props.value, mergedDateFormatRef.value));
|
|
29
30
|
const calendarValueRef = ref(props.value === null || Array.isArray(props.value)
|
|
30
31
|
? Date.now()
|
|
31
32
|
: props.value);
|
|
@@ -65,7 +66,7 @@ function useCalendar(props, type) {
|
|
|
65
66
|
});
|
|
66
67
|
watch(computed(() => props.value), (value) => {
|
|
67
68
|
if (value !== null && !Array.isArray(value)) {
|
|
68
|
-
dateInputValueRef.value = format(value,
|
|
69
|
+
dateInputValueRef.value = format(value, mergedDateFormatRef.value, panelCommon.dateFnsOptions.value);
|
|
69
70
|
calendarValueRef.value = value;
|
|
70
71
|
}
|
|
71
72
|
else {
|
|
@@ -90,7 +91,7 @@ function useCalendar(props, type) {
|
|
|
90
91
|
return isDateDisabled(ts);
|
|
91
92
|
}
|
|
92
93
|
function handleDateInput(value) {
|
|
93
|
-
const date = strictParse(value,
|
|
94
|
+
const date = strictParse(value, mergedDateFormatRef.value, new Date(), panelCommon.dateFnsOptions.value);
|
|
94
95
|
if (isValid(date)) {
|
|
95
96
|
if (props.value === null) {
|
|
96
97
|
panelCommon.doUpdateValue(getTime(sanitizeValue(Date.now())), false);
|
|
@@ -109,7 +110,7 @@ function useCalendar(props, type) {
|
|
|
109
110
|
}
|
|
110
111
|
}
|
|
111
112
|
function handleDateInputBlur() {
|
|
112
|
-
const date = strictParse(dateInputValueRef.value,
|
|
113
|
+
const date = strictParse(dateInputValueRef.value, mergedDateFormatRef.value, new Date(), panelCommon.dateFnsOptions.value);
|
|
113
114
|
if (isValid(date)) {
|
|
114
115
|
if (props.value === null) {
|
|
115
116
|
panelCommon.doUpdateValue(getTime(sanitizeValue(Date.now())), false);
|
|
@@ -184,7 +185,7 @@ function useCalendar(props, type) {
|
|
|
184
185
|
if (time === undefined) {
|
|
185
186
|
time = props.value;
|
|
186
187
|
}
|
|
187
|
-
dateInputValueRef.value = format(time,
|
|
188
|
+
dateInputValueRef.value = format(time, mergedDateFormatRef.value, panelCommon.dateFnsOptions.value);
|
|
188
189
|
}
|
|
189
190
|
function handleConfirmClick() {
|
|
190
191
|
if (validation.isDateInvalid.value || validation.isTimeInvalid.value) {
|
|
@@ -7,13 +7,10 @@ declare const useDualCalendarProps: {
|
|
|
7
7
|
readonly default: () => string[];
|
|
8
8
|
};
|
|
9
9
|
readonly active: BooleanConstructor;
|
|
10
|
-
readonly dateFormat:
|
|
11
|
-
readonly type: StringConstructor;
|
|
12
|
-
readonly default: "yyyy-MM-dd";
|
|
13
|
-
};
|
|
10
|
+
readonly dateFormat: StringConstructor;
|
|
14
11
|
readonly timeFormat: {
|
|
15
12
|
readonly type: StringConstructor;
|
|
16
|
-
readonly
|
|
13
|
+
readonly value: "HH:mm:ss";
|
|
17
14
|
};
|
|
18
15
|
readonly value: {
|
|
19
16
|
readonly type: import("vue").PropType<import("../interface").Value | null>;
|