@pisell/date-picker 1.0.127 → 1.0.128

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.
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ButtonProps } from 'antd';
3
2
  import { Dayjs } from 'dayjs';
4
3
  import './index.less';
@@ -1,3 +1,4 @@
1
+ import * as React from 'react';
1
2
  import { BaseToolbarProps, ExportedBaseToolbarProps } from '@mui/x-date-pickers/internals';
2
3
  import { DateRange } from '../internals/models';
3
4
  import { UseRangePositionResponse } from '../internals/hooks/useRangePosition';
@@ -7,5 +8,5 @@ export interface DateRangePickerToolbarProps<TDate> extends Omit<BaseToolbarProp
7
8
  }
8
9
  export interface ExportedDateRangePickerToolbarProps extends ExportedBaseToolbarProps {
9
10
  }
10
- declare const DateRangePickerToolbar: any;
11
+ declare const DateRangePickerToolbar: React.ForwardRefExoticComponent<DateRangePickerToolbarProps<unknown> & React.RefAttributes<HTMLDivElement>>;
11
12
  export { DateRangePickerToolbar };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ButtonProps } from "antd";
3
2
  import { Dayjs } from "dayjs";
4
3
  import "./index.less";
@@ -1,2 +1,7 @@
1
- export declare const LocaleContext: any;
2
- export declare const LocaleProvider: any;
1
+ /// <reference types="react" />
2
+ interface LocaleContextType {
3
+ locale?: string;
4
+ }
5
+ export declare const LocaleContext: import("react").Context<LocaleContextType>;
6
+ export declare const LocaleProvider: import("react").Provider<LocaleContextType>;
7
+ export {};
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Toolbar: (props: any) => JSX.Element | null;
4
3
  export default Toolbar;
@@ -1,2 +1,2 @@
1
- declare const useDocumentVisibility: () => any;
1
+ declare const useDocumentVisibility: () => "hidden" | "visible";
2
2
  export default useDocumentVisibility;
@@ -1,4 +1,3 @@
1
- export * from '@mui/x-date-pickers/themeAugmentation';
2
- export * from './overrides';
3
- export * from './props';
4
- export * from './components';
1
+ export type * from './overrides';
2
+ export type * from './props';
3
+ export type * from './components';
@@ -1,4 +1 @@
1
- export * from '@mui/x-date-pickers/themeAugmentation';
2
- export * from "./overrides";
3
- export * from "./props";
4
- export * from "./components";
1
+ export {};
@@ -0,0 +1,5 @@
1
+ namespace JSX {
2
+ interface IntrinsicElements {
3
+ [elemName: string]: any;
4
+ }
5
+ }
@@ -2,14 +2,14 @@ import { PresetType } from "../Shortcuts";
2
2
  import { Dayjs } from "dayjs";
3
3
  export declare const getCurrentLocale: () => string;
4
4
  export declare const isBrowser: boolean;
5
- export declare const isMobile: () => boolean;
5
+ export declare const isMobile: () => any;
6
6
  /**
7
7
  * 格式化预设
8
8
  * @param presets
9
9
  */
10
10
  export declare const formatPresets: (presets: PresetType[], locale?: string) => ({
11
11
  label: any;
12
- getValue: (() => Dayjs[]) | (() => [Dayjs, Dayjs] | "today" | "yesterday" | "last_3_days" | "last_7_days" | "last_30_days" | "last_90_days" | "last_180_days" | "tomorrow" | "next_3_days" | "next_7_days" | "next_30_days" | "next_90_days" | "next_180_days");
12
+ getValue: any;
13
13
  value: [Dayjs, Dayjs] | "today" | "yesterday" | "last_3_days" | "last_7_days" | "last_30_days" | "last_90_days" | "last_180_days" | "tomorrow" | "next_3_days" | "next_7_days" | "next_30_days" | "next_90_days" | "next_180_days";
14
14
  key?: string | undefined;
15
15
  } | {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ButtonProps } from 'antd';
3
2
  import { Dayjs } from 'dayjs';
4
3
  import './index.less';
@@ -1,3 +1,4 @@
1
+ import * as React from 'react';
1
2
  import { BaseToolbarProps, ExportedBaseToolbarProps } from '@mui/x-date-pickers/internals';
2
3
  import { DateRange } from '../internals/models';
3
4
  import { UseRangePositionResponse } from '../internals/hooks/useRangePosition';
@@ -7,5 +8,5 @@ export interface DateRangePickerToolbarProps<TDate> extends Omit<BaseToolbarProp
7
8
  }
8
9
  export interface ExportedDateRangePickerToolbarProps extends ExportedBaseToolbarProps {
9
10
  }
10
- declare const DateRangePickerToolbar: any;
11
+ declare const DateRangePickerToolbar: React.ForwardRefExoticComponent<DateRangePickerToolbarProps<unknown> & React.RefAttributes<HTMLDivElement>>;
11
12
  export { DateRangePickerToolbar };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ButtonProps } from "antd";
3
2
  import { Dayjs } from "dayjs";
4
3
  import "./index.less";
@@ -1,2 +1,7 @@
1
- export declare const LocaleContext: any;
2
- export declare const LocaleProvider: any;
1
+ /// <reference types="react" />
2
+ interface LocaleContextType {
3
+ locale?: string;
4
+ }
5
+ export declare const LocaleContext: import("react").Context<LocaleContextType>;
6
+ export declare const LocaleProvider: import("react").Provider<LocaleContextType>;
7
+ export {};
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Toolbar: (props: any) => JSX.Element | null;
4
3
  export default Toolbar;
