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

@leafygreen-ui/palette

Package Overview
Dependencies
Maintainers
0
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.10 to 4.1.0

6

CHANGELOG.md
# @leafygreen-ui/palette
## 4.1.0
### Minor Changes
- d70758dcf: Adds `transparent` key to `palette`. Ensures a consistent `transparent` color across browsers
## 4.0.10

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

2

dist/esm/index.js

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

var 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"}};export{F as palette};
var F={white:"#FFFFFF",black:"#001E2B",transparent:"#FFFFFF00",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"}};export{F as palette};
//# sourceMappingURL=index.js.map

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

!function(e,F){"object"==typeof exports&&"undefined"!=typeof module?F(exports):"function"==typeof define&&define.amd?define(["exports"],F):F((e="undefined"!=typeof globalThis?globalThis:e||self)["@leafygreen-ui/palette"]={})}(this,(function(e){"use strict";var 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.palette=F}));
!function(F,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((F="undefined"!=typeof globalThis?globalThis:F||self)["@leafygreen-ui/palette"]={})}(this,(function(F){"use strict";var e={white:"#FFFFFF",black:"#001E2B",transparent:"#FFFFFF00",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"}};F.palette=e}));
//# sourceMappingURL=index.js.map
export declare const white: "#FFFFFF";
export declare const black: "#001E2B";
export declare const transparent: "#FFFFFF00";
export declare const gray: {

@@ -64,2 +65,3 @@ readonly dark4: "#112733";

black: "#001E2B";
transparent: "#FFFFFF00";
gray: {

@@ -66,0 +68,0 @@ readonly dark4: "#112733";

{
"name": "@leafygreen-ui/palette",
"version": "4.0.10",
"version": "4.1.0",
"description": "LeafyGreen UI Palettes",

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

export const white = '#FFFFFF' as const;
export const black = '#001E2B' as const;
export const transparent = '#FFFFFF00' as const;

@@ -71,2 +72,3 @@ export const gray = {

black,
transparent,
gray,

@@ -73,0 +75,0 @@ green,

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

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};
import e,{useState as n}from"react";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 s(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 u(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function d(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,l,i,o=[],c=!0,s=!1;try{if(l=(t=t.call(e)).next,0===n);else for(;!(c=(r=l.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&&(i=t.return(),Object(i)!==i))return}finally{if(s)throw a}}return o}}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return p(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 p(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 p(e,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 f,m,h,b,g,F,y,v,k,E={white:"#FFFFFF",black:"#001E2B",transparent:"#FFFFFF00",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"}},x=["hue","shade"],C=["white","black","transparent"],w=function(e){return C.includes(e)},O=["dark4","dark3","dark2","dark1","base","light1","light2","light3"],j=i(f||(f=u(["\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"]))),A=i(m||(m=u(["\n display: inline-block;\n position: relative;\n width: ","px;\n padding-bottom: 16px;\n"])),88),B=i(h||(h=u(["\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"]))),D=i(b||(b=u(["\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"]))),N=i(g||(g=u(["\n text-align: center;\n color: ",";\n margin: auto;\n padding-block: 0.3em;\n"])),E.gray.dark1),S=i(F||(F=u(["\n grid-template-columns: repeat(",", ","px);\n display: grid;\n gap: 24px;\n"])),O.length,88);function P(p){var f,m,h,b=p.hue,g=p.shade,F=s(p,x),C=d(n(),2),S=C[0],P=C[1],I="".concat(b," ").concat(null!==(f=g)&&void 0!==f?f:"");w(b)?m=E[b]:(g=null!==(h=g)&&void 0!==h?h:"base",m=E[b][g]);var T=i(y||(y=u(["\n grid-column: ",";\n "])),g?O.indexOf(g)+1:"0"),z=i(v||(v=u(["\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,t(.7,r(.2,m)),t(.8,r(.5,m)),t(.7,r(.4,m)),t(.5,r(.3,m))),H=i(k||(k=u(["\n color: ",";\n background-color: ",";\n "])),a(l(.2,m)),l(.2,m));return e.createElement("div",c({className:o(A,T)},F),e.createElement("button",{className:o(B,z),onClick:function(){navigator.clipboard.writeText(m),P(!0),setTimeout((function(){P(!1)}),2e3)}},S&&e.createElement("div",{className:j,style:{color:a(m)}},"Copied!")),!S&&e.createElement("div",{className:o(D,H)},m),e.createElement("div",{className:N},I))}var I={title:"Components/Palette",component:null,parameters:{default:"AllColors"},argTypes:{className:{table:{disable:!0}}}};function T(){var n=Object.keys(E),t=n.slice(C.length,n.length);return e.createElement("div",null,e.createElement("div",{className:S},e.createElement(P,{hue:"white",name:"white"}),e.createElement(P,{hue:"black",name:"black"}),e.createElement(P,{hue:"transparent",name:"transparent"})),t.map((function(n){var t=E[n];return e.createElement("div",{key:n,className:S},Object.keys(t).map((function(r){return e.createElement(P,{key:t[r],hue:n,shade:r,name:"".concat(n," ").concat(r)})})))})))}export{T as AllColors,I as default};

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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