naive-ui 2.24.2 → 2.24.6

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.
Files changed (64) hide show
  1. package/es/color-picker/src/ColorPicker.d.ts +14 -0
  2. package/es/color-picker/src/ColorPicker.js +7 -3
  3. package/es/color-picker/src/ColorPickerTrigger.d.ts +3 -0
  4. package/es/color-picker/src/ColorPickerTrigger.js +6 -2
  5. package/es/color-picker/src/styles/index.cssr.js +1 -1
  6. package/es/date-picker/src/DatePicker.d.ts +11 -0
  7. package/es/date-picker/src/DatePicker.js +2 -1
  8. package/es/date-picker/src/panel/date.d.ts +1 -0
  9. package/es/date-picker/src/panel/daterange.d.ts +1 -0
  10. package/es/date-picker/src/panel/datetime.d.ts +1 -0
  11. package/es/date-picker/src/panel/datetimerange.d.ts +1 -0
  12. package/es/date-picker/src/panel/month.d.ts +1 -0
  13. package/es/date-picker/src/panel/panelHeader.d.ts +2 -0
  14. package/es/date-picker/src/panel/panelHeader.js +7 -3
  15. package/es/date-picker/src/panel/use-calendar.d.ts +1 -0
  16. package/es/date-picker/src/panel/use-dual-calendar.d.ts +1 -0
  17. package/es/date-picker/src/panel/use-panel-common.d.ts +1 -0
  18. package/es/date-picker/src/styles/index.cssr.js +13 -2
  19. package/es/date-picker/styles/light.d.ts +2 -0
  20. package/es/date-picker/styles/light.js +1 -1
  21. package/es/dialog/src/Dialog.js +0 -1
  22. package/es/dynamic-input/src/DynamicInput.d.ts +6 -32
  23. package/es/dynamic-input/src/DynamicInput.js +14 -20
  24. package/es/icon/src/Icon.d.ts +3 -1
  25. package/es/icon/src/Icon.js +4 -4
  26. package/es/input/src/styles/input.cssr.js +1 -0
  27. package/es/layout/src/LayoutSider.js +2 -1
  28. package/es/layout/src/styles/layout-sider.cssr.js +4 -4
  29. package/es/theme-editor/src/ThemeEditor.js +1 -1
  30. package/es/version.d.ts +1 -1
  31. package/es/version.js +1 -1
  32. package/lib/color-picker/src/ColorPicker.d.ts +14 -0
  33. package/lib/color-picker/src/ColorPicker.js +7 -3
  34. package/lib/color-picker/src/ColorPickerTrigger.d.ts +3 -0
  35. package/lib/color-picker/src/ColorPickerTrigger.js +6 -2
  36. package/lib/color-picker/src/styles/index.cssr.js +1 -1
  37. package/lib/date-picker/src/DatePicker.d.ts +11 -0
  38. package/lib/date-picker/src/DatePicker.js +2 -1
  39. package/lib/date-picker/src/panel/date.d.ts +1 -0
  40. package/lib/date-picker/src/panel/daterange.d.ts +1 -0
  41. package/lib/date-picker/src/panel/datetime.d.ts +1 -0
  42. package/lib/date-picker/src/panel/datetimerange.d.ts +1 -0
  43. package/lib/date-picker/src/panel/month.d.ts +1 -0
  44. package/lib/date-picker/src/panel/panelHeader.d.ts +2 -0
  45. package/lib/date-picker/src/panel/panelHeader.js +7 -3
  46. package/lib/date-picker/src/panel/use-calendar.d.ts +1 -0
  47. package/lib/date-picker/src/panel/use-dual-calendar.d.ts +1 -0
  48. package/lib/date-picker/src/panel/use-panel-common.d.ts +1 -0
  49. package/lib/date-picker/src/styles/index.cssr.js +13 -2
  50. package/lib/date-picker/styles/light.d.ts +2 -0
  51. package/lib/date-picker/styles/light.js +1 -1
  52. package/lib/dialog/src/Dialog.js +0 -1
  53. package/lib/dynamic-input/src/DynamicInput.d.ts +6 -32
  54. package/lib/dynamic-input/src/DynamicInput.js +12 -18
  55. package/lib/icon/src/Icon.d.ts +3 -1
  56. package/lib/icon/src/Icon.js +3 -3
  57. package/lib/input/src/styles/input.cssr.js +1 -0
  58. package/lib/layout/src/LayoutSider.js +2 -1
  59. package/lib/layout/src/styles/layout-sider.cssr.js +4 -4
  60. package/lib/theme-editor/src/ThemeEditor.js +1 -1
  61. package/lib/version.d.ts +1 -1
  62. package/lib/version.js +1 -1
  63. package/package.json +8 -8
  64. package/web-types.json +19 -1
