@coorpacademy/components 11.4.5-alpha.40 → 11.4.5-alpha.41

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.
@@ -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,8 @@ declare namespace Select {
55
51
  modified: PropTypes.Requireable<boolean>;
56
52
  error: PropTypes.Requireable<boolean>;
57
53
  'aria-label': PropTypes.Requireable<string>;
58
- createBattleLabelParameters: PropTypes.Requireable<PropTypes.InferProps<{
59
- htmlFor: PropTypes.Requireable<string>;
60
- className: PropTypes.Requireable<string>;
61
- }>>;
54
+ selectId: PropTypes.Requireable<string>;
55
+ titleClassName: PropTypes.Requireable<string>;
62
56
  };
63
57
  }
64
58
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/select/index.js"],"names":[],"mappings":";;;;;;;;;;;;AA6BA,qEAuKC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/select/index.js"],"names":[],"mappings":";;;;;;;;AA6BA,qEAsKC"}
@@ -44,12 +44,9 @@ const Select = (props, legacyContext) => {
44
44
  error = false,
45
45
  title: propTitle,
46
46
  'aria-label': ariaLabel,
47
- createBattleLabelParameters
47
+ selectId,
48
+ titleClassName
48
49
  } = props;
49
- const {
50
- htmlFor: battleLabelHtmlFor,
51
- className: battleLabelClassName
52
- } = createBattleLabelParameters;
53
50
  const skin = GetSkinFromContext(legacyContext);
54
51
  const title = useMemo(() => propTitle ? `${propTitle}${required ? '*' : ''}` : null, [propTitle, required]);
