@teamturing/react-kit 2.27.0 → 2.28.0
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.
|
@@ -9,6 +9,7 @@ import { noop } from '../../packages/utils/esm/noop.js';
|
|
|
9
9
|
import { scrollIntoView } from '../../packages/utils/esm/scrollIntoView.js';
|
|
10
10
|
import { r as reactIsExports } from '../../node_modules/react-is/index.js';
|
|
11
11
|
import styled, { css, useTheme } from 'styled-components';
|
|
12
|
+
import useDevice from '../../hook/useDevice.js';
|
|
12
13
|
import useProvidedOrCreatedRef from '../../hook/useProvidedOrCreatedRef.js';
|
|
13
14
|
import HorizontalDivider from '../HorizontalDivider/index.js';
|
|
14
15
|
import Overlay from '../Overlay/index.js';
|
|
@@ -38,6 +39,9 @@ const SearchSelectInput = ({
|
|
|
38
39
|
...props
|
|
39
40
|
}, ref) => {
|
|
40
41
|
const theme = useTheme();
|
|
42
|
+
const {
|
|
43
|
+
isDesktop
|
|
44
|
+
} = useDevice();
|
|
41
45
|
const isVisibleValueExist = value && isArray(value) && !isNullable(renderValue(value)) ? value.length > 0 : value && !isNullable(renderValue(value));
|
|
42
46
|
const hasLeadingVisual = !isNullable(LeadingVisual);
|
|
43
47
|
const valueInputRef = useProvidedOrCreatedRef(ref);
|
|
@@ -65,12 +69,18 @@ const SearchSelectInput = ({
|
|
|
65
69
|
onChange?.(item);
|
|
66
70
|
}
|
|
67
71
|
};
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* ? dummyRef가 왜 있나?
|
|
75
|
+
* 모바일 환경에서 Input에 포커스가 가지 않도록 하기 위한 장치입니다.
|
|
76
|
+
*/
|
|
77
|
+
const dummyRef = useRef(null);
|
|
68
78
|
const listContainerRef = useRef(null);
|
|
69
79
|
const searchInputRef = useRef(null);
|
|
70
80
|
const activeDescendantRef = useRef();
|
|
71
81
|
return /*#__PURE__*/jsxRuntimeExports.jsx(OverlayPopper, {
|
|
72
82
|
focusTrapSettings: {
|
|
73
|
-
initialFocusRef: searchInputRef,
|
|
83
|
+
initialFocusRef: isDesktop ? searchInputRef : dummyRef,
|
|
74
84
|
restoreFocusOnCleanUp: true,
|
|
75
85
|
...focusTrapSettings
|
|
76
86
|
},
|
|
@@ -123,7 +133,11 @@ const SearchSelectInput = ({
|
|
|
123
133
|
overlayHandler.closeOverlay();
|
|
124
134
|
}
|
|
125
135
|
},
|
|
126
|
-
children: [/*#__PURE__*/jsxRuntimeExports.jsx(
|
|
136
|
+
children: [!isDesktop ? /*#__PURE__*/jsxRuntimeExports.jsx(View, {
|
|
137
|
+
"aria-hidden": true,
|
|
138
|
+
ref: dummyRef,
|
|
139
|
+
tabIndex: 0
|
|
140
|
+
}) : null, /*#__PURE__*/jsxRuntimeExports.jsx(Space, {
|
|
127
141
|
p: 2,
|
|
128
142
|
sx: {
|
|
129
143
|
flexGrow: 0,
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { extends as _extends } from './_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
const SvgAuto = props => /*#__PURE__*/React.createElement("svg", _extends({
|
|
5
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6
|
+
width: "1em",
|
|
7
|
+
height: "1em",
|
|
8
|
+
fill: "none",
|
|
9
|
+
viewBox: "0 0 24 24"
|
|
10
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
|
11
|
+
fill: "currentColor",
|
|
12
|
+
fillRule: "evenodd",
|
|
13
|
+
d: "m23.723 10.94-2.037-2.78a1.2 1.2 0 0 0-1.936 0l-2.037 2.78c-.58.793-.014 1.909.968 1.909h.88a7.543 7.543 0 0 1-3.73 5.695c-2.301 1.334-5.25 1.334-7.553 0a1.1 1.1 0 0 0-1.102 1.904 9.755 9.755 0 0 0 4.88 1.314 9.756 9.756 0 0 0 4.878-1.313 9.803 9.803 0 0 0 3.57-3.57 9.74 9.74 0 0 0 1.258-4.03h.993a1.2 1.2 0 0 0 .968-1.91m-18.183.213h-.992a7.594 7.594 0 0 1 .962-2.93 7.61 7.61 0 0 1 2.768-2.766c2.302-1.332 5.25-1.332 7.554 0a1.1 1.1 0 0 0 1.102-1.905c-2.972-1.718-6.787-1.718-9.758 0a9.812 9.812 0 0 0-3.57 3.57 9.775 9.775 0 0 0-1.258 4.03H1.244a1.2 1.2 0 0 0-.968 1.91l2.148 2.932a1.2 1.2 0 0 0 1.936 0l2.148-2.932a1.2 1.2 0 0 0-.968-1.91",
|
|
14
|
+
clipRule: "evenodd"
|
|
15
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
16
|
+
fill: "currentColor",
|
|
17
|
+
d: "M10.354 14.963a.912.912 0 1 1-1.732-.568l1.909-5.617a1.2 1.2 0 0 1 1.136-.814h.663a1.2 1.2 0 0 1 1.137.815l1.902 5.623a.908.908 0 1 1-1.725.564l-.316-1H10.67l-.316.997Zm.748-2.369h1.793l-.864-2.742h-.064l-.865 2.742Z"
|
|
18
|
+
}));
|
|
19
|
+
|
|
20
|
+
export { SvgAuto as default };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { extends as _extends } from './_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
const SvgExternalLink = props => /*#__PURE__*/React.createElement("svg", _extends({
|
|
5
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6
|
+
width: "1em",
|
|
7
|
+
height: "1em",
|
|
8
|
+
fill: "none",
|
|
9
|
+
viewBox: "0 0 24 24"
|
|
10
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
|
11
|
+
fill: "currentColor",
|
|
12
|
+
fillRule: "evenodd",
|
|
13
|
+
d: "M5.953 4.326c-.899 0-1.627.728-1.627 1.627v12.094c0 .899.728 1.627 1.627 1.627h12.094c.899 0 1.627-.728 1.627-1.627V12A1.163 1.163 0 1 1 22 12v6.047A3.953 3.953 0 0 1 18.047 22H5.953A3.953 3.953 0 0 1 2 18.047V5.953A3.953 3.953 0 0 1 5.953 2H12a1.163 1.163 0 1 1 0 2.326H5.953Z",
|
|
14
|
+
clipRule: "evenodd"
|
|
15
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
16
|
+
fill: "currentColor",
|
|
17
|
+
fillRule: "evenodd",
|
|
18
|
+
d: "M13.308 10.682a1.06 1.06 0 0 0 1.5 0l5.668-5.668a1.06 1.06 0 0 0-1.5-1.5l-5.668 5.668a1.06 1.06 0 0 0 0 1.5Z",
|
|
19
|
+
clipRule: "evenodd"
|
|
20
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
21
|
+
fill: "currentColor",
|
|
22
|
+
fillRule: "evenodd",
|
|
23
|
+
d: "M15.24 3.163c0-.642.52-1.163 1.163-1.163h4.419c.642 0 1.162.52 1.162 1.163V7.58a1.163 1.163 0 0 1-2.325 0V4.326h-3.256c-.642 0-1.163-.521-1.163-1.163Z",
|
|
24
|
+
clipRule: "evenodd"
|
|
25
|
+
}));
|
|
26
|
+
|
|
27
|
+
export { SvgExternalLink as default };
|
|
@@ -16,6 +16,7 @@ export { default as ArrowRightLimitIcon } from './ArrowRightLimit.js';
|
|
|
16
16
|
export { default as ArrowUpIcon } from './ArrowUp.js';
|
|
17
17
|
export { default as ArrowUpDownIcon } from './ArrowUpDown.js';
|
|
18
18
|
export { default as ArrowUpLimitIcon } from './ArrowUpLimit.js';
|
|
19
|
+
export { default as AutoIcon } from './Auto.js';
|
|
19
20
|
export { default as BarchartIcon } from './Barchart.js';
|
|
20
21
|
export { default as BookIcon } from './Book.js';
|
|
21
22
|
export { default as BookmarkIcon } from './Bookmark.js';
|
|
@@ -77,6 +78,7 @@ export { default as EnterIcon } from './Enter.js';
|
|
|
77
78
|
export { default as EqualIcon } from './Equal.js';
|
|
78
79
|
export { default as EraserIcon } from './Eraser.js';
|
|
79
80
|
export { default as ExclamationPointInCircleIcon } from './ExclamationPointInCircle.js';
|
|
81
|
+
export { default as ExternalLinkIcon } from './ExternalLink.js';
|
|
80
82
|
export { default as EyeOffIcon } from './EyeOff.js';
|
|
81
83
|
export { default as EyeOnIcon } from './EyeOn.js';
|
|
82
84
|
export { default as FaceHappyIcon } from './FaceHappy.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teamturing/react-kit",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.28.0",
|
|
4
4
|
"description": "React components, hooks for create teamturing web application",
|
|
5
5
|
"author": "Sungchang Park <psch300@gmail.com> (https://github.com/psch300)",
|
|
6
6
|
"homepage": "https://github.com/weareteamturing/bombe#readme",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@floating-ui/react-dom": "^2.0.2",
|
|
57
57
|
"@primer/behaviors": "^1.3.6",
|
|
58
|
-
"@teamturing/icons": "^1.
|
|
58
|
+
"@teamturing/icons": "^1.41.0",
|
|
59
59
|
"@teamturing/token-studio": "^1.6.0",
|
|
60
60
|
"@teamturing/utils": "^1.3.0",
|
|
61
61
|
"framer-motion": "^10.16.4",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"react-textarea-autosize": "^8.5.3",
|
|
67
67
|
"styled-system": "^5.1.5"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "56bd9e11df60092d7bad4459c2ce79a7d8fe0039"
|
|
70
70
|
}
|