@nulogy/components
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -1,1 +0,1 @@ | ||
!function(e,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n(require("styled-components"),require("react"));else if("function"==typeof define&&define.amd)define(["styled-components","react"],n);else{var r="object"==typeof exports?n(require("styled-components"),require("react")):n(e["styled-components"],e.react);for(var t in r)("object"==typeof exports?exports:e)[t]=r[t]}}(window,function(e,n){return function(e){var n={};function r(t){if(n[t])return n[t].exports;var o=n[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=n,r.d=function(e,n,t){r.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:t})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,n){if(1&n&&(e=r(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(r.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)r.d(t,o,function(n){return e[n]}.bind(null,o));return t},r.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(n,"a",n),n},r.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},r.p="",r(r.s=17)}([function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const t=n.borderRadius="3px",o=n.font={family:{regular:"'IBM Plex Sans', sans",mono:"'IBM Plex Mono', monospace"},size:{smaller:12,small:14,medium:16,large:20,larger:24,largest:28,get pageTitle(){return this.largest},get sectionTitle(){return this.larger},get subsectionTitle(){return this.large}},weight:{normal:400,medium:500,bold:700},lineHeight:{smaller:1,regular:1.5}},u=n.space={half:4,x1:8,x2:16,x3:24,x4:32,x6:48,x8:64},a=n.colour={get base(){return a.blue[600]},get success(){return a.green[600]},get warning(){return a.yellow[600]},get error(){return a.red[600]},get white(){return this.neutral[100]},get black(){return this.neutral[900]},neutral:{100:"#FFFFFF",200:"#F7F7F7",300:"#EBEBEB",400:"#C7CED4",500:"#98A9B8",600:"#607180",700:"#475866",800:"#203140",900:"#03101A"},blue:{get base(){return this[600]},200:"#F0F3F5",300:"#DDE8ED",400:"#C2E0F0",500:"#63B5E8",600:"#0E77D2",700:"#054CA3",800:"#1B2B4D"},yellow:{get base(){return this[600]},200:"#F5F3F0",300:"#F2EADA",400:"#FAE5AF",500:"#FCDA7B",600:"#FDCF00",700:"#CEA10C",800:"#B3751E"},green:{get base(){return this[600]},200:"#EBF5F3",300:"#C1E8E0",400:"#8DD6C8",500:"#10B297",600:"#008763",700:"#02613C",800:"#053A1F"},red:{get base(){return this[600]},200:"#F7EEED",300:"#F2CECB",400:"#F2B2AE",500:"#DB807D",600:"#D13D3D",700:"#9E131A",800:"#78060F"}},l=n.radius={small:2,medium:4,large:6};n.shadow={pressed:"0 1px 4px 0 rgba(3,16,26, 0.175);",close:"0 2px 12px 0 rgba(3,16,26, 0.2);",middle:"0 3px 12px 0 rgba(3,16,26, 0.25);",far:"0 6px 15px 0 rgba(3,16,26, 0.33);"};n.default={name:"Nulogy Design System",borderRadius:t,colour:a,font:o,space:u,radius:l}},function(n,r){n.exports=e},function(e,r){e.exports=n},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.primaryButtonColours=n.buttonColours=void 0;var t=f(["\n color: ",";\n background-color: ",";\n border-color: ",";\n"],["\n color: ",";\n background-color: ",";\n border-color: ",";\n"]),o=f(["\n ","\n\n &:hover {\n ",";\n };\n\n &:active {\n ","\n }\n\n &:disabled {\n ",";\n border-color: ",";\n }\n "],["\n ","\n\n &:hover {\n ",";\n };\n\n &:active {\n ","\n }\n\n &:disabled {\n ",";\n border-color: ",";\n }\n "]),u=f(["\n ","\n\n &:hover {\n ","\n }\n\n &:active {\n ","\n }\n\n &:disabled {\n ","\n color: ",";\n }\n "],["\n ","\n\n &:hover {\n ","\n }\n\n &:active {\n ","\n }\n\n &:disabled {\n ","\n color: ",";\n }\n "]),a=f(["\n font-size: ","px;\n line-height: ",";\n font-weight: ",";\n padding: ","px ","px;\n "],["\n font-size: ","px;\n line-height: ",";\n font-weight: ",";\n padding: ","px ","px;\n "]),l=f(["\n box-sizing: border-box;\n border-style: solid;\n border-width: ","px;\n appearance: none;\n cursor: pointer;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n border-radius: ","px;\n transition: .1s ease-in-out;\n text-align: left;\n\n ","\n ","\n\n &:hover{\n box-shadow: ",";\n }\n\n &:active {\n border-style: solid;\n box-shadow: none;\n outline: none;\n transform: scale(0.98);\n transition: .05s ease-in;\n }\n\n &:disabled {\n pointer-events: none;\n }\n\n"],["\n box-sizing: border-box;\n border-style: solid;\n border-width: ","px;\n appearance: none;\n cursor: pointer;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n border-radius: ","px;\n transition: .1s ease-in-out;\n text-align: left;\n\n ","\n ","\n\n &:hover{\n box-shadow: ",";\n }\n\n &:active {\n border-style: solid;\n box-shadow: none;\n outline: none;\n transform: scale(0.98);\n transition: .05s ease-in;\n }\n\n &:disabled {\n pointer-events: none;\n }\n\n"]),i=(d(r(2)),r(1)),s=d(i),c=r(0);function d(e){return e&&e.__esModule?e:{default:e}}function f(e,n){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var b=function(e){return e-1},p=function(e){return c.font.lineHeight[e]*c.font.size.medium},v=n.buttonColours=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c.colour.blue.base;return(0,i.css)(t,e,c.colour.white,e)},g=n.primaryButtonColours=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c.colour.blue.base;return(0,i.css)(t,c.colour.white,e,e)},m=s.default.button(l,1,c.radius.small,function(e){var n=e.size,r=void 0===n?"medium":n;return{large:(0,i.css)(a,c.font.size.large,p("regular")/c.font.size.large,c.font.weight.medium,b(c.space.x2),c.space.x3),medium:(0,i.css)(a,c.font.size.small,p("smaller")/c.font.size.small,c.font.weight.medium,b(c.space.x1),c.space.x2),small:(0,i.css)(a,c.font.size.smaller,p("smaller")/c.font.size.smaller,c.font.weight.normal,1,c.space.half)}[r]},function(e){var n=e.type,r=void 0===n?"button":n;return{button:(0,i.css)(o,v(),v(c.colour.blue[700]),v(),v(c.colour.neutral[400]),c.colour.neutral[300]),submit:(0,i.css)(u,g(),g(c.colour.blue[700]),g(),g(c.colour.neutral[300]),c.colour.neutral[500])}[r]},c.shadow.close);n.default=m},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Table=n.HeaderCell=n.Body=n.Header=n.Row=n.Cell=void 0;var t=function(){return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,n){var r=[],t=!0,o=!1,u=void 0;try{for(var a,l=e[Symbol.iterator]();!(t=(a=l.next()).done)&&(r.push(a.value),!n||r.length!==n);t=!0);}catch(e){o=!0,u=e}finally{try{!t&&l.return&&l.return()}finally{if(o)throw u}}return r}(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=d(["\n padding: 1rem;\n text-align: left;\n border-bottom: ",";\n"],["\n padding: 1rem;\n text-align: left;\n border-bottom: ",";\n"]),u=d([""],[""]),a=d(["\n font-weight: bold;\n border-bottom-width: 2px;\n"],["\n font-weight: bold;\n border-bottom-width: 2px;\n"]),l=d(["\n border-collapse: collapse;\n border-top: ",";\n"],["\n border-collapse: collapse;\n border-top: ",";\n"]),i=(c(r(2)),c(r(1))),s=c(r(0));function c(e){return e&&e.__esModule?e:{default:e}}function d(e,n){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var f=function(e){var n=e.theme;return"1px solid "+(void 0===n?s.default:n).colour.neutral[400]},b=n.Cell=i.default.td(o,f),p=n.Row=i.default.tr(u),v=n.Header=i.default.thead(u),g=n.Body=i.default.tbody(u),m=n.HeaderCell=(0,i.default)(b.withComponent("th"))(a),y=n.Table=i.default.table(l,f),h=(0,i.default)(y)(u);Object.entries({Cell:b,Row:p,Header:v,Body:g,HeaderCell:m}).map(function(e){var n=t(e,2),r=n[0],o=n[1];return h[r]=o}),n.default=h},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=r(4);Object.keys(t).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(n,e,{enumerable:!0,get:function(){return t[e]}})})},function(e,n,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,n,r){"use strict";var t=function(e){};e.exports=function(e,n,r,o,u,a,l,i){if(t(n),!e){var s;if(void 0===n)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[r,o,u,a,l,i],d=0;(s=new Error(n.replace(/%s/g,function(){return c[d++]}))).name="Invariant Violation"}throw s.framesToPop=1,s}}},function(e,n,r){"use strict";function t(e){return function(){return e}}var o=function(){};o.thatReturns=t,o.thatReturnsFalse=t(!1),o.thatReturnsTrue=t(!0),o.thatReturnsNull=t(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,n,r){"use strict";var t=r(8),o=r(7),u=r(6);e.exports=function(){function e(e,n,r,t,a,l){l!==u&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function n(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n};return r.checkPropTypes=t,r.PropTypes=r,r}},function(e,n,r){e.exports=r(9)()},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=d(["\n ","\n ","\n"],["\n ","\n ","\n"]),o=d(["\n color: ",";\n\n &:hover{\n color: ",";\n }\n "],["\n color: ",";\n\n &:hover{\n color: ",";\n }\n "]),u=d(["\n text-decoration: ",";\n "],["\n text-decoration: ",";\n "]),a=(c(r(2)),c(r(10))),l=r(1),i=c(l),s=c(r(0));function c(e){return e&&e.__esModule?e:{default:e}}function d(e,n){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var f=i.default.a(t,function(e){var n=e.theme;return(0,l.css)(o,n.colour.blue.base,n.colour.blue[800])},function(e){var n=e.underline,r=void 0===n||n;return(0,l.css)(u,r?"underline":"none")});f.propTypes={underline:a.default.bool},f.defaultProps={theme:s.default},n.default=f},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=r(11);Object.defineProperty(n,"Link",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t,o,u=(t=["\n ","\n\n background-color: transparent;\n border-color: transparent;\n color: ",";\n padding: ","px;\n\n &:hover {\n ","\n background-color: transparent;\n border-color: transparent;\n box-shadow: none;\n color: ",";\n }\n\n &:active{\n transform: none;\n }\n\n &:disabled{\n background-color: transparent;\n border-color: transparent;\n color: ",";\n }\n\n"],o=["\n ","\n\n background-color: transparent;\n border-color: transparent;\n color: ",";\n padding: ","px;\n\n &:hover {\n ","\n background-color: transparent;\n border-color: transparent;\n box-shadow: none;\n color: ",";\n }\n\n &:active{\n transform: none;\n }\n\n &:disabled{\n background-color: transparent;\n border-color: transparent;\n color: ",";\n }\n\n"],Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(o)}}))),a=(c(r(2)),c(r(1))),l=r(0),i=r(3),s=c(i);function c(e){return e&&e.__esModule?e:{default:e}}var d=(0,a.default)(s.default)(u,function(e){var n=e.type,r=void 0===n?"button":n;return{submit:(0,i.buttonColours)({background:l.colour.green.base})}[r]},l.colour.blue.base,l.space.x1,(0,i.buttonColours)({background:l.colour.green[700]}),l.colour.blue[700],l.colour.neutral[400]);n.default=d},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=f(["\n ","\n \n &:hover {\n ",";\n };\n\n &:active {\n ","\n }\n "],["\n ","\n \n &:hover {\n ",";\n };\n\n &:active {\n ","\n }\n "]),o=f(["\n ","\n\n &:hover {\n ","\n }\n\n &:active {\n ","\n }\n "],["\n ","\n\n &:hover {\n ","\n }\n\n &:active {\n ","\n }\n "]),u=f(["\n ","\n"],["\n ","\n"]),a=(d(r(2)),r(1)),l=d(a),i=r(0),s=r(3),c=d(s);function d(e){return e&&e.__esModule?e:{default:e}}function f(e,n){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var b=(0,l.default)(c.default)(u,function(e){var n=e.type,r=void 0===n?"button":n;return{button:(0,a.css)(t,(0,s.buttonColours)(i.colour.red.base),(0,s.buttonColours)(i.colour.red[700]),(0,s.buttonColours)(i.colour.red.base)),submit:(0,a.css)(o,(0,s.primaryButtonColours)(i.colour.red.base),(0,s.primaryButtonColours)(i.colour.red[700]),(0,s.primaryButtonColours)(i.colour.red.base))}[r]});n.default=b},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=f(["\n ","\n \n &:hover {\n ",";\n };\n\n &:active {\n ","\n }\n "],["\n ","\n \n &:hover {\n ",";\n };\n\n &:active {\n ","\n }\n "]),o=f(["\n ","\n\n &:hover {\n ","\n }\n\n &:active {\n ","\n }\n "],["\n ","\n\n &:hover {\n ","\n }\n\n &:active {\n ","\n }\n "]),u=f(["\n ","\n"],["\n ","\n"]),a=(d(r(2)),r(1)),l=d(a),i=r(0),s=r(3),c=d(s);function d(e){return e&&e.__esModule?e:{default:e}}function f(e,n){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var b=(0,l.default)(c.default)(u,function(e){var n=e.type,r=void 0===n?"button":n;return{button:(0,a.css)(t,(0,s.buttonColours)(i.colour.green.base),(0,s.buttonColours)(i.colour.green[700]),(0,s.buttonColours)(i.colour.green.base)),submit:(0,a.css)(o,(0,s.primaryButtonColours)(i.colour.green.base),(0,s.primaryButtonColours)(i.colour.green[700]),(0,s.primaryButtonColours)(i.colour.green.base))}[r]});n.default=b},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=r(3);Object.defineProperty(n,"Button",{enumerable:!0,get:function(){return l(t).default}});var o=r(15);Object.defineProperty(n,"ApprovalButton",{enumerable:!0,get:function(){return l(o).default}});var u=r(14);Object.defineProperty(n,"DangerButton",{enumerable:!0,get:function(){return l(u).default}});var a=r(13);function l(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"LinkButton",{enumerable:!0,get:function(){return l(a).default}})},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=r(16);Object.keys(t).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(n,e,{enumerable:!0,get:function(){return t[e]}})});var o=r(12);Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(n,e,{enumerable:!0,get:function(){return o[e]}})});var u=r(5);Object.keys(u).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(n,e,{enumerable:!0,get:function(){return u[e]}})})}])}); | ||
!function(e,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n(require("styled-components"),require("react"));else if("function"==typeof define&&define.amd)define(["styled-components","react"],n);else{var r="object"==typeof exports?n(require("styled-components"),require("react")):n(e["styled-components"],e.react);for(var t in r)("object"==typeof exports?exports:e)[t]=r[t]}}(window,function(e,n){return function(e){var n={};function r(t){if(n[t])return n[t].exports;var o=n[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=n,r.d=function(e,n,t){r.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:t})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,n){if(1&n&&(e=r(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(r.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)r.d(t,o,function(n){return e[n]}.bind(null,o));return t},r.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(n,"a",n),n},r.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},r.p="",r(r.s=17)}([function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const t=n.borderRadius="3px",o=n.font={family:{regular:"'IBM Plex Sans', sans",mono:"'IBM Plex Mono', monospace"},size:{smaller:12,small:14,medium:16,large:20,larger:24,largest:28,get pageTitle(){return this.largest},get sectionTitle(){return this.larger},get subsectionTitle(){return this.large}},weight:{normal:400,medium:500,bold:700},lineHeight:{smaller:1,regular:1.5}},u=n.space={half:4,x1:8,x2:16,x3:24,x4:32,x6:48,x8:64},a=n.colour={get base(){return a.blue[600]},get success(){return a.green[600]},get warning(){return a.yellow[600]},get error(){return a.red[600]},get white(){return this.neutral[100]},get black(){return this.neutral[900]},neutral:{100:"#FFFFFF",200:"#F7F7F7",300:"#EBEBEB",400:"#C7CED4",500:"#98A9B8",600:"#607180",700:"#475866",800:"#203140",900:"#03101A"},blue:{get base(){return this[600]},200:"#F0F3F5",300:"#DDE8ED",400:"#C2E0F0",500:"#63B5E8",600:"#0E77D2",700:"#054CA3",800:"#1B2B4D"},yellow:{get base(){return this[600]},200:"#F5F3F0",300:"#F2EADA",400:"#FAE5AF",500:"#FCDA7B",600:"#FDCF00",700:"#CEA10C",800:"#B3751E"},green:{get base(){return this[600]},200:"#EBF5F3",300:"#C1E8E0",400:"#8DD6C8",500:"#10B297",600:"#008763",700:"#02613C",800:"#053A1F"},red:{get base(){return this[600]},200:"#F7EEED",300:"#F2CECB",400:"#F2B2AE",500:"#DB807D",600:"#D13D3D",700:"#9E131A",800:"#78060F"}},l=n.radius={small:2,medium:4,large:6};n.shadow={pressed:"0 1px 4px 0 rgba(3,16,26, 0.175);",close:"0 2px 12px 0 rgba(3,16,26, 0.2);",middle:"0 3px 12px 0 rgba(3,16,26, 0.25);",far:"0 6px 15px 0 rgba(3,16,26, 0.33);"};n.default={name:"Nulogy Design System",borderRadius:t,colour:a,font:o,space:u,radius:l}},function(n,r){n.exports=e},function(e,r){e.exports=n},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.primaryButtonColours=n.buttonColours=void 0;var t=f(["\n color: ",";\n background-color: ",";\n border-color: ",";\n"],["\n color: ",";\n background-color: ",";\n border-color: ",";\n"]),o=f(["\n ","\n\n &:hover {\n ",";\n };\n\n &:active {\n ","\n }\n\n &:disabled {\n ",";\n border-color: ",";\n }\n "],["\n ","\n\n &:hover {\n ",";\n };\n\n &:active {\n ","\n }\n\n &:disabled {\n ",";\n border-color: ",";\n }\n "]),u=f(["\n ","\n\n &:hover {\n ","\n }\n\n &:active {\n ","\n }\n\n &:disabled {\n ","\n color: ",";\n }\n "],["\n ","\n\n &:hover {\n ","\n }\n\n &:active {\n ","\n }\n\n &:disabled {\n ","\n color: ",";\n }\n "]),a=f(["\n font-size: ","px;\n line-height: ",";\n font-weight: ",";\n padding: ","px ","px;\n "],["\n font-size: ","px;\n line-height: ",";\n font-weight: ",";\n padding: ","px ","px;\n "]),l=f(["\n box-sizing: border-box;\n border-style: solid;\n border-width: ","px;\n appearance: none;\n cursor: pointer;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n border-radius: ","px;\n transition: .1s ease-in-out;\n text-align: left;\n\n ","\n ","\n\n &:hover{\n box-shadow: ",";\n }\n\n &:active {\n border-style: solid;\n box-shadow: none;\n outline: none;\n transform: scale(0.98);\n transition: .05s ease-in;\n }\n\n &:disabled {\n pointer-events: none;\n }\n\n"],["\n box-sizing: border-box;\n border-style: solid;\n border-width: ","px;\n appearance: none;\n cursor: pointer;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n border-radius: ","px;\n transition: .1s ease-in-out;\n text-align: left;\n\n ","\n ","\n\n &:hover{\n box-shadow: ",";\n }\n\n &:active {\n border-style: solid;\n box-shadow: none;\n outline: none;\n transform: scale(0.98);\n transition: .05s ease-in;\n }\n\n &:disabled {\n pointer-events: none;\n }\n\n"]),i=(d(r(2)),r(1)),s=d(i),c=r(0);function d(e){return e&&e.__esModule?e:{default:e}}function f(e,n){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var b=function(e){return e-1},p=function(e){return c.font.lineHeight[e]*c.font.size.medium},v=n.buttonColours=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c.colour.blue.base;return(0,i.css)(t,e,c.colour.white,e)},g=n.primaryButtonColours=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c.colour.blue.base;return(0,i.css)(t,c.colour.white,e,e)},m=s.default.button(l,1,c.radius.small,function(e){var n=e.size,r=void 0===n?"medium":n;return{large:(0,i.css)(a,c.font.size.large,p("regular")/c.font.size.large,c.font.weight.medium,b(c.space.x2),c.space.x3),medium:(0,i.css)(a,c.font.size.small,p("smaller")/c.font.size.small,c.font.weight.medium,b(c.space.x1),c.space.x2),small:(0,i.css)(a,c.font.size.smaller,p("smaller")/c.font.size.smaller,c.font.weight.normal,1,c.space.half)}[r]},function(e){var n=e.type,r=void 0===n?"button":n;return{button:(0,i.css)(o,v(),v(c.colour.blue[700]),v(),v(c.colour.neutral[400]),c.colour.neutral[300]),submit:(0,i.css)(u,g(),g(c.colour.blue[700]),g(),g(c.colour.neutral[300]),c.colour.neutral[500])}[r]},c.shadow.close);n.default=m},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Table=n.HeaderCell=n.Body=n.Header=n.Row=n.Cell=void 0;var t=function(){return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,n){var r=[],t=!0,o=!1,u=void 0;try{for(var a,l=e[Symbol.iterator]();!(t=(a=l.next()).done)&&(r.push(a.value),!n||r.length!==n);t=!0);}catch(e){o=!0,u=e}finally{try{!t&&l.return&&l.return()}finally{if(o)throw u}}return r}(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=c(["\n padding: 1rem;\n text-align: left;\n border-bottom: ",";\n"],["\n padding: 1rem;\n text-align: left;\n border-bottom: ",";\n"]),u=c([""],[""]),a=c(["\n font-weight: bold;\n border-bottom-width: 2px;\n"],["\n font-weight: bold;\n border-bottom-width: 2px;\n"]),l=c(["\n border-collapse: collapse;\n border-top: ",";\n"],["\n border-collapse: collapse;\n border-top: ",";\n"]),i=(s(r(2)),s(r(1)));function s(e){return e&&e.__esModule?e:{default:e}}function c(e,n){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var d={theme:s(r(0)).default},f=function(e){return"1px solid "+e.theme.colour.neutral[400]},b=n.Cell=i.default.td(o,f);b.defaultProps=d;var p=n.Row=i.default.tr(u),v=n.Header=i.default.thead(u),g=n.Body=i.default.tbody(u),m=n.HeaderCell=(0,i.default)(b.withComponent("th"))(a),y=n.Table=i.default.table(l,f);y.defaultProps=d;var h=(0,i.default)(y)(u);Object.entries({Cell:b,Row:p,Header:v,Body:g,HeaderCell:m}).map(function(e){var n=t(e,2),r=n[0],o=n[1];return h[r]=o}),n.default=h},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=r(4);Object.keys(t).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(n,e,{enumerable:!0,get:function(){return t[e]}})})},function(e,n,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,n,r){"use strict";var t=function(e){};e.exports=function(e,n,r,o,u,a,l,i){if(t(n),!e){var s;if(void 0===n)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[r,o,u,a,l,i],d=0;(s=new Error(n.replace(/%s/g,function(){return c[d++]}))).name="Invariant Violation"}throw s.framesToPop=1,s}}},function(e,n,r){"use strict";function t(e){return function(){return e}}var o=function(){};o.thatReturns=t,o.thatReturnsFalse=t(!1),o.thatReturnsTrue=t(!0),o.thatReturnsNull=t(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,n,r){"use strict";var t=r(8),o=r(7),u=r(6);e.exports=function(){function e(e,n,r,t,a,l){l!==u&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function n(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n};return r.checkPropTypes=t,r.PropTypes=r,r}},function(e,n,r){e.exports=r(9)()},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=d(["\n ","\n ","\n"],["\n ","\n ","\n"]),o=d(["\n color: ",";\n\n &:hover{\n color: ",";\n }\n "],["\n color: ",";\n\n &:hover{\n color: ",";\n }\n "]),u=d(["\n text-decoration: ",";\n "],["\n text-decoration: ",";\n "]),a=(c(r(2)),c(r(10))),l=r(1),i=c(l),s=c(r(0));function c(e){return e&&e.__esModule?e:{default:e}}function d(e,n){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var f=i.default.a(t,function(e){var n=e.theme;return(0,l.css)(o,n.colour.blue.base,n.colour.blue[800])},function(e){var n=e.underline,r=void 0===n||n;return(0,l.css)(u,r?"underline":"none")});f.propTypes={underline:a.default.bool},f.defaultProps={theme:s.default},n.default=f},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=r(11);Object.defineProperty(n,"Link",{enumerable:!0,get:function(){return(e=t,e&&e.__esModule?e:{default:e}).default;var e}})},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t,o,u=(t=["\n ","\n\n background-color: transparent;\n border-color: transparent;\n color: ",";\n padding: ","px;\n\n &:hover {\n ","\n background-color: transparent;\n border-color: transparent;\n box-shadow: none;\n color: ",";\n }\n\n &:active{\n transform: none;\n }\n\n &:disabled{\n background-color: transparent;\n border-color: transparent;\n color: ",";\n }\n\n"],o=["\n ","\n\n background-color: transparent;\n border-color: transparent;\n color: ",";\n padding: ","px;\n\n &:hover {\n ","\n background-color: transparent;\n border-color: transparent;\n box-shadow: none;\n color: ",";\n }\n\n &:active{\n transform: none;\n }\n\n &:disabled{\n background-color: transparent;\n border-color: transparent;\n color: ",";\n }\n\n"],Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(o)}}))),a=(c(r(2)),c(r(1))),l=r(0),i=r(3),s=c(i);function c(e){return e&&e.__esModule?e:{default:e}}var d=(0,a.default)(s.default)(u,function(e){var n=e.type,r=void 0===n?"button":n;return{submit:(0,i.buttonColours)({background:l.colour.green.base})}[r]},l.colour.blue.base,l.space.x1,(0,i.buttonColours)({background:l.colour.green[700]}),l.colour.blue[700],l.colour.neutral[400]);n.default=d},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=f(["\n ","\n \n &:hover {\n ",";\n };\n\n &:active {\n ","\n }\n "],["\n ","\n \n &:hover {\n ",";\n };\n\n &:active {\n ","\n }\n "]),o=f(["\n ","\n\n &:hover {\n ","\n }\n\n &:active {\n ","\n }\n "],["\n ","\n\n &:hover {\n ","\n }\n\n &:active {\n ","\n }\n "]),u=f(["\n ","\n"],["\n ","\n"]),a=(d(r(2)),r(1)),l=d(a),i=r(0),s=r(3),c=d(s);function d(e){return e&&e.__esModule?e:{default:e}}function f(e,n){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var b=(0,l.default)(c.default)(u,function(e){var n=e.type,r=void 0===n?"button":n;return{button:(0,a.css)(t,(0,s.buttonColours)(i.colour.red.base),(0,s.buttonColours)(i.colour.red[700]),(0,s.buttonColours)(i.colour.red.base)),submit:(0,a.css)(o,(0,s.primaryButtonColours)(i.colour.red.base),(0,s.primaryButtonColours)(i.colour.red[700]),(0,s.primaryButtonColours)(i.colour.red.base))}[r]});n.default=b},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=f(["\n ","\n \n &:hover {\n ",";\n };\n\n &:active {\n ","\n }\n "],["\n ","\n \n &:hover {\n ",";\n };\n\n &:active {\n ","\n }\n "]),o=f(["\n ","\n\n &:hover {\n ","\n }\n\n &:active {\n ","\n }\n "],["\n ","\n\n &:hover {\n ","\n }\n\n &:active {\n ","\n }\n "]),u=f(["\n ","\n"],["\n ","\n"]),a=(d(r(2)),r(1)),l=d(a),i=r(0),s=r(3),c=d(s);function d(e){return e&&e.__esModule?e:{default:e}}function f(e,n){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var b=(0,l.default)(c.default)(u,function(e){var n=e.type,r=void 0===n?"button":n;return{button:(0,a.css)(t,(0,s.buttonColours)(i.colour.green.base),(0,s.buttonColours)(i.colour.green[700]),(0,s.buttonColours)(i.colour.green.base)),submit:(0,a.css)(o,(0,s.primaryButtonColours)(i.colour.green.base),(0,s.primaryButtonColours)(i.colour.green[700]),(0,s.primaryButtonColours)(i.colour.green.base))}[r]});n.default=b},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=r(3);Object.defineProperty(n,"Button",{enumerable:!0,get:function(){return l(t).default}});var o=r(15);Object.defineProperty(n,"ApprovalButton",{enumerable:!0,get:function(){return l(o).default}});var u=r(14);Object.defineProperty(n,"DangerButton",{enumerable:!0,get:function(){return l(u).default}});var a=r(13);function l(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"LinkButton",{enumerable:!0,get:function(){return l(a).default}})},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=r(16);Object.keys(t).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(n,e,{enumerable:!0,get:function(){return t[e]}})});var o=r(12);Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(n,e,{enumerable:!0,get:function(){return o[e]}})});var u=r(5);Object.keys(u).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(n,e,{enumerable:!0,get:function(){return u[e]}})})}])}); |
{ | ||
"name": "@nulogy/components", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "Component library for the Nulogy Design System - http://nulogy.design", | ||
@@ -76,3 +76,3 @@ "private": false, | ||
}, | ||
"gitHead": "b7a3769899e519a6055e441a751db80a08e9358f" | ||
"gitHead": "1464f7e486175089a75c273831ae56fe30f32b73" | ||
} |
@@ -5,4 +5,6 @@ import React from 'react'; | ||
const borderStyle = ({ theme = tokens }) => `1px solid ${theme.colour.neutral[400]}`; | ||
const defaultProps = { theme: tokens }; | ||
const borderStyle = ({ theme }) => `1px solid ${theme.colour.neutral[400]}`; | ||
export const Cell = styled.td` | ||
@@ -14,2 +16,4 @@ padding: 1rem; | ||
Cell.defaultProps = defaultProps; | ||
export const Row = styled.tr``; | ||
@@ -31,2 +35,4 @@ | ||
Table.defaultProps = defaultProps; | ||
const DefaultTable = styled(Table)``; | ||
@@ -33,0 +39,0 @@ |
53012
555