@@ -1,2 +1,2 @@
1
- declare const useDocumentVisibility: () => any;
1
+ declare const useDocumentVisibility: () => "hidden" | "visible";
2
2
  export default useDocumentVisibility;
@@ -1,4 +1,3 @@
1
- export * from '@mui/x-date-pickers/themeAugmentation';
2
- export * from './overrides';
3
- export * from './props';
4
- export * from './components';
1
+ export type * from './overrides';
2
+ export type * from './props';
3
+ export type * from './components';
@@ -10,20 +10,8 @@ var __copyProps = (to, from, except, desc) => {
10
10
  }
11
11
  return to;
12
12
  };
13
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
14
13
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
14
 
16
15
  // src/themeAugmentation/index.ts
17
16
  var themeAugmentation_exports = {};
18
17
  module.exports = __toCommonJS(themeAugmentation_exports);
19
- __reExport(themeAugmentation_exports, require("@mui/x-date-pickers/themeAugmentation"), module.exports);
20
- __reExport(themeAugmentation_exports, require("./overrides"), module.exports);
21
- __reExport(themeAugmentation_exports, require("./props"), module.exports);
22
- __reExport(themeAugmentation_exports, require("./components"), module.exports);
23
- // Annotate the CommonJS export names for ESM import in node:
24
- 0 && (module.exports = {
25
- ...require("@mui/x-date-pickers/themeAugmentation"),
26
- ...require("./overrides"),
27
- ...require("./props"),
28
- ...require("./components")
29
- });
@@ -0,0 +1,5 @@
1
+ namespace JSX {
2
+ interface IntrinsicElements {
3
+ [elemName: string]: any;
4
+ }
5
+ }
@@ -2,14 +2,14 @@ import { PresetType } from "../Shortcuts";
2
2
  import { Dayjs } from "dayjs";
3
3
  export declare const getCurrentLocale: () => string;
4
4
  export declare const isBrowser: boolean;
5
- export declare const isMobile: () => boolean;
5
+ export declare const isMobile: () => any;
6
6
  /**
7
7
  * 格式化预设
8
8
  * @param presets
9
9
  */
10
10
  export declare const formatPresets: (presets: PresetType[], locale?: string) => ({
11
11
  label: any;
12
- getValue: (() => Dayjs[]) | (() => [Dayjs, Dayjs] | "today" | "yesterday" | "last_3_days" | "last_7_days" | "last_30_days" | "last_90_days" | "last_180_days" | "tomorrow" | "next_3_days" | "next_7_days" | "next_30_days" | "next_90_days" | "next_180_days");
12
+ getValue: any;
13
13
  value: [Dayjs, Dayjs] | "today" | "yesterday" | "last_3_days" | "last_7_days" | "last_30_days" | "last_90_days" | "last_180_days" | "tomorrow" | "next_3_days" | "next_7_days" | "next_30_days" | "next_90_days" | "next_180_days";
14
14
  key?: string | undefined;
15
15
  } | {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/date-picker",
3
- "version": "1.0.127",
3
+ "version": "1.0.128",
4
4
  "sideEffects": [
5
5
  "*.less"
6
6
  ],
@@ -9,24 +9,28 @@
9
9
  "types": "./lib/index.d.ts",
10
10
  "typings": "./lib/index.d.ts",
11
11
  "devDependencies": {
12
- "father": "^4.1.0",
13
- "dayjs": "^1.11.9"
12
+ "@types/react": "^18.0.0",
13
+ "@types/react-dom": "^18.0.0",
14
+ "@types/prop-types": "^15.7.3",
15
+ "@types/node": "^22.13.10",
16
+ "dayjs": "^1.11.9",
17
+ "father": "^4.1.0"
14
18
  },
15
19
  "dependencies": {
16
- "@mui/x-date-pickers": "6.10.1",
17
20
  "@emotion/react": "^11.11.1",
18
21
  "@emotion/styled": "^11.11.0",
19
22
  "@mui/base": "^5.0.0-beta.8",
20
- "prop-types": "^15.8.1",
23
+ "@mui/material": "^5.14.1",
24
+ "@mui/system": "^5.14.1",
21
25
  "@mui/utils": "^5.14.1",
26
+ "@mui/x-date-pickers": "6.10.1",
27
+ "antd": "^5.10.1",
22
28
  "classnames": "^2.3.2",
23
29
  "clsx": "^1.2.1",
24
- "@mui/material": "^5.14.1",
25
- "@mui/system": "^5.14.1",
26
- "antd": "^5.5.0",
30
+ "prop-types": "^15.8.1",
27
31
  "react": "^18.0.0",
28
32
  "react-dom": "^18.0.0",
29
- "@pisell/utils": "1.0.55"
33
+ "@pisell/utils": "1.0.56"
30
34
  },
31
35
  "files": [
32
36
  "es",
@@ -39,6 +43,7 @@
39
43
  },
40
44
  "scripts": {
41
45
  "build": "father build",
46
+ "build:tsdown": "tsdown",
42
47
  "dev": "father dev"
43
48
  }
44
49
  }