Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@leafygreen-ui/palette

Package Overview
Dependencies
Maintainers
6
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@leafygreen-ui/palette - npm Package Compare versions

Comparing version 4.0.7 to 4.0.8

6

CHANGELOG.md
# @leafygreen-ui/palette
## 4.0.8
### Patch Changes
- 41116a1b: LiveExample now correctly supports click-to-copy functionality
## 4.0.7

@@ -4,0 +10,0 @@

6

package.json
{
"name": "@leafygreen-ui/palette",
"version": "4.0.7",
"version": "4.0.8",
"description": "LeafyGreen UI Palettes",

@@ -26,5 +26,5 @@ "main": "./dist/index.js",

"@leafygreen-ui/emotion": "^4.0.7",
"@leafygreen-ui/lib": "^13.0.0",
"lodash": "^4.17.21",
"polished": "^4.2.2",
"@leafygreen-ui/lib": "^10.4.3"
"polished": "^4.2.2"
},

@@ -31,0 +31,0 @@ "gitHead": "dd71a2d404218ccec2e657df9c0263dc1c15b9e0",

@@ -1,1 +0,1 @@

import e from"react";import n from"lodash/isUndefined";import{transparentize as t,darken as r,readableColor as a,lighten as l}from"polished";import{css as i,cx as o}from"@leafygreen-ui/emotion";function c(){return c=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},c.apply(this,arguments)}function d(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)t=l[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)t=l[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function s(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var p,u,m,g,h,b,F,k,f={white:"#FFFFFF",black:"#001E2B",gray:{dark4:"#112733",dark3:"#1C2D38",dark2:"#3D4F58",dark1:"#5C6C75",base:"#889397",light1:"#C1C7C6",light2:"#E8EDEB",light3:"#F9FBFA"},green:{dark3:"#023430",dark2:"#00684A",dark1:"#00A35C",base:"#00ED64",light1:"#71F6BA",light2:"#C0FAE6",light3:"#E3FCF7"},purple:{dark3:"#2D0B59",dark2:"#5E0C9E",base:"#B45AF2",light2:"#F1D4FD",light3:"#F9EBFF"},blue:{dark3:"#0C2657",dark2:"#083C90",dark1:"#1254B7",base:"#016BF8",light1:"#0498EC",light2:"#C3E7FE",light3:"#E1F7FF"},yellow:{dark3:"#4C2100",dark2:"#944F01",base:"#FFC010",light2:"#FFEC9E",light3:"#FEF7DB"},red:{dark3:"#5B0000",dark2:"#970606",base:"#DB3030",light1:"#FF6960",light2:"#FFCDC7",light3:"#FFEAE5"}},E=["hue","shade"],y=["dark4","dark3","dark2","dark1","base","light1","light2","light3"],C=i(p||(p=s(["\n display: inline-block;\n position: relative;\n width: ","px;\n"])),88),v=i(u||(u=s(["\n outline: none;\n border: none;\n border-top-color: transparent;\n width: 100%;\n padding-bottom: 100%;\n border-radius: 8px;\n cursor: pointer;\n"]))),x=i(m||(m=s(["\n width: calc(100% - 1em);\n position: absolute;\n left: 50%;\n margin: auto;\n font-size: 13px;\n text-align: center;\n padding: 3px 0.3rem;\n border-radius: 4px;\n transform: translate(-50%, -125%);\n"]))),O=i(g||(g=s(["\n text-align: center;\n color: ",";\n margin: auto;\n padding-block: 0.3em;\n"])),f.gray.dark1),w=i(h||(h=s(["\n grid-template-columns: repeat(",", ","px);\n display: grid;\n gap: 24px;\n"])),y.length,88);function j(p){var u,m=p.hue,g=p.shade,h=d(p,E),w="".concat(m," ").concat(null!=g?g:"");u=n(g)||"white"===m||"black"===m?f[m]:f[m][g];var j=i(b||(b=s(["\n grid-column: ",";\n "])),g?y.indexOf(g)+1:"0"),B=i(F||(F=s(["\n background-color: ",";\n box-shadow: 0 8px 6px -8px ",",\n 0 2px 3px ",";\n "])),u,t(.7,r(.2,u)),t(.8,r(.5,u))),D=i(k||(k=s(["\n color: ",";\n background-color: ",";\n "])),a(l(.2,u)),l(.2,u));return e.createElement("div",c({className:o(C,j)},h),e.createElement("button",{className:o(v,B)}),e.createElement("div",{className:o(x,D)},u),e.createElement("div",{className:O},w))}var B={title:"Components/Palette",component:null,parameters:{default:"AllColors"},argTypes:{className:{table:{disable:!0}}}};function D(){var n=Object.keys(f),t=n.slice(2,n.length);return e.createElement("div",null,e.createElement("div",{className:w},e.createElement(j,{hue:"white",name:"white"}),e.createElement(j,{hue:"black",name:"black"})),t.map((function(n){var t=f[n];return e.createElement("div",{key:n,className:w},Object.keys(t).map((function(r){return e.createElement(j,{key:t[r],hue:n,shade:r,name:"".concat(n," ").concat(r)})})))})))}export{D as AllColors,B as default};
import e,{useState as n}from"react";import t from"lodash/isUndefined";import{transparentize as r,darken as a,readableColor as i,lighten as l}from"polished";import{css as o,cx as c}from"@leafygreen-ui/emotion";function s(){return s=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},s.apply(this,arguments)}function u(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function d(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function p(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,a,i,l,o=[],c=!0,s=!1;try{if(i=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;c=!1}else for(;!(c=(r=i.call(t)).done)&&(o.push(r.value),o.length!==n);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=t.return&&(l=t.return(),Object(l)!==l))return}finally{if(s)throw a}}return o}}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return f(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return f(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var m,h,b,g,y,F,v,k,E,x={white:"#FFFFFF",black:"#001E2B",gray:{dark4:"#112733",dark3:"#1C2D38",dark2:"#3D4F58",dark1:"#5C6C75",base:"#889397",light1:"#C1C7C6",light2:"#E8EDEB",light3:"#F9FBFA"},green:{dark3:"#023430",dark2:"#00684A",dark1:"#00A35C",base:"#00ED64",light1:"#71F6BA",light2:"#C0FAE6",light3:"#E3FCF7"},purple:{dark3:"#2D0B59",dark2:"#5E0C9E",base:"#B45AF2",light2:"#F1D4FD",light3:"#F9EBFF"},blue:{dark3:"#0C2657",dark2:"#083C90",dark1:"#1254B7",base:"#016BF8",light1:"#0498EC",light2:"#C3E7FE",light3:"#E1F7FF"},yellow:{dark3:"#4C2100",dark2:"#944F01",base:"#FFC010",light2:"#FFEC9E",light3:"#FEF7DB"},red:{dark3:"#5B0000",dark2:"#970606",base:"#DB3030",light1:"#FF6960",light2:"#FFCDC7",light3:"#FFEAE5"}},C=["hue","shade"],w=["dark4","dark3","dark2","dark1","base","light1","light2","light3"],O=o(m||(m=d(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n font-family: 'Euclid Circular A', 'Helvetica Neue', Helvetica, Arial,\n sans-serif;\n border-radius: inherit;\n"]))),j=o(h||(h=d(["\n display: inline-block;\n position: relative;\n width: ","px;\n padding-bottom: 16px;\n"])),88),A=o(b||(b=d(["\n position: relative;\n outline: none;\n border: none;\n border-top-color: transparent;\n width: 100%;\n padding-bottom: 100%;\n border-radius: 8px;\n cursor: pointer;\n vertical-align: top;\n\n &:focus-visible {\n box-shadow: 0 0 0 2px white, 0 0 0 4px #0498ec;\n }\n"]))),B=o(g||(g=d(["\n width: calc(100% - 1em);\n position: absolute;\n left: 50%;\n margin: auto;\n font-size: 13px;\n text-align: center;\n padding: 3px 0.3rem;\n border-radius: 4px;\n transform: translate(-50%, -125%);\n pointer-events: none;\n"]))),D=o(y||(y=d(["\n text-align: center;\n color: ",";\n margin: auto;\n padding-block: 0.3em;\n"])),x.gray.dark1),N=o(F||(F=d(["\n grid-template-columns: repeat(",", ","px);\n display: grid;\n gap: 24px;\n"])),w.length,88);function S(f){var m,h=f.hue,b=f.shade,g=u(f,C),y=p(n(),2),F=y[0],N=y[1],S="".concat(h," ").concat(null!=b?b:"");m=t(b)||"white"===h||"black"===h?x[h]:x[h][b];var P=o(v||(v=d(["\n grid-column: ",";\n "])),b?w.indexOf(b)+1:"0"),I=o(k||(k=d(["\n transition: all 0.3s ease;\n background-color: ",";\n box-shadow: 0 8px 6px -8px ",",\n 0 2px 3px ",";\n\n &:hover {\n transform: scale(1.05);\n box-shadow: 0 8px 6px -8px ",",\n 0 2px 3px ",";\n }\n "])),m,r(.7,a(.2,m)),r(.8,a(.5,m)),r(.7,a(.4,m)),r(.5,a(.3,m))),T=o(E||(E=d(["\n color: ",";\n background-color: ",";\n "])),i(l(.2,m)),l(.2,m));return e.createElement("div",s({className:c(j,P)},g),e.createElement("button",{className:c(A,I),onClick:function(){navigator.clipboard.writeText(m),N(!0),setTimeout((function(){N(!1)}),2e3)}},F&&e.createElement("div",{className:O,style:{color:i(m)}},"Copied!")),!F&&e.createElement("div",{className:c(B,T)},m),e.createElement("div",{className:D},S))}var P={title:"Components/Palette",component:null,parameters:{default:"AllColors"},argTypes:{className:{table:{disable:!0}}}};function I(){var n=Object.keys(x),t=n.slice(2,n.length);return e.createElement("div",null,e.createElement("div",{className:N},e.createElement(S,{hue:"white",name:"white"}),e.createElement(S,{hue:"black",name:"black"})),t.map((function(n){var t=x[n];return e.createElement("div",{key:n,className:N},Object.keys(t).map((function(r){return e.createElement(S,{key:t[r],hue:n,shade:r,name:"".concat(n," ").concat(r)})})))})))}export{I as AllColors,P as default};

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc