@coorpacademy/components 10.5.7-alpha.8 → 10.6.1

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.
Files changed (65) hide show
  1. package/es/atom/select/index.js +27 -27
  2. package/es/atom/select/index.js.map +1 -1
  3. package/es/atom/select/style.css +66 -0
  4. package/es/atom/select/test/fixtures/coorpmanager.js +11 -0
  5. package/es/atom/select/test/fixtures/coorpmanager.js.map +1 -0
  6. package/es/atom/select/test/fixtures.js +2 -0
  7. package/es/atom/select/test/fixtures.js.map +1 -1
  8. package/es/molecule/brand-form-group/index.js +3 -1
  9. package/es/molecule/brand-form-group/index.js.map +1 -1
  10. package/es/molecule/brand-form-group/test/fixtures/lookandfeel.js +30 -26
  11. package/es/molecule/brand-form-group/test/fixtures/lookandfeel.js.map +1 -1
  12. package/es/molecule/card/customer.js +6 -3
  13. package/es/molecule/card/customer.js.map +1 -1
  14. package/es/molecule/card/favorite.js +13 -4
  15. package/es/molecule/card/favorite.js.map +1 -1
  16. package/es/molecule/card/index.js +41 -12
  17. package/es/molecule/card/index.js.map +1 -1
  18. package/es/molecule/card/selectable.js +11 -4
  19. package/es/molecule/card/selectable.js.map +1 -1
  20. package/es/molecule/card/test/fixtures/default.js +20 -1
  21. package/es/molecule/card/test/fixtures/default.js.map +1 -1
  22. package/es/molecule/card-content/index.js +20 -7
  23. package/es/molecule/card-content/index.js.map +1 -1
  24. package/es/molecule/card-content/test/fixtures/card-no-progress-bar.js +6 -1
  25. package/es/molecule/card-content/test/fixtures/card-no-progress-bar.js.map +1 -1
  26. package/es/molecule/questions/qcm-drag/style.css +0 -1
  27. package/es/molecule/questions/qcm-graphic/style.css +0 -2
  28. package/es/molecule/questions/template/index.js +2 -1
  29. package/es/molecule/questions/template/index.js.map +1 -1
  30. package/es/molecule/questions/template/style.css +6 -0
  31. package/es/molecule/wizard-summary/style.css +4 -4
  32. package/es/variables/colors.css +2 -0
  33. package/lib/atom/select/index.js +32 -31
  34. package/lib/atom/select/index.js.map +1 -1
  35. package/lib/atom/select/style.css +66 -0
  36. package/lib/atom/select/test/fixtures/coorpmanager.js +21 -0
  37. package/lib/atom/select/test/fixtures/coorpmanager.js.map +1 -0
  38. package/lib/atom/select/test/fixtures.js +3 -0
  39. package/lib/atom/select/test/fixtures.js.map +1 -1
  40. package/lib/molecule/brand-form-group/index.js +3 -1
  41. package/lib/molecule/brand-form-group/index.js.map +1 -1
  42. package/lib/molecule/brand-form-group/test/fixtures/lookandfeel.js +30 -26
  43. package/lib/molecule/brand-form-group/test/fixtures/lookandfeel.js.map +1 -1
  44. package/lib/molecule/card/customer.js +6 -3
  45. package/lib/molecule/card/customer.js.map +1 -1
  46. package/lib/molecule/card/favorite.js +13 -4
  47. package/lib/molecule/card/favorite.js.map +1 -1
  48. package/lib/molecule/card/index.js +41 -12
  49. package/lib/molecule/card/index.js.map +1 -1
  50. package/lib/molecule/card/selectable.js +11 -4
  51. package/lib/molecule/card/selectable.js.map +1 -1
  52. package/lib/molecule/card/test/fixtures/default.js +20 -1
  53. package/lib/molecule/card/test/fixtures/default.js.map +1 -1
  54. package/lib/molecule/card-content/index.js +21 -7
  55. package/lib/molecule/card-content/index.js.map +1 -1
  56. package/lib/molecule/card-content/test/fixtures/card-no-progress-bar.js +6 -1
  57. package/lib/molecule/card-content/test/fixtures/card-no-progress-bar.js.map +1 -1
  58. package/lib/molecule/questions/qcm-drag/style.css +0 -1
  59. package/lib/molecule/questions/qcm-graphic/style.css +0 -2
  60. package/lib/molecule/questions/template/index.js +2 -1
  61. package/lib/molecule/questions/template/index.js.map +1 -1
  62. package/lib/molecule/questions/template/style.css +6 -0
  63. package/lib/molecule/wizard-summary/style.css +4 -4
  64. package/lib/variables/colors.css +2 -0
  65. package/package.json +2 -2
@@ -133,7 +133,7 @@
133
133
  text-align: center;
134
134
  }
135
135
 
