@antscorp/antsomi-ui 1.3.5-beta.755 → 1.3.5-beta.757

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.
@@ -19,6 +19,12 @@ export const TagifyWrapper = styled.div `
19
19
  min-height: 34px;
20
20
  width: 100%;
21
21
 
22
+ &::after {
23
+ content: '';
24
+ display: block;
25
+ clear: both;
26
+ }
27
+
22
28
  .tagify {
23
29
  ${({ $cssTagifyVariables }) => $cssTagifyVariables &&
24
30
  Object.entries($cssTagifyVariables)
@@ -12,6 +12,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
12
12
  import axios from 'axios';
13
13
  import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
14
14
  import { CookiesProvider, useCookies } from 'react-cookie';
15
+ import { useInView } from 'react-intersection-observer';
15
16
  // Icons
16
17
  import { Button, Flex, Popover, Spin, Text, Typography } from '../../atoms';
17
18
  import { AccountProfile } from '../AccountProfile';
@@ -34,8 +35,16 @@ import { ENV } from '@antscorp/antsomi-ui/es/config';
34
35
  // };
35
36
  const InputSearch = props => {
36
37
  const { value, onChange, className, onClickRemove } = props;
37
- return (React.createElement(InputSearchStyled, { className: className || '' },
38
- React.createElement("input", { className: "input-search-account", placeholder: "Search...", value: value, onChange: e => onChange(e.target.value) }),
38
+ const inputRef = useRef(null);
39
+ const { ref: wrapperRef, inView: componentInView } = useInView();
40
+ useEffect(() => {
41
+ var _a;
42
+ if (componentInView) {
43
+ (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
44
+ }
45
+ }, [componentInView]);
46
+ return (React.createElement(InputSearchStyled, { className: className || '', ref: wrapperRef },
47
+ React.createElement("input", { className: "input-search-account", placeholder: "Search...", value: value, onChange: e => onChange(e.target.value), ref: inputRef }),
39
48
  value ? (React.createElement(CloseIcon, { className: "remove-icon", onClick: onClickRemove })) : (React.createElement(SearchIcon, { className: "search-icon" }))));
40
49
  };
41
50
  export const AccountSharing = props => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "1.3.5-beta.755",
3
+ "version": "1.3.5-beta.757",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "sideEffects": [
6
6
  "dist/*",