@nice-digital/nds-maintain-ratio 2.0.2-alpha.0 → 2.0.3-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.
package/README.md CHANGED
@@ -84,7 +84,7 @@ The content to maintain the ratio of. Expects, but isn't limited to, a single el
84
84
  If you're not using [React](#react), then import the SCSS directly into your application by:
85
85
 
86
86
  ```scss
87
- @import "~@nice-digital/nds-maintain-ratio/scss/maintain-ratio";
87
+ @forward '@nice-digital/nds-maintain-ratio/scss/maintain-ratio';
88
88
  ```
89
89
 
90
90
  ### HTML
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/MaintainRatio.js"],"names":["React","PropTypes","classnames","MaintainRatio","props","ratio","className","stretchFirstChild","children","attributes","classNames","propTypes","oneOf","string","node","isRequired","bool","defaultProps","ratios","square"],"mappings":";;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,OAAO,6BAAP;AAEA,OAAO,IAAMC,aAAa,GAAG,SAAhBA,aAAgB,CAAAC,KAAK,EAAI;AAAA;;AACrC,MACCC,KADD,GAMID,KANJ,CACCC,KADD;AAAA,MAECC,SAFD,GAMIF,KANJ,CAECE,SAFD;AAAA,MAGCC,iBAHD,GAMIH,KANJ,CAGCG,iBAHD;AAAA,MAICC,QAJD,GAMIJ,KANJ,CAICI,QAJD;AAAA,MAKIC,UALJ,iCAMIL,KANJ;;AAQA,MAAMM,UAAU,GAAGR,UAAU;AAC5B,sBAAkB,IADU;AAE5B,4BAAwBG,KAAK,KAAK,MAFN;AAG5B,4BAAwBA,KAAK,KAAK,MAHN;AAI5B,2BAAuBA,KAAK,KAAK,KAJL;AAK5B,8BAA0BA,KAAK,KAAK,QAAV,IAAsBA,KAAK,KAAK,KAL9B;AAM5B,+BAA2BE;AANC,iBAO3BD,SAP2B,IAOfA,SAAS,IAAI,IAPE,eAA7B;AAUA,sBACC;AAAK,IAAA,SAAS,EAAEI;AAAhB,KAAgCD,UAAhC,GACED,QADF,CADD;AAKA,CAxBM;AA0BPL,aAAa,CAACQ,SAAd,GAA0B;AACzBN,EAAAA,KAAK,EAAEJ,SAAS,CAACW,KAAV,CAAgB,CAAC,MAAD,EAAS,MAAT,EAAiB,KAAjB,EAAwB,QAAxB,EAAkC,KAAlC,CAAhB,CADkB;AAEzBN,EAAAA,SAAS,EAAEL,SAAS,CAACY,MAFI;AAGzBL,EAAAA,QAAQ,EAAEP,SAAS,CAACa,IAAV,CAAeC,UAHA;AAIzBR,EAAAA,iBAAiB,EAAEN,SAAS,CAACe;AAJJ,CAA1B;AAOAb,aAAa,CAACc,YAAd,GAA6B;AAC5BZ,EAAAA,KAAK,EAAE,MADqB;AAE5BE,EAAAA,iBAAiB,EAAE;AAFS,CAA7B;AAKAJ,aAAa,CAACe,MAAd,GAAuB;AACtB,UAAQ,MADc;AAEtB,UAAQ,MAFc;AAGtB,SAAO,KAHe;AAItBC,EAAAA,MAAM,EAAE,QAJc;AAKtB,SAAO;AALe,CAAvB","sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport classnames from \"classnames\";\n\nimport \"../scss/maintain-ratio.scss\";\n\nexport const MaintainRatio = props => {\n\tconst {\n\t\tratio,\n\t\tclassName,\n\t\tstretchFirstChild,\n\t\tchildren,\n\t\t...attributes\n\t} = props;\n\n\tconst classNames = classnames({\n\t\t\"maintain-ratio\": true,\n\t\t\"maintain-ratio--16-9\": ratio === \"16:9\",\n\t\t\"maintain-ratio--21-9\": ratio === \"21:9\",\n\t\t\"maintain-ratio--4-3\": ratio === \"4:3\",\n\t\t\"maintain-ratio--square\": ratio === \"square\" || ratio === \"1:1\",\n\t\t\"maintain-ratio--stretch\": stretchFirstChild,\n\t\t[className]: className && true\n\t});\n\n\treturn (\n\t\t<div className={classNames} {...attributes}>\n\t\t\t{children}\n\t\t</div>\n\t);\n};\n\nMaintainRatio.propTypes = {\n\tratio: PropTypes.oneOf([\"16:9\", \"21:9\", \"4:3\", \"square\", \"1:1\"]),\n\tclassName: PropTypes.string,\n\tchildren: PropTypes.node.isRequired,\n\tstretchFirstChild: PropTypes.bool\n};\n\nMaintainRatio.defaultProps = {\n\tratio: \"16:9\",\n\tstretchFirstChild: false\n};\n\nMaintainRatio.ratios = {\n\t\"16:9\": \"16:9\",\n\t\"21:9\": \"21:9\",\n\t\"4:3\": \"4:3\",\n\tsquare: \"square\",\n\t\"1:1\": \"square\"\n};\n"],"file":"MaintainRatio.js"}
1
+ {"version":3,"file":"MaintainRatio.js","names":["React","PropTypes","classnames","MaintainRatio","props","ratio","className","stretchFirstChild","children","attributes","classNames","propTypes","oneOf","string","node","isRequired","bool","defaultProps","ratios","square"],"sources":["../src/MaintainRatio.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport classnames from \"classnames\";\n\nimport \"../scss/maintain-ratio.scss\";\n\nexport const MaintainRatio = (props) => {\n\tconst { ratio, className, stretchFirstChild, children, ...attributes } =\n\t\tprops;\n\n\tconst classNames = classnames({\n\t\t\"maintain-ratio\": true,\n\t\t\"maintain-ratio--16-9\": ratio === \"16:9\",\n\t\t\"maintain-ratio--21-9\": ratio === \"21:9\",\n\t\t\"maintain-ratio--4-3\": ratio === \"4:3\",\n\t\t\"maintain-ratio--square\": ratio === \"square\" || ratio === \"1:1\",\n\t\t\"maintain-ratio--stretch\": stretchFirstChild,\n\t\t[className]: className && true\n\t});\n\n\treturn (\n\t\t<div className={classNames} {...attributes}>\n\t\t\t{children}\n\t\t</div>\n\t);\n};\n\nMaintainRatio.propTypes = {\n\tratio: PropTypes.oneOf([\"16:9\", \"21:9\", \"4:3\", \"square\", \"1:1\"]),\n\tclassName: PropTypes.string,\n\tchildren: PropTypes.node.isRequired,\n\tstretchFirstChild: PropTypes.bool\n};\n\nMaintainRatio.defaultProps = {\n\tratio: \"16:9\",\n\tstretchFirstChild: false\n};\n\nMaintainRatio.ratios =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d,GAA6B;EAC5BZ,KAAK,EAAE,MADqB;EAE5BE,iBAAiB,EAAE;AAFS,CAA7B;AAKAJ,aAAa,CAACe,MAAd,GAAuB;EACtB,QAAQ,MADc;EAEtB,QAAQ,MAFc;EAGtB,OAAO,KAHe;EAItBC,MAAM,EAAE,QAJc;EAKtB,OAAO;AALe,CAAvB"}
@@ -44,7 +44,7 @@ var MaintainRatio = function MaintainRatio(props) {
44
44
  __self: _this,
45
45
  __source: {
46
46
  fileName: _jsxFileName,
47
- lineNumber: 27,
47
+ lineNumber: 22,
48
48
  columnNumber: 3
49
49
  }
50
50
  }), children);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/MaintainRatio.js"],"names":["MaintainRatio","props","ratio","className","stretchFirstChild","children","attributes","classNames","propTypes","PropTypes","oneOf","string","node","isRequired","bool","defaultProps","ratios","square"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;;;;;;AAEO,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,CAAAC,KAAK,EAAI;AAAA;;AACrC,MACCC,KADD,GAMID,KANJ,CACCC,KADD;AAAA,MAECC,SAFD,GAMIF,KANJ,CAECE,SAFD;AAAA,MAGCC,iBAHD,GAMIH,KANJ,CAGCG,iBAHD;AAAA,MAICC,QAJD,GAMIJ,KANJ,CAICI,QAJD;AAAA,MAKIC,UALJ,kDAMIL,KANJ;AAQA,MAAMM,UAAU,GAAG;AAClB,sBAAkB,IADA;AAElB,4BAAwBL,KAAK,KAAK,MAFhB;AAGlB,4BAAwBA,KAAK,KAAK,MAHhB;AAIlB,2BAAuBA,KAAK,KAAK,KAJf;AAKlB,8BAA0BA,KAAK,KAAK,QAAV,IAAsBA,KAAK,KAAK,KALxC;AAMlB,+BAA2BE;AANT,iBAOjBD,SAPiB,IAOLA,SAAS,IAAI,IAPR,eAAnB;AAUA,sBACC;AAAK,IAAA,SAAS,EAAEI;AAAhB,KAAgCD,UAAhC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MACED,QADF,CADD;AAKA,CAxBM;;;AA0BPL,aAAa,CAACQ,SAAd,GAA0B;AACzBN,EAAAA,KAAK,EAAEO,sBAAUC,KAAV,CAAgB,CAAC,MAAD,EAAS,MAAT,EAAiB,KAAjB,EAAwB,QAAxB,EAAkC,KAAlC,CAAhB,CADkB;AAEzBP,EAAAA,SAAS,EAAEM,sBAAUE,MAFI;AAGzBN,EAAAA,QAAQ,EAAEI,sBAAUG,IAAV,CAAeC,UAHA;AAIzBT,EAAAA,iBAAiB,EAAEK,sBAAUK;AAJJ,CAA1B;AAOAd,aAAa,CAACe,YAAd,GAA6B;AAC5Bb,EAAAA,KAAK,EAAE,MADqB;AAE5BE,EAAAA,iBAAiB,EAAE;AAFS,CAA7B;AAKAJ,aAAa,CAACgB,MAAd,GAAuB;AACtB,UAAQ,MADc;AAEtB,UAAQ,MAFc;AAGtB,SAAO,KAHe;AAItBC,EAAAA,MAAM,EAAE,QAJc;AAKtB,SAAO;AALe,CAAvB","sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport classnames from \"classnames\";\n\nimport \"../scss/maintain-ratio.scss\";\n\nexport const MaintainRatio = props => {\n\tconst {\n\t\tratio,\n\t\tclassName,\n\t\tstretchFirstChild,\n\t\tchildren,\n\t\t...attributes\n\t} = props;\n\n\tconst classNames = classnames({\n\t\t\"maintain-ratio\": true,\n\t\t\"maintain-ratio--16-9\": ratio === \"16:9\",\n\t\t\"maintain-ratio--21-9\": ratio === \"21:9\",\n\t\t\"maintain-ratio--4-3\": ratio === \"4:3\",\n\t\t\"maintain-ratio--square\": ratio === \"square\" || ratio === \"1:1\",\n\t\t\"maintain-ratio--stretch\": stretchFirstChild,\n\t\t[className]: className && true\n\t});\n\n\treturn (\n\t\t<div className={classNames} {...attributes}>\n\t\t\t{children}\n\t\t</div>\n\t);\n};\n\nMaintainRatio.propTypes = {\n\tratio: PropTypes.oneOf([\"16:9\", \"21:9\", \"4:3\", \"square\", \"1:1\"]),\n\tclassName: PropTypes.string,\n\tchildren: PropTypes.node.isRequired,\n\tstretchFirstChild: PropTypes.bool\n};\n\nMaintainRatio.defaultProps = {\n\tratio: \"16:9\",\n\tstretchFirstChild: false\n};\n\nMaintainRatio.ratios = {\n\t\"16:9\": \"16:9\",\n\t\"21:9\": \"21:9\",\n\t\"4:3\": \"4:3\",\n\tsquare: \"square\",\n\t\"1:1\": \"square\"\n};\n"],"file":"MaintainRatio.js"}
