@homecode/ui 4.22.3 → 4.22.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.
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 };
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+
3
+ var _path, _path2;
4
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
5
+ var SvgCheckers = function SvgCheckers(props) {
6
+ return /*#__PURE__*/React.createElement("svg", _extends({
7
+ xmlns: "http://www.w3.org/2000/svg",
8
+ viewBox: "0 0 200 150"
9
+ }, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
10
+ fill: "#fff",
11
+ fillOpacity: 0.8,
12
+ d: "M0 0h200v150H0z"
13
+ })), _path2 || (_path2 = /*#__PURE__*/React.createElement("path", {
14
+ d: "M0 0h50v50H0zm100 0h50v50h-50zM50 50h50v50H50zm100 0h50v50h-50zM0 100h50v50H0zm100 0h50v50h-50z"
15
+ })));
16
+ };
17
+
18
+ export { SvgCheckers as default };
@@ -2,14 +2,14 @@ import * as React from 'react';
2
2
 
3
3
  var _linearGradient, _path;
4
4
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
5
- var SvgCompas = function SvgCompas(props) {
5
+ var SvgCompass = function SvgCompass(props) {
6
6
  return /*#__PURE__*/React.createElement("svg", _extends({
7
7
  xmlns: "http://www.w3.org/2000/svg",
8
8
  xmlnsXlink: "http://www.w3.org/1999/xlink",
9
9
  fill: "currentColor",
10
10
  viewBox: "0 0 24 24"
11
11
  }, props), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
12
- id: "compas_svg__a"
12
+ id: "compass_svg__a"
13
13
  }, /*#__PURE__*/React.createElement("stop", {
14
14
  offset: 0,
15
15
  style: {
@@ -35,8 +35,8 @@ var SvgCompas = function SvgCompas(props) {
35
35
  stopOpacity: 1
36
36
  }
37
37
  })), _linearGradient || (_linearGradient = /*#__PURE__*/React.createElement("linearGradient", {
38
- xlinkHref: "#compas_svg__a",
39
- id: "compas_svg__b",
38
+ xlinkHref: "#compass_svg__a",
39
+ id: "compass_svg__b",
40
40
  x1: 16.621,
41
41
  x2: 40.144,
42
42
  y1: 9.343,
@@ -48,9 +48,9 @@ var SvgCompas = function SvgCompas(props) {
48
48
  })), /*#__PURE__*/React.createElement("path", {
49
49
  d: "M12.06.27c-.589 0-.96.601-1.7 1.8-1.872 3.052-4.625 7.886-4.626 9.96s2.744 6.917 4.611 9.97c.735 1.202 1.105 1.804 1.694 1.803.588 0 .958-.602 1.698-1.8 1.873-3.053 4.627-7.886 4.627-9.96.001-2.074-2.743-6.914-4.611-9.964C13.018.873 12.648.268 12.059.269",
50
50
  style: {
51
- fill: "url(#compas_svg__b)"
51
+ fill: "url(#compass_svg__b)"
52
52
  }
53
53
  }));
54
54
  };
55
55
 
56
- export { SvgCompas as default };
56
+ export { SvgCompass as default };
@@ -8,8 +8,9 @@ var ICONS = {
8
8
  check: () => import('./check.svg.js'),
9
9
  close: () => import('./close.svg.js'),
10
10
  colors: () => import('./colors.svg.js'),
11
- compas: () => import('./compas.svg.js'),
11
+ compass: () => import('./compass.svg.js'),
12
12
  copy: () => import('./copy.svg.js'),
13
+ checkers: () => import('./checkers.svg.js'),
13
14
  chevronUp: () => import('./chevronUp.svg.js'),
14
15
  chevronDown: () => import('./chevronDown.svg.js'),
15
16
  chevronRight: () => import('./chevronRight.svg.js'),
@@ -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 {};
@@ -8,8 +8,9 @@ declare const _default: {
8
8
  check: () => Promise<any>;
9
9
  close: () => Promise<any>;
10
10
  colors: () => Promise<any>;
11
- compas: () => Promise<any>;
11
+ compass: () => Promise<any>;
12
12
  copy: () => Promise<any>;
13
+ checkers: () => Promise<any>;
13
14
  chevronUp: () => Promise<any>;
14
15
  chevronDown: () => Promise<any>;
15
16
  chevronRight: () => Promise<any>;
@@ -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.6",
4
4
  "description": "React UI components library",
5
5
  "scripts": {
6
6
  "test": "jest",