@coorpacademy/components 11.11.15 → 11.11.16-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/image-upload/index.js"],"names":[],"mappings":";AAQA;;;;;;;;;;;;;;;;;;;gBAmFC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/image-upload/index.js"],"names":[],"mappings":";AAQA;;;;;;;;;;;;;;;;;;;gBA8EC"}
@@ -1,7 +1,4 @@
1
1
  import _isNil from "lodash/fp/isNil";
2
- import _pipe from "lodash/fp/pipe";
3
- import _map from "lodash/fp/map";
4
- import _join from "lodash/fp/join";
5
2
 
6
3
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
7
4
 
@@ -38,9 +35,6 @@ const ImageUpload = ({
38
35
  e.preventDefault();
39
36
  return onReset(e);
40
37
  }, [onReset]);
41
-
42
- const acceptedImages = _pipe(_map(t => `image/${t}`), _join(','))(imageTypes);
43
-
44
38
  const linkCustomStyle = {
45
39
  width: '40px',
46
40
  color: 'red'
@@ -61,7 +55,7 @@ const ImageUpload = ({
61
55
  }, (onDragStart, onDragStop) => /*#__PURE__*/React.createElement("input", {
62
56
  type: "file",
63
57
  name: name,
64
- accept: acceptedImages,
58
+ accept: imageTypes,
65
59
  disabled: loading || disabled,
66
60
  className: style.input,
67
61
  onChange: onChange,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","useCallback","PropTypes","DragAndDrop","ImagePropType","Link","style","ImageUpload","title","description","previewLabel","previewContent","uploadLabel","loading","modified","disabled","onChange","onReset","name","labelLink","labelButtonLink","hrefLink","imageTypes","error","buttonAriaLabel","errorButtonLabel","handleReset","e","preventDefault","acceptedImages","t","linkCustomStyle","width","color","onDragStart","onDragStop","input","templateLink","href","download","propTypes","string","func","arrayOf"],"sources":["../../../src/atom/image-upload/index.js"],"sourcesContent":["import React, {useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport {join, map, pipe, isNil} from 'lodash/fp';\nimport DragAndDrop from '../drag-and-drop';\nimport {ImagePropType} from '../../util/proptypes';\nimport Link from '../button-link';\nimport style from './style.css';\n\nconst ImageUpload = ({\n title,\n description,\n previewLabel,\n previewContent,\n uploadLabel,\n loading,\n modified,\n disabled = false,\n onChange,\n onReset = null,\n name,\n // See ImagePropType for accepted values\n labelLink,\n labelButtonLink,\n hrefLink,\n imageTypes = ['*'],\n error = '',\n buttonAriaLabel,\n errorButtonLabel\n}) => {\n const handleReset = useCallback(\n e => {\n if (isNil(onReset)) return;\n e.preventDefault();\n return onReset(e);\n },\n [onReset]\n );\n\n const acceptedImages = pipe(\n map(t => `image/${t}`),\n join(',')\n )(imageTypes);\n\n const linkCustomStyle = {\n width: '40px',\n color: 'red'\n };\n\n return (\n <div>\n <DragAndDrop\n title={title}\n description={description}\n previewLabel={previewLabel}\n previewContent={previewContent}\n uploadLabel={uploadLabel}\n loading={loading}\n modified={modified}\n onReset={handleReset}\n error={error}\n disabled={disabled}\n buttonAriaLabel={buttonAriaLabel}\n errorButtonLabel={errorButtonLabel}\n >\n {(onDragStart, onDragStop) => (\n <input\n type=\"file\"\n name={name}\n accept={acceptedImages}\n disabled={loading || disabled}\n className={style.input}\n onChange={onChange}\n onDragEnter={onDragStart}\n onDrop={onDragStop}\n onDragLeave={onDragStop}\n />\n )}\n </DragAndDrop>\n {labelLink && hrefLink ? (\n <div className={style.templateLink}>\n {labelLink}\n <Link\n type=\"text\"\n customStyle={linkCustomStyle}\n link={{href: hrefLink, download: true}}\n label={labelButtonLink}\n />\n </div>\n ) : null}\n </div>\n );\n};\n\nImageUpload.propTypes = {\n ...DragAndDrop.propTypes,\n name: PropTypes.string,\n onChange: PropTypes.func,\n onReset: PropTypes.func,\n imageTypes: PropTypes.arrayOf(ImagePropType),\n error: PropTypes.string,\n buttonAriaLabel: PropTypes.string,\n errorButtonLabel: PropTypes.string,\n labelLink: PropTypes.string,\n hrefLink: PropTypes.string\n};\n\nexport default ImageUpload;\n"],"mappings":";;;;;;;AAAA,OAAOA,KAAP,IAAeC,WAAf,QAAiC,OAAjC;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,WAAP,MAAwB,kBAAxB;AACA,SAAQC,aAAR,QAA4B,sBAA5B;AACA,OAAOC,IAAP,MAAiB,gBAAjB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,WAAW,GAAG,CAAC;EACnBC,KADmB;EAEnBC,WAFmB;EAGnBC,YAHmB;EAInBC,cAJmB;EAKnBC,WALmB;EAMnBC,OANmB;EAOnBC,QAPmB;EAQnBC,QAAQ,GAAG,KARQ;EASnBC,QATmB;EAUnBC,OAAO,GAAG,IAVS;EAWnBC,IAXmB;EAYnB;EACAC,SAbmB;EAcnBC,eAdmB;EAenBC,QAfmB;EAgBnBC,UAAU,GAAG,CAAC,GAAD,CAhBM;EAiBnBC,KAAK,GAAG,EAjBW;EAkBnBC,eAlBmB;EAmBnBC;AAnBmB,CAAD,KAoBd;EACJ,MAAMC,WAAW,GAAGzB,WAAW,CAC7B0B,CAAC,IAAI;IACH,IAAI,OAAMV,OAAN,CAAJ,EAAoB;IACpBU,CAAC,CAACC,cAAF;IACA,OAAOX,OAAO,CAACU,CAAD,CAAd;EACD,CAL4B,EAM7B,CAACV,OAAD,CAN6B,CAA/B;;EASA,MAAMY,cAAc,GAAG,MACrB,KAAIC,CAAC,IAAK,SAAQA,CAAE,EAApB,CADqB,EAErB,MAAK,GAAL,CAFqB,EAGrBR,UAHqB,CAAvB;;EAKA,MAAMS,eAAe,GAAG;IACtBC,KAAK,EAAE,MADe;IAEtBC,KAAK,EAAE;EAFe,CAAxB;EAKA,oBACE,8CACE,oB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EtB,SAAS,CAACuC,MAP7B;EAQEhB,gBAAgB,EAAEvB,SAAS,CAACuC,MAR9B;EASEtB,SAAS,EAAEjB,SAAS,CAACuC,MATvB;EAUEpB,QAAQ,EAAEnB,SAAS,CAACuC;AAVtB;AAaA,eAAelC,WAAf"}
1
+ {"version":3,"file":"index.js","names":["React","useCallback","PropTypes","DragAndDrop","ImagePropType","Link","style","ImageUpload","title","description","previewLabel","previewContent","uploadLabel","loading","modified","disabled","onChange","onReset","name","labelLink","labelButtonLink","hrefLink","imageTypes","error","buttonAriaLabel","errorButtonLabel","handleReset","e","preventDefault","linkCustomStyle","width","color","onDragStart","onDragStop","input","templateLink","href","download","propTypes","string","func","arrayOf"],"sources":["../../../src/atom/image-upload/index.js"],"sourcesContent":["import React, {useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport {isNil} from 'lodash/fp';\nimport DragAndDrop from '../drag-and-drop';\nimport {ImagePropType} from '../../util/proptypes';\nimport Link from '../button-link';\nimport style from './style.css';\n\nconst ImageUpload = ({\n title,\n description,\n previewLabel,\n previewContent,\n uploadLabel,\n loading,\n modified,\n disabled = false,\n onChange,\n onReset = null,\n name,\n // See ImagePropType for accepted values\n labelLink,\n labelButtonLink,\n hrefLink,\n imageTypes = ['*'],\n error = '',\n buttonAriaLabel,\n errorButtonLabel\n}) => {\n const handleReset = useCallback(\n e => {\n if (isNil(onReset)) return;\n e.preventDefault();\n return onReset(e);\n },\n [onReset]\n );\n\n const linkCustomStyle = {\n width: '40px',\n color: 'red'\n };\n\n return (\n <div>\n <DragAndDrop\n title={title}\n description={description}\n previewLabel={previewLabel}\n previewContent={previewContent}\n uploadLabel={uploadLabel}\n loading={loading}\n modified={modified}\n onReset={handleReset}\n error={error}\n disabled={disabled}\n buttonAriaLabel={buttonAriaLabel}\n errorButtonLabel={errorButtonLabel}\n >\n {(onDragStart, onDragStop) => (\n <input\n type=\"file\"\n name={name}\n accept={imageTypes}\n disabled={loading || disabled}\n className={style.input}\n onChange={onChange}\n onDragEnter={onDragStart}\n onDrop={onDragStop}\n onDragLeave={onDragStop}\n />\n )}\n </DragAndDrop>\n {labelLink && hrefLink ? (\n <div className={style.templateLink}>\n {labelLink}\n <Link\n type=\"text\"\n customStyle={linkCustomStyle}\n link={{href: hrefLink, download: true}}\n label={labelButtonLink}\n />\n </div>\n ) : null}\n </div>\n );\n};\n\nImageUpload.propTypes = {\n ...DragAndDrop.propTypes,\n name: PropTypes.string,\n onChange: PropTypes.func,\n onReset: PropTypes.func,\n imageTypes: PropTypes.arrayOf(ImagePropType),\n error: PropTypes.string,\n buttonAriaLabel: PropTypes.string,\n errorButtonLabel: PropTypes.string,\n labelLink: PropTypes.string,\n hrefLink: PropTypes.string\n};\n\nexport default ImageUpload;\n"],"mappings":";;;;AAAA,OAAOA,KAAP,IAAeC,WAAf,QAAiC,OAAjC;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,WAAP,MAAwB,kBAAxB;AACA,SAAQC,aAAR,QAA4B,sBAA5B;AACA,OAAOC,IAAP,MAAiB,gBAAjB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,WAAW,GAAG,CAAC;EACnBC,KADmB;EAEnBC,WAFmB;EAGnBC,YAHmB;EAInBC,cAJmB;EAKnBC,WALmB;EAMnBC,OANmB;EAOnBC,QAPmB;EAQnBC,QAAQ,GAAG,KARQ;EASnBC,QATmB;EAUnBC,OAAO,GAAG,IAVS;EAWnBC,IAXmB;EAYnB;EACAC,SAbmB;EAcnBC,eAdmB;EAenBC,QAfmB;EAgBnBC,UAAU,GAAG,CAAC,GAAD,CAhBM;EAiBnBC,KAAK,GAAG,EAjBW;EAkBnBC,eAlBmB;EAmBnBC;AAnBmB,CAAD,KAoBd;EACJ,MAAMC,WAAW,GAAGzB,WAAW,CAC7B0B,CAAC,IAAI;IACH,IAAI,OAAMV,OAAN,CAAJ,EAAoB;IACpBU,CAAC,CAACC,cAAF;IACA,OAAOX,OAAO,CAACU,CAAD,CAA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,SAAS,CAACsC,IAJrB;EAKElB,UAAU,EAAEpB,SAAS,CAACuC,OAAV,CAAkBrC,aAAlB,CALd;EAMEmB,KAAK,EAAErB,SAAS,CAACqC,MANnB;EAOEf,eAAe,EAAEtB,SAAS,CAACqC,MAP7B;EAQEd,gBAAgB,EAAEvB,SAAS,CAACqC,MAR9B;EASEpB,SAAS,EAAEjB,SAAS,CAACqC,MATvB;EAUElB,QAAQ,EAAEnB,SAAS,CAACqC;AAVtB;AAaA,eAAehC,WAAf"}
@@ -0,0 +1,45 @@
1
+ .container {
2
+ width: 300px;
3
+ height: 300px;
4
+ position: relative;
5
+ perspective: 800px;
6
+ }
7
+
8
+ .square {
9
+ position: absolute;
10
+ width: 100%;
11
+ height: 100%;
12
+ transform-style: preserve-3d;
13
+ transition: transform 1s;
14
+ border: 1px solid black;
15
+ top: 100px;
16
+ left: 100px;
17
+ }
18
+
19
+ .flipped > .square {
20
+ transform: rotateY(180deg);
21
+ }
22
+
23
+ .front,
24
+ .back {
25
+ margin: 0;
26
+ display: block;
27
+ position: absolute;
28
+ width: 100%;
29
+ height: 100%;
30
+ backface-visibility: hidden;
31
+ }
32
+
33
+ .front {
34
+ font-size: 20px;
35
+ display: flex;
36
+ align-items: center;
37
+ justify-content: center;
38
+ flex-flow: column;
39
+ }
40
+
41
+ .back {
42
+ background-image: url(http://img.voi.pmdstatic.net/fit/http.3A.2F.2Fprd2-bone-image.2Es3-website-eu-west-1.2Eamazonaws.2Ecom.2Fprismamedia_people.2F2017.2F06.2F30.2Fa9a1132c-920d-4d0d-af0c-7c686d72dfe5.2Ejpeg/380x285/quality/80/jacques-chirac.jpg);
43
+ background-size: cover;
44
+ transform: rotateY(180deg);
45
+ }
@@ -0,0 +1,211 @@
1
+ # Snapshot report for `src/molecule/select-multiple/test/index.js`
2
+
3
+ The actual snapshot is saved in `index.js.snap`.
4
+
5
+ Generated by [AVA](https://ava.li).
6
+
7
+ ## should shallow render when select is opened
8
+
9
+ > Snapshot 1
10
+
11
+ ShallowWrapper {
12
+ <div
13
+ className="select-multiple__default variables__defaultText"
14
+ >
15
+ <span
16
+ className="select-multiple__title"
17
+ >
18
+ Learning Path:
19
+ </span>
20
+ <div
21
+ className="select-multiple__select"
22
+ onClick={Function {}}
23
+ title="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut"
24
+ >
25
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
26
+ <SvgComponent⍟
27
+ className="select-multiple__arrow select-multiple__down"
28
+ color={undefined}
29
+ />
30
+ </div>
31
+ <div
32
+ className="select-multiple__activeChoices"
33
+ >
34
+ <ul
35
+ className="select-multiple__list"
36
+ >
37
+ <li
38
+ className="select-multiple__choice"
39
+ key="0"
40
+ >
41
+ <TitledCheckbox⍟
42
+ background={undefined}
43
+ choice={
44
+ {
45
+ i: 0,
46
+ name: 'Digital',
47
+ selected: false,
48
+ value: 'digital',
49
+ }
50
+ }
51
+ onToggle={Function {}}
52
+ />
53
+ </li>
54
+ <li
55
+ className="select-multiple__choice"
56
+ key="1"
57
+ >
58
+ <TitledCheckbox⍟
59
+ background={undefined}
60
+ choice={
61
+ {
62
+ i: 1,
63
+ name: 'Esprit du temps',
64
+ selected: false,
65
+ value: 'espritDuTemps',
66
+ }
67
+ }
68
+ onToggle={Function {}}
69
+ />
70
+ </li>
71
+ <li
72
+ className="select-multiple__choice"
73
+ key="2"
74
+ >
75
+ <TitledCheckbox⍟
76
+ background={undefined}
77
+ choice={
78
+ {
79
+ i: 2,
80
+ name: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut',
81
+ selected: true,
82
+ value: 'loremIpsum',
83
+ }
84
+ }
85
+ onToggle={Function {}}
86
+ />
87
+ </li>
88
+ <li
89
+ className="select-multiple__choice"
90
+ key="3"
91
+ >
92
+ <TitledCheckbox⍟
93
+ background={undefined}
94
+ choice={
95
+ {
96
+ i: 3,
97
+ name: 'Le monde du projet',
98
+ selected: false,
99
+ value: 'project',
100
+ }
101
+ }
102
+ onToggle={Function {}}
103
+ />
104
+ </li>
105
+ </ul>
106
+ </div>
107
+ </div>,
108
+ }
109
+
110
+ ## should shallow render with default props
111
+
112
+ > Snapshot 1
113
+
114
+ ShallowWrapper {
115
+ <div
116
+ className="select-multiple__default variables__defaultText"
117
+ >
118
+ <span
119
+ className="select-multiple__title"
120
+ >
121
+ Learning Path:
122
+ </span>
123
+ <div
124
+ className="select-multiple__select"
125
+ onClick={Function {}}
126
+ title="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut"
127
+ >
128
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
129
+ <SvgComponent⍟
130
+ className="select-multiple__arrow"
131
+ color={undefined}
132
+ />
133
+ </div>
134
+ <div
135
+ className="select-multiple__choices"
136
+ >
137
+ <ul
138
+ className="select-multiple__list"
139
+ >
140
+ <li
141
+ className="select-multiple__choice"
142
+ key="0"
143
+ >
144
+ <TitledCheckbox⍟
145
+ background={undefined}
146
+ choice={
147
+ {
148
+ i: 0,
149
+ name: 'Digital',
150
+ selected: false,
151
+ value: 'digital',
152
+ }
153
+ }
154
+ onToggle={Function {}}
155
+ />
156
+ </li>
157
+ <li
158
+ className="select-multiple__choice"
159
+ key="1"
160
+ >
161
+ <TitledCheckbox⍟
162
+ background={undefined}
163
+ choice={
164
+ {
165
+ i: 1,
166
+ name: 'Esprit du temps',
167
+ selected: false,
168
+ value: 'espritDuTemps',
169
+ }
170
+ }
171
+ onToggle={Function {}}
172
+ />
173
+ </li>
174
+ <li
175
+ className="select-multiple__choice"
176
+ key="2"
177
+ >
178
+ <TitledCheckbox⍟
179
+ background={undefined}
180
+ choice={
181
+ {
182
+ i: 2,
183
+ name: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut',
184
+ selected: true,
185
+ value: 'loremIpsum',
186
+ }
187
+ }
188
+ onToggle={Function {}}
189
+ />
190
+ </li>
191
+ <li
192
+ className="select-multiple__choice"
193
+ key="3"
194
+ >
195
+ <TitledCheckbox⍟
196
+ background={undefined}
197
+ choice={
198
+ {
199
+ i: 3,
200
+ name: 'Le monde du projet',
201
+ selected: false,
202
+ value: 'project',
203
+ }
204
+ }
205
+ onToggle={Function {}}
206
+ />
207
+ </li>
208
+ </ul>
209
+ </div>
210
+ </div>,
211
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"proptypes.d.ts","sourceRoot":"","sources":["../../src/util/proptypes.js"],"names":[],"mappings":"AASA,8BAAsD;AAGtD,+BAAwD;AAExD,qDAA4E;AAErE,+FAKN;AAED,gCAA4C;AAC5C,8BAAwC"}
1
+ {"version":3,"file":"proptypes.d.ts","sourceRoot":"","sources":["../../src/util/proptypes.js"],"names":[],"mappings":"AASA,8BAAsD;AAGtD,+BAAwD;AAExD,qDAA4E;AAErE,+FAMN;AAED,gCAA4C;AAC5C,8BAAwC"}
@@ -9,8 +9,8 @@ const PATH_REGEXP = /^\/([-a-zA-Z0-9@:%_\\+.~#?&//=]*)$/;
9
9
  export const PathPropType = stringMatching(PATH_REGEXP);
10
10
  export const SrcPropType = PropTypes.oneOfType([UrlPropType, PathPropType]);
11
11
  export const ImagePropType = (propValue, key, componentName) => {
12
- if (includes(propValue[key], ['jpg', 'png', 'svg+xml'])) return;
13
- return new Error(`Invalid prop value: ${propValue[key]}, at component: ${componentName}. Expected a valid image type: jpg, png or svg+xml.`);
12
+ if (includes(propValue[key], ['image/jpg', 'image/png', 'image/svg+xml', 'application/pdf'])) return;
13
+ return new Error(`Invalid prop value: ${propValue[key]}, at component: ${componentName}. Expected a valid image type: image/jpg, image/png, image/svg+xml or application/pdf.`);
14
14
  };
15
15
  export const ColorPropType = _ColorPropType;
16
16
  export const HexPropType = _HexPropType;
@@ -1 +1 @@
1
- {"version":3,"file":"proptypes.js","names":["PropTypes","includes","stringMatching","_ColorPropType","_HexPropType","URL_REGEXP","UrlPropType","PATH_REGEXP","PathPropType","SrcPropType","oneOfType","ImagePropType","propValue","key","componentName","Error","ColorPropType","HexPropType"],"sources":["../../src/util/proptypes.js"],"sourcesContent":["import PropTypes from 'prop-types';\nimport includes from 'lodash/fp/includes';\nimport stringMatching from 'extended-proptypes/lib/validators/stringMatching';\n\nimport _ColorPropType from 'extended-proptypes/lib/validators/color';\nimport _HexPropType from 'extended-proptypes/lib/validators/hex';\n\nconst URL_REGEXP =\n /^(http(s)?:\\/\\/.)[-a-zA-Z0-9@:%._\\\\+~#=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\\\\+.~#?&//=]*)$/;\nexport const UrlPropType = stringMatching(URL_REGEXP);\n\nconst PATH_REGEXP = /^\\/([-a-zA-Z0-9@:%_\\\\+.~#?&//=]*)$/;\nexport const PathPropType = stringMatching(PATH_REGEXP);\n\nexport const SrcPropType = PropTypes.oneOfType([UrlPropType, PathPropType]);\n\nexport const ImagePropType = (propValue, key, componentName) => {\n if (includes(propValue[key], ['jpg', 'png', 'svg+xml'])) return;\n return new Error(\n `Invalid prop value: ${propValue[key]}, at component: ${componentName}. Expected a valid image type: jpg, png or svg+xml.`\n );\n};\n\nexport const ColorPropType = _ColorPropType;\nexport const HexPropType = _HexPropType;\n"],"mappings":"AAAA,OAAOA,SAAP,MAAsB,YAAtB;AACA,OAAOC,QAAP,MAAqB,oBAArB;AACA,OAAOC,cAAP,MAA2B,kDAA3B;AAEA,OAAOC,cAAP,MAA2B,yCAA3B;AACA,OAAOC,YAAP,MAAyB,uCAAzB;AAEA,MAAMC,UAAU,GACd,8FADF;AAEA,OAAO,MAAMC,WAAW,GAAGJ,cAAc,CAACG,UAAD,CAAlC;AAEP,MAAME,WAAW,GAAG,oCAApB;AACA,OAAO,MAAMC,YAAY,GAAGN,cAAc,CAACK,WAAD,CAAnC;AAEP,OAAO,MAAME,WAAW,GAAGT,SAAS,CAACU,SAAV,CAAoB,CAACJ,WAAD,EAAcE,YAAd,CAApB,CAApB;AAEP,OAAO,MAAMG,aAAa,GAAG,CAACC,SAAD,EAAYC,GAAZ,EAAiBC,aAAjB,KAAmC;EAC9D,IAAIb,QAAQ,CAACW,SAAS,CAACC,GAAD,CAAV,EAAiB,CAAC,KAAD,EAAQ,KAAR,EAAe,SAAf,CAAjB,CAAZ,EAAyD;EACzD,OAAO,IAAIE,KAAJ,CACJ,uBAAsBH,SAAS,CAACC,GAAD,CAAM,mBAAkBC,aAAc,qDADjE,CAAP;AAGD,CALM;AAOP,OAAO,MAAME,aAAa,GAAGb,cAAtB;AACP,OAAO,MAAMc,WAAW,GAAGb,YAApB"}
1
+ {"version":3,"file":"proptypes.js","names":["PropTypes","includes","stringMatching","_ColorPropType","_HexPropType","URL_REGEXP","UrlPropType","PATH_REGEXP","PathPropType","SrcPropType","oneOfType","ImagePropType","propValue","key","componentName","Error","ColorPropType","HexPropType"],"sources":["../../src/util/proptypes.js"],"sourcesContent":["import PropTypes from 'prop-types';\nimport includes from 'lodash/fp/includes';\nimport stringMatching from 'extended-proptypes/lib/validators/stringMatching';\n\nimport _ColorPropType from 'extended-proptypes/lib/validators/color';\nimport _HexPropType from 'extended-proptypes/lib/validators/hex';\n\nconst URL_REGEXP =\n /^(http(s)?:\\/\\/.)[-a-zA-Z0-9@:%._\\\\+~#=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\\\\+.~#?&//=]*)$/;\nexport const UrlPropType = stringMatching(URL_REGEXP);\n\nconst PATH_REGEXP = /^\\/([-a-zA-Z0-9@:%_\\\\+.~#?&//=]*)$/;\nexport const PathPropType = stringMatching(PATH_REGEXP);\n\nexport const SrcPropType = PropTypes.oneOfType([UrlPropType, PathPropType]);\n\nexport const ImagePropType = (propValue, key, componentName) => {\n if (includes(propValue[key], ['image/jpg', 'image/png', 'image/svg+xml', 'application/pdf']))\n return;\n return new Error(\n `Invalid prop value: ${propValue[key]}, at component: ${componentName}. Expected a valid image type: image/jpg, image/png, image/svg+xml or application/pdf.`\n );\n};\n\nexport const ColorPropType = _ColorPropType;\nexport const HexPropType = _HexPropType;\n"],"mappings":"AAAA,OAAOA,SAAP,MAAsB,YAAtB;AACA,OAAOC,QAAP,MAAqB,oBAArB;AACA,OAAOC,cAAP,MAA2B,kDAA3B;AAEA,OAAOC,cAAP,MAA2B,yCAA3B;AACA,OAAOC,YAAP,MAAyB,uCAAzB;AAEA,MAAMC,UAAU,GACd,8FADF;AAEA,OAAO,MAAMC,WAAW,GAAGJ,cAAc,CAACG,UAAD,CAAlC;AAEP,MAAME,WAAW,GAAG,oCAApB;AACA,OAAO,MAAMC,YAAY,GAAGN,cAAc,CAACK,WAAD,CAAnC;AAEP,OAAO,MAAME,WAAW,GAAGT,SAAS,CAACU,SAAV,CAAoB,CAACJ,WAAD,EAAcE,YAAd,CAApB,CAApB;AAEP,OAAO,MAAMG,aAAa,GAAG,CAACC,SAAD,EAAYC,GAAZ,EAAiBC,aAAjB,KAAmC;EAC9D,IAAIb,QAAQ,CAACW,SAAS,CAACC,GAAD,CAAV,EAAiB,CAAC,WAAD,EAAc,WAAd,EAA2B,eAA3B,EAA4C,iBAA5C,CAAjB,CAAZ,EACE;EACF,OAAO,IAAIE,KAAJ,CACJ,uBAAsBH,SAAS,CAACC,GAAD,CAAM,mBAAkBC,aAAc,wFADjE,CAAP;AAGD,CANM;AAQP,OAAO,MAAME,aAAa,GAAGb,cAAtB;AACP,OAAO,MAAMc,WAAW,GAAGb,YAApB"}
@@ -0,0 +1,34 @@
1
+ [{
2
+ "label": "1mn",
3
+ "value": 1
4
+ }, {
5
+ "label": "2mn",
6
+ "value": 2
7
+ }, {
8
+ "label": "3mn",
9
+ "value": 3
10
+ }, {
11
+ "label": "5mn",
12
+ "value": 5
13
+ }, {
14
+ "label": "10mn",
15
+ "value": 10
16
+ }, {
17
+ "label": "15mn",
18
+ "value": 15
19
+ }, {
20
+ "label": "30mn",
21
+ "value": 30
22
+ }, {
23
+ "label": "45mn",
24
+ "value": 45
25
+ }, {
26
+ "label": "1h",
27
+ "value": 60
28
+ }, {
29
+ "label": "2h",
30
+ "value": 120
31
+ }, {
32
+ "label": "2h+",
33
+ "value": 121
34
+ }]
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/image-upload/index.js"],"names":[],"mappings":";AAQA;;;;;;;;;;;;;;;;;;;gBAmFC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/image-upload/index.js"],"names":[],"mappings":";AAQA;;;;;;;;;;;;;;;;;;;gBA8EC"}
@@ -5,12 +5,6 @@ exports.default = void 0;
5
5
 
6
6
  var _isNil2 = _interopRequireDefault(require("lodash/fp/isNil"));
7
7
 
8
- var _pipe2 = _interopRequireDefault(require("lodash/fp/pipe"));
9
-
10
- var _map2 = _interopRequireDefault(require("lodash/fp/map"));
11
-
12
- var _join2 = _interopRequireDefault(require("lodash/fp/join"));
13
-
14
8
  var _react = _interopRequireWildcard(require("react"));
15
9
 
16
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
@@ -57,7 +51,6 @@ const ImageUpload = ({
57
51
  e.preventDefault();
58
52
  return onReset(e);
59
53
  }, [onReset]);
60
- const acceptedImages = (0, _pipe2.default)((0, _map2.default)(t => `image/${t}`), (0, _join2.default)(','))(imageTypes);
61
54
  const linkCustomStyle = {
62
55
  width: '40px',
63
56
  color: 'red'
@@ -78,7 +71,7 @@ const ImageUpload = ({
78
71
  }, (onDragStart, onDragStop) => /*#__PURE__*/_react.default.createElement("input", {
79
72
  type: "file",
80
73
  name: name,
81
- accept: acceptedImages,
74
+ accept: imageTypes,
82
75
  disabled: loading || disabled,
83
76
  className: _style.default.input,
84
77
  onChange: onChange,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ImageUpload","title","description","previewLabel","previewContent","uploadLabel","loading","modified","disabled","onChange","onReset","name","labelLink","labelButtonLink","hrefLink","imageTypes","error","buttonAriaLabel","errorButtonLabel","handleReset","useCallback","e","preventDefault","acceptedImages","t","linkCustomStyle","width","color","onDragStart","onDragStop","style","input","templateLink","href","download","propTypes","DragAndDrop","PropTypes","string","func","arrayOf","ImagePropType"],"sources":["../../../src/atom/image-upload/index.js"],"sourcesContent":["import React, {useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport {join, map, pipe, isNil} from 'lodash/fp';\nimport DragAndDrop from '../drag-and-drop';\nimport {ImagePropType} from '../../util/proptypes';\nimport Link from '../button-link';\nimport style from './style.css';\n\nconst ImageUpload = ({\n title,\n description,\n previewLabel,\n previewContent,\n uploadLabel,\n loading,\n modified,\n disabled = false,\n onChange,\n onReset = null,\n name,\n // See ImagePropType for accepted values\n labelLink,\n labelButtonLink,\n hrefLink,\n imageTypes = ['*'],\n error = '',\n buttonAriaLabel,\n errorButtonLabel\n}) => {\n const handleReset = useCallback(\n e => {\n if (isNil(onReset)) return;\n e.preventDefault();\n return onReset(e);\n },\n [onReset]\n );\n\n const acceptedImages = pipe(\n map(t => `image/${t}`),\n join(',')\n )(imageTypes);\n\n const linkCustomStyle = {\n width: '40px',\n color: 'red'\n };\n\n return (\n <div>\n <DragAndDrop\n title={title}\n description={description}\n previewLabel={previewLabel}\n previewContent={previewContent}\n uploadLabel={uploadLabel}\n loading={loading}\n modified={modified}\n onReset={handleReset}\n error={error}\n disabled={disabled}\n buttonAriaLabel={buttonAriaLabel}\n errorButtonLabel={errorButtonLabel}\n >\n {(onDragStart, onDragStop) => (\n <input\n type=\"file\"\n name={name}\n accept={acceptedImages}\n disabled={loading || disabled}\n className={style.input}\n onChange={onChange}\n onDragEnter={onDragStart}\n onDrop={onDragStop}\n onDragLeave={onDragStop}\n />\n )}\n </DragAndDrop>\n {labelLink && hrefLink ? (\n <div className={style.templateLink}>\n {labelLink}\n <Link\n type=\"text\"\n customStyle={linkCustomStyle}\n link={{href: hrefLink, download: true}}\n label={labelButtonLink}\n />\n </div>\n ) : null}\n </div>\n );\n};\n\nImageUpload.propTypes = {\n ...DragAndDrop.propTypes,\n name: PropTypes.string,\n onChange: PropTypes.func,\n onReset: PropTypes.func,\n imageTypes: PropTypes.arrayOf(ImagePropType),\n error: PropTypes.string,\n buttonAriaLabel: PropTypes.string,\n errorButtonLabel: PropTypes.string,\n labelLink: PropTypes.string,\n hrefLink: PropTypes.string\n};\n\nexport default ImageUpload;\n"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,WAAW,GAAG,CAAC;EACnBC,KADmB;EAEnBC,WAFmB;EAGnBC,YAHmB;EAInBC,cAJmB;EAKnBC,WALmB;EAMnBC,OANmB;EAOnBC,QAPmB;EAQnBC,QAAQ,GAAG,KARQ;EASnBC,QATmB;EAUnBC,OAAO,GAAG,IAVS;EAWnBC,IAXmB;EAYnB;EACAC,SAbmB;EAcnBC,eAdmB;EAenBC,QAfmB;EAgBnBC,UAAU,GAAG,CAAC,GAAD,CAhBM;EAiBnBC,KAAK,GAAG,EAjBW;EAkBnBC,eAlBmB;EAmBnBC;AAnBmB,CAAD,KAoBd;EACJ,MAAMC,WAAW,GAAG,IAAAC,kBAAA,EAClBC,CAAC,IAAI;IACH,IAAI,qBAAMX,OAAN,CAAJ,EAAoB;IACpBW,CAAC,CAACC,cAAF;IACA,OAAOZ,OAAO,CAACW,CAAD,CAAd;EACD,CALiB,EAMlB,CAACX,OAAD,CANkB,CAApB;EASA,MAAMa,cAAc,GAAG,oBACrB,mBAAIC,CAAC,IAAK,SAAQA,CAAE,EAApB,CADqB,EAErB,oBAAK,GAAL,CAFqB,EAGrBT,UAHqB,CAAvB;EAKA,MAAMU,eAAe,GAAG;IACtBC,KAAK,EAAE,MADe;IAEtBC,KAAK,EAAE;EAFe,CAAxB;EAKA,oBACE,uDACE,6BAAC,oBAAD;IACE,KAAK,EAAE1B,KADT;IAEE,WAAW,EAAEC,WAFf;IAGE,YAAY,EAAEC,YAHhB;IAIE,cAAc,EAAEC,cAJlB;IAKE,WAAW,EAAEC,WALf;IAME,OAAO,EAAEC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AUC;AAVtB;eAaetC,W"}
1
+ {"version":3,"file":"index.js","names":["ImageUpload","title","description","previewLabel","previewContent","uploadLabel","loading","modified","disabled","onChange","onReset","name","labelLink","labelButtonLink","hrefLink","imageTypes","error","buttonAriaLabel","errorButtonLabel","handleReset","useCallback","e","preventDefault","linkCustomStyle","width","color","onDragStart","onDragStop","style","input","templateLink","href","download","propTypes","DragAndDrop","PropTypes","string","func","arrayOf","ImagePropType"],"sources":["../../../src/atom/image-upload/index.js"],"sourcesContent":["import React, {useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport {isNil} from 'lodash/fp';\nimport DragAndDrop from '../drag-and-drop';\nimport {ImagePropType} from '../../util/proptypes';\nimport Link from '../button-link';\nimport style from './style.css';\n\nconst ImageUpload = ({\n title,\n description,\n previewLabel,\n previewContent,\n uploadLabel,\n loading,\n modified,\n disabled = false,\n onChange,\n onReset = null,\n name,\n // See ImagePropType for accepted values\n labelLink,\n labelButtonLink,\n hrefLink,\n imageTypes = ['*'],\n error = '',\n buttonAriaLabel,\n errorButtonLabel\n}) => {\n const handleReset = useCallback(\n e => {\n if (isNil(onReset)) return;\n e.preventDefault();\n return onReset(e);\n },\n [onReset]\n );\n\n const linkCustomStyle = {\n width: '40px',\n color: 'red'\n };\n\n return (\n <div>\n <DragAndDrop\n title={title}\n description={description}\n previewLabel={previewLabel}\n previewContent={previewContent}\n uploadLabel={uploadLabel}\n loading={loading}\n modified={modified}\n onReset={handleReset}\n error={error}\n disabled={disabled}\n buttonAriaLabel={buttonAriaLabel}\n errorButtonLabel={errorButtonLabel}\n >\n {(onDragStart, onDragStop) => (\n <input\n type=\"file\"\n name={name}\n accept={imageTypes}\n disabled={loading || disabled}\n className={style.input}\n onChange={onChange}\n onDragEnter={onDragStart}\n onDrop={onDragStop}\n onDragLeave={onDragStop}\n />\n )}\n </DragAndDrop>\n {labelLink && hrefLink ? (\n <div className={style.templateLink}>\n {labelLink}\n <Link\n type=\"text\"\n customStyle={linkCustomStyle}\n link={{href: hrefLink, download: true}}\n label={labelButtonLink}\n />\n </div>\n ) : null}\n </div>\n );\n};\n\nImageUpload.propTypes = {\n ...DragAndDrop.propTypes,\n name: PropTypes.string,\n onChange: PropTypes.func,\n onReset: PropTypes.func,\n imageTypes: PropTypes.arrayOf(ImagePropType),\n error: PropTypes.string,\n buttonAriaLabel: PropTypes.string,\n errorButtonLabel: PropTypes.string,\n labelLink: PropTypes.string,\n hrefLink: PropTypes.string\n};\n\nexport default ImageUpload;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,WAAW,GAAG,CAAC;EACnBC,KADmB;EAEnBC,WAFmB;EAGnBC,YAHmB;EAInBC,cAJmB;EAKnBC,WALmB;EAMnBC,OANmB;EAOnBC,QAPmB;EAQnBC,QAAQ,GAAG,KARQ;EASnBC,QATmB;EAUnBC,OAAO,GAAG,IAVS;EAWnBC,IAXmB;EAYnB;EACAC,SAbmB;EAcnBC,eAdmB;EAenBC,QAfmB;EAgBnBC,UAAU,GAAG,CAAC,GAAD,CAhBM;EAiBnBC,KAAK,GAAG,EAjBW;EAkBnBC,eAlBmB;EAmBnBC;AAnBmB,CAAD,KAoBd;EACJ,MAAMC,WAAW,GAAG,IAAAC,kBAAA,EAClBC,CAAC,IAAI;IACH,IAAI,qBAAMX,OAAN,CAAJ,EAAoB;IACpBW,CAAC,CAACC,cAAF;IACA,OAAOZ,OAAO,CAACW,CAAD,CAAd;EACD,CALiB,EAMlB,CAACX,OAAD,CANkB,CAApB;EASA,MAAMa,eAAe,GAAG;IACtBC,KAAK,EAAE,MADe;IAEtBC,KAAK,EAAE;EAFe,CAAxB;EAKA,oBACE,uDACE,6BAAC,oBAAD;IACE,KAAK,EAAExB,KADT;IAEE,WAAW,EAAEC,WAFf;IAGE,YAAY,EAAEC,YAHhB;IAIE,cAAc,EAAEC,cAJlB;IAKE,WAAW,EAAEC,WALf;IAME,OAAO,EAAEC,OANX;IAOE,QAAQ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epC,W"}
@@ -0,0 +1,45 @@
1
+ .container {
2
+ width: 300px;
3
+ height: 300px;
4
+ position: relative;
5
+ perspective: 800px;
6
+ }
7
+
8
+ .square {
9
+ position: absolute;
10
+ width: 100%;
11
+ height: 100%;
12
+ transform-style: preserve-3d;
13
+ transition: transform 1s;
14
+ border: 1px solid black;
15
+ top: 100px;
16
+ left: 100px;
17
+ }
18
+
19
+ .flipped > .square {
20
+ transform: rotateY(180deg);
21
+ }
22
+
23
+ .front,
24
+ .back {
25
+ margin: 0;
26
+ display: block;
27
+ position: absolute;
28
+ width: 100%;
29
+ height: 100%;
30
+ backface-visibility: hidden;
31
+ }
32
+
33
+ .front {
34
+ font-size: 20px;
35
+ display: flex;
36
+ align-items: center;
37
+ justify-content: center;
38
+ flex-flow: column;
39
+ }
40
+
41
+ .back {
42
+ background-image: url(http://img.voi.pmdstatic.net/fit/http.3A.2F.2Fprd2-bone-image.2Es3-website-eu-west-1.2Eamazonaws.2Ecom.2Fprismamedia_people.2F2017.2F06.2F30.2Fa9a1132c-920d-4d0d-af0c-7c686d72dfe5.2Ejpeg/380x285/quality/80/jacques-chirac.jpg);
43
+ background-size: cover;
44
+ transform: rotateY(180deg);
45
+ }
@@ -0,0 +1,211 @@
1
+ # Snapshot report for `src/molecule/select-multiple/test/index.js`
2
+
3
+ The actual snapshot is saved in `index.js.snap`.
4
+
5
+ Generated by [AVA](https://ava.li).
6
+
7
+ ## should shallow render when select is opened
8
+
9
+ > Snapshot 1
10
+
11
+ ShallowWrapper {
12
+ <div
13
+ className="select-multiple__default variables__defaultText"
14
+ >
15
+ <span
16
+ className="select-multiple__title"
17
+ >
18
+ Learning Path:
19
+ </span>
20
+ <div
21
+ className="select-multiple__select"
22
+ onClick={Function {}}
23
+ title="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut"
24
+ >
25
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
26
+ <SvgComponent⍟
27
+ className="select-multiple__arrow select-multiple__down"
28
+ color={undefined}
29
+ />
30
+ </div>
31
+ <div
32
+ className="select-multiple__activeChoices"
33
+ >
34
+ <ul
35
+ className="select-multiple__list"
36
+ >
37
+ <li
38
+ className="select-multiple__choice"
39
+ key="0"
40
+ >
41
+ <TitledCheckbox⍟
42
+ background={undefined}
43
+ choice={
44
+ {
45
+ i: 0,
46
+ name: 'Digital',
47
+ selected: false,
48
+ value: 'digital',
49
+ }
50
+ }
51
+ onToggle={Function {}}
52
+ />
53
+ </li>
54
+ <li
55
+ className="select-multiple__choice"
56
+ key="1"
57
+ >
58
+ <TitledCheckbox⍟
59
+ background={undefined}
60
+ choice={
61
+ {
62
+ i: 1,
63
+ name: 'Esprit du temps',
64
+ selected: false,
65
+ value: 'espritDuTemps',
66
+ }
67
+ }
68
+ onToggle={Function {}}
69
+ />
70
+ </li>
71
+ <li
72
+ className="select-multiple__choice"
73
+ key="2"
74
+ >
75
+ <TitledCheckbox⍟
76
+ background={undefined}
77
+ choice={
78
+ {
79
+ i: 2,
80
+ name: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut',
81
+ selected: true,
82
+ value: 'loremIpsum',
83
+ }
84
+ }
85
+ onToggle={Function {}}
86
+ />
87
+ </li>
88
+ <li
89
+ className="select-multiple__choice"
90
+ key="3"
91
+ >
92
+ <TitledCheckbox⍟
93
+ background={undefined}
94
+ choice={
95
+ {
96
+ i: 3,
97
+ name: 'Le monde du projet',
98
+ selected: false,
99
+ value: 'project',
100
+ }
101
+ }
102
+ onToggle={Function {}}
103
+ />
104
+ </li>
105
+ </ul>
106
+ </div>
107
+ </div>,
108
+ }
109
+
110
+ ## should shallow render with default props
111
+
112
+ > Snapshot 1
113
+
114
+ ShallowWrapper {
115
+ <div
116
+ className="select-multiple__default variables__defaultText"
117
+ >
118
+ <span
119
+ className="select-multiple__title"
120
+ >
121
+ Learning Path:
122
+ </span>
123
+ <div
124
+ className="select-multiple__select"
125
+ onClick={Function {}}
126
+ title="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut"
127
+ >
128
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
129
+ <SvgComponent⍟
130
+ className="select-multiple__arrow"
131
+ color={undefined}
132
+ />
133
+ </div>
134
+ <div
135
+ className="select-multiple__choices"
136
+ >
137
+ <ul
138
+ className="select-multiple__list"
139
+ >
140
+ <li
141
+ className="select-multiple__choice"
142
+ key="0"
143
+ >
144
+ <TitledCheckbox⍟
145
+ background={undefined}
146
+ choice={
147
+ {
148
+ i: 0,
149
+ name: 'Digital',
150
+ selected: false,
151
+ value: 'digital',
152
+ }
153
+ }
154
+ onToggle={Function {}}
155
+ />
156
+ </li>
157
+ <li
158
+ className="select-multiple__choice"
159
+ key="1"
160
+ >
161
+ <TitledCheckbox⍟
162
+ background={undefined}
163
+ choice={
164
+ {
165
+ i: 1,
166
+ name: 'Esprit du temps',
167
+ selected: false,
168
+ value: 'espritDuTemps',
169
+ }
170
+ }
171
+ onToggle={Function {}}
172
+ />
173
+ </li>
174
+ <li
175
+ className="select-multiple__choice"
176
+ key="2"
177
+ >
178
+ <TitledCheckbox⍟
179
+ background={undefined}
180
+ choice={
181
+ {
182
+ i: 2,
183
+ name: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut',
184
+ selected: true,
185
+ value: 'loremIpsum',
186
+ }
187
+ }
188
+ onToggle={Function {}}
189
+ />
190
+ </li>
191
+ <li
192
+ className="select-multiple__choice"
193
+ key="3"
194
+ >
195
+ <TitledCheckbox⍟
196
+ background={undefined}
197
+ choice={
198
+ {
199
+ i: 3,
200
+ name: 'Le monde du projet',
201
+ selected: false,
202
+ value: 'project',
203
+ }
204
+ }
205
+ onToggle={Function {}}
206
+ />
207
+ </li>
208
+ </ul>
209
+ </div>
210
+ </div>,
211
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"proptypes.d.ts","sourceRoot":"","sources":["../../src/util/proptypes.js"],"names":[],"mappings":"AASA,8BAAsD;AAGtD,+BAAwD;AAExD,qDAA4E;AAErE,+FAKN;AAED,gCAA4C;AAC5C,8BAAwC"}
1
+ {"version":3,"file":"proptypes.d.ts","sourceRoot":"","sources":["../../src/util/proptypes.js"],"names":[],"mappings":"AASA,8BAAsD;AAGtD,+BAAwD;AAExD,qDAA4E;AAErE,+FAMN;AAED,gCAA4C;AAC5C,8BAAwC"}
@@ -27,8 +27,8 @@ const SrcPropType = _propTypes.default.oneOfType([UrlPropType, PathPropType]);
27
27
  exports.SrcPropType = SrcPropType;
28
28
 
29
29
  const ImagePropType = (propValue, key, componentName) => {
30
- if ((0, _includes.default)(propValue[key], ['jpg', 'png', 'svg+xml'])) return;
31
- return new Error(`Invalid prop value: ${propValue[key]}, at component: ${componentName}. Expected a valid image type: jpg, png or svg+xml.`);
30
+ if ((0, _includes.default)(propValue[key], ['image/jpg', 'image/png', 'image/svg+xml', 'application/pdf'])) return;
31
+ return new Error(`Invalid prop value: ${propValue[key]}, at component: ${componentName}. Expected a valid image type: image/jpg, image/png, image/svg+xml or application/pdf.`);
32
32
  };
33
33
 
34
34
  exports.ImagePropType = ImagePropType;
@@ -1 +1 @@
1
- {"version":3,"file":"proptypes.js","names":["URL_REGEXP","UrlPropType","stringMatching","PATH_REGEXP","PathPropType","SrcPropType","PropTypes","oneOfType","ImagePropType","propValue","key","componentName","includes","Error","ColorPropType","_ColorPropType","HexPropType","_HexPropType"],"sources":["../../src/util/proptypes.js"],"sourcesContent":["import PropTypes from 'prop-types';\nimport includes from 'lodash/fp/includes';\nimport stringMatching from 'extended-proptypes/lib/validators/stringMatching';\n\nimport _ColorPropType from 'extended-proptypes/lib/validators/color';\nimport _HexPropType from 'extended-proptypes/lib/validators/hex';\n\nconst URL_REGEXP =\n /^(http(s)?:\\/\\/.)[-a-zA-Z0-9@:%._\\\\+~#=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\\\\+.~#?&//=]*)$/;\nexport const UrlPropType = stringMatching(URL_REGEXP);\n\nconst PATH_REGEXP = /^\\/([-a-zA-Z0-9@:%_\\\\+.~#?&//=]*)$/;\nexport const PathPropType = stringMatching(PATH_REGEXP);\n\nexport const SrcPropType = PropTypes.oneOfType([UrlPropType, PathPropType]);\n\nexport const ImagePropType = (propValue, key, componentName) => {\n if (includes(propValue[key], ['jpg', 'png', 'svg+xml'])) return;\n return new Error(\n `Invalid prop value: ${propValue[key]}, at component: ${componentName}. Expected a valid image type: jpg, png or svg+xml.`\n );\n};\n\nexport const ColorPropType = _ColorPropType;\nexport const HexPropType = _HexPropType;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;;;AAEA,MAAMA,UAAU,GACd,8FADF;AAEO,MAAMC,WAAW,GAAG,IAAAC,uBAAA,EAAeF,UAAf,CAApB;;AAEP,MAAMG,WAAW,GAAG,oCAApB;AACO,MAAMC,YAAY,GAAG,IAAAF,uBAAA,EAAeC,WAAf,CAArB;;;AAEA,MAAME,WAAW,GAAGC,kBAAA,CAAUC,SAAV,CAAoB,CAACN,WAAD,EAAcG,YAAd,CAApB,CAApB;;;;AAEA,MAAMI,aAAa,GAAG,CAACC,SAAD,EAAYC,GAAZ,EAAiBC,aAAjB,KAAmC;EAC9D,IAAI,IAAAC,iBAAA,EAASH,SAAS,CAACC,GAAD,CAAlB,EAAyB,CAAC,KAAD,EAAQ,KAAR,EAAe,SAAf,CAAzB,CAAJ,EAAyD;EACzD,OAAO,IAAIG,KAAJ,CACJ,uBAAsBJ,SAAS,CAACC,GAAD,CAAM,mBAAkBC,aAAc,qDADjE,CAAP;AAGD,CALM;;;AAOA,MAAMG,aAAa,GAAGC,cAAtB;;AACA,MAAMC,WAAW,GAAGC,YAApB"}
1
+ {"version":3,"file":"proptypes.js","names":["URL_REGEXP","UrlPropType","stringMatching","PATH_REGEXP","PathPropType","SrcPropType","PropTypes","oneOfType","ImagePropType","propValue","key","componentName","includes","Error","ColorPropType","_ColorPropType","HexPropType","_HexPropType"],"sources":["../../src/util/proptypes.js"],"sourcesContent":["import PropTypes from 'prop-types';\nimport includes from 'lodash/fp/includes';\nimport stringMatching from 'extended-proptypes/lib/validators/stringMatching';\n\nimport _ColorPropType from 'extended-proptypes/lib/validators/color';\nimport _HexPropType from 'extended-proptypes/lib/validators/hex';\n\nconst URL_REGEXP =\n /^(http(s)?:\\/\\/.)[-a-zA-Z0-9@:%._\\\\+~#=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\\\\+.~#?&//=]*)$/;\nexport const UrlPropType = stringMatching(URL_REGEXP);\n\nconst PATH_REGEXP = /^\\/([-a-zA-Z0-9@:%_\\\\+.~#?&//=]*)$/;\nexport const PathPropType = stringMatching(PATH_REGEXP);\n\nexport const SrcPropType = PropTypes.oneOfType([UrlPropType, PathPropType]);\n\nexport const ImagePropType = (propValue, key, componentName) => {\n if (includes(propValue[key], ['image/jpg', 'image/png', 'image/svg+xml', 'application/pdf']))\n return;\n return new Error(\n `Invalid prop value: ${propValue[key]}, at component: ${componentName}. Expected a valid image type: image/jpg, image/png, image/svg+xml or application/pdf.`\n );\n};\n\nexport const ColorPropType = _ColorPropType;\nexport const HexPropType = _HexPropType;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;;;AAEA,MAAMA,UAAU,GACd,8FADF;AAEO,MAAMC,WAAW,GAAG,IAAAC,uBAAA,EAAeF,UAAf,CAApB;;AAEP,MAAMG,WAAW,GAAG,oCAApB;AACO,MAAMC,YAAY,GAAG,IAAAF,uBAAA,EAAeC,WAAf,CAArB;;;AAEA,MAAME,WAAW,GAAGC,kBAAA,CAAUC,SAAV,CAAoB,CAACN,WAAD,EAAcG,YAAd,CAApB,CAApB;;;;AAEA,MAAMI,aAAa,GAAG,CAACC,SAAD,EAAYC,GAAZ,EAAiBC,aAAjB,KAAmC;EAC9D,IAAI,IAAAC,iBAAA,EAASH,SAAS,CAACC,GAAD,CAAlB,EAAyB,CAAC,WAAD,EAAc,WAAd,EAA2B,eAA3B,EAA4C,iBAA5C,CAAzB,CAAJ,EACE;EACF,OAAO,IAAIG,KAAJ,CACJ,uBAAsBJ,SAAS,CAACC,GAAD,CAAM,mBAAkBC,aAAc,wFADjE,CAAP;AAGD,CANM;;;AAQA,MAAMG,aAAa,GAAGC,cAAtB;;AACA,MAAMC,WAAW,GAAGC,YAApB"}
@@ -0,0 +1,34 @@
1
+ [{
2
+ "label": "1mn",
3
+ "value": 1
4
+ }, {
5
+ "label": "2mn",
6
+ "value": 2
7
+ }, {
8
+ "label": "3mn",
9
+ "value": 3
10
+ }, {
11
+ "label": "5mn",
12
+ "value": 5
13
+ }, {
14
+ "label": "10mn",
15
+ "value": 10
16
+ }, {
17
+ "label": "15mn",
18
+ "value": 15
19
+ }, {
20
+ "label": "30mn",
21
+ "value": 30
22
+ }, {
23
+ "label": "45mn",
24
+ "value": 45
25
+ }, {
26
+ "label": "1h",
27
+ "value": 60
28
+ }, {
29
+ "label": "2h",
30
+ "value": 120
31
+ }, {
32
+ "label": "2h+",
33
+ "value": 121
34
+ }]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coorpacademy/components",
3
- "version": "11.11.15",
3
+ "version": "11.11.16-alpha.0+d14228c5d",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -164,5 +164,6 @@
164
164
  "browserslist": [
165
165
  "last 2 versions",
166
166
  "IE 11"
167
- ]
167
+ ],
168
+ "gitHead": "d14228c5d4f60505ed21e11124a0151c467b69aa"
168
169
  }