@vygruppen/spor-react 3.7.7 → 3.8.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 +11 -11
- package/CHANGELOG.md +19 -0
- package/dist/{CountryCodeSelect-IAYKP6P5.mjs → CountryCodeSelect-UG3JHWO3.mjs} +1 -1
- package/dist/{chunk-QJI3YQWW.mjs → chunk-HCSXVAA5.mjs} +430 -391
- package/dist/index.d.mts +66 -19
- package/dist/index.d.ts +66 -19
- package/dist/index.js +527 -488
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
- package/src/datepicker/Calendar.tsx +8 -3
- package/src/datepicker/CalendarCell.tsx +8 -3
- package/src/datepicker/CalendarGrid.tsx +9 -3
- package/src/datepicker/CalendarTriggerButton.tsx +10 -3
- package/src/datepicker/DatePicker.tsx +15 -35
- package/src/datepicker/DateRangePicker.tsx +14 -25
- package/src/datepicker/DateTimeSegment.tsx +0 -2
- package/src/datepicker/RangeCalendar.tsx +8 -4
- package/src/datepicker/StyledField.tsx +6 -1
- package/src/datepicker/TimePicker.tsx +1 -1
- package/src/input/NumericStepper.tsx +91 -68
- package/src/theme/components/card.ts +7 -7
- package/src/theme/components/close-button.ts +9 -8
- package/src/theme/components/datepicker.ts +74 -23
- package/src/theme/components/modal.ts +4 -3
package/dist/index.d.mts
CHANGED
@@ -459,14 +459,14 @@ declare const Card: _chakra_ui_system_dist_system_types.ComponentWithAs<As, Card
|
|
459
459
|
/**
|
460
460
|
* A date picker component.
|
461
461
|
*
|
462
|
-
* There are two versions of this component –
|
462
|
+
* 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.
|
463
463
|
*
|
464
464
|
* ```tsx
|
465
465
|
* <DatePicker label="Dato" variant="simple" />
|
466
466
|
* ```
|
467
467
|
*/
|
468
468
|
declare const DatePicker: React__default.ForwardRefExoticComponent<AriaDatePickerProps<DateValue> & Pick<BoxProps, "width" | "minHeight"> & {
|
469
|
-
variant: ResponsiveValue<"
|
469
|
+
variant: ResponsiveValue<"base" | "floating" | "ghost">;
|
470
470
|
name?: string | undefined;
|
471
471
|
showYearNavigation?: boolean | undefined;
|
472
472
|
withPortal?: boolean | undefined;
|
@@ -477,7 +477,7 @@ type DateRangePickerProps = AriaDateRangePickerProps<DateValue> & Pick<BoxProps,
|
|
477
477
|
startName?: string;
|
478
478
|
endLabel?: string;
|
479
479
|
endName?: string;
|
480
|
-
variant: ResponsiveValue<"
|
480
|
+
variant: ResponsiveValue<"base" | "floating" | "ghost">;
|
481
481
|
withPortal?: boolean;
|
482
482
|
};
|
483
483
|
/**
|
@@ -1139,6 +1139,10 @@ type NumericStepperProps = {
|
|
1139
1139
|
isDisabled?: boolean;
|
1140
1140
|
/** Whether to show input field or not */
|
1141
1141
|
withInput?: boolean;
|
1142
|
+
/** The amount to increase/decrease when pressing +/- */
|
1143
|
+
stepSize?: number;
|
1144
|
+
/** Whether to show the number input when value is zero */
|
1145
|
+
showZero?: boolean;
|
1142
1146
|
} & Omit<BoxProps, "onChange">;
|
1143
1147
|
/** A simple stepper component for integer values
|
1144
1148
|
*
|
@@ -1149,10 +1153,10 @@ type NumericStepperProps = {
|
|
1149
1153
|
* <NumericStepper value={value} onChange={setValue} />
|
1150
1154
|
* ```
|
1151
1155
|
*
|
1152
|
-
* You can also set a minimum and/or maximum value:
|
1156
|
+
* You can also set a minimum and/or maximum value and step size:
|
1153
1157
|
*
|
1154
1158
|
* ```tsx
|
1155
|
-
* <NumericStepper value={value} onChange={setValue} minValue={1} maxValue={10} />
|
1159
|
+
* <NumericStepper value={value} onChange={setValue} minValue={1} maxValue={10} stepSize={3} />
|
1156
1160
|
* ```
|
1157
1161
|
*
|
1158
1162
|
* You can use the NumericStepper inside of a FormControl component to get IDs etc linked up automatically:
|
@@ -1164,7 +1168,7 @@ type NumericStepperProps = {
|
|
1164
1168
|
* </FormControl>
|
1165
1169
|
* ```
|
1166
1170
|
*/
|
1167
|
-
declare function NumericStepper({ name: nameProp, id: idProp, value: valueProp, defaultValue, onChange: onChangeProp, minValue, maxValue, isDisabled, withInput, ...boxProps }: NumericStepperProps): React__default.JSX.Element;
|
1171
|
+
declare function NumericStepper({ name: nameProp, id: idProp, value: valueProp, defaultValue, onChange: onChangeProp, minValue, maxValue, isDisabled, withInput, stepSize, showZero, ...boxProps }: NumericStepperProps): React__default.JSX.Element;
|
1168
1172
|
|
1169
1173
|
type PasswordInputProps = InputProps;
|
1170
1174
|
declare const PasswordInput: _chakra_ui_system_dist_system_types.ComponentWithAs<"input", InputProps>;
|
@@ -2407,7 +2411,7 @@ declare const theme: {
|
|
2407
2411
|
};
|
2408
2412
|
Card: {
|
2409
2413
|
baseStyle?: ((props: any) => {
|
2410
|
-
"button&, a
|
2414
|
+
"button&, a&, label&, &.is-clickable": {
|
2411
2415
|
_disabled: {
|
2412
2416
|
backgroundColor: string;
|
2413
2417
|
boxShadow: string;
|
@@ -2465,7 +2469,7 @@ declare const theme: {
|
|
2465
2469
|
transitionDuration: string;
|
2466
2470
|
borderRadius: string;
|
2467
2471
|
} | {
|
2468
|
-
"button&, a
|
2472
|
+
"button&, a&, label&, &.is-clickable": {
|
2469
2473
|
_disabled: {
|
2470
2474
|
backgroundColor: string;
|
2471
2475
|
boxShadow: string;
|
@@ -2822,7 +2826,7 @@ declare const theme: {
|
|
2822
2826
|
parts: ("label" | "container" | "icon")[];
|
2823
2827
|
};
|
2824
2828
|
CloseButton: {
|
2825
|
-
baseStyle?: {
|
2829
|
+
baseStyle?: ((props: _chakra_ui_styled_system.StyleFunctionProps) => {
|
2826
2830
|
_hover: {
|
2827
2831
|
backgroundColor: string;
|
2828
2832
|
_disabled: {
|
@@ -2843,7 +2847,7 @@ declare const theme: {
|
|
2843
2847
|
backgroundColor: string;
|
2844
2848
|
color: string;
|
2845
2849
|
fontWeight: string;
|
2846
|
-
} | undefined;
|
2850
|
+
}) | undefined;
|
2847
2851
|
sizes?: {
|
2848
2852
|
lg: {
|
2849
2853
|
[x: string]: string;
|
@@ -2898,6 +2902,7 @@ declare const theme: {
|
|
2898
2902
|
boxShadow: string;
|
2899
2903
|
transitionProperty: string;
|
2900
2904
|
transitionDuration: string;
|
2905
|
+
borderRadius: string;
|
2901
2906
|
display: string;
|
2902
2907
|
flex: number;
|
2903
2908
|
paddingY: number;
|
@@ -2942,13 +2947,17 @@ declare const theme: {
|
|
2942
2947
|
display: string;
|
2943
2948
|
alignItems: string;
|
2944
2949
|
justifyContent: string;
|
2945
|
-
|
2950
|
+
borderLeftRadius: string;
|
2946
2951
|
transitionProperty: string;
|
2947
2952
|
transitionSpeed: string;
|
2948
2953
|
position: string;
|
2949
|
-
|
2954
|
+
paddingTop: number;
|
2955
|
+
paddingBottom: number;
|
2956
|
+
borderRadius: string;
|
2957
|
+
right: string;
|
2950
2958
|
_hover: {
|
2951
2959
|
boxShadow: string;
|
2960
|
+
backgroundColor: string;
|
2952
2961
|
};
|
2953
2962
|
_active: {
|
2954
2963
|
backgroundColor: string;
|
@@ -2960,6 +2969,7 @@ declare const theme: {
|
|
2960
2969
|
calendar: {
|
2961
2970
|
backgroundColor: string;
|
2962
2971
|
color: string;
|
2972
|
+
boxShadow: string;
|
2963
2973
|
};
|
2964
2974
|
weekdays: {
|
2965
2975
|
color: string;
|
@@ -3022,20 +3032,56 @@ declare const theme: {
|
|
3022
3032
|
}>;
|
3023
3033
|
} | undefined;
|
3024
3034
|
variants?: {
|
3025
|
-
|
3026
|
-
|
3027
|
-
|
3035
|
+
base: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
|
3036
|
+
calendar: {
|
3037
|
+
backgroundColor: string;
|
3038
|
+
color: string;
|
3039
|
+
boxShadow: string;
|
3040
|
+
};
|
3041
|
+
dateCell: {
|
3042
|
+
color: string;
|
3043
|
+
_hover: {
|
3044
|
+
backgroundColor: string;
|
3045
|
+
};
|
3046
|
+
"&[data-today]": {
|
3047
|
+
boxShadow: string;
|
3048
|
+
};
|
3028
3049
|
};
|
3029
3050
|
};
|
3030
|
-
|
3031
|
-
|
3032
|
-
|
3051
|
+
floating: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
|
3052
|
+
calendar: {
|
3053
|
+
backgroundColor: string;
|
3054
|
+
color: string;
|
3055
|
+
boxShadow: string;
|
3056
|
+
};
|
3057
|
+
dateCell: {
|
3058
|
+
color: string;
|
3059
|
+
_hover: {
|
3060
|
+
backgroundColor: string;
|
3061
|
+
};
|
3062
|
+
};
|
3063
|
+
};
|
3064
|
+
ghost: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
|
3065
|
+
calendar: {
|
3066
|
+
backgroundColor: string;
|
3067
|
+
color: string;
|
3068
|
+
boxShadow: string;
|
3069
|
+
};
|
3070
|
+
dateCell: {
|
3071
|
+
color: string;
|
3072
|
+
_hover: {
|
3073
|
+
backgroundColor: string;
|
3074
|
+
};
|
3075
|
+
_selected: {
|
3076
|
+
backgroundColor: string;
|
3077
|
+
color: string;
|
3078
|
+
};
|
3033
3079
|
};
|
3034
3080
|
};
|
3035
3081
|
} | undefined;
|
3036
3082
|
defaultProps?: {
|
3037
3083
|
size?: string | number | undefined;
|
3038
|
-
variant?: "
|
3084
|
+
variant?: "base" | "ghost" | "floating" | undefined;
|
3039
3085
|
colorScheme?: string | undefined;
|
3040
3086
|
} | undefined;
|
3041
3087
|
parts: ("dateCell" | "weekdays" | "weekend" | "calendar" | "calendarTriggerButton" | "dateTimeSegment" | "inputLabel" | "wrapper" | "arrow")[];
|
@@ -4152,6 +4198,7 @@ declare const theme: {
|
|
4152
4198
|
};
|
4153
4199
|
closeButton: {
|
4154
4200
|
position: string;
|
4201
|
+
color: string;
|
4155
4202
|
top: number;
|
4156
4203
|
insetEnd: number;
|
4157
4204
|
};
|
package/dist/index.d.ts
CHANGED
@@ -459,14 +459,14 @@ declare const Card: _chakra_ui_system_dist_system_types.ComponentWithAs<As, Card
|
|
459
459
|
/**
|
460
460
|
* A date picker component.
|
461
461
|
*
|
462
|
-
* There are two versions of this component –
|
462
|
+
* 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.
|
463
463
|
*
|
464
464
|
* ```tsx
|
465
465
|
* <DatePicker label="Dato" variant="simple" />
|
466
466
|
* ```
|
467
467
|
*/
|
468
468
|
declare const DatePicker: React__default.ForwardRefExoticComponent<AriaDatePickerProps<DateValue> & Pick<BoxProps, "width" | "minHeight"> & {
|
469
|
-
variant: ResponsiveValue<"
|
469
|
+
variant: ResponsiveValue<"base" | "floating" | "ghost">;
|
470
470
|
name?: string | undefined;
|
471
471
|
showYearNavigation?: boolean | undefined;
|
472
472
|
withPortal?: boolean | undefined;
|
@@ -477,7 +477,7 @@ type DateRangePickerProps = AriaDateRangePickerProps<DateValue> & Pick<BoxProps,
|
|
477
477
|
startName?: string;
|
478
478
|
endLabel?: string;
|
479
479
|
endName?: string;
|
480
|
-
variant: ResponsiveValue<"
|
480
|
+
variant: ResponsiveValue<"base" | "floating" | "ghost">;
|
481
481
|
withPortal?: boolean;
|
482
482
|
};
|
483
483
|
/**
|
@@ -1139,6 +1139,10 @@ type NumericStepperProps = {
|
|
1139
1139
|
isDisabled?: boolean;
|
1140
1140
|
/** Whether to show input field or not */
|
1141
1141
|
withInput?: boolean;
|
1142
|
+
/** The amount to increase/decrease when pressing +/- */
|
1143
|
+
stepSize?: number;
|
1144
|
+
/** Whether to show the number input when value is zero */
|
1145
|
+
showZero?: boolean;
|
1142
1146
|
} & Omit<BoxProps, "onChange">;
|
1143
1147
|
/** A simple stepper component for integer values
|
1144
1148
|
*
|
@@ -1149,10 +1153,10 @@ type NumericStepperProps = {
|
|
1149
1153
|
* <NumericStepper value={value} onChange={setValue} />
|
1150
1154
|
* ```
|
1151
1155
|
*
|
1152
|
-
* You can also set a minimum and/or maximum value:
|
1156
|
+
* You can also set a minimum and/or maximum value and step size:
|
1153
1157
|
*
|
1154
1158
|
* ```tsx
|
1155
|
-
* <NumericStepper value={value} onChange={setValue} minValue={1} maxValue={10} />
|
1159
|
+
* <NumericStepper value={value} onChange={setValue} minValue={1} maxValue={10} stepSize={3} />
|
1156
1160
|
* ```
|
1157
1161
|
*
|
1158
1162
|
* You can use the NumericStepper inside of a FormControl component to get IDs etc linked up automatically:
|
@@ -1164,7 +1168,7 @@ type NumericStepperProps = {
|
|
1164
1168
|
* </FormControl>
|
1165
1169
|
* ```
|
1166
1170
|
*/
|
1167
|
-
declare function NumericStepper({ name: nameProp, id: idProp, value: valueProp, defaultValue, onChange: onChangeProp, minValue, maxValue, isDisabled, withInput, ...boxProps }: NumericStepperProps): React__default.JSX.Element;
|
1171
|
+
declare function NumericStepper({ name: nameProp, id: idProp, value: valueProp, defaultValue, onChange: onChangeProp, minValue, maxValue, isDisabled, withInput, stepSize, showZero, ...boxProps }: NumericStepperProps): React__default.JSX.Element;
|
1168
1172
|
|
1169
1173
|
type PasswordInputProps = InputProps;
|
1170
1174
|
declare const PasswordInput: _chakra_ui_system_dist_system_types.ComponentWithAs<"input", InputProps>;
|
@@ -2407,7 +2411,7 @@ declare const theme: {
|
|
2407
2411
|
};
|
2408
2412
|
Card: {
|
2409
2413
|
baseStyle?: ((props: any) => {
|
2410
|
-
"button&, a
|
2414
|
+
"button&, a&, label&, &.is-clickable": {
|
2411
2415
|
_disabled: {
|
2412
2416
|
backgroundColor: string;
|
2413
2417
|
boxShadow: string;
|
@@ -2465,7 +2469,7 @@ declare const theme: {
|
|
2465
2469
|
transitionDuration: string;
|
2466
2470
|
borderRadius: string;
|
2467
2471
|
} | {
|
2468
|
-
"button&, a
|
2472
|
+
"button&, a&, label&, &.is-clickable": {
|
2469
2473
|
_disabled: {
|
2470
2474
|
backgroundColor: string;
|
2471
2475
|
boxShadow: string;
|
@@ -2822,7 +2826,7 @@ declare const theme: {
|
|
2822
2826
|
parts: ("label" | "container" | "icon")[];
|
2823
2827
|
};
|
2824
2828
|
CloseButton: {
|
2825
|
-
baseStyle?: {
|
2829
|
+
baseStyle?: ((props: _chakra_ui_styled_system.StyleFunctionProps) => {
|
2826
2830
|
_hover: {
|
2827
2831
|
backgroundColor: string;
|
2828
2832
|
_disabled: {
|
@@ -2843,7 +2847,7 @@ declare const theme: {
|
|
2843
2847
|
backgroundColor: string;
|
2844
2848
|
color: string;
|
2845
2849
|
fontWeight: string;
|
2846
|
-
} | undefined;
|
2850
|
+
}) | undefined;
|
2847
2851
|
sizes?: {
|
2848
2852
|
lg: {
|
2849
2853
|
[x: string]: string;
|
@@ -2898,6 +2902,7 @@ declare const theme: {
|
|
2898
2902
|
boxShadow: string;
|
2899
2903
|
transitionProperty: string;
|
2900
2904
|
transitionDuration: string;
|
2905
|
+
borderRadius: string;
|
2901
2906
|
display: string;
|
2902
2907
|
flex: number;
|
2903
2908
|
paddingY: number;
|
@@ -2942,13 +2947,17 @@ declare const theme: {
|
|
2942
2947
|
display: string;
|
2943
2948
|
alignItems: string;
|
2944
2949
|
justifyContent: string;
|
2945
|
-
|
2950
|
+
borderLeftRadius: string;
|
2946
2951
|
transitionProperty: string;
|
2947
2952
|
transitionSpeed: string;
|
2948
2953
|
position: string;
|
2949
|
-
|
2954
|
+
paddingTop: number;
|
2955
|
+
paddingBottom: number;
|
2956
|
+
borderRadius: string;
|
2957
|
+
right: string;
|
2950
2958
|
_hover: {
|
2951
2959
|
boxShadow: string;
|
2960
|
+
backgroundColor: string;
|
2952
2961
|
};
|
2953
2962
|
_active: {
|
2954
2963
|
backgroundColor: string;
|
@@ -2960,6 +2969,7 @@ declare const theme: {
|
|
2960
2969
|
calendar: {
|
2961
2970
|
backgroundColor: string;
|
2962
2971
|
color: string;
|
2972
|
+
boxShadow: string;
|
2963
2973
|
};
|
2964
2974
|
weekdays: {
|
2965
2975
|
color: string;
|
@@ -3022,20 +3032,56 @@ declare const theme: {
|
|
3022
3032
|
}>;
|
3023
3033
|
} | undefined;
|
3024
3034
|
variants?: {
|
3025
|
-
|
3026
|
-
|
3027
|
-
|
3035
|
+
base: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
|
3036
|
+
calendar: {
|
3037
|
+
backgroundColor: string;
|
3038
|
+
color: string;
|
3039
|
+
boxShadow: string;
|
3040
|
+
};
|
3041
|
+
dateCell: {
|
3042
|
+
color: string;
|
3043
|
+
_hover: {
|
3044
|
+
backgroundColor: string;
|
3045
|
+
};
|
3046
|
+
"&[data-today]": {
|
3047
|
+
boxShadow: string;
|
3048
|
+
};
|
3028
3049
|
};
|
3029
3050
|
};
|
3030
|
-
|
3031
|
-
|
3032
|
-
|
3051
|
+
floating: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
|
3052
|
+
calendar: {
|
3053
|
+
backgroundColor: string;
|
3054
|
+
color: string;
|
3055
|
+
boxShadow: string;
|
3056
|
+
};
|
3057
|
+
dateCell: {
|
3058
|
+
color: string;
|
3059
|
+
_hover: {
|
3060
|
+
backgroundColor: string;
|
3061
|
+
};
|
3062
|
+
};
|
3063
|
+
};
|
3064
|
+
ghost: (props: _chakra_ui_styled_system.StyleFunctionProps) => {
|
3065
|
+
calendar: {
|
3066
|
+
backgroundColor: string;
|
3067
|
+
color: string;
|
3068
|
+
boxShadow: string;
|
3069
|
+
};
|
3070
|
+
dateCell: {
|
3071
|
+
color: string;
|
3072
|
+
_hover: {
|
3073
|
+
backgroundColor: string;
|
3074
|
+
};
|
3075
|
+
_selected: {
|
3076
|
+
backgroundColor: string;
|
3077
|
+
color: string;
|
3078
|
+
};
|
3033
3079
|
};
|
3034
3080
|
};
|
3035
3081
|
} | undefined;
|
3036
3082
|
defaultProps?: {
|
3037
3083
|
size?: string | number | undefined;
|
3038
|
-
variant?: "
|
3084
|
+
variant?: "base" | "ghost" | "floating" | undefined;
|
3039
3085
|
colorScheme?: string | undefined;
|
3040
3086
|
} | undefined;
|
3041
3087
|
parts: ("dateCell" | "weekdays" | "weekend" | "calendar" | "calendarTriggerButton" | "dateTimeSegment" | "inputLabel" | "wrapper" | "arrow")[];
|
@@ -4152,6 +4198,7 @@ declare const theme: {
|
|
4152
4198
|
};
|
4153
4199
|
closeButton: {
|
4154
4200
|
position: string;
|
4201
|
+
color: string;
|
4155
4202
|
top: number;
|
4156
4203
|
insetEnd: number;
|
4157
4204
|
};
|