@coorpacademy/components 11.4.5-alpha.40 → 11.4.5-alpha.42
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/select/index.d.ts +1 -8
- package/es/atom/select/index.d.ts.map +1 -1
- package/es/atom/select/index.js +59 -40
- package/es/atom/select/index.js.map +1 -1
- package/es/atom/select/style.css +6 -6
- package/es/molecule/brand-form-group/index.d.ts +2 -8
- package/es/molecule/filters/index.d.ts +1 -4
- package/es/molecule/filters/index.d.ts.map +1 -1
- package/es/molecule/setup-slide/index.d.ts +1 -4
- package/es/molecule/setup-slider/index.d.ts +1 -4
- package/es/organism/brand-form/index.d.ts +2 -8
- package/es/organism/wizard-contents/index.d.ts +2 -8
- package/es/template/back-office/brand-update/index.d.ts +4 -16
- package/es/template/common/search-page/index.d.ts +1 -4
- package/lib/atom/select/index.d.ts +1 -8
- package/lib/atom/select/index.d.ts.map +1 -1
- package/lib/atom/select/index.js +58 -40
- package/lib/atom/select/index.js.map +1 -1
- package/lib/atom/select/style.css +6 -6
- package/lib/molecule/brand-form-group/index.d.ts +2 -8
- package/lib/molecule/filters/index.d.ts +1 -4
- package/lib/molecule/filters/index.d.ts.map +1 -1
- package/lib/molecule/setup-slide/index.d.ts +1 -4
- package/lib/molecule/setup-slider/index.d.ts +1 -4
- package/lib/organism/brand-form/index.d.ts +2 -8
- package/lib/organism/wizard-contents/index.d.ts +2 -8
- package/lib/template/back-office/brand-update/index.d.ts +4 -16
- package/lib/template/common/search-page/index.d.ts +1 -4
- package/package.json +2 -2
|
@@ -4,10 +4,6 @@ export namespace SelectOptionPropTypes {
|
|
|
4
4
|
const selected: PropTypes.Requireable<boolean>;
|
|
5
5
|
const validOption: PropTypes.Requireable<boolean>;
|
|
6
6
|
}
|
|
7
|
-
export namespace CreateBattleLabelParameters {
|
|
8
|
-
const htmlFor: PropTypes.Requireable<string>;
|
|
9
|
-
const className: PropTypes.Requireable<string>;
|
|
10
|
-
}
|
|
11
7
|
export default Select;
|
|
12
8
|
import PropTypes from "prop-types";
|
|
13
9
|
declare function Select(props: any, legacyContext: any): JSX.Element;
|
|
@@ -55,10 +51,7 @@ declare namespace Select {
|
|
|
55
51
|
modified: PropTypes.Requireable<boolean>;
|
|
56
52
|
error: PropTypes.Requireable<boolean>;
|
|
57
53
|
'aria-label': PropTypes.Requireable<string>;
|
|
58
|
-
|
|
59
|
-
htmlFor: PropTypes.Requireable<string>;
|
|
60
|
-
className: PropTypes.Requireable<string>;
|
|
61
|
-
}>>;
|
|
54
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
62
55
|
};
|
|
63
56
|
}
|
|
64
57
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/select/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/select/index.js"],"names":[],"mappings":";;;;;;;;AAwDA,qEA8KC"}
|
package/es/atom/select/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
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); }
|
|
2
2
|
|
|
3
|
-
import React, { useMemo } from 'react';
|
|
3
|
+
import React, { useCallback, useMemo, useState } from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import classnames from 'classnames';
|
|
6
6
|
import filter from 'lodash/fp/filter';
|
|
@@ -11,7 +11,7 @@ import includes from 'lodash/fp/includes';
|
|
|
11
11
|
import keys from 'lodash/fp/keys';
|
|
12
12
|
import map from 'lodash/fp/map';
|
|
13
13
|
import size from 'lodash/fp/size';
|
|
14
|
-
import { NovaCompositionNavigationArrowDown as ArrowDown } from '@coorpacademy/nova-icons';
|
|
14
|
+
import { NovaCompositionNavigationArrowDown as ArrowDown, NovaCompositionNavigationArrowTop as ArrowUp } from '@coorpacademy/nova-icons';
|
|
15
15
|
import Provider, { GetSkinFromContext } from '../provider';
|
|
16
16
|
import getClassState from '../../util/get-class-state';
|
|
17
17
|
import style from './style.css';
|
|
@@ -28,6 +28,30 @@ const themeStyle = {
|
|
|
28
28
|
coorpmanager: null
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
+
const ArrowView = ({
|
|
32
|
+
shouldRender,
|
|
33
|
+
isArrowUp,
|
|
34
|
+
ariaLabel,
|
|
35
|
+
arrowClass,
|
|
36
|
+
arrowColor
|
|
37
|
+
}) => {
|
|
38
|
+
const props = useMemo(() => _extends({}, ariaLabel & {
|
|
39
|
+
'aria-label': ariaLabel
|
|
40
|
+
}, arrowColor & {
|
|
41
|
+
color: arrowColor
|
|
42
|
+
}, {
|
|
43
|
+
className: arrowClass
|
|
44
|
+
}), [ariaLabel, arrowClass, arrowColor]);
|
|
45
|
+
|
|
46
|
+
if (shouldRender) {
|
|
47
|
+
return isArrowUp ? /*#__PURE__*/React.createElement(ArrowUp, _extends({}, props, {
|
|
48
|
+
"data-testid": "select-arrow-up-icon"
|
|
49
|
+
})) : /*#__PURE__*/React.createElement(ArrowDown, _extends({}, props, {
|
|
50
|
+
"data-testid": "select-arrow-down-icon"
|
|
51
|
+
}));
|
|
52
|
+
} else return null;
|
|
53
|
+
};
|
|
54
|
+
|
|
31
55
|
const Select = (props, legacyContext) => {
|
|
32
56
|
const {
|
|
33
57
|
name,
|
|
@@ -44,14 +68,13 @@ const Select = (props, legacyContext) => {
|
|
|
44
68
|
error = false,
|
|
45
69
|
title: propTitle,
|
|
46
70
|
'aria-label': ariaLabel,
|
|
47
|
-
|
|
71
|
+
'aria-labelledby': ariaLabelledBy
|
|
48
72
|
} = props;
|
|
49
|
-
const {
|
|
50
|
-
htmlFor: battleLabelHtmlFor,
|
|
51
|
-
className: battleLabelClassName
|
|
52
|
-
} = createBattleLabelParameters;
|
|
53
73
|
const skin = GetSkinFromContext(legacyContext);
|
|
54
74
|
const title = useMemo(() => propTitle ? `${propTitle}${required ? '*' : ''}` : null, [propTitle, required]);
|
|
75
|
+
const [isArrowUp, setIsArrowUp] = useState(false);
|
|
76
|
+
const handleSelectOnFocus = useCallback(() => setIsArrowUp(true), []);
|
|
77
|
+
const handleSelectOnBlur = useCallback(() => setIsArrowUp(false), []);
|
|
55
78
|
const optionList = options && options.map((option, index) => {
|
|
56
79
|
return /*#__PURE__*/React.createElement("option", {
|
|
57
80
|
key: index,
|
|
@@ -59,18 +82,9 @@ const Select = (props, legacyContext) => {
|
|
|
59
82
|
className: style.selectOption
|
|
60
83
|
}, option.name);
|
|
61
84
|
});
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
titleView = /*#__PURE__*/React.createElement("div", {
|
|
66
|
-
className: battleLabelClassName
|
|
67
|
-
}, title, " ");
|
|
68
|
-
} else if (title) {
|
|
69
|
-
titleView = /*#__PURE__*/React.createElement("span", {
|
|
70
|
-
className: style.title
|
|
71
|
-
}, title, " ");
|
|
72
|
-
}
|
|
73
|
-
|
|
85
|
+
const titleView = title ? /*#__PURE__*/React.createElement("span", {
|
|
86
|
+
className: style.title
|
|
87
|
+
}, title, " ") : null;
|
|
74
88
|
const selected = useMemo(() => multiple ? map(get('value'), filter({
|
|
75
89
|
selected: true
|
|
76
90
|
}, options)) : get('value', find({
|
|
@@ -86,53 +100,62 @@ const Select = (props, legacyContext) => {
|
|
|
86
100
|
selected: true
|
|
87
101
|
}, options)), [options, theme]);
|
|
88
102
|
const handleChange = useMemo(() => multiple ? e => {
|
|
103
|
+
setIsArrowUp(false);
|
|
89
104
|
onChange(map(get('value'), e.target.selectedOptions));
|
|
90
105
|
} : e => {
|
|
106
|
+
setIsArrowUp(false);
|
|
91
107
|
onChange(e.target.value);
|
|
92
108
|
}, [onChange, multiple]);
|
|
93
109
|
const black = useMemo(() => getOr('#14171A', 'common.black', skin), [skin]);
|
|
94
110
|
const color = useMemo(() => getOr('#00B0FF', 'common.primary', skin), [skin]);
|
|
95
|
-
const
|
|
111
|
+
const isThemeOneOfQuestionTemplateOrPlayer = useMemo(() => includes(theme, ['question', 'template', 'player']), [theme]);
|
|
112
|
+
const shouldUseSkinFontColor = useMemo(() => !isSelectedInValidOption && selected && isThemeOneOfQuestionTemplateOrPlayer, [isSelectedInValidOption, selected, isThemeOneOfQuestionTemplateOrPlayer]);
|
|
96
113
|
const arrowColor = selected ? color : undefined;
|
|
97
|
-
const arrowView = !multiple ? /*#__PURE__*/React.createElement(ArrowDown, {
|
|
98
|
-
color: includes(theme, ['question', 'template', 'player']) ? arrowColor : black,
|
|
99
|
-
className: shouldUseSkinFontColor ? style.selectedArrow : style.arrow,
|
|
100
|
-
"aria-label": ariaLabel,
|
|
101
|
-
"data-testid": "select-arrow-down-icon"
|
|
102
|
-
}) : null;
|
|
103
114
|
const behaviorClassName = useMemo(() => getClassState(style.default, style.modified, style.error, modified, error), [error, modified]);
|
|
104
115
|
const composedClassName = useMemo(() => classnames(theme && theme !== 'coorpmanager' ? themeStyle[theme] : behaviorClassName, selected ? style.selected : style.unselected, className), [behaviorClassName, className, selected, theme]);
|
|
105
116
|
const labelSize = useMemo(() => size(selectedLabel), [selectedLabel]);
|
|
106
117
|
const isLongLabel = useMemo(() => labelSize >= 65, [labelSize]);
|
|
107
|
-
return /*#__PURE__*/React.createElement("div",
|
|
108
|
-
htmlFor: battleLabelHtmlFor
|
|
109
|
-
} : {}, titleView), /*#__PURE__*/React.createElement("div", {
|
|
118
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
110
119
|
className: classnames(composedClassName, theme === 'coorpmanager' ? style.coorpmanager : null)
|
|
111
|
-
}, /*#__PURE__*/React.createElement("
|
|
120
|
+
}, /*#__PURE__*/React.createElement("label", {
|
|
112
121
|
"data-name": "select-wrapper",
|
|
113
122
|
style: _extends({}, shouldUseSkinFontColor && {
|
|
114
123
|
color
|
|
115
124
|
}),
|
|
116
125
|
className: style.selectWrapper
|
|
117
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
126
|
+
}, titleView, /*#__PURE__*/React.createElement("span", {
|
|
118
127
|
"data-name": "select-span",
|
|
119
128
|
className: classnames(style.selectSpan, includes(theme, ['player', 'invalid', 'question', 'thematiques', 'template']) ? style.noLabelCommon : null, borderClassName, isLongLabel ? style.longLabel : null),
|
|
120
129
|
style: _extends({}, shouldUseSkinFontColor && {
|
|
121
130
|
color
|
|
122
131
|
})
|
|
123
|
-
}, selectedLabel),
|
|
124
|
-
|
|
132
|
+
}, selectedLabel), /*#__PURE__*/React.createElement(ArrowView, {
|
|
133
|
+
shouldRender: !multiple,
|
|
134
|
+
isArrowUp: isArrowUp,
|
|
135
|
+
ariaLabel: ariaLabel,
|
|
136
|
+
arrowClass: shouldUseSkinFontColor ? style.selectedArrow : style.arrow,
|
|
137
|
+
arrowColor: isThemeOneOfQuestionTemplateOrPlayer ? arrowColor : black
|
|
138
|
+
}), /*#__PURE__*/React.createElement("select", _extends({}, ariaLabelledBy ? {
|
|
139
|
+
'aria-labelledby': ariaLabelledBy
|
|
125
140
|
} : {}, {
|
|
126
141
|
"data-name": "native-select",
|
|
127
142
|
className: style.selectBox,
|
|
143
|
+
title: selectedLabel,
|
|
128
144
|
name: name,
|
|
129
145
|
onChange: handleChange,
|
|
130
146
|
value: selected,
|
|
131
147
|
multiple: multiple,
|
|
132
|
-
disabled: disabled
|
|
148
|
+
disabled: disabled,
|
|
149
|
+
onClick: handleSelectOnFocus,
|
|
150
|
+
onBlur: handleSelectOnBlur // onBlur does not handle completely an out of bounds click
|
|
151
|
+
// ex: select is Opened and a click is done outside, cancelling the select
|
|
152
|
+
// that doesn't count as a Blur, so an onMouseLeave is needed
|
|
153
|
+
,
|
|
154
|
+
onMouseLeave: handleSelectOnBlur,
|
|
155
|
+
"data-testid": "native-select"
|
|
133
156
|
}), optionList)), /*#__PURE__*/React.createElement("div", {
|
|
134
157
|
className: style.description
|
|
135
|
-
}, description))
|
|
158
|
+
}, description));
|
|
136
159
|
};
|
|
137
160
|
|
|
138
161
|
export const SelectOptionPropTypes = {
|
|
@@ -141,10 +164,6 @@ export const SelectOptionPropTypes = {
|
|
|
141
164
|
selected: PropTypes.bool,
|
|
142
165
|
validOption: PropTypes.bool
|
|
143
166
|
};
|
|
144
|
-
export const CreateBattleLabelParameters = {
|
|
145
|
-
htmlFor: PropTypes.string,
|
|
146
|
-
className: PropTypes.string
|
|
147
|
-
};
|
|
148
167
|
Select.contextTypes = {
|
|
149
168
|
skin: Provider.childContextTypes.skin
|
|
150
169
|
};
|
|
@@ -163,7 +182,7 @@ Select.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
163
182
|
modified: PropTypes.bool,
|
|
164
183
|
error: PropTypes.bool,
|
|
165
184
|
'aria-label': PropTypes.string,
|
|
166
|
-
|
|
185
|
+
'aria-labelledby': PropTypes.string
|
|
167
186
|
} : {};
|
|
168
187
|
export default Select;
|
|
169
188
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useMemo","PropTypes","classnames","filter","find","get","getOr","includes","keys","map","size","NovaCompositionNavigationArrowDown","ArrowDown","Provider","GetSkinFromContext","getClassState","style","themeStyle","invalid","header","mooc","question","sort","thematiques","player","template","coorpmanager","Select","props","legacyContext","name","options","className","borderClassName","onChange","multiple","disabled","required","description","theme","modified","error","title","propTitle","ariaLabel","createBattleLabelParameters","htmlFor","battleLabelHtmlFor","battleLabelClassName","skin","optionList","option","index","value","selectOption","titleView","selected","selectedLabel","isSelectedInValidOption","validOption","handleChange","e","target","selectedOptions","black","color","shouldUseSkinFontColor","arrowColor","undefined","arrowView","selectedArrow","arrow","behaviorClassName","default","composedClassName","unselected","labelSize","isLongLabel","selectWrapper","selectSpan","noLabelCommon","longLabel","id","selectBox","SelectOptionPropTypes","string","isRequired","oneOfType","number","bool","CreateBattleLabelParameters","contextTypes","childContextTypes","propTypes","func","oneOf","arrayOf","shape"],"sources":["../../../src/atom/select/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport filter from 'lodash/fp/filter';\nimport find from 'lodash/fp/find';\nimport get from 'lodash/fp/get';\nimport getOr from 'lodash/fp/getOr';\nimport includes from 'lodash/fp/includes';\nimport keys from 'lodash/fp/keys';\nimport map from 'lodash/fp/map';\nimport size from 'lodash/fp/size';\nimport {NovaCompositionNavigationArrowDown as ArrowDown} from '@coorpacademy/nova-icons';\nimport Provider, {GetSkinFromContext} from '../provider';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst themeStyle = {\n filter: style.filter,\n invalid: style.invalid,\n header: style.header,\n mooc: style.mooc,\n question: style.question,\n sort: style.sort,\n thematiques: style.thematiques,\n player: style.player,\n template: style.template,\n coorpmanager: null\n};\n\nconst Select = (props, legacyContext) => {\n const {\n name,\n options = [],\n className,\n borderClassName,\n onChange,\n multiple = false,\n disabled,\n required,\n description,\n theme,\n modified = false,\n error = false,\n title: propTitle,\n 'aria-label': ariaLabel,\n createBattleLabelParameters\n } = props;\n\n const {htmlFor: battleLabelHtmlFor, className: battleLabelClassName} =\n createBattleLabelParameters;\n const skin = GetSkinFromContext(legacyContext);\n const title = useMemo(\n () => (propTitle ? `${propTitle}${required ? '*' : ''}` : null),\n [propTitle, required]\n );\n\n const optionList =\n options &&\n options.map((option, index) => {\n return (\n <option key={index} value={option.value} className={style.selectOption}>\n {option.name}\n </option>\n );\n });\n\n let titleView = null;\n if (battleLabelClassName && title) {\n titleView = <div className={battleLabelClassName}>{title} </div>;\n } else if (title) {\n titleView = <span className={style.title}>{title} </span>;\n }\n\n const selected = useMemo(\n () =>\n multiple\n ? map(get('value'), filter({selected: true}, options))\n : get('value', find({selected: true}, options)),\n [multiple, options]\n );\n const selectedLabel = useMemo(\n () =>\n multiple\n ? map(get('name'), filter({selected: true}, options))\n : get('name', find({selected: true}, options)),\n [multiple, options]\n );\n\n const isSelectedInValidOption = useMemo(\n () =>\n theme === 'player' &&\n getOr(false, 'name', find({validOption: false, selected: true}, options)),\n [options, theme]\n );\n\n const handleChange = useMemo(\n () =>\n multiple\n ? e => {\n onChange(map(get('value'), e.target.selectedOptions));\n }\n : e => {\n onChange(e.target.value);\n },\n [onChange, multiple]\n );\n\n const black = useMemo(() => getOr('#14171A', 'common.black', skin), [skin]);\n const color = useMemo(() => getOr('#00B0FF', 'common.primary', skin), [skin]);\n const shouldUseSkinFontColor = useMemo(\n () =>\n !isSelectedInValidOption && selected && includes(theme, ['question', 'template', 'player']),\n [isSelectedInValidOption, selected, theme]\n );\n const arrowColor = selected ? color : undefined;\n\n const arrowView = !multiple ? (\n <ArrowDown\n color={includes(theme, ['question', 'template', 'player']) ? arrowColor : black}\n className={shouldUseSkinFontColor ? style.selectedArrow : style.arrow}\n aria-label={ariaLabel}\n data-testid=\"select-arrow-down-icon\"\n />\n ) : null;\n const behaviorClassName = useMemo(\n () => getClassState(style.default, style.modified, style.error, modified, error),\n [error, modified]\n );\n const composedClassName = useMemo(\n () =>\n classnames(\n theme && theme !== 'coorpmanager' ? themeStyle[theme] : behaviorClassName,\n selected ? style.selected : style.unselected,\n className\n ),\n [behaviorClassName, className, selected, theme]\n );\n\n const labelSize = useMemo(() => size(selectedLabel), [selectedLabel]);\n\n const isLongLabel = useMemo(() => labelSize >= 65, [labelSize]);\n\n return (\n <div>\n <label {...(battleLabelHtmlFor ? {htmlFor: battleLabelHtmlFor} : {})}>{titleView}</label>\n <div\n className={classnames(\n composedClassName,\n theme === 'coorpmanager' ? style.coorpmanager : null\n )}\n >\n <div\n data-name=\"select-wrapper\"\n style={{\n ...(shouldUseSkinFontColor && {\n color\n })\n }}\n className={style.selectWrapper}\n >\n <span\n data-name=\"select-span\"\n className={classnames(\n style.selectSpan,\n includes(theme, ['player', 'invalid', 'question', 'thematiques', 'template'])\n ? style.noLabelCommon\n : null,\n borderClassName,\n isLongLabel ? style.longLabel : null\n )}\n style={{\n ...(shouldUseSkinFontColor && {\n color\n })\n }}\n >\n {selectedLabel}\n </span>\n {arrowView}\n <select\n {...(battleLabelHtmlFor ? {id: battleLabelHtmlFor} : {})}\n data-name=\"native-select\"\n className={style.selectBox}\n name={name}\n onChange={handleChange}\n value={selected}\n multiple={multiple}\n disabled={disabled}\n >\n {optionList}\n </select>\n </div>\n <div className={style.description}>{description}</div>\n </div>\n </div>\n );\n};\n\nexport const SelectOptionPropTypes = {\n name: PropTypes.string.isRequired,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n selected: PropTypes.bool,\n validOption: PropTypes.bool\n};\n\nexport const CreateBattleLabelParameters = {\n htmlFor: PropTypes.string,\n className: PropTypes.string\n};\n\nSelect.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nSelect.propTypes = {\n title: PropTypes.string,\n name: PropTypes.string,\n className: PropTypes.string,\n borderClassName: PropTypes.string,\n disabled: PropTypes.bool,\n multiple: PropTypes.bool,\n description: PropTypes.string,\n required: PropTypes.bool,\n onChange: PropTypes.func,\n theme: PropTypes.oneOf(keys(themeStyle)),\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes)),\n modified: PropTypes.bool,\n error: PropTypes.bool,\n 'aria-label': PropTypes.string,\n createBattleLabelParameters: PropTypes.shape(CreateBattleLabelParameters)\n};\n\nexport default Select;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,OAAf,QAA6B,OAA7B;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,MAAP,MAAmB,kBAAnB;AACA,OAAOC,IAAP,MAAiB,gBAAjB;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,KAAP,MAAkB,iBAAlB;AACA,OAAOC,QAAP,MAAqB,oBAArB;AACA,OAAOC,IAAP,MAAiB,gBAAjB;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA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,IAHe;EAInC9B,WAAW,EAAE1D,SAAS,CAACwF;AAJY,CAA9B;AAOP,OAAO,MAAMC,2BAA2B,GAAG;EACzC5C,OAAO,EAAE7C,SAAS,CAACoF,MADsB;EAEzCrD,SAAS,EAAE/B,SAAS,CAACoF;AAFoB,CAApC;AAKP1D,MAAM,CAACgE,YAAP,GAAsB;EACpB1C,IAAI,EAAEpC,QAAQ,CAAC+E,iBAAT,CAA2B3C;AADb,CAAtB;AAIAtB,MAAM,CAACkE,SAAP,2CAAmB;EACjBnD,KAAK,EAAEzC,SAAS,CAACoF,MADA;EAEjBvD,IAAI,EAAE7B,SAAS,CAACoF,MAFC;EAGjBrD,SAAS,EAAE/B,SAAS,CAACoF,MAHJ;EAIjBpD,eAAe,EAAEhC,SAAS,CAACoF,MAJV;EAKjBjD,QAAQ,EAAEnC,SAAS,CAACwF,IALH;EAMjBtD,QAAQ,EAAElC,SAAS,CAACwF,IANH;EAOjBnD,WAAW,EAAErC,SAAS,CAACoF,MAPN;EAQjBhD,QAAQ,EAAEpC,SAAS,CAACwF,IARH;EASjBvD,QAAQ,EAAEjC,SAAS,CAAC6F,IATH;EAUjBvD,KAAK,EAAEtC,SAAS,CAAC8F,KAAV,CAAgBvF,IAAI,CAACS,UAAD,CAApB,CAVU;EAWjBc,OAAO,EAAE9B,SAAS,CAAC+F,OAAV,CAAkB/F,SAAS,CAACgG,KAAV,CAAgBb,qBAAhB,CAAlB,CAXQ;EAYjB5C,QAAQ,EAAEvC,SAAS,CAACwF,IAZH;EAajBhD,KAAK,EAAExC,SAAS,CAACwF,IAbA;EAcjB,cAAcxF,SAAS,CAACoF,MAdP;EAejBxC,2BAA2B,EAAE5C,SAAS,CAACgG,KAAV,CAAgBP,2BAAhB;AAfZ,CAAnB;AAkBA,eAAe/D,MAAf"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useCallback","useMemo","useState","PropTypes","classnames","filter","find","get","getOr","includes","keys","map","size","NovaCompositionNavigationArrowDown","ArrowDown","NovaCompositionNavigationArrowTop","ArrowUp","Provider","GetSkinFromContext","getClassState","style","themeStyle","invalid","header","mooc","question","sort","thematiques","player","template","coorpmanager","ArrowView","shouldRender","isArrowUp","ariaLabel","arrowClass","arrowColor","props","color","className","Select","legacyContext","name","options","borderClassName","onChange","multiple","disabled","required","description","theme","modified","error","title","propTitle","ariaLabelledBy","skin","setIsArrowUp","handleSelectOnFocus","handleSelectOnBlur","optionList","option","index","value","selectOption","titleView","selected","selectedLabel","isSelectedInValidOption","validOption","handleChange","e","target","selectedOptions","black","isThemeOneOfQuestionTemplateOrPlayer","shouldUseSkinFontColor","undefined","behaviorClassName","default","composedClassName","unselected","labelSize","isLongLabel","selectWrapper","selectSpan","noLabelCommon","longLabel","selectedArrow","arrow","selectBox","SelectOptionPropTypes","string","isRequired","oneOfType","number","bool","contextTypes","childContextTypes","propTypes","func","oneOf","arrayOf","shape"],"sources":["../../../src/atom/select/index.js"],"sourcesContent":["import React, {useCallback, useMemo, useState} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport filter from 'lodash/fp/filter';\nimport find from 'lodash/fp/find';\nimport get from 'lodash/fp/get';\nimport getOr from 'lodash/fp/getOr';\nimport includes from 'lodash/fp/includes';\nimport keys from 'lodash/fp/keys';\nimport map from 'lodash/fp/map';\nimport size from 'lodash/fp/size';\nimport {\n NovaCompositionNavigationArrowDown as ArrowDown,\n NovaCompositionNavigationArrowTop as ArrowUp\n} from '@coorpacademy/nova-icons';\nimport Provider, {GetSkinFromContext} from '../provider';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst themeStyle = {\n filter: style.filter,\n invalid: style.invalid,\n header: style.header,\n mooc: style.mooc,\n question: style.question,\n sort: style.sort,\n thematiques: style.thematiques,\n player: style.player,\n template: style.template,\n coorpmanager: null\n};\n\nconst ArrowView = ({shouldRender, isArrowUp, ariaLabel, arrowClass, arrowColor}) => {\n const props = useMemo(\n () => ({\n ...(ariaLabel &\n {\n 'aria-label': ariaLabel\n }),\n ...(arrowColor &\n {\n color: arrowColor\n }),\n className: arrowClass\n }),\n [ariaLabel, arrowClass, arrowColor]\n );\n if (shouldRender) {\n return isArrowUp ? (\n <ArrowUp {...props} data-testid=\"select-arrow-up-icon\" />\n ) : (\n <ArrowDown {...props} data-testid=\"select-arrow-down-icon\" />\n );\n } else return null;\n};\n\nconst Select = (props, legacyContext) => {\n const {\n name,\n options = [],\n className,\n borderClassName,\n onChange,\n multiple = false,\n disabled,\n required,\n description,\n theme,\n modified = false,\n error = false,\n title: propTitle,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy\n } = props;\n\n const skin = GetSkinFromContext(legacyContext);\n const title = useMemo(\n () => (propTitle ? `${propTitle}${required ? '*' : ''}` : null),\n [propTitle, required]\n );\n\n const [isArrowUp, setIsArrowUp] = useState(false);\n\n const handleSelectOnFocus = useCallback(() => setIsArrowUp(true), []);\n const handleSelectOnBlur = useCallback(() => setIsArrowUp(false), []);\n\n const optionList =\n options &&\n options.map((option, index) => {\n return (\n <option key={index} value={option.value} className={style.selectOption}>\n {option.name}\n </option>\n );\n });\n\n const titleView = title ? <span className={style.title}>{title} </span> : null;\n\n const selected = useMemo(\n () =>\n multiple\n ? map(get('value'), filter({selected: true}, options))\n : get('value', find({selected: true}, options)),\n [multiple, options]\n );\n const selectedLabel = useMemo(\n () =>\n multiple\n ? map(get('name'), filter({selected: true}, options))\n : get('name', find({selected: true}, options)),\n [multiple, options]\n );\n\n const isSelectedInValidOption = useMemo(\n () =>\n theme === 'player' &&\n getOr(false, 'name', find({validOption: false, selected: true}, options)),\n [options, theme]\n );\n\n const handleChange = useMemo(\n () =>\n multiple\n ? e => {\n setIsArrowUp(false);\n onChange(map(get('value'), e.target.selectedOptions));\n }\n : e => {\n setIsArrowUp(false);\n onChange(e.target.value);\n },\n [onChange, multiple]\n );\n\n const black = useMemo(() => getOr('#14171A', 'common.black', skin), [skin]);\n const color = useMemo(() => getOr('#00B0FF', 'common.primary', skin), [skin]);\n const isThemeOneOfQuestionTemplateOrPlayer = useMemo(\n () => includes(theme, ['question', 'template', 'player']),\n [theme]\n );\n const shouldUseSkinFontColor = useMemo(\n () => !isSelectedInValidOption && selected && isThemeOneOfQuestionTemplateOrPlayer,\n [isSelectedInValidOption, selected, isThemeOneOfQuestionTemplateOrPlayer]\n );\n const arrowColor = selected ? color : undefined;\n\n const behaviorClassName = useMemo(\n () => getClassState(style.default, style.modified, style.error, modified, error),\n [error, modified]\n );\n const composedClassName = useMemo(\n () =>\n classnames(\n theme && theme !== 'coorpmanager' ? themeStyle[theme] : behaviorClassName,\n selected ? style.selected : style.unselected,\n className\n ),\n [behaviorClassName, className, selected, theme]\n );\n\n const labelSize = useMemo(() => size(selectedLabel), [selectedLabel]);\n\n const isLongLabel = useMemo(() => labelSize >= 65, [labelSize]);\n\n return (\n <div\n className={classnames(\n composedClassName,\n theme === 'coorpmanager' ? style.coorpmanager : null\n )}\n >\n <label\n data-name=\"select-wrapper\"\n style={{\n ...(shouldUseSkinFontColor && {\n color\n })\n }}\n className={style.selectWrapper}\n >\n {titleView}\n <span\n data-name=\"select-span\"\n className={classnames(\n style.selectSpan,\n includes(theme, ['player', 'invalid', 'question', 'thematiques', 'template'])\n ? style.noLabelCommon\n : null,\n borderClassName,\n isLongLabel ? style.longLabel : null\n )}\n style={{\n ...(shouldUseSkinFontColor && {\n color\n })\n }}\n >\n {selectedLabel}\n </span>\n <ArrowView\n shouldRender={!multiple}\n isArrowUp={isArrowUp}\n ariaLabel={ariaLabel}\n arrowClass={shouldUseSkinFontColor ? style.selectedArrow : style.arrow}\n arrowColor={isThemeOneOfQuestionTemplateOrPlayer ? arrowColor : black}\n />\n <select\n {...(ariaLabelledBy ? {'aria-labelledby': ariaLabelledBy} : {})}\n data-name=\"native-select\"\n className={style.selectBox}\n title={selectedLabel}\n name={name}\n onChange={handleChange}\n value={selected}\n multiple={multiple}\n disabled={disabled}\n onClick={handleSelectOnFocus}\n onBlur={handleSelectOnBlur}\n // onBlur does not handle completely an out of bounds click\n // ex: select is Opened and a click is done outside, cancelling the select\n // that doesn't count as a Blur, so an onMouseLeave is needed\n onMouseLeave={handleSelectOnBlur}\n data-testid=\"native-select\"\n >\n {optionList}\n </select>\n </label>\n <div className={style.description}>{description}</div>\n </div>\n );\n};\n\nexport const SelectOptionPropTypes = {\n name: PropTypes.string.isRequired,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n selected: PropTypes.bool,\n validOption: PropTypes.bool\n};\n\nSelect.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nSelect.propTypes = {\n title: PropTypes.string,\n name: PropTypes.string,\n className: PropTypes.string,\n borderClassName: PropTypes.string,\n disabled: PropTypes.bool,\n multiple: PropTypes.bool,\n description: PropTypes.string,\n required: PropTypes.bool,\n onChange: PropTypes.func,\n theme: PropTypes.oneOf(keys(themeStyle)),\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes)),\n modified: PropTypes.bool,\n error: PropTypes.bool,\n 'aria-label': PropTypes.string,\n 'aria-labelledby': PropTypes.string\n};\n\nexport default Select;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,WAAf,EAA4BC,OAA5B,EAAqCC,QAArC,QAAoD,OAApD;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,MAAP,MAAmB,kBAAnB;AACA,OAAOC,IAAP,MAAiB,gBAAjB;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,KAAP,MAAkB,iBAAlB;AACA,OAAOC,QAAP,MAAqB,oBAArB;AACA,OAAOC,IAAP,MAAiB,gBAAjB;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,IAAP,MAAiB,gBAAjB;AACA,SACEC,kCAAkC,IAAIC,SADxC,EAEEC,iCAAiC,IAAIC,OAFvC,QAGO,0BAHP;AAIA,OAAOC,QAAP,IAAkBC,kBAAlB,QAA2C,aAA3C;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ACW,UAAD,CAApB,CAVU;EAWjBsB,OAAO,EAAExC,SAAS,CAACmG,OAAV,CAAkBnG,SAAS,CAACoG,KAAV,CAAgBZ,qBAAhB,CAAlB,CAXQ;EAYjBxC,QAAQ,EAAEhD,SAAS,CAAC6F,IAZH;EAajB5C,KAAK,EAAEjD,SAAS,CAAC6F,IAbA;EAcjB,cAAc7F,SAAS,CAACyF,MAdP;EAejB,mBAAmBzF,SAAS,CAACyF;AAfZ,CAAnB;AAkBA,eAAepD,MAAf"}
|
package/es/atom/select/style.css
CHANGED
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
composes: default;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
div.coorpmanager
|
|
27
|
+
div.coorpmanager label.selectWrapper {
|
|
28
28
|
max-width: fit-content;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
.coorpmanager
|
|
31
|
+
.coorpmanager label.selectWrapper select.selectBox {
|
|
32
32
|
padding-left: 10px;
|
|
33
33
|
position: relative;
|
|
34
34
|
border-radius: 2px;
|
|
@@ -38,13 +38,13 @@ div.coorpmanager div.selectWrapper {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
@media tablet {
|
|
41
|
-
.coorpmanager
|
|
41
|
+
.coorpmanager label.selectWrapper .description {
|
|
42
42
|
max-width: 120px;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
@media mobile {
|
|
47
|
-
.coorpmanager
|
|
47
|
+
.coorpmanager label.selectWrapper select.selectBox {
|
|
48
48
|
width: 100%;
|
|
49
49
|
min-width: 180px;
|
|
50
50
|
}
|
|
@@ -272,7 +272,7 @@ div.coorpmanager div.selectWrapper {
|
|
|
272
272
|
box-sizing: border-box;
|
|
273
273
|
}
|
|
274
274
|
|
|
275
|
-
div.default
|
|
275
|
+
div.default label.selectWrapper span.longLabel {
|
|
276
276
|
min-width: 230px;
|
|
277
277
|
max-width: 280px;
|
|
278
278
|
white-space: pre-wrap;
|
|
@@ -529,7 +529,7 @@ div.player:hover span.selectSpan {
|
|
|
529
529
|
|
|
530
530
|
/* mozilla specific styling */
|
|
531
531
|
@supports (-moz-appearance:none) {
|
|
532
|
-
.player
|
|
532
|
+
.player label.selectWrapper select.selectBox {
|
|
533
533
|
width: 100%;
|
|
534
534
|
}
|
|
535
535
|
}
|
|
@@ -99,10 +99,7 @@ declare namespace BrandFormGroup {
|
|
|
99
99
|
modified: PropTypes.Requireable<boolean>;
|
|
100
100
|
error: PropTypes.Requireable<boolean>;
|
|
101
101
|
'aria-label': PropTypes.Requireable<string>;
|
|
102
|
-
|
|
103
|
-
htmlFor: PropTypes.Requireable<string>;
|
|
104
|
-
className: PropTypes.Requireable<string>;
|
|
105
|
-
}>>;
|
|
102
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
106
103
|
}> | PropTypes.InferProps<{
|
|
107
104
|
type: PropTypes.Requireable<string>;
|
|
108
105
|
title: PropTypes.Validator<string>;
|
|
@@ -207,10 +204,7 @@ declare namespace BrandFormGroup {
|
|
|
207
204
|
modified: PropTypes.Requireable<boolean>;
|
|
208
205
|
error: PropTypes.Requireable<boolean>;
|
|
209
206
|
'aria-label': PropTypes.Requireable<string>;
|
|
210
|
-
|
|
211
|
-
htmlFor: PropTypes.Requireable<string>;
|
|
212
|
-
className: PropTypes.Requireable<string>;
|
|
213
|
-
}>>;
|
|
207
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
214
208
|
}> | PropTypes.InferProps<{
|
|
215
209
|
type: PropTypes.Requireable<string>;
|
|
216
210
|
title: PropTypes.Validator<string>;
|
|
@@ -31,10 +31,7 @@ declare class Filters extends React.Component<any, any, any> {
|
|
|
31
31
|
modified: PropTypes.Requireable<boolean>;
|
|
32
32
|
error: PropTypes.Requireable<boolean>;
|
|
33
33
|
'aria-label': PropTypes.Requireable<string>;
|
|
34
|
-
|
|
35
|
-
htmlFor: PropTypes.Requireable<string>;
|
|
36
|
-
className: PropTypes.Requireable<string>;
|
|
37
|
-
}>>;
|
|
34
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
38
35
|
}>>;
|
|
39
36
|
onSearch: PropTypes.Requireable<(...args: any[]) => any>;
|
|
40
37
|
onToggleFilters: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/filters/index.js"],"names":[],"mappings":";AASA;IACE
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/filters/index.js"],"names":[],"mappings":";AASA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAcE;IAEF;;;;;;;;;;;;;;;;;;;;;;MAEE;IAEF,wBASC;IAPC;;;MAGC;IAMH,yBAcC;IAED,uBAYC;IAED,qBAOC;IAED,sBAsFC;CACF"}
|
|
@@ -57,10 +57,7 @@ declare namespace SetupSlide {
|
|
|
57
57
|
modified: PropTypes.Requireable<boolean>;
|
|
58
58
|
error: PropTypes.Requireable<boolean>;
|
|
59
59
|
'aria-label': PropTypes.Requireable<string>;
|
|
60
|
-
|
|
61
|
-
htmlFor: PropTypes.Requireable<string>;
|
|
62
|
-
className: PropTypes.Requireable<string>;
|
|
63
|
-
}>>;
|
|
60
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
64
61
|
}> | PropTypes.InferProps<{
|
|
65
62
|
type: PropTypes.Requireable<string>;
|
|
66
63
|
title: PropTypes.Validator<string>;
|
|
@@ -70,10 +70,7 @@ declare namespace SetupSlider {
|
|
|
70
70
|
modified: PropTypes.Requireable<boolean>;
|
|
71
71
|
error: PropTypes.Requireable<boolean>;
|
|
72
72
|
'aria-label': PropTypes.Requireable<string>;
|
|
73
|
-
|
|
74
|
-
htmlFor: PropTypes.Requireable<string>;
|
|
75
|
-
className: PropTypes.Requireable<string>;
|
|
76
|
-
}>>;
|
|
73
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
77
74
|
}> | PropTypes.InferProps<{
|
|
78
75
|
type: PropTypes.Requireable<string>;
|
|
79
76
|
title: PropTypes.Validator<string>;
|
|
@@ -129,10 +129,7 @@ declare namespace BrandForm {
|
|
|
129
129
|
modified: PropTypes.Requireable<boolean>;
|
|
130
130
|
error: PropTypes.Requireable<boolean>;
|
|
131
131
|
'aria-label': PropTypes.Requireable<string>;
|
|
132
|
-
|
|
133
|
-
htmlFor: PropTypes.Requireable<string>;
|
|
134
|
-
className: PropTypes.Requireable<string>;
|
|
135
|
-
}>>;
|
|
132
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
136
133
|
}> | PropTypes.InferProps<{
|
|
137
134
|
type: PropTypes.Requireable<string>;
|
|
138
135
|
title: PropTypes.Validator<string>;
|
|
@@ -237,10 +234,7 @@ declare namespace BrandForm {
|
|
|
237
234
|
modified: PropTypes.Requireable<boolean>;
|
|
238
235
|
error: PropTypes.Requireable<boolean>;
|
|
239
236
|
'aria-label': PropTypes.Requireable<string>;
|
|
240
|
-
|
|
241
|
-
htmlFor: PropTypes.Requireable<string>;
|
|
242
|
-
className: PropTypes.Requireable<string>;
|
|
243
|
-
}>>;
|
|
237
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
244
238
|
}> | PropTypes.InferProps<{
|
|
245
239
|
type: PropTypes.Requireable<string>;
|
|
246
240
|
title: PropTypes.Validator<string>;
|
|
@@ -146,10 +146,7 @@ declare namespace WizardContents {
|
|
|
146
146
|
modified: PropTypes.Requireable<boolean>;
|
|
147
147
|
error: PropTypes.Requireable<boolean>;
|
|
148
148
|
'aria-label': PropTypes.Requireable<string>;
|
|
149
|
-
|
|
150
|
-
htmlFor: PropTypes.Requireable<string>;
|
|
151
|
-
className: PropTypes.Requireable<string>;
|
|
152
|
-
}>>;
|
|
149
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
153
150
|
}> | PropTypes.InferProps<{
|
|
154
151
|
type: PropTypes.Requireable<string>;
|
|
155
152
|
title: PropTypes.Validator<string>;
|
|
@@ -254,10 +251,7 @@ declare namespace WizardContents {
|
|
|
254
251
|
modified: PropTypes.Requireable<boolean>;
|
|
255
252
|
error: PropTypes.Requireable<boolean>;
|
|
256
253
|
'aria-label': PropTypes.Requireable<string>;
|
|
257
|
-
|
|
258
|
-
htmlFor: PropTypes.Requireable<string>;
|
|
259
|
-
className: PropTypes.Requireable<string>;
|
|
260
|
-
}>>;
|
|
254
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
261
255
|
}> | PropTypes.InferProps<{
|
|
262
256
|
type: PropTypes.Requireable<string>;
|
|
263
257
|
title: PropTypes.Validator<string>;
|
|
@@ -231,10 +231,7 @@ declare namespace BrandUpdate {
|
|
|
231
231
|
modified: PropTypes.Requireable<boolean>;
|
|
232
232
|
error: PropTypes.Requireable<boolean>;
|
|
233
233
|
'aria-label': PropTypes.Requireable<string>;
|
|
234
|
-
|
|
235
|
-
htmlFor: PropTypes.Requireable<string>;
|
|
236
|
-
className: PropTypes.Requireable<string>;
|
|
237
|
-
}>>;
|
|
234
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
238
235
|
}> | PropTypes.InferProps<{
|
|
239
236
|
type: PropTypes.Requireable<string>;
|
|
240
237
|
title: PropTypes.Validator<string>;
|
|
@@ -339,10 +336,7 @@ declare namespace BrandUpdate {
|
|
|
339
336
|
modified: PropTypes.Requireable<boolean>;
|
|
340
337
|
error: PropTypes.Requireable<boolean>;
|
|
341
338
|
'aria-label': PropTypes.Requireable<string>;
|
|
342
|
-
|
|
343
|
-
htmlFor: PropTypes.Requireable<string>;
|
|
344
|
-
className: PropTypes.Requireable<string>;
|
|
345
|
-
}>>;
|
|
339
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
346
340
|
}> | PropTypes.InferProps<{
|
|
347
341
|
type: PropTypes.Requireable<string>;
|
|
348
342
|
title: PropTypes.Validator<string>;
|
|
@@ -862,10 +856,7 @@ declare namespace BrandUpdate {
|
|
|
862
856
|
modified: PropTypes.Requireable<boolean>;
|
|
863
857
|
error: PropTypes.Requireable<boolean>;
|
|
864
858
|
'aria-label': PropTypes.Requireable<string>;
|
|
865
|
-
|
|
866
|
-
htmlFor: PropTypes.Requireable<string>;
|
|
867
|
-
className: PropTypes.Requireable<string>;
|
|
868
|
-
}>>;
|
|
859
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
869
860
|
}> | PropTypes.InferProps<{
|
|
870
861
|
type: PropTypes.Requireable<string>;
|
|
871
862
|
title: PropTypes.Validator<string>;
|
|
@@ -970,10 +961,7 @@ declare namespace BrandUpdate {
|
|
|
970
961
|
modified: PropTypes.Requireable<boolean>;
|
|
971
962
|
error: PropTypes.Requireable<boolean>;
|
|
972
963
|
'aria-label': PropTypes.Requireable<string>;
|
|
973
|
-
|
|
974
|
-
htmlFor: PropTypes.Requireable<string>;
|
|
975
|
-
className: PropTypes.Requireable<string>;
|
|
976
|
-
}>>;
|
|
964
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
977
965
|
}> | PropTypes.InferProps<{
|
|
978
966
|
type: PropTypes.Requireable<string>;
|
|
979
967
|
title: PropTypes.Validator<string>;
|
|
@@ -58,10 +58,7 @@ declare namespace SearchPage {
|
|
|
58
58
|
modified: PropTypes.Requireable<boolean>;
|
|
59
59
|
error: PropTypes.Requireable<boolean>;
|
|
60
60
|
'aria-label': PropTypes.Requireable<string>;
|
|
61
|
-
|
|
62
|
-
htmlFor: PropTypes.Requireable<string>;
|
|
63
|
-
className: PropTypes.Requireable<string>;
|
|
64
|
-
}>>;
|
|
61
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
65
62
|
}>>;
|
|
66
63
|
onSearch: PropTypes.Requireable<(...args: any[]) => any>;
|
|
67
64
|
onToggleFilters: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -4,10 +4,6 @@ export namespace SelectOptionPropTypes {
|
|
|
4
4
|
const selected: PropTypes.Requireable<boolean>;
|
|
5
5
|
const validOption: PropTypes.Requireable<boolean>;
|
|
6
6
|
}
|
|
7
|
-
export namespace CreateBattleLabelParameters {
|
|
8
|
-
const htmlFor: PropTypes.Requireable<string>;
|
|
9
|
-
const className: PropTypes.Requireable<string>;
|
|
10
|
-
}
|
|
11
7
|
export default Select;
|
|
12
8
|
import PropTypes from "prop-types";
|
|
13
9
|
declare function Select(props: any, legacyContext: any): JSX.Element;
|
|
@@ -55,10 +51,7 @@ declare namespace Select {
|
|
|
55
51
|
modified: PropTypes.Requireable<boolean>;
|
|
56
52
|
error: PropTypes.Requireable<boolean>;
|
|
57
53
|
'aria-label': PropTypes.Requireable<string>;
|
|
58
|
-
|
|
59
|
-
htmlFor: PropTypes.Requireable<string>;
|
|
60
|
-
className: PropTypes.Requireable<string>;
|
|
61
|
-
}>>;
|
|
54
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
62
55
|
};
|
|
63
56
|
}
|
|
64
57
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/select/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/select/index.js"],"names":[],"mappings":";;;;;;;;AAwDA,qEA8KC"}
|
package/lib/atom/select/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.default = exports.SelectOptionPropTypes =
|
|
4
|
+
exports.default = exports.SelectOptionPropTypes = void 0;
|
|
5
5
|
|
|
6
6
|
var _react = _interopRequireWildcard(require("react"));
|
|
7
7
|
|
|
@@ -54,6 +54,30 @@ const themeStyle = {
|
|
|
54
54
|
coorpmanager: null
|
|
55
55
|
};
|
|
56
56
|
|
|
57
|
+
const ArrowView = ({
|
|
58
|
+
shouldRender,
|
|
59
|
+
isArrowUp,
|
|
60
|
+
ariaLabel,
|
|
61
|
+
arrowClass,
|
|
62
|
+
arrowColor
|
|
63
|
+
}) => {
|
|
64
|
+
const props = (0, _react.useMemo)(() => _extends({}, ariaLabel & {
|
|
65
|
+
'aria-label': ariaLabel
|
|
66
|
+
}, arrowColor & {
|
|
67
|
+
color: arrowColor
|
|
68
|
+
}, {
|
|
69
|
+
className: arrowClass
|
|
70
|
+
}), [ariaLabel, arrowClass, arrowColor]);
|
|
71
|
+
|
|
72
|
+
if (shouldRender) {
|
|
73
|
+
return isArrowUp ? /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionNavigationArrowTop, _extends({}, props, {
|
|
74
|
+
"data-testid": "select-arrow-up-icon"
|
|
75
|
+
})) : /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionNavigationArrowDown, _extends({}, props, {
|
|
76
|
+
"data-testid": "select-arrow-down-icon"
|
|
77
|
+
}));
|
|
78
|
+
} else return null;
|
|
79
|
+
};
|
|
80
|
+
|
|
57
81
|
const Select = (props, legacyContext) => {
|
|
58
82
|
const {
|
|
59
83
|
name,
|
|
@@ -70,14 +94,13 @@ const Select = (props, legacyContext) => {
|
|
|
70
94
|
error = false,
|
|
71
95
|
title: propTitle,
|
|
72
96
|
'aria-label': ariaLabel,
|
|
73
|
-
|
|
97
|
+
'aria-labelledby': ariaLabelledBy
|
|
74
98
|
} = props;
|
|
75
|
-
const {
|
|
76
|
-
htmlFor: battleLabelHtmlFor,
|
|
77
|
-
className: battleLabelClassName
|
|
78
|
-
} = createBattleLabelParameters;
|
|
79
99
|
const skin = (0, _provider.GetSkinFromContext)(legacyContext);
|
|
80
100
|
const title = (0, _react.useMemo)(() => propTitle ? `${propTitle}${required ? '*' : ''}` : null, [propTitle, required]);
|
|
101
|
+
const [isArrowUp, setIsArrowUp] = (0, _react.useState)(false);
|
|
102
|
+
const handleSelectOnFocus = (0, _react.useCallback)(() => setIsArrowUp(true), []);
|
|
103
|
+
const handleSelectOnBlur = (0, _react.useCallback)(() => setIsArrowUp(false), []);
|
|
81
104
|
const optionList = options && options.map((option, index) => {
|
|
82
105
|
return /*#__PURE__*/_react.default.createElement("option", {
|
|
83
106
|
key: index,
|
|
@@ -85,18 +108,9 @@ const Select = (props, legacyContext) => {
|
|
|
85
108
|
className: _style.default.selectOption
|
|
86
109
|
}, option.name);
|
|
87
110
|
});
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
titleView = /*#__PURE__*/_react.default.createElement("div", {
|
|
92
|
-
className: battleLabelClassName
|
|
93
|
-
}, title, " ");
|
|
94
|
-
} else if (title) {
|
|
95
|
-
titleView = /*#__PURE__*/_react.default.createElement("span", {
|
|
96
|
-
className: _style.default.title
|
|
97
|
-
}, title, " ");
|
|
98
|
-
}
|
|
99
|
-
|
|
111
|
+
const titleView = title ? /*#__PURE__*/_react.default.createElement("span", {
|
|
112
|
+
className: _style.default.title
|
|
113
|
+
}, title, " ") : null;
|
|
100
114
|
const selected = (0, _react.useMemo)(() => multiple ? (0, _map.default)((0, _get.default)('value'), (0, _filter.default)({
|
|
101
115
|
selected: true
|
|
102
116
|
}, options)) : (0, _get.default)('value', (0, _find.default)({
|
|
@@ -112,53 +126,62 @@ const Select = (props, legacyContext) => {
|
|
|
112
126
|
selected: true
|
|
113
127
|
}, options)), [options, theme]);
|
|
114
128
|
const handleChange = (0, _react.useMemo)(() => multiple ? e => {
|
|
129
|
+
setIsArrowUp(false);
|
|
115
130
|
onChange((0, _map.default)((0, _get.default)('value'), e.target.selectedOptions));
|
|
116
131
|
} : e => {
|
|
132
|
+
setIsArrowUp(false);
|
|
117
133
|
onChange(e.target.value);
|
|
118
134
|
}, [onChange, multiple]);
|
|
119
135
|
const black = (0, _react.useMemo)(() => (0, _getOr.default)('#14171A', 'common.black', skin), [skin]);
|
|
120
136
|
const color = (0, _react.useMemo)(() => (0, _getOr.default)('#00B0FF', 'common.primary', skin), [skin]);
|
|
121
|
-
const
|
|
137
|
+
const isThemeOneOfQuestionTemplateOrPlayer = (0, _react.useMemo)(() => (0, _includes.default)(theme, ['question', 'template', 'player']), [theme]);
|
|
138
|
+
const shouldUseSkinFontColor = (0, _react.useMemo)(() => !isSelectedInValidOption && selected && isThemeOneOfQuestionTemplateOrPlayer, [isSelectedInValidOption, selected, isThemeOneOfQuestionTemplateOrPlayer]);
|
|
122
139
|
const arrowColor = selected ? color : undefined;
|
|
123
|
-
const arrowView = !multiple ? /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionNavigationArrowDown, {
|
|
124
|
-
color: (0, _includes.default)(theme, ['question', 'template', 'player']) ? arrowColor : black,
|
|
125
|
-
className: shouldUseSkinFontColor ? _style.default.selectedArrow : _style.default.arrow,
|
|
126
|
-
"aria-label": ariaLabel,
|
|
127
|
-
"data-testid": "select-arrow-down-icon"
|
|
128
|
-
}) : null;
|
|
129
140
|
const behaviorClassName = (0, _react.useMemo)(() => (0, _getClassState.default)(_style.default.default, _style.default.modified, _style.default.error, modified, error), [error, modified]);
|
|
130
141
|
const composedClassName = (0, _react.useMemo)(() => (0, _classnames.default)(theme && theme !== 'coorpmanager' ? themeStyle[theme] : behaviorClassName, selected ? _style.default.selected : _style.default.unselected, className), [behaviorClassName, className, selected, theme]);
|
|
131
142
|
const labelSize = (0, _react.useMemo)(() => (0, _size.default)(selectedLabel), [selectedLabel]);
|
|
132
143
|
const isLongLabel = (0, _react.useMemo)(() => labelSize >= 65, [labelSize]);
|
|
133
|
-
return /*#__PURE__*/_react.default.createElement("div",
|
|
134
|
-
htmlFor: battleLabelHtmlFor
|
|
135
|
-
} : {}, titleView), /*#__PURE__*/_react.default.createElement("div", {
|
|
144
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
136
145
|
className: (0, _classnames.default)(composedClassName, theme === 'coorpmanager' ? _style.default.coorpmanager : null)
|
|
137
|
-
}, /*#__PURE__*/_react.default.createElement("
|
|
146
|
+
}, /*#__PURE__*/_react.default.createElement("label", {
|
|
138
147
|
"data-name": "select-wrapper",
|
|
139
148
|
style: _extends({}, shouldUseSkinFontColor && {
|
|
140
149
|
color
|
|
141
150
|
}),
|
|
142
151
|
className: _style.default.selectWrapper
|
|
143
|
-
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
152
|
+
}, titleView, /*#__PURE__*/_react.default.createElement("span", {
|
|
144
153
|
"data-name": "select-span",
|
|
145
154
|
className: (0, _classnames.default)(_style.default.selectSpan, (0, _includes.default)(theme, ['player', 'invalid', 'question', 'thematiques', 'template']) ? _style.default.noLabelCommon : null, borderClassName, isLongLabel ? _style.default.longLabel : null),
|
|
146
155
|
style: _extends({}, shouldUseSkinFontColor && {
|
|
147
156
|
color
|
|
148
157
|
})
|
|
149
|
-
}, selectedLabel),
|
|
150
|
-
|
|
158
|
+
}, selectedLabel), /*#__PURE__*/_react.default.createElement(ArrowView, {
|
|
159
|
+
shouldRender: !multiple,
|
|
160
|
+
isArrowUp: isArrowUp,
|
|
161
|
+
ariaLabel: ariaLabel,
|
|
162
|
+
arrowClass: shouldUseSkinFontColor ? _style.default.selectedArrow : _style.default.arrow,
|
|
163
|
+
arrowColor: isThemeOneOfQuestionTemplateOrPlayer ? arrowColor : black
|
|
164
|
+
}), /*#__PURE__*/_react.default.createElement("select", _extends({}, ariaLabelledBy ? {
|
|
165
|
+
'aria-labelledby': ariaLabelledBy
|
|
151
166
|
} : {}, {
|
|
152
167
|
"data-name": "native-select",
|
|
153
168
|
className: _style.default.selectBox,
|
|
169
|
+
title: selectedLabel,
|
|
154
170
|
name: name,
|
|
155
171
|
onChange: handleChange,
|
|
156
172
|
value: selected,
|
|
157
173
|
multiple: multiple,
|
|
158
|
-
disabled: disabled
|
|
174
|
+
disabled: disabled,
|
|
175
|
+
onClick: handleSelectOnFocus,
|
|
176
|
+
onBlur: handleSelectOnBlur // onBlur does not handle completely an out of bounds click
|
|
177
|
+
// ex: select is Opened and a click is done outside, cancelling the select
|
|
178
|
+
// that doesn't count as a Blur, so an onMouseLeave is needed
|
|
179
|
+
,
|
|
180
|
+
onMouseLeave: handleSelectOnBlur,
|
|
181
|
+
"data-testid": "native-select"
|
|
159
182
|
}), optionList)), /*#__PURE__*/_react.default.createElement("div", {
|
|
160
183
|
className: _style.default.description
|
|
161
|
-
}, description))
|
|
184
|
+
}, description));
|
|
162
185
|
};
|
|
163
186
|
|
|
164
187
|
const SelectOptionPropTypes = {
|
|
@@ -168,11 +191,6 @@ const SelectOptionPropTypes = {
|
|
|
168
191
|
validOption: _propTypes.default.bool
|
|
169
192
|
};
|
|
170
193
|
exports.SelectOptionPropTypes = SelectOptionPropTypes;
|
|
171
|
-
const CreateBattleLabelParameters = {
|
|
172
|
-
htmlFor: _propTypes.default.string,
|
|
173
|
-
className: _propTypes.default.string
|
|
174
|
-
};
|
|
175
|
-
exports.CreateBattleLabelParameters = CreateBattleLabelParameters;
|
|
176
194
|
Select.contextTypes = {
|
|
177
195
|
skin: _provider.default.childContextTypes.skin
|
|
178
196
|
};
|
|
@@ -191,7 +209,7 @@ Select.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
191
209
|
modified: _propTypes.default.bool,
|
|
192
210
|
error: _propTypes.default.bool,
|
|
193
211
|
'aria-label': _propTypes.default.string,
|
|
194
|
-
|
|
212
|
+
'aria-labelledby': _propTypes.default.string
|
|
195
213
|
} : {};
|
|
196
214
|
var _default = Select;
|
|
197
215
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["themeStyle","filter","style","invalid","header","mooc","question","sort","thematiques","player","template","coorpmanager","Select","props","legacyContext","name","options","className","borderClassName","onChange","multiple","disabled","required","description","theme","modified","error","title","propTitle","ariaLabel","createBattleLabelParameters","htmlFor","battleLabelHtmlFor","battleLabelClassName","skin","GetSkinFromContext","useMemo","optionList","map","option","index","value","selectOption","titleView","selected","get","find","selectedLabel","isSelectedInValidOption","getOr","validOption","handleChange","e","target","selectedOptions","black","color","shouldUseSkinFontColor","includes","arrowColor","undefined","arrowView","selectedArrow","arrow","behaviorClassName","getClassState","default","composedClassName","classnames","unselected","labelSize","size","isLongLabel","selectWrapper","selectSpan","noLabelCommon","longLabel","id","selectBox","SelectOptionPropTypes","PropTypes","string","isRequired","oneOfType","number","bool","CreateBattleLabelParameters","contextTypes","Provider","childContextTypes","propTypes","func","oneOf","keys","arrayOf","shape"],"sources":["../../../src/atom/select/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport filter from 'lodash/fp/filter';\nimport find from 'lodash/fp/find';\nimport get from 'lodash/fp/get';\nimport getOr from 'lodash/fp/getOr';\nimport includes from 'lodash/fp/includes';\nimport keys from 'lodash/fp/keys';\nimport map from 'lodash/fp/map';\nimport size from 'lodash/fp/size';\nimport {NovaCompositionNavigationArrowDown as ArrowDown} from '@coorpacademy/nova-icons';\nimport Provider, {GetSkinFromContext} from '../provider';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst themeStyle = {\n filter: style.filter,\n invalid: style.invalid,\n header: style.header,\n mooc: style.mooc,\n question: style.question,\n sort: style.sort,\n thematiques: style.thematiques,\n player: style.player,\n template: style.template,\n coorpmanager: null\n};\n\nconst Select = (props, legacyContext) => {\n const {\n name,\n options = [],\n className,\n borderClassName,\n onChange,\n multiple = false,\n disabled,\n required,\n description,\n theme,\n modified = false,\n error = false,\n title: propTitle,\n 'aria-label': ariaLabel,\n createBattleLabelParameters\n } = props;\n\n const {htmlFor: battleLabelHtmlFor, className: battleLabelClassName} =\n createBattleLabelParameters;\n const skin = GetSkinFromContext(legacyContext);\n const title = useMemo(\n () => (propTitle ? `${propTitle}${required ? '*' : ''}` : null),\n [propTitle, required]\n );\n\n const optionList =\n options &&\n options.map((option, index) => {\n return (\n <option key={index} value={option.value} className={style.selectOption}>\n {option.name}\n </option>\n );\n });\n\n let titleView = null;\n if (battleLabelClassName && title) {\n titleView = <div className={battleLabelClassName}>{title} </div>;\n } else if (title) {\n titleView = <span className={style.title}>{title} </span>;\n }\n\n const selected = useMemo(\n () =>\n multiple\n ? map(get('value'), filter({selected: true}, options))\n : get('value', find({selected: true}, options)),\n [multiple, options]\n );\n const selectedLabel = useMemo(\n () =>\n multiple\n ? map(get('name'), filter({selected: true}, options))\n : get('name', find({selected: true}, options)),\n [multiple, options]\n );\n\n const isSelectedInValidOption = useMemo(\n () =>\n theme === 'player' &&\n getOr(false, 'name', find({validOption: false, selected: true}, options)),\n [options, theme]\n );\n\n const handleChange = useMemo(\n () =>\n multiple\n ? e => {\n onChange(map(get('value'), e.target.selectedOptions));\n }\n : e => {\n onChange(e.target.value);\n },\n [onChange, multiple]\n );\n\n const black = useMemo(() => getOr('#14171A', 'common.black', skin), [skin]);\n const color = useMemo(() => getOr('#00B0FF', 'common.primary', skin), [skin]);\n const shouldUseSkinFontColor = useMemo(\n () =>\n !isSelectedInValidOption && selected && includes(theme, ['question', 'template', 'player']),\n [isSelectedInValidOption, selected, theme]\n );\n const arrowColor = selected ? color : undefined;\n\n const arrowView = !multiple ? (\n <ArrowDown\n color={includes(theme, ['question', 'template', 'player']) ? arrowColor : black}\n className={shouldUseSkinFontColor ? style.selectedArrow : style.arrow}\n aria-label={ariaLabel}\n data-testid=\"select-arrow-down-icon\"\n />\n ) : null;\n const behaviorClassName = useMemo(\n () => getClassState(style.default, style.modified, style.error, modified, error),\n [error, modified]\n );\n const composedClassName = useMemo(\n () =>\n classnames(\n theme && theme !== 'coorpmanager' ? themeStyle[theme] : behaviorClassName,\n selected ? style.selected : style.unselected,\n className\n ),\n [behaviorClassName, className, selected, theme]\n );\n\n const labelSize = useMemo(() => size(selectedLabel), [selectedLabel]);\n\n const isLongLabel = useMemo(() => labelSize >= 65, [labelSize]);\n\n return (\n <div>\n <label {...(battleLabelHtmlFor ? {htmlFor: battleLabelHtmlFor} : {})}>{titleView}</label>\n <div\n className={classnames(\n composedClassName,\n theme === 'coorpmanager' ? style.coorpmanager : null\n )}\n >\n <div\n data-name=\"select-wrapper\"\n style={{\n ...(shouldUseSkinFontColor && {\n color\n })\n }}\n className={style.selectWrapper}\n >\n <span\n data-name=\"select-span\"\n className={classnames(\n style.selectSpan,\n includes(theme, ['player', 'invalid', 'question', 'thematiques', 'template'])\n ? style.noLabelCommon\n : null,\n borderClassName,\n isLongLabel ? style.longLabel : null\n )}\n style={{\n ...(shouldUseSkinFontColor && {\n color\n })\n }}\n >\n {selectedLabel}\n </span>\n {arrowView}\n <select\n {...(battleLabelHtmlFor ? {id: battleLabelHtmlFor} : {})}\n data-name=\"native-select\"\n className={style.selectBox}\n name={name}\n onChange={handleChange}\n value={selected}\n multiple={multiple}\n disabled={disabled}\n >\n {optionList}\n </select>\n </div>\n <div className={style.description}>{description}</div>\n </div>\n </div>\n );\n};\n\nexport const SelectOptionPropTypes = {\n name: PropTypes.string.isRequired,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n selected: PropTypes.bool,\n validOption: PropTypes.bool\n};\n\nexport const CreateBattleLabelParameters = {\n htmlFor: PropTypes.string,\n className: PropTypes.string\n};\n\nSelect.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nSelect.propTypes = {\n title: PropTypes.string,\n name: PropTypes.string,\n className: PropTypes.string,\n borderClassName: PropTypes.string,\n disabled: PropTypes.bool,\n multiple: PropTypes.bool,\n description: PropTypes.string,\n required: PropTypes.bool,\n onChange: PropTypes.func,\n theme: PropTypes.oneOf(keys(themeStyle)),\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes)),\n modified: PropTypes.bool,\n error: PropTypes.bool,\n 'aria-label': PropTypes.string,\n createBattleLabelParameters: PropTypes.shape(CreateBattleLabelParameters)\n};\n\nexport default Select;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,UAAU,GAAG;EACjBC,MAAM,EAAEC,cAAA,CAAMD,MADG;EAEjBE,OAAO,EAAED,cAAA,CAAMC,OAFE;EAGjBC,MAAM,EAAEF,cA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ACzCvD,OAAO,EAAEiD,kBAAA,CAAUC,MADsB;EAEzChE,SAAS,EAAE+D,kBAAA,CAAUC;AAFoB,CAApC;;AAKPrE,MAAM,CAAC2E,YAAP,GAAsB;EACpBrD,IAAI,EAAEsD,iBAAA,CAASC,iBAAT,CAA2BvD;AADb,CAAtB;AAIAtB,MAAM,CAAC8E,SAAP,2CAAmB;EACjB/D,KAAK,EAAEqD,kBAAA,CAAUC,MADA;EAEjBlE,IAAI,EAAEiE,kBAAA,CAAUC,MAFC;EAGjBhE,SAAS,EAAE+D,kBAAA,CAAUC,MAHJ;EAIjB/D,eAAe,EAAE8D,kBAAA,CAAUC,MAJV;EAKjB5D,QAAQ,EAAE2D,kBAAA,CAAUK,IALH;EAMjBjE,QAAQ,EAAE4D,kBAAA,CAAUK,IANH;EAOjB9D,WAAW,EAAEyD,kBAAA,CAAUC,MAPN;EAQjB3D,QAAQ,EAAE0D,kBAAA,CAAUK,IARH;EASjBlE,QAAQ,EAAE6D,kBAAA,CAAUW,IATH;EAUjBnE,KAAK,EAAEwD,kBAAA,CAAUY,KAAV,CAAgB,IAAAC,aAAA,EAAK7F,UAAL,CAAhB,CAVU;EAWjBgB,OAAO,EAAEgE,kBAAA,CAAUc,OAAV,CAAkBd,kBAAA,CAAUe,KAAV,CAAgBhB,qBAAhB,CAAlB,CAXQ;EAYjBtD,QAAQ,EAAEuD,kBAAA,CAAUK,IAZH;EAajB3D,KAAK,EAAEsD,kBAAA,CAAUK,IAbA;EAcjB,cAAcL,kBAAA,CAAUC,MAdP;EAejBnD,2BAA2B,EAAEkD,kBAAA,CAAUe,KAAV,CAAgBT,2BAAhB;AAfZ,CAAnB;eAkBe1E,M"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["themeStyle","filter","style","invalid","header","mooc","question","sort","thematiques","player","template","coorpmanager","ArrowView","shouldRender","isArrowUp","ariaLabel","arrowClass","arrowColor","props","useMemo","color","className","Select","legacyContext","name","options","borderClassName","onChange","multiple","disabled","required","description","theme","modified","error","title","propTitle","ariaLabelledBy","skin","GetSkinFromContext","setIsArrowUp","useState","handleSelectOnFocus","useCallback","handleSelectOnBlur","optionList","map","option","index","value","selectOption","titleView","selected","get","find","selectedLabel","isSelectedInValidOption","getOr","validOption","handleChange","e","target","selectedOptions","black","isThemeOneOfQuestionTemplateOrPlayer","includes","shouldUseSkinFontColor","undefined","behaviorClassName","getClassState","default","composedClassName","classnames","unselected","labelSize","size","isLongLabel","selectWrapper","selectSpan","noLabelCommon","longLabel","selectedArrow","arrow","selectBox","SelectOptionPropTypes","PropTypes","string","isRequired","oneOfType","number","bool","contextTypes","Provider","childContextTypes","propTypes","func","oneOf","keys","arrayOf","shape"],"sources":["../../../src/atom/select/index.js"],"sourcesContent":["import React, {useCallback, useMemo, useState} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport filter from 'lodash/fp/filter';\nimport find from 'lodash/fp/find';\nimport get from 'lodash/fp/get';\nimport getOr from 'lodash/fp/getOr';\nimport includes from 'lodash/fp/includes';\nimport keys from 'lodash/fp/keys';\nimport map from 'lodash/fp/map';\nimport size from 'lodash/fp/size';\nimport {\n NovaCompositionNavigationArrowDown as ArrowDown,\n NovaCompositionNavigationArrowTop as ArrowUp\n} from '@coorpacademy/nova-icons';\nimport Provider, {GetSkinFromContext} from '../provider';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst themeStyle = {\n filter: style.filter,\n invalid: style.invalid,\n header: style.header,\n mooc: style.mooc,\n question: style.question,\n sort: style.sort,\n thematiques: style.thematiques,\n player: style.player,\n template: style.template,\n coorpmanager: null\n};\n\nconst ArrowView = ({shouldRender, isArrowUp, ariaLabel, arrowClass, arrowColor}) => {\n const props = useMemo(\n () => ({\n ...(ariaLabel &\n {\n 'aria-label': ariaLabel\n }),\n ...(arrowColor &\n {\n color: arrowColor\n }),\n className: arrowClass\n }),\n [ariaLabel, arrowClass, arrowColor]\n );\n if (shouldRender) {\n return isArrowUp ? (\n <ArrowUp {...props} data-testid=\"select-arrow-up-icon\" />\n ) : (\n <ArrowDown {...props} data-testid=\"select-arrow-down-icon\" />\n );\n } else return null;\n};\n\nconst Select = (props, legacyContext) => {\n const {\n name,\n options = [],\n className,\n borderClassName,\n onChange,\n multiple = false,\n disabled,\n required,\n description,\n theme,\n modified = false,\n error = false,\n title: propTitle,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy\n } = props;\n\n const skin = GetSkinFromContext(legacyContext);\n const title = useMemo(\n () => (propTitle ? `${propTitle}${required ? '*' : ''}` : null),\n [propTitle, required]\n );\n\n const [isArrowUp, setIsArrowUp] = useState(false);\n\n const handleSelectOnFocus = useCallback(() => setIsArrowUp(true), []);\n const handleSelectOnBlur = useCallback(() => setIsArrowUp(false), []);\n\n const optionList =\n options &&\n options.map((option, index) => {\n return (\n <option key={index} value={option.value} className={style.selectOption}>\n {option.name}\n </option>\n );\n });\n\n const titleView = title ? <span className={style.title}>{title} </span> : null;\n\n const selected = useMemo(\n () =>\n multiple\n ? map(get('value'), filter({selected: true}, options))\n : get('value', find({selected: true}, options)),\n [multiple, options]\n );\n const selectedLabel = useMemo(\n () =>\n multiple\n ? map(get('name'), filter({selected: true}, options))\n : get('name', find({selected: true}, options)),\n [multiple, options]\n );\n\n const isSelectedInValidOption = useMemo(\n () =>\n theme === 'player' &&\n getOr(false, 'name', find({validOption: false, selected: true}, options)),\n [options, theme]\n );\n\n const handleChange = useMemo(\n () =>\n multiple\n ? e => {\n setIsArrowUp(false);\n onChange(map(get('value'), e.target.selectedOptions));\n }\n : e => {\n setIsArrowUp(false);\n onChange(e.target.value);\n },\n [onChange, multiple]\n );\n\n const black = useMemo(() => getOr('#14171A', 'common.black', skin), [skin]);\n const color = useMemo(() => getOr('#00B0FF', 'common.primary', skin), [skin]);\n const isThemeOneOfQuestionTemplateOrPlayer = useMemo(\n () => includes(theme, ['question', 'template', 'player']),\n [theme]\n );\n const shouldUseSkinFontColor = useMemo(\n () => !isSelectedInValidOption && selected && isThemeOneOfQuestionTemplateOrPlayer,\n [isSelectedInValidOption, selected, isThemeOneOfQuestionTemplateOrPlayer]\n );\n const arrowColor = selected ? color : undefined;\n\n const behaviorClassName = useMemo(\n () => getClassState(style.default, style.modified, style.error, modified, error),\n [error, modified]\n );\n const composedClassName = useMemo(\n () =>\n classnames(\n theme && theme !== 'coorpmanager' ? themeStyle[theme] : behaviorClassName,\n selected ? style.selected : style.unselected,\n className\n ),\n [behaviorClassName, className, selected, theme]\n );\n\n const labelSize = useMemo(() => size(selectedLabel), [selectedLabel]);\n\n const isLongLabel = useMemo(() => labelSize >= 65, [labelSize]);\n\n return (\n <div\n className={classnames(\n composedClassName,\n theme === 'coorpmanager' ? style.coorpmanager : null\n )}\n >\n <label\n data-name=\"select-wrapper\"\n style={{\n ...(shouldUseSkinFontColor && {\n color\n })\n }}\n className={style.selectWrapper}\n >\n {titleView}\n <span\n data-name=\"select-span\"\n className={classnames(\n style.selectSpan,\n includes(theme, ['player', 'invalid', 'question', 'thematiques', 'template'])\n ? style.noLabelCommon\n : null,\n borderClassName,\n isLongLabel ? style.longLabel : null\n )}\n style={{\n ...(shouldUseSkinFontColor && {\n color\n })\n }}\n >\n {selectedLabel}\n </span>\n <ArrowView\n shouldRender={!multiple}\n isArrowUp={isArrowUp}\n ariaLabel={ariaLabel}\n arrowClass={shouldUseSkinFontColor ? style.selectedArrow : style.arrow}\n arrowColor={isThemeOneOfQuestionTemplateOrPlayer ? arrowColor : black}\n />\n <select\n {...(ariaLabelledBy ? {'aria-labelledby': ariaLabelledBy} : {})}\n data-name=\"native-select\"\n className={style.selectBox}\n title={selectedLabel}\n name={name}\n onChange={handleChange}\n value={selected}\n multiple={multiple}\n disabled={disabled}\n onClick={handleSelectOnFocus}\n onBlur={handleSelectOnBlur}\n // onBlur does not handle completely an out of bounds click\n // ex: select is Opened and a click is done outside, cancelling the select\n // that doesn't count as a Blur, so an onMouseLeave is needed\n onMouseLeave={handleSelectOnBlur}\n data-testid=\"native-select\"\n >\n {optionList}\n </select>\n </label>\n <div className={style.description}>{description}</div>\n </div>\n );\n};\n\nexport const SelectOptionPropTypes = {\n name: PropTypes.string.isRequired,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n selected: PropTypes.bool,\n validOption: PropTypes.bool\n};\n\nSelect.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nSelect.propTypes = {\n title: PropTypes.string,\n name: PropTypes.string,\n className: PropTypes.string,\n borderClassName: PropTypes.string,\n disabled: PropTypes.bool,\n multiple: PropTypes.bool,\n description: PropTypes.string,\n required: PropTypes.bool,\n onChange: PropTypes.func,\n theme: PropTypes.oneOf(keys(themeStyle)),\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes)),\n modified: PropTypes.bool,\n error: PropTypes.bool,\n 'aria-label': PropTypes.string,\n 'aria-labelledby': PropTypes.string\n};\n\nexport default Select;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAIA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,UAAU,GAAG;EACjBC,MAAM,EAAEC,cAAA,CAAMD,MADG;EAEjBE,OAAO,EAAED,cAAA,CAAMC,OAFE;EAGjBC,MAAM,EAAEF,cAAA,CAAME,MAHG;EAIjBC,IAAI,EAAEH,cAAA,CAAMG,IAJK;EAKjBC,QAAQ,EAAEJ,cAAA,CAAMI,QALC;EAMjBC,IAAI,EAAEL,cAAA,CAAMK,IANK;EAOjBC,WAAW,EAAEN,cAAA,CAAMM,WAPF;EAQjBC,MAAM,EAAEP,cAAA,CAAMO,MARG;EASjBC,QAAQ,EAAER,cAAA,CAAMQ,QATC;EAUjBC,YAAY,EAAE;AAVG,CAAnB;;AAaA,MAAMC,SAAS,GAAG,CAAC;EAACC,YAAD;EAAeC,SAAf;EAA0BC,SAA1B;EAAqCC,UAArC;EAAiDC;AAAjD,CAAD,KAAkE;EAClF,MAAMC,KAAK,GA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}
|
|
26
26
|
|
|
27
|
-
div.coorpmanager
|
|
27
|
+
div.coorpmanager label.selectWrapper {
|
|
28
28
|
max-width: fit-content;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
.coorpmanager
|
|
31
|
+
.coorpmanager label.selectWrapper select.selectBox {
|
|
32
32
|
padding-left: 10px;
|
|
33
33
|
position: relative;
|
|
34
34
|
border-radius: 2px;
|
|
@@ -38,13 +38,13 @@ div.coorpmanager div.selectWrapper {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
@media tablet {
|
|
41
|
-
.coorpmanager
|
|
41
|
+
.coorpmanager label.selectWrapper .description {
|
|
42
42
|
max-width: 120px;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
@media mobile {
|
|
47
|
-
.coorpmanager
|
|
47
|
+
.coorpmanager label.selectWrapper select.selectBox {
|
|
48
48
|
width: 100%;
|
|
49
49
|
min-width: 180px;
|
|
50
50
|
}
|
|
@@ -272,7 +272,7 @@ div.coorpmanager div.selectWrapper {
|
|
|
272
272
|
box-sizing: border-box;
|
|
273
273
|
}
|
|
274
274
|
|
|
275
|
-
div.default
|
|
275
|
+
div.default label.selectWrapper span.longLabel {
|
|
276
276
|
min-width: 230px;
|
|
277
277
|
max-width: 280px;
|
|
278
278
|
white-space: pre-wrap;
|
|
@@ -529,7 +529,7 @@ div.player:hover span.selectSpan {
|
|
|
529
529
|
|
|
530
530
|
/* mozilla specific styling */
|
|
531
531
|
@supports (-moz-appearance:none) {
|
|
532
|
-
.player
|
|
532
|
+
.player label.selectWrapper select.selectBox {
|
|
533
533
|
width: 100%;
|
|
534
534
|
}
|
|
535
535
|
}
|
|
@@ -99,10 +99,7 @@ declare namespace BrandFormGroup {
|
|
|
99
99
|
modified: PropTypes.Requireable<boolean>;
|
|
100
100
|
error: PropTypes.Requireable<boolean>;
|
|
101
101
|
'aria-label': PropTypes.Requireable<string>;
|
|
102
|
-
|
|
103
|
-
htmlFor: PropTypes.Requireable<string>;
|
|
104
|
-
className: PropTypes.Requireable<string>;
|
|
105
|
-
}>>;
|
|
102
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
106
103
|
}> | PropTypes.InferProps<{
|
|
107
104
|
type: PropTypes.Requireable<string>;
|
|
108
105
|
title: PropTypes.Validator<string>;
|
|
@@ -207,10 +204,7 @@ declare namespace BrandFormGroup {
|
|
|
207
204
|
modified: PropTypes.Requireable<boolean>;
|
|
208
205
|
error: PropTypes.Requireable<boolean>;
|
|
209
206
|
'aria-label': PropTypes.Requireable<string>;
|
|
210
|
-
|
|
211
|
-
htmlFor: PropTypes.Requireable<string>;
|
|
212
|
-
className: PropTypes.Requireable<string>;
|
|
213
|
-
}>>;
|
|
207
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
214
208
|
}> | PropTypes.InferProps<{
|
|
215
209
|
type: PropTypes.Requireable<string>;
|
|
216
210
|
title: PropTypes.Validator<string>;
|
|
@@ -31,10 +31,7 @@ declare class Filters extends React.Component<any, any, any> {
|
|
|
31
31
|
modified: PropTypes.Requireable<boolean>;
|
|
32
32
|
error: PropTypes.Requireable<boolean>;
|
|
33
33
|
'aria-label': PropTypes.Requireable<string>;
|
|
34
|
-
|
|
35
|
-
htmlFor: PropTypes.Requireable<string>;
|
|
36
|
-
className: PropTypes.Requireable<string>;
|
|
37
|
-
}>>;
|
|
34
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
38
35
|
}>>;
|
|
39
36
|
onSearch: PropTypes.Requireable<(...args: any[]) => any>;
|
|
40
37
|
onToggleFilters: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/filters/index.js"],"names":[],"mappings":";AASA;IACE
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/filters/index.js"],"names":[],"mappings":";AASA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAcE;IAEF;;;;;;;;;;;;;;;;;;;;;;MAEE;IAEF,wBASC;IAPC;;;MAGC;IAMH,yBAcC;IAED,uBAYC;IAED,qBAOC;IAED,sBAsFC;CACF"}
|
|
@@ -57,10 +57,7 @@ declare namespace SetupSlide {
|
|
|
57
57
|
modified: PropTypes.Requireable<boolean>;
|
|
58
58
|
error: PropTypes.Requireable<boolean>;
|
|
59
59
|
'aria-label': PropTypes.Requireable<string>;
|
|
60
|
-
|
|
61
|
-
htmlFor: PropTypes.Requireable<string>;
|
|
62
|
-
className: PropTypes.Requireable<string>;
|
|
63
|
-
}>>;
|
|
60
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
64
61
|
}> | PropTypes.InferProps<{
|
|
65
62
|
type: PropTypes.Requireable<string>;
|
|
66
63
|
title: PropTypes.Validator<string>;
|
|
@@ -70,10 +70,7 @@ declare namespace SetupSlider {
|
|
|
70
70
|
modified: PropTypes.Requireable<boolean>;
|
|
71
71
|
error: PropTypes.Requireable<boolean>;
|
|
72
72
|
'aria-label': PropTypes.Requireable<string>;
|
|
73
|
-
|
|
74
|
-
htmlFor: PropTypes.Requireable<string>;
|
|
75
|
-
className: PropTypes.Requireable<string>;
|
|
76
|
-
}>>;
|
|
73
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
77
74
|
}> | PropTypes.InferProps<{
|
|
78
75
|
type: PropTypes.Requireable<string>;
|
|
79
76
|
title: PropTypes.Validator<string>;
|
|
@@ -129,10 +129,7 @@ declare namespace BrandForm {
|
|
|
129
129
|
modified: PropTypes.Requireable<boolean>;
|
|
130
130
|
error: PropTypes.Requireable<boolean>;
|
|
131
131
|
'aria-label': PropTypes.Requireable<string>;
|
|
132
|
-
|
|
133
|
-
htmlFor: PropTypes.Requireable<string>;
|
|
134
|
-
className: PropTypes.Requireable<string>;
|
|
135
|
-
}>>;
|
|
132
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
136
133
|
}> | PropTypes.InferProps<{
|
|
137
134
|
type: PropTypes.Requireable<string>;
|
|
138
135
|
title: PropTypes.Validator<string>;
|
|
@@ -237,10 +234,7 @@ declare namespace BrandForm {
|
|
|
237
234
|
modified: PropTypes.Requireable<boolean>;
|
|
238
235
|
error: PropTypes.Requireable<boolean>;
|
|
239
236
|
'aria-label': PropTypes.Requireable<string>;
|
|
240
|
-
|
|
241
|
-
htmlFor: PropTypes.Requireable<string>;
|
|
242
|
-
className: PropTypes.Requireable<string>;
|
|
243
|
-
}>>;
|
|
237
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
244
238
|
}> | PropTypes.InferProps<{
|
|
245
239
|
type: PropTypes.Requireable<string>;
|
|
246
240
|
title: PropTypes.Validator<string>;
|
|
@@ -146,10 +146,7 @@ declare namespace WizardContents {
|
|
|
146
146
|
modified: PropTypes.Requireable<boolean>;
|
|
147
147
|
error: PropTypes.Requireable<boolean>;
|
|
148
148
|
'aria-label': PropTypes.Requireable<string>;
|
|
149
|
-
|
|
150
|
-
htmlFor: PropTypes.Requireable<string>;
|
|
151
|
-
className: PropTypes.Requireable<string>;
|
|
152
|
-
}>>;
|
|
149
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
153
150
|
}> | PropTypes.InferProps<{
|
|
154
151
|
type: PropTypes.Requireable<string>;
|
|
155
152
|
title: PropTypes.Validator<string>;
|
|
@@ -254,10 +251,7 @@ declare namespace WizardContents {
|
|
|
254
251
|
modified: PropTypes.Requireable<boolean>;
|
|
255
252
|
error: PropTypes.Requireable<boolean>;
|
|
256
253
|
'aria-label': PropTypes.Requireable<string>;
|
|
257
|
-
|
|
258
|
-
htmlFor: PropTypes.Requireable<string>;
|
|
259
|
-
className: PropTypes.Requireable<string>;
|
|
260
|
-
}>>;
|
|
254
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
261
255
|
}> | PropTypes.InferProps<{
|
|
262
256
|
type: PropTypes.Requireable<string>;
|
|
263
257
|
title: PropTypes.Validator<string>;
|
|
@@ -231,10 +231,7 @@ declare namespace BrandUpdate {
|
|
|
231
231
|
modified: PropTypes.Requireable<boolean>;
|
|
232
232
|
error: PropTypes.Requireable<boolean>;
|
|
233
233
|
'aria-label': PropTypes.Requireable<string>;
|
|
234
|
-
|
|
235
|
-
htmlFor: PropTypes.Requireable<string>;
|
|
236
|
-
className: PropTypes.Requireable<string>;
|
|
237
|
-
}>>;
|
|
234
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
238
235
|
}> | PropTypes.InferProps<{
|
|
239
236
|
type: PropTypes.Requireable<string>;
|
|
240
237
|
title: PropTypes.Validator<string>;
|
|
@@ -339,10 +336,7 @@ declare namespace BrandUpdate {
|
|
|
339
336
|
modified: PropTypes.Requireable<boolean>;
|
|
340
337
|
error: PropTypes.Requireable<boolean>;
|
|
341
338
|
'aria-label': PropTypes.Requireable<string>;
|
|
342
|
-
|
|
343
|
-
htmlFor: PropTypes.Requireable<string>;
|
|
344
|
-
className: PropTypes.Requireable<string>;
|
|
345
|
-
}>>;
|
|
339
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
346
340
|
}> | PropTypes.InferProps<{
|
|
347
341
|
type: PropTypes.Requireable<string>;
|
|
348
342
|
title: PropTypes.Validator<string>;
|
|
@@ -862,10 +856,7 @@ declare namespace BrandUpdate {
|
|
|
862
856
|
modified: PropTypes.Requireable<boolean>;
|
|
863
857
|
error: PropTypes.Requireable<boolean>;
|
|
864
858
|
'aria-label': PropTypes.Requireable<string>;
|
|
865
|
-
|
|
866
|
-
htmlFor: PropTypes.Requireable<string>;
|
|
867
|
-
className: PropTypes.Requireable<string>;
|
|
868
|
-
}>>;
|
|
859
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
869
860
|
}> | PropTypes.InferProps<{
|
|
870
861
|
type: PropTypes.Requireable<string>;
|
|
871
862
|
title: PropTypes.Validator<string>;
|
|
@@ -970,10 +961,7 @@ declare namespace BrandUpdate {
|
|
|
970
961
|
modified: PropTypes.Requireable<boolean>;
|
|
971
962
|
error: PropTypes.Requireable<boolean>;
|
|
972
963
|
'aria-label': PropTypes.Requireable<string>;
|
|
973
|
-
|
|
974
|
-
htmlFor: PropTypes.Requireable<string>;
|
|
975
|
-
className: PropTypes.Requireable<string>;
|
|
976
|
-
}>>;
|
|
964
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
977
965
|
}> | PropTypes.InferProps<{
|
|
978
966
|
type: PropTypes.Requireable<string>;
|
|
979
967
|
title: PropTypes.Validator<string>;
|
|
@@ -58,10 +58,7 @@ declare namespace SearchPage {
|
|
|
58
58
|
modified: PropTypes.Requireable<boolean>;
|
|
59
59
|
error: PropTypes.Requireable<boolean>;
|
|
60
60
|
'aria-label': PropTypes.Requireable<string>;
|
|
61
|
-
|
|
62
|
-
htmlFor: PropTypes.Requireable<string>;
|
|
63
|
-
className: PropTypes.Requireable<string>;
|
|
64
|
-
}>>;
|
|
61
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
65
62
|
}>>;
|
|
66
63
|
onSearch: PropTypes.Requireable<(...args: any[]) => any>;
|
|
67
64
|
onToggleFilters: PropTypes.Requireable<(...args: any[]) => any>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coorpacademy/components",
|
|
3
|
-
"version": "11.4.5-alpha.
|
|
3
|
+
"version": "11.4.5-alpha.42+4584d9183",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -160,5 +160,5 @@
|
|
|
160
160
|
"last 2 versions",
|
|
161
161
|
"IE 11"
|
|
162
162
|
],
|
|
163
|
-
"gitHead": "
|
|
163
|
+
"gitHead": "4584d91832ae87a793774213383a7d2bbdc1650d"
|
|
164
164
|
}
|