@oslokommune/punkt-react 12.40.3 → 12.40.4

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@oslokommune/punkt-react",
3
- "version": "12.40.3",
3
+ "version": "12.40.4",
4
4
  "description": "React komponentbibliotek til Punkt, et designsystem laget av Oslo Origo",
5
5
  "homepage": "https://punkt.oslo.kommune.no",
6
6
  "author": "Team Designsystem, Oslo Origo",
@@ -112,5 +112,5 @@
112
112
  "url": "https://github.com/oslokommune/punkt/issues"
113
113
  },
114
114
  "license": "MIT",
115
- "gitHead": "ed16d8e18201f36c905e47b96d62d29278595ba8"
115
+ "gitHead": "e0dfa65d7390b38ec2cfec3becc3cca309431466"
116
116
  }
@@ -92,53 +92,55 @@ export const PktSearchInput = forwardRef<HTMLInputElement, ISearchInput | ISearc
92
92
 
93
93
  return WrapperElement(
94
94
  <>
95
- <LabelElement htmlFor={label ? id : undefined} className={label ? 'pkt-inputwrapper__label' : ''}>
96
- {label && <>{label}</>}
97
- <div className={appearance === 'local' ? 'pkt-input__container' : 'pkt-searchinput__field'}>
98
- <input
99
- className={`pkt-input ${fullwidth ? 'pkt-input--fullwidth' : ''}`}
100
- type="search"
101
- name={name || id}
102
- id={id}
103
- placeholder={placeholder}
104
- defaultValue={value}
105
- disabled={disabled}
106
- autoComplete="off"
107
- aria-autocomplete="list"
108
- ref={ref}
109
- aria-controls={`${id}-suggestions`}
110
- onChange={onChange ? onChange : handleNoOnChange}
111
- onKeyUp={
112
- onSearch &&
113
- ((event) => {
114
- if (event.key === 'Enter') {
115
- event.preventDefault()
116
- onSearch(value)
117
- }
118
- })
119
- }
120
- {...props}
121
- />
122
- <PktButton
123
- className={`pkt-searchinput__button ${appearance === 'local' ? 'pkt-input-icon' : ''}`}
124
- variant="icon-only"
125
- iconName="magnifying-glass-big"
126
- skin={appearance === 'local' ? 'tertiary' : 'primary'}
127
- color={appearance === 'global' ? 'yellow' : undefined}
128
- type="submit"
129
- disabled={disabled}
130
- onClick={
131
- onSearch &&
132
- ((event) => {
95
+ {label && (
96
+ <label htmlFor={label ? id : undefined} className={label ? 'pkt-inputwrapper__label' : ''}>
97
+ {label}
98
+ </label>
99
+ )}
100
+ <div className={appearance === 'local' ? 'pkt-input__container' : 'pkt-searchinput__field'}>
101
+ <input
102
+ className={`pkt-input ${fullwidth ? 'pkt-input--fullwidth' : ''}`}
103
+ type="search"
104
+ name={name || id}
105
+ id={id}
106
+ placeholder={placeholder}
107
+ defaultValue={value}
108
+ disabled={disabled}
109
+ autoComplete="off"
110
+ aria-autocomplete="list"
111
+ ref={ref}
112
+ aria-controls={`${id}-suggestions`}
113
+ onChange={onChange ? onChange : handleNoOnChange}
114
+ onKeyUp={
115
+ onSearch &&
116
+ ((event) => {
117
+ if (event.key === 'Enter') {
133
118
  event.preventDefault()
134
119
  onSearch(value)
135
- })
136
- }
137
- >
138
- {label || placeholder}
139
- </PktButton>
140
- </div>
141
- </LabelElement>
120
+ }
121
+ })
122
+ }
123
+ {...props}
124
+ />
125
+ <PktButton
126
+ className={`pkt-searchinput__button ${appearance === 'local' ? 'pkt-input-icon' : ''}`}
127
+ variant="icon-only"
128
+ iconName="magnifying-glass-big"
129
+ skin={appearance === 'local' ? 'tertiary' : 'primary'}
130
+ color={appearance === 'global' ? 'yellow' : undefined}
131
+ type="submit"
132
+ disabled={disabled}
133
+ onClick={
134
+ onSearch &&
135
+ ((event) => {
136
+ event.preventDefault()
137
+ onSearch(value)
138
+ })
139
+ }
140
+ >
141
+ {label || placeholder}
142
+ </PktButton>
143
+ </div>
142
144
 
143
145
  {suggestions && (
144
146
  <ul id={`${id}-suggestions`} className="pkt-searchinput__suggestions" aria-live="assertive">