@homecode/ui 4.22.3 → 4.22.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/esm/index.js CHANGED
@@ -10,6 +10,7 @@ export { DatePickerInput } from './src/components/DatePickerInput/DatePickerInpu
10
10
  export { DateTime, formatDate } from './src/components/DateTime/DateTime.js';
11
11
  export { Draggable } from './src/components/Draggable/Draggable.js';
12
12
  export { Expand } from './src/components/Expand/Expand.js';
13
+ export { Flex } from './src/components/Flex/Flex.js';
13
14
  export { Form } from './src/components/Form/Form.js';
14
15
  export { Gallery } from './src/components/Gallery/Gallery.js';
15
16
  export { Heading } from './src/components/Heading/Heading.js';
@@ -33,6 +33,7 @@ import '../DatePickerInput/DatePickerInput.styl.js';
33
33
  import '../../tools/queryParams.js';
34
34
  import '../Draggable/Draggable.styl.js';
35
35
  import '../Expand/Expand.styl.js';
36
+ import '../Flex/Flex.styl.js';
36
37
  import '../Form/Form.styl.js';
37
38
  import '../Form/Validator.js';
38
39
  import '../Form/SubmitButtons/SubmitButtons.styl.js';
@@ -57,7 +58,7 @@ import '../Virtualized/List/List.styl.js';
57
58
  import '../Virtualized/List/ListScroll.styl.js';
58
59
 
59
60
  function Autocomplete(props) {
60
- const { className, inputWrapperClassName, value, onChange, size = 'm', getOptions, onSelect, debounceDelay = 300, round = false, blur = false, inputProps = {}, popupProps = {}, } = props;
61
+ const { className, inputWrapperClassName, value, onChange, size = 'm', getOptions, onSelect, debounceDelay = 300, round = false, blur = false, inputProps = {}, popupProps = {}, menuProps = {}, } = props;
61
62
  const isMounted = useIsMounted();
62
63
  const [options, setOptions] = useState([]);
63
64
  const [isLoading, setIsLoading] = useState(false);
@@ -138,7 +139,7 @@ function Autocomplete(props) {
138
139
  const optionsList = useMemo(() => {
139
140
  if (!options.length)
140
141
  return null;
141
- return (jsx(Menu, { className: S.options, size: size, offset: { y: { before: 20, after: 20 } }, children: options.map((option, index) => (jsx(Menu.Item, { focused: focusedIndex === index, className: S.option, onClick: () => handleSelect(option), onMouseEnter: () => setFocusedIndex(index), children: option.render ? option.render(option) : option.label }, option.id))) }));
142
+ return (jsx(Menu, { className: S.options, size: size, offset: { y: { before: 20, after: 20 } }, ...menuProps, children: options.map((option, index) => (jsx(Menu.Item, { focused: focusedIndex === index, className: S.option, onClick: () => handleSelect(option), onMouseEnter: () => setFocusedIndex(index), children: option.render ? option.render(option) : option.label }, option.id))) }));
142
143
  }, [options, focusedIndex]);
143
144
  return (jsx(Popup, { className: classes, isOpen: isOpen, focusControl: true, round: round, size: size, blur: blur, direction: "bottom", ...popupProps, trigger: jsxs("div", { className: inputWrapperClassName, children: [jsx(Input, { ref: inputRef,
144
145
  // @ts-ignore
@@ -0,0 +1,8 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import S from './Flex.styl.js';
3
+
4
+ const Flex = ({ children, ...props }) => {
5
+ return (jsx("div", { className: S.root, ...props, children: children }));
6
+ };
7
+
8
+ export { Flex };
@@ -0,0 +1,7 @@
1
+ import styleInject from '../../../node_modules/style-inject/dist/style-inject.es.js';
2
+
3
+ var css_248z = ".Flex_root__1yZ2z{display:flex}";
4
+ var S = {"root":"Flex_root__1yZ2z"};
5
+ styleInject(css_248z);
6
+
7
+ export { S as default };
@@ -33,6 +33,7 @@ import 'moment';
33
33
  import '../DatePickerInput/DatePickerInput.styl.js';
34
34
  import '../Draggable/Draggable.styl.js';
35
35
  import '../Expand/Expand.styl.js';
36
+ import '../Flex/Flex.styl.js';
36
37
  import '../Form/Form.styl.js';
37
38
  import '../Form/Validator.js';
38
39
  import '../Form/SubmitButtons/SubmitButtons.styl.js';
@@ -36,6 +36,7 @@ import 'moment';
36
36
  import '../DatePickerInput/DatePickerInput.styl.js';
37
37
  import { Draggable } from '../Draggable/Draggable.js';
38
38
  import '../Expand/Expand.styl.js';
39
+ import '../Flex/Flex.styl.js';
39
40
  import '../Form/Form.styl.js';
40
41
  import '../Form/Validator.js';
41
42
  import '../Form/SubmitButtons/SubmitButtons.styl.js';
@@ -1,6 +1,7 @@
1
1
  import { FormControl, Size } from 'uilib/types';
2
2
  import { Props as InputProps } from 'uilib/components/Input/Input.types';
3
3
  import { Props as PopupProps } from 'uilib/components/Popup/Popup.types';
4
+ import { MenuProps } from 'uilib/components/Menu/Menu.types';
4
5
  export type Option = {
5
6
  id: string;
6
7
  label: string;
@@ -17,6 +18,7 @@ export type Props = FormControl<Value, HTMLInputElement> & {
17
18
  debounceDelay?: number;
18
19
  inputProps?: Partial<InputProps>;
19
20
  popupProps?: Partial<PopupProps>;
21
+ menuProps?: Partial<MenuProps>;
20
22
  round?: boolean;
21
23
  blur?: boolean;
22
24
  };
@@ -0,0 +1,6 @@
1
+ import { HTMLAttributes } from 'react';
2
+ type FlexProps = HTMLAttributes<HTMLDivElement> & {
3
+ children: React.ReactNode;
4
+ };
5
+ export declare const Flex: ({ children, ...props }: FlexProps) => JSX.Element;
6
+ export {};
@@ -10,6 +10,7 @@ export * from './DatePickerInput/DatePickerInput';
10
10
  export * from './DateTime/DateTime';
11
11
  export * from './Draggable/Draggable';
12
12
  export * from './Expand/Expand';
13
+ export * from './Flex/Flex';
13
14
  export * from './Form/Form';
14
15
  export * from './Gallery/Gallery';
15
16
  export * from './Heading/Heading';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homecode/ui",
3
- "version": "4.22.3",
3
+ "version": "4.22.5",
4
4
  "description": "React UI components library",
5
5
  "scripts": {
6
6
  "test": "jest",