@xsolla/xui-date-picker 0.196.0 → 0.196.1
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/native/index.d.mts +14 -2
- package/native/index.d.ts +14 -2
- package/package.json +6 -6
- package/web/index.d.mts +14 -2
- package/web/index.d.ts +14 -2
package/native/index.d.mts
CHANGED
|
@@ -20,12 +20,24 @@ type DatePickerAlignment = "start" | "center" | "end";
|
|
|
20
20
|
type DatePickerPlacement = DatePickerSide | `${DatePickerSide}-${DatePickerAlignment}`;
|
|
21
21
|
interface DatePickerProps extends Omit<CalendarProps, "onChange"> {
|
|
22
22
|
/**
|
|
23
|
-
* Calendar variant: "single" shows a single month, "dual" shows two months
|
|
24
|
-
*
|
|
23
|
+
* Calendar variant: "single" shows a single month, "dual" shows two months
|
|
24
|
+
* side-by-side.
|
|
25
|
+
*
|
|
26
|
+
* `"dual"` forces range selection mode, which **changes the value contract**:
|
|
27
|
+
* the picker reads `startDate`/`endDate` (not `selectedDate`) and `onChange`
|
|
28
|
+
* reports a `[start, end]` {@link DateRangeType} tuple rather than a single
|
|
29
|
+
* `Date`. Switch a control between the two variants and you have to switch
|
|
30
|
+
* the props with it — feeding a range tuple back in as `selectedDate` is a
|
|
31
|
+
* type error that surfaces at runtime (FEP-887).
|
|
25
32
|
*/
|
|
26
33
|
variant?: "single" | "dual";
|
|
27
34
|
/**
|
|
28
35
|
* Event handler when the value of a Datepicker changes.
|
|
36
|
+
*
|
|
37
|
+
* Receives a single `Date` in single-date mode, and a `[start, end]`
|
|
38
|
+
* {@link DateRangeType} tuple whenever the picker is in range mode
|
|
39
|
+
* (`variant="dual"` or `selectsRange`). Either side of the tuple can be
|
|
40
|
+
* `null` while a range is only half-picked.
|
|
29
41
|
*/
|
|
30
42
|
onChange?: (date: Date | DateRangeType) => void;
|
|
31
43
|
/**
|
package/native/index.d.ts
CHANGED
|
@@ -20,12 +20,24 @@ type DatePickerAlignment = "start" | "center" | "end";
|
|
|
20
20
|
type DatePickerPlacement = DatePickerSide | `${DatePickerSide}-${DatePickerAlignment}`;
|
|
21
21
|
interface DatePickerProps extends Omit<CalendarProps, "onChange"> {
|
|
22
22
|
/**
|
|
23
|
-
* Calendar variant: "single" shows a single month, "dual" shows two months
|
|
24
|
-
*
|
|
23
|
+
* Calendar variant: "single" shows a single month, "dual" shows two months
|
|
24
|
+
* side-by-side.
|
|
25
|
+
*
|
|
26
|
+
* `"dual"` forces range selection mode, which **changes the value contract**:
|
|
27
|
+
* the picker reads `startDate`/`endDate` (not `selectedDate`) and `onChange`
|
|
28
|
+
* reports a `[start, end]` {@link DateRangeType} tuple rather than a single
|
|
29
|
+
* `Date`. Switch a control between the two variants and you have to switch
|
|
30
|
+
* the props with it — feeding a range tuple back in as `selectedDate` is a
|
|
31
|
+
* type error that surfaces at runtime (FEP-887).
|
|
25
32
|
*/
|
|
26
33
|
variant?: "single" | "dual";
|
|
27
34
|
/**
|
|
28
35
|
* Event handler when the value of a Datepicker changes.
|
|
36
|
+
*
|
|
37
|
+
* Receives a single `Date` in single-date mode, and a `[start, end]`
|
|
38
|
+
* {@link DateRangeType} tuple whenever the picker is in range mode
|
|
39
|
+
* (`variant="dual"` or `selectsRange`). Either side of the tuple can be
|
|
40
|
+
* `null` while a range is only half-picked.
|
|
29
41
|
*/
|
|
30
42
|
onChange?: (date: Date | DateRangeType) => void;
|
|
31
43
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xsolla/xui-date-picker",
|
|
3
|
-
"version": "0.196.
|
|
3
|
+
"version": "0.196.1",
|
|
4
4
|
"main": "./web/index.js",
|
|
5
5
|
"module": "./web/index.mjs",
|
|
6
6
|
"types": "./web/index.d.ts",
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
"test:coverage": "vitest run --coverage"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@xsolla/xui-calendar": "0.196.
|
|
17
|
-
"@xsolla/xui-core": "0.196.
|
|
18
|
-
"@xsolla/xui-icons-base": "0.196.
|
|
19
|
-
"@xsolla/xui-input": "0.196.
|
|
20
|
-
"@xsolla/xui-primitives-core": "0.196.
|
|
16
|
+
"@xsolla/xui-calendar": "0.196.1",
|
|
17
|
+
"@xsolla/xui-core": "0.196.1",
|
|
18
|
+
"@xsolla/xui-icons-base": "0.196.1",
|
|
19
|
+
"@xsolla/xui-input": "0.196.1",
|
|
20
|
+
"@xsolla/xui-primitives-core": "0.196.1",
|
|
21
21
|
"date-fns": "^3.0.0"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
package/web/index.d.mts
CHANGED
|
@@ -20,12 +20,24 @@ type DatePickerAlignment = "start" | "center" | "end";
|
|
|
20
20
|
type DatePickerPlacement = DatePickerSide | `${DatePickerSide}-${DatePickerAlignment}`;
|
|
21
21
|
interface DatePickerProps extends Omit<CalendarProps, "onChange"> {
|
|
22
22
|
/**
|
|
23
|
-
* Calendar variant: "single" shows a single month, "dual" shows two months
|
|
24
|
-
*
|
|
23
|
+
* Calendar variant: "single" shows a single month, "dual" shows two months
|
|
24
|
+
* side-by-side.
|
|
25
|
+
*
|
|
26
|
+
* `"dual"` forces range selection mode, which **changes the value contract**:
|
|
27
|
+
* the picker reads `startDate`/`endDate` (not `selectedDate`) and `onChange`
|
|
28
|
+
* reports a `[start, end]` {@link DateRangeType} tuple rather than a single
|
|
29
|
+
* `Date`. Switch a control between the two variants and you have to switch
|
|
30
|
+
* the props with it — feeding a range tuple back in as `selectedDate` is a
|
|
31
|
+
* type error that surfaces at runtime (FEP-887).
|
|
25
32
|
*/
|
|
26
33
|
variant?: "single" | "dual";
|
|
27
34
|
/**
|
|
28
35
|
* Event handler when the value of a Datepicker changes.
|
|
36
|
+
*
|
|
37
|
+
* Receives a single `Date` in single-date mode, and a `[start, end]`
|
|
38
|
+
* {@link DateRangeType} tuple whenever the picker is in range mode
|
|
39
|
+
* (`variant="dual"` or `selectsRange`). Either side of the tuple can be
|
|
40
|
+
* `null` while a range is only half-picked.
|
|
29
41
|
*/
|
|
30
42
|
onChange?: (date: Date | DateRangeType) => void;
|
|
31
43
|
/**
|
package/web/index.d.ts
CHANGED
|
@@ -20,12 +20,24 @@ type DatePickerAlignment = "start" | "center" | "end";
|
|
|
20
20
|
type DatePickerPlacement = DatePickerSide | `${DatePickerSide}-${DatePickerAlignment}`;
|
|
21
21
|
interface DatePickerProps extends Omit<CalendarProps, "onChange"> {
|
|
22
22
|
/**
|
|
23
|
-
* Calendar variant: "single" shows a single month, "dual" shows two months
|
|
24
|
-
*
|
|
23
|
+
* Calendar variant: "single" shows a single month, "dual" shows two months
|
|
24
|
+
* side-by-side.
|
|
25
|
+
*
|
|
26
|
+
* `"dual"` forces range selection mode, which **changes the value contract**:
|
|
27
|
+
* the picker reads `startDate`/`endDate` (not `selectedDate`) and `onChange`
|
|
28
|
+
* reports a `[start, end]` {@link DateRangeType} tuple rather than a single
|
|
29
|
+
* `Date`. Switch a control between the two variants and you have to switch
|
|
30
|
+
* the props with it — feeding a range tuple back in as `selectedDate` is a
|
|
31
|
+
* type error that surfaces at runtime (FEP-887).
|
|
25
32
|
*/
|
|
26
33
|
variant?: "single" | "dual";
|
|
27
34
|
/**
|
|
28
35
|
* Event handler when the value of a Datepicker changes.
|
|
36
|
+
*
|
|
37
|
+
* Receives a single `Date` in single-date mode, and a `[start, end]`
|
|
38
|
+
* {@link DateRangeType} tuple whenever the picker is in range mode
|
|
39
|
+
* (`variant="dual"` or `selectsRange`). Either side of the tuple can be
|
|
40
|
+
* `null` while a range is only half-picked.
|
|
29
41
|
*/
|
|
30
42
|
onChange?: (date: Date | DateRangeType) => void;
|
|
31
43
|
/**
|