@sqrzro/ui 4.0.0-alpha.33 → 4.0.0-alpha.36
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.
|
@@ -36,9 +36,9 @@ function Dropdown({ classNames, classNameProps, hasError, isDisabled, isOptional
|
|
|
36
36
|
if (isPanelOnly) {
|
|
37
37
|
return _jsx(DropdownList, { name: name, onChange: handleChange, options: options, value: value });
|
|
38
38
|
}
|
|
39
|
-
return (_jsxs("div", { ref: node, className: tw('relative', componentClassNames?.root), children: [_jsx(StaticTextInput, { classNames: {
|
|
39
|
+
return (_jsxs("div", { ref: node, className: tw('relative', componentClassNames?.root), children: [_jsx(StaticTextInput, { classNameProps: classNameProps, classNames: {
|
|
40
40
|
clear: componentClassNames?.clear,
|
|
41
41
|
icon: componentClassNames?.icon,
|
|
42
|
-
}, details: renderDetails(options, value), hasError: hasError, isDisabled: isDisabled || !options?.length, isOptional: isOptional, label: renderLabel(options, value), name: name, onClear: handleClear, onClick: toggleIsOpen, placeholder: placeholder || 'Select...', value: value ? String(value) : '' }), _jsx(Popover, { align: "center", isOpen: isOpen ? !isDisabled : false, isScrollable: true, children: _jsx(DropdownList, { name: name, onChange: handleChange, options: options, value: value }) })] }));
|
|
42
|
+
}, details: renderDetails(options, value), hasError: hasError, isDisabled: isDisabled || !options?.length, isOptional: isOptional, label: renderLabel(options, value), name: name, onClear: handleClear, onClick: toggleIsOpen, placeholder: placeholder || 'Select...', value: value ? String(value) : '' }), _jsx(Popover, { align: "center", isOpen: isOpen ? !isDisabled : false, isScrollable: true, children: _jsx(DropdownList, { classNameProps: classNameProps, classNames: classNames, name: name, onChange: handleChange, options: options, value: value }) })] }));
|
|
43
43
|
}
|
|
44
44
|
export default Dropdown;
|
|
@@ -13,6 +13,6 @@ function DropdownList({ classNames, classNameProps, name, onChange, options, val
|
|
|
13
13
|
});
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
|
-
return (_jsx("ul", { className: componentClassNames?.list, role: "listbox", children: options.map((item, index) => (_jsx(DropdownItem, { ...item, isSelected: Boolean(value) && value === item.value, onChange: handleChange }, index))) }));
|
|
16
|
+
return (_jsx("ul", { className: componentClassNames?.list, role: "listbox", children: options.map((item, index) => (_jsx(DropdownItem, { ...item, classNameProps: classNameProps, classNames: classNames, isSelected: Boolean(value) && value === item.value, onChange: handleChange }, index))) }));
|
|
17
17
|
}
|
|
18
18
|
export default DropdownList;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ClassNameProps } from '../../../styles/classnames/interfaces';
|
|
2
2
|
import type { FormFieldClassNames } from '../FormField';
|
|
3
|
-
interface FormErrorProps extends ClassNameProps<FormFieldClassNames> {
|
|
3
|
+
export interface FormErrorProps extends ClassNameProps<FormFieldClassNames> {
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
id: string;
|
|
6
6
|
isAssistive?: boolean;
|
package/dist/forms/index.d.ts
CHANGED
|
@@ -11,6 +11,8 @@ export type { EditableFormFieldProps } from './components/EditableFormField';
|
|
|
11
11
|
export { default as EditableFormField } from './components/EditableFormField';
|
|
12
12
|
export type { FormClassNames, FormProps } from './components/Form';
|
|
13
13
|
export { default as Form } from './components/Form';
|
|
14
|
+
export type { FormErrorProps } from './components/FormError';
|
|
15
|
+
export { default as FormError } from './components/FormError';
|
|
14
16
|
export type { FormFieldClassNames, FormFieldProps } from './components/FormField';
|
|
15
17
|
export { default as FormField } from './components/FormField';
|
|
16
18
|
export type { FormSubmitProps } from './components/FormSubmit';
|
package/dist/forms/index.js
CHANGED
|
@@ -5,6 +5,7 @@ export { default as Dropdown } from './components/Dropdown';
|
|
|
5
5
|
export { default as EditableForm } from './components/EditableForm';
|
|
6
6
|
export { default as EditableFormField } from './components/EditableFormField';
|
|
7
7
|
export { default as Form } from './components/Form';
|
|
8
|
+
export { default as FormError } from './components/FormError';
|
|
8
9
|
export { default as FormField } from './components/FormField';
|
|
9
10
|
export { default as FormSubmit } from './components/FormSubmit';
|
|
10
11
|
export { default as ModalForm } from './components/ModalForm';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sqrzro/ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.0.0-alpha.
|
|
4
|
+
"version": "4.0.0-alpha.36",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"license": "ISC",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"react-dom": "^19.2.4",
|
|
49
49
|
"tailwind-merge": "^3.5.0",
|
|
50
50
|
"use-deep-compare-effect": "^1.8.1",
|
|
51
|
-
"@sqrzro/utility": "^4.0.0-alpha.
|
|
51
|
+
"@sqrzro/utility": "^4.0.0-alpha.14"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@storybook/addon-a11y": "^10.2.14",
|