@@ -23,19 +23,19 @@ export default cB('layout-sider', `
23
23
  background-color: var(--n-color);
24
24
  display: flex;
25
25
  justify-content: flex-end;
26
- `, [cM('bordered', [c('&::after', `
26
+ `, [cM('bordered', [cE('border', `
27
27
  content: "";
28
28
  position: absolute;
29
29
  top: 0;
30
30
  bottom: 0;
31
31
  width: 1px;
32
32
  background-color: var(--n-border-color);
33
- transition: background-color .3s var(--bezier);
34
- `)]), cE('left-placement', [cM('bordered', [c('&::after', `
33
+ transition: background-color .3s var(--n-bezier);
34
+ `)]), cE('left-placement', [cM('bordered', [cE('border', `
35
35
  right: 0;
36
36
  `)])]), cM('right-placement', `
37
37
  justify-content: flex-start;
38
- `, [cM('bordered', [c('&::after', `
38
+ `, [cM('bordered', [cE('border', `
39
39
  left: 0;
40
40
  `)]), cM('collapsed', [cB('layout-toggle-button', [cB('base-icon', `
41
41
  transform: rotate(180deg);
@@ -20,7 +20,7 @@ const ColorWandIcon = (h("svg", { viewBox: "0 0 16 16", fill: "none", xmlns: "ht
20
20
  h("path", { d: "M8.72956 4.56346C9.4771 3.81592 10.6891 3.81592 11.4367 4.56347C12.1842 5.31102 12.1842 6.52303 11.4367 7.27058L4.26679 14.4404C3.51924 15.1879 2.30723 15.1879 1.55968 14.4404C0.812134 13.6928 0.812138 12.4808 1.55969 11.7333L8.72956 4.56346ZM8.25002 6.4572L2.26679 12.4404C1.90977 12.7974 1.90977 13.3763 2.26679 13.7333C2.62381 14.0903 3.20266 14.0903 3.55968 13.7333L9.54292 7.75009L8.25002 6.4572ZM10.25 7.04299L10.7295 6.56347C11.0866 6.20645 11.0866 5.6276 10.7296 5.27057C10.3725 4.91355 9.79368 4.91355 9.43666 5.27057L8.95713 5.7501L10.25 7.04299Z", fill: "currentColor" })));
21
21
  // button colorOpacitySecondary var is not color
22
22
  const showColorPicker = (key) => {
23
- if (key.includes('opacity'))
23
+ if (key.includes('pacity'))
24
24
  return false;
25
25
  if (key.includes('color') || key.includes('Color'))
26
26
  return true;
package/es/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "2.24.2";
1
+ declare const _default: "2.24.6";
2
2
  export default _default;
package/es/version.js CHANGED
@@ -1 +1 @@
1
- export default '2.24.2';
1
+ export default '2.24.6';
@@ -30,6 +30,10 @@ export declare const colorPickerPanelProps: {
30
30
  };
31
31
  readonly showPreview: BooleanConstructor;
32
32
  readonly swatches: PropType<string[]>;
33
+ readonly disabled: {
34
+ readonly type: PropType<boolean | undefined>;
35
+ readonly default: undefined;
36
+ };
33
37
  readonly actions: {
34
38
  readonly type: PropType<"confirm"[]>;
35
39
  readonly default: null;
@@ -914,6 +918,10 @@ declare const _default: import("vue").DefineComponent<{
914
918
  };
915
919
  readonly showPreview: BooleanConstructor;
916
920
  readonly swatches: PropType<string[]>;
921
+ readonly disabled: {
922
+ readonly type: PropType<boolean | undefined>;
923
+ readonly default: undefined;
924
+ };
917
925
  readonly actions: {
918
926
  readonly type: PropType<"confirm"[]>;
919
927
  readonly default: null;
@@ -1773,6 +1781,7 @@ declare const _default: import("vue").DefineComponent<{
1773
1781
  hsla: ComputedRef<HSLA | null>;
1774
1782
  rgba: ComputedRef<RGBA | null>;
1775
1783
  mergedShow: ComputedRef<boolean>;
1784
+ mergedDisabled: ComputedRef<boolean>;
1776
1785
  isMounted: Readonly<Ref<boolean>>;
1777
1786
  adjustedTo: ComputedRef<string | HTMLElement>;
1778
1787
  mergedValue: ComputedRef<string | null>;
@@ -1816,6 +1825,10 @@ declare const _default: import("vue").DefineComponent<{
1816
1825
  };
1817
1826
  readonly showPreview: BooleanConstructor;
1818
1827
  readonly swatches: PropType<string[]>;
1828
+ readonly disabled: {
1829
+ readonly type: PropType<boolean | undefined>;
1830
+ readonly default: undefined;
1831
+ };
1819
1832
  readonly actions: {
1820
1833
  readonly type: PropType<"confirm"[]>;
1821
1834
  readonly default: null;
@@ -2670,6 +2683,7 @@ declare const _default: import("vue").DefineComponent<{
2670
2683
  }>>>;
2671
2684
  }>>, {
2672
2685
  show: boolean | undefined;
2686
+ disabled: boolean | undefined;
2673
2687
  to: string | boolean | HTMLElement;
2674
2688
  defaultShow: boolean;
2675
2689
  showAlpha: boolean;
@@ -35,7 +35,10 @@ exports.colorPickerPanelProps = Object.assign(Object.assign({}, _mixins_1.useThe
35
35
  }, to: _utils_1.useAdjustedTo.propTo, showAlpha: {
36
36
  type: Boolean,
37
37
  default: true
38
- }, showPreview: Boolean, swatches: Array, actions: {
38
+ }, showPreview: Boolean, swatches: Array, disabled: {
39
+ type: Boolean,
40
+ default: undefined
41
+ }, actions: {
39
42
  type: Array,
40
43
  default: null
41
44
  }, internalActions: Array, size: String, renderLabel: Function, onComplete: Function, 'onUpdate:show': [Function, Array], onUpdateShow: [Function, Array], 'onUpdate:value': [Function, Array], onUpdateValue: [Function, Array] });
@@ -47,7 +50,7 @@ exports.default = (0, vue_1.defineComponent)({
47
50
  const selfRef = (0, vue_1.ref)(null);
48
51
  let upcomingValue = null;
49
52
  const formItem = (0, _mixins_1.useFormItem)(props);
50
- const { mergedSizeRef } = formItem;
53
+ const { mergedSizeRef, mergedDisabledRef } = formItem;
51
54
  const { localeRef } = (0, _mixins_1.useLocale)('global');
52
55
  const { mergedClsPrefixRef, namespaceRef } = (0, _mixins_1.useConfig)(props);
53
56
  const themeRef = (0, _mixins_1.useTheme)('ColorPicker', 'ColorPicker', index_cssr_1.default, styles_1.colorPickerLight, props, mergedClsPrefixRef);
@@ -383,6 +386,7 @@ exports.default = (0, vue_1.defineComponent)({
383
386
  hsla: hslaRef,
384
387
  rgba: rgbaRef,
385
388
  mergedShow: mergedShowRef,
389
+ mergedDisabled: mergedDisabledRef,
386
390
  isMounted: (0, vooks_1.useIsMounted)(),
387
391
  adjustedTo: (0, _utils_1.useAdjustedTo)(props),
388
392
  mergedValue: mergedValueRef,
@@ -405,7 +409,7 @@ exports.default = (0, vue_1.defineComponent)({
405
409
  (0, vue_1.h)(vueuc_1.VBinder, null, {
406
410
  default: () => [
407
411
  (0, vue_1.h)(vueuc_1.VTarget, null, {
408
- default: () => ((0, vue_1.h)(ColorPickerTrigger_1.default, { clsPrefix: mergedClsPrefix, value: this.mergedValue, hsla: this.hsla, onClick: this.handleTriggerClick }, {
412
+ default: () => ((0, vue_1.h)(ColorPickerTrigger_1.default, { clsPrefix: mergedClsPrefix, value: this.mergedValue, hsla: this.hsla, disabled: this.mergedDisabled, onClick: this.handleTriggerClick }, {
409
413
  label: $slots.label
410
414
  }))
411
415
  }),
@@ -13,6 +13,7 @@ declare const _default: import("vue").DefineComponent<{
13
13
  type: PropType<HSLA | null>;
14
14
  default: null;
15
15
  };
16
+ disabled: BooleanConstructor;
16
17
  onClick: PropType<() => void>;
17
18
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
18
19
  clsPrefix: {
@@ -27,9 +28,11 @@ declare const _default: import("vue").DefineComponent<{
27
28
  type: PropType<HSLA | null>;
28
29
  default: null;
29
30
  };
31
+ disabled: BooleanConstructor;
30
32
  onClick: PropType<() => void>;
31
33
  }>>, {
32
34
  value: string | null;
35
+ disabled: boolean;
33
36
  hsla: HSLA | null;
34
37
  }>;
35
38
  export default _default;
@@ -18,15 +18,19 @@ exports.default = (0, vue_1.defineComponent)({
18
18
  type: Array,
19
19
  default: null
20
20
  },
21
+ disabled: Boolean,
21
22
  onClick: Function
22
23
  },
23
24
  setup(props) {
24
25
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
25
26
  const { colorPickerSlots, renderLabelRef } = (0, vue_1.inject)(ColorPicker_1.colorPickerInjectionKey, null);
26
27
  return () => {
27
- const { hsla, value, clsPrefix, onClick } = props;
28
+ const { hsla, value, clsPrefix, onClick, disabled } = props;
28
29
  const renderLabel = colorPickerSlots.label || renderLabelRef.value;
29
- return ((0, vue_1.h)("div", { class: `${clsPrefix}-color-picker-trigger`, onClick: onClick },
30
+ return ((0, vue_1.h)("div", { class: [
31
+ `${clsPrefix}-color-picker-trigger`,
32
+ disabled && `${clsPrefix}-color-picker-trigger--disabled`
33
+ ], onClick: disabled ? undefined : onClick },
30
34
  (0, vue_1.h)("div", { class: `${clsPrefix}-color-picker-trigger__fill` },
31
35
  (0, vue_1.h)("div", { class: `${clsPrefix}-color-picker-checkboard` }),
32
36
  (0, vue_1.h)("div", { style: {
@@ -165,7 +165,7 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('color-picker', `
165
165
  right: 4px;
166
166
  top: 4px;
167
167
  bottom: 4px;
168
- `), (0, cssr_1.cB)('color-picker-checkboard', `
168
+ `), (0, cssr_1.cM)('disabled', 'cursor: not-allowed'), (0, cssr_1.cB)('color-picker-checkboard', `
169
169
  border-radius: var(--n-border-radius);
170
170
  `, [(0, cssr_1.c)('&::after', `
171
171
  --n-block-size: calc((var(--n-height) - 8px) / 3);
@@ -78,6 +78,7 @@ declare const datePickerProps: {
78
78
  panelTextColor: string;
79
79
  arrowColor: string;
80
80
  calendarTitleTextColor: string;
81
+ calendarTitleColorHover: string;
81
82
  calendarDaysTextColor: string;
82
83
  panelHeaderDividerColor: string;
83
84
  calendarDaysDividerColor: string;
@@ -689,6 +690,7 @@ declare const datePickerProps: {
689
690
  panelTextColor: string;
690
691
  arrowColor: string;
691
692
  calendarTitleTextColor: string;
693
+ calendarTitleColorHover: string;
692
694
  calendarDaysTextColor: string;
693
695
  panelHeaderDividerColor: string;
694
696
  calendarDaysDividerColor: string;
@@ -1300,6 +1302,7 @@ declare const datePickerProps: {
1300
1302
  panelTextColor: string;
1301
1303
  arrowColor: string;
1302
1304
  calendarTitleTextColor: string;
1305
+ calendarTitleColorHover: string;
1303
1306
  calendarDaysTextColor: string;
1304
1307
  panelHeaderDividerColor: string;
1305
1308
  calendarDaysDividerColor: string;
@@ -1972,6 +1975,7 @@ declare const _default: import("vue").DefineComponent<{
1972
1975
  panelTextColor: string;
1973
1976
  arrowColor: string;
1974
1977
  calendarTitleTextColor: string;
1978
+ calendarTitleColorHover: string;
1975
1979
  calendarDaysTextColor: string;
1976
1980
  panelHeaderDividerColor: string;
1977
1981
  calendarDaysDividerColor: string;
@@ -2583,6 +2587,7 @@ declare const _default: import("vue").DefineComponent<{
2583
2587
  panelTextColor: string;
2584
2588
  arrowColor: string;
2585
2589
  calendarTitleTextColor: string;
2590
+ calendarTitleColorHover: string;
2586
2591
  calendarDaysTextColor: string;
2587
2592
  panelHeaderDividerColor: string;
2588
2593
  calendarDaysDividerColor: string;
@@ -3194,6 +3199,7 @@ declare const _default: import("vue").DefineComponent<{
3194
3199
  panelTextColor: string;
3195
3200
  arrowColor: string;
3196
3201
  calendarTitleTextColor: string;
3202
+ calendarTitleColorHover: string;
3197
3203
  calendarDaysTextColor: string;
3198
3204
  panelHeaderDividerColor: string;
3199
3205
  calendarDaysDividerColor: string;
@@ -3974,6 +3980,7 @@ declare const _default: import("vue").DefineComponent<{
3974
3980
  panelTextColor: string;
3975
3981
  arrowColor: string;
3976
3982
  calendarTitleTextColor: string;
3983
+ calendarTitleColorHover: string;
3977
3984
  calendarDaysTextColor: string;
3978
3985
  panelHeaderDividerColor: string;
3979
3986
  calendarDaysDividerColor: string;
@@ -4875,6 +4882,7 @@ declare const _default: import("vue").DefineComponent<{
4875
4882
  '--n-panel-header-divider-color': string;
4876
4883
  '--n-calendar-left-padding': string;
4877
4884
  '--n-calendar-right-padding': string;
4885
+ '--n-calendar-title-color-hover': string;
4878
4886
  '--n-calendar-title-height': string;
4879
4887
  '--n-calendar-title-padding': string;
4880
4888
  '--n-calendar-title-font-size': string;
@@ -4986,6 +4994,7 @@ declare const _default: import("vue").DefineComponent<{
4986
4994
  panelTextColor: string;
4987
4995
  arrowColor: string;
4988
4996
  calendarTitleTextColor: string;
4997
+ calendarTitleColorHover: string;
4989
4998
  calendarDaysTextColor: string;
4990
4999
  panelHeaderDividerColor: string;
4991
5000
  calendarDaysDividerColor: string;
@@ -5597,6 +5606,7 @@ declare const _default: import("vue").DefineComponent<{
5597
5606
  panelTextColor: string;
5598
5607
  arrowColor: string;
5599
5608
  calendarTitleTextColor: string;
5609
+ calendarTitleColorHover: string;
5600
5610
  calendarDaysTextColor: string;
5601
5611
  panelHeaderDividerColor: string;
5602
5612
  calendarDaysDividerColor: string;
@@ -6208,6 +6218,7 @@ declare const _default: import("vue").DefineComponent<{
6208
6218
  panelTextColor: string;
6209
6219
  arrowColor: string;
6210
6220
  calendarTitleTextColor: string;
6221
+ calendarTitleColorHover: string;
6211
6222
  calendarDaysTextColor: string;
6212
6223
  panelHeaderDividerColor: string;
6213
6224
  calendarDaysDividerColor: string;
@@ -515,7 +515,7 @@ exports.default = (0, vue_1.defineComponent)({
515
515
  };
516
516
  }), cssVars: (0, vue_1.computed)(() => {
517
517
  const { type } = props;
518
- const { common: { cubicBezierEaseInOut }, self: { calendarTitleFontSize, calendarDaysFontSize, itemFontSize, itemTextColor, itemColorDisabled, itemColorIncluded, itemColorHover, itemColorActive, itemBorderRadius, itemTextColorDisabled, itemTextColorActive, panelColor, panelTextColor, arrowColor, calendarTitleTextColor, panelActionDividerColor, panelHeaderDividerColor, calendarDaysDividerColor, panelBoxShadow, panelBorderRadius, calendarTitleFontWeight, panelExtraFooterPadding, panelActionPadding, itemSize, itemCellWidth, itemCellHeight, scrollItemWidth, scrollItemHeight, calendarTitlePadding, calendarTitleHeight, calendarDaysHeight, calendarDaysTextColor, arrowSize, panelHeaderPadding, calendarDividerColor, calendarTitleGridTempateColumns, iconColor, iconColorDisabled, scrollItemBorderRadius, [(0, _utils_1.createKey)('calendarLeftPadding', type)]: calendarLeftPadding, [(0, _utils_1.createKey)('calendarRightPadding', type)]: calendarRightPadding } } = themeRef.value;
518
+ const { common: { cubicBezierEaseInOut }, self: { calendarTitleFontSize, calendarDaysFontSize, itemFontSize, itemTextColor, itemColorDisabled, itemColorIncluded, itemColorHover, itemColorActive, itemBorderRadius, itemTextColorDisabled, itemTextColorActive, panelColor, panelTextColor, arrowColor, calendarTitleTextColor, panelActionDividerColor, panelHeaderDividerColor, calendarDaysDividerColor, panelBoxShadow, panelBorderRadius, calendarTitleFontWeight, panelExtraFooterPadding, panelActionPadding, itemSize, itemCellWidth, itemCellHeight, scrollItemWidth, scrollItemHeight, calendarTitlePadding, calendarTitleHeight, calendarDaysHeight, calendarDaysTextColor, arrowSize, panelHeaderPadding, calendarDividerColor, calendarTitleGridTempateColumns, iconColor, iconColorDisabled, scrollItemBorderRadius, calendarTitleColorHover, [(0, _utils_1.createKey)('calendarLeftPadding', type)]: calendarLeftPadding, [(0, _utils_1.createKey)('calendarRightPadding', type)]: calendarRightPadding } } = themeRef.value;
519
519
  return {
520
520
  '--n-bezier': cubicBezierEaseInOut,
521
521
  '--n-panel-border-radius': panelBorderRadius,
@@ -528,6 +528,7 @@ exports.default = (0, vue_1.defineComponent)({
528
528
  // panel calendar
529
529
  '--n-calendar-left-padding': calendarLeftPadding,
530
530
  '--n-calendar-right-padding': calendarRightPadding,
531
+ '--n-calendar-title-color-hover': calendarTitleColorHover,
531
532
  '--n-calendar-title-height': calendarTitleHeight,
532
533
  '--n-calendar-title-padding': calendarTitlePadding,
533
534
  '--n-calendar-title-font-size': calendarTitleFontSize,
@@ -192,6 +192,7 @@ declare const _default: import("vue").DefineComponent<{
192
192
  panelTextColor: string;
193
193
  arrowColor: string;
194
194
  calendarTitleTextColor: string;
195
+ calendarTitleColorHover: string;
195
196
  calendarDaysTextColor: string;
196
197
  panelHeaderDividerColor: string;
197
198
  calendarDaysDividerColor: string;
@@ -178,6 +178,7 @@ declare const _default: import("vue").DefineComponent<{
178
178
  panelTextColor: string;
179
179
  arrowColor: string;
180
180
  calendarTitleTextColor: string;
181
+ calendarTitleColorHover: string;
181
182
  calendarDaysTextColor: string;
182
183
  panelHeaderDividerColor: string;
183
184
  calendarDaysDividerColor: string;
@@ -186,6 +186,7 @@ declare const _default: import("vue").DefineComponent<{
186
186
  panelTextColor: string;
187
187
  arrowColor: string;
188
188
  calendarTitleTextColor: string;
189
+ calendarTitleColorHover: string;
189
190
  calendarDaysTextColor: string;
190
191
  panelHeaderDividerColor: string;
191
192
  calendarDaysDividerColor: string;
@@ -178,6 +178,7 @@ declare const _default: import("vue").DefineComponent<{
178
178
  panelTextColor: string;
179
179
  arrowColor: string;
180
180
  calendarTitleTextColor: string;
181
+ calendarTitleColorHover: string;
181
182
  calendarDaysTextColor: string;
182
183
  panelHeaderDividerColor: string;
183
184
  calendarDaysDividerColor: string;
@@ -194,6 +194,7 @@ declare const _default: import("vue").DefineComponent<{
194
194
  panelTextColor: string;
195
195
  arrowColor: string;
196
196
  calendarTitleTextColor: string;
197
+ calendarTitleColorHover: string;
197
198
  calendarDaysTextColor: string;
198
199
  panelHeaderDividerColor: string;
199
200
  calendarDaysDividerColor: string;
@@ -271,6 +271,7 @@ declare const _default: import("vue").DefineComponent<{
271
271
  panelTextColor: string;
272
272
  arrowColor: string;
273
273
  calendarTitleTextColor: string;
274
+ calendarTitleColorHover: string;
274
275
  calendarDaysTextColor: string;
275
276
  panelHeaderDividerColor: string;
276
277
  calendarDaysDividerColor: string;
@@ -1449,6 +1450,7 @@ declare const _default: import("vue").DefineComponent<{
1449
1450
  panelTextColor: string;
1450
1451
  arrowColor: string;
1451
1452
  calendarTitleTextColor: string;
1453
+ calendarTitleColorHover: string;
1452
1454
  calendarDaysTextColor: string;
1453
1455
  panelHeaderDividerColor: string;
1454
1456
  calendarDaysDividerColor: string;
@@ -58,9 +58,13 @@ exports.default = (0, vue_1.defineComponent)({
58
58
  (0, vue_1.h)(vueuc_1.VBinder, null, {
59
59
  default: () => [
60
60
  (0, vue_1.h)(vueuc_1.VTarget, null, {
61
- default: () => ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-date-panel-month__text`, onClick: this.handleHeaderClick }, this.monthBeforeYear
62
- ? [this.calendarMonth, this.calendarYear]
63
- : [this.calendarYear, this.calendarMonth]))
61
+ default: () => ((0, vue_1.h)("div", { class: [
62
+ `${mergedClsPrefix}-date-panel-month__text`,
63
+ this.show &&
64
+ `${mergedClsPrefix}-date-panel-month__text--active`
65
+ ], onClick: this.handleHeaderClick }, this.monthBeforeYear
66
+ ? [this.calendarMonth, ' ', this.calendarYear]
67
+ : [this.calendarYear, ' ', this.calendarMonth]))
64
68
  }),
65
69
  (0, vue_1.h)(vueuc_1.VFollower, { show: this.show, teleportDisabled: true }, {
66
70
  default: () => ((0, vue_1.h)(vue_1.Transition, { name: "fade-in-scale-up-transition", appear: true }, {
@@ -190,6 +190,7 @@ declare function useCalendar(props: ExtractPropTypes<typeof useCalendarProps>, t
190
190
  panelTextColor: string;
191
191
  arrowColor: string;
192
192
  calendarTitleTextColor: string;
193
+ calendarTitleColorHover: string;
193
194
  calendarDaysTextColor: string;
194
195
  panelHeaderDividerColor: string;
195
196
  calendarDaysDividerColor: string;
@@ -182,6 +182,7 @@ declare function useDualCalendar(props: ExtractPropTypes<typeof useDualCalendarP
182
182
  panelTextColor: string;
183
183
  arrowColor: string;
184
184
  calendarTitleTextColor: string;
185
+ calendarTitleColorHover: string;
185
186
  calendarDaysTextColor: string;
186
187
  panelHeaderDividerColor: string;
187
188
  calendarDaysDividerColor: string;
@@ -144,6 +144,7 @@ declare function usePanelCommon(props: UsePanelCommonProps): {
144
144
  panelTextColor: string;
145
145
  arrowColor: string;
146
146
  calendarTitleTextColor: string;
147
+ calendarTitleColorHover: string;
147
148
  calendarDaysTextColor: string;
148
149
  panelHeaderDividerColor: string;
149
150
  calendarDaysDividerColor: string;
@@ -26,6 +26,7 @@ const fade_in_scale_up_cssr_1 = __importDefault(require("../../../_styles/transi
26
26
  // panel calendar
27
27
  // --n-calendar-left-padding
28
28
  // --n-calendar-right-padding
29
+ // --n-calendar-title-color-hover
29
30
  // --n-calendar-title-height
30
31
  // --n-calendar-title-padding
31
32
  // --n-calendar-title-font-size
@@ -199,16 +200,24 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('date-picker', `
199
200
  height: var(--n-arrow-size);
200
201
  color: var(--n-arrow-color);
201
202
  `), (0, cssr_1.cE)('month-year', `
203
+ user-select: none;
202
204
  flex-grow: 1;
203
205
  position: relative;
204
206
  `, [(0, cssr_1.cE)('text', `
205
207
  font-size: var(--n-calendar-title-font-size);
208
+ line-height: var(--n-calendar-title-font-size);
206
209
  font-weight: var(--n-calendar-title-font-weight);
207
- line-height: 17px;
210
+ padding: 6px 8px;
208
211
  text-align: center;
209
212
  color: var(--n-calendar-title-text-color);
210
213
  cursor: pointer;
211
- `)])]), (0, cssr_1.cB)('date-panel-weekdays', `
214
+ transition: background-color .3s var(--n-bezier);
215
+ border-radius: var(--n-panel-border-radius);
216
+ `, [(0, cssr_1.cM)('active', `
217
+ background-color: var(--n-calendar-title-color-hover);
218
+ `), (0, cssr_1.c)('&:hover', `
219
+ background-color: var(--n-calendar-title-color-hover);
220
+ `)])])]), (0, cssr_1.cB)('date-panel-weekdays', `
212
221
  display: grid;
213
222
  margin: auto;
214
223
  grid-template-columns: repeat(7, var(--n-item-cell-width));
@@ -218,6 +227,7 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('date-picker', `
218
227
  margin-bottom: 4px;
219
228
  border-bottom: 1px solid var(--n-calendar-days-divider-color);
220
229
  `, [(0, cssr_1.cE)('day', `
230
+ user-select: none;
221
231
  line-height: 15px;
222
232
  width: var(--n-item-size);
223
233
  text-align: center;
@@ -232,6 +242,7 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('date-picker', `
232
242
  justify-items: center;
233
243
  flex-wrap: wrap;
234
244
  `, [(0, cssr_1.cB)('date-panel-date', `
245
+ user-select: none;
235
246
  position: relative;
236
247
  width: var(--n-item-size);
237
248
  height: var(--n-item-size);
@@ -16,6 +16,7 @@ export declare const self: (vars: ThemeCommonVars) => {
16
16
  panelTextColor: string;
17
17
  arrowColor: string;
18
18
  calendarTitleTextColor: string;
19
+ calendarTitleColorHover: string;
19
20
  calendarDaysTextColor: string;
20
21
  panelHeaderDividerColor: string;
21
22
  calendarDaysDividerColor: string;
@@ -73,6 +74,7 @@ declare const datePickerLight: import("../../_mixins").Theme<"DatePicker", {
73
74
  panelTextColor: string;
74
75
  arrowColor: string;
75
76
  calendarTitleTextColor: string;
77
+ calendarTitleColorHover: string;
76
78
  calendarDaysTextColor: string;
77
79
  panelHeaderDividerColor: string;
78
80
  calendarDaysDividerColor: string;
@@ -14,7 +14,7 @@ const _common_1 = __importDefault(require("./_common"));
14
14
  const _mixins_1 = require("../../_mixins");
15
15
  const self = (vars) => {
16
16
  const { hoverColor, fontSize, textColor2, textColorDisabled, popoverColor, primaryColor, borderRadiusSmall, iconColor, iconColorDisabled, textColor1, dividerColor, boxShadow2, borderRadius, fontWeightStrong } = vars;
17
- return Object.assign(Object.assign({}, _common_1.default), { itemFontSize: fontSize, calendarDaysFontSize: fontSize, calendarTitleFontSize: fontSize, itemTextColor: textColor2, itemTextColorDisabled: textColorDisabled, itemTextColorActive: popoverColor, itemTextColorCurrent: primaryColor, itemColorIncluded: (0, seemly_1.changeColor)(primaryColor, { alpha: 0.1 }), itemColorHover: hoverColor, itemColorDisabled: hoverColor, itemColorActive: primaryColor, itemBorderRadius: borderRadiusSmall, panelColor: popoverColor, panelTextColor: textColor2, arrowColor: iconColor, calendarTitleTextColor: textColor1, calendarDaysTextColor: textColor2, panelHeaderDividerColor: dividerColor, calendarDaysDividerColor: dividerColor, calendarDividerColor: dividerColor, panelActionDividerColor: dividerColor, panelBoxShadow: boxShadow2, panelBorderRadius: borderRadius, calendarTitleFontWeight: fontWeightStrong, scrollItemBorderRadius: borderRadius, iconColor,
17
+ return Object.assign(Object.assign({}, _common_1.default), { itemFontSize: fontSize, calendarDaysFontSize: fontSize, calendarTitleFontSize: fontSize, itemTextColor: textColor2, itemTextColorDisabled: textColorDisabled, itemTextColorActive: popoverColor, itemTextColorCurrent: primaryColor, itemColorIncluded: (0, seemly_1.changeColor)(primaryColor, { alpha: 0.1 }), itemColorHover: hoverColor, itemColorDisabled: hoverColor, itemColorActive: primaryColor, itemBorderRadius: borderRadiusSmall, panelColor: popoverColor, panelTextColor: textColor2, arrowColor: iconColor, calendarTitleTextColor: textColor1, calendarTitleColorHover: hoverColor, calendarDaysTextColor: textColor2, panelHeaderDividerColor: dividerColor, calendarDaysDividerColor: dividerColor, calendarDividerColor: dividerColor, panelActionDividerColor: dividerColor, panelBoxShadow: boxShadow2, panelBorderRadius: borderRadius, calendarTitleFontWeight: fontWeightStrong, scrollItemBorderRadius: borderRadius, iconColor,
18
18
  iconColorDisabled });
19
19
  };
20
20
  exports.self = self;
@@ -116,7 +116,6 @@ exports.default = (0, vue_1.defineComponent)({
116
116
  },
117
117
  render() {
118
118
  const { $slots, bordered, mergedIconPlacement, cssVars, closable, showIcon, title, content, action, negativeText, positiveText, handlePositiveClick, handleNegativeClick, mergedTheme, loading, type, mergedClsPrefix } = this;
119
- console.log('action', $slots.action);
120
119
  return ((0, vue_1.h)("div", { class: [
121
120
  `${mergedClsPrefix}-dialog`,
122
121
  `${mergedClsPrefix}-dialog--icon-${mergedIconPlacement}`,
@@ -34,16 +34,8 @@ declare const dynamicInputProps: {
34
34
  readonly onRemove: PropType<(index: number) => void>;
35
35
  readonly 'onUpdate:value': PropType<MaybeArray<OnUpdateValue>>;
36
36
  readonly onUpdateValue: PropType<MaybeArray<OnUpdateValue>>;
37
- readonly onClear: {
38
- readonly type: PropType<() => void>;
39
- readonly validator: () => boolean;
40
- readonly default: undefined;
41
- };
42
- readonly onInput: {
43
- readonly type: PropType<MaybeArray<OnUpdateValue> | undefined>;
44
- readonly validator: () => boolean;
45
- readonly default: undefined;
46
- };
37
+ readonly onClear: PropType<() => void>;
38
+ readonly onInput: PropType<MaybeArray<OnUpdateValue>>;
47
39
  readonly theme: PropType<import("../../_mixins").Theme<"DynamicInput", {
48
40
  actionMargin: string;
49
41
  }, {
@@ -883,16 +875,8 @@ declare const _default: import("vue").DefineComponent<{
883
875
  readonly onRemove: PropType<(index: number) => void>;
884
876
  readonly 'onUpdate:value': PropType<MaybeArray<OnUpdateValue>>;
885
877
  readonly onUpdateValue: PropType<MaybeArray<OnUpdateValue>>;
886
- readonly onClear: {
887
- readonly type: PropType<() => void>;
888
- readonly validator: () => boolean;
889
- readonly default: undefined;
890
- };
891
- readonly onInput: {
892
- readonly type: PropType<MaybeArray<OnUpdateValue> | undefined>;
893
- readonly validator: () => boolean;
894
- readonly default: undefined;
895
- };
878
+ readonly onClear: PropType<() => void>;
879
+ readonly onInput: PropType<MaybeArray<OnUpdateValue>>;
896
880
  readonly theme: PropType<import("../../_mixins").Theme<"DynamicInput", {
897
881
  actionMargin: string;
898
882
  }, {
@@ -2135,16 +2119,8 @@ declare const _default: import("vue").DefineComponent<{
2135
2119
  readonly onRemove: PropType<(index: number) => void>;
2136
2120
  readonly 'onUpdate:value': PropType<MaybeArray<OnUpdateValue>>;
2137
2121
  readonly onUpdateValue: PropType<MaybeArray<OnUpdateValue>>;
2138
- readonly onClear: {
2139
- readonly type: PropType<() => void>;
2140
- readonly validator: () => boolean;
2141
- readonly default: undefined;
2142
- };
2143
- readonly onInput: {
2144
- readonly type: PropType<MaybeArray<OnUpdateValue> | undefined>;
2145
- readonly validator: () => boolean;
2146
- readonly default: undefined;
2147
- };
2122
+ readonly onClear: PropType<() => void>;
2123
+ readonly onInput: PropType<MaybeArray<OnUpdateValue>>;
2148
2124
  readonly theme: PropType<import("../../_mixins").Theme<"DynamicInput", {
2149
2125
  actionMargin: string;
2150
2126
  }, {
@@ -2950,10 +2926,8 @@ declare const _default: import("vue").DefineComponent<{
2950
2926
  }, any>;
2951
2927
  }>>>;
2952
2928
  }>>, {
2953
- onInput: MaybeArray<OnUpdateValue> | undefined;
2954
2929
  placeholder: string;
2955
2930
  min: number;
2956
- onClear: () => void;
2957
2931
  defaultValue: any[];
2958
2932
  preset: "input" | "pair";
2959
2933
  keyPlaceholder: string;
@@ -44,27 +44,21 @@ const dynamicInputProps = Object.assign(Object.assign({}, _mixins_1.useTheme.pro
44
44
  default: ''
45
45
  }, onCreate: Function, onRemove: Function, 'onUpdate:value': [Function, Array], onUpdateValue: [Function, Array],
46
46
  // deprecated
47
- onClear: {
48
- type: Function,
49
- validator: () => {
50
- (0, _utils_1.warn)('dynamic-input', '`on-clear` is deprecated, it is out of usage anymore.');
51
- return true;
52
- },
53
- default: undefined
54
- }, onInput: {
55
- type: [Function, Array],
56
- validator: () => {
57
- if (process.env.NODE_ENV !== 'production') {
58
- (0, _utils_1.warn)('dynamic-input', '`on-input` is deprecated, please use `on-update:value` instead.');
59
- }
60
- return true;
61
- },
62
- default: undefined
63
- } });
47
+ onClear: Function, onInput: [Function, Array] });
64
48
  exports.default = (0, vue_1.defineComponent)({
65
49
  name: 'DynamicInput',
66
50
  props: dynamicInputProps,
67
51
  setup(props, { slots }) {
52
+ if (process.env.NODE_ENV !== 'production') {
53
+ (0, vue_1.watchEffect)(() => {
54
+ if (props.onClear !== undefined) {
55
+ (0, _utils_1.warnOnce)('dynamic-input', '`on-clear` is deprecated, it is out of usage anymore.');
56
+ }
57
+ if (props.onInput !== undefined) {
58
+ (0, _utils_1.warnOnce)('dynamic-input', '`on-input` is deprecated, please use `on-update:value` instead.');
59
+ }
60
+ });
61
+ }
68
62
  const { NConfigProvider, mergedClsPrefixRef } = (0, _mixins_1.useConfig)();
69
63
  const NFormItem = (0, vue_1.inject)(use_form_item_1.formItemInjectionKey, null);
70
64
  const uncontrolledValueRef = (0, vue_1.ref)(props.defaultValue);
@@ -206,7 +200,7 @@ exports.default = (0, vue_1.defineComponent)({
206
200
  },
207
201
  render() {
208
202
  const { buttonSize, mergedClsPrefix, mergedValue, locale, mergedTheme, keyField, $slots, preset, itemStyle, NFormItem, ensureKey, handleValueChange, remove, createItem } = this;
209
- return ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-dynamic-input`, style: this.cssVars }, !Array.isArray(mergedValue) || mergedValue.length === 0 ? ((0, vue_1.h)(button_1.NButton, { block: true, ghost: true, dashed: true, size: buttonSize, theme: mergedTheme.peers.Button, themeOverrides: mergedTheme.peerOverrides.Button, onClick: this.handleCreateClick }, {
203
+ return ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-dynamic-input`, style: this.cssVars }, !Array.isArray(mergedValue) || mergedValue.length === 0 ? ((0, vue_1.h)(button_1.NButton, { block: true, ghost: true, dashed: true, disabled: this.insertionDisabled, size: buttonSize, theme: mergedTheme.peers.Button, themeOverrides: mergedTheme.peerOverrides.Button, onClick: this.handleCreateClick }, {
210
204
  default: () => locale.create,
211
205
  icon: () => ((0, vue_1.h)(_internal_1.NBaseIcon, { clsPrefix: mergedClsPrefix }, { default: () => (0, vue_1.h)(icons_1.AddIcon, null) }))
212
206
  })) : (mergedValue.map((_, index) => ((0, vue_1.h)("div", { key: keyField ? _[keyField] : ensureKey(_, index), "data-key": keyField ? _[keyField] : ensureKey(_, index), class: `${mergedClsPrefix}-dynamic-input-item`, style: itemStyle },
@@ -1,9 +1,10 @@
1
- import { PropType } from 'vue';
1
+ import { Component, PropType } from 'vue';
2
2
  export declare type Depth = 1 | 2 | 3 | 4 | 5 | '1' | '2' | '3' | '4' | '5' | undefined;
3
3
  declare const _default: import("vue").DefineComponent<{
4
4
  depth: PropType<Depth>;
5
5
  size: (StringConstructor | NumberConstructor)[];
6
6
  color: StringConstructor;
7
+ component: PropType<Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>;
7
8
  theme: PropType<import("../../_mixins").Theme<"Icon", {
8
9
  color: string;
9
10
  opacity1Depth: string;
@@ -47,6 +48,7 @@ declare const _default: import("vue").DefineComponent<{
47
48
  depth: PropType<Depth>;
48
49
  size: (StringConstructor | NumberConstructor)[];
49
50
  color: StringConstructor;
51
+ component: PropType<Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>;
50
52
  theme: PropType<import("../../_mixins").Theme<"Icon", {
51
53
  color: string;
52
54
  opacity1Depth: string;