@xqmsg/ui-core 0.16.3 → 0.16.5

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.
@@ -25,7 +25,7 @@ export interface StackedPilledInputProps extends InputFieldProps {
25
25
  const StackedPilledInput = React.forwardRef<
26
26
  HTMLInputElement,
27
27
  StackedPilledInputProps
28
- >(({ name, setValue, control, placeholder, disabled, clearErrors }, _ref) => {
28
+ >(({ name, setValue, control, placeholder, disabled }, _ref) => {
29
29
  const watchedValue = useWatch({ control, name: name as string });
30
30
  const [lastestFormValueToArray, setLatestFormValueToArray] = useState<
31
31
  string[]
@@ -64,10 +64,11 @@ const StackedPilledInput = React.forwardRef<
64
64
 
65
65
  const onHandleKeyDown = (e: React.KeyboardEvent) => {
66
66
  if (
67
- e.key === ' ' ||
68
- e.key === 'Enter' ||
69
- e.key === ',' ||
70
- e.key === 'Tab'
67
+ (e.key === ' ' ||
68
+ e.key === 'Enter' ||
69
+ e.key === ',' ||
70
+ e.key === 'Tab') &&
71
+ localValue.length
71
72
  ) {
72
73
  if (
73
74
  e.key === 'Enter' &&
@@ -202,8 +203,6 @@ const StackedPilledInput = React.forwardRef<
202
203
  };
203
204
 
204
205
  const onBlur = () => {
205
- clearErrors(name);
206
-
207
206
  if (localValue.trim().length) {
208
207
  const filteredUniqueValues = Array.from(
209
208
  new Set([...lastestFormValueToArray, ...localValue.trim().split(',')])
@@ -142,10 +142,12 @@ export function Input<T extends FieldValues>({
142
142
  return (
143
143
  <StackedTextarea
144
144
  className={`input-${inputType} ${className ?? ''}`}
145
+ aria-label={ariaLabel}
145
146
  name={name}
146
147
  id={name}
147
148
  placeholder={placeholder}
148
149
  maxLength={maxLength}
150
+ isRequired={isRequired}
149
151
  isInvalid={isInvalid}
150
152
  onChange={onChange}
151
153
  onBlur={onBlur}
package/src/index.tsx CHANGED
@@ -12,6 +12,9 @@ export * from './components/button';
12
12
  // Google Button
13
13
  export * from './components/button/google';
14
14
 
15
+ // Microsoft Button
16
+ export * from './components/button/microsoft';
17
+
15
18
  // Loading Spinner
16
19
  export * from './components/button/spinner';
17
20