@nice-digital/nds-maintain-ratio 2.0.2-alpha.0 → 2.0.5-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 +1 -1
- package/es/MaintainRatio.js.map +1 -1
- package/lib/MaintainRatio.js +1 -1
- package/lib/MaintainRatio.js.map +1 -1
- package/package.json +3 -3
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
|
-
@
|
|
87
|
+
@forward '@nice-digital/nds-maintain-ratio/scss/maintain-ratio';
|
|
88
88
|
```
|
|
89
89
|
|
|
90
90
|
### HTML
|
package/es/MaintainRatio.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
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 = {\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"],"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,CAACC,KAAD,EAAW;EAAA;;EACvC,IAAQC,KAAR,GACCD,KADD,CAAQC,KAAR;EAAA,IAAeC,SAAf,GACCF,KADD,CAAeE,SAAf;EAAA,IAA0BC,iBAA1B,GACCH,KADD,CAA0BG,iBAA1B;EAAA,IAA6CC,QAA7C,GACCJ,KADD,CAA6CI,QAA7C;EAAA,IAA0DC,UAA1D,iCACCL,KADD;;EAGA,IAAMM,UAAU,GAAGR,UAAU;IAC5B,kBAAkB,IADU;IAE5B,wBAAwBG,KAAK,KAAK,MAFN;IAG5B,wBAAwBA,KAAK,KAAK,MAHN;IAI5B,uBAAuBA,KAAK,KAAK,KAJL;IAK5B,0BAA0BA,KAAK,KAAK,QAAV,IAAsBA,KAAK,KAAK,KAL9B;IAM5B,2BAA2BE;EANC,eAO3BD,SAP2B,IAOfA,SAAS,IAAI,IAPE,eAA7B;EAUA,oBACC;IAAK,SAAS,EAAEI;EAAhB,GAAgCD,UAAhC,GACED,QADF,CADD;AAKA,CAnBM;AAqBPL,aAAa,CAACQ,SAAd,GAA0B;EACzBN,KAAK,EAAEJ,SAAS,CAACW,KAAV,CAAgB,CAAC,MAAD,EAAS,MAAT,EAAiB,KAAjB,EAAwB,QAAxB,EAAkC,KAAlC,CAAhB,CADkB;EAEzBN,SAAS,EAAEL,SAAS,CAACY,MAFI;EAGzBL,QAAQ,EAAEP,SAAS,CAACa,IAAV,CAAeC,UAHA;EAIzBR,iBAAiB,EAAEN,SAAS,CAACe;AAJJ,CAA1B;AAOAb,aAAa,CAACc,YAAd,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"}
|
package/lib/MaintainRatio.js
CHANGED
package/lib/MaintainRatio.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
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\tsquare: \"square\",\n\t\"1:1\": \"square\"\n};\n"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;;;;;;AAEO,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,CAACC,KAAD,EAAW;EAAA;;EACvC,IAAQC,KAAR,GACCD,KADD,CAAQC,KAAR;EAAA,IAAeC,SAAf,GACCF,KADD,CAAeE,SAAf;EAAA,IAA0BC,iBAA1B,GACCH,KADD,CAA0BG,iBAA1B;EAAA,IAA6CC,QAA7C,GACCJ,KADD,CAA6CI,QAA7C;EAAA,IAA0DC,UAA1D,kDACCL,KADD;EAGA,IAAMM,UAAU,GAAG,IAAAC,uBAAA;IAClB,kBAAkB,IADA;IAElB,wBAAwBN,KAAK,KAAK,MAFhB;IAGlB,wBAAwBA,KAAK,KAAK,MAHhB;IAIlB,uBAAuBA,KAAK,KAAK,KAJf;IAKlB,0BAA0BA,KAAK,KAAK,QAAV,IAAsBA,KAAK,KAAK,KALxC;IAMlB,2BAA2BE;EANT,eAOjBD,SAPiB,IAOLA,SAAS,IAAI,IAPR,eAAnB;EAUA,oBACC;IAAK,SAAS,EAAEI;EAAhB,GAAgCD,UAAhC;IAAA;IAAA;MAAA;MAAA;MAAA;IAAA;EAAA,IACED,QADF,CADD;AAKA,CAnBM;;;AAqBPL,aAAa,CAACS,SAAd,GAA0B;EACzBP,KAAK,EAAEQ,qBAAA,CAAUC,KAAV,CAAgB,CAAC,MAAD,EAAS,MAAT,EAAiB,KAAjB,EAAwB,QAAxB,EAAkC,KAAlC,CAAhB,CADkB;EAEzBR,SAAS,EAAEO,qBAAA,CAAUE,MAFI;EAGzBP,QAAQ,EAAEK,qBAAA,CAAUG,IAAV,CAAeC,UAHA;EAIzBV,iBAAiB,EAAEM,qBAAA,CAAUK;AAJJ,CAA1B;AAOAf,aAAa,CAACgB,YAAd,GAA6B;EAC5Bd,KAAK,EAAE,MADqB;EAE5BE,iBAAiB,EAAE;AAFS,CAA7B;AAKAJ,aAAa,CAACiB,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.
|
|
3
|
+
"version": "2.0.5-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.
|
|
37
|
+
"@nice-digital/nds-core": "^2.0.5-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": "
|
|
48
|
+
"gitHead": "c560cb90c31f1c8d2e3085df9b32bc4e47a37929"
|
|
49
49
|
}
|