@coorpacademy/components 11.38.7 → 11.38.8-alpha.4
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/es/atom/input-search/index.d.ts +3 -0
- package/es/atom/input-search/index.d.ts.map +1 -1
- package/es/atom/input-search/index.js +52 -15
- package/es/atom/input-search/index.js.map +1 -1
- package/es/atom/input-search/style.css +96 -0
- package/es/molecule/cm-popin/types.d.ts +3 -0
- package/es/molecule/cm-popin/types.d.ts.map +1 -1
- package/es/molecule/multi-filter-panel/index.d.ts +3 -0
- package/es/molecule/multi-filter-panel/index.d.ts.map +1 -1
- package/es/molecule/multi-filter-panel/prop-types.d.ts +3 -0
- package/es/molecule/multi-filter-panel/prop-types.d.ts.map +1 -1
- package/es/molecule/search-form/index.d.ts +7 -0
- package/es/molecule/search-form/index.d.ts.map +1 -1
- package/es/molecule/search-form/index.js +30 -16
- package/es/molecule/search-form/index.js.map +1 -1
- package/es/molecule/search-form/style.css +22 -9
- package/es/organism/brand-table/index.d.ts +3 -0
- package/es/organism/content-skill-modal/index.d.ts +6 -0
- package/es/organism/content-skill-modal/index.d.ts.map +1 -1
- package/es/organism/content-skill-modal/types.d.ts +6 -0
- package/es/organism/content-skill-modal/types.d.ts.map +1 -1
- package/es/organism/filter-checkbox-and-search/index.d.ts +3 -0
- package/es/organism/filter-checkbox-and-search/index.d.ts.map +1 -1
- package/es/organism/filter-checkbox-and-search/props-types.d.ts +3 -0
- package/es/organism/filter-checkbox-and-search/props-types.d.ts.map +1 -1
- package/es/organism/list-items/index.d.ts +3 -0
- package/es/organism/mooc-header/index.d.ts +16 -0
- package/es/organism/mooc-header/index.d.ts.map +1 -1
- package/es/organism/mooc-header/index.js +129 -14
- package/es/organism/mooc-header/index.js.map +1 -1
- package/es/organism/mooc-header/style.css +181 -8
- package/es/template/app-player/loading/index.d.ts +3 -0
- package/es/template/app-player/player/index.d.ts +6 -0
- package/es/template/app-player/player/slides/index.d.ts +3 -0
- package/es/template/app-player/player/slides/index.d.ts.map +1 -1
- package/es/template/app-player/popin-correction/index.d.ts +3 -0
- package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/es/template/app-player/popin-end/index.d.ts +3 -0
- package/es/template/app-review/index.d.ts +3 -0
- package/es/template/app-review/index.d.ts.map +1 -1
- package/es/template/app-review/player/prop-types.d.ts +3 -0
- package/es/template/app-review/player/prop-types.d.ts.map +1 -1
- package/es/template/app-review/prop-types.d.ts +3 -0
- package/es/template/app-review/prop-types.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +18 -0
- package/es/template/back-office/brand-update/index.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.js +4 -1
- package/es/template/back-office/brand-update/index.js.map +1 -1
- package/es/template/back-office/brand-update/style.css +5 -0
- package/es/template/common/dashboard/index.d.ts +6 -0
- package/es/template/common/search-page/index.d.ts +3 -0
- package/es/template/external-course/index.d.ts +3 -0
- package/es/util/check-is-mobile.d.ts +1 -1
- package/es/util/check-is-mobile.d.ts.map +1 -1
- package/es/util/check-is-mobile.js +4 -2
- package/es/util/check-is-mobile.js.map +1 -1
- package/lib/atom/input-search/index.d.ts +3 -0
- package/lib/atom/input-search/index.d.ts.map +1 -1
- package/lib/atom/input-search/index.js +52 -15
- package/lib/atom/input-search/index.js.map +1 -1
- package/lib/atom/input-search/style.css +96 -0
- package/lib/molecule/cm-popin/types.d.ts +3 -0
- package/lib/molecule/cm-popin/types.d.ts.map +1 -1
- package/lib/molecule/multi-filter-panel/index.d.ts +3 -0
- package/lib/molecule/multi-filter-panel/index.d.ts.map +1 -1
- package/lib/molecule/multi-filter-panel/prop-types.d.ts +3 -0
- package/lib/molecule/multi-filter-panel/prop-types.d.ts.map +1 -1
- package/lib/molecule/search-form/index.d.ts +7 -0
- package/lib/molecule/search-form/index.d.ts.map +1 -1
- package/lib/molecule/search-form/index.js +31 -17
- package/lib/molecule/search-form/index.js.map +1 -1
- package/lib/molecule/search-form/style.css +22 -9
- package/lib/organism/brand-table/index.d.ts +3 -0
- package/lib/organism/content-skill-modal/index.d.ts +6 -0
- package/lib/organism/content-skill-modal/index.d.ts.map +1 -1
- package/lib/organism/content-skill-modal/types.d.ts +6 -0
- package/lib/organism/content-skill-modal/types.d.ts.map +1 -1
- package/lib/organism/filter-checkbox-and-search/index.d.ts +3 -0
- package/lib/organism/filter-checkbox-and-search/index.d.ts.map +1 -1
- package/lib/organism/filter-checkbox-and-search/props-types.d.ts +3 -0
- package/lib/organism/filter-checkbox-and-search/props-types.d.ts.map +1 -1
- package/lib/organism/list-items/index.d.ts +3 -0
- package/lib/organism/mooc-header/index.d.ts +16 -0
- package/lib/organism/mooc-header/index.d.ts.map +1 -1
- package/lib/organism/mooc-header/index.js +129 -14
- package/lib/organism/mooc-header/index.js.map +1 -1
- package/lib/organism/mooc-header/style.css +181 -8
- package/lib/template/app-player/loading/index.d.ts +3 -0
- package/lib/template/app-player/player/index.d.ts +6 -0
- package/lib/template/app-player/player/slides/index.d.ts +3 -0
- package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-correction/index.d.ts +3 -0
- package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-end/index.d.ts +3 -0
- package/lib/template/app-review/index.d.ts +3 -0
- package/lib/template/app-review/index.d.ts.map +1 -1
- package/lib/template/app-review/player/prop-types.d.ts +3 -0
- package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
- package/lib/template/app-review/prop-types.d.ts +3 -0
- package/lib/template/app-review/prop-types.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +18 -0
- package/lib/template/back-office/brand-update/index.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.js +4 -1
- package/lib/template/back-office/brand-update/index.js.map +1 -1
- package/lib/template/back-office/brand-update/style.css +5 -0
- package/lib/template/common/dashboard/index.d.ts +6 -0
- package/lib/template/common/search-page/index.d.ts +3 -0
- package/lib/template/external-course/index.d.ts +3 -0
- package/lib/util/check-is-mobile.d.ts +1 -1
- package/lib/util/check-is-mobile.d.ts.map +1 -1
- package/lib/util/check-is-mobile.js +4 -2
- package/lib/util/check-is-mobile.js.map +1 -1
- package/package.json +2 -2
|
@@ -31,8 +31,11 @@ declare namespace Search {
|
|
|
31
31
|
const onClear: PropTypes.Requireable<(...args: any[]) => any>;
|
|
32
32
|
const onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
33
33
|
const onBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
34
|
+
const onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
35
|
+
const inputRef: PropTypes.Requireable<(...args: any[]) => any>;
|
|
34
36
|
const theme: PropTypes.Requireable<string>;
|
|
35
37
|
const dataTestId: PropTypes.Requireable<string>;
|
|
38
|
+
const searchIconAriaLabel: PropTypes.Requireable<string>;
|
|
36
39
|
}
|
|
37
40
|
}
|
|
38
41
|
import PropTypes from "prop-types";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/input-search/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/input-search/index.js"],"names":[],"mappings":";AAiBA,iDAuFC"}
|
|
@@ -6,6 +6,10 @@ import classnames from 'classnames';
|
|
|
6
6
|
import { NovaCompositionCoorpacademySearchThin as CMSearchIcon, NovaCompositionCoorpacademySearch as SearchIcon, NovaSolidStatusClose as CloseIcon } from '@coorpacademy/nova-icons';
|
|
7
7
|
import Provider from '../provider';
|
|
8
8
|
import style from './style.css';
|
|
9
|
+
const handleMouseDown = e => {
|
|
10
|
+
e.preventDefault();
|
|
11
|
+
e.stopPropagation();
|
|
12
|
+
};
|
|
9
13
|
const Search = props => {
|
|
10
14
|
const {
|
|
11
15
|
value,
|
|
@@ -14,27 +18,56 @@ const Search = props => {
|
|
|
14
18
|
onClear = _noop,
|
|
15
19
|
onFocus,
|
|
16
20
|
onBlur,
|
|
21
|
+
onKeyDown,
|
|
22
|
+
inputRef,
|
|
17
23
|
theme = 'default',
|
|
18
|
-
dataTestId
|
|
24
|
+
dataTestId,
|
|
25
|
+
searchIconAriaLabel
|
|
19
26
|
} = props;
|
|
20
27
|
const handleChange = useMemo(() => e => onChange(e.target.value), [onChange]);
|
|
21
|
-
const
|
|
22
|
-
|
|
28
|
+
const handleKeyDown = useMemo(() => e => {
|
|
29
|
+
if (onKeyDown) {
|
|
30
|
+
onKeyDown(e);
|
|
31
|
+
}
|
|
32
|
+
}, [onKeyDown]);
|
|
33
|
+
const isCoorpManager = theme === 'coorpmanager';
|
|
34
|
+
const isMooc = theme === 'mooc';
|
|
35
|
+
const isDefault = theme === 'default';
|
|
36
|
+
const wrapperClass = classnames({
|
|
37
|
+
[style.wrapperSearch]: isDefault,
|
|
38
|
+
[style.coorpmanager]: isCoorpManager,
|
|
39
|
+
[style.wrapperMooc]: isMooc
|
|
40
|
+
});
|
|
41
|
+
const wrapperParentClass = classnames({
|
|
42
|
+
[style.wrapperMoocParent]: isMooc
|
|
43
|
+
});
|
|
44
|
+
const searchClass = classnames({
|
|
45
|
+
[style.search]: true,
|
|
46
|
+
[style.moocSearch]: isMooc
|
|
47
|
+
});
|
|
48
|
+
const SearchIconComponent = isCoorpManager ? CMSearchIcon : SearchIcon;
|
|
49
|
+
const showTitle = isCoorpManager;
|
|
50
|
+
const showClearIcon = value && isCoorpManager;
|
|
23
51
|
return /*#__PURE__*/React.createElement("div", {
|
|
24
|
-
className:
|
|
52
|
+
className: wrapperParentClass
|
|
53
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
54
|
+
className: wrapperClass
|
|
25
55
|
}, /*#__PURE__*/React.createElement("label", {
|
|
26
56
|
htmlFor: "search",
|
|
27
57
|
title: placeholder
|
|
28
|
-
},
|
|
29
|
-
className: style.searchIcon
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
58
|
+
}, /*#__PURE__*/React.createElement(SearchIconComponent, {
|
|
59
|
+
className: style.searchIcon,
|
|
60
|
+
"data-name": "search-icon",
|
|
61
|
+
onMouseDown: handleMouseDown,
|
|
62
|
+
"aria-label": searchIconAriaLabel,
|
|
63
|
+
role: "img"
|
|
64
|
+
}), showTitle ? /*#__PURE__*/React.createElement("span", {
|
|
33
65
|
className: classnames(style.title, _isEmpty(value) && style.noValue)
|
|
34
66
|
}, placeholder) : null), /*#__PURE__*/React.createElement("input", {
|
|
67
|
+
ref: inputRef,
|
|
35
68
|
"data-name": "search-input",
|
|
36
69
|
"data-testid": dataTestId,
|
|
37
|
-
className:
|
|
70
|
+
className: searchClass,
|
|
38
71
|
"aria-label": placeholder,
|
|
39
72
|
type: "text",
|
|
40
73
|
name: "search",
|
|
@@ -45,11 +78,12 @@ const Search = props => {
|
|
|
45
78
|
onInput: handleChange,
|
|
46
79
|
onFocus: onFocus,
|
|
47
80
|
onChange: _noop,
|
|
48
|
-
onBlur: onBlur
|
|
49
|
-
|
|
81
|
+
onBlur: onBlur,
|
|
82
|
+
onKeyDown: handleKeyDown
|
|
83
|
+
}), showClearIcon ? /*#__PURE__*/React.createElement(CloseIcon, {
|
|
50
84
|
onClick: onClear,
|
|
51
85
|
className: style.clearIcon
|
|
52
|
-
}) : null);
|
|
86
|
+
}) : null));
|
|
53
87
|
};
|
|
54
88
|
Search.contextTypes = {
|
|
55
89
|
skin: Provider.childContextTypes.skin
|
|
@@ -61,8 +95,11 @@ Search.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
61
95
|
onClear: PropTypes.func,
|
|
62
96
|
onFocus: PropTypes.func,
|
|
63
97
|
onBlur: PropTypes.func,
|
|
64
|
-
|
|
65
|
-
|
|
98
|
+
onKeyDown: PropTypes.func,
|
|
99
|
+
inputRef: PropTypes.func,
|
|
100
|
+
theme: PropTypes.oneOf(['default', 'coorpmanager', 'mooc']),
|
|
101
|
+
dataTestId: PropTypes.string,
|
|
102
|
+
searchIconAriaLabel: PropTypes.string
|
|
66
103
|
} : {};
|
|
67
104
|
export default Search;
|
|
68
105
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useMemo","PropTypes","classnames","NovaCompositionCoorpacademySearchThin","CMSearchIcon","NovaCompositionCoorpacademySearch","SearchIcon","NovaSolidStatusClose","CloseIcon","Provider","style","Search","props","value","placeholder","onChange","_noop","onClear","onFocus","onBlur","theme","dataTestId","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useMemo","PropTypes","classnames","NovaCompositionCoorpacademySearchThin","CMSearchIcon","NovaCompositionCoorpacademySearch","SearchIcon","NovaSolidStatusClose","CloseIcon","Provider","style","handleMouseDown","e","preventDefault","stopPropagation","Search","props","value","placeholder","onChange","_noop","onClear","onFocus","onBlur","onKeyDown","inputRef","theme","dataTestId","searchIconAriaLabel","handleChange","target","handleKeyDown","isCoorpManager","isMooc","isDefault","wrapperClass","wrapperSearch","coorpmanager","wrapperMooc","wrapperParentClass","wrapperMoocParent","searchClass","search","moocSearch","SearchIconComponent","showTitle","showClearIcon","createElement","className","htmlFor","title","searchIcon","onMouseDown","role","_isEmpty","noValue","ref","type","name","id","onInput","onClick","clearIcon","contextTypes","skin","childContextTypes","propTypes","process","env","NODE_ENV","string","isRequired","func","oneOf"],"sources":["../../../src/atom/input-search/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {\n NovaCompositionCoorpacademySearchThin as CMSearchIcon,\n NovaCompositionCoorpacademySearch as SearchIcon,\n NovaSolidStatusClose as CloseIcon\n} from '@coorpacademy/nova-icons';\nimport {noop, isEmpty} from 'lodash/fp';\nimport Provider from '../provider';\nimport style from './style.css';\n\nconst handleMouseDown = e => {\n e.preventDefault();\n e.stopPropagation();\n};\n\nconst Search = props => {\n const {\n value,\n placeholder,\n onChange = noop,\n onClear = noop,\n onFocus,\n onBlur,\n onKeyDown,\n inputRef,\n theme = 'default',\n dataTestId,\n searchIconAriaLabel\n } = props;\n const handleChange = useMemo(() => e => onChange(e.target.value), [onChange]);\n\n const handleKeyDown = useMemo(\n () => e => {\n if (onKeyDown) {\n onKeyDown(e);\n }\n },\n [onKeyDown]\n );\n\n const isCoorpManager = theme === 'coorpmanager';\n const isMooc = theme === 'mooc';\n const isDefault = theme === 'default';\n\n const wrapperClass = classnames({\n [style.wrapperSearch]: isDefault,\n [style.coorpmanager]: isCoorpManager,\n [style.wrapperMooc]: isMooc\n });\n\n const wrapperParentClass = classnames({\n [style.wrapperMoocParent]: isMooc\n });\n\n const searchClass = classnames({\n [style.search]: true,\n [style.moocSearch]: isMooc\n });\n\n const SearchIconComponent = isCoorpManager ? CMSearchIcon : SearchIcon;\n const showTitle = isCoorpManager;\n const showClearIcon = value && isCoorpManager;\n\n return (\n <div className={wrapperParentClass}>\n <div className={wrapperClass}>\n <label htmlFor=\"search\" title={placeholder}>\n <SearchIconComponent\n className={style.searchIcon}\n data-name=\"search-icon\"\n onMouseDown={handleMouseDown}\n aria-label={searchIconAriaLabel}\n role=\"img\"\n />\n {showTitle ? (\n <span className={classnames(style.title, isEmpty(value) && style.noValue)}>\n {placeholder}\n </span>\n ) : null}\n </label>\n <input\n ref={inputRef}\n data-name=\"search-input\"\n data-testid={dataTestId}\n className={searchClass}\n aria-label={placeholder}\n type=\"text\"\n name=\"search\"\n id=\"search\"\n placeholder={placeholder}\n title={placeholder}\n value={value}\n onInput={handleChange}\n onFocus={onFocus}\n onChange={noop}\n onBlur={onBlur}\n onKeyDown={handleKeyDown}\n />\n {showClearIcon ? <CloseIcon onClick={onClear} className={style.clearIcon} /> : null}\n </div>\n </div>\n );\n};\n\nSearch.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nSearch.propTypes = {\n value: PropTypes.string,\n placeholder: PropTypes.string.isRequired,\n onChange: PropTypes.func,\n onClear: PropTypes.func,\n onFocus: PropTypes.func,\n onBlur: PropTypes.func,\n onKeyDown: PropTypes.func,\n inputRef: PropTypes.func,\n theme: PropTypes.oneOf(['default', 'coorpmanager', 'mooc']),\n dataTestId: PropTypes.string,\n searchIconAriaLabel: PropTypes.string\n};\n\nexport default Search;\n"],"mappings":";;AAAA,OAAOA,KAAK,IAAGC,OAAO,QAAO,OAAO;AACpC,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AACnC,SACEC,qCAAqC,IAAIC,YAAY,EACrDC,iCAAiC,IAAIC,UAAU,EAC/CC,oBAAoB,IAAIC,SAAS,QAC5B,0BAA0B;AAEjC,OAAOC,QAAQ,MAAM,aAAa;AAClC,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,eAAe,GAAGC,CAAC,IAAI;EAC3BA,CAAC,CAACC,cAAc,CAAC,CAAC;EAClBD,CAAC,CAACE,eAAe,CAAC,CAAC;AACrB,CAAC;AAED,MAAMC,MAAM,GAAGC,KAAK,IAAI;EACtB,MAAM;IACJC,KAAK;IACLC,WAAW;IACXC,QAAQ,GAAAC,KAAO;IACfC,OAAO,GAAAD,KAAO;IACdE,OAAO;IACPC,MAAM;IACNC,SAAS;IACTC,QAAQ;IACRC,KAAK,GAAG,SAAS;IACjBC,UAAU;IACVC;EACF,CAAC,GAAGZ,KAAK;EACT,MAAMa,YAAY,GAAG7B,OAAO,CAAC,MAAMY,CAAC,IAAIO,QAAQ,CAACP,CAAC,CAACkB,MAAM,CAACb,KAAK,CAAC,EAAE,CAACE,QAAQ,CAAC,CAAC;EAE7E,MAAMY,aAAa,GAAG/B,OAAO,CAC3B,MAAMY,CAAC,IAAI;IACT,IAAIY,SAAS,EAAE;MACbA,SAAS,CAACZ,CAAC,CAAC;IACd;EACF,CAAC,EACD,CAACY,SAAS,CACZ,CAAC;EAED,MAAMQ,cAAc,GAAGN,KAAK,KAAK,cAAc;EAC/C,MAAMO,MAAM,GAAGP,KAAK,KAAK,MAAM;EAC/B,MAAMQ,SAAS,GAAGR,KAAK,KAAK,SAAS;EAErC,MAAMS,YAAY,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AS,CAACqE;AACjC,CAAC;AAED,eAAevD,MAAM","ignoreList":[]}
|
|
@@ -8,11 +8,13 @@
|
|
|
8
8
|
@value white from colors;
|
|
9
9
|
@value dark from colors;
|
|
10
10
|
@value black from colors;
|
|
11
|
+
@value cm_grey_75 from colors;
|
|
11
12
|
@value cm_grey_100 from colors;
|
|
12
13
|
@value cm_grey_150 from colors;
|
|
13
14
|
@value cm_grey_400 from colors;
|
|
14
15
|
@value cm_grey_500 from colors;
|
|
15
16
|
@value cm_grey_700 from colors;
|
|
17
|
+
@value brand from colors;
|
|
16
18
|
|
|
17
19
|
.wrapperSearch {
|
|
18
20
|
display: flex;
|
|
@@ -66,6 +68,7 @@
|
|
|
66
68
|
color: medium;
|
|
67
69
|
}
|
|
68
70
|
|
|
71
|
+
/* Theme: coorpmanager */
|
|
69
72
|
.coorpmanager {
|
|
70
73
|
position: relative;
|
|
71
74
|
}
|
|
@@ -177,6 +180,65 @@
|
|
|
177
180
|
line-height: 16px;
|
|
178
181
|
}
|
|
179
182
|
|
|
183
|
+
/* Theme: mooc */
|
|
184
|
+
.wrapperMooc {
|
|
185
|
+
display: flex;
|
|
186
|
+
flex-flow: nowrap;
|
|
187
|
+
flex-direction: row;
|
|
188
|
+
align-items: center;
|
|
189
|
+
overflow: hidden;
|
|
190
|
+
border-radius: 12px;
|
|
191
|
+
transition: box-shadow 0.3s ease-in-out;
|
|
192
|
+
background: cm_grey_100;
|
|
193
|
+
padding: 2px;
|
|
194
|
+
width: 100%;
|
|
195
|
+
flex: 1;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.wrapperMoocParent {
|
|
199
|
+
width: 100%;
|
|
200
|
+
flex: 1;
|
|
201
|
+
border-radius: 12px;
|
|
202
|
+
transition: box-shadow 0.3s ease-in-out;
|
|
203
|
+
background: transparent;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.moocSearch {
|
|
207
|
+
background-color: cm_grey_100;
|
|
208
|
+
border-radius: 12px;
|
|
209
|
+
height: 44px;
|
|
210
|
+
margin: 0;
|
|
211
|
+
font-family: Gilroy;
|
|
212
|
+
font-size: 14px;
|
|
213
|
+
font-weight: 500;
|
|
214
|
+
color: cm_grey_700;
|
|
215
|
+
padding: 0 0 0 45px;
|
|
216
|
+
padding-right: 48px;
|
|
217
|
+
outline: none;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.moocSearch:focus-within {
|
|
221
|
+
background-color: cm_grey_75;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.wrapperMoocParent:focus-within .wrapperMooc {
|
|
225
|
+
background: transparent;
|
|
226
|
+
box-shadow: 0 0 0 2px rgba(255,255,255,0), 0 0 0 2px brand;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.wrapperMooc:hover {
|
|
230
|
+
box-shadow: 0 0 0 2px brand;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.wrapperMooc .clearIcon {
|
|
234
|
+
position: relative;
|
|
235
|
+
right: 26px;
|
|
236
|
+
color: cm_grey_400;
|
|
237
|
+
width: 14px;
|
|
238
|
+
height: 14px;
|
|
239
|
+
cursor: pointer;
|
|
240
|
+
}
|
|
241
|
+
|
|
180
242
|
input:-webkit-autofill,
|
|
181
243
|
input:-webkit-autofill:hover,
|
|
182
244
|
input:-webkit-autofill:focus,
|
|
@@ -184,6 +246,20 @@ input:-webkit-autofill:active{
|
|
|
184
246
|
-webkit-background-clip: text;
|
|
185
247
|
}
|
|
186
248
|
|
|
249
|
+
.moocSearch:-webkit-autofill,
|
|
250
|
+
.moocSearch:-webkit-autofill:hover,
|
|
251
|
+
.moocSearch:-webkit-autofill:focus,
|
|
252
|
+
.moocSearch:-webkit-autofill:active {
|
|
253
|
+
-webkit-box-shadow: 0 0 0 1000px cm_grey_100 inset !important;
|
|
254
|
+
-webkit-text-fill-color: cm_grey_700 !important;
|
|
255
|
+
background-color: cm_grey_100 !important;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.wrapperMoocParent:focus-within .moocSearch:-webkit-autofill {
|
|
259
|
+
-webkit-box-shadow: 0 0 0 1000px cm_grey_75 inset !important;
|
|
260
|
+
background-color: cm_grey_75 !important;
|
|
261
|
+
}
|
|
262
|
+
|
|
187
263
|
@media tablet {
|
|
188
264
|
.search,
|
|
189
265
|
input {
|
|
@@ -194,6 +270,16 @@ input:-webkit-autofill:active{
|
|
|
194
270
|
font-size: 12px;
|
|
195
271
|
color: medium;
|
|
196
272
|
}
|
|
273
|
+
|
|
274
|
+
.wrapperMoocParent {
|
|
275
|
+
max-width: 100%;
|
|
276
|
+
box-sizing: border-box;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.wrapperMooc {
|
|
280
|
+
max-width: 100%;
|
|
281
|
+
box-sizing: border-box;
|
|
282
|
+
}
|
|
197
283
|
}
|
|
198
284
|
|
|
199
285
|
@media mobile {
|
|
@@ -204,4 +290,14 @@ input:-webkit-autofill:active{
|
|
|
204
290
|
.search::placeholder {
|
|
205
291
|
font-size: 12px;
|
|
206
292
|
}
|
|
293
|
+
|
|
294
|
+
.wrapperMoocParent {
|
|
295
|
+
max-width: 100%;
|
|
296
|
+
box-sizing: border-box;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.wrapperMooc {
|
|
300
|
+
max-width: 100%;
|
|
301
|
+
box-sizing: border-box;
|
|
302
|
+
}
|
|
207
303
|
}
|
|
@@ -648,8 +648,11 @@ declare const propTypes: {
|
|
|
648
648
|
onClear: PropTypes.Requireable<(...args: any[]) => any>;
|
|
649
649
|
onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
650
650
|
onBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
651
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
652
|
+
inputRef: PropTypes.Requireable<(...args: any[]) => any>;
|
|
651
653
|
theme: PropTypes.Requireable<string>;
|
|
652
654
|
dataTestId: PropTypes.Requireable<string>;
|
|
655
|
+
searchIconAriaLabel: PropTypes.Requireable<string>;
|
|
653
656
|
}>>;
|
|
654
657
|
checkboxWithTitle: PropTypes.Requireable<PropTypes.InferProps<{
|
|
655
658
|
title: PropTypes.Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAKnC,OAAO,IAAI,MAAM,iBAAiB,CAAC;AACnC,OAAO,EAAC,UAAU,EAAC,MAAM,wBAAwB,CAAC;AAClD,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAClD,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAElD,OAAO,EAAC,SAAS,IAAI,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAE3D,QAAA,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/types.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAKnC,OAAO,IAAI,MAAM,iBAAiB,CAAC;AACnC,OAAO,EAAC,UAAU,EAAC,MAAM,wBAAwB,CAAC;AAClD,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAClD,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAElD,OAAO,EAAC,SAAS,IAAI,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAE3D,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,GAAG,OAAO,GAAG,MAAM,CAAC;IAC5D,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,KAAK,CAAC,EAAE;QACN,IAAI,EAAE,SAAS,GAAG,MAAM,CAAC;QACzB,IAAI,EACA,SAAS,CAAC,UAAU,CAAC,OAAO,SAAS,CAAC,SAAS,CAAC,GAChD,SAAS,CAAC,UAAU,CAAC,OAAO,SAAS,CAAC,SAAS,CAAC,CAAC;KACtD,CAAC;IACF,IAAI,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC;CACpD,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -39,8 +39,11 @@ declare const MultiFilterPanel: {
|
|
|
39
39
|
onClear: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
40
40
|
onFocus: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
41
41
|
onBlur: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
42
|
+
onKeyDown: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
43
|
+
inputRef: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
42
44
|
theme: import("prop-types").Requireable<string>;
|
|
43
45
|
dataTestId: import("prop-types").Requireable<string>;
|
|
46
|
+
searchIconAriaLabel: import("prop-types").Requireable<string>;
|
|
44
47
|
}>>;
|
|
45
48
|
}>>;
|
|
46
49
|
}> | null | undefined> | null | undefined)[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/multi-filter-panel/index.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAC,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AAEjE,OAAkB,EAAC,qBAAqB,EAAqB,MAAM,cAAc,CAAC;AAqBlF,QAAA,MAAM,gBAAgB;YAAW,qBAAqB,WAAW,gBAAgB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/multi-filter-panel/index.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAC,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AAEjE,OAAkB,EAAC,qBAAqB,EAAqB,MAAM,cAAc,CAAC;AAqBlF,QAAA,MAAM,gBAAgB;YAAW,qBAAqB,WAAW,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgDhF,CAAC;AAQF,eAAe,gBAAgB,CAAC"}
|
|
@@ -37,8 +37,11 @@ declare const propTypes: {
|
|
|
37
37
|
onClear: PropTypes.Requireable<(...args: any[]) => any>;
|
|
38
38
|
onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
39
39
|
onBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
40
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
41
|
+
inputRef: PropTypes.Requireable<(...args: any[]) => any>;
|
|
40
42
|
theme: PropTypes.Requireable<string>;
|
|
41
43
|
dataTestId: PropTypes.Requireable<string>;
|
|
44
|
+
searchIconAriaLabel: PropTypes.Requireable<string>;
|
|
42
45
|
}>>;
|
|
43
46
|
}>>;
|
|
44
47
|
}> | null | undefined> | null | undefined)[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/molecule/multi-filter-panel/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAA4B,EAAC,eAAe,EAAC,MAAM,uCAAuC,CAAC;AAC3F,OAAyC,EACvC,4BAA4B,EAC7B,MAAM,uDAAuD,CAAC;AAE/D,QAAA,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/molecule/multi-filter-panel/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAA4B,EAAC,eAAe,EAAC,MAAM,uCAAuC,CAAC;AAC3F,OAAyC,EACvC,4BAA4B,EAC7B,MAAM,uDAAuD,CAAC;AAE/D,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAed,CAAC;AAEF,oBAAY,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,eAAe,CAAC;CAC1B,CAAC;AAEF,oBAAY,oBAAoB,GAAG;IACjC,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,4BAA4B,CAAC;CACvC,CAAC;AAEF,oBAAY,kBAAkB,GAAG,gBAAgB,GAAG,oBAAoB,CAAC;AAEzE,oBAAY,qBAAqB,GAAG;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,OAAO,EAAE,kBAAkB,EAAE,CAAC;CAC/B,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -8,6 +8,8 @@ declare namespace SearchForm {
|
|
|
8
8
|
onReset: PropTypes.Requireable<(...args: any[]) => any>;
|
|
9
9
|
onSearchFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
10
10
|
onSearchBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
11
|
+
onSearchKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
12
|
+
inputRef: PropTypes.Requireable<(...args: any[]) => any>;
|
|
11
13
|
search: PropTypes.Requireable<PropTypes.InferProps<{
|
|
12
14
|
value: PropTypes.Requireable<string>;
|
|
13
15
|
placeholder: PropTypes.Validator<string>;
|
|
@@ -15,11 +17,16 @@ declare namespace SearchForm {
|
|
|
15
17
|
onClear: PropTypes.Requireable<(...args: any[]) => any>;
|
|
16
18
|
onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
17
19
|
onBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
20
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
21
|
+
inputRef: PropTypes.Requireable<(...args: any[]) => any>;
|
|
18
22
|
theme: PropTypes.Requireable<string>;
|
|
19
23
|
dataTestId: PropTypes.Requireable<string>;
|
|
24
|
+
searchIconAriaLabel: PropTypes.Requireable<string>;
|
|
20
25
|
}>>;
|
|
21
26
|
'search-reset-aria-label': PropTypes.Requireable<string>;
|
|
22
27
|
dataTestId: PropTypes.Requireable<string>;
|
|
28
|
+
theme: PropTypes.Requireable<string>;
|
|
29
|
+
searchIconAriaLabel: PropTypes.Requireable<string>;
|
|
23
30
|
};
|
|
24
31
|
}
|
|
25
32
|
import PropTypes from "prop-types";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/search-form/index.js"],"names":[],"mappings":";AAOA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/search-form/index.js"],"names":[],"mappings":";AAOA,mEAoEC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import _get from "lodash/fp/get";
|
|
2
1
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
2
|
import React, { useMemo } from 'react';
|
|
4
3
|
import PropTypes from 'prop-types';
|
|
5
|
-
import
|
|
4
|
+
import classnames from 'classnames';
|
|
6
5
|
import Search from '../../atom/input-search';
|
|
6
|
+
import Icon from '../../atom/icon';
|
|
7
7
|
import style from './style.css';
|
|
8
8
|
const SearchForm = (props, context) => {
|
|
9
9
|
const {
|
|
@@ -14,17 +14,24 @@ const SearchForm = (props, context) => {
|
|
|
14
14
|
search,
|
|
15
15
|
onSearchFocus,
|
|
16
16
|
onSearchBlur,
|
|
17
|
+
onSearchKeyDown,
|
|
18
|
+
inputRef,
|
|
17
19
|
'search-reset-aria-label': searchResetAriaLabel,
|
|
18
|
-
dataTestId
|
|
20
|
+
dataTestId,
|
|
21
|
+
theme,
|
|
22
|
+
searchIconAriaLabel
|
|
19
23
|
} = props;
|
|
20
24
|
const handleSubmit = useMemo(() => evt => {
|
|
21
25
|
evt.preventDefault();
|
|
22
26
|
return onSubmit && onSubmit(evt);
|
|
23
27
|
}, [onSubmit]);
|
|
24
|
-
const {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
const handleReset = useMemo(() => evt => {
|
|
29
|
+
evt.preventDefault();
|
|
30
|
+
evt.stopPropagation();
|
|
31
|
+
return onReset && onReset(evt);
|
|
32
|
+
}, [onReset]);
|
|
33
|
+
const isMooc = theme === 'mooc';
|
|
34
|
+
const clearClassName = search.value ? classnames(style.wrapperClear, isMooc && style.wrapperClearMooc) : style.wrapperNoClear;
|
|
28
35
|
return /*#__PURE__*/React.createElement("form", {
|
|
29
36
|
className: style.form,
|
|
30
37
|
action: action,
|
|
@@ -35,17 +42,20 @@ const SearchForm = (props, context) => {
|
|
|
35
42
|
}, /*#__PURE__*/React.createElement(Search, _extends({}, search, {
|
|
36
43
|
onFocus: onSearchFocus,
|
|
37
44
|
onBlur: onSearchBlur,
|
|
38
|
-
|
|
45
|
+
onKeyDown: onSearchKeyDown,
|
|
46
|
+
inputRef: inputRef,
|
|
47
|
+
dataTestId: dataTestId,
|
|
48
|
+
theme: theme,
|
|
49
|
+
searchIconAriaLabel: searchIconAriaLabel
|
|
39
50
|
})), /*#__PURE__*/React.createElement("div", {
|
|
40
51
|
"data-name": "search-form-reset",
|
|
41
52
|
"aria-label": searchResetAriaLabel,
|
|
42
|
-
|
|
43
|
-
className:
|
|
44
|
-
}, /*#__PURE__*/React.createElement(
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
className: style.clear
|
|
53
|
+
onMouseDown: handleReset,
|
|
54
|
+
className: clearClassName
|
|
55
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
56
|
+
iconName: "xmark",
|
|
57
|
+
className: style.clearIcon,
|
|
58
|
+
"aria-label": searchResetAriaLabel
|
|
49
59
|
})));
|
|
50
60
|
};
|
|
51
61
|
SearchForm.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
@@ -55,9 +65,13 @@ SearchForm.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
55
65
|
onReset: PropTypes.func,
|
|
56
66
|
onSearchFocus: PropTypes.func,
|
|
57
67
|
onSearchBlur: PropTypes.func,
|
|
68
|
+
onSearchKeyDown: PropTypes.func,
|
|
69
|
+
inputRef: PropTypes.func,
|
|
58
70
|
search: PropTypes.shape(Search.propTypes),
|
|
59
71
|
'search-reset-aria-label': PropTypes.string,
|
|
60
|
-
dataTestId: PropTypes.string
|
|
72
|
+
dataTestId: PropTypes.string,
|
|
73
|
+
theme: PropTypes.string,
|
|
74
|
+
searchIconAriaLabel: PropTypes.string
|
|
61
75
|
} : {};
|
|
62
76
|
export default SearchForm;
|
|
63
77
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useMemo","PropTypes","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useMemo","PropTypes","classnames","Search","Icon","style","SearchForm","props","context","action","method","onSubmit","onReset","search","onSearchFocus","onSearchBlur","onSearchKeyDown","inputRef","searchResetAriaLabel","dataTestId","theme","searchIconAriaLabel","handleSubmit","evt","preventDefault","handleReset","stopPropagation","isMooc","clearClassName","value","wrapperClear","wrapperClearMooc","wrapperNoClear","createElement","className","form","placeholder","_extends","onFocus","onBlur","onKeyDown","onMouseDown","iconName","clearIcon","propTypes","process","env","NODE_ENV","string","func","shape"],"sources":["../../../src/molecule/search-form/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport Search from '../../atom/input-search';\nimport Icon from '../../atom/icon';\nimport style from './style.css';\n\nconst SearchForm = (props, context) => {\n const {\n action,\n method,\n onSubmit,\n onReset,\n search,\n onSearchFocus,\n onSearchBlur,\n onSearchKeyDown,\n inputRef,\n 'search-reset-aria-label': searchResetAriaLabel,\n dataTestId,\n theme,\n searchIconAriaLabel\n } = props;\n const handleSubmit = useMemo(\n () => evt => {\n evt.preventDefault();\n return onSubmit && onSubmit(evt);\n },\n [onSubmit]\n );\n\n const handleReset = useMemo(\n () => evt => {\n evt.preventDefault();\n evt.stopPropagation();\n return onReset && onReset(evt);\n },\n [onReset]\n );\n\n const isMooc = theme === 'mooc';\n\n const clearClassName = search.value\n ? classnames(style.wrapperClear, isMooc && style.wrapperClearMooc)\n : style.wrapperNoClear;\n\n return (\n <form\n className={style.form}\n action={action}\n method={method}\n onSubmit={handleSubmit}\n data-name=\"searchForm\"\n aria-label={search.placeholder}\n >\n <Search\n {...search}\n onFocus={onSearchFocus}\n onBlur={onSearchBlur}\n onKeyDown={onSearchKeyDown}\n inputRef={inputRef}\n dataTestId={dataTestId}\n theme={theme}\n searchIconAriaLabel={searchIconAriaLabel}\n />\n <div\n data-name=\"search-form-reset\"\n aria-label={searchResetAriaLabel}\n onMouseDown={handleReset}\n className={clearClassName}\n >\n <Icon iconName=\"xmark\" className={style.clearIcon} aria-label={searchResetAriaLabel} />\n </div>\n </form>\n );\n};\n\nSearchForm.propTypes = {\n action: PropTypes.string,\n method: PropTypes.string,\n onSubmit: PropTypes.func,\n onReset: PropTypes.func,\n onSearchFocus: PropTypes.func,\n onSearchBlur: PropTypes.func,\n onSearchKeyDown: PropTypes.func,\n inputRef: PropTypes.func,\n search: PropTypes.shape(Search.propTypes),\n 'search-reset-aria-label': PropTypes.string,\n dataTestId: PropTypes.string,\n theme: PropTypes.string,\n searchIconAriaLabel: PropTypes.string\n};\n\nexport default SearchForm;\n"],"mappings":";AAAA,OAAOA,KAAK,I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,MAAM;EACvB3B,mBAAmB,EAAEpB,SAAS,CAAC+C;AACjC,CAAC;AAED,eAAe1C,UAAU","ignoreList":[]}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
@value colors: "../../variables/colors.css";
|
|
2
|
+
@value cm_grey_500 from colors;
|
|
3
|
+
|
|
1
4
|
.form {
|
|
2
5
|
display: flex;
|
|
3
6
|
justify-content: flex-start;
|
|
@@ -8,13 +11,12 @@
|
|
|
8
11
|
margin: 0;
|
|
9
12
|
width: 100%;
|
|
10
13
|
height: 100%;
|
|
14
|
+
position: relative;
|
|
11
15
|
}
|
|
12
16
|
|
|
13
17
|
.wrapperClear {
|
|
14
18
|
position: relative;
|
|
15
|
-
|
|
16
|
-
height: 10px;
|
|
17
|
-
right: 12px;
|
|
19
|
+
display: flex;
|
|
18
20
|
cursor: pointer;
|
|
19
21
|
background: transparent;
|
|
20
22
|
}
|
|
@@ -23,11 +25,22 @@
|
|
|
23
25
|
display: none;
|
|
24
26
|
}
|
|
25
27
|
|
|
26
|
-
.
|
|
27
|
-
|
|
28
|
-
width:
|
|
29
|
-
height:
|
|
28
|
+
.clearIcon {
|
|
29
|
+
color: cm_grey_500;
|
|
30
|
+
width: 14px;
|
|
31
|
+
height: 14px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.wrapperClearMooc {
|
|
30
35
|
position: absolute;
|
|
31
|
-
|
|
32
|
-
|
|
36
|
+
right: 16px;
|
|
37
|
+
width: 14px;
|
|
38
|
+
height: 14px;
|
|
39
|
+
top: 50%;
|
|
40
|
+
transform: translateY(-50%);
|
|
41
|
+
cursor: pointer;
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
justify-content: center;
|
|
45
|
+
z-index: 2002;
|
|
33
46
|
}
|
|
@@ -9,8 +9,11 @@ declare namespace BrandTable {
|
|
|
9
9
|
onClear: PropTypes.Requireable<(...args: any[]) => any>;
|
|
10
10
|
onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
11
11
|
onBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
12
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
13
|
+
inputRef: PropTypes.Requireable<(...args: any[]) => any>;
|
|
12
14
|
theme: PropTypes.Requireable<string>;
|
|
13
15
|
dataTestId: PropTypes.Requireable<string>;
|
|
16
|
+
searchIconAriaLabel: PropTypes.Requireable<string>;
|
|
14
17
|
}>>;
|
|
15
18
|
const pagination: PropTypes.Requireable<PropTypes.InferProps<{
|
|
16
19
|
value: PropTypes.Validator<string>;
|
|
@@ -493,8 +493,11 @@ declare const ContentSkillModal: {
|
|
|
493
493
|
onClear: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
494
494
|
onFocus: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
495
495
|
onBlur: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
496
|
+
onKeyDown: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
497
|
+
inputRef: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
496
498
|
theme: import("prop-types").Requireable<string>;
|
|
497
499
|
dataTestId: import("prop-types").Requireable<string>;
|
|
500
|
+
searchIconAriaLabel: import("prop-types").Requireable<string>;
|
|
498
501
|
}>>;
|
|
499
502
|
checkboxWithTitle: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
500
503
|
title: import("prop-types").Requireable<string>;
|
|
@@ -670,8 +673,11 @@ declare const ContentSkillModal: {
|
|
|
670
673
|
onClear: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
671
674
|
onFocus: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
672
675
|
onBlur: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
676
|
+
onKeyDown: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
677
|
+
inputRef: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
673
678
|
theme: import("prop-types").Requireable<string>;
|
|
674
679
|
dataTestId: import("prop-types").Requireable<string>;
|
|
680
|
+
searchIconAriaLabel: import("prop-types").Requireable<string>;
|
|
675
681
|
}>>;
|
|
676
682
|
}>>;
|
|
677
683
|
}> | null | undefined> | null | undefined)[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/content-skill-modal/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAOlD,OAAkB,EAAC,sBAAsB,EAAC,MAAM,SAAS,CAAC;AAE1D,QAAA,MAAM,iBAAiB;YAAW,sBAAsB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/content-skill-modal/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAOlD,OAAkB,EAAC,sBAAsB,EAAC,MAAM,SAAS,CAAC;AAE1D,QAAA,MAAM,iBAAiB;YAAW,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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