@xqmsg/ui-core 0.16.4 → 0.16.6

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}
@@ -164,7 +166,6 @@ export function Input<T extends FieldValues>({
164
166
  onChange={onChange}
165
167
  onBlur={onBlur}
166
168
  ref={ref}
167
- disabled={disabled}
168
169
  value={value}
169
170
  defaultValue={defaultValue}
170
171
  label={label as string}
@@ -242,9 +243,13 @@ export function Input<T extends FieldValues>({
242
243
  id={name}
243
244
  isInvalid={isInvalid}
244
245
  position="relative"
245
- py={label || helperText || isInvalid ? 6 : 0}
246
+ py={
247
+ (label || helperText || isInvalid) && inputType !== 'checkbox'
248
+ ? 6
249
+ : 0
250
+ }
246
251
  >
247
- {label && (
252
+ {label && inputType !== 'checkbox' && (
248
253
  <Label
249
254
  tooltipText={tooltipText}
250
255
  label={label}
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