@vygruppen/spor-react 12.8.8 → 12.8.9

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vygruppen/spor-react",
3
3
  "type": "module",
4
- "version": "12.8.8",
4
+ "version": "12.8.9",
5
5
  "exports": {
6
6
  ".": {
7
7
  "types": "./dist/index.d.ts",
@@ -47,8 +47,8 @@
47
47
  "react-swipeable": "^7.0.1",
48
48
  "usehooks-ts": "^3.1.0",
49
49
  "@vygruppen/spor-design-tokens": "4.0.7",
50
- "@vygruppen/spor-loader": "0.7.0",
51
- "@vygruppen/spor-icon-react": "4.2.1"
50
+ "@vygruppen/spor-icon-react": "4.2.1",
51
+ "@vygruppen/spor-loader": "0.7.0"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@react-types/datepicker": "^3.10.0",
@@ -65,6 +65,7 @@ export const Field = React.forwardRef<HTMLDivElement, FieldProps>(
65
65
  readOnly,
66
66
  required,
67
67
  direction,
68
+ id,
68
69
  ...rest
69
70
  } = props;
70
71
  const recipe = useSlotRecipe({ key: "field" });
@@ -79,6 +80,7 @@ export const Field = React.forwardRef<HTMLDivElement, FieldProps>(
79
80
  required={required}
80
81
  css={styles.root}
81
82
  direction={direction}
83
+ id={id}
82
84
  >
83
85
  {label && !floatingLabel && (
84
86
  <Label>
@@ -79,6 +79,7 @@ export const Input = forwardRef<HTMLInputElement, InputProps>(
79
79
  helperText={helperText}
80
80
  required={required}
81
81
  errorText={errorText}
82
+ id={props.id}
82
83
  label={
83
84
  // Render startElement invisibly to align label text with input content when an icon is present
84
85
  <Flex>
@@ -66,6 +66,7 @@ export const NativeSelect = React.forwardRef<
66
66
  required={required}
67
67
  helperText={helperText}
68
68
  errorText={errorText}
69
+ id={rest.id}
69
70
  floatingLabel={true}
70
71
  >
71
72
  <ChakraNativeSelect.Root
@@ -101,7 +101,7 @@ export const NumericStepper = React.forwardRef<
101
101
  };
102
102
 
103
103
  return (
104
- <Field css={styles.root} width="auto" {...rest} ref={ref}>
104
+ <Field css={styles.root} width="auto" {...rest} id={idProp} ref={ref}>
105
105
  <VerySmallButton
106
106
  icon={<SubtractIcon stepLabel={clampedStepSize} />}
107
107
  aria-label={t(
@@ -77,6 +77,7 @@ export const Select = React.forwardRef<HTMLDivElement, SelectProps>(
77
77
  invalid={invalid}
78
78
  helperText={helperText}
79
79
  required={props.required}
80
+ id={rest.id}
80
81
  >
81
82
  <ChakraSelect.Root
82
83
  {...rest}
@@ -66,6 +66,7 @@ export const Switch = forwardRef<HTMLInputElement, SwitchProps>(
66
66
  errorText={errorText}
67
67
  helperText={helperText}
68
68
  required={props.required}
69
+ id={rest.id}
69
70
  >
70
71
  <ChakraSwitch.Root
71
72
  ref={rootRef}