55
52
  const optionList = options && options.map((option, index) => {
@@ -61,9 +58,9 @@ const Select = (props, legacyContext) => {
61
58
  });
62
59
  let titleView = null;
63
60
 
64
- if (battleLabelClassName && title) {
61
+ if (selectId) {
65
62
  titleView = /*#__PURE__*/React.createElement("div", {
66
- className: battleLabelClassName
63
+ className: titleClassName
67
64
  }, title, " ");
68
65
  } else if (title) {
69
66
  titleView = /*#__PURE__*/React.createElement("span", {
@@ -104,8 +101,8 @@ const Select = (props, legacyContext) => {
104
101
  const composedClassName = useMemo(() => classnames(theme && theme !== 'coorpmanager' ? themeStyle[theme] : behaviorClassName, selected ? style.selected : style.unselected, className), [behaviorClassName, className, selected, theme]);
105
102
  const labelSize = useMemo(() => size(selectedLabel), [selectedLabel]);
106
103
  const isLongLabel = useMemo(() => labelSize >= 65, [labelSize]);
107
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("label", battleLabelHtmlFor ? {
108
- htmlFor: battleLabelHtmlFor
104
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("label", selectId ? {
105
+ htmlFor: selectId
109
106
  } : {}, titleView), /*#__PURE__*/React.createElement("div", {
110
107
  className: classnames(composedClassName, theme === 'coorpmanager' ? style.coorpmanager : null)
111
108
  }, /*#__PURE__*/React.createElement("div", {
@@ -120,8 +117,8 @@ const Select = (props, legacyContext) => {
120
117
  style: _extends({}, shouldUseSkinFontColor && {
121
118
  color
122
119
  })
123
- }, selectedLabel), arrowView, /*#__PURE__*/React.createElement("select", _extends({}, battleLabelHtmlFor ? {
124
- id: battleLabelHtmlFor
120
+ }, selectedLabel), arrowView, /*#__PURE__*/React.createElement("select", _extends({}, selectId ? {
121
+ id: selectId
125
122
  } : {}, {
126
123
  "data-name": "native-select",
127
124
  className: style.selectBox,
@@ -141,10 +138,6 @@ export const SelectOptionPropTypes = {
141
138
  selected: PropTypes.bool,
142
139
  validOption: PropTypes.bool
143
140
  };
144
- export const CreateBattleLabelParameters = {
145
- htmlFor: PropTypes.string,
146
- className: PropTypes.string
147
- };
148
141
  Select.contextTypes = {
149
142
  skin: Provider.childContextTypes.skin
150
143
  };
@@ -163,7 +156,8 @@ Select.propTypes = process.env.NODE_ENV !== "production" ? {
163
156
  modified: PropTypes.bool,
164
157
  error: PropTypes.bool,
165
158
  'aria-label': PropTypes.string,
166
- createBattleLabelParameters: PropTypes.shape(CreateBattleLabelParameters)
159
+ selectId: PropTypes.string,
160
+ titleClassName: PropTypes.string
167
161
  } : {};
168
162
  export default Select;
169
163
  //# 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,OAAOC,IAAP,MAAiB,gBAAjB;AACA,SAAQC,kCAAkC,IAAIC,SAA9C,QAA8D,0BAA9D;AACA,OAAOC,QAAP,IAAkBC,kBAAlB,QAA2C,aAA3C;AACA,OAAOC,aAAP,MAA0B,4BAA1B;AACA,OAAOC,KAAP,MAAkB,aAAlB;AAEA,MAAMC,UAAU,GAAG;EACjBd,MAAM,EAAEa,KAAK,CAACb,MADG;EAEjBe,OAAO,EAAEF,KAAK,CAACE,OAFE;EAGjBC,MAAM,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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","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","selectId","titleClassName","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","htmlFor","selectWrapper","selectSpan","noLabelCommon","longLabel","id","selectBox","SelectOptionPropTypes","string","isRequired","oneOfType","number","bool","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 selectId,\n titleClassName\n } = props;\n\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 (selectId) {\n titleView = <div className={titleClassName}>{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 {...(selectId ? {htmlFor: selectId} : {})}>{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 {...(selectId ? {id: selectId} : {})}\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\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 selectId: PropTypes.string,\n titleClassName: PropTypes.string\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,OAAOC,IAAP,MAAiB,gBAAjB;AACA,SAAQC,kCAAkC,IAAIC,SAA9C,QAA8D,0BAA9D;AACA,OAAOC,QAAP,IAA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AmB;EACjBjD,KAAK,EAAEzC,SAAS,CAACmF,MADA;EAEjBtD,IAAI,EAAE7B,SAAS,CAACmF,MAFC;EAGjBpD,SAAS,EAAE/B,SAAS,CAACmF,MAHJ;EAIjBnD,eAAe,EAAEhC,SAAS,CAACmF,MAJV;EAKjBhD,QAAQ,EAAEnC,SAAS,CAACuF,IALH;EAMjBrD,QAAQ,EAAElC,SAAS,CAACuF,IANH;EAOjBlD,WAAW,EAAErC,SAAS,CAACmF,MAPN;EAQjB/C,QAAQ,EAAEpC,SAAS,CAACuF,IARH;EASjBtD,QAAQ,EAAEjC,SAAS,CAAC2F,IATH;EAUjBrD,KAAK,EAAEtC,SAAS,CAAC4F,KAAV,CAAgBrF,IAAI,CAACS,UAAD,CAApB,CAVU;EAWjBc,OAAO,EAAE9B,SAAS,CAAC6F,OAAV,CAAkB7F,SAAS,CAAC8F,KAAV,CAAgBZ,qBAAhB,CAAlB,CAXQ;EAYjB3C,QAAQ,EAAEvC,SAAS,CAACuF,IAZH;EAajB/C,KAAK,EAAExC,SAAS,CAACuF,IAbA;EAcjB,cAAcvF,SAAS,CAACmF,MAdP;EAejBvC,QAAQ,EAAE5C,SAAS,CAACmF,MAfH;EAgBjBtC,cAAc,EAAE7C,SAAS,CAACmF;AAhBT,CAAnB;AAmBA,eAAezD,MAAf"}
@@ -99,10 +99,8 @@ declare namespace BrandFormGroup {
99
99
  modified: PropTypes.Requireable<boolean>;
100
100
  error: PropTypes.Requireable<boolean>;
101
101
  'aria-label': PropTypes.Requireable<string>;
102
- createBattleLabelParameters: PropTypes.Requireable<PropTypes.InferProps<{
103
- htmlFor: PropTypes.Requireable<string>;
104
- className: PropTypes.Requireable<string>;
105
- }>>;
102
+ selectId: PropTypes.Requireable<string>;
103
+ titleClassName: PropTypes.Requireable<string>;
106
104
  }> | PropTypes.InferProps<{
107
105
  type: PropTypes.Requireable<string>;
108
106
  title: PropTypes.Validator<string>;
@@ -207,10 +205,8 @@ declare namespace BrandFormGroup {
207
205
  modified: PropTypes.Requireable<boolean>;
208
206
  error: PropTypes.Requireable<boolean>;
209
207
  'aria-label': PropTypes.Requireable<string>;
210
- createBattleLabelParameters: PropTypes.Requireable<PropTypes.InferProps<{
211
- htmlFor: PropTypes.Requireable<string>;
212
- className: PropTypes.Requireable<string>;
213
- }>>;
208
+ selectId: PropTypes.Requireable<string>;
209
+ titleClassName: PropTypes.Requireable<string>;
214
210
  }> | PropTypes.InferProps<{
215
211
  type: PropTypes.Requireable<string>;
216
212
  title: PropTypes.Validator<string>;
@@ -31,10 +31,8 @@ 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
- createBattleLabelParameters: PropTypes.Requireable<PropTypes.InferProps<{
35
- htmlFor: PropTypes.Requireable<string>;
36
- className: PropTypes.Requireable<string>;
37
- }>>;
34
+ selectId: PropTypes.Requireable<string>;
35
+ titleClassName: PropTypes.Requireable<string>;
38
36
  }>>;
39
37
  onSearch: PropTypes.Requireable<(...args: any[]) => any>;
40
38
  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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAcE;IAEF;;;;;;;;;;;;;;;;;;;;;;MAEE;IAEF,wBASC;IAPC;;;MAGC;IAMH,yBAcC;IAED,uBAYC;IAED,qBAOC;IAED,sBAsFC;CACF"}
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,8 @@ declare namespace SetupSlide {
57
57
  modified: PropTypes.Requireable<boolean>;
58
58
  error: PropTypes.Requireable<boolean>;
59
59
  'aria-label': PropTypes.Requireable<string>;
60
- createBattleLabelParameters: PropTypes.Requireable<PropTypes.InferProps<{
61
- htmlFor: PropTypes.Requireable<string>;
62
- className: PropTypes.Requireable<string>;
63
- }>>;
60
+ selectId: PropTypes.Requireable<string>;
61
+ titleClassName: PropTypes.Requireable<string>;
64
62
  }> | PropTypes.InferProps<{
65
63
  type: PropTypes.Requireable<string>;
66
64
  title: PropTypes.Validator<string>;
@@ -70,10 +70,8 @@ declare namespace SetupSlider {
70
70
  modified: PropTypes.Requireable<boolean>;
71
71
  error: PropTypes.Requireable<boolean>;
72
72
  'aria-label': PropTypes.Requireable<string>;
73
- createBattleLabelParameters: PropTypes.Requireable<PropTypes.InferProps<{
74
- htmlFor: PropTypes.Requireable<string>;
75
- className: PropTypes.Requireable<string>;
76
- }>>;
73
+ selectId: PropTypes.Requireable<string>;
74
+ titleClassName: PropTypes.Requireable<string>;
77
75
  }> | PropTypes.InferProps<{
78
76
  type: PropTypes.Requireable<string>;
79
77
  title: PropTypes.Validator<string>;
@@ -129,10 +129,8 @@ declare namespace BrandForm {
129
129
  modified: PropTypes.Requireable<boolean>;
130
130
  error: PropTypes.Requireable<boolean>;
131
131
  'aria-label': PropTypes.Requireable<string>;
132
- createBattleLabelParameters: PropTypes.Requireable<PropTypes.InferProps<{
133
- htmlFor: PropTypes.Requireable<string>;
134
- className: PropTypes.Requireable<string>;
135
- }>>;
132
+ selectId: PropTypes.Requireable<string>;
133
+ titleClassName: PropTypes.Requireable<string>;
136
134
  }> | PropTypes.InferProps<{
137
135
  type: PropTypes.Requireable<string>;
138
136
  title: PropTypes.Validator<string>;
@@ -237,10 +235,8 @@ declare namespace BrandForm {
237
235
  modified: PropTypes.Requireable<boolean>;
238
236
  error: PropTypes.Requireable<boolean>;
239
237
  'aria-label': PropTypes.Requireable<string>;
240
- createBattleLabelParameters: PropTypes.Requireable<PropTypes.InferProps<{
241
- htmlFor: PropTypes.Requireable<string>;
242
- className: PropTypes.Requireable<string>;
243
- }>>;
238
+ selectId: PropTypes.Requireable<string>;
239
+ titleClassName: PropTypes.Requireable<string>;
244
240
  }> | PropTypes.InferProps<{
245
241
  type: PropTypes.Requireable<string>;
246
242
  title: PropTypes.Validator<string>;
@@ -146,10 +146,8 @@ declare namespace WizardContents {
146
146
  modified: PropTypes.Requireable<boolean>;
147
147
  error: PropTypes.Requireable<boolean>;
148
148
  'aria-label': PropTypes.Requireable<string>;
149
- createBattleLabelParameters: PropTypes.Requireable<PropTypes.InferProps<{
150
- htmlFor: PropTypes.Requireable<string>;
151
- className: PropTypes.Requireable<string>;
152
- }>>;
149
+ selectId: PropTypes.Requireable<string>;
150
+ titleClassName: PropTypes.Requireable<string>;
153
151
  }> | PropTypes.InferProps<{
154
152
  type: PropTypes.Requireable<string>;
155
153
  title: PropTypes.Validator<string>;
@@ -254,10 +252,8 @@ declare namespace WizardContents {
254
252
  modified: PropTypes.Requireable<boolean>;
255
253
  error: PropTypes.Requireable<boolean>;
256
254
  'aria-label': PropTypes.Requireable<string>;
257
- createBattleLabelParameters: PropTypes.Requireable<PropTypes.InferProps<{
258
- htmlFor: PropTypes.Requireable<string>;
259
- className: PropTypes.Requireable<string>;
260
- }>>;
255
+ selectId: PropTypes.Requireable<string>;
256
+ titleClassName: PropTypes.Requireable<string>;
261
257
  }> | PropTypes.InferProps<{
262
258
  type: PropTypes.Requireable<string>;
263
259
  title: PropTypes.Validator<string>;
@@ -231,10 +231,8 @@ declare namespace BrandUpdate {
231
231
  modified: PropTypes.Requireable<boolean>;
232
232
  error: PropTypes.Requireable<boolean>;
233
233
  'aria-label': PropTypes.Requireable<string>;
234
- createBattleLabelParameters: PropTypes.Requireable<PropTypes.InferProps<{
235
- htmlFor: PropTypes.Requireable<string>;
236
- className: PropTypes.Requireable<string>;
237
- }>>;
234
+ selectId: PropTypes.Requireable<string>;
235
+ titleClassName: PropTypes.Requireable<string>;
238
236
  }> | PropTypes.InferProps<{
239
237
  type: PropTypes.Requireable<string>;
240
238
  title: PropTypes.Validator<string>;
@@ -339,10 +337,8 @@ declare namespace BrandUpdate {
339
337
  modified: PropTypes.Requireable<boolean>;
340
338
  error: PropTypes.Requireable<boolean>;
341
339
  'aria-label': PropTypes.Requireable<string>;
342
- createBattleLabelParameters: PropTypes.Requireable<PropTypes.InferProps<{
343
- htmlFor: PropTypes.Requireable<string>;
344
- className: PropTypes.Requireable<string>;
345
- }>>;
340
+ selectId: PropTypes.Requireable<string>;
341
+ titleClassName: PropTypes.Requireable<string>;
346
342
  }> | PropTypes.InferProps<{
347
343
  type: PropTypes.Requireable<string>;
348
344
  title: PropTypes.Validator<string>;
@@ -862,10 +858,8 @@ declare namespace BrandUpdate {
862
858
  modified: PropTypes.Requireable<boolean>;
863
859
  error: PropTypes.Requireable<boolean>;
864
860
  'aria-label': PropTypes.Requireable<string>;
865
- createBattleLabelParameters: PropTypes.Requireable<PropTypes.InferProps<{
866
- htmlFor: PropTypes.Requireable<string>;
867
- className: PropTypes.Requireable<string>;
868
- }>>;
861
+ selectId: PropTypes.Requireable<string>;
862
+ titleClassName: PropTypes.Requireable<string>;
869
863
  }> | PropTypes.InferProps<{
870
864
  type: PropTypes.Requireable<string>;
871
865
  title: PropTypes.Validator<string>;
@@ -970,10 +964,8 @@ declare namespace BrandUpdate {
970
964
  modified: PropTypes.Requireable<boolean>;
971
965
  error: PropTypes.Requireable<boolean>;
972
966
  'aria-label': PropTypes.Requireable<string>;
973
- createBattleLabelParameters: PropTypes.Requireable<PropTypes.InferProps<{
974
- htmlFor: PropTypes.Requireable<string>;
975
- className: PropTypes.Requireable<string>;
976
- }>>;
967
+ selectId: PropTypes.Requireable<string>;
968
+ titleClassName: PropTypes.Requireable<string>;
977
969
  }> | PropTypes.InferProps<{
978
970
  type: PropTypes.Requireable<string>;
979
971
  title: PropTypes.Validator<string>;
@@ -58,10 +58,8 @@ declare namespace SearchPage {
58
58
  modified: PropTypes.Requireable<boolean>;
59
59
  error: PropTypes.Requireable<boolean>;
60
60
  'aria-label': PropTypes.Requireable<string>;
61
- createBattleLabelParameters: PropTypes.Requireable<PropTypes.InferProps<{
62
- htmlFor: PropTypes.Requireable<string>;
63
- className: PropTypes.Requireable<string>;
64
- }>>;
61
+ selectId: PropTypes.Requireable<string>;
62
+ titleClassName: PropTypes.Requireable<string>;
65
63
  }>>;
66
64
  onSearch: PropTypes.Requireable<(...args: any[]) => any>;
67
65
  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,8 @@ declare namespace Select {
55
51
  modified: PropTypes.Requireable<boolean>;
56
52
  error: PropTypes.Requireable<boolean>;
57
53
  'aria-label': PropTypes.Requireable<string>;
58
- createBattleLabelParameters: PropTypes.Requireable<PropTypes.InferProps<{
59
- htmlFor: PropTypes.Requireable<string>;
60
- className: PropTypes.Requireable<string>;
61
- }>>;
54
+ selectId: PropTypes.Requireable<string>;
55
+ titleClassName: PropTypes.Requireable<string>;
62
56
  };
63
57
  }
64
58
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/select/index.js"],"names":[],"mappings":";;;;;;;;;;;;AA6BA,qEAuKC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/select/index.js"],"names":[],"mappings":";;;;;;;;AA6BA,qEAsKC"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.default = exports.SelectOptionPropTypes = exports.CreateBattleLabelParameters = void 0;
4
+ exports.default = exports.SelectOptionPropTypes = void 0;
5
5
 
6
6
  var _react = _interopRequireWildcard(require("react"));
7
7
 
@@ -70,12 +70,9 @@ const Select = (props, legacyContext) => {
70
70
  error = false,
71
71
  title: propTitle,
72
72
  'aria-label': ariaLabel,
73
- createBattleLabelParameters
73
+ selectId,
74
+ titleClassName
74
75
  } = props;
75
- const {
76
- htmlFor: battleLabelHtmlFor,
77
- className: battleLabelClassName
78
- } = createBattleLabelParameters;
79
76
  const skin = (0, _provider.GetSkinFromContext)(legacyContext);
80
77
  const title = (0, _react.useMemo)(() => propTitle ? `${propTitle}${required ? '*' : ''}` : null, [propTitle, required]);
81
78
  const optionList = options && options.map((option, index) => {
@@ -87,9 +84,9 @@ const Select = (props, legacyContext) => {
87
84
  });
88
85
  let titleView = null;
89
86
 
90
- if (battleLabelClassName && title) {
87
+ if (selectId) {
91
88
  titleView = /*#__PURE__*/_react.default.createElement("div", {
92
- className: battleLabelClassName
89
+ className: titleClassName
93
90
  }, title, " ");
94
91
  } else if (title) {
95
92
  titleView = /*#__PURE__*/_react.default.createElement("span", {
@@ -130,8 +127,8 @@ const Select = (props, legacyContext) => {
130
127
  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
128
  const labelSize = (0, _react.useMemo)(() => (0, _size.default)(selectedLabel), [selectedLabel]);
132
129
  const isLongLabel = (0, _react.useMemo)(() => labelSize >= 65, [labelSize]);
133
- return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("label", battleLabelHtmlFor ? {
134
- htmlFor: battleLabelHtmlFor
130
+ return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("label", selectId ? {
131
+ htmlFor: selectId
135
132
  } : {}, titleView), /*#__PURE__*/_react.default.createElement("div", {
136
133
  className: (0, _classnames.default)(composedClassName, theme === 'coorpmanager' ? _style.default.coorpmanager : null)
137
134
  }, /*#__PURE__*/_react.default.createElement("div", {
@@ -146,8 +143,8 @@ const Select = (props, legacyContext) => {
146
143
  style: _extends({}, shouldUseSkinFontColor && {
147
144
  color
148
145
  })
149
- }, selectedLabel), arrowView, /*#__PURE__*/_react.default.createElement("select", _extends({}, battleLabelHtmlFor ? {
150
- id: battleLabelHtmlFor
146
+ }, selectedLabel), arrowView, /*#__PURE__*/_react.default.createElement("select", _extends({}, selectId ? {
147
+ id: selectId
151
148
  } : {}, {
152
149
  "data-name": "native-select",
153
150
  className: _style.default.selectBox,
@@ -168,11 +165,6 @@ const SelectOptionPropTypes = {
168
165
  validOption: _propTypes.default.bool
169
166
  };
170
167
  exports.SelectOptionPropTypes = SelectOptionPropTypes;
171
- const CreateBattleLabelParameters = {
172
- htmlFor: _propTypes.default.string,
173
- className: _propTypes.default.string
174
- };
175
- exports.CreateBattleLabelParameters = CreateBattleLabelParameters;
176
168
  Select.contextTypes = {
177
169
  skin: _provider.default.childContextTypes.skin
178
170
  };
@@ -191,7 +183,8 @@ Select.propTypes = process.env.NODE_ENV !== "production" ? {
191
183
  modified: _propTypes.default.bool,
192
184
  error: _propTypes.default.bool,
193
185
  'aria-label': _propTypes.default.string,
194
- createBattleLabelParameters: _propTypes.default.shape(CreateBattleLabelParameters)
186
+ selectId: _propTypes.default.string,
187
+ titleClassName: _propTypes.default.string
195
188
  } : {};
196
189
  var _default = Select;
197
190
  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;;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e1E,M"}
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","selectId","titleClassName","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","htmlFor","selectWrapper","selectSpan","noLabelCommon","longLabel","id","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, {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 selectId,\n titleClassName\n } = props;\n\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 (selectId) {\n titleView = <div className={titleClassName}>{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 {...(selectId ? {htmlFor: selectId} : {})}>{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 {...(selectId ? {id: selectId} : {})}\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\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 selectId: PropTypes.string,\n titleClassName: PropTypes.string\n};\n\nexport default Select;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;A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AUK,IAHe;EAInCpC,WAAW,EAAE+B,kBAAA,CAAUK;AAJY,CAA9B;;AAOPxE,MAAM,CAACyE,YAAP,GAAsB;EACpBrD,IAAI,EAAEsD,iBAAA,CAASC,iBAAT,CAA2BvD;AADb,CAAtB;AAIApB,MAAM,CAAC4E,SAAP,2CAAmB;EACjB7D,KAAK,EAAEoD,kBAAA,CAAUC,MADA;EAEjBjE,IAAI,EAAEgE,kBAAA,CAAUC,MAFC;EAGjB/D,SAAS,EAAE8D,kBAAA,CAAUC,MAHJ;EAIjB9D,eAAe,EAAE6D,kBAAA,CAAUC,MAJV;EAKjB3D,QAAQ,EAAE0D,kBAAA,CAAUK,IALH;EAMjBhE,QAAQ,EAAE2D,kBAAA,CAAUK,IANH;EAOjB7D,WAAW,EAAEwD,kBAAA,CAAUC,MAPN;EAQjB1D,QAAQ,EAAEyD,kBAAA,CAAUK,IARH;EASjBjE,QAAQ,EAAE4D,kBAAA,CAAUU,IATH;EAUjBjE,KAAK,EAAEuD,kBAAA,CAAUW,KAAV,CAAgB,IAAAC,aAAA,EAAK3F,UAAL,CAAhB,CAVU;EAWjBgB,OAAO,EAAE+D,kBAAA,CAAUa,OAAV,CAAkBb,kBAAA,CAAUc,KAAV,CAAgBf,qBAAhB,CAAlB,CAXQ;EAYjBrD,QAAQ,EAAEsD,kBAAA,CAAUK,IAZH;EAajB1D,KAAK,EAAEqD,kBAAA,CAAUK,IAbA;EAcjB,cAAcL,kBAAA,CAAUC,MAdP;EAejBlD,QAAQ,EAAEiD,kBAAA,CAAUC,MAfH;EAgBjBjD,cAAc,EAAEgD,kBAAA,CAAUC;AAhBT,CAAnB;eAmBepE,M"}
@@ -99,10 +99,8 @@ declare namespace BrandFormGroup {
99
99
  modified: PropTypes.Requireable<boolean>;
100
100
  error: PropTypes.Requireable<boolean>;
101
101
  'aria-label': PropTypes.Requireable<string>;
102
- createBattleLabelParameters: PropTypes.Requireable<PropTypes.InferProps<{
103
- htmlFor: PropTypes.Requireable<string>;
104
- className: PropTypes.Requireable<string>;
105
- }>>;
102
+ selectId: PropTypes.Requireable<string>;
103
+ titleClassName: PropTypes.Requireable<string>;
106
104
  }> | PropTypes.InferProps<{
107
105
  type: PropTypes.Requireable<string>;
108
106
  title: PropTypes.Validator<string>;
@@ -207,10 +205,8 @@ declare namespace BrandFormGroup {
207
205
  modified: PropTypes.Requireable<boolean>;
208
206
  error: PropTypes.Requireable<boolean>;
209
207
  'aria-label': PropTypes.Requireable<string>;
210
- createBattleLabelParameters: PropTypes.Requireable<PropTypes.InferProps<{
211
- htmlFor: PropTypes.Requireable<string>;
212
- className: PropTypes.Requireable<string>;
213
- }>>;
208
+ selectId: PropTypes.Requireable<string>;
209
+ titleClassName: PropTypes.Requireable<string>;
214
210
  }> | PropTypes.InferProps<{
215
211
  type: PropTypes.Requireable<string>;
216
212
  title: PropTypes.Validator<string>;
@@ -31,10 +31,8 @@ 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
- createBattleLabelParameters: PropTypes.Requireable<PropTypes.InferProps<{
35
- htmlFor: PropTypes.Requireable<string>;
36
- className: PropTypes.Requireable<string>;
37
- }>>;
34
+ selectId: PropTypes.Requireable<string>;
35
+ titleClassName: PropTypes.Requireable<string>;
38
36
  }>>;
39
37
  onSearch: PropTypes.Requireable<(...args: any[]) => any>;
40
38
  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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAcE;IAEF;;;;;;;;;;;;;;;;;;;;;;MAEE;IAEF,wBASC;IAPC;;;MAGC;IAMH,yBAcC;IAED,uBAYC;IAED,qBAOC;IAED,sBAsFC;CACF"}
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,8 @@ declare namespace SetupSlide {
57
57
  modified: PropTypes.Requireable<boolean>;
58
58
  error: PropTypes.Requireable<boolean>;
59
59
  'aria-label': PropTypes.Requireable<string>;
60
- createBattleLabelParameters: PropTypes.Requireable<PropTypes.InferProps<{
61
- htmlFor: PropTypes.Requireable<string>;
62
- className: PropTypes.Requireable<string>;
63
- }>>;
60
+ selectId: PropTypes.Requireable<string>;
61
+ titleClassName: PropTypes.Requireable<string>;
64
62
  }> | PropTypes.InferProps<{
65
63
  type: PropTypes.Requireable<string>;
66
64
  title: PropTypes.Validator<string>;
@@ -70,10 +70,8 @@ declare namespace SetupSlider {
70
70
  modified: PropTypes.Requireable<boolean>;
71
71
  error: PropTypes.Requireable<boolean>;
72
72
  'aria-label': PropTypes.Requireable<string>;
73
- createBattleLabelParameters: PropTypes.Requireable<PropTypes.InferProps<{
74
- htmlFor: PropTypes.Requireable<string>;
75
- className: PropTypes.Requireable<string>;
76
- }>>;
73
+ selectId: PropTypes.Requireable<string>;
74
+ titleClassName: PropTypes.Requireable<string>;
77
75
  }> | PropTypes.InferProps<{
78
76
  type: PropTypes.Requireable<string>;
79
77
  title: PropTypes.Validator<string>;
@@ -129,10 +129,8 @@ declare namespace BrandForm {
129
129
  modified: PropTypes.Requireable<boolean>;
130
130
  error: PropTypes.Requireable<boolean>;
131
131
  'aria-label': PropTypes.Requireable<string>;
132
- createBattleLabelParameters: PropTypes.Requireable<PropTypes.InferProps<{
133
- htmlFor: PropTypes.Requireable<string>;
134
- className: PropTypes.Requireable<string>;
135
- }>>;
132
+ selectId: PropTypes.Requireable<string>;
133
+ titleClassName: PropTypes.Requireable<string>;
136
134
  }> | PropTypes.InferProps<{
137
135
  type: PropTypes.Requireable<string>;
138
136
  title: PropTypes.Validator<string>;
@@ -237,10 +235,8 @@ declare namespace BrandForm {
237
235
  modified: PropTypes.Requireable<boolean>;
238
236
  error: PropTypes.Requireable<boolean>;
239
237
  'aria-label': PropTypes.Requireable<string>;
240
- createBattleLabelParameters: PropTypes.Requireable<PropTypes.InferProps<{
241
- htmlFor: PropTypes.Requireable<string>;
242
- className: PropTypes.Requireable<string>;
243
- }>>;
238
+ selectId: PropTypes.Requireable<string>;
239
+ titleClassName: PropTypes.Requireable<string>;
244
240
  }> | PropTypes.InferProps<{
245
241
  type: PropTypes.Requireable<string>;
246
242
  title: PropTypes.Validator<string>;
@@ -146,10 +146,8 @@ declare namespace WizardContents {
146
146
  modified: PropTypes.Requireable<boolean>;
147
147
  error: PropTypes.Requireable<boolean>;
148
148
  'aria-label': PropTypes.Requireable<string>;
149
- createBattleLabelParameters: PropTypes.Requireable<PropTypes.InferProps<{
150
- htmlFor: PropTypes.Requireable<string>;
151
- className: PropTypes.Requireable<string>;
152
- }>>;
149
+ selectId: PropTypes.Requireable<string>;
150
+ titleClassName: PropTypes.Requireable<string>;
153
151
  }> | PropTypes.InferProps<{
154
152
  type: PropTypes.Requireable<string>;
155
153
  title: PropTypes.Validator<string>;
@@ -254,10 +252,8 @@ declare namespace WizardContents {
254
252
  modified: PropTypes.Requireable<boolean>;
255
253
  error: PropTypes.Requireable<boolean>;
256
254
  'aria-label': PropTypes.Requireable<string>;
257
- createBattleLabelParameters: PropTypes.Requireable<PropTypes.InferProps<{
258
- htmlFor: PropTypes.Requireable<string>;
259
- className: PropTypes.Requireable<string>;
260
- }>>;
255
+ selectId: PropTypes.Requireable<string>;
256
+ titleClassName: PropTypes.Requireable<string>;
261
257
  }> | PropTypes.InferProps<{
262
258
  type: PropTypes.Requireable<string>;
263
259
  title: PropTypes.Validator<string>;
@@ -231,10 +231,8 @@ declare namespace BrandUpdate {
231
231
  modified: PropTypes.Requireable<boolean>;
232
232
  error: PropTypes.Requireable<boolean>;
233
233
  'aria-label': PropTypes.Requireable<string>;
234
- createBattleLabelParameters: PropTypes.Requireable<PropTypes.InferProps<{
235
- htmlFor: PropTypes.Requireable<string>;
236
- className: PropTypes.Requireable<string>;
237
- }>>;
234
+ selectId: PropTypes.Requireable<string>;
235
+ titleClassName: PropTypes.Requireable<string>;
238
236
  }> | PropTypes.InferProps<{
239
237
  type: PropTypes.Requireable<string>;
240
238
  title: PropTypes.Validator<string>;
@@ -339,10 +337,8 @@ declare namespace BrandUpdate {
339
337
  modified: PropTypes.Requireable<boolean>;
340
338
  error: PropTypes.Requireable<boolean>;
341
339
  'aria-label': PropTypes.Requireable<string>;
342
- createBattleLabelParameters: PropTypes.Requireable<PropTypes.InferProps<{
343
- htmlFor: PropTypes.Requireable<string>;
344
- className: PropTypes.Requireable<string>;
345
- }>>;
340
+ selectId: PropTypes.Requireable<string>;
341
+ titleClassName: PropTypes.Requireable<string>;
346
342
  }> | PropTypes.InferProps<{
347
343
  type: PropTypes.Requireable<string>;
348
344
  title: PropTypes.Validator<string>;
@@ -862,10 +858,8 @@ declare namespace BrandUpdate {
862
858
  modified: PropTypes.Requireable<boolean>;
863
859
  error: PropTypes.Requireable<boolean>;
864
860
  'aria-label': PropTypes.Requireable<string>;
865
- createBattleLabelParameters: PropTypes.Requireable<PropTypes.InferProps<{
866
- htmlFor: PropTypes.Requireable<string>;
867
- className: PropTypes.Requireable<string>;
868
- }>>;
861
+ selectId: PropTypes.Requireable<string>;
862
+ titleClassName: PropTypes.Requireable<string>;
869
863
  }> | PropTypes.InferProps<{
870
864
  type: PropTypes.Requireable<string>;
871
865
  title: PropTypes.Validator<string>;
@@ -970,10 +964,8 @@ declare namespace BrandUpdate {
970
964
  modified: PropTypes.Requireable<boolean>;
971
965
  error: PropTypes.Requireable<boolean>;
972
966
  'aria-label': PropTypes.Requireable<string>;
973
- createBattleLabelParameters: PropTypes.Requireable<PropTypes.InferProps<{
974
- htmlFor: PropTypes.Requireable<string>;
975
- className: PropTypes.Requireable<string>;
976
- }>>;
967
+ selectId: PropTypes.Requireable<string>;
968
+ titleClassName: PropTypes.Requireable<string>;
977
969
  }> | PropTypes.InferProps<{
978
970
  type: PropTypes.Requireable<string>;
979
971
  title: PropTypes.Validator<string>;
@@ -58,10 +58,8 @@ declare namespace SearchPage {
58
58
  modified: PropTypes.Requireable<boolean>;
59
59
  error: PropTypes.Requireable<boolean>;
60
60
  'aria-label': PropTypes.Requireable<string>;
61
- createBattleLabelParameters: PropTypes.Requireable<PropTypes.InferProps<{
62
- htmlFor: PropTypes.Requireable<string>;
63
- className: PropTypes.Requireable<string>;
64
- }>>;
61
+ selectId: PropTypes.Requireable<string>;
62
+ titleClassName: PropTypes.Requireable<string>;
65
63
  }>>;
66
64
  onSearch: PropTypes.Requireable<(...args: any[]) => any>;
67
65
  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.40+ba7bdfd28",
3
+ "version": "11.4.5-alpha.41+8a79dc32c",
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": "ba7bdfd283b23cfec190558288d86adf437f1d71"
163
+ "gitHead": "8a79dc32cbdd9f9c77afc5e873e32b44e888069a"
164
164
  }