136
- ul {
136
+ .container ul {
137
137
  list-style: none;
138
138
  padding: 0px;
139
139
  margin: 0px;
@@ -215,7 +215,7 @@ ul {
215
215
  margin: 0px;
216
216
  }
217
217
 
218
- label {
218
+ .container label {
219
219
  width: 100%;
220
220
  right: 0px;
221
221
  display: flex;
@@ -223,11 +223,11 @@ ul {
223
223
  cursor: pointer;
224
224
  }
225
225
 
226
- label .tabletSummaryTitle{
226
+ .container label .tabletSummaryTitle{
227
227
  flex: 0 1 100%;
228
228
  }
229
229
 
230
- label .tabletSummaryIcon{
230
+ .container label .tabletSummaryIcon{
231
231
  width: 12px;
232
232
  transition: all 0.5s ease;
233
233
  }
@@ -39,6 +39,7 @@
39
39
  @value cm_grey_200: #d7d7da;
40
40
  @value cm_grey_300: #C5C5C9;
41
41
  @value cm_grey_400: #9999A8;
42
+ @value cm_grey_450: #8393ad;
42
43
  @value cm_grey_500: #515161;
43
44
  @value cm_grey_700: #1D1D2B;
44
45
  @value cm_grey_800: #3a3a4a;
@@ -62,3 +63,4 @@
62
63
  @value cm_violet_podcast: #432ba7;
63
64
  @value cm_warning_50: rgba(255, 192, 67, 0.13);
64
65
  @value box_shadow_light_dark: rgba(0, 0, 0, 0.12);
66
+ @value box_shadow_medium_dark: rgba(0, 0, 0, 0.2);
@@ -3,27 +3,27 @@
3
3
  exports.__esModule = true;
4
4
  exports.default = exports.SelectOptionPropTypes = void 0;
5
5
 
6
- var _size2 = _interopRequireDefault(require("lodash/fp/size"));
6
+ var _react = _interopRequireWildcard(require("react"));
7
7
 
8
- var _includes2 = _interopRequireDefault(require("lodash/fp/includes"));
8
+ var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
 
10
- var _filter2 = _interopRequireDefault(require("lodash/fp/filter"));
10
+ var _classnames = _interopRequireDefault(require("classnames"));
11
11
 
12
- var _getOr2 = _interopRequireDefault(require("lodash/fp/getOr"));
12
+ var _filter = _interopRequireDefault(require("lodash/fp/filter"));
13
13
 
14
- var _get2 = _interopRequireDefault(require("lodash/fp/get"));
14
+ var _find = _interopRequireDefault(require("lodash/fp/find"));
15
15
 
16
- var _map2 = _interopRequireDefault(require("lodash/fp/map"));
16
+ var _get = _interopRequireDefault(require("lodash/fp/get"));
17
17
 
18
- var _keys2 = _interopRequireDefault(require("lodash/fp/keys"));
18
+ var _getOr = _interopRequireDefault(require("lodash/fp/getOr"));
19
19
 
20
- var _find2 = _interopRequireDefault(require("lodash/fp/find"));
20
+ var _includes = _interopRequireDefault(require("lodash/fp/includes"));
21
21
 
22
- var _react = _interopRequireWildcard(require("react"));
22
+ var _keys = _interopRequireDefault(require("lodash/fp/keys"));
23
23
 
24
- var _propTypes = _interopRequireDefault(require("prop-types"));
24
+ var _map = _interopRequireDefault(require("lodash/fp/map"));
25
25
 
26
- var _classnames = _interopRequireDefault(require("classnames"));
26
+ var _size = _interopRequireDefault(require("lodash/fp/size"));
27
27
 
28
28
  var _novaIcons = require("@coorpacademy/nova-icons");
29
29
 
@@ -33,12 +33,12 @@ var _getClassState = _interopRequireDefault(require("../../util/get-class-state"
33
33
 
34
34
  var _style = _interopRequireDefault(require("./style.css"));
35
35
 
36
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
37
+
36
38
  function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
37
39
 
38
40
  function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
39
41
 
40
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
41
-
42
42
  function _extends() { _extends = Object.assign || 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); }
43
43
 
44
44
  const themeStyle = {
@@ -50,8 +50,8 @@ const themeStyle = {
50
50
  sort: _style.default.sort,
51
51
  thematiques: _style.default.thematiques,
52
52
  player: _style.default.player,
53
- template: _style.default.template // we keep template in case it is used anywhere else?
54
-
53
+ template: _style.default.template,
54
+ coorpmanager: null
55
55
  };
56
56
 
57
57
  const Select = (props, context) => {
@@ -84,38 +84,39 @@ const Select = (props, context) => {
84
84
  const titleView = title ? /*#__PURE__*/_react.default.createElement("span", {
85
85
  className: _style.default.title
86
86
  }, title, " ") : null;
87
- const selected = (0, _react.useMemo)(() => multiple ? (0, _map2.default)((0, _get2.default)('value'), (0, _filter2.default)({
87
+ const selected = (0, _react.useMemo)(() => multiple ? (0, _map.default)((0, _get.default)('value'), (0, _filter.default)({
88
88
  selected: true
89
- }, options)) : (0, _get2.default)('value', (0, _find2.default)({
89
+ }, options)) : (0, _get.default)('value', (0, _find.default)({
90
90
  selected: true
91
91
  }, options)), [multiple, options]);
92
- const selectedLabel = (0, _react.useMemo)(() => multiple ? (0, _map2.default)((0, _get2.default)('name'), (0, _filter2.default)({
92
+ const selectedLabel = (0, _react.useMemo)(() => multiple ? (0, _map.default)((0, _get.default)('name'), (0, _filter.default)({
93
93
  selected: true
94
- }, options)) : (0, _get2.default)('name', (0, _find2.default)({
94
+ }, options)) : (0, _get.default)('name', (0, _find.default)({
95
95
  selected: true
96
96
  }, options)), [multiple, options]);
97
- const isSelectedInValidOption = (0, _react.useMemo)(() => theme === 'player' && (0, _getOr2.default)(false, 'name', (0, _find2.default)({
97
+ const isSelectedInValidOption = (0, _react.useMemo)(() => theme === 'player' && (0, _getOr.default)(false, 'name', (0, _find.default)({
98
98
  validOption: false,
99
99
  selected: true
100
100
  }, options)), [options, theme]);
101
101
  const handleChange = (0, _react.useMemo)(() => multiple ? e => {
102
- onChange((0, _map2.default)((0, _get2.default)('value'), e.target.selectedOptions));
102
+ onChange((0, _map.default)((0, _get.default)('value'), e.target.selectedOptions));
103
103
  } : e => {
104
104
  onChange(e.target.value);
105
105
  }, [onChange, multiple]);
106
- const black = (0, _react.useMemo)(() => (0, _getOr2.default)('#14171A', 'common.black', skin), [skin]);
107
- const color = (0, _react.useMemo)(() => (0, _getOr2.default)('#00B0FF', 'common.primary', skin), [skin]);
108
- const shouldUseSkinFontColor = (0, _react.useMemo)(() => !isSelectedInValidOption && selected && (0, _includes2.default)(theme, ['question', 'template', 'player']), [isSelectedInValidOption, selected, theme]);
106
+ const black = (0, _react.useMemo)(() => (0, _getOr.default)('#14171A', 'common.black', skin), [skin]);
107
+ const color = (0, _react.useMemo)(() => (0, _getOr.default)('#00B0FF', 'common.primary', skin), [skin]);
108
+ const shouldUseSkinFontColor = (0, _react.useMemo)(() => !isSelectedInValidOption && selected && (0, _includes.default)(theme, ['question', 'template', 'player']), [isSelectedInValidOption, selected, theme]);
109
+ const arrowColor = selected ? color : undefined;
109
110
  const arrowView = !multiple ? /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionNavigationArrowDown, {
110
- color: selected && (theme === 'question' || theme === 'template') ? color : black,
111
- className: _style.default.arrow
111
+ color: (0, _includes.default)(theme, ['question', 'template', 'player']) ? arrowColor : black,
112
+ className: shouldUseSkinFontColor ? _style.default.selectedArrow : _style.default.arrow
112
113
  }) : null;
113
114
  const behaviourClassName = (0, _react.useMemo)(() => (0, _getClassState.default)(_style.default.default, _style.default.modified, _style.default.error, modified, error), [error, modified]);
114
- const composedClassName = (0, _react.useMemo)(() => (0, _classnames.default)(theme ? themeStyle[theme] : behaviourClassName, selected ? _style.default.selected : _style.default.unselected, className), [behaviourClassName, className, selected, theme]);
115
- const labelSize = (0, _react.useMemo)(() => (0, _size2.default)(selectedLabel), [selectedLabel]);
115
+ const composedClassName = (0, _react.useMemo)(() => (0, _classnames.default)(theme && theme !== 'coorpmanager' ? themeStyle[theme] : behaviourClassName, selected ? _style.default.selected : _style.default.unselected, className), [behaviourClassName, className, selected, theme]);
116
+ const labelSize = (0, _react.useMemo)(() => (0, _size.default)(selectedLabel), [selectedLabel]);
116
117
  const isLongLabel = (0, _react.useMemo)(() => labelSize >= 65, [labelSize]);
117
118
  return /*#__PURE__*/_react.default.createElement("div", {
118
- className: composedClassName
119
+ className: (0, _classnames.default)(composedClassName, theme === 'coorpmanager' ? _style.default.coorpmanager : null)
119
120
  }, /*#__PURE__*/_react.default.createElement("label", {
120
121
  "data-name": "select-wrapper",
121
122
  style: _extends({}, shouldUseSkinFontColor && {
@@ -124,7 +125,7 @@ const Select = (props, context) => {
124
125
  className: _style.default.selectWrapper
125
126
  }, titleView, /*#__PURE__*/_react.default.createElement("span", {
126
127
  "data-name": "select-span",
127
- className: (0, _classnames.default)(_style.default.selectSpan, (0, _includes2.default)(theme, ['player', 'invalid', 'question', 'thematiques', 'template']) ? _style.default.noLabelCommon : null, borderClassName, isLongLabel ? _style.default.longLabel : null)
128
+ 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)
128
129
  }, selectedLabel), arrowView, /*#__PURE__*/_react.default.createElement("select", {
129
130
  "data-name": "native-select",
130
131
  className: _style.default.selectBox,
@@ -159,7 +160,7 @@ Select.propTypes = process.env.NODE_ENV !== "production" ? {
159
160
  description: _propTypes.default.string,
160
161
  required: _propTypes.default.bool,
161
162
  onChange: _propTypes.default.func,
162
- theme: _propTypes.default.oneOf((0, _keys2.default)(themeStyle)),
163
+ theme: _propTypes.default.oneOf((0, _keys.default)(themeStyle)),
163
164
  options: _propTypes.default.arrayOf(_propTypes.default.shape(SelectOptionPropTypes)),
164
165
  modified: _propTypes.default.bool,
165
166
  error: _propTypes.default.bool
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/atom/select/index.js"],"names":["themeStyle","filter","style","invalid","header","mooc","question","sort","thematiques","player","template","Select","props","context","name","options","className","borderClassName","onChange","multiple","disabled","required","description","theme","modified","error","title","propTitle","skin","optionList","map","option","index","value","selectOption","titleView","selected","selectedLabel","isSelectedInValidOption","validOption","handleChange","e","target","selectedOptions","black","color","shouldUseSkinFontColor","arrowView","arrow","behaviourClassName","default","composedClassName","unselected","labelSize","isLongLabel","selectWrapper","selectSpan","noLabelCommon","longLabel","selectBox","SelectOptionPropTypes","PropTypes","string","isRequired","oneOfType","number","bool","contextTypes","Provider","childContextTypes","propTypes","func","oneOf","arrayOf","shape"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,UAAU,GAAG;AACjBC,EAAAA,MAAM,EAAEC,eAAMD,MADG;AAEjBE,EAAAA,OAAO,EAAED,eAAMC,OAFE;AAGjBC,EAAAA,MAAM,EAAEF,eAAME,MAHG;AAIjBC,EAAAA,IAAI,EAAEH,eAAMG,IAJK;AAKjBC,EAAAA,QAAQ,EAAEJ,eAAMI,QALC;AAMjBC,EAAAA,IAAI,EAAEL,eAAMK,IANK;AAOjBC,EAAAA,WAAW,EAAEN,eAAMM,WAPF;AAQjBC,EAAAA,MAAM,EAAEP,eAAMO,MARG;AASjBC,EAAAA,QAAQ,EAAER,eAAMQ,QATC,CASQ;;AATR,CAAnB;;AAYA,MAAMC,MAAM,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;AACjC,QAAM;AACJC,IAAAA,IADI;AAEJC,IAAAA,OAAO,GAAG,EAFN;AAGJC,IAAAA,SAHI;AAIJC,IAAAA,eAJI;AAKJC,IAAAA,QALI;AAMJC,IAAAA,QAAQ,GAAG,KANP;AAOJC,IAAAA,QAPI;AAQJC,IAAAA,QARI;AASJC,IAAAA,WATI;AAUJC,IAAAA,KAVI;AAWJC,IAAAA,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AAUC,MAPN;AAQjBzC,EAAAA,QAAQ,EAAEwC,mBAAUK,IARH;AASjBhD,EAAAA,QAAQ,EAAE2C,mBAAUU,IATH;AAUjBhD,EAAAA,KAAK,EAAEsC,mBAAUW,KAAV,CAAgB,oBAAKxE,UAAL,CAAhB,CAVU;AAWjBe,EAAAA,OAAO,EAAE8C,mBAAUY,OAAV,CAAkBZ,mBAAUa,KAAV,CAAgBd,qBAAhB,CAAlB,CAXQ;AAYjBpC,EAAAA,QAAQ,EAAEqC,mBAAUK,IAZH;AAajBzC,EAAAA,KAAK,EAAEoC,mBAAUK;AAbA,CAAnB;eAgBevD,M","sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {find, keys, map, get, getOr, filter, includes, size} from 'lodash/fp';\nimport {NovaCompositionNavigationArrowDown as ArrowDown} from '@coorpacademy/nova-icons';\nimport Provider 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 // we keep template in case it is used anywhere else?\n};\n\nconst Select = (props, context) => {\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 } = props;\n\n const {skin} = context;\n\n const title = useMemo(() => (propTitle ? `${propTitle}${required ? '*' : ''}` : null), [\n propTitle,\n 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 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 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\n const arrowView = !multiple ? (\n <ArrowDown\n color={selected && (theme === 'question' || theme === 'template') ? color : black}\n className={style.arrow}\n />\n ) : null;\n const behaviourClassName = useMemo(\n () => getClassState(style.default, style.modified, style.error, modified, error),\n [error, modified]\n );\n const composedClassName = useMemo(\n () =>\n classnames(\n theme ? themeStyle[theme] : behaviourClassName,\n selected ? style.selected : style.unselected,\n className\n ),\n [behaviourClassName, 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 className={composedClassName}>\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 >\n {selectedLabel}\n </span>\n {arrowView}\n <select\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 >\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};\n\nexport default Select;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../src/atom/select/index.js"],"names":["themeStyle","filter","style","invalid","header","mooc","question","sort","thematiques","player","template","coorpmanager","Select","props","context","name","options","className","borderClassName","onChange","multiple","disabled","required","description","theme","modified","error","title","propTitle","skin","optionList","map","option","index","value","selectOption","titleView","selected","selectedLabel","isSelectedInValidOption","validOption","handleChange","e","target","selectedOptions","black","color","shouldUseSkinFontColor","arrowColor","undefined","arrowView","selectedArrow","arrow","behaviourClassName","default","composedClassName","unselected","labelSize","isLongLabel","selectWrapper","selectSpan","noLabelCommon","longLabel","selectBox","SelectOptionPropTypes","PropTypes","string","isRequired","oneOfType","number","bool","contextTypes","Provider","childContextTypes","propTypes","func","oneOf","arrayOf","shape"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,UAAU,GAAG;AACjBC,EAAAA,MAAM,EAAEC,eAAMD,MADG;AAEjBE,EAAAA,OAAO,EAAED,eAAMC,OAFE;AAGjBC,EAAAA,MAAM,EAAEF,eAAME,MAHG;AAIjBC,EAAAA,IAAI,EAAEH,eAAMG,IAJK;AAKjBC,EAAAA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;AAwJO,MAAMyC,qBAAqB,GAAG;AACnCjD,EAAAA,IAAI,EAAEkD,mBAAUC,MAAV,CAAiBC,UADY;AAEnCjC,EAAAA,KAAK,EAAE+B,mBAAUG,SAAV,CAAoB,CAACH,mBAAUC,MAAX,EAAmBD,mBAAUI,MAA7B,CAApB,CAF4B;AAGnChC,EAAAA,QAAQ,EAAE4B,mBAAUK,IAHe;AAInC9B,EAAAA,WAAW,EAAEyB,mBAAUK;AAJY,CAA9B;;AAOP1D,MAAM,CAAC2D,YAAP,GAAsB;AACpB1C,EAAAA,IAAI,EAAE2C,kBAASC,iBAAT,CAA2B5C;AADb,CAAtB;AAIAjB,MAAM,CAAC8D,SAAP,2CAAmB;AACjB/C,EAAAA,KAAK,EAAEsC,mBAAUC,MADA;AAEjBnD,EAAAA,IAAI,EAAEkD,mBAAUC,MAFC;AAGjBjD,EAAAA,SAAS,EAAEgD,mBAAUC,MAHJ;AAIjBhD,EAAAA,eAAe,EAAE+C,mBAAUC,MAJV;AAKjB7C,EAAAA,QAAQ,EAAE4C,mBAAUK,IALH;AAMjBlD,EAAAA,QAAQ,EAAE6C,mBAAUK,IANH;AAOjB/C,EAAAA,WAAW,EAAE0C,mBAAUC,MAPN;AAQjB5C,EAAAA,QAAQ,EAAE2C,mBAAUK,IARH;AASjBnD,EAAAA,QAAQ,EAAE8C,mBAAUU,IATH;AAUjBnD,EAAAA,KAAK,EAAEyC,mBAAUW,KAAV,CAAgB,mBAAK5E,UAAL,CAAhB,CAVU;AAWjBgB,EAAAA,OAAO,EAAEiD,mBAAUY,OAAV,CAAkBZ,mBAAUa,KAAV,CAAgBd,qBAAhB,CAAlB,CAXQ;AAYjBvC,EAAAA,QAAQ,EAAEwC,mBAAUK,IAZH;AAajB5C,EAAAA,KAAK,EAAEuC,mBAAUK;AAbA,CAAnB;eAgBe1D,M","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 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, context) => {\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 } = props;\n\n const {skin} = context;\n\n const title = useMemo(() => (propTitle ? `${propTitle}${required ? '*' : ''}` : null), [\n propTitle,\n 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 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 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 />\n ) : null;\n const behaviourClassName = 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] : behaviourClassName,\n selected ? style.selected : style.unselected,\n className\n ),\n [behaviourClassName, 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 >\n {selectedLabel}\n </span>\n {arrowView}\n <select\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 >\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};\n\nexport default Select;\n"],"file":"index.js"}
@@ -1,5 +1,6 @@
1
1
  @value breakpoints: "../../variables/breakpoints.css";
2
2
  @value mobile from breakpoints;
3
+ @value tablet from breakpoints;
3
4
  @value colors: "../../variables/colors.css";
4
5
  @value orange from colors;
5
6
  @value negative from colors;
@@ -11,12 +12,43 @@
11
12
  @value xtraLightGrey from colors;
12
13
  @value transparent from colors;
13
14
  @value box_shadow_light_dark from colors;
15
+ @value box_shadow_medium_dark from colors;
14
16
  @value cm_blue_900 from colors;
17
+ @value cm_grey_450 from colors;
15
18
 
16
19
  .default {
17
20
  display: flex;
18
21
  }
19
22
 
23
+ .coorpmanager {
24
+ composes: default;
25
+ }
26
+
27
+ div.coorpmanager label.selectWrapper {
28
+ max-width: fit-content;
29
+ }
30
+
31
+ .coorpmanager label.selectWrapper select.selectBox {
32
+ padding-left: 10px;
33
+ position: relative;
34
+ border-radius: 2px;
35
+ border-width: 1px;
36
+ width: 260px;
37
+ min-width: 194px;
38
+ }
39
+
40
+ @media tablet {
41
+ .coorpmanager label.selectWrapper .description {
42
+ max-width: 120px;
43
+ }
44
+ }
45
+
46
+ @media mobile {
47
+ .coorpmanager label.selectWrapper select.selectBox {
48
+ width: 100%;
49
+ min-width: 180px;
50
+ }
51
+ }
20
52
  .error {
21
53
  composes: default;
22
54
  }
@@ -85,6 +117,7 @@
85
117
  .player .selectWrapper {
86
118
  min-width: min-content;
87
119
  height: min-content;
120
+ margin-right: 0;
88
121
  }
89
122
 
90
123
  .modified select {
@@ -132,6 +165,22 @@
132
165
  z-index: 11;
133
166
  }
134
167
 
168
+ .selectedArrow {
169
+ composes: arrow;
170
+ }
171
+
172
+ .player .selectWrapper .arrow {
173
+ color: cm_grey_450;
174
+ }
175
+
176
+ .player:hover .arrow {
177
+ color: cm_blue_900;
178
+ }
179
+
180
+ .player:hover .selectedArrow {
181
+ color: inherit;
182
+ }
183
+
135
184
  @media mobile {
136
185
  .arrow::after {
137
186
  right: 10px;
@@ -248,6 +297,12 @@ div.player .noLabelCommon.selectSpan {
248
297
  min-width: min-content;
249
298
  width: 100%;
250
299
  white-space: nowrap;
300
+ color: cm_blue_900;
301
+ border-width: 0;
302
+ }
303
+
304
+ div.player:hover span.selectSpan {
305
+ box-shadow: 0px 4px 16px box_shadow_medium_dark;
251
306
  }
252
307
 
253
308
  .no-label .selectBox {
@@ -467,6 +522,17 @@ div.player .noLabelCommon.selectSpan {
467
522
  composes: no-label;
468
523
  }
469
524
 
525
+ .player .selectBox {
526
+ border: 0;
527
+ }
528
+
529
+ /* mozilla specific styling */
530
+ @supports (-moz-appearance:none) {
531
+ .player label.selectWrapper select.selectBox {
532
+ width: 100%;
533
+ }
534
+ }
535
+
470
536
  /*
471
537
  Header
472
538
  */
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.default = void 0;
5
+
6
+ var _defaultsDeep2 = _interopRequireDefault(require("lodash/fp/defaultsDeep"));
7
+
8
+ var _default2 = _interopRequireDefault(require("./default"));
9
+
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+
12
+ const {
13
+ props
14
+ } = _default2.default;
15
+ var _default = {
16
+ props: (0, _defaultsDeep2.default)(props, {
17
+ theme: 'coorpmanager'
18
+ })
19
+ };
20
+ exports.default = _default;
21
+ //# sourceMappingURL=coorpmanager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/atom/select/test/fixtures/coorpmanager.js"],"names":["props","Default","theme"],"mappings":";;;;;;;AACA;;;;AAEA,MAAM;AAACA,EAAAA;AAAD,IAAUC,iBAAhB;eAEe;AACbD,EAAAA,KAAK,EAAE,4BAAaA,KAAb,EAAoB;AACzBE,IAAAA,KAAK,EAAE;AADkB,GAApB;AADM,C","sourcesContent":["import {defaultsDeep} from 'lodash/fp';\nimport Default from './default';\n\nconst {props} = Default;\n\nexport default {\n props: defaultsDeep(props, {\n theme: 'coorpmanager'\n })\n};\n"],"file":"coorpmanager.js"}
@@ -8,6 +8,8 @@ var _renderComponent = _interopRequireDefault(require("../../../test/helpers/ren
8
8
 
9
9
  var _ = _interopRequireDefault(require(".."));
10
10
 
11
+ var _coorpmanager = _interopRequireDefault(require("./fixtures/coorpmanager"));
12
+
11
13
  var _default = _interopRequireDefault(require("./fixtures/default"));
12
14
 
13
15
  var _disabled = _interopRequireDefault(require("./fixtures/disabled"));
@@ -50,6 +52,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
50
52
  t.not(value, undefined, `PropType for "Atom.AtomSelect.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
51
53
  });
52
54
  });
55
+ (0, _ava.default)('Atom › AtomSelect › Coorpmanager › should be rendered', _renderComponent.default, _.default, _coorpmanager.default);
53
56
  (0, _ava.default)('Atom › AtomSelect › Default › should be rendered', _renderComponent.default, _.default, _default.default);
54
57
  (0, _ava.default)('Atom › AtomSelect › Disabled › should be rendered', _renderComponent.default, _.default, _disabled.default);
55
58
  (0, _ava.default)('Atom › AtomSelect › Error › should be rendered', _renderComponent.default, _.default, _error.default);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/atom/select/test/fixtures.js"],"names":["t","pass","AtomSelect","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureDisabled","fixtureError","fixtureFilter","fixtureInvalid","fixtureModified","fixtureMooc","fixtureMultipleSelected","fixtureMultiple","fixturePlayer","fixtureQuestion","fixtureRequiredWithTitle","fixtureRequired","fixtureSort","fixtureTemplate","fixtureThematiquesLong","fixtureThematiques"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;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AAK,+CAAL,EAAsDb,wBAAtD,EAA4EN,SAA5E,EAAwFoB,aAAxF;AACA,kBAAK,mDAAL,EAA0Dd,wBAA1D,EAAgFN,SAAhF,EAA4FqB,iBAA5F;AACA,kBAAK,0DAAL,EAAiEf,wBAAjE,EAAuFN,SAAvF,EAAmGsB,wBAAnG;AACA,kBAAK,sDAAL,EAA6DhB,wBAA7D,EAAmFN,SAAnF,EAA+FuB,oBAA/F","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomSelect from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureDisabled from './fixtures/disabled';\nimport fixtureError from './fixtures/error';\nimport fixtureFilter from './fixtures/filter';\nimport fixtureInvalid from './fixtures/invalid';\nimport fixtureModified from './fixtures/modified';\nimport fixtureMooc from './fixtures/mooc';\nimport fixtureMultipleSelected from './fixtures/multiple-selected';\nimport fixtureMultiple from './fixtures/multiple';\nimport fixturePlayer from './fixtures/player';\nimport fixtureQuestion from './fixtures/question';\nimport fixtureRequiredWithTitle from './fixtures/required-with-title';\nimport fixtureRequired from './fixtures/required';\nimport fixtureSort from './fixtures/sort';\nimport fixtureTemplate from './fixtures/template';\nimport fixtureThematiquesLong from './fixtures/thematiques-long';\nimport fixtureThematiques from './fixtures/thematiques';\n\ntest('Atom › AtomSelect > should have valid propTypes', t => {\n t.pass();\n forEach(AtomSelect.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomSelect.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomSelect › Default › should be rendered', renderComponentMacro, AtomSelect, fixtureDefault);\ntest('Atom › AtomSelect › Disabled › should be rendered', renderComponentMacro, AtomSelect, fixtureDisabled);\ntest('Atom › AtomSelect › Error › should be rendered', renderComponentMacro, AtomSelect, fixtureError);\ntest('Atom › AtomSelect › Filter › should be rendered', renderComponentMacro, AtomSelect, fixtureFilter);\ntest('Atom › AtomSelect › Invalid › should be rendered', renderComponentMacro, AtomSelect, fixtureInvalid);\ntest('Atom › AtomSelect › Modified › should be rendered', renderComponentMacro, AtomSelect, fixtureModified);\ntest('Atom › AtomSelect › Mooc › should be rendered', renderComponentMacro, AtomSelect, fixtureMooc);\ntest('Atom › AtomSelect › MultipleSelected › should be rendered', renderComponentMacro, AtomSelect, fixtureMultipleSelected);\ntest('Atom › AtomSelect › Multiple › should be rendered', renderComponentMacro, AtomSelect, fixtureMultiple);\ntest('Atom › AtomSelect › Player › should be rendered', renderComponentMacro, AtomSelect, fixturePlayer);\ntest('Atom › AtomSelect › Question › should be rendered', renderComponentMacro, AtomSelect, fixtureQuestion);\ntest('Atom › AtomSelect › RequiredWithTitle › should be rendered', renderComponentMacro, AtomSelect, fixtureRequiredWithTitle);\ntest('Atom › AtomSelect › Required › should be rendered', renderComponentMacro, AtomSelect, fixtureRequired);\ntest('Atom › AtomSelect › Sort › should be rendered', renderComponentMacro, AtomSelect, fixtureSort);\ntest('Atom › AtomSelect › Template › should be rendered', renderComponentMacro, AtomSelect, fixtureTemplate);\ntest('Atom › AtomSelect › ThematiquesLong › should be rendered', renderComponentMacro, AtomSelect, fixtureThematiquesLong);\ntest('Atom › AtomSelect › Thematiques › should be rendered', renderComponentMacro, AtomSelect, fixtureThematiques);\n"],"file":"fixtures.js"}
1
+ {"version":3,"sources":["../../../../src/atom/select/test/fixtures.js"],"names":["t","pass","AtomSelect","propTypes","value","key","not","undefined","renderComponentMacro","fixtureCoorpmanager","fixtureDefault","fixtureDisabled","fixtureError","fixtureFilter","fixtureInvalid","fixtureModified","fixtureMooc","fixtureMultipleSelected","fixtureMultiple","fixturePlayer","fixtureQuestion","fixtureRequiredWithTitle","fixtureRequired","fixtureSort","fixtureTemplate","fixtureThematiquesLong","fixtureThematiques"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAC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hF,EAA4FoB,iBAA5F;AACA,kBAAK,+CAAL,EAAsDd,wBAAtD,EAA4EN,SAA5E,EAAwFqB,aAAxF;AACA,kBAAK,mDAAL,EAA0Df,wBAA1D,EAAgFN,SAAhF,EAA4FsB,iBAA5F;AACA,kBAAK,0DAAL,EAAiEhB,wBAAjE,EAAuFN,SAAvF,EAAmGuB,wBAAnG;AACA,kBAAK,sDAAL,EAA6DjB,wBAA7D,EAAmFN,SAAnF,EAA+FwB,oBAA/F","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomSelect from '..';\nimport fixtureCoorpmanager from './fixtures/coorpmanager';\nimport fixtureDefault from './fixtures/default';\nimport fixtureDisabled from './fixtures/disabled';\nimport fixtureError from './fixtures/error';\nimport fixtureFilter from './fixtures/filter';\nimport fixtureInvalid from './fixtures/invalid';\nimport fixtureModified from './fixtures/modified';\nimport fixtureMooc from './fixtures/mooc';\nimport fixtureMultipleSelected from './fixtures/multiple-selected';\nimport fixtureMultiple from './fixtures/multiple';\nimport fixturePlayer from './fixtures/player';\nimport fixtureQuestion from './fixtures/question';\nimport fixtureRequiredWithTitle from './fixtures/required-with-title';\nimport fixtureRequired from './fixtures/required';\nimport fixtureSort from './fixtures/sort';\nimport fixtureTemplate from './fixtures/template';\nimport fixtureThematiquesLong from './fixtures/thematiques-long';\nimport fixtureThematiques from './fixtures/thematiques';\n\ntest('Atom › AtomSelect > should have valid propTypes', t => {\n t.pass();\n forEach(AtomSelect.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomSelect.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomSelect › Coorpmanager › should be rendered', renderComponentMacro, AtomSelect, fixtureCoorpmanager);\ntest('Atom › AtomSelect › Default › should be rendered', renderComponentMacro, AtomSelect, fixtureDefault);\ntest('Atom › AtomSelect › Disabled › should be rendered', renderComponentMacro, AtomSelect, fixtureDisabled);\ntest('Atom › AtomSelect › Error › should be rendered', renderComponentMacro, AtomSelect, fixtureError);\ntest('Atom › AtomSelect › Filter › should be rendered', renderComponentMacro, AtomSelect, fixtureFilter);\ntest('Atom › AtomSelect › Invalid › should be rendered', renderComponentMacro, AtomSelect, fixtureInvalid);\ntest('Atom › AtomSelect › Modified › should be rendered', renderComponentMacro, AtomSelect, fixtureModified);\ntest('Atom › AtomSelect › Mooc › should be rendered', renderComponentMacro, AtomSelect, fixtureMooc);\ntest('Atom › AtomSelect › MultipleSelected › should be rendered', renderComponentMacro, AtomSelect, fixtureMultipleSelected);\ntest('Atom › AtomSelect › Multiple › should be rendered', renderComponentMacro, AtomSelect, fixtureMultiple);\ntest('Atom › AtomSelect › Player › should be rendered', renderComponentMacro, AtomSelect, fixturePlayer);\ntest('Atom › AtomSelect › Question › should be rendered', renderComponentMacro, AtomSelect, fixtureQuestion);\ntest('Atom › AtomSelect › RequiredWithTitle › should be rendered', renderComponentMacro, AtomSelect, fixtureRequiredWithTitle);\ntest('Atom › AtomSelect › Required › should be rendered', renderComponentMacro, AtomSelect, fixtureRequired);\ntest('Atom › AtomSelect › Sort › should be rendered', renderComponentMacro, AtomSelect, fixtureSort);\ntest('Atom › AtomSelect › Template › should be rendered', renderComponentMacro, AtomSelect, fixtureTemplate);\ntest('Atom › AtomSelect › ThematiquesLong › should be rendered', renderComponentMacro, AtomSelect, fixtureThematiquesLong);\ntest('Atom › AtomSelect › Thematiques › should be rendered', renderComponentMacro, AtomSelect, fixtureThematiques);\n"],"file":"fixtures.js"}
@@ -93,7 +93,9 @@ const buildInput = field => {
93
93
  return /*#__PURE__*/_react.default.createElement(_inputDoublestep.default, field);
94
94
 
95
95
  case 'select':
96
- return /*#__PURE__*/_react.default.createElement(_select.default, field);
96
+ return /*#__PURE__*/_react.default.createElement(_select.default, _extends({}, field, {
97
+ theme: 'coorpmanager'
98
+ }));
97
99
 
98
100
  case 'selectMultiple':
99
101
  return /*#__PURE__*/_react.default.createElement(_selectMultiple.default, field);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/molecule/brand-form-group/index.js"],"names":["inputContainerStyle","default","style","defaultWidth","medium","mediumWidth","large","largeWidth","buildInput","field","type","buildField","index","input","theme","size","styleInput","BrandFormGroup","props","title","subtitle","fieldsLayout","groupLayout","fields","fieldsList","convert","cap","wrapper","groupGrid","titleWrapper","grid","propTypes","PropTypes","string","arrayOf","oneOfType","shape","Autocomplete","oneOf","InputColor","InputReadonly","InputSwitch","InputTextarea","InputHTML","InputDoublestep","Select","InputCheckbox","ImageUpload","SetupSlider","SetupSections","InputText","BrandDownloadBox","BrandUploadBox","Button","SelectMultiple","Roles"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,mBAAmB,GAAG;AAC1BC,EAAAA,OAAO,EAAEC,eAAMC,YADW;AAE1BC,EAAAA,MAAM,EAAEF,eAAMG,WAFY;AAG1BC,EAAAA,KAAK,EAAEJ,eAAMK;AAHa,CAA5B;;AAMA,MAAMC,UAAU,GAAGC,KAAK,IAAI;AAC1B,QAAM;AAACC,IAAAA;AAAD,MAASD,KAAf;;AAEA,UAAQC,IAAR;AACE,SAAK,cAAL;AACE,0BAAO,6BAAC,qBAAD,EAAkBD,KAAlB,CAAP;;AACF,SAAK,OAAL;AACE,0BAAO,6BAAC,mBAAD,EAAgBA,KAAhB,CAAP;;AACF,SAAK,UAAL;AACE,0BAAO,6BAAC,sBAAD,EAAmBA,KAAnB,CAAP;;AACF,SAAK,QAAL;AACE,0BAAO,6BAAC,oBAAD,EAAiBA,KAAjB,CAAP;;AACF,SAAK,UAAL;AACE,0BAAO,6BAAC,sBAAD,EAAmBA,KAAnB,CAAP;;AACF,SAAK,MAAL;AACE,0BAAO,6BAAC,kBAAD,EAAeA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AyElBN,mBAAUI,KAAV,uBACKmB,2BAAMxB,SADX;AAEErB,IAAAA,IAAI,EAAEsB,mBAAUM,KAAV,CAAgB,CAAC,OAAD,CAAhB;AAFR,KAzEkB,EA6ElBN,mBAAUI,KAAV,CAAgBc,mBAAUnB,SAA1B,CA7EkB,CAApB,CADM;AALiB,CAA3B;eAuFed,c","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {keys, map, snakeCase} from 'lodash/fp';\nimport classNames from 'classnames';\nimport Autocomplete from '../../atom/autocomplete';\nimport Select from '../../atom/select';\nimport SelectMultiple from '../select-multiple';\nimport InputText from '../../atom/input-text';\nimport InputColor from '../../atom/input-color';\nimport InputCheckbox from '../../atom/input-checkbox';\nimport InputReadonly from '../../atom/input-readonly';\nimport InputSwitch from '../../atom/input-switch';\nimport BrandUploadBox from '../brand-upload-box';\nimport BrandDownloadBox from '../brand-download-box';\nimport Button from '../../atom/button';\nimport InputTextarea from '../../atom/input-textarea';\nimport InputHTML from '../../atom/input-html';\nimport InputDoublestep from '../../atom/input-doublestep';\nimport ImageUpload from '../../atom/image-upload';\nimport SetupSlider from '../setup-slider';\nimport SetupSections from '../setup-sections';\nimport Title from '../../atom/title';\nimport Roles from '../coorp-manager-roles';\nimport style from './style.css';\n\nconst inputContainerStyle = {\n default: style.defaultWidth,\n medium: style.mediumWidth,\n large: style.largeWidth\n};\n\nconst buildInput = field => {\n const {type} = field;\n\n switch (type) {\n case 'autoComplete':\n return <Autocomplete {...field} />;\n case 'color':\n return <InputColor {...field} />;\n case 'readonly':\n return <InputReadonly {...field} />;\n case 'switch':\n return <InputSwitch {...field} />;\n case 'textarea':\n return <InputTextarea {...field} />;\n case 'html':\n return <InputHTML {...field} />;\n case 'doublestep':\n return <InputDoublestep {...field} />;\n case 'select':\n return <Select {...field} />;\n case 'selectMultiple':\n return <SelectMultiple {...field} />;\n case 'checkbox':\n return <InputCheckbox {...field} />;\n case 'image':\n return <ImageUpload {...field} />;\n case 'slider':\n return <SetupSlider {...field} />;\n case 'sections':\n return <SetupSections {...field} />;\n case 'text':\n return <InputText {...field} />;\n case 'downloadbox':\n return <BrandDownloadBox {...field} />;\n case 'uploadbox':\n return <BrandUploadBox {...field} />;\n case 'button':\n case 'link':\n return <Button {...field} />;\n case 'roles':\n return <Roles {...field} />;\n default:\n return <InputText {...field} />;\n }\n};\n\nconst buildField = (field, index) => {\n const input = buildInput(field);\n const {theme, size = 'default'} = field;\n const styleInput = theme === 'coorpmanager' ? inputContainerStyle[size] : style.field;\n\n return (\n <div className={styleInput} key={index}>\n {input}\n </div>\n );\n};\n\nconst BrandFormGroup = props => {\n const {title, subtitle = '', fieldsLayout = '', groupLayout = '', fields = []} = props;\n const fieldsList = map.convert({cap: false})(buildField, fields);\n\n return (\n <div\n data-name={`brand_form_group_${snakeCase(title)}`}\n className={classNames(style.wrapper, groupLayout === 'grid' && style.groupGrid)}\n >\n <div className={style.titleWrapper}>\n <Title title={title} subtitle={subtitle} type={'form-group'} />\n </div>\n <div className={fieldsLayout === 'grid' ? style.grid : null}>{fieldsList}</div>\n </div>\n );\n};\n\nBrandFormGroup.propTypes = {\n title: PropTypes.string,\n subtitle: PropTypes.string,\n fieldsLayout: PropTypes.string,\n groupLayout: PropTypes.string,\n fields: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.shape({\n ...Autocomplete.propTypes,\n type: PropTypes.oneOf(['autoComplete']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...InputColor.propTypes,\n type: PropTypes.oneOf(['color'])\n }),\n PropTypes.shape({\n ...InputReadonly.propTypes,\n type: PropTypes.oneOf(['readonly'])\n }),\n PropTypes.shape({\n ...InputSwitch.propTypes,\n type: PropTypes.oneOf(['switch'])\n }),\n PropTypes.shape({\n ...InputTextarea.propTypes,\n type: PropTypes.oneOf(['textarea']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...InputHTML.propTypes,\n type: PropTypes.oneOf(['html'])\n }),\n PropTypes.shape({\n ...InputDoublestep.propTypes,\n type: PropTypes.oneOf(['doublestep'])\n }),\n PropTypes.shape({\n ...Select.propTypes,\n type: PropTypes.oneOf(['select']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...InputCheckbox.propTypes,\n type: PropTypes.oneOf(['checkbox'])\n }),\n PropTypes.shape({\n ...ImageUpload.propTypes,\n type: PropTypes.oneOf(['image'])\n }),\n PropTypes.shape({\n ...SetupSlider.propTypes,\n type: PropTypes.oneOf(['slider'])\n }),\n PropTypes.shape({\n ...SetupSections.propTypes,\n type: PropTypes.oneOf(['sections'])\n }),\n PropTypes.shape({\n ...InputText.propTypes,\n type: PropTypes.oneOf(['text']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...BrandDownloadBox.propTypes,\n type: PropTypes.oneOf(['downloadbox'])\n }),\n PropTypes.shape({\n ...BrandUploadBox.propTypes,\n type: PropTypes.oneOf(['uploadbox'])\n }),\n PropTypes.shape({\n ...Button.propTypes,\n type: PropTypes.oneOf(['button'])\n }),\n PropTypes.shape({\n ...SelectMultiple.propTypes,\n type: PropTypes.oneOf(['selectMultiple'])\n }),\n PropTypes.shape({\n ...Roles.propTypes,\n type: PropTypes.oneOf(['roles'])\n }),\n PropTypes.shape(InputText.propTypes)\n ])\n )\n};\nexport default BrandFormGroup;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../src/molecule/brand-form-group/index.js"],"names":["inputContainerStyle","default","style","defaultWidth","medium","mediumWidth","large","largeWidth","buildInput","field","type","buildField","index","input","theme","size","styleInput","BrandFormGroup","props","title","subtitle","fieldsLayout","groupLayout","fields","fieldsList","convert","cap","wrapper","groupGrid","titleWrapper","grid","propTypes","PropTypes","string","arrayOf","oneOfType","shape","Autocomplete","oneOf","InputColor","InputReadonly","InputSwitch","InputTextarea","InputHTML","InputDoublestep","Select","InputCheckbox","ImageUpload","SetupSlider","SetupSections","In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CAAhB;AAFR,KA5CkB,EAgDlBN,mBAAUI,KAAV,uBACKa,uBAAclB,SADnB;AAEErB,IAAAA,IAAI,EAAEsB,mBAAUM,KAAV,CAAgB,CAAC,UAAD,CAAhB;AAFR,KAhDkB,EAoDlBN,mBAAUI,KAAV,uBACKc,mBAAUnB,SADf;AAEErB,IAAAA,IAAI,EAAEsB,mBAAUM,KAAV,CAAgB,CAAC,MAAD,CAAhB,CAFR;AAGEvB,IAAAA,IAAI,EAAEiB,mBAAUM,KAAV,CAAgB,oBAAKtC,mBAAL,CAAhB;AAHR,KApDkB,EAyDlBgC,mBAAUI,KAAV,uBACKe,0BAAiBpB,SADtB;AAEErB,IAAAA,IAAI,EAAEsB,mBAAUM,KAAV,CAAgB,CAAC,aAAD,CAAhB;AAFR,KAzDkB,EA6DlBN,mBAAUI,KAAV,uBACKgB,wBAAerB,SADpB;AAEErB,IAAAA,IAAI,EAAEsB,mBAAUM,KAAV,CAAgB,CAAC,WAAD,CAAhB;AAFR,KA7DkB,EAiElBN,mBAAUI,KAAV,uBACKiB,gBAAOtB,SADZ;AAEErB,IAAAA,IAAI,EAAEsB,mBAAUM,KAAV,CAAgB,CAAC,QAAD,CAAhB;AAFR,KAjEkB,EAqElBN,mBAAUI,KAAV,uBACKkB,wBAAevB,SADpB;AAEErB,IAAAA,IAAI,EAAEsB,mBAAUM,KAAV,CAAgB,CAAC,gBAAD,CAAhB;AAFR,KArEkB,EAyElBN,mBAAUI,KAAV,uBACKmB,2BAAMxB,SADX;AAEErB,IAAAA,IAAI,EAAEsB,mBAAUM,KAAV,CAAgB,CAAC,OAAD,CAAhB;AAFR,KAzEkB,EA6ElBN,mBAAUI,KAAV,CAAgBc,mBAAUnB,SAA1B,CA7EkB,CAApB,CADM;AALiB,CAA3B;eAuFed,c","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {keys, map, snakeCase} from 'lodash/fp';\nimport classNames from 'classnames';\nimport Autocomplete from '../../atom/autocomplete';\nimport Select from '../../atom/select';\nimport SelectMultiple from '../select-multiple';\nimport InputText from '../../atom/input-text';\nimport InputColor from '../../atom/input-color';\nimport InputCheckbox from '../../atom/input-checkbox';\nimport InputReadonly from '../../atom/input-readonly';\nimport InputSwitch from '../../atom/input-switch';\nimport BrandUploadBox from '../brand-upload-box';\nimport BrandDownloadBox from '../brand-download-box';\nimport Button from '../../atom/button';\nimport InputTextarea from '../../atom/input-textarea';\nimport InputHTML from '../../atom/input-html';\nimport InputDoublestep from '../../atom/input-doublestep';\nimport ImageUpload from '../../atom/image-upload';\nimport SetupSlider from '../setup-slider';\nimport SetupSections from '../setup-sections';\nimport Title from '../../atom/title';\nimport Roles from '../coorp-manager-roles';\nimport style from './style.css';\n\nconst inputContainerStyle = {\n default: style.defaultWidth,\n medium: style.mediumWidth,\n large: style.largeWidth\n};\n\nconst buildInput = field => {\n const {type} = field;\n\n switch (type) {\n case 'autoComplete':\n return <Autocomplete {...field} />;\n case 'color':\n return <InputColor {...field} />;\n case 'readonly':\n return <InputReadonly {...field} />;\n case 'switch':\n return <InputSwitch {...field} />;\n case 'textarea':\n return <InputTextarea {...field} />;\n case 'html':\n return <InputHTML {...field} />;\n case 'doublestep':\n return <InputDoublestep {...field} />;\n case 'select':\n return <Select {...field} theme={'coorpmanager'} />;\n case 'selectMultiple':\n return <SelectMultiple {...field} />;\n case 'checkbox':\n return <InputCheckbox {...field} />;\n case 'image':\n return <ImageUpload {...field} />;\n case 'slider':\n return <SetupSlider {...field} />;\n case 'sections':\n return <SetupSections {...field} />;\n case 'text':\n return <InputText {...field} />;\n case 'downloadbox':\n return <BrandDownloadBox {...field} />;\n case 'uploadbox':\n return <BrandUploadBox {...field} />;\n case 'button':\n case 'link':\n return <Button {...field} />;\n case 'roles':\n return <Roles {...field} />;\n default:\n return <InputText {...field} />;\n }\n};\n\nconst buildField = (field, index) => {\n const input = buildInput(field);\n const {theme, size = 'default'} = field;\n const styleInput = theme === 'coorpmanager' ? inputContainerStyle[size] : style.field;\n\n return (\n <div className={styleInput} key={index}>\n {input}\n </div>\n );\n};\n\nconst BrandFormGroup = props => {\n const {title, subtitle = '', fieldsLayout = '', groupLayout = '', fields = []} = props;\n const fieldsList = map.convert({cap: false})(buildField, fields);\n\n return (\n <div\n data-name={`brand_form_group_${snakeCase(title)}`}\n className={classNames(style.wrapper, groupLayout === 'grid' && style.groupGrid)}\n >\n <div className={style.titleWrapper}>\n <Title title={title} subtitle={subtitle} type={'form-group'} />\n </div>\n <div className={fieldsLayout === 'grid' ? style.grid : null}>{fieldsList}</div>\n </div>\n );\n};\n\nBrandFormGroup.propTypes = {\n title: PropTypes.string,\n subtitle: PropTypes.string,\n fieldsLayout: PropTypes.string,\n groupLayout: PropTypes.string,\n fields: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.shape({\n ...Autocomplete.propTypes,\n type: PropTypes.oneOf(['autoComplete']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...InputColor.propTypes,\n type: PropTypes.oneOf(['color'])\n }),\n PropTypes.shape({\n ...InputReadonly.propTypes,\n type: PropTypes.oneOf(['readonly'])\n }),\n PropTypes.shape({\n ...InputSwitch.propTypes,\n type: PropTypes.oneOf(['switch'])\n }),\n PropTypes.shape({\n ...InputTextarea.propTypes,\n type: PropTypes.oneOf(['textarea']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...InputHTML.propTypes,\n type: PropTypes.oneOf(['html'])\n }),\n PropTypes.shape({\n ...InputDoublestep.propTypes,\n type: PropTypes.oneOf(['doublestep'])\n }),\n PropTypes.shape({\n ...Select.propTypes,\n type: PropTypes.oneOf(['select']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...InputCheckbox.propTypes,\n type: PropTypes.oneOf(['checkbox'])\n }),\n PropTypes.shape({\n ...ImageUpload.propTypes,\n type: PropTypes.oneOf(['image'])\n }),\n PropTypes.shape({\n ...SetupSlider.propTypes,\n type: PropTypes.oneOf(['slider'])\n }),\n PropTypes.shape({\n ...SetupSections.propTypes,\n type: PropTypes.oneOf(['sections'])\n }),\n PropTypes.shape({\n ...InputText.propTypes,\n type: PropTypes.oneOf(['text']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...BrandDownloadBox.propTypes,\n type: PropTypes.oneOf(['downloadbox'])\n }),\n PropTypes.shape({\n ...BrandUploadBox.propTypes,\n type: PropTypes.oneOf(['uploadbox'])\n }),\n PropTypes.shape({\n ...Button.propTypes,\n type: PropTypes.oneOf(['button'])\n }),\n PropTypes.shape({\n ...SelectMultiple.propTypes,\n type: PropTypes.oneOf(['selectMultiple'])\n }),\n PropTypes.shape({\n ...Roles.propTypes,\n type: PropTypes.oneOf(['roles'])\n }),\n PropTypes.shape(InputText.propTypes)\n ])\n )\n};\nexport default BrandFormGroup;\n"],"file":"index.js"}
@@ -9,42 +9,46 @@ var _default = {
9
9
  fields: [{
10
10
  title: 'Primary color',
11
11
  name: 'primary-color',
12
- value: '#ececec',
13
- placeholder: '#ffffff',
12
+ placeholder: '#FFFFFF',
14
13
  type: 'color',
15
- description: 'Lorem ipsum dolor sit amet.',
16
- onChange: () => {}
17
- }, {
18
- title: 'Secondary color',
19
- name: 'secondary-color',
20
- value: '#ececec',
21
- placeholder: '#ffffff',
22
- type: 'color',
23
- description: 'Lorem ipsum dolor sit amet.',
24
- onChange: () => {}
25
- }, {
26
- title: 'Tertirary color',
27
- name: 'tertirary-color',
28
- value: '#ececec',
29
- placeholder: '#ffffff',
30
- type: 'color',
31
- description: 'Lorem ipsum dolor sit amet.',
14
+ error: '',
15
+ description: 'CTA buttons, icons, hovers, menu backgrounds...',
16
+ value: '#00B0FF',
17
+ options: [],
18
+ modified: false,
32
19
  onChange: () => {}
33
20
  }, {
34
21
  title: 'Validation color',
35
- name: 'validation-color',
36
- value: '#ececec',
37
- placeholder: '#ffffff',
22
+ name: 'good-color',
23
+ placeholder: '#FFFFFF',
38
24
  type: 'color',
39
- description: 'Lorem ipsum dolor sit amet.',
25
+ error: '',
26
+ description: 'Success messages',
27
+ value: '#66BB6A',
28
+ options: [],
29
+ modified: false,
40
30
  onChange: () => {}
41
31
  }, {
42
32
  title: 'Error color',
43
33
  name: 'error-color',
44
- value: '#ff0000',
45
- placeholder: '#ffffff',
34
+ placeholder: '#FFFFFF',
35
+ type: 'color',
36
+ error: '',
37
+ description: 'Error messages',
38
+ value: '#F73F52',
39
+ options: [],
40
+ modified: false,
41
+ onChange: () => {}
42
+ }, {
43
+ title: 'Lives color',
44
+ name: 'life-color',
45
+ placeholder: '#FFFFFF',
46
46
  type: 'color',
47
- description: 'Lorem ipsum dolor sit amet.',
47
+ error: '',
48
+ description: 'Slides lives',
49
+ value: '#F73F52',
50
+ options: [],
51
+ modified: false,
48
52
  onChange: () => {}
49
53
  }]
50
54
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/molecule/brand-form-group/test/fixtures/lookandfeel.js"],"names":["props","title","subtitle","fields","name","value","placeholder","type","description","onChange"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,iBADF;AAELC,IAAAA,QAAQ,EAAE,8EAFL;AAGLC,IAAAA,MAAM,EAAE,CACN;AACEF,MAAAA,KAAK,EAAE,eADT;AAEEG,MAAAA,IAAI,EAAE,eAFR;AAGEC,MAAAA,KAAK,EAAE,SAHT;AAIEC,MAAAA,WAAW,EAAE,SAJf;AAKEC,MAAAA,IAAI,EAAE,OALR;AAMEC,MAAAA,WAAW,EAAE,6BANf;AAOEC,MAAAA,QAAQ,EAAE,MAAM,CAAE;AAPpB,KADM,EAUN;AACER,MAAAA,KAAK,EAAE,iBADT;AAEEG,MAAAA,IAAI,EAAE,iBAFR;AAGEC,MAAAA,KAAK,EAAE,SAHT;AAIEC,MAAAA,WAAW,EAAE,SAJf;AAKEC,MAAAA,IAAI,EAAE,OALR;AAMEC,MAAAA,WAAW,EAAE,6BANf;AAOEC,MAAAA,QAAQ,EAAE,MAAM,CAAE;AAPpB,KAVM,EAmBN;AACER,MAAAA,KAAK,EAAE,iBADT;AAEEG,MAAAA,IAAI,EAAE,iBAFR;AAGEC,MAAAA,KAAK,EAAE,SAHT;AAIEC,MAAAA,WAAW,EAAE,SAJf;AAKEC,MAAAA,IAAI,EAAE,OALR;AAMEC,MAAAA,WAAW,EAAE,6BANf;AAOEC,MAAAA,QAAQ,EAAE,MAAM,CAAE;AAPpB,KAnBM,EA4BN;AACER,MAAAA,KAAK,EAAE,kBADT;AAEEG,MAAAA,IAAI,EAAE,kBAFR;AAGEC,MAAAA,KAAK,EAAE,SAHT;AAIEC,MAAAA,WAAW,EAAE,SAJf;AAKEC,MAAAA,IAAI,EAAE,OALR;AAMEC,MAAAA,WAAW,EAAE,6BANf;AAOEC,MAAAA,QAAQ,EAAE,MAAM,CAAE;AAPpB,KA5BM,EAqCN;AACER,MAAAA,KAAK,EAAE,aADT;AAEEG,MAAAA,IAAI,EAAE,aAFR;AAGEC,MAAAA,KAAK,EAAE,SAHT;AAIEC,MAAAA,WAAW,EAAE,SAJf;AAKEC,MAAAA,IAAI,EAAE,OALR;AAMEC,MAAAA,WAAW,EAAE,6BANf;AAOEC,MAAAA,QAAQ,EAAE,MAAM,CAAE;AAPpB,KArCM;AAHH;AADM,C","sourcesContent":["export default {\n props: {\n title: 'Platform design',\n subtitle: 'Explanation about what Platform design is and why to set stuffs in this form',\n fields: [\n {\n title: 'Primary color',\n name: 'primary-color',\n value: '#ececec',\n placeholder: '#ffffff',\n type: 'color',\n description: 'Lorem ipsum dolor sit amet.',\n onChange: () => {}\n },\n {\n title: 'Secondary color',\n name: 'secondary-color',\n value: '#ececec',\n placeholder: '#ffffff',\n type: 'color',\n description: 'Lorem ipsum dolor sit amet.',\n onChange: () => {}\n },\n {\n title: 'Tertirary color',\n name: 'tertirary-color',\n value: '#ececec',\n placeholder: '#ffffff',\n type: 'color',\n description: 'Lorem ipsum dolor sit amet.',\n onChange: () => {}\n },\n {\n title: 'Validation color',\n name: 'validation-color',\n value: '#ececec',\n placeholder: '#ffffff',\n type: 'color',\n description: 'Lorem ipsum dolor sit amet.',\n onChange: () => {}\n },\n {\n title: 'Error color',\n name: 'error-color',\n value: '#ff0000',\n placeholder: '#ffffff',\n type: 'color',\n description: 'Lorem ipsum dolor sit amet.',\n onChange: () => {}\n }\n ]\n }\n};\n"],"file":"lookandfeel.js"}
1
+ {"version":3,"sources":["../../../../../src/molecule/brand-form-group/test/fixtures/lookandfeel.js"],"names":["props","title","subtitle","fields","name","placeholder","type","error","description","value","options","modified","onChange"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,iBADF;AAELC,IAAAA,QAAQ,EAAE,8EAFL;AAGLC,IAAAA,MAAM,EAAE,CACN;AACEF,MAAAA,KAAK,EAAE,eADT;AAEEG,MAAAA,IAAI,EAAE,eAFR;AAGEC,MAAAA,WAAW,EAAE,SAHf;AAIEC,MAAAA,IAAI,EAAE,OAJR;AAKEC,MAAAA,KAAK,EAAE,EALT;AAMEC,MAAAA,WAAW,EAAE,iDANf;AAOEC,MAAAA,KAAK,EAAE,SAPT;AAQEC,MAAAA,OAAO,EAAE,EARX;AASEC,MAAAA,QAAQ,EAAE,KATZ;AAUEC,MAAAA,QAAQ,EAAE,MAAM,CAAE;AAVpB,KADM,EAaN;AACEX,MAAAA,KAAK,EAAE,kBADT;AAEEG,MAAAA,IAAI,EAAE,YAFR;AAGEC,MAAAA,WAAW,EAAE,SAHf;AAIEC,MAAAA,IAAI,EAAE,OAJR;AAKEC,MAAAA,KAAK,EAAE,EALT;AAMEC,MAAAA,WAAW,EAAE,kBANf;AAOEC,MAAAA,KAAK,EAAE,SAPT;AAQEC,MAAAA,OAAO,EAAE,EARX;AASEC,MAAAA,QAAQ,EAAE,KATZ;AAUEC,MAAAA,QAAQ,EAAE,MAAM,CAAE;AAVpB,KAbM,EAyBN;AACEX,MAAAA,KAAK,EAAE,aADT;AAEEG,MAAAA,IAAI,EAAE,aAFR;AAGEC,MAAAA,WAAW,EAAE,SAHf;AAIEC,MAAAA,IAAI,EAAE,OAJR;AAKEC,MAAAA,KAAK,EAAE,EALT;AAMEC,MAAAA,WAAW,EAAE,gBANf;AAOEC,MAAAA,KAAK,EAAE,SAPT;AAQEC,MAAAA,OAAO,EAAE,EARX;AASEC,MAAAA,QAAQ,EAAE,KATZ;AAUEC,MAAAA,QAAQ,EAAE,MAAM,CAAE;AAVpB,KAzBM,EAqCN;AACEX,MAAAA,KAAK,EAAE,aADT;AAEEG,MAAAA,IAAI,EAAE,YAFR;AAGEC,MAAAA,WAAW,EAAE,SAHf;AAIEC,MAAAA,IAAI,EAAE,OAJR;AAKEC,MAAAA,KAAK,EAAE,EALT;AAMEC,MAAAA,WAAW,EAAE,cANf;AAOEC,MAAAA,KAAK,EAAE,SAPT;AAQEC,MAAAA,OAAO,EAAE,EARX;AASEC,MAAAA,QAAQ,EAAE,KATZ;AAUEC,MAAAA,QAAQ,EAAE,MAAM,CAAE;AAVpB,KArCM;AAHH;AADM,C","sourcesContent":["export default {\n props: {\n title: 'Platform design',\n subtitle: 'Explanation about what Platform design is and why to set stuffs in this form',\n fields: [\n {\n title: 'Primary color',\n name: 'primary-color',\n placeholder: '#FFFFFF',\n type: 'color',\n error: '',\n description: 'CTA buttons, icons, hovers, menu backgrounds...',\n value: '#00B0FF',\n options: [],\n modified: false,\n onChange: () => {}\n },\n {\n title: 'Validation color',\n name: 'good-color',\n placeholder: '#FFFFFF',\n type: 'color',\n error: '',\n description: 'Success messages',\n value: '#66BB6A',\n options: [],\n modified: false,\n onChange: () => {}\n },\n {\n title: 'Error color',\n name: 'error-color',\n placeholder: '#FFFFFF',\n type: 'color',\n error: '',\n description: 'Error messages',\n value: '#F73F52',\n options: [],\n modified: false,\n onChange: () => {}\n },\n {\n title: 'Lives color',\n name: 'life-color',\n placeholder: '#FFFFFF',\n type: 'color',\n error: '',\n description: 'Slides lives',\n value: '#F73F52',\n options: [],\n modified: false,\n onChange: () => {}\n }\n ]\n }\n};\n"],"file":"lookandfeel.js"}