@aarhus-university/au-lib-react-components 10.20.1 → 10.20.2

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
  "sideEffects": false,
3
3
  "name": "@aarhus-university/au-lib-react-components",
4
- "version": "10.20.1",
4
+ "version": "10.20.2",
5
5
  "description": "Library for shared React components for various applications on au.dk",
6
6
  "scripts": {
7
7
  "test": "jest",
@@ -31,7 +31,7 @@ const AUDatepickerComponent: FC<AUDatepickerComponentProps> = ({
31
31
  onHide(sDate, dateFormatted);
32
32
  };
33
33
 
34
- let className = 'form__field';
34
+ let className = 'datepicker form__field';
35
35
  if (fullWidth) {
36
36
  className = `${className} form__field--full-width`;
37
37
  }
@@ -50,27 +50,25 @@ const AUDatepickerComponent: FC<AUDatepickerComponentProps> = ({
50
50
 
51
51
  return (
52
52
  <div
53
- className="datepicker"
53
+ className={className}
54
54
  aria-owns={`${id}-calendar`}
55
55
  aria-haspopup="true"
56
56
  aria-expanded={showCalendar}
57
57
  >
58
- <div className={className}>
59
- {showLabel && <label htmlFor={id}>{labelText}</label>}
60
- <input
61
- id={id}
62
- type="text"
63
- value={dateFormatted}
64
- title={
65
- lang === 'da'
66
- ? 'Klik for at åbne datovælger'
67
- : 'Click to open datepicker'
68
- }
69
- readOnly
70
- disabled={disabled}
71
- onClick={() => setShowCalendar(!showCalendar)}
72
- />
73
- </div>
58
+ {showLabel && <label htmlFor={id}>{labelText}</label>}
59
+ <input
60
+ id={id}
61
+ type="text"
62
+ value={dateFormatted}
63
+ title={
64
+ lang === 'da'
65
+ ? 'Klik for at åbne datovælger'
66
+ : 'Click to open datepicker'
67
+ }
68
+ readOnly
69
+ disabled={disabled}
70
+ onClick={() => setShowCalendar(!showCalendar)}
71
+ />
74
72
  {showCalendar && (
75
73
  <div className="datepicker__calendar-container">
76
74
  <AUCalendarComponent