@vygruppen/spor-react 2.0.0 → 2.0.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/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +6 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +4 -0
- package/dist/index.mjs +4 -0
- package/package.json +1 -1
- package/src/datepicker/DateRangePicker.tsx +7 -1
package/.turbo/turbo-build.log
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
> @vygruppen/spor-react@2.0.
|
2
|
+
> @vygruppen/spor-react@2.0.1 build
|
3
3
|
> tsup src/index.tsx --dts --treeshake --format cjs,esm
|
4
4
|
|
5
5
|
[34mCLI[39m Building entry: src/index.tsx
|
@@ -8,12 +8,12 @@
|
|
8
8
|
[34mCLI[39m Target: node14
|
9
9
|
[34mCJS[39m Build start
|
10
10
|
[34mESM[39m Build start
|
11
|
-
"toTime" is imported from external module "@internationalized/date" but never used in "dist/index.js".
|
12
11
|
"toTime" is imported from external module "@internationalized/date" but never used in "dist/index.mjs".
|
13
12
|
[34mDTS[39m Build start
|
14
|
-
[
|
15
|
-
[
|
16
|
-
|
17
|
-
[
|
18
|
-
[
|
19
|
-
[32mDTS[39m
|
13
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m396.07 KB[39m
|
14
|
+
[32mESM[39m ⚡️ Build success in 1767ms
|
15
|
+
"toTime" is imported from external module "@internationalized/date" but never used in "dist/index.js".
|
16
|
+
[32mCJS[39m [1mdist/index.js [22m[32m413.49 KB[39m
|
17
|
+
[32mCJS[39m ⚡️ Build success in 2809ms
|
18
|
+
[32mDTS[39m ⚡️ Build success in 17319ms
|
19
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m248.65 KB[39m
|
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
@@ -436,7 +436,9 @@ declare function DatePicker({ variant, errorMessage, minHeight, showYearNavigati
|
|
436
436
|
|
437
437
|
type DateRangePickerProps = AriaDateRangePickerProps<DateValue> & Pick<BoxProps, "minHeight"> & {
|
438
438
|
startLabel?: string;
|
439
|
+
startName?: string;
|
439
440
|
endLabel?: string;
|
441
|
+
endName?: string;
|
440
442
|
variant: ResponsiveValue<"simple" | "with-trigger">;
|
441
443
|
};
|
442
444
|
/**
|
@@ -445,10 +447,10 @@ type DateRangePickerProps = AriaDateRangePickerProps<DateValue> & Pick<BoxProps,
|
|
445
447
|
* There are two versions of this component – a simple one, and one with a trigger button for showing the calendar. Use whatever fits your design.
|
446
448
|
*
|
447
449
|
* ```tsx
|
448
|
-
* <DateRangePicker startLabel="From" endLabel="To" variant="simple" />
|
450
|
+
* <DateRangePicker startLabel="From" startName="from" endLabel="To" endName="to" variant="simple" />
|
449
451
|
* ```
|
450
452
|
*/
|
451
|
-
declare function DateRangePicker({ variant, minHeight, ...props }: DateRangePickerProps): JSX.Element;
|
453
|
+
declare function DateRangePicker({ variant, minHeight, startName, endName, ...props }: DateRangePickerProps): JSX.Element;
|
452
454
|
|
453
455
|
type TimePickerProps = Omit<BoxProps, "defaultValue"> & {
|
454
456
|
/** The label. Defaults to a localized version of "Time" */
|
package/dist/index.js
CHANGED
@@ -3711,6 +3711,8 @@ function RangeCalendar(props) {
|
|
3711
3711
|
function DateRangePicker({
|
3712
3712
|
variant,
|
3713
3713
|
minHeight,
|
3714
|
+
startName,
|
3715
|
+
endName,
|
3714
3716
|
...props
|
3715
3717
|
}) {
|
3716
3718
|
const formControlProps = react.useFormControlContext();
|
@@ -3780,6 +3782,7 @@ function DateRangePicker({
|
|
3780
3782
|
DateField,
|
3781
3783
|
{
|
3782
3784
|
...startFieldProps,
|
3785
|
+
name: startName,
|
3783
3786
|
label: props.startLabel,
|
3784
3787
|
labelProps
|
3785
3788
|
}
|
@@ -3789,6 +3792,7 @@ function DateRangePicker({
|
|
3789
3792
|
DateField,
|
3790
3793
|
{
|
3791
3794
|
...endFieldProps,
|
3795
|
+
name: endName,
|
3792
3796
|
label: props.endLabel,
|
3793
3797
|
labelProps
|
3794
3798
|
}
|
package/dist/index.mjs
CHANGED
@@ -3694,6 +3694,8 @@ function RangeCalendar(props) {
|
|
3694
3694
|
function DateRangePicker({
|
3695
3695
|
variant,
|
3696
3696
|
minHeight,
|
3697
|
+
startName,
|
3698
|
+
endName,
|
3697
3699
|
...props
|
3698
3700
|
}) {
|
3699
3701
|
const formControlProps = useFormControlContext();
|
@@ -3763,6 +3765,7 @@ function DateRangePicker({
|
|
3763
3765
|
DateField,
|
3764
3766
|
{
|
3765
3767
|
...startFieldProps,
|
3768
|
+
name: startName,
|
3766
3769
|
label: props.startLabel,
|
3767
3770
|
labelProps
|
3768
3771
|
}
|
@@ -3772,6 +3775,7 @@ function DateRangePicker({
|
|
3772
3775
|
DateField,
|
3773
3776
|
{
|
3774
3777
|
...endFieldProps,
|
3778
|
+
name: endName,
|
3775
3779
|
label: props.endLabel,
|
3776
3780
|
labelProps
|
3777
3781
|
}
|
package/package.json
CHANGED
@@ -32,7 +32,9 @@ import { useCurrentLocale } from "./utils";
|
|
32
32
|
type DateRangePickerProps = AriaDateRangePickerProps<DateValue> &
|
33
33
|
Pick<BoxProps, "minHeight"> & {
|
34
34
|
startLabel?: string;
|
35
|
+
startName?: string;
|
35
36
|
endLabel?: string;
|
37
|
+
endName?: string;
|
36
38
|
variant: ResponsiveValue<"simple" | "with-trigger">;
|
37
39
|
};
|
38
40
|
/**
|
@@ -41,12 +43,14 @@ type DateRangePickerProps = AriaDateRangePickerProps<DateValue> &
|
|
41
43
|
* There are two versions of this component – a simple one, and one with a trigger button for showing the calendar. Use whatever fits your design.
|
42
44
|
*
|
43
45
|
* ```tsx
|
44
|
-
* <DateRangePicker startLabel="From" endLabel="To" variant="simple" />
|
46
|
+
* <DateRangePicker startLabel="From" startName="from" endLabel="To" endName="to" variant="simple" />
|
45
47
|
* ```
|
46
48
|
*/
|
47
49
|
export function DateRangePicker({
|
48
50
|
variant,
|
49
51
|
minHeight,
|
52
|
+
startName,
|
53
|
+
endName,
|
50
54
|
...props
|
51
55
|
}: DateRangePickerProps) {
|
52
56
|
const formControlProps = useFormControlContext();
|
@@ -128,6 +132,7 @@ export function DateRangePicker({
|
|
128
132
|
)}
|
129
133
|
<DateField
|
130
134
|
{...startFieldProps}
|
135
|
+
name={startName}
|
131
136
|
label={props.startLabel}
|
132
137
|
labelProps={labelProps}
|
133
138
|
/>
|
@@ -136,6 +141,7 @@ export function DateRangePicker({
|
|
136
141
|
</Box>
|
137
142
|
<DateField
|
138
143
|
{...endFieldProps}
|
144
|
+
name={endName}
|
139
145
|
label={props.endLabel}
|
140
146
|
labelProps={labelProps}
|
141
147
|
/>
|