uibee 2.7.15 → 2.7.17

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
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useEffect, useState } from 'react';
4
- import { getCookie, setCookie } from 'utilbee/utils';
4
+ import { getCookie, setCookie } from 'utilbee';
5
5
  import { useRouter } from 'next/navigation';
6
6
  import { Globe } from 'lucide-react';
7
7
  export default function LanguageToggle({ language }) {
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useEffect, useState } from 'react';
4
- import { getCookie, setCookie } from 'utilbee/utils';
4
+ import { getCookie, setCookie } from 'utilbee';
5
5
  import { useRouter } from 'next/navigation';
6
6
  export default function ThemeToggle({ className }) {
7
7
  const router = useRouter();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uibee",
3
- "version": "2.7.15",
3
+ "version": "2.7.17",
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": {
@@ -1,7 +1,7 @@
1
1
  'use client'
2
2
 
3
3
  import { useEffect, useState } from 'react'
4
- import { getCookie, setCookie } from 'utilbee/utils'
4
+ import { getCookie, setCookie } from 'utilbee'
5
5
  import { useRouter } from 'next/navigation'
6
6
  import { Language } from 'uibee/components'
7
7
  import { Globe } from 'lucide-react'
@@ -1,7 +1,7 @@
1
1
  'use client'
2
2
 
3
3
  import { useEffect, useState } from 'react'
4
- import { getCookie, setCookie } from 'utilbee/utils'
4
+ import { getCookie, setCookie } from 'utilbee'
5
5
  import { useRouter } from 'next/navigation'
6
6
 
7
7
  export default function ThemeToggle({className}: {className?: string}) {