@vuetify/nightly 3.8.5-dev.2025-05-14 → 3.8.5-master.2025-05-15

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 (82) hide show
  1. package/CHANGELOG.md +6 -19
  2. package/dist/json/attributes.json +3205 -3221
  3. package/dist/json/importMap-labs.json +12 -12
  4. package/dist/json/importMap.json +136 -136
  5. package/dist/json/tags.json +0 -4
  6. package/dist/json/web-types.json +6164 -6203
  7. package/dist/vuetify-labs.cjs +61 -183
  8. package/dist/vuetify-labs.css +3924 -3952
  9. package/dist/vuetify-labs.d.ts +1479 -1528
  10. package/dist/vuetify-labs.esm.js +62 -184
  11. package/dist/vuetify-labs.esm.js.map +1 -1
  12. package/dist/vuetify-labs.js +61 -183
  13. package/dist/vuetify-labs.min.css +2 -2
  14. package/dist/vuetify.cjs +50 -177
  15. package/dist/vuetify.cjs.map +1 -1
  16. package/dist/vuetify.css +4149 -4177
  17. package/dist/vuetify.d.ts +947 -998
  18. package/dist/vuetify.esm.js +51 -178
  19. package/dist/vuetify.esm.js.map +1 -1
  20. package/dist/vuetify.js +50 -177
  21. package/dist/vuetify.js.map +1 -1
  22. package/dist/vuetify.min.css +2 -2
  23. package/dist/vuetify.min.js +1178 -1184
  24. package/dist/vuetify.min.js.map +1 -1
  25. package/lib/components/VAlert/VAlert.css +1 -6
  26. package/lib/components/VAlert/VAlert.d.ts +0 -35
  27. package/lib/components/VAlert/VAlert.js +9 -14
  28. package/lib/components/VAlert/VAlert.js.map +1 -1
  29. package/lib/components/VAlert/VAlert.sass +1 -7
  30. package/lib/components/VAutocomplete/VAutocomplete.d.ts +178 -178
  31. package/lib/components/VBtnGroup/VBtnGroup.css +7 -30
  32. package/lib/components/VBtnGroup/VBtnGroup.d.ts +32 -58
  33. package/lib/components/VBtnGroup/VBtnGroup.js +3 -7
  34. package/lib/components/VBtnGroup/VBtnGroup.js.map +1 -1
  35. package/lib/components/VBtnGroup/VBtnGroup.sass +17 -44
  36. package/lib/components/VBtnToggle/VBtnToggle.d.ts +0 -25
  37. package/lib/components/VCheckbox/VCheckbox.d.ts +15 -15
  38. package/lib/components/VCombobox/VCombobox.d.ts +178 -178
  39. package/lib/components/VField/VField.d.ts +3 -3
  40. package/lib/components/VFileInput/VFileInput.d.ts +45 -45
  41. package/lib/components/VInput/VInput.d.ts +16 -16
  42. package/lib/components/VNumberInput/VNumberInput.d.ts +169 -169
  43. package/lib/components/VOverlay/VOverlay.css +1 -1
  44. package/lib/components/VOverlay/_variables.scss +1 -1
  45. package/lib/components/VRadioGroup/VRadioGroup.d.ts +15 -15
  46. package/lib/components/VRangeSlider/VRangeSlider.d.ts +15 -15
  47. package/lib/components/VSelect/VSelect.d.ts +178 -178
  48. package/lib/components/VSlider/VSlider.d.ts +15 -15
  49. package/lib/components/VSwitch/VSwitch.d.ts +15 -15
  50. package/lib/components/VTextField/VTextField.d.ts +57 -57
  51. package/lib/components/VTextarea/VTextarea.d.ts +45 -45
  52. package/lib/components/VValidation/VValidation.d.ts +8 -8
  53. package/lib/composables/calendar.d.ts +0 -1
  54. package/lib/composables/calendar.js.map +1 -1
  55. package/lib/composables/theme.d.ts +1 -6
  56. package/lib/composables/theme.js +26 -94
  57. package/lib/composables/theme.js.map +1 -1
  58. package/lib/composables/validation.d.ts +6 -5
  59. package/lib/composables/validation.js +4 -29
  60. package/lib/composables/validation.js.map +1 -1
  61. package/lib/composables/virtual.js +1 -6
  62. package/lib/composables/virtual.js.map +1 -1
  63. package/lib/entry-bundler.js +1 -1
  64. package/lib/entry-bundler.js.map +1 -1
  65. package/lib/framework.d.ts +45 -50
  66. package/lib/framework.js +1 -1
  67. package/lib/framework.js.map +1 -1
  68. package/lib/labs/VColorInput/VColorInput.d.ts +15 -15
  69. package/lib/labs/VDateInput/VDateInput.d.ts +171 -171
  70. package/lib/labs/VIconBtn/VIconBtn.d.ts +29 -29
  71. package/lib/labs/VIconBtn/VIconBtn.js +11 -7
  72. package/lib/labs/VIconBtn/VIconBtn.js.map +1 -1
  73. package/lib/labs/rules/rules.d.ts +9 -5
  74. package/lib/labs/rules/rules.js +73 -51
  75. package/lib/labs/rules/rules.js.map +1 -1
  76. package/lib/util/globals.d.ts +0 -1
  77. package/lib/util/globals.js +0 -1
  78. package/lib/util/globals.js.map +1 -1
  79. package/package.json +1 -2
  80. package/lib/composables/iconSizes.d.ts +0 -28
  81. package/lib/composables/iconSizes.js +0 -23
  82. package/lib/composables/iconSizes.js.map +0 -1
@@ -268,14 +268,14 @@ export declare const makeVTextareaProps: <Defaults extends {
268
268
  default: unknown extends Defaults["readonly"] ? boolean | null : NonNullable<boolean | null> | Defaults["readonly"];
269
269
  };
270
270
  rules: unknown extends Defaults["rules"] ? {
271
- type: PropType<readonly import("../../types.js").ValidationRule[]>;
271
+ type: PropType<readonly (import("../../types.js").ValidationRule | import("../../labs/rules/index.js").ValidationAlias)[]>;
272
272
  default: () => never[];
273
273
  } : Omit<{
274
- type: PropType<readonly import("../../types.js").ValidationRule[]>;
274
+ type: PropType<readonly (import("../../types.js").ValidationRule | import("../../labs/rules/index.js").ValidationAlias)[]>;
275
275
  default: () => never[];
276
276
  }, "type" | "default"> & {
277
- type: PropType<unknown extends Defaults["rules"] ? readonly import("../../types.js").ValidationRule[] : readonly import("../../types.js").ValidationRule[] | Defaults["rules"]>;
278
- default: unknown extends Defaults["rules"] ? readonly import("../../types.js").ValidationRule[] : readonly import("../../types.js").ValidationRule[] | Defaults["rules"];
277
+ type: PropType<unknown extends Defaults["rules"] ? readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[] : readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[] | Defaults["rules"]>;
278
+ default: unknown extends Defaults["rules"] ? readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[] : readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[] | Defaults["rules"];
279
279
  };
