uibee 2.7.10 → 2.7.11

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.
@@ -36,5 +36,5 @@ export default function TagInput({ label, name, value = [], onChange, placeholde
36
36
  disabled:opacity-50 disabled:cursor-not-allowed
37
37
  transition-all duration-200
38
38
  ${error ? 'border-red-500 focus-within:border-red-500 focus-within:ring-red-500' : ''}
39
- `, children: [value.map((tag, index) => (_jsxs("span", { className: 'flex items-center gap-1 px-2 py-1 bg-login rounded text-sm text-white', children: [tag, !disabled && (_jsx("button", { type: 'button', onClick: () => removeTag(index), className: 'hover:text-red-200 transition-colors', children: _jsx(X, { size: 14 }) }))] }, index))), _jsx("input", { type: 'text', value: inputValue, required: required && value.length === 0, onChange: (e) => setInputValue(e.target.value), onKeyDown: handleKeyDown, disabled: disabled, placeholder: value.length === 0 ? placeholder : '', className: 'flex-1 bg-transparent outline-none min-w-30 text-login-text placeholder:text-login-200' })] }), value.map((tag, index) => (_jsx("input", { type: 'hidden', name: `${name}[${index}]`, value: tag }, index)))] }));
39
+ `, children: [value.map((tag, index) => (_jsxs("span", { className: 'flex items-center gap-1 px-2 py-1 bg-login rounded text-sm text-white', children: [tag, !disabled && (_jsx("button", { type: 'button', onClick: () => removeTag(index), className: 'hover:text-red-200 transition-colors', children: _jsx(X, { size: 14 }) }))] }, index))), _jsx("input", { type: 'text', value: inputValue, required: required && value.length === 0, onChange: (e) => setInputValue(e.target.value), onKeyDown: handleKeyDown, disabled: disabled, placeholder: value.length === 0 ? placeholder : '', className: 'flex-1 bg-transparent outline-none min-w-30 text-login-text placeholder:text-login-200' })] }), _jsx("input", { type: 'hidden', name: name, value: value.join(',') })] }));
40
40
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uibee",
3
- "version": "2.7.10",
3
+ "version": "2.7.11",
4
4
  "description": "Shared components, functions and hooks for reuse across Login projects",
5
5
  "homepage": "https://github.com/Login-Linjeforening-for-IT/uibee#readme",
6
6
  "bugs": {
@@ -99,14 +99,11 @@ export default function TagInput({
99
99
  className='flex-1 bg-transparent outline-none min-w-30 text-login-text placeholder:text-login-200'
100
100
  />
101
101
  </div>
102
- {value.map((tag, index) => (
103
- <input
104
- key={index}
105
- type='hidden'
106
- name={`${name}[${index}]`}
107
- value={tag}
108
- />
109
- ))}
102
+ <input
103
+ type='hidden'
104
+ name={name}
105
+ value={value.join(',')}
106
+ />
110
107
  </FieldWrapper>
111
108
  )
112
109
  }