@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.
- package/dist/89793640b494d7ea.svg +9 -0
- package/dist/components/button/google/index.d.ts +2 -1
- package/dist/components/button/index.d.ts +3 -0
- package/dist/components/button/microsoft/MicrosoftButton.stories.d.ts +5 -0
- package/dist/components/button/microsoft/index.d.ts +9 -0
- package/dist/index.d.ts +1 -0
- package/dist/ui-core.cjs.development.js +158 -69
- package/dist/ui-core.cjs.development.js.map +1 -1
- package/dist/ui-core.cjs.production.min.js +1 -1
- package/dist/ui-core.cjs.production.min.js.map +1 -1
- package/dist/ui-core.esm.js +160 -72
- package/dist/ui-core.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/button/google/index.tsx +15 -18
- package/src/components/button/index.tsx +9 -0
- package/src/components/button/microsoft/MicrosoftButton.stories.tsx +25 -0
- package/src/components/button/microsoft/assets/MicrosoftLogo.svg +9 -0
- package/src/components/button/microsoft/index.tsx +29 -0
- package/src/components/input/StackedMultiSelect/index.tsx +22 -3
- package/src/components/input/StackedPilledInput/index.tsx +6 -7
- package/src/components/input/index.tsx +2 -0
- package/src/index.tsx +3 -0
|
@@ -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
|
|
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
|
-
|
|
69
|
-
|
|
70
|
-
|
|
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