@dnanpm/styleguide 2.2.2 → 2.3.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.
- package/build/cjs/components/Search/Search.d.ts +1 -1
- package/build/cjs/components/Search/Search.js +1 -1
- package/build/cjs/components/Selectbox/Selectbox.js +2 -2
- package/build/es/components/Search/Search.d.ts +1 -1
- package/build/es/components/Search/Search.js +1 -1
- package/build/es/components/Selectbox/Selectbox.js +2 -2
- package/package.json +2 -3
|
@@ -48,7 +48,7 @@ const Input = styled['default'].input `
|
|
|
48
48
|
}
|
|
49
49
|
`;
|
|
50
50
|
const Search = (_a) => {
|
|
51
|
-
var { value = '', iconName, icon = hlMagnifyingGlass['default'], iconSize = '1.5rem', className, onChange, onClick, isReactive =
|
|
51
|
+
var { value = '', iconName, icon = hlMagnifyingGlass['default'], iconSize = '1.5rem', className, onChange, onClick, isReactive = true } = _a, props = tslib.__rest(_a, ["value", "iconName", "icon", "iconSize", "className", "onChange", "onClick", "isReactive"]);
|
|
52
52
|
const [text, setText] = React.useState(value);
|
|
53
53
|
const inputRef = React__default['default'].useRef(null);
|
|
54
54
|
const handleChange = (e) => {
|
|
@@ -43,12 +43,12 @@ const getStyles = () => ({
|
|
|
43
43
|
borderColor: theme['default'].color.gray25,
|
|
44
44
|
} })),
|
|
45
45
|
menu: styles => (Object.assign(Object.assign({}, styles), { border: `1px solid ${theme['default'].color.gray25}`, boxShadow: 'none', marginTop: '-2px' })),
|
|
46
|
-
|
|
46
|
+
clearIndicator: styles => (Object.assign(Object.assign({}, styles), { cursor: 'pointer' })),
|
|
47
47
|
indicatorSeparator: styles => (Object.assign(Object.assign({}, styles), { backgroundColor: 'transparent', border: 'none' })),
|
|
48
48
|
option: (styles, { isDisabled, isSelected }) => (Object.assign(Object.assign({}, styles), { display: 'flex', justifyContent: 'space-between', color: isDisabled ? theme['default'].color.gray40 : theme['default'].color.text, fontWeight: isSelected ? theme['default'].fontWeight.medium : theme['default'].fontWeight.book, fontSize: theme['default'].fontSize.default, textOverflow: 'ellipsis', whiteSpace: 'pre-wrap', overflow: 'hidden', cursor: isDisabled ? 'not-allowed' : 'default' })),
|
|
49
49
|
dropdownIndicator: (styles, { isDisabled, selectProps: { isSearchable } }) => {
|
|
50
50
|
const enabledColorsSet = isSearchable ? theme['default'].color.hotPink : theme['default'].color.text;
|
|
51
|
-
return Object.assign(Object.assign({}, styles), { color: isDisabled ? theme['default'].color.gray40 : enabledColorsSet, ':hover': {
|
|
51
|
+
return Object.assign(Object.assign({}, styles), { color: isDisabled ? theme['default'].color.gray40 : enabledColorsSet, pointerEvents: 'none', ':hover': {
|
|
52
52
|
color: theme['default'].color.text,
|
|
53
53
|
} });
|
|
54
54
|
},
|
|
@@ -40,7 +40,7 @@ const Input = styled.input `
|
|
|
40
40
|
}
|
|
41
41
|
`;
|
|
42
42
|
const Search = (_a) => {
|
|
43
|
-
var { value = '', iconName, icon = hlMagnifyingGlass, iconSize = '1.5rem', className, onChange, onClick, isReactive =
|
|
43
|
+
var { value = '', iconName, icon = hlMagnifyingGlass, iconSize = '1.5rem', className, onChange, onClick, isReactive = true } = _a, props = __rest(_a, ["value", "iconName", "icon", "iconSize", "className", "onChange", "onClick", "isReactive"]);
|
|
44
44
|
const [text, setText] = useState(value);
|
|
45
45
|
const inputRef = React.useRef(null);
|
|
46
46
|
const handleChange = (e) => {
|
|
@@ -34,12 +34,12 @@ const getStyles = () => ({
|
|
|
34
34
|
borderColor: theme.color.gray25,
|
|
35
35
|
} })),
|
|
36
36
|
menu: styles => (Object.assign(Object.assign({}, styles), { border: `1px solid ${theme.color.gray25}`, boxShadow: 'none', marginTop: '-2px' })),
|
|
37
|
-
|
|
37
|
+
clearIndicator: styles => (Object.assign(Object.assign({}, styles), { cursor: 'pointer' })),
|
|
38
38
|
indicatorSeparator: styles => (Object.assign(Object.assign({}, styles), { backgroundColor: 'transparent', border: 'none' })),
|
|
39
39
|
option: (styles, { isDisabled, isSelected }) => (Object.assign(Object.assign({}, styles), { display: 'flex', justifyContent: 'space-between', color: isDisabled ? theme.color.gray40 : theme.color.text, fontWeight: isSelected ? theme.fontWeight.medium : theme.fontWeight.book, fontSize: theme.fontSize.default, textOverflow: 'ellipsis', whiteSpace: 'pre-wrap', overflow: 'hidden', cursor: isDisabled ? 'not-allowed' : 'default' })),
|
|
40
40
|
dropdownIndicator: (styles, { isDisabled, selectProps: { isSearchable } }) => {
|
|
41
41
|
const enabledColorsSet = isSearchable ? theme.color.hotPink : theme.color.text;
|
|
42
|
-
return Object.assign(Object.assign({}, styles), { color: isDisabled ? theme.color.gray40 : enabledColorsSet, ':hover': {
|
|
42
|
+
return Object.assign(Object.assign({}, styles), { color: isDisabled ? theme.color.gray40 : enabledColorsSet, pointerEvents: 'none', ':hover': {
|
|
43
43
|
color: theme.color.text,
|
|
44
44
|
} });
|
|
45
45
|
},
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dnanpm/styleguide",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.3.0",
|
|
5
5
|
"main": "build/cjs/index.js",
|
|
6
6
|
"module": "build/es/index.js",
|
|
7
7
|
"jsnext:main": "build/es/index.js",
|
|
@@ -49,7 +49,6 @@
|
|
|
49
49
|
"@types/react": "^17.0.0",
|
|
50
50
|
"@types/react-dom": "^17.0.0",
|
|
51
51
|
"@types/react-modal": "^3.10.6",
|
|
52
|
-
"@types/react-select": "^5.0.1",
|
|
53
52
|
"@types/react-sizes": "^2.0.0",
|
|
54
53
|
"@types/react-tooltip": "^3.11.0",
|
|
55
54
|
"@types/styled-components": "^5.1.7",
|
|
@@ -88,7 +87,7 @@
|
|
|
88
87
|
"ramda": "^0.27.1",
|
|
89
88
|
"react-modal": "^3.12.1",
|
|
90
89
|
"react-progressive-image": "^0.6.0",
|
|
91
|
-
"react-select": "^5.
|
|
90
|
+
"react-select": "^5.7.0",
|
|
92
91
|
"react-sizes": "^2.0.0",
|
|
93
92
|
"react-spring": "^8.0.27",
|
|
94
93
|
"react-tooltip": "4.1.0"
|