@simplybusiness/mobius-datepicker 4.3.3 → 4.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/types/components/DatePicker/DatePicker.d.ts +9 -0
- package/dist/types/components/DatePicker/DatePicker.stories.d.ts +11 -0
- package/dist/types/components/DatePicker/DatePicker.test.d.ts +1 -0
- package/dist/types/components/DatePicker/DatePickerIcon.d.ts +1 -0
- package/dist/types/components/DatePicker/DatePickerModal.d.ts +10 -0
- package/dist/types/components/DatePicker/DatePickerModal.test.d.ts +1 -0
- package/dist/types/components/DatePicker/constants.d.ts +3 -0
- package/dist/types/components/DatePicker/index.d.ts +1 -0
- package/dist/types/components/DatePicker/utils/dateObjToString.d.ts +1 -0
- package/dist/types/components/DatePicker/utils/dateObjToString.test.d.ts +1 -0
- package/dist/types/components/DatePicker/utils/formatErrorMessageText.d.ts +2 -0
- package/dist/types/components/DatePicker/utils/formatErrorMessageText.test.d.ts +1 -0
- package/dist/types/components/DatePicker/utils/getStartWeekday.d.ts +3 -0
- package/dist/types/components/DatePicker/utils/getStartWeekday.test.d.ts +1 -0
- package/dist/types/components/DatePicker/utils/index.d.ts +4 -0
- package/dist/types/components/DatePicker/utils/validateDateFormat.d.ts +2 -0
- package/dist/types/components/DatePicker/utils/validateDateFormat.test.d.ts +1 -0
- package/dist/types/components/DatePicker/utils/weekdayAsOneLetter.d.ts +2 -0
- package/dist/types/components/DatePicker/utils/weekdayAsOneLetter.test.d.ts +1 -0
- package/dist/types/hooks/index.d.ts +1 -0
- package/dist/types/hooks/useFocusTrap/index.d.ts +1 -0
- package/dist/types/hooks/useFocusTrap/useFocusTrap.d.ts +5 -0
- package/dist/types/hooks/useFocusTrap/useFocusTrap.test.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/utils/StoryContainer.d.ts +1 -0
- package/dist/types/utils/excludeControls.d.ts +1 -0
- package/dist/types/utils/excludeControls.test.d.ts +1 -0
- package/dist/types/utils/index.d.ts +2 -0
- package/dist/types/utils/isTouchDevice.d.ts +1 -0
- package/dist/types/utils/jestMockMatchMedia.d.ts +1 -0
- package/package.json +10 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.3.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 424ba56: Fix exported types
|
|
8
|
+
- Updated dependencies [047db6d]
|
|
9
|
+
- Updated dependencies [424ba56]
|
|
10
|
+
- @simplybusiness/mobius@4.3.2
|
|
11
|
+
- @simplybusiness/icons@4.2.8
|
|
12
|
+
|
|
3
13
|
## 4.3.3
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TextFieldProps } from "@simplybusiness/mobius";
|
|
2
|
+
export interface DatePickerProps extends Omit<TextFieldProps, "defaultValue" | "onChange" | "onBlur" | "onFocus"> {
|
|
3
|
+
onChange?: (date: string | undefined) => void;
|
|
4
|
+
defaultValue?: string;
|
|
5
|
+
min?: string;
|
|
6
|
+
max?: string;
|
|
7
|
+
id?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const DatePicker: (props: DatePickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { DatePicker } from "./DatePicker";
|
|
3
|
+
type StoryType = StoryObj<typeof DatePicker>;
|
|
4
|
+
declare const meta: Meta<typeof DatePicker>;
|
|
5
|
+
export declare const Normal: StoryType;
|
|
6
|
+
export declare const WithMinValue: StoryType;
|
|
7
|
+
export declare const WithMaxValue: StoryType;
|
|
8
|
+
export declare const Disabled: StoryType;
|
|
9
|
+
export declare const Valid: StoryType;
|
|
10
|
+
export declare const Invalid: StoryType;
|
|
11
|
+
export default meta;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DatePickerIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type DatePickerModalProps = {
|
|
2
|
+
date?: string;
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
top: number;
|
|
5
|
+
onSelected: (date?: string | undefined) => void;
|
|
6
|
+
min?: string;
|
|
7
|
+
max?: string;
|
|
8
|
+
};
|
|
9
|
+
declare const DatePickerModal: ({ date, isOpen, onSelected, top, min, max, }: DatePickerModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default DatePickerModal;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./DatePicker";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const dateObjToString: (date: Date) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./useFocusTrap";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./useFocusTrap";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./components/DatePicker";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const StoryContainer: (props: Record<string, unknown>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const excludeControls: (...args: string[]) => {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isTouchDevice: () => boolean | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const jestMockMatchMedia: (matches: boolean) => void;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simplybusiness/mobius-datepicker",
|
|
3
3
|
"license": "UNLICENSED",
|
|
4
|
-
"version": "4.3.
|
|
4
|
+
"version": "4.3.4",
|
|
5
5
|
"description": "Mobius date picker component",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -9,17 +9,14 @@
|
|
|
9
9
|
},
|
|
10
10
|
"main": "dist/cjs/index.js",
|
|
11
11
|
"module": "dist/esm/index.js",
|
|
12
|
-
"types": "./
|
|
12
|
+
"types": "./dist/types/index.d.ts",
|
|
13
13
|
"files": [
|
|
14
|
-
"src
|
|
15
|
-
"dist
|
|
16
|
-
"dist/esm/**/*",
|
|
17
|
-
"dist/**/*.map",
|
|
18
|
-
"dist/mobius-datepicker.d.ts"
|
|
14
|
+
"src",
|
|
15
|
+
"dist"
|
|
19
16
|
],
|
|
20
17
|
"exports": {
|
|
21
18
|
".": {
|
|
22
|
-
"types": "./
|
|
19
|
+
"types": "./dist/types/index.d.ts",
|
|
23
20
|
"require": "./dist/cjs/index.js",
|
|
24
21
|
"import": "./dist/esm/index.js"
|
|
25
22
|
}
|
|
@@ -28,8 +25,9 @@
|
|
|
28
25
|
"clean": "rm -rf dist",
|
|
29
26
|
"build": "yarn run -T turbo run turbo:build",
|
|
30
27
|
"prepack": "yarn run build",
|
|
31
|
-
"build:cjs": "
|
|
32
|
-
"build:esm": "
|
|
28
|
+
"build:cjs": "swc --config-file ../.swcrc ./src -d ./dist/cjs -C module.type=commonjs",
|
|
29
|
+
"build:esm": "swc --config-file ../.swcrc ./src -d ./dist/esm -C module.type=es6",
|
|
30
|
+
"build:types": "tsc --emitDeclarationOnly",
|
|
33
31
|
"lint": "eslint --ext .tsx,.ts,.js,.jsx,.mjs .",
|
|
34
32
|
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
|
|
35
33
|
"test:coverage": "NODE_OPTIONS=--experimental-vm-modules jest --collect-coverage",
|
|
@@ -70,8 +68,8 @@
|
|
|
70
68
|
"react-dom": "^16.13.1 || ^17.0.1 || ^18.0.0"
|
|
71
69
|
},
|
|
72
70
|
"dependencies": {
|
|
73
|
-
"@simplybusiness/icons": "^4.2.
|
|
74
|
-
"@simplybusiness/mobius": "^4.3.
|
|
71
|
+
"@simplybusiness/icons": "^4.2.8",
|
|
72
|
+
"@simplybusiness/mobius": "^4.3.2",
|
|
75
73
|
"@swc/cli": "^0.1.63",
|
|
76
74
|
"classnames": "^2.5.1",
|
|
77
75
|
"date-fns": "^2.30.0",
|