@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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @vygruppen/spor-react@2.0.0 build
2
+ > @vygruppen/spor-react@2.0.1 build
3
3
  > tsup src/index.tsx --dts --treeshake --format cjs,esm
4
4
 
5
5
  CLI Building entry: src/index.tsx
@@ -8,12 +8,12 @@
8
8
  CLI Target: node14
9
9
  CJS Build start
10
10
  ESM 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
  DTS Build start
14
- CJS dist/index.js 413.41 KB
15
- CJS ⚡️ Build success in 2932ms
16
- ESM dist/index.mjs 395.99 KB
17
- ESM ⚡️ Build success in 2933ms
18
- DTS ⚡️ Build success in 17522ms
19
- DTS dist/index.d.ts 248.55 KB
13
+ ESM dist/index.mjs 396.07 KB
14
+ ESM ⚡️ Build success in 1767ms
15
+ "toTime" is imported from external module "@internationalized/date" but never used in "dist/index.js".
16
+ CJS dist/index.js 413.49 KB
17
+ CJS ⚡️ Build success in 2809ms
18
+ DTS ⚡️ Build success in 17319ms
19
+ DTS dist/index.d.ts 248.65 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @vygruppen/spor-react
2
2
 
3
+ ## 2.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 6b3cdd17: Add `startName` and `endName` props to `DateRangePicker` component
8
+
3
9
  ## 2.0.0
4
10
 
5
11
  ### Major Changes
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vygruppen/spor-react",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",
@@ -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
  />