1
+ {"version":3,"file":"MaintainRatio.js","names":["MaintainRatio","props","ratio","className","stretchFirstChild","children","attributes","classNames","classnames","propTypes","PropTypes","oneOf","string","node","isRequired","bool","defaultProps","ratios","square"],"sources":["../src/MaintainRatio.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport classnames from \"classnames\";\n\nimport \"../scss/maintain-ratio.scss\";\n\nexport const MaintainRatio = (props) => {\n\tconst { ratio, className, stretchFirstChild, children, ...attributes } =\n\t\tprops;\n\n\tconst classNames = classnames({\n\t\t\"maintain-ratio\": true,\n\t\t\"maintain-ratio--16-9\": ratio === \"16:9\",\n\t\t\"maintain-ratio--21-9\": ratio === \"21:9\",\n\t\t\"maintain-ratio--4-3\": ratio === \"4:3\",\n\t\t\"maintain-ratio--square\": ratio === \"square\" || ratio === \"1:1\",\n\t\t\"maintain-ratio--stretch\": stretchFirstChild,\n\t\t[className]: className && true\n\t});\n\n\treturn (\n\t\t<div className={classNames} {...attributes}>\n\t\t\t{children}\n\t\t</div>\n\t);\n};\n\nMaintainRatio.propTypes = {\n\tratio: PropTypes.oneOf([\"16:9\", \"21:9\", \"4:3\", \"square\", \"1:1\"]),\n\tclassName: PropTypes.string,\n\tchildren: PropTypes.node.isRequired,\n\tstretchFirstChild: PropTypes.bool\n};\n\nMaintainRatio.defaultProps = {\n\tratio: \"16:9\",\n\tstretchFirstChild: false\n};\n\nMaintainRatio.ratios = {\n\t\"16:9\": \"16:9\",\n\t\"21:9\": \"21:9\",\n\t\"4:3\": \"4:3\",\n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iB,MAAd,GAAuB;EACtB,QAAQ,MADc;EAEtB,QAAQ,MAFc;EAGtB,OAAO,KAHe;EAItBC,MAAM,EAAE,QAJc;EAKtB,OAAO;AALe,CAAvB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nice-digital/nds-maintain-ratio",
3
- "version": "2.0.2-alpha.0",
3
+ "version": "2.0.3-alpha.0",
4
4
  "description": "Maintain ratio component for the NICE Design System",
5
5
  "author": "Ian Routledge <ian.routledge@nice.org.uk>",
6
6
  "homepage": "https://design-system.nice.org.uk/",
@@ -34,7 +34,7 @@
34
34
  "url": "https://github.com/nice-digital/nice-design-system/issues"
35
35
  },
36
36
  "dependencies": {
37
- "@nice-digital/nds-core": "^2.0.2-alpha.0",
37
+ "@nice-digital/nds-core": "^2.0.3-alpha.0",
38
38
  "classnames": "^2.3.1",
39
39
  "prop-types": "^15.7.2"
40
40
  },
@@ -45,5 +45,5 @@
45
45
  "devDependencies": {
46
46
  "@babel/cli": "^7.5.0"
47
47
  },
48
- "gitHead": "04839cc13ae0a0fbd0baeefff5996943285dafab"
48
+ "gitHead": "4a3743bed00bf33822d76b1815e85e96c0d699f4"
49
49
  }