280
280
  modelValue: unknown extends Defaults["modelValue"] ? null : {
281
281
  type: PropType<unknown extends Defaults["modelValue"] ? any : any>;
@@ -451,7 +451,7 @@ export declare const VTextarea: {
451
451
  disabled: boolean;
452
452
  readonly: boolean | null;
453
453
  messages: string | readonly string[];
454
- rules: readonly import("../../types.js").ValidationRule[];
454
+ rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
455
455
  focused: boolean;
456
456
  errorMessages: string | readonly string[] | null;
457
457
  maxErrors: string | number;
@@ -493,7 +493,6 @@ export declare const VTextarea: {
493
493
  bgColor?: string | undefined;
494
494
  prependIcon?: import("../../composables/icons.js").IconValue | undefined;
495
495
  appendIcon?: import("../../composables/icons.js").IconValue | undefined;
496
- iconColor?: string | boolean | undefined;
497
496
  appendInnerIcon?: import("../../composables/icons.js").IconValue | undefined;
498
497
  prependInnerIcon?: import("../../composables/icons.js").IconValue | undefined;
499
498
  'onClick:clear'?: ((args_0: MouseEvent) => void) | undefined;
@@ -502,6 +501,7 @@ export declare const VTextarea: {
502
501
  'onClick:appendInner'?: ((args_0: MouseEvent) => void) | undefined;
503
502
  'onClick:prependInner'?: ((args_0: MouseEvent) => void) | undefined;
504
503
  centerAffix?: boolean | undefined;
504
+ iconColor?: string | boolean | undefined;
505
505
  hint?: string | undefined;
506
506
  hideDetails?: boolean | "auto" | undefined;
507
507
  suffix?: string | undefined;
@@ -574,7 +574,7 @@ export declare const VTextarea: {
574
574
  disabled: boolean | null;
575
575
  readonly: boolean | null;
576
576
  messages: string | readonly string[];
577
- rules: readonly import("../../types.js").ValidationRule[];
577
+ rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
578
578
  focused: boolean;
579
579
  errorMessages: string | readonly string[] | null;
580
580
  maxErrors: string | number;
@@ -590,7 +590,7 @@ export declare const VTextarea: {
590
590
  disabled: boolean | null;
591
591
  readonly: boolean | null;
592
592
  messages: string | readonly string[];
593
- rules: readonly import("../../types.js").ValidationRule[];
593
+ rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
594
594
  focused: boolean;
595
595
  errorMessages: string | readonly string[] | null;
596
596
  maxErrors: string | number;
@@ -614,9 +614,9 @@ export declare const VTextarea: {
614
614
  baseColor?: string | undefined;
615
615
  prependIcon?: import("../../composables/icons.js").IconValue | undefined;
616
616
  appendIcon?: import("../../composables/icons.js").IconValue | undefined;
617
- iconColor?: string | boolean | undefined;
618
617
  'onClick:append'?: ((args_0: MouseEvent) => void) | undefined;
619
618
  'onClick:prepend'?: ((args_0: MouseEvent) => void) | undefined;
619
+ iconColor?: string | boolean | undefined;
620
620
  hint?: string | undefined;
621
621
  hideDetails?: boolean | "auto" | undefined;
622
622
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "error" | "direction" | "style" | "disabled" | "readonly" | "messages" | "rules" | "focused" | "errorMessages" | "maxErrors" | "density" | "centerAffix" | "glow" | "hideSpinButtons" | "persistentHint">;
@@ -645,7 +645,7 @@ export declare const VTextarea: {
645
645
  disabled: boolean | null;
646
646
  readonly: boolean | null;
647
647
  messages: string | readonly string[];
648
- rules: readonly import("../../types.js").ValidationRule[];
648
+ rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
649
649
  focused: boolean;
650
650
  errorMessages: string | readonly string[] | null;
651
651
  maxErrors: string | number;
@@ -670,9 +670,9 @@ export declare const VTextarea: {
670
670
  baseColor?: string | undefined;
671
671
  prependIcon?: import("../../composables/icons.js").IconValue | undefined;
672
672
  appendIcon?: import("../../composables/icons.js").IconValue | undefined;
673
- iconColor?: string | boolean | undefined;
674
673
  'onClick:append'?: ((args_0: MouseEvent) => void) | undefined;
675
674
  'onClick:prepend'?: ((args_0: MouseEvent) => void) | undefined;
675
+ iconColor?: string | boolean | undefined;
676
676
  hint?: string | undefined;
677
677
  hideDetails?: boolean | "auto" | undefined;
678
678
  } & {}, {
@@ -690,7 +690,7 @@ export declare const VTextarea: {
690
690
  disabled: boolean | null;
691
691
  readonly: boolean | null;
692
692
  messages: string | readonly string[];
693
- rules: readonly import("../../types.js").ValidationRule[];
693
+ rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
694
694
  focused: boolean;
695
695
  errorMessages: string | readonly string[] | null;
696
696
  maxErrors: string | number;
@@ -732,7 +732,7 @@ export declare const VTextarea: {
732
732
  disabled: boolean | null;
733
733
  readonly: boolean | null;
734
734
  messages: string | readonly string[];
735
- rules: readonly import("../../types.js").ValidationRule[];
735
+ rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
736
736
  focused: boolean;
737
737
  errorMessages: string | readonly string[] | null;
738
738
  maxErrors: string | number;
@@ -748,7 +748,7 @@ export declare const VTextarea: {
748
748
  disabled: boolean | null;
749
749
  readonly: boolean | null;
750
750
  messages: string | readonly string[];
751
- rules: readonly import("../../types.js").ValidationRule[];
751
+ rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
752
752
  focused: boolean;
753
753
  errorMessages: string | readonly string[] | null;
754
754
  maxErrors: string | number;
@@ -773,9 +773,9 @@ export declare const VTextarea: {
773
773
  baseColor?: string | undefined;
774
774
  prependIcon?: import("../../composables/icons.js").IconValue | undefined;
775
775
  appendIcon?: import("../../composables/icons.js").IconValue | undefined;
776
- iconColor?: string | boolean | undefined;
777
776
  'onClick:append'?: ((args_0: MouseEvent) => void) | undefined;
778
777
  'onClick:prepend'?: ((args_0: MouseEvent) => void) | undefined;
778
+ iconColor?: string | boolean | undefined;
779
779
  hint?: string | undefined;
780
780
  hideDetails?: boolean | "auto" | undefined;
781
781
  } & {}, "reset" | "isValid" | "validate" | "resetValidation" | ("error" | "direction" | "style" | "disabled" | "readonly" | "messages" | "rules" | "focused" | "errorMessages" | "maxErrors" | "density" | "centerAffix" | "glow" | "hideSpinButtons" | "persistentHint")> & import("vue").ShallowUnwrapRef<{
@@ -787,7 +787,7 @@ export declare const VTextarea: {
787
787
  }> & {} & import("vue").ComponentCustomProperties & {} & import("../../util/index.js").GenericProps<{
788
788
  modelValue?: unknown;
789
789
  'onUpdate:modelValue'?: ((value: unknown) => void) | undefined;
790
- }, VInputSlots>, "name" | "id" | "width" | "color" | "maxWidth" | "minWidth" | "label" | "class" | "theme" | "$children" | "v-slots" | "v-slot:default" | keyof import("vue").VNodeProps | "onUpdate:focused" | "modelValue" | "validateOn" | "validationValue" | "onUpdate:modelValue" | "baseColor" | "prependIcon" | "appendIcon" | "v-slot:prepend" | "v-slot:append" | "iconColor" | "onClick:append" | "onClick:prepend" | "v-slot:message" | "hint" | "hideDetails" | "v-slot:details" | ("error" | "direction" | "style" | "disabled" | "readonly" | "messages" | "rules" | "focused" | "errorMessages" | "maxErrors" | "density" | "centerAffix" | "glow" | "hideSpinButtons" | "persistentHint")>, `$${any}`> & {
790
+ }, VInputSlots>, "name" | "id" | "width" | "color" | "maxWidth" | "minWidth" | "label" | "class" | "theme" | "$children" | "v-slots" | "v-slot:default" | keyof import("vue").VNodeProps | "onUpdate:focused" | "modelValue" | "validateOn" | "validationValue" | "onUpdate:modelValue" | "baseColor" | "prependIcon" | "appendIcon" | "v-slot:prepend" | "v-slot:append" | "onClick:append" | "onClick:prepend" | "v-slot:message" | "iconColor" | "hint" | "hideDetails" | "v-slot:details" | ("error" | "direction" | "style" | "disabled" | "readonly" | "messages" | "rules" | "focused" | "errorMessages" | "maxErrors" | "density" | "centerAffix" | "glow" | "hideSpinButtons" | "persistentHint")>, `$${any}`> & {
791
791
  _allExposed: {
792
792
  reset: () => Promise<void>;
793
793
  resetValidation: () => Promise<void>;
@@ -812,7 +812,7 @@ export declare const VTextarea: {
812
812
  disabled: boolean;
813
813
  readonly: boolean | null;
814
814
  messages: string | readonly string[];
815
- rules: readonly import("../../types.js").ValidationRule[];
815
+ rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
816
816
  focused: boolean;
817
817
  errorMessages: string | readonly string[] | null;
818
818
  maxErrors: string | number;
@@ -868,7 +868,7 @@ export declare const VTextarea: {
868
868
  disabled: boolean;
869
869
  readonly: boolean | null;
870
870
  messages: string | readonly string[];
871
- rules: readonly import("../../types.js").ValidationRule[];
871
+ rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
872
872
  focused: boolean;
873
873
  errorMessages: string | readonly string[] | null;
874
874
  maxErrors: string | number;
@@ -910,7 +910,6 @@ export declare const VTextarea: {
910
910
  bgColor?: string | undefined;
911
911
  prependIcon?: import("../../composables/icons.js").IconValue | undefined;
912
912
  appendIcon?: import("../../composables/icons.js").IconValue | undefined;
913
- iconColor?: string | boolean | undefined;
914
913
  appendInnerIcon?: import("../../composables/icons.js").IconValue | undefined;
915
914
  prependInnerIcon?: import("../../composables/icons.js").IconValue | undefined;
916
915
  'onClick:clear'?: ((args_0: MouseEvent) => void) | undefined;
@@ -919,6 +918,7 @@ export declare const VTextarea: {
919
918
  'onClick:appendInner'?: ((args_0: MouseEvent) => void) | undefined;
920
919
  'onClick:prependInner'?: ((args_0: MouseEvent) => void) | undefined;
921
920
  centerAffix?: boolean | undefined;
921
+ iconColor?: string | boolean | undefined;
922
922
  hint?: string | undefined;
923
923
  hideDetails?: boolean | "auto" | undefined;
924
924
  suffix?: string | undefined;
@@ -991,7 +991,7 @@ export declare const VTextarea: {
991
991
  disabled: boolean | null;
992
992
  readonly: boolean | null;
993
993
  messages: string | readonly string[];
994
- rules: readonly import("../../types.js").ValidationRule[];
994
+ rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
995
995
  focused: boolean;
996
996
  errorMessages: string | readonly string[] | null;
997
997
  maxErrors: string | number;
@@ -1007,7 +1007,7 @@ export declare const VTextarea: {
1007
1007
  disabled: boolean | null;
1008
1008
  readonly: boolean | null;
1009
1009
  messages: string | readonly string[];
1010
- rules: readonly import("../../types.js").ValidationRule[];
1010
+ rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
1011
1011
  focused: boolean;
1012
1012
  errorMessages: string | readonly string[] | null;
1013
1013
  maxErrors: string | number;
@@ -1031,9 +1031,9 @@ export declare const VTextarea: {
1031
1031
  baseColor?: string | undefined;
1032
1032
  prependIcon?: import("../../composables/icons.js").IconValue | undefined;
1033
1033
  appendIcon?: import("../../composables/icons.js").IconValue | undefined;
1034
- iconColor?: string | boolean | undefined;
1035
1034
  'onClick:append'?: ((args_0: MouseEvent) => void) | undefined;
1036
1035
  'onClick:prepend'?: ((args_0: MouseEvent) => void) | undefined;
1036
+ iconColor?: string | boolean | undefined;
1037
1037
  hint?: string | undefined;
1038
1038
  hideDetails?: boolean | "auto" | undefined;
1039
1039
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "error" | "direction" | "style" | "disabled" | "readonly" | "messages" | "rules" | "focused" | "errorMessages" | "maxErrors" | "density" | "centerAffix" | "glow" | "hideSpinButtons" | "persistentHint">;
@@ -1062,7 +1062,7 @@ export declare const VTextarea: {
1062
1062
  disabled: boolean | null;
1063
1063
  readonly: boolean | null;
1064
1064
  messages: string | readonly string[];
1065
- rules: readonly import("../../types.js").ValidationRule[];
1065
+ rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
1066
1066
  focused: boolean;
1067
1067
  errorMessages: string | readonly string[] | null;
1068
1068
  maxErrors: string | number;
@@ -1087,9 +1087,9 @@ export declare const VTextarea: {
1087
1087
  baseColor?: string | undefined;
1088
1088
  prependIcon?: import("../../composables/icons.js").IconValue | undefined;
1089
1089
  appendIcon?: import("../../composables/icons.js").IconValue | undefined;
1090
- iconColor?: string | boolean | undefined;
1091
1090
  'onClick:append'?: ((args_0: MouseEvent) => void) | undefined;
1092
1091
  'onClick:prepend'?: ((args_0: MouseEvent) => void) | undefined;
1092
+ iconColor?: string | boolean | undefined;
1093
1093
  hint?: string | undefined;
1094
1094
  hideDetails?: boolean | "auto" | undefined;
1095
1095
  } & {}, {
@@ -1107,7 +1107,7 @@ export declare const VTextarea: {
1107
1107
  disabled: boolean | null;
1108
1108
  readonly: boolean | null;
1109
1109
  messages: string | readonly string[];
1110
- rules: readonly import("../../types.js").ValidationRule[];
1110
+ rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
1111
1111
  focused: boolean;
1112
1112
  errorMessages: string | readonly string[] | null;
1113
1113
  maxErrors: string | number;
@@ -1149,7 +1149,7 @@ export declare const VTextarea: {
1149
1149
  disabled: boolean | null;
1150
1150
  readonly: boolean | null;
1151
1151
  messages: string | readonly string[];
1152
- rules: readonly import("../../types.js").ValidationRule[];
1152
+ rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
1153
1153
  focused: boolean;
1154
1154
  errorMessages: string | readonly string[] | null;
1155
1155
  maxErrors: string | number;
@@ -1165,7 +1165,7 @@ export declare const VTextarea: {
1165
1165
  disabled: boolean | null;
1166
1166
  readonly: boolean | null;
1167
1167
  messages: string | readonly string[];
1168
- rules: readonly import("../../types.js").ValidationRule[];
1168
+ rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
1169
1169
  focused: boolean;
1170
1170
  errorMessages: string | readonly string[] | null;
1171
1171
  maxErrors: string | number;
@@ -1190,9 +1190,9 @@ export declare const VTextarea: {
1190
1190
  baseColor?: string | undefined;
1191
1191
  prependIcon?: import("../../composables/icons.js").IconValue | undefined;
1192
1192
  appendIcon?: import("../../composables/icons.js").IconValue | undefined;
1193
- iconColor?: string | boolean | undefined;
1194
1193
  'onClick:append'?: ((args_0: MouseEvent) => void) | undefined;
1195
1194
  'onClick:prepend'?: ((args_0: MouseEvent) => void) | undefined;
1195
+ iconColor?: string | boolean | undefined;
1196
1196
  hint?: string | undefined;
1197
1197
  hideDetails?: boolean | "auto" | undefined;
1198
1198
  } & {}, "reset" | "isValid" | "validate" | "resetValidation" | ("error" | "direction" | "style" | "disabled" | "readonly" | "messages" | "rules" | "focused" | "errorMessages" | "maxErrors" | "density" | "centerAffix" | "glow" | "hideSpinButtons" | "persistentHint")> & import("vue").ShallowUnwrapRef<{
@@ -1204,7 +1204,7 @@ export declare const VTextarea: {
1204
1204
  }> & {} & import("vue").ComponentCustomProperties & {} & import("../../util/index.js").GenericProps<{
1205
1205
  modelValue?: unknown;
1206
1206
  'onUpdate:modelValue'?: ((value: unknown) => void) | undefined;
1207
- }, VInputSlots>, "name" | "id" | "width" | "color" | "maxWidth" | "minWidth" | "label" | "class" | "theme" | "$children" | "v-slots" | "v-slot:default" | keyof import("vue").VNodeProps | "onUpdate:focused" | "modelValue" | "validateOn" | "validationValue" | "onUpdate:modelValue" | "baseColor" | "prependIcon" | "appendIcon" | "v-slot:prepend" | "v-slot:append" | "iconColor" | "onClick:append" | "onClick:prepend" | "v-slot:message" | "hint" | "hideDetails" | "v-slot:details" | ("error" | "direction" | "style" | "disabled" | "readonly" | "messages" | "rules" | "focused" | "errorMessages" | "maxErrors" | "density" | "centerAffix" | "glow" | "hideSpinButtons" | "persistentHint")>, `$${any}`> & {
1207
+ }, VInputSlots>, "name" | "id" | "width" | "color" | "maxWidth" | "minWidth" | "label" | "class" | "theme" | "$children" | "v-slots" | "v-slot:default" | keyof import("vue").VNodeProps | "onUpdate:focused" | "modelValue" | "validateOn" | "validationValue" | "onUpdate:modelValue" | "baseColor" | "prependIcon" | "appendIcon" | "v-slot:prepend" | "v-slot:append" | "onClick:append" | "onClick:prepend" | "v-slot:message" | "iconColor" | "hint" | "hideDetails" | "v-slot:details" | ("error" | "direction" | "style" | "disabled" | "readonly" | "messages" | "rules" | "focused" | "errorMessages" | "maxErrors" | "density" | "centerAffix" | "glow" | "hideSpinButtons" | "persistentHint")>, `$${any}`> & {
1208
1208
  _allExposed: {
1209
1209
  reset: () => Promise<void>;
1210
1210
  resetValidation: () => Promise<void>;
@@ -1224,7 +1224,7 @@ export declare const VTextarea: {
1224
1224
  disabled: boolean;
1225
1225
  readonly: boolean | null;
1226
1226
  messages: string | readonly string[];
1227
- rules: readonly import("../../types.js").ValidationRule[];
1227
+ rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
1228
1228
  focused: boolean;
1229
1229
  errorMessages: string | readonly string[] | null;
1230
1230
  maxErrors: string | number;
@@ -1261,7 +1261,7 @@ export declare const VTextarea: {
1261
1261
  disabled: boolean;
1262
1262
  readonly: boolean | null;
1263
1263
  messages: string | readonly string[];
1264
- rules: readonly import("../../types.js").ValidationRule[];
1264
+ rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
1265
1265
  focused: boolean;
1266
1266
  errorMessages: string | readonly string[] | null;
1267
1267
  maxErrors: string | number;
@@ -1303,7 +1303,6 @@ export declare const VTextarea: {
1303
1303
  bgColor?: string | undefined;
1304
1304
  prependIcon?: import("../../composables/icons.js").IconValue | undefined;
1305
1305
  appendIcon?: import("../../composables/icons.js").IconValue | undefined;
1306
- iconColor?: string | boolean | undefined;
1307
1306
  appendInnerIcon?: import("../../composables/icons.js").IconValue | undefined;
1308
1307
  prependInnerIcon?: import("../../composables/icons.js").IconValue | undefined;
1309
1308
  'onClick:clear'?: ((args_0: MouseEvent) => void) | undefined;
@@ -1312,6 +1311,7 @@ export declare const VTextarea: {
1312
1311
  'onClick:appendInner'?: ((args_0: MouseEvent) => void) | undefined;
1313
1312
  'onClick:prependInner'?: ((args_0: MouseEvent) => void) | undefined;
1314
1313
  centerAffix?: boolean | undefined;
1314
+ iconColor?: string | boolean | undefined;
1315
1315
  hint?: string | undefined;
1316
1316
  hideDetails?: boolean | "auto" | undefined;
1317
1317
  suffix?: string | undefined;
@@ -1384,7 +1384,7 @@ export declare const VTextarea: {
1384
1384
  disabled: boolean | null;
1385
1385
  readonly: boolean | null;
1386
1386
  messages: string | readonly string[];
1387
- rules: readonly import("../../types.js").ValidationRule[];
1387
+ rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
1388
1388
  focused: boolean;
1389
1389
  errorMessages: string | readonly string[] | null;
1390
1390
  maxErrors: string | number;
@@ -1400,7 +1400,7 @@ export declare const VTextarea: {
1400
1400
  disabled: boolean | null;
1401
1401
  readonly: boolean | null;
1402
1402
  messages: string | readonly string[];
1403
- rules: readonly import("../../types.js").ValidationRule[];
1403
+ rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
1404
1404
  focused: boolean;
1405
1405
  errorMessages: string | readonly string[] | null;
1406
1406
  maxErrors: string | number;
@@ -1424,9 +1424,9 @@ export declare const VTextarea: {
1424
1424
  baseColor?: string | undefined;
1425
1425
  prependIcon?: import("../../composables/icons.js").IconValue | undefined;
1426
1426
  appendIcon?: import("../../composables/icons.js").IconValue | undefined;
1427
- iconColor?: string | boolean | undefined;
1428
1427
  'onClick:append'?: ((args_0: MouseEvent) => void) | undefined;
1429
1428
  'onClick:prepend'?: ((args_0: MouseEvent) => void) | undefined;
1429
+ iconColor?: string | boolean | undefined;
1430
1430
  hint?: string | undefined;
1431
1431
  hideDetails?: boolean | "auto" | undefined;
1432
1432
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "error" | "direction" | "style" | "disabled" | "readonly" | "messages" | "rules" | "focused" | "errorMessages" | "maxErrors" | "density" | "centerAffix" | "glow" | "hideSpinButtons" | "persistentHint">;
@@ -1455,7 +1455,7 @@ export declare const VTextarea: {
1455
1455
  disabled: boolean | null;
1456
1456
  readonly: boolean | null;
1457
1457
  messages: string | readonly string[];
1458
- rules: readonly import("../../types.js").ValidationRule[];
1458
+ rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
1459
1459
  focused: boolean;
1460
1460
  errorMessages: string | readonly string[] | null;
1461
1461
  maxErrors: string | number;
@@ -1480,9 +1480,9 @@ export declare const VTextarea: {
1480
1480
  baseColor?: string | undefined;
1481
1481
  prependIcon?: import("../../composables/icons.js").IconValue | undefined;
1482
1482
  appendIcon?: import("../../composables/icons.js").IconValue | undefined;
1483
- iconColor?: string | boolean | undefined;
1484
1483
  'onClick:append'?: ((args_0: MouseEvent) => void) | undefined;
1485
1484
  'onClick:prepend'?: ((args_0: MouseEvent) => void) | undefined;
1485
+ iconColor?: string | boolean | undefined;
1486
1486
  hint?: string | undefined;
1487
1487
  hideDetails?: boolean | "auto" | undefined;
1488
1488
  } & {}, {
@@ -1500,7 +1500,7 @@ export declare const VTextarea: {
1500
1500
  disabled: boolean | null;
1501
1501
  readonly: boolean | null;
1502
1502
  messages: string | readonly string[];
1503
- rules: readonly import("../../types.js").ValidationRule[];
1503
+ rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
1504
1504
  focused: boolean;
1505
1505
  errorMessages: string | readonly string[] | null;
1506
1506
  maxErrors: string | number;
@@ -1542,7 +1542,7 @@ export declare const VTextarea: {
1542
1542
  disabled: boolean | null;
1543
1543
  readonly: boolean | null;
1544
1544
  messages: string | readonly string[];
1545
- rules: readonly import("../../types.js").ValidationRule[];
1545
+ rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
1546
1546
  focused: boolean;
1547
1547
  errorMessages: string | readonly string[] | null;
1548
1548
  maxErrors: string | number;
@@ -1558,7 +1558,7 @@ export declare const VTextarea: {
1558
1558
  disabled: boolean | null;
1559
1559
  readonly: boolean | null;
1560
1560
  messages: string | readonly string[];
1561
- rules: readonly import("../../types.js").ValidationRule[];
1561
+ rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
1562
1562
  focused: boolean;
1563
1563
  errorMessages: string | readonly string[] | null;
1564
1564
  maxErrors: string | number;
@@ -1583,9 +1583,9 @@ export declare const VTextarea: {
1583
1583
  baseColor?: string | undefined;
1584
1584
  prependIcon?: import("../../composables/icons.js").IconValue | undefined;
1585
1585
  appendIcon?: import("../../composables/icons.js").IconValue | undefined;
1586
- iconColor?: string | boolean | undefined;
1587
1586
  'onClick:append'?: ((args_0: MouseEvent) => void) | undefined;
1588
1587
  'onClick:prepend'?: ((args_0: MouseEvent) => void) | undefined;
1588
+ iconColor?: string | boolean | undefined;
1589
1589
  hint?: string | undefined;
1590
1590
  hideDetails?: boolean | "auto" | undefined;
1591
1591
  } & {}, "reset" | "isValid" | "validate" | "resetValidation" | ("error" | "direction" | "style" | "disabled" | "readonly" | "messages" | "rules" | "focused" | "errorMessages" | "maxErrors" | "density" | "centerAffix" | "glow" | "hideSpinButtons" | "persistentHint")> & import("vue").ShallowUnwrapRef<{
@@ -1597,7 +1597,7 @@ export declare const VTextarea: {
1597
1597
  }> & {} & import("vue").ComponentCustomProperties & {} & import("../../util/index.js").GenericProps<{
1598
1598
  modelValue?: unknown;
1599
1599
  'onUpdate:modelValue'?: ((value: unknown) => void) | undefined;
1600
- }, VInputSlots>, "name" | "id" | "width" | "color" | "maxWidth" | "minWidth" | "label" | "class" | "theme" | "$children" | "v-slots" | "v-slot:default" | keyof import("vue").VNodeProps | "onUpdate:focused" | "modelValue" | "validateOn" | "validationValue" | "onUpdate:modelValue" | "baseColor" | "prependIcon" | "appendIcon" | "v-slot:prepend" | "v-slot:append" | "iconColor" | "onClick:append" | "onClick:prepend" | "v-slot:message" | "hint" | "hideDetails" | "v-slot:details" | ("error" | "direction" | "style" | "disabled" | "readonly" | "messages" | "rules" | "focused" | "errorMessages" | "maxErrors" | "density" | "centerAffix" | "glow" | "hideSpinButtons" | "persistentHint")>, `$${any}`> & {
1600
+ }, VInputSlots>, "name" | "id" | "width" | "color" | "maxWidth" | "minWidth" | "label" | "class" | "theme" | "$children" | "v-slots" | "v-slot:default" | keyof import("vue").VNodeProps | "onUpdate:focused" | "modelValue" | "validateOn" | "validationValue" | "onUpdate:modelValue" | "baseColor" | "prependIcon" | "appendIcon" | "v-slot:prepend" | "v-slot:append" | "onClick:append" | "onClick:prepend" | "v-slot:message" | "iconColor" | "hint" | "hideDetails" | "v-slot:details" | ("error" | "direction" | "style" | "disabled" | "readonly" | "messages" | "rules" | "focused" | "errorMessages" | "maxErrors" | "density" | "centerAffix" | "glow" | "hideSpinButtons" | "persistentHint")>, `$${any}`> & {
1601
1601
  _allExposed: {
1602
1602
  reset: () => Promise<void>;
1603
1603
  resetValidation: () => Promise<void>;
@@ -1622,7 +1622,7 @@ export declare const VTextarea: {
1622
1622
  disabled: boolean;
1623
1623
  readonly: boolean | null;
1624
1624
  messages: string | readonly string[];
1625
- rules: readonly import("../../types.js").ValidationRule[];
1625
+ rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
1626
1626
  focused: boolean;
1627
1627
  errorMessages: string | readonly string[] | null;
1628
1628
  maxErrors: string | number;
@@ -1724,7 +1724,7 @@ export declare const VTextarea: {
1724
1724
  default: null;
1725
1725
  };
1726
1726
  rules: {
1727
- type: PropType<readonly import("../../types.js").ValidationRule[]>;
1727
+ type: PropType<readonly (import("../../types.js").ValidationRule | import("../../labs/rules/index.js").ValidationAlias)[]>;
1728
1728
  default: () => never[];
1729
1729
  };
1730
1730
  modelValue: null;
@@ -1841,7 +1841,7 @@ export declare const VTextarea: {
1841
1841
  default: null;
1842
1842
  };
1843
1843
  rules: {
1844
- type: PropType<readonly import("../../types.js").ValidationRule[]>;
1844
+ type: PropType<readonly (import("../../types.js").ValidationRule | import("../../labs/rules/index.js").ValidationAlias)[]>;
1845
1845
  default: () => never[];
1846
1846
  };
1847
1847
  modelValue: null;
@@ -8,7 +8,7 @@ export declare const VValidation: {
8
8
  error: boolean;
9
9
  disabled: boolean | null;
10
10
  readonly: boolean | null;
11
- rules: readonly import("../../composables/validation.js").ValidationRule[];
11
+ rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
12
12
  focused: boolean;
13
13
  errorMessages: string | readonly string[] | null;
14
14
  maxErrors: string | number;
@@ -26,7 +26,7 @@ export declare const VValidation: {
26
26
  error: boolean;
27
27
  disabled: boolean | null;
28
28
  readonly: boolean | null;
29
- rules: readonly import("../../composables/validation.js").ValidationRule[];
29
+ rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
30
30
  focused: boolean;
31
31
  errorMessages: string | readonly string[] | null;
32
32
  maxErrors: string | number;
@@ -57,7 +57,7 @@ export declare const VValidation: {
57
57
  error: boolean;
58
58
  disabled: boolean | null;
59
59
  readonly: boolean | null;
60
- rules: readonly import("../../composables/validation.js").ValidationRule[];
60
+ rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
61
61
  focused: boolean;
62
62
  errorMessages: string | readonly string[] | null;
63
63
  maxErrors: string | number;
@@ -73,7 +73,7 @@ export declare const VValidation: {
73
73
  error: boolean;
74
74
  disabled: boolean | null;
75
75
  readonly: boolean | null;
76
- rules: readonly import("../../composables/validation.js").ValidationRule[];
76
+ rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
77
77
  focused: boolean;
78
78
  errorMessages: string | readonly string[] | null;
79
79
  maxErrors: string | number;
@@ -85,7 +85,7 @@ export declare const VValidation: {
85
85
  error: boolean;
86
86
  disabled: boolean | null;
87
87
  readonly: boolean | null;
88
- rules: readonly import("../../composables/validation.js").ValidationRule[];
88
+ rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
89
89
  focused: boolean;
90
90
  errorMessages: string | readonly string[] | null;
91
91
  maxErrors: string | number;
@@ -103,7 +103,7 @@ export declare const VValidation: {
103
103
  error: boolean;
104
104
  disabled: boolean | null;
105
105
  readonly: boolean | null;
106
- rules: readonly import("../../composables/validation.js").ValidationRule[];
106
+ rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
107
107
  focused: boolean;
108
108
  errorMessages: string | readonly string[] | null;
109
109
  maxErrors: string | number;
@@ -149,7 +149,7 @@ export declare const VValidation: {
149
149
  default: null;
150
150
  };
151
151
  rules: {
152
- type: import("vue").PropType<readonly import("../../composables/validation.js").ValidationRule[]>;
152
+ type: import("vue").PropType<readonly (import("../../composables/validation.js").ValidationRule | import("../../labs/rules/index.js").ValidationAlias)[]>;
153
153
  default: () => never[];
154
154
  };
155
155
  modelValue: null;
@@ -178,7 +178,7 @@ export declare const VValidation: {
178
178
  default: null;
179
179
  };
180
180
  rules: {
181
- type: import("vue").PropType<readonly import("../../composables/validation.js").ValidationRule[]>;
181
+ type: import("vue").PropType<readonly (import("../../composables/validation.js").ValidationRule | import("../../labs/rules/index.js").ValidationAlias)[]>;
182
182
  default: () => never[];
183
183
  };
184
184
  modelValue: null;
@@ -11,7 +11,6 @@ export interface CalendarProps {
11
11
  weekdays: number[];
12
12
  year: number | string | undefined;
13
13
  weeksInMonth: 'dynamic' | 'static';
14
- /** @deprecated */
15
14
  firstDayOfWeek: number | string | undefined;
16
15
  'onUpdate:modelValue': ((value: unknown[]) => void) | undefined;
17
16
  'onUpdate:month': ((value: number) => void) | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"calendar.js","names":["useDate","useProxiedModel","computed","propsFactory","wrapInArray","makeCalendarProps","allowedDates","Array","Function","disabled","type","Boolean","default","displayValue","modelValue","month","Number","String","max","min","showAdjacentMonths","year","weekdays","weeksInMonth","firstDayOfWeek","undefined","useCalendar","props","adapter","model","v","map","i","date","value","length","isArray","getYear","startOfYear","setYear","getMonth","startOfMonth","setMonth","weekDays","toJsDate","startOfWeek","getDay","day","weeks","getWeekArray","days","flat","daysInMonth","lastDay","week","push","addDays","genDays","today","filter","includes","index","isoDate","toISO","isAdjacent","isSameMonth","isStart","isSameDay","isEnd","endOfMonth","isSame","formatted","format","isDisabled","isHidden","isSelected","some","isToday","isWeekEnd","isWeekStart","localized","daysInWeek","weekNumbers","getWeek","isAfter","d"],"sources":["../../src/composables/calendar.ts"],"sourcesContent":["// Composables\nimport { useDate } from '@/composables/date/date'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed } from 'vue'\nimport { propsFactory, wrapInArray } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\n\n// Types\nexport interface CalendarProps {\n allowedDates: unknown[] | ((date: unknown) => boolean) | undefined\n disabled: boolean\n displayValue?: unknown\n modelValue: unknown[] | undefined\n max: unknown\n min: unknown\n showAdjacentMonths: boolean\n month: number | string | undefined\n weekdays: number[]\n year: number | string | undefined\n weeksInMonth: 'dynamic' | 'static'\n\n /** @deprecated */\n firstDayOfWeek: number | string | undefined\n\n 'onUpdate:modelValue': ((value: unknown[]) => void) | undefined\n 'onUpdate:month': ((value: number) => void) | undefined\n 'onUpdate:year': ((value: number) => void) | undefined\n}\n\nexport type CalendarDay = {\n date: Date\n formatted: string\n isAdjacent: boolean\n isDisabled: boolean\n isEnd: boolean\n isHidden: boolean\n isSame: boolean\n isSelected: boolean\n isStart: boolean\n isToday: boolean\n isWeekEnd: boolean\n isWeekStart: boolean\n isoDate: string\n localized: string\n month: number\n year: number\n}\n\nexport type CalendarWeekdays = 0 | 1 | 2 | 3 | 4 | 5 | 6\n\n// Composables\nexport const makeCalendarProps = propsFactory({\n allowedDates: [Array, Function] as PropType<unknown[] | ((date: unknown) => boolean)>,\n disabled: {\n type: Boolean,\n default: null,\n },\n displayValue: null as any as PropType<unknown>,\n modelValue: Array as PropType<unknown[]>,\n month: [Number, String],\n max: null as any as PropType<unknown>,\n min: null as any as PropType<unknown>,\n showAdjacentMonths: Boolean,\n year: [Number, String],\n weekdays: {\n type: Array as PropType<CalendarWeekdays[]>,\n default: () => [0, 1, 2, 3, 4, 5, 6],\n },\n weeksInMonth: {\n type: String as PropType<'dynamic' | 'static'>,\n default: 'dynamic',\n },\n firstDayOfWeek: {\n type: [Number, String],\n default: undefined,\n },\n}, 'calendar')\n\nexport function useCalendar (props: CalendarProps) {\n const adapter = useDate()\n const model = useProxiedModel(\n props,\n 'modelValue',\n [],\n v => wrapInArray(v).map(i => adapter.date(i)),\n )\n const displayValue = computed(() => {\n if (props.displayValue) return adapter.date(props.displayValue)\n if (model.value.length > 0) return adapter.date(model.value[0])\n if (props.min) return adapter.date(props.min)\n if (Array.isArray(props.allowedDates)) return adapter.date(props.allowedDates[0])\n\n return adapter.date()\n })\n\n const year = useProxiedModel(\n props,\n 'year',\n undefined,\n v => {\n const value = v != null ? Number(v) : adapter.getYear(displayValue.value)\n\n return adapter.startOfYear(adapter.setYear(adapter.date(), value))\n },\n v => adapter.getYear(v)\n )\n\n const month = useProxiedModel(\n props,\n 'month',\n undefined,\n v => {\n const value = v != null ? Number(v) : adapter.getMonth(displayValue.value)\n const date = adapter.setYear(adapter.startOfMonth(adapter.date()), adapter.getYear(year.value))\n\n return adapter.setMonth(date, value)\n },\n v => adapter.getMonth(v)\n )\n\n const weekDays = computed(() => {\n const firstDayOfWeek = adapter.toJsDate(adapter.startOfWeek(adapter.date(), props.firstDayOfWeek)).getDay()\n // Always generate all days, regardless of props.weekdays\n return [0, 1, 2, 3, 4, 5, 6].map(day => (day + firstDayOfWeek) % 7)\n })\n\n const weeksInMonth = computed(() => {\n const weeks = adapter.getWeekArray(month.value, props.firstDayOfWeek)\n\n const days = weeks.flat()\n\n // Make sure there's always 6 weeks in month (6 * 7 days)\n // if weeksInMonth is 'static'\n const daysInMonth = 6 * 7\n if (props.weeksInMonth === 'static' && days.length < daysInMonth) {\n const lastDay = days[days.length - 1]\n\n let week = []\n for (let day = 1; day <= daysInMonth - days.length; day++) {\n week.push(adapter.addDays(lastDay, day))\n\n if (day % 7 === 0) {\n weeks.push(week)\n week = []\n }\n }\n }\n\n return weeks\n })\n\n function genDays (days: Date[], today: Date): CalendarDay[] {\n return days.filter(date => {\n return weekDays.value.includes(adapter.toJsDate(date).getDay())\n }).map((date, index) => {\n const isoDate = adapter.toISO(date)\n const isAdjacent = !adapter.isSameMonth(date, month.value)\n const isStart = adapter.isSameDay(date, adapter.startOfMonth(month.value))\n const isEnd = adapter.isSameDay(date, adapter.endOfMonth(month.value))\n const isSame = adapter.isSameDay(date, month.value)\n\n return {\n date,\n formatted: adapter.format(date, 'keyboardDate'),\n isAdjacent,\n isDisabled: isDisabled(date),\n isEnd,\n isHidden: isAdjacent && !props.showAdjacentMonths,\n isSame,\n isSelected: model.value.some(value => adapter.isSameDay(date, value)),\n isStart,\n isToday: adapter.isSameDay(date, today),\n isWeekEnd: index % 7 === 6,\n isWeekStart: index % 7 === 0,\n isoDate,\n localized: adapter.format(date, 'dayOfMonth'),\n month: adapter.getMonth(date),\n year: adapter.getYear(date),\n }\n })\n }\n\n const daysInWeek = computed(() => {\n const lastDay = adapter.startOfWeek(displayValue.value, props.firstDayOfWeek)\n const week: Date[] = []\n for (let day = 0; day <= 6; day++) {\n week.push(adapter.addDays(lastDay, day) as Date)\n }\n\n const today = adapter.date() as Date\n\n return genDays(week as Date[], today as Date)\n })\n\n const daysInMonth = computed(() => {\n const days = weeksInMonth.value.flat() as Date[]\n const today = adapter.date() as Date\n\n return genDays(days as Date[], today)\n })\n\n const weekNumbers = computed(() => {\n return weeksInMonth.value.map(week => {\n return week.length ? adapter.getWeek(week[0], props.firstDayOfWeek) : null\n })\n })\n\n function isDisabled (value: unknown) {\n if (props.disabled) return true\n\n const date = adapter.date(value)\n\n if (props.min && adapter.isAfter(adapter.date(props.min), date)) return true\n if (props.max && adapter.isAfter(date, adapter.date(props.max))) return true\n\n if (Array.isArray(props.allowedDates) && props.allowedDates.length > 0) {\n return !props.allowedDates.some(d => adapter.isSameDay(adapter.date(d), date))\n }\n\n if (typeof props.allowedDates === 'function') {\n return !props.allowedDates(date)\n }\n\n return !props.weekdays.includes(adapter.toJsDate(date).getDay())\n }\n\n return {\n displayValue,\n daysInMonth,\n daysInWeek,\n genDays,\n model,\n weeksInMonth,\n weekDays,\n weekNumbers,\n }\n}\n"],"mappings":"AAAA;AAAA,SACSA,OAAO;AAAA,SACPC,eAAe,6BAExB;AACA,SAASC,QAAQ,QAAQ,KAAK;AAAA,SACrBC,YAAY,EAAEC,WAAW,4BAElC;AAGA;AA2CA;AACA,OAAO,MAAMC,iBAAiB,GAAGF,YAAY,CAAC;EAC5CG,YAAY,EAAE,CAACC,KAAK,EAAEC,QAAQ,CAAuD;EACrFC,QAAQ,EAAE;IACRC,IAAI,EAAEC,OAAO;IACbC,OAAO,EAAE;EACX,CAAC;EACDC,YAAY,EAAE,IAAgC;EAC9CC,UAAU,EAAEP,KAA4B;EACxCQ,KAAK,EAAE,CAACC,MAAM,EAAEC,MAAM,CAAC;EACvBC,GAAG,EAAE,IAAgC;EACrCC,GAAG,EAAE,IAAgC;EACrCC,kBAAkB,EAAET,OAAO;EAC3BU,IAAI,EAAE,CAACL,MAAM,EAAEC,MAAM,CAAC;EACtBK,QAAQ,EAAE;IACRZ,IAAI,EAAEH,KAAqC;IAC3CK,OAAO,EAAEA,CAAA,KAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;EACrC,CAAC;EACDW,YAAY,EAAE;IACZb,IAAI,EAAEO,MAAwC;IAC9CL,OAAO,EAAE;EACX,CAAC;EACDY,cAAc,EAAE;IACdd,IAAI,EAAE,CAACM,MAAM,EAAEC,MAAM,CAAC;IACtBL,OAAO,EA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OAAO,CAACnD,IAAI,EAAEL,OAAO,CAACK,IAAI,CAACN,KAAK,CAACT,GAAG,CAAC,CAAC,EAAE,OAAO,IAAI;IAE5E,IAAIX,KAAK,CAAC6B,OAAO,CAACT,KAAK,CAACrB,YAAY,CAAC,IAAIqB,KAAK,CAACrB,YAAY,CAAC6B,MAAM,GAAG,CAAC,EAAE;MACtE,OAAO,CAACR,KAAK,CAACrB,YAAY,CAACsE,IAAI,CAACS,CAAC,IAAIzD,OAAO,CAACuC,SAAS,CAACvC,OAAO,CAACK,IAAI,CAACoD,CAAC,CAAC,EAAEpD,IAAI,CAAC,CAAC;IAChF;IAEA,IAAI,OAAON,KAAK,CAACrB,YAAY,KAAK,UAAU,EAAE;MAC5C,OAAO,CAACqB,KAAK,CAACrB,YAAY,CAAC2B,IAAI,CAAC;IAClC;IAEA,OAAO,CAACN,KAAK,CAACL,QAAQ,CAACsC,QAAQ,CAAChC,OAAO,CAACgB,QAAQ,CAACX,IAAI,CAAC,CAACa,MAAM,CAAC,CAAC,CAAC;EAClE;EAEA,OAAO;IACLjC,YAAY;IACZuC,WAAW;IACX6B,UAAU;IACVxB,OAAO;IACP5B,KAAK;IACLN,YAAY;IACZoB,QAAQ;IACRuC;EACF,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"file":"calendar.js","names":["useDate","useProxiedModel","computed","propsFactory","wrapInArray","makeCalendarProps","allowedDates","Array","Function","disabled","type","Boolean","default","displayValue","modelValue","month","Number","String","max","min","showAdjacentMonths","year","weekdays","weeksInMonth","firstDayOfWeek","undefined","useCalendar","props","adapter","model","v","map","i","date","value","length","isArray","getYear","startOfYear","setYear","getMonth","startOfMonth","setMonth","weekDays","toJsDate","startOfWeek","getDay","day","weeks","getWeekArray","days","flat","daysInMonth","lastDay","week","push","addDays","genDays","today","filter","includes","index","isoDate","toISO","isAdjacent","isSameMonth","isStart","isSameDay","isEnd","endOfMonth","isSame","formatted","format","isDisabled","isHidden","isSelected","some","isToday","isWeekEnd","isWeekStart","localized","daysInWeek","weekNumbers","getWeek","isAfter","d"],"sources":["../../src/composables/calendar.ts"],"sourcesContent":["// Composables\nimport { useDate } from '@/composables/date/date'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed } from 'vue'\nimport { propsFactory, wrapInArray } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\n\n// Types\nexport interface CalendarProps {\n allowedDates: unknown[] | ((date: unknown) => boolean) | undefined\n disabled: boolean\n displayValue?: unknown\n modelValue: unknown[] | undefined\n max: unknown\n min: unknown\n showAdjacentMonths: boolean\n month: number | string | undefined\n weekdays: number[]\n year: number | string | undefined\n weeksInMonth: 'dynamic' | 'static'\n firstDayOfWeek: number | string | undefined\n\n 'onUpdate:modelValue': ((value: unknown[]) => void) | undefined\n 'onUpdate:month': ((value: number) => void) | undefined\n 'onUpdate:year': ((value: number) => void) | undefined\n}\n\nexport type CalendarDay = {\n date: Date\n formatted: string\n isAdjacent: boolean\n isDisabled: boolean\n isEnd: boolean\n isHidden: boolean\n isSame: boolean\n isSelected: boolean\n isStart: boolean\n isToday: boolean\n isWeekEnd: boolean\n isWeekStart: boolean\n isoDate: string\n localized: string\n month: number\n year: number\n}\n\nexport type CalendarWeekdays = 0 | 1 | 2 | 3 | 4 | 5 | 6\n\n// Composables\nexport const makeCalendarProps = propsFactory({\n allowedDates: [Array, Function] as PropType<unknown[] | ((date: unknown) => boolean)>,\n disabled: {\n type: Boolean,\n default: null,\n },\n displayValue: null as any as PropType<unknown>,\n modelValue: Array as PropType<unknown[]>,\n month: [Number, String],\n max: null as any as PropType<unknown>,\n min: null as any as PropType<unknown>,\n showAdjacentMonths: Boolean,\n year: [Number, String],\n weekdays: {\n type: Array as PropType<CalendarWeekdays[]>,\n default: () => [0, 1, 2, 3, 4, 5, 6],\n },\n weeksInMonth: {\n type: String as PropType<'dynamic' | 'static'>,\n default: 'dynamic',\n },\n firstDayOfWeek: {\n type: [Number, String],\n default: undefined,\n },\n}, 'calendar')\n\nexport function useCalendar (props: CalendarProps) {\n const adapter = useDate()\n const model = useProxiedModel(\n props,\n 'modelValue',\n [],\n v => wrapInArray(v).map(i => adapter.date(i)),\n )\n const displayValue = computed(() => {\n if (props.displayValue) return adapter.date(props.displayValue)\n if (model.value.length > 0) return adapter.date(model.value[0])\n if (props.min) return adapter.date(props.min)\n if (Array.isArray(props.allowedDates)) return adapter.date(props.allowedDates[0])\n\n return adapter.date()\n })\n\n const year = useProxiedModel(\n props,\n 'year',\n undefined,\n v => {\n const value = v != null ? Number(v) : adapter.getYear(displayValue.value)\n\n return adapter.startOfYear(adapter.setYear(adapter.date(), value))\n },\n v => adapter.getYear(v)\n )\n\n const month = useProxiedModel(\n props,\n 'month',\n undefined,\n v => {\n const value = v != null ? Number(v) : adapter.getMonth(displayValue.value)\n const date = adapter.setYear(adapter.startOfMonth(adapter.date()), adapter.getYear(year.value))\n\n return adapter.setMonth(date, value)\n },\n v => adapter.getMonth(v)\n )\n\n const weekDays = computed(() => {\n const firstDayOfWeek = adapter.toJsDate(adapter.startOfWeek(adapter.date(), props.firstDayOfWeek)).getDay()\n // Always generate all days, regardless of props.weekdays\n return [0, 1, 2, 3, 4, 5, 6].map(day => (day + firstDayOfWeek) % 7)\n })\n\n const weeksInMonth = computed(() => {\n const weeks = adapter.getWeekArray(month.value, props.firstDayOfWeek)\n\n const days = weeks.flat()\n\n // Make sure there's always 6 weeks in month (6 * 7 days)\n // if weeksInMonth is 'static'\n const daysInMonth = 6 * 7\n if (props.weeksInMonth === 'static' && days.length < daysInMonth) {\n const lastDay = days[days.length - 1]\n\n let week = []\n for (let day = 1; day <= daysInMonth - days.length; day++) {\n week.push(adapter.addDays(lastDay, day))\n\n if (day % 7 === 0) {\n weeks.push(week)\n week = []\n }\n }\n }\n\n return weeks\n })\n\n function genDays (days: Date[], today: Date): CalendarDay[] {\n return days.filter(date => {\n return weekDays.value.includes(adapter.toJsDate(date).getDay())\n }).map((date, index) => {\n const isoDate = adapter.toISO(date)\n const isAdjacent = !adapter.isSameMonth(date, month.value)\n const isStart = adapter.isSameDay(date, adapter.startOfMonth(month.value))\n const isEnd = adapter.isSameDay(date, adapter.endOfMonth(month.value))\n const isSame = adapter.isSameDay(date, month.value)\n\n return {\n date,\n formatted: adapter.format(date, 'keyboardDate'),\n isAdjacent,\n isDisabled: isDisabled(date),\n isEnd,\n isHidden: isAdjacent && !props.showAdjacentMonths,\n isSame,\n isSelected: model.value.some(value => adapter.isSameDay(date, value)),\n isStart,\n isToday: adapter.isSameDay(date, today),\n isWeekEnd: index % 7 === 6,\n isWeekStart: index % 7 === 0,\n isoDate,\n localized: adapter.format(date, 'dayOfMonth'),\n month: adapter.getMonth(date),\n year: adapter.getYear(date),\n }\n })\n }\n\n const daysInWeek = computed(() => {\n const lastDay = adapter.startOfWeek(displayValue.value, props.firstDayOfWeek)\n const week: Date[] = []\n for (let day = 0; day <= 6; day++) {\n week.push(adapter.addDays(lastDay, day) as Date)\n }\n\n const today = adapter.date() as Date\n\n return genDays(week as Date[], today as Date)\n })\n\n const daysInMonth = computed(() => {\n const days = weeksInMonth.value.flat() as Date[]\n const today = adapter.date() as Date\n\n return genDays(days as Date[], today)\n })\n\n const weekNumbers = computed(() => {\n return weeksInMonth.value.map(week => {\n return week.length ? adapter.getWeek(week[0], props.firstDayOfWeek) : null\n })\n })\n\n function isDisabled (value: unknown) {\n if (props.disabled) return true\n\n const date = adapter.date(value)\n\n if (props.min && adapter.isAfter(adapter.date(props.min), date)) return true\n if (props.max && adapter.isAfter(date, adapter.date(props.max))) return true\n\n if (Array.isArray(props.allowedDates) && props.allowedDates.length > 0) {\n return !props.allowedDates.some(d => adapter.isSameDay(adapter.date(d), date))\n }\n\n if (typeof props.allowedDates === 'function') {\n return !props.allowedDates(date)\n }\n\n return !props.weekdays.includes(adapter.toJsDate(date).getDay())\n }\n\n return {\n displayValue,\n daysInMonth,\n daysInWeek,\n genDays,\n model,\n weeksInMonth,\n weekDays,\n weekNumbers,\n }\n}\n"],"mappings":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