naive-ui 2.24.4 → 2.24.5

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 (48) 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/input/src/styles/input.cssr.js +1 -0
  22. package/es/version.d.ts +1 -1
  23. package/es/version.js +1 -1
  24. package/lib/color-picker/src/ColorPicker.d.ts +14 -0
  25. package/lib/color-picker/src/ColorPicker.js +7 -3
  26. package/lib/color-picker/src/ColorPickerTrigger.d.ts +3 -0
  27. package/lib/color-picker/src/ColorPickerTrigger.js +6 -2
  28. package/lib/color-picker/src/styles/index.cssr.js +1 -1
  29. package/lib/date-picker/src/DatePicker.d.ts +11 -0
  30. package/lib/date-picker/src/DatePicker.js +2 -1
  31. package/lib/date-picker/src/panel/date.d.ts +1 -0
  32. package/lib/date-picker/src/panel/daterange.d.ts +1 -0
  33. package/lib/date-picker/src/panel/datetime.d.ts +1 -0
  34. package/lib/date-picker/src/panel/datetimerange.d.ts +1 -0
  35. package/lib/date-picker/src/panel/month.d.ts +1 -0
  36. package/lib/date-picker/src/panel/panelHeader.d.ts +2 -0
  37. package/lib/date-picker/src/panel/panelHeader.js +7 -3
  38. package/lib/date-picker/src/panel/use-calendar.d.ts +1 -0
  39. package/lib/date-picker/src/panel/use-dual-calendar.d.ts +1 -0
  40. package/lib/date-picker/src/panel/use-panel-common.d.ts +1 -0
  41. package/lib/date-picker/src/styles/index.cssr.js +13 -2
  42. package/lib/date-picker/styles/light.d.ts +2 -0
  43. package/lib/date-picker/styles/light.js +1 -1
  44. package/lib/input/src/styles/input.cssr.js +1 -0
  45. package/lib/version.d.ts +1 -1
  46. package/lib/version.js +1 -1
  47. package/package.json +3 -3
  48. package/web-types.json +10 -1
@@ -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;
@@ -29,7 +29,10 @@ export const colorPickerPanelProps = Object.assign(Object.assign({}, useTheme.pr
29
29
  }, to: useAdjustedTo.propTo, showAlpha: {
30
30
  type: Boolean,
31
31
  default: true
32
- }, showPreview: Boolean, swatches: Array, actions: {
32
+ }, showPreview: Boolean, swatches: Array, disabled: {
33
+ type: Boolean,
34
+ default: undefined
35
+ }, actions: {
33
36
  type: Array,
34
37
  default: null
35
38
  }, internalActions: Array, size: String, renderLabel: Function, onComplete: Function, 'onUpdate:show': [Function, Array], onUpdateShow: [Function, Array], 'onUpdate:value': [Function, Array], onUpdateValue: [Function, Array] });
