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

@leafygreen-ui/tokens

Package Overview
Dependencies
Maintainers
6
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@leafygreen-ui/tokens - npm Package Compare versions

Comparing version 2.0.3 to 2.1.0

dist/fontWeights.d.ts

10

CHANGELOG.md
# @leafygreen-ui/tokens
## 2.1.0
### Minor Changes
- 73cbbd02c: Adds `fontWeights` token
### Patch Changes
- 8ece56980: Adds `slowest` to `transitionDuration`
## 2.0.3

@@ -4,0 +14,0 @@

2

dist/esm/index.js

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

import{palette as e}from"@leafygreen-ui/palette";var t={Mobile:320,Tablet:768,Desktop:1024,XLDesktop:1440};function i(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var a,o,r={Dark:"dark",Light:"light"},l=(i(a={},r.Light,{default:"0 0 0 2px ".concat(e.white,", 0 0 0 4px ").concat(e.blue.light1),input:"0 0 0 3px ".concat(e.blue.light1)}),i(a,r.Dark,{default:"0 0 0 2px ".concat(e.black,", 0 0 0 4px ").concat(e.blue.light1),input:"0 0 0 3px ".concat(e.blue.light1)}),a),n={default:"'Euclid Circular A', 'Helvetica Neue', Helvetica, Arial, sans-serif",serif:"'MongoDB Value Serif', 'Times New Roman', serif",code:"'Source Code Pro', Menlo, monospace"},c=(i(o={},r.Light,{gray:"0 0 0 3px ".concat(e.gray.light2),green:"0 0 0 3px ".concat(e.green.light2),red:"0 0 0 3px ".concat(e.red.light2)}),i(o,r.Dark,{gray:"0 0 0 3px ".concat(e.gray.dark2),green:"0 0 0 3px ".concat(e.green.dark3),red:"0 0 0 3px ".concat(e.yellow.dark3)}),o),g={1:4,2:8,3:16,4:24,5:32,6:64,7:88},d={faster:100,default:150,slower:300},p={Body1:13,Body2:16},u={body1:{fontSize:p.Body1,lineHeight:20},body2:{fontSize:p.Body2,lineHeight:28},code1:{fontSize:13,lineHeight:20},code2:{fontSize:15,lineHeight:24},disclaimer:{fontSize:12,lineHeight:20},large:{fontSize:18,lineHeight:22}};export{p as BaseFontSize,r as Mode,t as breakpoints,l as focusRing,n as fontFamilies,c as hoverRing,g as spacing,d as transitionDuration,u as typeScales};
import{palette as e}from"@leafygreen-ui/palette";var t={Mobile:320,Tablet:768,Desktop:1024,XLDesktop:1440};function i(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var a,o,l={Dark:"dark",Light:"light"},r=(i(a={},l.Light,{default:"0 0 0 2px ".concat(e.white,", 0 0 0 4px ").concat(e.blue.light1),input:"0 0 0 3px ".concat(e.blue.light1)}),i(a,l.Dark,{default:"0 0 0 2px ".concat(e.black,", 0 0 0 4px ").concat(e.blue.light1),input:"0 0 0 3px ".concat(e.blue.light1)}),a),n={default:"'Euclid Circular A', 'Helvetica Neue', Helvetica, Arial, sans-serif",serif:"'MongoDB Value Serif', 'Times New Roman', serif",code:"'Source Code Pro', Menlo, monospace"},c={regular:400,medium:500,bold:700},g=(i(o={},l.Light,{gray:"0 0 0 3px ".concat(e.gray.light2),green:"0 0 0 3px ".concat(e.green.light2),red:"0 0 0 3px ".concat(e.red.light2)}),i(o,l.Dark,{gray:"0 0 0 3px ".concat(e.gray.dark2),green:"0 0 0 3px ".concat(e.green.dark3),red:"0 0 0 3px ".concat(e.yellow.dark3)}),o),d={1:4,2:8,3:16,4:24,5:32,6:64,7:88},u={faster:100,default:150,slower:300,slowest:500},p={Body1:13,Body2:16},f={body1:{fontSize:p.Body1,lineHeight:20},body2:{fontSize:p.Body2,lineHeight:28},code1:{fontSize:13,lineHeight:20},code2:{fontSize:15,lineHeight:24},disclaimer:{fontSize:12,lineHeight:20},large:{fontSize:18,lineHeight:22}};export{p as BaseFontSize,l as Mode,t as breakpoints,r as focusRing,n as fontFamilies,c as fontWeights,g as hoverRing,d as spacing,u as transitionDuration,f as typeScales};
//# sourceMappingURL=index.js.map
export { default as breakpoints } from './breakpoints';
export { default as focusRing } from './focusRing';
export { default as fontFamilies } from './fontFamilies';
export { default as fontWeights } from './fontWeights';
export { default as hoverRing } from './hoverRing';

@@ -5,0 +6,0 @@ export { Mode } from './mode';

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@leafygreen-ui/palette")):"function"==typeof define&&define.amd?define(["exports","@leafygreen-ui/palette"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@leafygreen-ui/tokens"]={},e["@leafygreen-ui/palette"])}(this,(function(e,t){"use strict";function i(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var a,l,n={Dark:"dark",Light:"light"},o=(i(a={},n.Light,{default:"0 0 0 2px ".concat(t.palette.white,", 0 0 0 4px ").concat(t.palette.blue.light1),input:"0 0 0 3px ".concat(t.palette.blue.light1)}),i(a,n.Dark,{default:"0 0 0 2px ".concat(t.palette.black,", 0 0 0 4px ").concat(t.palette.blue.light1),input:"0 0 0 3px ".concat(t.palette.blue.light1)}),a),r=(i(l={},n.Light,{gray:"0 0 0 3px ".concat(t.palette.gray.light2),green:"0 0 0 3px ".concat(t.palette.green.light2),red:"0 0 0 3px ".concat(t.palette.red.light2)}),i(l,n.Dark,{gray:"0 0 0 3px ".concat(t.palette.gray.dark2),green:"0 0 0 3px ".concat(t.palette.green.dark3),red:"0 0 0 3px ".concat(t.palette.yellow.dark3)}),l),c={Body1:13,Body2:16},p={body1:{fontSize:c.Body1,lineHeight:20},body2:{fontSize:c.Body2,lineHeight:28},code1:{fontSize:13,lineHeight:20},code2:{fontSize:15,lineHeight:24},disclaimer:{fontSize:12,lineHeight:20},large:{fontSize:18,lineHeight:22}};e.BaseFontSize=c,e.Mode=n,e.breakpoints={Mobile:320,Tablet:768,Desktop:1024,XLDesktop:1440},e.focusRing=o,e.fontFamilies={default:"'Euclid Circular A', 'Helvetica Neue', Helvetica, Arial, sans-serif",serif:"'MongoDB Value Serif', 'Times New Roman', serif",code:"'Source Code Pro', Menlo, monospace"},e.hoverRing=r,e.spacing={1:4,2:8,3:16,4:24,5:32,6:64,7:88},e.transitionDuration={faster:100,default:150,slower:300},e.typeScales=p,Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@leafygreen-ui/palette")):"function"==typeof define&&define.amd?define(["exports","@leafygreen-ui/palette"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@leafygreen-ui/tokens"]={},e["@leafygreen-ui/palette"])}(this,(function(e,t){"use strict";function i(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var a,l,o={Dark:"dark",Light:"light"},n=(i(a={},o.Light,{default:"0 0 0 2px ".concat(t.palette.white,", 0 0 0 4px ").concat(t.palette.blue.light1),input:"0 0 0 3px ".concat(t.palette.blue.light1)}),i(a,o.Dark,{default:"0 0 0 2px ".concat(t.palette.black,", 0 0 0 4px ").concat(t.palette.blue.light1),input:"0 0 0 3px ".concat(t.palette.blue.light1)}),a),r=(i(l={},o.Light,{gray:"0 0 0 3px ".concat(t.palette.gray.light2),green:"0 0 0 3px ".concat(t.palette.green.light2),red:"0 0 0 3px ".concat(t.palette.red.light2)}),i(l,o.Dark,{gray:"0 0 0 3px ".concat(t.palette.gray.dark2),green:"0 0 0 3px ".concat(t.palette.green.dark3),red:"0 0 0 3px ".concat(t.palette.yellow.dark3)}),l),c={Body1:13,Body2:16},p={body1:{fontSize:c.Body1,lineHeight:20},body2:{fontSize:c.Body2,lineHeight:28},code1:{fontSize:13,lineHeight:20},code2:{fontSize:15,lineHeight:24},disclaimer:{fontSize:12,lineHeight:20},large:{fontSize:18,lineHeight:22}};e.BaseFontSize=c,e.Mode=o,e.breakpoints={Mobile:320,Tablet:768,Desktop:1024,XLDesktop:1440},e.focusRing=n,e.fontFamilies={default:"'Euclid Circular A', 'Helvetica Neue', Helvetica, Arial, sans-serif",serif:"'MongoDB Value Serif', 'Times New Roman', serif",code:"'Source Code Pro', Menlo, monospace"},e.fontWeights={regular:400,medium:500,bold:700},e.hoverRing=r,e.spacing={1:4,2:8,3:16,4:24,5:32,6:64,7:88},e.transitionDuration={faster:100,default:150,slower:300,slowest:500},e.typeScales=p,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=index.js.map

@@ -5,4 +5,5 @@ declare const transitionDuration: {

readonly slower: 300;
readonly slowest: 500;
};
export default transitionDuration;
//# sourceMappingURL=transitions.d.ts.map
{
"name": "@leafygreen-ui/tokens",
"version": "2.0.3",
"version": "2.1.0",
"description": "leafyGreen UI Kit Tokens",

@@ -27,3 +27,2 @@ "main": "./dist/index.js",

"@leafygreen-ui/emotion": "^4.0.4",
"@leafygreen-ui/typography": "^16.3.0",
"lodash": "^4.17.21"

@@ -30,0 +29,0 @@ },

export { default as breakpoints } from './breakpoints';
export { default as focusRing } from './focusRing';
export { default as fontFamilies } from './fontFamilies';
export { default as fontWeights } from './fontWeights';
export { default as hoverRing } from './hoverRing';

@@ -5,0 +6,0 @@ export { Mode } from './mode';

@@ -5,4 +5,5 @@ const transitionDuration = {

slower: 300,
slowest: 500,
} as const;
export default transitionDuration;

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

import e from"react";import{startCase as n}from"lodash";import{css as t}from"@leafygreen-ui/emotion";import{palette as a}from"@leafygreen-ui/palette";import{H2 as r,InlineCode as l}from"@leafygreen-ui/typography";function i(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function c(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var o,u,d,s,f,p,m,g,b,h,y,x={Dark:"dark",Light:"light"},k=(i(o={},x.Light,{default:"0 0 0 2px ".concat(a.white,", 0 0 0 4px ").concat(a.blue.light1),input:"0 0 0 3px ".concat(a.blue.light1)}),i(o,x.Dark,{default:"0 0 0 2px ".concat(a.black,", 0 0 0 4px ").concat(a.blue.light1),input:"0 0 0 3px ".concat(a.blue.light1)}),o),v={default:"'Euclid Circular A', 'Helvetica Neue', Helvetica, Arial, sans-serif",serif:"'MongoDB Value Serif', 'Times New Roman', serif",code:"'Source Code Pro', Menlo, monospace"},E=(i(u={},x.Light,{gray:"0 0 0 3px ".concat(a.gray.light2),green:"0 0 0 3px ".concat(a.green.light2),red:"0 0 0 3px ".concat(a.red.light2)}),i(u,x.Dark,{gray:"0 0 0 3px ".concat(a.gray.dark2),green:"0 0 0 3px ".concat(a.green.dark3),red:"0 0 0 3px ".concat(a.yellow.dark3)}),u),S={1:4,2:8,3:16,4:24,5:32,6:64,7:88},w=100,z={body1:{fontSize:13,lineHeight:20},body2:{fontSize:16,lineHeight:28},code1:{fontSize:13,lineHeight:20},code2:{fontSize:15,lineHeight:24},disclaimer:{fontSize:12,lineHeight:20},large:{fontSize:18,lineHeight:22}},N={title:"Components/Tokens",argTypes:{className:{table:{disable:!0}}}},O=t(d||(d=c(["\n margin-left: ","px;\n"])),S[3]),j=["#fb4949","#497ffb","#62e3fd","#52c825","#fdd063","#fd7fec","#a5fd8b"],H=Object.keys(S).reduce((function(e,n,a){var r=n;return e[r]=t(s||(s=c(["\n background-color: ",";\n width: ","px;\n height: ","px;\n "])),j[a],S[r],S[r]),e}),{});function D(n){var t=n.space;return e.createElement("div",{className:O},e.createElement(l,null,"spacing[",t,"]: ",S[t]),e.createElement("div",{className:H[t]}))}var T=function(){return e.createElement("div",null,e.createElement(r,null,"Spacing"),e.createElement("div",{className:t(f||(f=c(["\n display: flex;\n "])))},Object.keys(S).map((function(n){return e.createElement(D,{space:n,key:n})}))))},C=function(){return e.createElement("div",null,e.createElement(r,null,"Typescales"),Object.keys(z).map((function(n){var a=n;return e.createElement("div",{key:a,className:t(p||(p=c(["\n font-family: ",";\n font-size: ","px;\n line-height: ","px;\n margin: ","px 0;\n "])),a.includes("code")?v.code:v.default,z[a].fontSize,z[a].lineHeight,S[3])},e.createElement(l,null,"typeScales.",a,": ",JSON.stringify(z[a]))," ",e.createElement("div",null,a))})))},F=function(){return e.createElement("div",null,e.createElement(r,null,"Font Families"),Object.keys(v).map((function(n){var a=n;return e.createElement("div",{key:a,className:t(m||(m=c(["\n font-family: ",";\n margin: ","px 0;\n "])),v[a],S[3])},e.createElement(l,null,"fontFamilies.",a,": ",v[a]),e.createElement("div",null,a))})))},L=function(){var l=function(e){return"dark"===e?"light":"dark"},i=function(e){return t(g||(g=c(["\n display: flex;\n gap: ","px;\n color: ",";\n background-color: ",";\n border: 1px solid\n ",";\n border-radius: ","px;\n padding: ","px;\n margin: ","px 0;\n "])),S[2],"dark"===e?a.white:a.black,"dark"===e?a.black:a.white,"dark"===e?a.gray.light3:a.gray.dark3,S[3],S[4],S[3])},o=t(b||(b=c(["\n font-family: ",";\n font-size: ","px;\n outline: none;\n background-color: unset;\n border: unset;\n padding: ","px;\n border-radius: ","px;\n cursor: pointer;\n transition: box-shadow ","ms ease-in-out;\n "])),v.default,z.body2.fontSize,S[2],S[1],w);return e.createElement("div",null,e.createElement(r,null,"Interaction States"),e.createElement("div",null,Object.values(x).map((function(r){return e.createElement("div",{key:r,className:i(r)},Object.keys(E[r]).map((function(i){var u=i;return e.createElement("button",{key:u,className:t(h||(h=c(["\n ",";\n background-color: ",";\n color: ",";\n &:hover {\n box-shadow: ",";\n }\n &:focus {\n box-shadow: ",";\n }\n "])),o,a[u]["".concat(r,"3")],a[u]["".concat(l(r),"2")],E[r][u],k[r].default)},n(u))})),e.createElement("input",{type:"text",placeholder:"Input",className:t(y||(y=c(["\n ",";\n border: 1px solid ",";\n &:hover {\n box-shadow: ",";\n }\n &:focus {\n box-shadow: ",";\n }\n "])),o,a.gray["".concat(r,"1")],E[r].gray,k[r].input)}))}))))};export{F as FontFamilies,L as InteractionRings,T as Spacing,C as TypeScales,N as default};
import e from"react";import{startCase as n}from"lodash";import{css as t}from"@leafygreen-ui/emotion";import{palette as a}from"@leafygreen-ui/palette";function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function l(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var i,c,o,u,d,s,f,p,m,g,b,h={Dark:"dark",Light:"light"},x=(r(i={},h.Light,{default:"0 0 0 2px ".concat(a.white,", 0 0 0 4px ").concat(a.blue.light1),input:"0 0 0 3px ".concat(a.blue.light1)}),r(i,h.Dark,{default:"0 0 0 2px ".concat(a.black,", 0 0 0 4px ").concat(a.blue.light1),input:"0 0 0 3px ".concat(a.blue.light1)}),i),y={default:"'Euclid Circular A', 'Helvetica Neue', Helvetica, Arial, sans-serif",serif:"'MongoDB Value Serif', 'Times New Roman', serif",code:"'Source Code Pro', Menlo, monospace"},k=(r(c={},h.Light,{gray:"0 0 0 3px ".concat(a.gray.light2),green:"0 0 0 3px ".concat(a.green.light2),red:"0 0 0 3px ".concat(a.red.light2)}),r(c,h.Dark,{gray:"0 0 0 3px ".concat(a.gray.dark2),green:"0 0 0 3px ".concat(a.green.dark3),red:"0 0 0 3px ".concat(a.yellow.dark3)}),c),v={1:4,2:8,3:16,4:24,5:32,6:64,7:88},E=100,S={body1:{fontSize:13,lineHeight:20},body2:{fontSize:16,lineHeight:28},code1:{fontSize:13,lineHeight:20},code2:{fontSize:15,lineHeight:24},disclaimer:{fontSize:12,lineHeight:20},large:{fontSize:18,lineHeight:22}},w={title:"Components/Tokens",argTypes:{className:{table:{disable:!0}}}},z=t(o||(o=l(["\n margin-left: ","px;\n"])),v[3]),N=["#fb4949","#497ffb","#62e3fd","#52c825","#fdd063","#fd7fec","#a5fd8b"],O=Object.keys(v).reduce((function(e,n,a){var r=n;return e[r]=t(u||(u=l(["\n background-color: ",";\n width: ","px;\n height: ","px;\n "])),N[a],v[r],v[r]),e}),{});function j(n){var t=n.space;return e.createElement("div",{className:z},e.createElement("code",null,"spacing[",t,"]: ",v[t]),e.createElement("div",{className:O[t]}))}var H=function(){return e.createElement("div",null,e.createElement("h2",null,"Spacing"),e.createElement("div",{className:t(d||(d=l(["\n display: flex;\n "])))},Object.keys(v).map((function(n){return e.createElement(j,{space:n,key:n})}))))},D=function(){return e.createElement("div",null,e.createElement("h2",null,"Typescales"),Object.keys(S).map((function(n){var a=n;return e.createElement("div",{key:a,className:t(s||(s=l(["\n font-family: ",";\n font-size: ","px;\n line-height: ","px;\n margin: ","px 0;\n "])),a.includes("code")?y.code:y.default,S[a].fontSize,S[a].lineHeight,v[3])},e.createElement("code",null,"typeScales.",a,": ",JSON.stringify(S[a]))," ",e.createElement("div",null,a))})))},T=function(){return e.createElement("div",null,e.createElement("h2",null,"Font Families"),Object.keys(y).map((function(n){var a=n;return e.createElement("div",{key:a,className:t(f||(f=l(["\n font-family: ",";\n margin: ","px 0;\n "])),y[a],v[3])},e.createElement("code",null,"fontFamilies.",a,": ",y[a]),e.createElement("div",null,a))})))},C=function(){var r=function(e){return"dark"===e?"light":"dark"},i=function(e){return t(p||(p=l(["\n display: flex;\n gap: ","px;\n color: ",";\n background-color: ",";\n border: 1px solid\n ",";\n border-radius: ","px;\n padding: ","px;\n margin: ","px 0;\n "])),v[2],"dark"===e?a.white:a.black,"dark"===e?a.black:a.white,"dark"===e?a.gray.light3:a.gray.dark3,v[3],v[4],v[3])},c=t(m||(m=l(["\n font-family: ",";\n font-size: ","px;\n outline: none;\n background-color: unset;\n border: unset;\n padding: ","px;\n border-radius: ","px;\n cursor: pointer;\n transition: box-shadow ","ms ease-in-out;\n "])),y.default,S.body2.fontSize,v[2],v[1],E);return e.createElement("div",null,e.createElement("h2",null,"Interaction States"),e.createElement("div",null,Object.values(h).map((function(o){return e.createElement("div",{key:o,className:i(o)},Object.keys(k[o]).map((function(i){var u=i;return e.createElement("button",{key:u,className:t(g||(g=l(["\n ",";\n background-color: ",";\n color: ",";\n &:hover {\n box-shadow: ",";\n }\n &:focus {\n box-shadow: ",";\n }\n "])),c,a[u]["".concat(o,"3")],a[u]["".concat(r(o),"2")],k[o][u],x[o].default)},n(u))})),e.createElement("input",{type:"text",placeholder:"Input",className:t(b||(b=l(["\n ",";\n border: 1px solid ",";\n &:hover {\n box-shadow: ",";\n }\n &:focus {\n box-shadow: ",";\n }\n "])),c,a.gray["".concat(o,"1")],k[o].gray,x[o].input)}))}))))};export{T as FontFamilies,C as InteractionRings,H as Spacing,D as TypeScales,w 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

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