@nice-digital/nds-maintain-ratio 4.0.2 → 4.0.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nice-digital/nds-maintain-ratio",
3
- "version": "4.0.2",
3
+ "version": "4.0.3",
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/",
@@ -31,7 +31,7 @@
31
31
  "url": "https://github.com/nice-digital/nice-design-system/issues"
32
32
  },
33
33
  "dependencies": {
34
- "@nice-digital/nds-core": "^4.0.2",
34
+ "@nice-digital/nds-core": "^4.0.3",
35
35
  "classnames": "^2.3.1"
36
36
  },
37
37
  "peerDependencies": {
@@ -46,5 +46,5 @@
46
46
  "@types/node": "^18.11.9",
47
47
  "typescript": "^4.8.4"
48
48
  },
49
- "gitHead": "d8feb7beba5fffa49da42d6a550cb8f67a50727d"
49
+ "gitHead": "ae51389ba2e51dbe9ee3849e71d44fd567fb2822"
50
50
  }
@@ -1 +0,0 @@
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;E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