@pie-lib/correct-answer-toggle 2.3.45 → 2.3.47-next.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/lib/expander.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/styles.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.3.46](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.3.45...@pie-lib/correct-answer-toggle@2.3.46) (2022-09-28)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [2.3.45](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.3.44...@pie-lib/correct-answer-toggle@2.3.45) (2022-09-14)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
package/lib/expander.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"expander.js","names":["Expander","props","classes","show","children","expander","propTypes","PropTypes","bool","isRequired","className","string","object","oneOfType","arrayOf","node","transition","withStyles","position","height","overflow","display","visibility","width","enter","opacity","enterDone","exit","exitDone"],"sources":["../src/expander.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\nimport { CSSTransition } from 'react-transition-group';\n\nconst Expander = props => {\n const { classes, show, children } = props;\n\n return (\n <CSSTransition\n in={show}\n appear={true}\n mountOnEnter={false}\n timeout={300}\n classNames={{ ...classes }}\n >\n <div className={classes.expander}>{children}</div>\n </CSSTransition>\n );\n};\n\nExpander.propTypes = {\n show: PropTypes.bool.isRequired,\n className: PropTypes.string,\n classes: PropTypes.object,\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired\n};\n\nconst transition = 'height ease-in 300ms, opacity ease-in 300ms';\n\nexport default withStyles(() => ({\n expander: {\n position: 'relative',\n height: 0,\n overflow: 'hidden',\n display: 'flex',\n visibility: 'hidden',\n width: 0\n },\n enter: {\n transition,\n opacity: 1,\n height: '25px',\n width: 'auto',\n visibility: 'visible'\n },\n enterDone: {\n height: '25px',\n visibility: 'visible',\n width: 'auto'\n },\n exit: {\n transition,\n opacity: 0,\n height: 0,\n visibility: 'visible',\n width: 0\n },\n exitDone: {\n opacity: 0,\n visibility: 'hidden',\n height: 0,\n width: 0\n }\n}))(Expander);\n"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;AAEA,IAAMA,QAAQ,GAAG,SAAXA,QAAW,CAAAC,KAAK,EAAI;EACxB,IAAQC,OAAR,GAAoCD,KAApC,CAAQC,OAAR;EAAA,IAAiBC,IAAjB,GAAoCF,KAApC,CAAiBE,IAAjB;EAAA,IAAuBC,QAAvB,GAAoCH,KAApC,CAAuBG,QAAvB;EAEA,oBACE,gCAAC,mCAAD;IACE,MAAID,IADN;IAEE,MAAM,EAAE,IAFV;IAGE,YAAY,EAAE,KAHhB;IAIE,OAAO,EAAE,GAJX;IAKE,UAAU,oBAAOD,OAAP;EALZ,gBAOE;IAAK,SAAS,EAAEA,OAAO,CAACG;EAAxB,GAAmCD,QAAnC,CAPF,CADF;AAWD,CAdD;;AAgBAJ,QAAQ,CAACM,SAAT,GAAqB;EACnBH,IAAI,EAAEI,qBAAA,CAAUC,IAAV,CAAeC,UADF;EAEnBC,SAAS,EAAEH,qBAAA,CAAUI,MAFF;EAGnBT,OAAO,EAAEK,qBAAA,CAAUK,MAHA;EAInBR,QAAQ,EAAEG,qBAAA,CAAUM,SAAV,CAAoB,CAACN,qBAAA,CAAUO,OAAV,CAAkBP,qBAAA,CAAUQ,IAA5B,CAAD,EAAoCR,qBAAA,CAAUQ,IAA9C,CAApB,EAAyEN;AAJhE,CAArB;AAOA,IAAMO,UAAU,GAAG,6CAAnB;;eAEe,IAAAC,kBAAA,EAAW;EAAA,OAAO;IAC/BZ,QAAQ,EAAE;MACRa,QAAQ,EAAE,UADF;MAERC,MAAM,EAAE,CAFA;MAGRC,QAAQ,EAAE,QAHF;MAIRC,OAAO,EAAE,MAJD;MAKRC,UAAU,EAAE,QALJ;MAMRC,KAAK,EAAE;IANC,CADqB;IAS/BC,KAAK,EAAE;MACLR,UAAU,EAAVA,UADK;MAELS,OAAO,EAAE,CAFJ;MAGLN,MAAM,EAAE,MAHH;MAILI,KAAK,EAAE,MAJF;MAKLD,UAAU,EAAE;IALP,CATwB;IAgB/BI,SAAS,EAAE;MACTP,MAAM,EAAE,MADC;MAETG,UAAU,EAAE,SAFH;MAGTC,KAAK,EAAE;IAHE,CAhBoB;IAqB/BI,IAAI,EAAE;MACJX,UAAU,EAAVA,UADI;MAEJS,OAAO,EAAE,CAFL;MAGJN,MAAM,EAAE,CAHJ;MAIJG,UAAU,EAAE,SAJR;MAKJC,KAAK,EAAE;IALH,CArByB;IA4B/BK,QAAQ,EAAE;MACRH,OAAO,EAAE,CADD;MAERH,UAAU,EAAE,QAFJ;MAGRH,MAAM,EAAE,CAHA;MAIRI,KAAK,EAAE;IAJC;EA5BqB,CAAP;AAAA,CAAX,EAkCXvB,QAlCW,C"}
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":["CorrectAnswerToggle","props","state","show","onToggle","toggled","nextProps","setState","classes","className","hideMessage","showMessage","classNames","root","expander","content","onClick","bind","iconHolder","icon","label","React","Component","PropTypes","func","bool","string","object","isRequired","withStyles","styles"],"sources":["../src/index.jsx"],"sourcesContent":["import styles from './styles';\nimport { withStyles } from '@material-ui/core/styles';\nimport CSSTransition from 'react-transition-group/CSSTransition';\nimport { CorrectResponse } from '@pie-lib/icons';\nimport { Readable } from '@pie-lib/render-ui';\nimport Expander from './expander';\nimport React from 'react';\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\n/**\n * We export the raw unstyled class for testability. For public use please use the default export.\n */\nexport class CorrectAnswerToggle extends React.Component {\n static propTypes = {\n onToggle: PropTypes.func,\n toggled: PropTypes.bool,\n show: PropTypes.bool,\n hideMessage: PropTypes.string,\n showMessage: PropTypes.string,\n classes: PropTypes.object.isRequired,\n className: PropTypes.string\n };\n\n static defaultProps = {\n showMessage: 'Show correct answer',\n hideMessage: 'Hide correct answer',\n show: false,\n toggled: false\n };\n\n constructor(props) {\n super(props);\n this.state = {\n show: props.show\n };\n }\n\n onClick() {\n this.props.onToggle(!this.props.toggled);\n }\n\n componentWillReceiveProps(nextProps) {\n this.setState({\n show: nextProps.show\n });\n }\n\n render() {\n const { classes, className, toggled, hideMessage, showMessage } = this.props;\n\n return (\n <div className={classNames(classes.root, className)}>\n <Expander show={this.state.show} className={classes.expander}>\n <div className={classes.content} onClick={this.onClick.bind(this)}>\n <div className={classes.iconHolder}>\n <CSSTransition timeout={400} in={toggled} exit={!toggled} classNames={classes}>\n <CorrectResponse open={toggled} key=\"correct-open\" className={classes.icon} />\n </CSSTransition>\n <CSSTransition timeout={5000} in={!toggled} exit={toggled} classNames={classes}>\n <CorrectResponse open={toggled} key=\"correct-closed\" className={classes.icon} />\n </CSSTransition>\n </div>\n <Readable false>\n <div className={classes.label} aria-hidden={!this.state.show}>\n {toggled ? hideMessage : showMessage}\n </div>\n </Readable>\n </div>\n </Expander>\n </div>\n );\n }\n}\n\nexport default withStyles(styles)(CorrectAnswerToggle);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AACA;AACA;AACA;IACaA,mB;;;;;EAkBX,6BAA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;QAA4C,IAAI,EAAEA,OAAlD;QAA2D,UAAU,EAAEG;MAAvE,gBACE,gCAAC,sBAAD;QAAiB,IAAI,EAAEH,OAAvB;QAAgC,GAAG,EAAC,gBAApC;QAAqD,SAAS,EAAEG,OAAO,CAACW;MAAxE,EADF,CAJF,CADF,eASE,gCAAC,kBAAD;QAAU;MAAV,gBACE;QAAK,SAAS,EAAEX,OAAO,CAACY,KAAxB;QAA+B,eAAa,CAAC,KAAKlB,KAAL,CAAWC;MAAxD,GACGE,OAAO,GAAGK,WAAH,GAAiBC,WAD3B,CADF,CATF,CADF,CADF,CADF;IAqBD;;;EA3DsCU,iBAAA,CAAMC,S;;;iCAAlCtB,mB,eACQ;EACjBI,QAAQ,EAAEmB,qBAAA,CAAUC,IADH;EAEjBnB,OAAO,EAAEkB,qBAAA,CAAUE,IAFF;EAGjBtB,IAAI,EAAEoB,qBAAA,CAAUE,IAHC;EAIjBf,WAAW,EAAEa,qBAAA,CAAUG,MAJN;EAKjBf,WAAW,EAAEY,qBAAA,CAAUG,MALN;EAMjBlB,OAAO,EAAEe,qBAAA,CAAUI,MAAV,CAAiBC,UANT;EAOjBnB,SAAS,EAAEc,qBAAA,CAAUG;AAPJ,C;iCADR1B,mB,kBAWW;EACpBW,WAAW,EAAE,qBADO;EAEpBD,WAAW,EAAE,qBAFO;EAGpBP,IAAI,EAAE,KAHc;EAIpBE,OAAO,EAAE;AAJW,C;;eAmDT,IAAAwB,mBAAA,EAAWC,kBAAX,EAAmB9B,mBAAnB,C"}
|
package/lib/styles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"styles.js","names":["noTouch","root","width","cursor","content","margin","textAlign","display","label","Object","assign","fontFamily","height","lineHeight","verticalAlign","color","text","fontSize","fontWeight","icon","position","iconHolder","marginRight","enter","opacity","enterActive","transition","exit","exitActive","animationStyles"],"sources":["../src/styles.js"],"sourcesContent":["import { color } from '@pie-lib/render-ui';\n\nconst noTouch = {\n '-webkit-touchCcallout': 'none',\n '-webkit-user-select': 'none',\n '-khtml-user-select': 'none',\n '-moz-user-select': 'none',\n '-ms-user-select': 'none',\n 'user-select': 'none'\n};\n\nexport default {\n root: {\n width: '100%',\n cursor: 'pointer'\n },\n content: {\n margin: '0 auto',\n textAlign: 'center',\n display: 'flex'\n },\n label: Object.assign(\n {\n width: '140px',\n // eslint-disable-next-line\n fontFamily: \"'Roboto', sans-serif\",\n height: '25px',\n lineHeight: '25px',\n verticalAlign: 'middle',\n color: `var(--correct-answer-toggle-label-color, ${color.text()})`,\n fontSize: '15px',\n fontWeight: 'normal'\n },\n noTouch\n ),\n icon: {\n position: 'absolute',\n width: '25px'\n },\n iconHolder: {\n width: '25px',\n marginRight: '5px'\n },\n enter: {\n opacity: '0'\n },\n enterActive: {\n opacity: '1',\n transition: 'opacity 0.3s ease-in'\n },\n exit: {\n opacity: '1'\n },\n exitActive: {\n opacity: '0',\n transition: 'opacity 0.3s ease-in'\n }\n};\n\nexport const animationStyles = {};\n"],"mappings":";;;;;;;AAAA;;AAEA,IAAMA,OAAO,GAAG;EACd,yBAAyB,MADX;EAEd,uBAAuB,MAFT;EAGd,sBAAsB,MAHR;EAId,oBAAoB,MAJN;EAKd,mBAAmB,MALL;EAMd,eAAe;AAND,CAAhB;eASe;EACbC,IAAI,EAAE;IACJC,KAAK,EAAE,MADH;IAEJC,MAAM,EAAE;EAFJ,CADO;EAKbC,OAAO,EAAE;IACPC,MAAM,EAAE,QADD;IAEPC,SAAS,EAAE,QAFJ;IAGPC,OAAO,EAAE;EAHF,CALI;EAUbC,KAAK,EAAEC,MAAM,CAACC,MAAP,CACL;IACER,KAAK,EAAE,OADT;IAEE;IACAS,UAAU,EAAE,sBAHd;IAIEC,MAAM,EAAE,MAJV;IAKEC,UAAU,EAAE,MALd;IAMEC,aAAa,EAAE,QANjB;IAOEC,KAAK,sDAA+CA,eAAA,CAAMC,IAAN,EAA/C,MAPP;IAQEC,QAAQ,EAAE,MARZ;IASEC,UAAU,EAAE;EATd,CADK,EAYLlB,OAZK,CAVM;EAwBbmB,IAAI,EAAE;IACJC,QAAQ,EAAE,UADN;IAEJlB,KAAK,EAAE;EAFH,CAxBO;EA4BbmB,UAAU,EAAE;IACVnB,KAAK,EAAE,MADG;IAEVoB,WAAW,EAAE;EAFH,CA5BC;EAgCbC,KAAK,EAAE;IACLC,OAAO,EAAE;EADJ,CAhCM;EAmCbC,WAAW,EAAE;IACXD,OAAO,EAAE,GADE;IAEXE,UAAU,EAAE;EAFD,CAnCA;EAuCbC,IAAI,EAAE;IACJH,OAAO,EAAE;EADL,CAvCO;EA0CbI,UAAU,EAAE;IACVJ,OAAO,EAAE,GADC;IAEVE,UAAU,EAAE;EAFF;AA1CC,C;;AAgDR,IAAMG,eAAe,GAAG,EAAxB"}
|
package/package.json
CHANGED
|
@@ -11,14 +11,14 @@
|
|
|
11
11
|
"publishConfig": {
|
|
12
12
|
"access": "public"
|
|
13
13
|
},
|
|
14
|
-
"version": "2.3.
|
|
14
|
+
"version": "2.3.47-next.43+7088b0ff",
|
|
15
15
|
"main": "lib/index.js",
|
|
16
16
|
"module": "src/index.jsx",
|
|
17
17
|
"scripts": {},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@material-ui/core": "^3.8.3",
|
|
20
20
|
"@pie-lib/icons": "^2.4.25",
|
|
21
|
-
"@pie-lib/render-ui": "^4.13.
|
|
21
|
+
"@pie-lib/render-ui": "^4.13.7-next.43+7088b0ff",
|
|
22
22
|
"classnames": "^2.2.6",
|
|
23
23
|
"lodash": "^4.17.11",
|
|
24
24
|
"prop-types": "^15.6.2",
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"react": "^16.8.1",
|
|
33
33
|
"react-dom": "^16.8.1"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "7088b0ff539185f61af22b79f2f122c093e972cb"
|
|
36
36
|
}
|