uibee 2.7.14 → 2.7.16

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.
@@ -12,5 +12,6 @@ export type InputProps = {
12
12
  required?: boolean;
13
13
  icon?: JSX.Element;
14
14
  info?: string;
15
+ multiple?: boolean;
15
16
  };
16
- export default function Input({ label, name, type, placeholder, value, onChange, error, className, disabled, required, icon, info, }: InputProps): import("react/jsx-runtime").JSX.Element;
17
+ export default function Input({ label, name, type, placeholder, value, onChange, error, className, disabled, required, icon, info, multiple, }: InputProps): import("react/jsx-runtime").JSX.Element;
@@ -4,7 +4,7 @@ import { Calendar, Clock } from 'lucide-react';
4
4
  import { FieldWrapper } from './shared';
5
5
  import DateTimePickerPopup from './shared/dateTimePickerPopup';
6
6
  import useClickOutside from '../../hooks/useClickOutside';
7
- export default function Input({ label, name, type = 'text', placeholder, value, onChange, error, className, disabled, required, icon, info, }) {
7
+ export default function Input({ label, name, type = 'text', placeholder, value, onChange, error, className, disabled, required, icon, info, multiple, }) {
8
8
  const localRef = useRef(null);
9
9
  const [isOpen, setIsOpen] = useState(false);
10
10
  const containerRef = useClickOutside(() => setIsOpen(false));
@@ -64,7 +64,7 @@ export default function Input({ label, name, type = 'text', placeholder, value,
64
64
  return (_jsx(FieldWrapper, { label: label, name: name, required: required, info: info, error: error, className: className, children: _jsxs("div", { className: 'relative flex items-center', ref: containerRef, children: [displayIcon && (_jsx("div", { className: `
65
65
  absolute left-3 text-login-200
66
66
  ${isDateType && !disabled ? 'cursor-pointer hover:text-login-text' : 'pointer-events-none'}
67
- `, onClick: handleIconClick, children: displayIcon })), _jsx("input", { ref: localRef, id: name, name: name, type: isDateType ? 'text' : type, placeholder: placeholder, value: value, onChange: onChange, disabled: disabled, required: required, readOnly: isDateType, onClick: () => isDateType && !disabled && setIsOpen(true), title: label, "aria-invalid": !!error, "aria-describedby": error ? `${name}-error` : undefined, className: `
67
+ `, onClick: handleIconClick, children: displayIcon })), _jsx("input", { ref: localRef, id: name, name: name, type: isDateType ? 'text' : type, placeholder: placeholder, value: value, onChange: onChange, disabled: disabled, required: required, readOnly: isDateType, onClick: () => isDateType && !disabled && setIsOpen(true), title: label, multiple: multiple, "aria-invalid": !!error, "aria-describedby": error ? `${name}-error` : undefined, className: `
68
68
  w-full rounded-md bg-login-500/50 border border-login-500
69
69
  text-login-text placeholder-login-200
70
70
  focus:outline-none focus:border-login focus:ring-1 focus:ring-login
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uibee",
3
- "version": "2.7.14",
3
+ "version": "2.7.16",
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": {
@@ -17,6 +17,7 @@ export type InputProps = {
17
17
  required?: boolean
18
18
  icon?: JSX.Element
19
19
  info?: string
20
+ multiple?: boolean
20
21
  }
21
22
 
22
23
  export default function Input({
@@ -32,6 +33,7 @@ export default function Input({
32
33
  required,
33
34
  icon,
34
35
  info,
36
+ multiple,
35
37
  }: InputProps) {
36
38
  const localRef = useRef<HTMLInputElement>(null)
37
39
  const [isOpen, setIsOpen] = useState(false)
@@ -126,6 +128,7 @@ export default function Input({
126
128
  readOnly={isDateType}
127
129
  onClick={() => isDateType && !disabled && setIsOpen(true)}
128
130
  title={label}
131
+ multiple={multiple}
129
132
  aria-invalid={!!error}
130
133
  aria-describedby={error ? `${name}-error` : undefined}
131
134
  className={`