@@ -41,7 +44,7 @@ export default defineComponent({
41
44
  const selfRef = ref(null);
42
45
  let upcomingValue = null;
43
46
  const formItem = useFormItem(props);
44
- const { mergedSizeRef } = formItem;
47
+ const { mergedSizeRef, mergedDisabledRef } = formItem;
45
48
  const { localeRef } = useLocale('global');
46
49
  const { mergedClsPrefixRef, namespaceRef } = useConfig(props);
47
50
  const themeRef = useTheme('ColorPicker', 'ColorPicker', style, colorPickerLight, props, mergedClsPrefixRef);
@@ -377,6 +380,7 @@ export default defineComponent({
377
380
  hsla: hslaRef,
378
381
  rgba: rgbaRef,
379
382
  mergedShow: mergedShowRef,
383
+ mergedDisabled: mergedDisabledRef,
380
384
  isMounted: useIsMounted(),
381
385
  adjustedTo: useAdjustedTo(props),
382
386
  mergedValue: mergedValueRef,
@@ -399,7 +403,7 @@ export default defineComponent({
399
403
  h(VBinder, null, {
400
404
  default: () => [
401
405
  h(VTarget, null, {
402
- default: () => (h(ColorPickerTrigger, { clsPrefix: mergedClsPrefix, value: this.mergedValue, hsla: this.hsla, onClick: this.handleTriggerClick }, {
406
+ default: () => (h(ColorPickerTrigger, { clsPrefix: mergedClsPrefix, value: this.mergedValue, hsla: this.hsla, disabled: this.mergedDisabled, onClick: this.handleTriggerClick }, {
403
407
  label: $slots.label
404
408
  }))
405
409
  }),
@@ -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;
@@ -16,15 +16,19 @@ export default defineComponent({
16
16
  type: Array,
17
17
  default: null
18
18
  },
19
+ disabled: Boolean,
19
20
  onClick: Function
20
21
  },
21
22
  setup(props) {
22
23
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
23
24
  const { colorPickerSlots, renderLabelRef } = inject(colorPickerInjectionKey, null);
24
25
  return () => {
25
- const { hsla, value, clsPrefix, onClick } = props;
26
+ const { hsla, value, clsPrefix, onClick, disabled } = props;
26
27
  const renderLabel = colorPickerSlots.label || renderLabelRef.value;
27
- return (h("div", { class: `${clsPrefix}-color-picker-trigger`, onClick: onClick },
28
+ return (h("div", { class: [
29
+ `${clsPrefix}-color-picker-trigger`,
30
+ disabled && `${clsPrefix}-color-picker-trigger--disabled`
31
+ ], onClick: disabled ? undefined : onClick },
28
32
  h("div", { class: `${clsPrefix}-color-picker-trigger__fill` },
29
33
  h("div", { class: `${clsPrefix}-color-picker-checkboard` }),
30
34
  h("div", { style: {
@@ -151,7 +151,7 @@ export default c([cB('color-picker', `
151
151
  right: 4px;
152
152
  top: 4px;
153
153
  bottom: 4px;
154
- `), cB('color-picker-checkboard', `
154
+ `), cM('disabled', 'cursor: not-allowed'), cB('color-picker-checkboard', `
155
155
  border-radius: var(--n-border-radius);
156
156
  `, [c('&::after', `
157
157
  --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;
@@ -510,7 +510,7 @@ export default defineComponent({
510
510
  };
511
511
  }), cssVars: computed(() => {
512
512
  const { type } = props;
513
- 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, [createKey('calendarLeftPadding', type)]: calendarLeftPadding, [createKey('calendarRightPadding', type)]: calendarRightPadding } } = themeRef.value;
513
+ 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, [createKey('calendarLeftPadding', type)]: calendarLeftPadding, [createKey('calendarRightPadding', type)]: calendarRightPadding } } = themeRef.value;
514
514
  return {
515
515
  '--n-bezier': cubicBezierEaseInOut,
516
516
  '--n-panel-border-radius': panelBorderRadius,
@@ -523,6 +523,7 @@ export default defineComponent({
523
523
  // panel calendar
524
524
  '--n-calendar-left-padding': calendarLeftPadding,
525
525
  '--n-calendar-right-padding': calendarRightPadding,
526
+ '--n-calendar-title-color-hover': calendarTitleColorHover,
526
527
  '--n-calendar-title-height': calendarTitleHeight,
527
528
  '--n-calendar-title-padding': calendarTitlePadding,
528
529
  '--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;
@@ -53,9 +53,13 @@ export default defineComponent({
53
53
  h(VBinder, null, {
54
54
  default: () => [
55
55
  h(VTarget, null, {
56
- default: () => (h("div", { class: `${mergedClsPrefix}-date-panel-month__text`, onClick: this.handleHeaderClick }, this.monthBeforeYear
57
- ? [this.calendarMonth, this.calendarYear]
58
- : [this.calendarYear, this.calendarMonth]))
56
+ default: () => (h("div", { class: [
57
+ `${mergedClsPrefix}-date-panel-month__text`,
58
+ this.show &&
59
+ `${mergedClsPrefix}-date-panel-month__text--active`
60
+ ], onClick: this.handleHeaderClick }, this.monthBeforeYear
61
+ ? [this.calendarMonth, ' ', this.calendarYear]
62
+ : [this.calendarYear, ' ', this.calendarMonth]))
59
63
  }),
60
64
  h(VFollower, { show: this.show, teleportDisabled: true }, {
61
65
  default: () => (h(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;
@@ -13,6 +13,7 @@ import fadeInScaleUpTransition from '../../../_styles/transitions/fade-in-scale-
13
13
  // panel calendar
14
14
  // --n-calendar-left-padding
15
15
  // --n-calendar-right-padding
16
+ // --n-calendar-title-color-hover
16
17
  // --n-calendar-title-height
17
18
  // --n-calendar-title-padding
18
19
  // --n-calendar-title-font-size
@@ -185,16 +186,24 @@ export default c([cB('date-picker', `
185
186
  height: var(--n-arrow-size);
186
187
  color: var(--n-arrow-color);
187
188
  `), cE('month-year', `
189
+ user-select: none;
188
190
  flex-grow: 1;
189
191
  position: relative;
190
192
  `, [cE('text', `
191
193
  font-size: var(--n-calendar-title-font-size);
194
+ line-height: var(--n-calendar-title-font-size);
192
195
  font-weight: var(--n-calendar-title-font-weight);
193
- line-height: 17px;
196
+ padding: 6px 8px;
194
197
  text-align: center;
195
198
  color: var(--n-calendar-title-text-color);
196
199
  cursor: pointer;
197
- `)])]), cB('date-panel-weekdays', `
200
+ transition: background-color .3s var(--n-bezier);
201
+ border-radius: var(--n-panel-border-radius);
202
+ `, [cM('active', `
203
+ background-color: var(--n-calendar-title-color-hover);
204
+ `), c('&:hover', `
205
+ background-color: var(--n-calendar-title-color-hover);
206
+ `)])])]), cB('date-panel-weekdays', `
198
207
  display: grid;
199
208
  margin: auto;
200
209
  grid-template-columns: repeat(7, var(--n-item-cell-width));
@@ -204,6 +213,7 @@ export default c([cB('date-picker', `
204
213
  margin-bottom: 4px;
205
214
  border-bottom: 1px solid var(--n-calendar-days-divider-color);
206
215
  `, [cE('day', `
216
+ user-select: none;
207
217
  line-height: 15px;
208
218
  width: var(--n-item-size);
209
219
  text-align: center;
@@ -218,6 +228,7 @@ export default c([cB('date-picker', `
218
228
  justify-items: center;
219
229
  flex-wrap: wrap;
220
230
  `, [cB('date-panel-date', `
231
+ user-select: none;
221
232
  position: relative;
222
233
  width: var(--n-item-size);
223
234
  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;
@@ -8,7 +8,7 @@ import commonVars from './_common';
8
8
  import { createTheme } from '../../_mixins';
9
9
  export const self = (vars) => {
10
10
  const { hoverColor, fontSize, textColor2, textColorDisabled, popoverColor, primaryColor, borderRadiusSmall, iconColor, iconColorDisabled, textColor1, dividerColor, boxShadow2, borderRadius, fontWeightStrong } = vars;
11
- return Object.assign(Object.assign({}, commonVars), { itemFontSize: fontSize, calendarDaysFontSize: fontSize, calendarTitleFontSize: fontSize, itemTextColor: textColor2, itemTextColorDisabled: textColorDisabled, itemTextColorActive: popoverColor, itemTextColorCurrent: primaryColor, itemColorIncluded: 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,
11
+ return Object.assign(Object.assign({}, commonVars), { itemFontSize: fontSize, calendarDaysFontSize: fontSize, calendarTitleFontSize: fontSize, itemTextColor: textColor2, itemTextColorDisabled: textColorDisabled, itemTextColorActive: popoverColor, itemTextColorCurrent: primaryColor, itemColorIncluded: 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,
12
12
  iconColorDisabled });
13
13
  };
14
14
  const datePickerLight = createTheme({
@@ -146,6 +146,7 @@ cE('textarea', `
146
146
  line-height: var(--n-line-height-textarea);
147
147
  margin: 0;
148
148
  resize: none;
149
+ white-space: pre-wrap;
149
150
  `), cE('textarea-mirror', `
150
151
  pointer-events: none;
151
152
  overflow: hidden;
package/es/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "2.24.4";
1
+ declare const _default: "2.24.5";
2
2
  export default _default;
package/es/version.js CHANGED
@@ -1 +1 @@
1
- export default '2.24.4';
1
+ export default '2.24.5';
@@ -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;
@@ -153,6 +153,7 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('input', `
153
153
  line-height: var(--n-line-height-textarea);
154
154
  margin: 0;
155
155
  resize: none;
156
+ white-space: pre-wrap;
156
157
  `), (0, cssr_1.cE)('textarea-mirror', `
157
158
  pointer-events: none;
158
159
  overflow: hidden;
package/lib/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "2.24.4";
1
+ declare const _default: "2.24.5";
2
2
  export default _default;
package/lib/version.js CHANGED
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = '2.24.4';
3
+ exports.default = '2.24.5';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "naive-ui",
3
- "version": "2.24.4",
3
+ "version": "2.24.5",
4
4
  "description": "A Vue 3 Component Library. Fairly Complete, Customizable Themes, Uses TypeScript, Not Too Slow",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -66,7 +66,7 @@
66
66
  "codesandbox": "^2.2.3",
67
67
  "cross-env": "^7.0.3",
68
68
  "cssnano": "^5.0.5",
69
- "esbuild": "0.14.12",
69
+ "esbuild": "0.14.13",
70
70
  "eslint": "^8.6.0",
71
71
  "eslint-config-prettier": "^8.3.0",
72
72
  "eslint-config-standard": "^16.0.2",
@@ -94,7 +94,7 @@
94
94
  "vite": "^2.1.3",
95
95
  "vue": "^3.2.12",
96
96
  "vue-router": "^4.0.5",
97
- "vue-tsc": "^0.30.2"
97
+ "vue-tsc": "^0.31.1"
98
98
  },
99
99
  "peerDependencies": {
100
100
  "vue": "^3.0.0"
package/web-types.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "framework": "vue",
4
4
  "name": "naive-ui",
5
- "version": "2.24.4",
5
+ "version": "2.24.5",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "tags": [
@@ -1217,6 +1217,15 @@
1217
1217
  "kind": "expression"
1218
1218
  }
1219
1219
  },
1220
+ {
1221
+ "name": "disabled",
1222
+ "default": "-",
1223
+ "description": "-",
1224
+ "value": {
1225
+ "type": "boolean",
1226
+ "kind": "expression"
1227
+ }
1228
+ },
1220
1229
  {
1221
1230
  "name": "actions",
1222
1231
  "default": "-",