@leafygreen-ui/tokens
Advanced tools
Comparing version 2.5.3 to 2.6.0
# @leafygreen-ui/tokens | ||
## 2.6.0 | ||
### Minor Changes | ||
- c406ab85: [LG-2930](https://jira.mongodb.org/browse/LG-2930) | ||
- Fixes `darkModeBackgroundColors` disabled colors | ||
- Fixes `lightModeBorderColors` variable typo | ||
## 2.5.3 | ||
@@ -4,0 +13,0 @@ |
@@ -40,5 +40,5 @@ export declare const color: { | ||
readonly disabled: { | ||
readonly default: "#3D4F58"; | ||
readonly hover: "#3D4F58"; | ||
readonly focus: "#3D4F58"; | ||
readonly default: "#1C2D38"; | ||
readonly hover: "#1C2D38"; | ||
readonly focus: "#1C2D38"; | ||
}; | ||
@@ -45,0 +45,0 @@ }; |
@@ -39,5 +39,5 @@ export declare const darkModeColors: { | ||
readonly disabled: { | ||
readonly default: "#3D4F58"; | ||
readonly hover: "#3D4F58"; | ||
readonly focus: "#3D4F58"; | ||
readonly default: "#1C2D38"; | ||
readonly hover: "#1C2D38"; | ||
readonly focus: "#1C2D38"; | ||
}; | ||
@@ -44,0 +44,0 @@ }; |
@@ -1,2 +0,2 @@ | ||
import{palette as e}from"@leafygreen-ui/palette";var a={Mobile:320,Tablet:768,Desktop:1024,XLDesktop:1440};function r(e){var a=function(e,a){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var t=r.call(e,a);if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof a?a:a+""}function t(e,a,t){return(a=r(a))in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}var i={Dark:"dark",Light:"light"},l="primary",g="secondary",d="inversePrimary",h="inverseSecondary",o="info",k="warning",n="error",s="success",b="disabled",c="default",u="hover",f="focus",p=e.black,y=e.blue,m=e.gray,v=e.green,x=e.red,w=e.white,S=e.yellow,D={background:t(t(t(t(t(t(t(t({},l,t(t(t({},c,p),u,m.dark2),f,y.dark3)),g,t(t(t({},c,m.dark4),u,m.dark2),f,y.dark3)),d,t(t(t({},c,m.light2),u,m.light3),f,y.light2)),o,t(t(t({},c,y.dark3),u,y.dark3),f,y.dark3)),k,t(t(t({},c,S.dark3),u,S.dark3),f,S.dark3)),s,t(t(t({},c,v.dark3),u,v.dark3),f,v.dark3)),n,t(t(t({},c,x.dark3),u,x.dark3),f,x.dark3)),b,t(t(t({},c,m.dark2),u,m.dark2),f,m.dark2)),border:t(t(t(t(t({},l,t(t(t({},c,m.base),u,m.base),f,y.light1)),g,t(t(t({},c,m.dark2),u,m.dark2),f,y.light1)),s,t(t(t({},c,v.dark1),u,v.dark1),f,y.light1)),n,t(t(t({},c,x.light1),u,x.light1),f,y.light1)),b,t(t(t({},c,m.dark2),u,m.dark2),f,m.dark2)),icon:t(t(t(t(t(t(t(t({},l,t(t(t({},c,m.light1),u,m.light3),f,y.light3)),g,t(t(t({},c,m.base),u,m.light3),f,y.light3)),d,t(t(t({},c,w),u,p),f,y.dark2)),o,t(t(t({},c,y.light1),u,y.light1),f,y.light1)),k,t(t(t({},c,S.base),u,S.base),f,S.base)),s,t(t(t({},c,v.base),u,v.base),f,v.base)),n,t(t(t({},c,x.light1),u,x.light1),f,x.light1)),b,t(t(t({},c,m.dark1),u,m.dark1),f,m.dark1)),text:t(t(t(t(t(t({},l,t(t(t({},c,m.light2),u,m.light2),f,y.light3)),g,t(t(t({},c,m.light1),u,m.light2),f,y.light3)),d,t(t(t({},c,p),u,p),f,y.dark2)),h,t(t(t({},c,m.dark2),u,p),f,y.dark2)),n,t(t(t({},c,x.light1),u,x.light1),f,x.light1)),b,t(t(t({},c,m.dark1),u,m.dark1),f,m.dark1))},H=e.black,z=e.blue,L=e.gray,B=e.green,P=e.red,j=e.white,M=e.yellow,T={background:t(t(t(t(t(t(t(t({},l,t(t(t({},c,j),u,L.light2),f,z.light3)),g,t(t(t({},c,L.light3),u,L.light2),f,z.light3)),d,t(t(t({},c,H),u,L.dark3),f,z.dark2)),o,t(t(t({},c,z.light3),u,z.light3),f,z.light3)),k,t(t(t({},c,M.light3),u,M.light3),f,M.light3)),s,t(t(t({},c,B.light3),u,B.light3),f,B.light3)),n,t(t(t({},c,P.light3),u,P.light3),f,P.light3)),b,t(t(t({},c,L.light2),u,L.light2),f,L.light2)),border:t(t(t(t(t({},l,t(t(t({},c,L.base),u,L.base),f,z.light1)),g,t(t(t({},c,L.light2),u,L.light2),f,z.light1)),s,t(t(t({},c,B.dark1),u,B.dark1),f,z.light1)),n,t(t(t({},c,P.base),u,P.base),f,z.light1)),b,t(t(t({},c,L.light1),u,L.light1),f,L.light1)),icon:t(t(t(t(t(t(t(t({},l,t(t(t({},c,L.dark1),u,H),f,z.dark1)),g,t(t(t({},c,L.base),u,H),f,z.dark1)),d,t(t(t({},c,j),u,j),f,z.light2)),o,t(t(t({},c,z.base),u,z.base),f,z.base)),k,t(t(t({},c,M.dark2),u,M.dark2),f,M.dark2)),s,t(t(t({},c,B.dark1),u,B.dark1),f,B.dark1)),n,t(t(t({},c,P.base),u,P.base),f,P.base)),b,t(t(t({},c,L.base),u,L.base),f,L.base)),text:t(t(t(t(t(t({},l,t(t(t({},c,H),u,H),f,z.dark1)),g,t(t(t({},c,L.dark1),u,H),f,z.dark1)),d,t(t(t({},c,j),u,j),f,z.light2)),h,t(t(t({},c,L.light1),u,j),f,z.light2)),n,t(t(t({},c,P.base),u,P.base),f,P.base)),b,t(t(t({},c,L.base),u,L.base),f,L.base))},A=t(t({},i.Dark,D),i.Light,T),C=t(t({},i.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.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)}),E={default:"'Euclid Circular A', 'Helvetica Neue', Helvetica, Arial, sans-serif",serif:"'MongoDB Value Serif', 'Times New Roman', serif",code:"'Source Code Pro', Menlo, monospace"},N={regular:400,medium:500,bold:700},R=t(t({},i.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.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)}),X={XSmall:"xsmall",Small:"small",Default:"default",Large:"large"},O={0:0,25:1,50:2,100:4,150:6,200:8,300:12,400:16,600:24,800:32,900:36,1e3:40,1200:48,1400:56,1600:64,1:4,2:8,3:16,4:24,5:32,6:64,7:88},V={faster:100,default:150,slower:300,slowest:500},q={Body1:13,Body2:16},F={body1:{fontSize:q.Body1,lineHeight:20},body2:{fontSize:q.Body2,lineHeight:28},code1:{fontSize:13,lineHeight:20},code2:{fontSize:15,lineHeight:24},disclaimer:{fontSize:12,lineHeight:20},large:{fontSize:18,lineHeight:22}};export{q as BaseFontSize,i as Mode,X as Size,a as borderRadius,a as breakpoints,A as color,C as focusRing,E as fontFamilies,N as fontWeights,R as hoverRing,O as spacing,V as transitionDuration,F as typeScales}; | ||
import{palette as e}from"@leafygreen-ui/palette";var r={Mobile:320,Tablet:768,Desktop:1024,XLDesktop:1440};function a(e){var r=function(e,r){if("object"!=typeof e||!e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var o=a.call(e,r);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof r?r:r+""}function o(e,r,o){return(r=a(r))in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o,e}var t={Dark:"dark",Light:"light"},l={Background:"background",Border:"border",Icon:"icon",Text:"text"},i={Primary:"primary",Secondary:"secondary",InversePrimary:"inversePrimary",InverseSecondary:"inverseSecondary",Info:"info",Warning:"warning",Error:"error",Success:"success",Disabled:"disabled"},u={Default:"default",Hover:"hover",Focus:"focus"},s=e.black,c=e.blue,d=e.gray,g=e.green,n=e.red,f=e.white,h=e.yellow,v={background:o(o(o(o(o(o(o(o({},i.Primary,o(o(o({},u.Default,s),u.Hover,d.dark2),u.Focus,c.dark3)),i.Secondary,o(o(o({},u.Default,d.dark4),u.Hover,d.dark2),u.Focus,c.dark3)),i.InversePrimary,o(o(o({},u.Default,d.light2),u.Hover,d.light3),u.Focus,c.light2)),i.Info,o(o(o({},u.Default,c.dark3),u.Hover,c.dark3),u.Focus,c.dark3)),i.Warning,o(o(o({},u.Default,h.dark3),u.Hover,h.dark3),u.Focus,h.dark3)),i.Success,o(o(o({},u.Default,g.dark3),u.Hover,g.dark3),u.Focus,g.dark3)),i.Error,o(o(o({},u.Default,n.dark3),u.Hover,n.dark3),u.Focus,n.dark3)),i.Disabled,o(o(o({},u.Default,d.dark3),u.Hover,d.dark3),u.Focus,d.dark3)),border:o(o(o(o(o({},i.Primary,o(o(o({},u.Default,d.base),u.Hover,d.base),u.Focus,c.light1)),i.Secondary,o(o(o({},u.Default,d.dark2),u.Hover,d.dark2),u.Focus,c.light1)),i.Success,o(o(o({},u.Default,g.dark1),u.Hover,g.dark1),u.Focus,c.light1)),i.Error,o(o(o({},u.Default,n.light1),u.Hover,n.light1),u.Focus,c.light1)),i.Disabled,o(o(o({},u.Default,d.dark2),u.Hover,d.dark2),u.Focus,d.dark2)),icon:o(o(o(o(o(o(o(o({},i.Primary,o(o(o({},u.Default,d.light1),u.Hover,d.light3),u.Focus,c.light3)),i.Secondary,o(o(o({},u.Default,d.base),u.Hover,d.light3),u.Focus,c.light3)),i.InversePrimary,o(o(o({},u.Default,f),u.Hover,s),u.Focus,c.dark2)),i.Info,o(o(o({},u.Default,c.light1),u.Hover,c.light1),u.Focus,c.light1)),i.Warning,o(o(o({},u.Default,h.base),u.Hover,h.base),u.Focus,h.base)),i.Success,o(o(o({},u.Default,g.base),u.Hover,g.base),u.Focus,g.base)),i.Error,o(o(o({},u.Default,n.light1),u.Hover,n.light1),u.Focus,n.light1)),i.Disabled,o(o(o({},u.Default,d.dark1),u.Hover,d.dark1),u.Focus,d.dark1)),text:o(o(o(o(o(o({},i.Primary,o(o(o({},u.Default,d.light2),u.Hover,d.light2),u.Focus,c.light3)),i.Secondary,o(o(o({},u.Default,d.light1),u.Hover,d.light2),u.Focus,c.light3)),i.InversePrimary,o(o(o({},u.Default,s),u.Hover,s),u.Focus,c.dark2)),i.InverseSecondary,o(o(o({},u.Default,d.dark2),u.Hover,s),u.Focus,c.dark2)),i.Error,o(o(o({},u.Default,n.light1),u.Hover,n.light1),u.Focus,n.light1)),i.Disabled,o(o(o({},u.Default,d.dark1),u.Hover,d.dark1),u.Focus,d.dark1))},D=e.black,k=e.blue,b=e.gray,H=e.green,y=e.red,F=e.white,m=e.yellow,S={background:o(o(o(o(o(o(o(o({},i.Primary,o(o(o({},u.Default,F),u.Hover,b.light2),u.Focus,k.light3)),i.Secondary,o(o(o({},u.Default,b.light3),u.Hover,b.light2),u.Focus,k.light3)),i.InversePrimary,o(o(o({},u.Default,D),u.Hover,b.dark3),u.Focus,k.dark2)),i.Info,o(o(o({},u.Default,k.light3),u.Hover,k.light3),u.Focus,k.light3)),i.Warning,o(o(o({},u.Default,m.light3),u.Hover,m.light3),u.Focus,m.light3)),i.Success,o(o(o({},u.Default,H.light3),u.Hover,H.light3),u.Focus,H.light3)),i.Error,o(o(o({},u.Default,y.light3),u.Hover,y.light3),u.Focus,y.light3)),i.Disabled,o(o(o({},u.Default,b.light2),u.Hover,b.light2),u.Focus,b.light2)),border:o(o(o(o(o({},i.Primary,o(o(o({},u.Default,b.base),u.Hover,b.base),u.Focus,k.light1)),i.Secondary,o(o(o({},u.Default,b.light2),u.Hover,b.light2),u.Focus,k.light1)),i.Success,o(o(o({},u.Default,H.dark1),u.Hover,H.dark1),u.Focus,k.light1)),i.Error,o(o(o({},u.Default,y.base),u.Hover,y.base),u.Focus,k.light1)),i.Disabled,o(o(o({},u.Default,b.light1),u.Hover,b.light1),u.Focus,b.light1)),icon:o(o(o(o(o(o(o(o({},i.Primary,o(o(o({},u.Default,b.dark1),u.Hover,D),u.Focus,k.dark1)),i.Secondary,o(o(o({},u.Default,b.base),u.Hover,D),u.Focus,k.dark1)),i.InversePrimary,o(o(o({},u.Default,F),u.Hover,F),u.Focus,k.light2)),i.Info,o(o(o({},u.Default,k.base),u.Hover,k.base),u.Focus,k.base)),i.Warning,o(o(o({},u.Default,m.dark2),u.Hover,m.dark2),u.Focus,m.dark2)),i.Success,o(o(o({},u.Default,H.dark1),u.Hover,H.dark1),u.Focus,H.dark1)),i.Error,o(o(o({},u.Default,y.base),u.Hover,y.base),u.Focus,y.base)),i.Disabled,o(o(o({},u.Default,b.base),u.Hover,b.base),u.Focus,b.base)),text:o(o(o(o(o(o({},i.Primary,o(o(o({},u.Default,D),u.Hover,D),u.Focus,k.dark1)),i.Secondary,o(o(o({},u.Default,b.dark1),u.Hover,D),u.Focus,k.dark1)),i.InversePrimary,o(o(o({},u.Default,F),u.Hover,F),u.Focus,k.light2)),i.InverseSecondary,o(o(o({},u.Default,b.light1),u.Hover,F),u.Focus,k.light2)),i.Error,o(o(o({},u.Default,y.base),u.Hover,y.base),u.Focus,y.base)),i.Disabled,o(o(o({},u.Default,b.base),u.Hover,b.base),u.Focus,b.base))},p=o(o({},t.Dark,v),t.Light,S),P=o(o({},t.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)}),t.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)}),x={default:"'Euclid Circular A', 'Helvetica Neue', Helvetica, Arial, sans-serif",serif:"'MongoDB Value Serif', 'Times New Roman', serif",code:"'Source Code Pro', Menlo, monospace"},I={regular:400,medium:500,bold:700},w=o(o({},t.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)}),t.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)}),E={XSmall:"xsmall",Small:"small",Default:"default",Large:"large"},B={0:0,25:1,50:2,100:4,150:6,200:8,300:12,400:16,600:24,800:32,900:36,1e3:40,1200:48,1400:56,1600:64,1:4,2:8,3:16,4:24,5:32,6:64,7:88},z={faster:100,default:150,slower:300,slowest:500},L={Body1:13,Body2:16},W={body1:{fontSize:L.Body1,lineHeight:20},body2:{fontSize:L.Body2,lineHeight:28},code1:{fontSize:13,lineHeight:20},code2:{fontSize:15,lineHeight:24},disclaimer:{fontSize:12,lineHeight:20},large:{fontSize:18,lineHeight:24}};export{L as BaseFontSize,t as Mode,E as Size,u as State,l as Type,i as Variant,r as borderRadius,r as breakpoints,p as color,P as focusRing,x as fontFamilies,I as fontWeights,w as hoverRing,B as spacing,z as transitionDuration,W as typeScales}; | ||
//# sourceMappingURL=index.js.map |
export { default as borderRadius } from './breakpoints'; | ||
export { default as breakpoints } from './breakpoints'; | ||
export { color } from './color/color'; | ||
export { color, State, Type, Variant } from './color'; | ||
export { default as focusRing } from './focusRing'; | ||
@@ -5,0 +5,0 @@ export { default as fontFamilies } from './fontFamilies'; |
@@ -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";var a={Mobile:320,Tablet:768,Desktop:1024,XLDesktop:1440};function l(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var l=a.call(e,t);if("object"!=typeof l)return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}function i(e,t,a){return(t=l(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}var r={Dark:"dark",Light:"light"},g="primary",d="secondary",o="inversePrimary",n="inverseSecondary",h="info",s="warning",k="error",c="success",p="disabled",b="default",u="hover",f="focus",y=t.palette.black,m=t.palette.blue,x=t.palette.gray,v=t.palette.green,S=t.palette.red,w=t.palette.white,D=t.palette.yellow,z={background:i(i(i(i(i(i(i(i({},g,i(i(i({},b,y),u,x.dark2),f,m.dark3)),d,i(i(i({},b,x.dark4),u,x.dark2),f,m.dark3)),o,i(i(i({},b,x.light2),u,x.light3),f,m.light2)),h,i(i(i({},b,m.dark3),u,m.dark3),f,m.dark3)),s,i(i(i({},b,D.dark3),u,D.dark3),f,D.dark3)),c,i(i(i({},b,v.dark3),u,v.dark3),f,v.dark3)),k,i(i(i({},b,S.dark3),u,S.dark3),f,S.dark3)),p,i(i(i({},b,x.dark2),u,x.dark2),f,x.dark2)),border:i(i(i(i(i({},g,i(i(i({},b,x.base),u,x.base),f,m.light1)),d,i(i(i({},b,x.dark2),u,x.dark2),f,m.light1)),c,i(i(i({},b,v.dark1),u,v.dark1),f,m.light1)),k,i(i(i({},b,S.light1),u,S.light1),f,m.light1)),p,i(i(i({},b,x.dark2),u,x.dark2),f,x.dark2)),icon:i(i(i(i(i(i(i(i({},g,i(i(i({},b,x.light1),u,x.light3),f,m.light3)),d,i(i(i({},b,x.base),u,x.light3),f,m.light3)),o,i(i(i({},b,w),u,y),f,m.dark2)),h,i(i(i({},b,m.light1),u,m.light1),f,m.light1)),s,i(i(i({},b,D.base),u,D.base),f,D.base)),c,i(i(i({},b,v.base),u,v.base),f,v.base)),k,i(i(i({},b,S.light1),u,S.light1),f,S.light1)),p,i(i(i({},b,x.dark1),u,x.dark1),f,x.dark1)),text:i(i(i(i(i(i({},g,i(i(i({},b,x.light2),u,x.light2),f,m.light3)),d,i(i(i({},b,x.light1),u,x.light2),f,m.light3)),o,i(i(i({},b,y),u,y),f,m.dark2)),n,i(i(i({},b,x.dark2),u,y),f,m.dark2)),k,i(i(i({},b,S.light1),u,S.light1),f,S.light1)),p,i(i(i({},b,x.dark1),u,x.dark1),f,x.dark1))},H=t.palette.black,B=t.palette.blue,L=t.palette.gray,P=t.palette.green,T=t.palette.red,j=t.palette.white,M=t.palette.yellow,R={background:i(i(i(i(i(i(i(i({},g,i(i(i({},b,j),u,L.light2),f,B.light3)),d,i(i(i({},b,L.light3),u,L.light2),f,B.light3)),o,i(i(i({},b,H),u,L.dark3),f,B.dark2)),h,i(i(i({},b,B.light3),u,B.light3),f,B.light3)),s,i(i(i({},b,M.light3),u,M.light3),f,M.light3)),c,i(i(i({},b,P.light3),u,P.light3),f,P.light3)),k,i(i(i({},b,T.light3),u,T.light3),f,T.light3)),p,i(i(i({},b,L.light2),u,L.light2),f,L.light2)),border:i(i(i(i(i({},g,i(i(i({},b,L.base),u,L.base),f,B.light1)),d,i(i(i({},b,L.light2),u,L.light2),f,B.light1)),c,i(i(i({},b,P.dark1),u,P.dark1),f,B.light1)),k,i(i(i({},b,T.base),u,T.base),f,B.light1)),p,i(i(i({},b,L.light1),u,L.light1),f,L.light1)),icon:i(i(i(i(i(i(i(i({},g,i(i(i({},b,L.dark1),u,H),f,B.dark1)),d,i(i(i({},b,L.base),u,H),f,B.dark1)),o,i(i(i({},b,j),u,j),f,B.light2)),h,i(i(i({},b,B.base),u,B.base),f,B.base)),s,i(i(i({},b,M.dark2),u,M.dark2),f,M.dark2)),c,i(i(i({},b,P.dark1),u,P.dark1),f,P.dark1)),k,i(i(i({},b,T.base),u,T.base),f,T.base)),p,i(i(i({},b,L.base),u,L.base),f,L.base)),text:i(i(i(i(i(i({},g,i(i(i({},b,H),u,H),f,B.dark1)),d,i(i(i({},b,L.dark1),u,H),f,B.dark1)),o,i(i(i({},b,j),u,j),f,B.light2)),n,i(i(i({},b,L.light1),u,j),f,B.light2)),k,i(i(i({},b,T.base),u,T.base),f,T.base)),p,i(i(i({},b,L.base),u,L.base),f,L.base))},A=i(i({},r.Dark,z),r.Light,R),C=i(i({},r.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)}),r.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)}),E=i(i({},r.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)}),r.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)}),F={Body1:13,Body2:16},N={body1:{fontSize:F.Body1,lineHeight:20},body2:{fontSize:F.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=F,e.Mode=r,e.Size={XSmall:"xsmall",Small:"small",Default:"default",Large:"large"},e.borderRadius=a,e.breakpoints=a,e.color=A,e.focusRing=C,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=E,e.spacing={0:0,25:1,50:2,100:4,150:6,200:8,300:12,400:16,600:24,800:32,900:36,1e3:40,1200:48,1400:56,1600:64,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=N})); | ||
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("@leafygreen-ui/palette")):"function"==typeof define&&define.amd?define(["exports","@leafygreen-ui/palette"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self)["@leafygreen-ui/tokens"]={},e["@leafygreen-ui/palette"])}(this,(function(e,r){"use strict";var a={Mobile:320,Tablet:768,Desktop:1024,XLDesktop:1440};function t(e){var r=function(e,r){if("object"!=typeof e||!e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var t=a.call(e,r);if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof r?r:r+""}function o(e,r,a){return(r=t(r))in e?Object.defineProperty(e,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[r]=a,e}var l={Dark:"dark",Light:"light"},i={Primary:"primary",Secondary:"secondary",InversePrimary:"inversePrimary",InverseSecondary:"inverseSecondary",Info:"info",Warning:"warning",Error:"error",Success:"success",Disabled:"disabled"},u={Default:"default",Hover:"hover",Focus:"focus"},s=r.palette.black,c=r.palette.blue,n=r.palette.gray,d=r.palette.green,g=r.palette.red,f=r.palette.white,h=r.palette.yellow,v={background:o(o(o(o(o(o(o(o({},i.Primary,o(o(o({},u.Default,s),u.Hover,n.dark2),u.Focus,c.dark3)),i.Secondary,o(o(o({},u.Default,n.dark4),u.Hover,n.dark2),u.Focus,c.dark3)),i.InversePrimary,o(o(o({},u.Default,n.light2),u.Hover,n.light3),u.Focus,c.light2)),i.Info,o(o(o({},u.Default,c.dark3),u.Hover,c.dark3),u.Focus,c.dark3)),i.Warning,o(o(o({},u.Default,h.dark3),u.Hover,h.dark3),u.Focus,h.dark3)),i.Success,o(o(o({},u.Default,d.dark3),u.Hover,d.dark3),u.Focus,d.dark3)),i.Error,o(o(o({},u.Default,g.dark3),u.Hover,g.dark3),u.Focus,g.dark3)),i.Disabled,o(o(o({},u.Default,n.dark3),u.Hover,n.dark3),u.Focus,n.dark3)),border:o(o(o(o(o({},i.Primary,o(o(o({},u.Default,n.base),u.Hover,n.base),u.Focus,c.light1)),i.Secondary,o(o(o({},u.Default,n.dark2),u.Hover,n.dark2),u.Focus,c.light1)),i.Success,o(o(o({},u.Default,d.dark1),u.Hover,d.dark1),u.Focus,c.light1)),i.Error,o(o(o({},u.Default,g.light1),u.Hover,g.light1),u.Focus,c.light1)),i.Disabled,o(o(o({},u.Default,n.dark2),u.Hover,n.dark2),u.Focus,n.dark2)),icon:o(o(o(o(o(o(o(o({},i.Primary,o(o(o({},u.Default,n.light1),u.Hover,n.light3),u.Focus,c.light3)),i.Secondary,o(o(o({},u.Default,n.base),u.Hover,n.light3),u.Focus,c.light3)),i.InversePrimary,o(o(o({},u.Default,f),u.Hover,s),u.Focus,c.dark2)),i.Info,o(o(o({},u.Default,c.light1),u.Hover,c.light1),u.Focus,c.light1)),i.Warning,o(o(o({},u.Default,h.base),u.Hover,h.base),u.Focus,h.base)),i.Success,o(o(o({},u.Default,d.base),u.Hover,d.base),u.Focus,d.base)),i.Error,o(o(o({},u.Default,g.light1),u.Hover,g.light1),u.Focus,g.light1)),i.Disabled,o(o(o({},u.Default,n.dark1),u.Hover,n.dark1),u.Focus,n.dark1)),text:o(o(o(o(o(o({},i.Primary,o(o(o({},u.Default,n.light2),u.Hover,n.light2),u.Focus,c.light3)),i.Secondary,o(o(o({},u.Default,n.light1),u.Hover,n.light2),u.Focus,c.light3)),i.InversePrimary,o(o(o({},u.Default,s),u.Hover,s),u.Focus,c.dark2)),i.InverseSecondary,o(o(o({},u.Default,n.dark2),u.Hover,s),u.Focus,c.dark2)),i.Error,o(o(o({},u.Default,g.light1),u.Hover,g.light1),u.Focus,g.light1)),i.Disabled,o(o(o({},u.Default,n.dark1),u.Hover,n.dark1),u.Focus,n.dark1))},D=r.palette.black,b=r.palette.blue,k=r.palette.gray,p=r.palette.green,y=r.palette.red,H=r.palette.white,F=r.palette.yellow,m={background:o(o(o(o(o(o(o(o({},i.Primary,o(o(o({},u.Default,H),u.Hover,k.light2),u.Focus,b.light3)),i.Secondary,o(o(o({},u.Default,k.light3),u.Hover,k.light2),u.Focus,b.light3)),i.InversePrimary,o(o(o({},u.Default,D),u.Hover,k.dark3),u.Focus,b.dark2)),i.Info,o(o(o({},u.Default,b.light3),u.Hover,b.light3),u.Focus,b.light3)),i.Warning,o(o(o({},u.Default,F.light3),u.Hover,F.light3),u.Focus,F.light3)),i.Success,o(o(o({},u.Default,p.light3),u.Hover,p.light3),u.Focus,p.light3)),i.Error,o(o(o({},u.Default,y.light3),u.Hover,y.light3),u.Focus,y.light3)),i.Disabled,o(o(o({},u.Default,k.light2),u.Hover,k.light2),u.Focus,k.light2)),border:o(o(o(o(o({},i.Primary,o(o(o({},u.Default,k.base),u.Hover,k.base),u.Focus,b.light1)),i.Secondary,o(o(o({},u.Default,k.light2),u.Hover,k.light2),u.Focus,b.light1)),i.Success,o(o(o({},u.Default,p.dark1),u.Hover,p.dark1),u.Focus,b.light1)),i.Error,o(o(o({},u.Default,y.base),u.Hover,y.base),u.Focus,b.light1)),i.Disabled,o(o(o({},u.Default,k.light1),u.Hover,k.light1),u.Focus,k.light1)),icon:o(o(o(o(o(o(o(o({},i.Primary,o(o(o({},u.Default,k.dark1),u.Hover,D),u.Focus,b.dark1)),i.Secondary,o(o(o({},u.Default,k.base),u.Hover,D),u.Focus,b.dark1)),i.InversePrimary,o(o(o({},u.Default,H),u.Hover,H),u.Focus,b.light2)),i.Info,o(o(o({},u.Default,b.base),u.Hover,b.base),u.Focus,b.base)),i.Warning,o(o(o({},u.Default,F.dark2),u.Hover,F.dark2),u.Focus,F.dark2)),i.Success,o(o(o({},u.Default,p.dark1),u.Hover,p.dark1),u.Focus,p.dark1)),i.Error,o(o(o({},u.Default,y.base),u.Hover,y.base),u.Focus,y.base)),i.Disabled,o(o(o({},u.Default,k.base),u.Hover,k.base),u.Focus,k.base)),text:o(o(o(o(o(o({},i.Primary,o(o(o({},u.Default,D),u.Hover,D),u.Focus,b.dark1)),i.Secondary,o(o(o({},u.Default,k.dark1),u.Hover,D),u.Focus,b.dark1)),i.InversePrimary,o(o(o({},u.Default,H),u.Hover,H),u.Focus,b.light2)),i.InverseSecondary,o(o(o({},u.Default,k.light1),u.Hover,H),u.Focus,b.light2)),i.Error,o(o(o({},u.Default,y.base),u.Hover,y.base),u.Focus,y.base)),i.Disabled,o(o(o({},u.Default,k.base),u.Hover,k.base),u.Focus,k.base))},S=o(o({},l.Dark,v),l.Light,m),P=o(o({},l.Light,{default:"0 0 0 2px ".concat(r.palette.white,", 0 0 0 4px ").concat(r.palette.blue.light1),input:"0 0 0 3px ".concat(r.palette.blue.light1)}),l.Dark,{default:"0 0 0 2px ".concat(r.palette.black,", 0 0 0 4px ").concat(r.palette.blue.light1),input:"0 0 0 3px ".concat(r.palette.blue.light1)}),x=o(o({},l.Light,{gray:"0 0 0 3px ".concat(r.palette.gray.light2),green:"0 0 0 3px ".concat(r.palette.green.light2),red:"0 0 0 3px ".concat(r.palette.red.light2)}),l.Dark,{gray:"0 0 0 3px ".concat(r.palette.gray.dark2),green:"0 0 0 3px ".concat(r.palette.green.dark3),red:"0 0 0 3px ".concat(r.palette.yellow.dark3)}),I={Body1:13,Body2:16},w={body1:{fontSize:I.Body1,lineHeight:20},body2:{fontSize:I.Body2,lineHeight:28},code1:{fontSize:13,lineHeight:20},code2:{fontSize:15,lineHeight:24},disclaimer:{fontSize:12,lineHeight:20},large:{fontSize:18,lineHeight:24}};e.BaseFontSize=I,e.Mode=l,e.Size={XSmall:"xsmall",Small:"small",Default:"default",Large:"large"},e.State=u,e.Type={Background:"background",Border:"border",Icon:"icon",Text:"text"},e.Variant=i,e.borderRadius=a,e.breakpoints=a,e.color=S,e.focusRing=P,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=x,e.spacing={0:0,25:1,50:2,100:4,150:6,200:8,300:12,400:16,600:24,800:32,900:36,1e3:40,1200:48,1400:56,1600:64,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=w})); | ||
//# sourceMappingURL=index.js.map |
@@ -33,3 +33,3 @@ export declare const BaseFontSize: { | ||
readonly fontSize: 18; | ||
readonly lineHeight: 22; | ||
readonly lineHeight: 24; | ||
}; | ||
@@ -36,0 +36,0 @@ }; |
{ | ||
"name": "@leafygreen-ui/tokens", | ||
"version": "2.5.3", | ||
"version": "2.6.0", | ||
"description": "leafyGreen UI Kit Tokens", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
@@ -49,5 +49,5 @@ import { palette } from '@leafygreen-ui/palette'; | ||
[Variant.Disabled]: { | ||
[State.Default]: gray.dark2, | ||
[State.Hover]: gray.dark2, | ||
[State.Focus]: gray.dark2, | ||
[State.Default]: gray.dark3, | ||
[State.Hover]: gray.dark3, | ||
[State.Focus]: gray.dark3, | ||
}, | ||
@@ -54,0 +54,0 @@ } as const satisfies VariantColorRecord; |
@@ -55,3 +55,3 @@ import { palette } from '@leafygreen-ui/palette'; | ||
const lightModBorderColors = { | ||
const lightModeBorderColors = { | ||
[Variant.Primary]: { | ||
@@ -162,5 +162,5 @@ [State.Default]: gray.base, | ||
background: lightModeBackgroundColors, | ||
border: lightModBorderColors, | ||
border: lightModeBorderColors, | ||
icon: lightModeIconColors, | ||
text: lightModeTextColors, | ||
} as const satisfies ModeColorRecord; |
export { default as borderRadius } from './breakpoints'; | ||
export { default as breakpoints } from './breakpoints'; | ||
export { color } from './color/color'; | ||
export { color, State, Type, Variant } from './color'; | ||
export { default as focusRing } from './focusRing'; | ||
@@ -5,0 +5,0 @@ export { default as fontFamilies } from './fontFamilies'; |
@@ -35,3 +35,3 @@ export const BaseFontSize = { | ||
fontSize: 18, | ||
lineHeight: 22, | ||
lineHeight: 24, | ||
} as const, | ||
@@ -38,0 +38,0 @@ } as const; |
@@ -1,1 +0,1 @@ | ||
import e from"react";import t from"lodash/startCase";import{css as r}from"@leafygreen-ui/emotion";import{palette as a}from"@leafygreen-ui/palette";function n(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t);if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}function i(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var o={Dark:"dark",Light:"light"},c="primary",d="secondary",g="inversePrimary",u="inverseSecondary",h="info",s="warning",k="error",b="success",p="disabled",f="default",m="hover",y="focus",x=a.black,v=a.blue,E=a.gray,w=a.green,S=a.red,N=a.white,j=a.yellow,z={background:i(i(i(i(i(i(i(i({},c,i(i(i({},f,x),m,E.dark2),y,v.dark3)),d,i(i(i({},f,E.dark4),m,E.dark2),y,v.dark3)),g,i(i(i({},f,E.light2),m,E.light3),y,v.light2)),h,i(i(i({},f,v.dark3),m,v.dark3),y,v.dark3)),s,i(i(i({},f,j.dark3),m,j.dark3),y,j.dark3)),b,i(i(i({},f,w.dark3),m,w.dark3),y,w.dark3)),k,i(i(i({},f,S.dark3),m,S.dark3),y,S.dark3)),p,i(i(i({},f,E.dark2),m,E.dark2),y,E.dark2)),border:i(i(i(i(i({},c,i(i(i({},f,E.base),m,E.base),y,v.light1)),d,i(i(i({},f,E.dark2),m,E.dark2),y,v.light1)),b,i(i(i({},f,w.dark1),m,w.dark1),y,v.light1)),k,i(i(i({},f,S.light1),m,S.light1),y,v.light1)),p,i(i(i({},f,E.dark2),m,E.dark2),y,E.dark2)),icon:i(i(i(i(i(i(i(i({},c,i(i(i({},f,E.light1),m,E.light3),y,v.light3)),d,i(i(i({},f,E.base),m,E.light3),y,v.light3)),g,i(i(i({},f,N),m,x),y,v.dark2)),h,i(i(i({},f,v.light1),m,v.light1),y,v.light1)),s,i(i(i({},f,j.base),m,j.base),y,j.base)),b,i(i(i({},f,w.base),m,w.base),y,w.base)),k,i(i(i({},f,S.light1),m,S.light1),y,S.light1)),p,i(i(i({},f,E.dark1),m,E.dark1),y,E.dark1)),text:i(i(i(i(i(i({},c,i(i(i({},f,E.light2),m,E.light2),y,v.light3)),d,i(i(i({},f,E.light1),m,E.light2),y,v.light3)),g,i(i(i({},f,x),m,x),y,v.dark2)),u,i(i(i({},f,E.dark2),m,x),y,v.dark2)),k,i(i(i({},f,S.light1),m,S.light1),y,S.light1)),p,i(i(i({},f,E.dark1),m,E.dark1),y,E.dark1))},O=a.black,H=a.blue,P=a.gray,D=a.green,C=a.red,L=a.white,T=a.yellow,A={background:i(i(i(i(i(i(i(i({},c,i(i(i({},f,L),m,P.light2),y,H.light3)),d,i(i(i({},f,P.light3),m,P.light2),y,H.light3)),g,i(i(i({},f,O),m,P.dark3),y,H.dark2)),h,i(i(i({},f,H.light3),m,H.light3),y,H.light3)),s,i(i(i({},f,T.light3),m,T.light3),y,T.light3)),b,i(i(i({},f,D.light3),m,D.light3),y,D.light3)),k,i(i(i({},f,C.light3),m,C.light3),y,C.light3)),p,i(i(i({},f,P.light2),m,P.light2),y,P.light2)),border:i(i(i(i(i({},c,i(i(i({},f,P.base),m,P.base),y,H.light1)),d,i(i(i({},f,P.light2),m,P.light2),y,H.light1)),b,i(i(i({},f,D.dark1),m,D.dark1),y,H.light1)),k,i(i(i({},f,C.base),m,C.base),y,H.light1)),p,i(i(i({},f,P.light1),m,P.light1),y,P.light1)),icon:i(i(i(i(i(i(i(i({},c,i(i(i({},f,P.dark1),m,O),y,H.dark1)),d,i(i(i({},f,P.base),m,O),y,H.dark1)),g,i(i(i({},f,L),m,L),y,H.light2)),h,i(i(i({},f,H.base),m,H.base),y,H.base)),s,i(i(i({},f,T.dark2),m,T.dark2),y,T.dark2)),b,i(i(i({},f,D.dark1),m,D.dark1),y,D.dark1)),k,i(i(i({},f,C.base),m,C.base),y,C.base)),p,i(i(i({},f,P.base),m,P.base),y,P.base)),text:i(i(i(i(i(i({},c,i(i(i({},f,O),m,O),y,H.dark1)),d,i(i(i({},f,P.dark1),m,O),y,H.dark1)),g,i(i(i({},f,L),m,L),y,H.light2)),u,i(i(i({},f,P.light1),m,L),y,H.light2)),k,i(i(i({},f,C.base),m,C.base),y,C.base)),p,i(i(i({},f,P.base),m,P.base),y,P.base))};i(i({},o.Dark,z),o.Light,A);var F,I,M,B,R,V,q,G,J,K=i(i({},o.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)}),o.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)}),Q={default:"'Euclid Circular A', 'Helvetica Neue', Helvetica, Arial, sans-serif",serif:"'MongoDB Value Serif', 'Times New Roman', serif",code:"'Source Code Pro', Menlo, monospace"},U=i(i({},o.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)}),o.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)}),W={0:0,25:1,50:2,100:4,150:6,200:8,300:12,400:16,600:24,800:32,900:36,1e3:40,1200:48,1400:56,1600:64,1:4,2:8,3:16,4:24,5:32,6:64,7:88},X=100,Y={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}},Z={title:"Components/Tokens",component:null,parameters:{default:"Spacing"}},$=r(F||(F=l(["\n margin-left: ","px;\n"])),W[3]),_=Object.keys(W).filter((function(e){return 0===Number(e)||Number(e)>25})).reduce((function(e,t,n){var i=t;return e[i]=r(I||(I=l(["\n background-color: ",";\n width: ","px;\n height: ","px;\n "])),a.purple.light2,W[i],W[i]),e}),{});function ee(t){var r=t.space;return e.createElement("div",{className:$},e.createElement("code",null,"spacing[",r,"]: ",W[r]),e.createElement("div",{className:_[r]}))}var te=function(){return e.createElement("div",null,e.createElement("h2",null,"Spacing"),e.createElement("div",{className:r(M||(M=l(["\n display: flex;\n flex-direction: column;\n gap: ","px;\n "])),W[100])},Object.keys(W).filter((function(e){return 0===Number(e)||Number(e)>25})).map((function(t){return e.createElement(ee,{space:t,key:t})}))))},re=function(){return e.createElement("div",null,e.createElement("h2",null,"Typescales"),Object.keys(Y).map((function(t){var a=t;return e.createElement("div",{key:a,className:r(B||(B=l(["\n font-family: ",";\n font-size: ","px;\n line-height: ","px;\n margin: ","px 0;\n "])),a.includes("code")?Q.code:Q.default,Y[a].fontSize,Y[a].lineHeight,W[3])},e.createElement("div",null,a))})))},ae=function(){return e.createElement("div",null,e.createElement("h2",null,"Font Families"),Object.keys(Q).map((function(t){var a=t;return e.createElement("div",{key:a,className:r(R||(R=l(["\n font-family: ",";\n margin: ","px 0;\n "])),Q[a],W[3])},e.createElement("div",null,a))})))},ne=function(){var n=function(e){return"dark"===e?"light":"dark"},i=function(e){return r(V||(V=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 "])),W[2],"dark"===e?a.white:a.black,"dark"===e?a.black:a.white,"dark"===e?a.gray.light3:a.gray.dark3,W[3],W[4],W[3])},c=r(q||(q=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 "])),Q.default,Y.body2.fontSize,W[2],W[1],X);return e.createElement("div",null,e.createElement("h2",null,"Interaction States"),e.createElement("div",null,Object.values(o).map((function(o){return e.createElement("div",{key:o,className:i(o)},Object.keys(U[o]).map((function(i){var d=i;return e.createElement("button",{key:d,className:r(G||(G=l(["\n ",";\n background-color: ",";\n color: ",";\n &:hover {\n box-shadow: ",";\n }\n &:focus {\n box-shadow: ",";\n }\n "])),c,a[d]["".concat(o,"3")],a[d]["".concat(n(o),"2")],U[o][d],K[o].default)},t(d))})),e.createElement("input",{type:"text",placeholder:"Input",className:r(J||(J=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")],U[o].gray,K[o].input)}))}))))};ne.parameters={chromatic:{disableSnapshot:!0}};export{ae as FontFamilies,ne as InteractionRings,te as Spacing,re as TypeScales,Z as default}; | ||
import e from"react";import t from"lodash/startCase";import{css as r}from"@leafygreen-ui/emotion";import{palette as a}from"@leafygreen-ui/palette";function n(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t);if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}function i(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var o={Dark:"dark",Light:"light"},c="primary",d="secondary",g="inversePrimary",u="inverseSecondary",h="info",s="warning",k="error",b="success",p="disabled",f="default",m="hover",y="focus",x=a.black,v=a.blue,E=a.gray,w=a.green,S=a.red,N=a.white,j=a.yellow,z={background:i(i(i(i(i(i(i(i({},c,i(i(i({},f,x),m,E.dark2),y,v.dark3)),d,i(i(i({},f,E.dark4),m,E.dark2),y,v.dark3)),g,i(i(i({},f,E.light2),m,E.light3),y,v.light2)),h,i(i(i({},f,v.dark3),m,v.dark3),y,v.dark3)),s,i(i(i({},f,j.dark3),m,j.dark3),y,j.dark3)),b,i(i(i({},f,w.dark3),m,w.dark3),y,w.dark3)),k,i(i(i({},f,S.dark3),m,S.dark3),y,S.dark3)),p,i(i(i({},f,E.dark3),m,E.dark3),y,E.dark3)),border:i(i(i(i(i({},c,i(i(i({},f,E.base),m,E.base),y,v.light1)),d,i(i(i({},f,E.dark2),m,E.dark2),y,v.light1)),b,i(i(i({},f,w.dark1),m,w.dark1),y,v.light1)),k,i(i(i({},f,S.light1),m,S.light1),y,v.light1)),p,i(i(i({},f,E.dark2),m,E.dark2),y,E.dark2)),icon:i(i(i(i(i(i(i(i({},c,i(i(i({},f,E.light1),m,E.light3),y,v.light3)),d,i(i(i({},f,E.base),m,E.light3),y,v.light3)),g,i(i(i({},f,N),m,x),y,v.dark2)),h,i(i(i({},f,v.light1),m,v.light1),y,v.light1)),s,i(i(i({},f,j.base),m,j.base),y,j.base)),b,i(i(i({},f,w.base),m,w.base),y,w.base)),k,i(i(i({},f,S.light1),m,S.light1),y,S.light1)),p,i(i(i({},f,E.dark1),m,E.dark1),y,E.dark1)),text:i(i(i(i(i(i({},c,i(i(i({},f,E.light2),m,E.light2),y,v.light3)),d,i(i(i({},f,E.light1),m,E.light2),y,v.light3)),g,i(i(i({},f,x),m,x),y,v.dark2)),u,i(i(i({},f,E.dark2),m,x),y,v.dark2)),k,i(i(i({},f,S.light1),m,S.light1),y,S.light1)),p,i(i(i({},f,E.dark1),m,E.dark1),y,E.dark1))},O=a.black,H=a.blue,P=a.gray,D=a.green,C=a.red,L=a.white,T=a.yellow,A={background:i(i(i(i(i(i(i(i({},c,i(i(i({},f,L),m,P.light2),y,H.light3)),d,i(i(i({},f,P.light3),m,P.light2),y,H.light3)),g,i(i(i({},f,O),m,P.dark3),y,H.dark2)),h,i(i(i({},f,H.light3),m,H.light3),y,H.light3)),s,i(i(i({},f,T.light3),m,T.light3),y,T.light3)),b,i(i(i({},f,D.light3),m,D.light3),y,D.light3)),k,i(i(i({},f,C.light3),m,C.light3),y,C.light3)),p,i(i(i({},f,P.light2),m,P.light2),y,P.light2)),border:i(i(i(i(i({},c,i(i(i({},f,P.base),m,P.base),y,H.light1)),d,i(i(i({},f,P.light2),m,P.light2),y,H.light1)),b,i(i(i({},f,D.dark1),m,D.dark1),y,H.light1)),k,i(i(i({},f,C.base),m,C.base),y,H.light1)),p,i(i(i({},f,P.light1),m,P.light1),y,P.light1)),icon:i(i(i(i(i(i(i(i({},c,i(i(i({},f,P.dark1),m,O),y,H.dark1)),d,i(i(i({},f,P.base),m,O),y,H.dark1)),g,i(i(i({},f,L),m,L),y,H.light2)),h,i(i(i({},f,H.base),m,H.base),y,H.base)),s,i(i(i({},f,T.dark2),m,T.dark2),y,T.dark2)),b,i(i(i({},f,D.dark1),m,D.dark1),y,D.dark1)),k,i(i(i({},f,C.base),m,C.base),y,C.base)),p,i(i(i({},f,P.base),m,P.base),y,P.base)),text:i(i(i(i(i(i({},c,i(i(i({},f,O),m,O),y,H.dark1)),d,i(i(i({},f,P.dark1),m,O),y,H.dark1)),g,i(i(i({},f,L),m,L),y,H.light2)),u,i(i(i({},f,P.light1),m,L),y,H.light2)),k,i(i(i({},f,C.base),m,C.base),y,C.base)),p,i(i(i({},f,P.base),m,P.base),y,P.base))};i(i({},o.Dark,z),o.Light,A);var F,I,M,B,R,V,q,G,J,K=i(i({},o.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)}),o.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)}),Q={default:"'Euclid Circular A', 'Helvetica Neue', Helvetica, Arial, sans-serif",serif:"'MongoDB Value Serif', 'Times New Roman', serif",code:"'Source Code Pro', Menlo, monospace"},U=i(i({},o.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)}),o.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)}),W={0:0,25:1,50:2,100:4,150:6,200:8,300:12,400:16,600:24,800:32,900:36,1e3:40,1200:48,1400:56,1600:64,1:4,2:8,3:16,4:24,5:32,6:64,7:88},X=100,Y={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:24}},Z={title:"Components/Tokens",component:null,parameters:{default:"Spacing"}},$=r(F||(F=l(["\n margin-left: ","px;\n"])),W[3]),_=Object.keys(W).filter((function(e){return 0===Number(e)||Number(e)>25})).reduce((function(e,t,n){var i=t;return e[i]=r(I||(I=l(["\n background-color: ",";\n width: ","px;\n height: ","px;\n "])),a.purple.light2,W[i],W[i]),e}),{});function ee(t){var r=t.space;return e.createElement("div",{className:$},e.createElement("code",null,"spacing[",r,"]: ",W[r]),e.createElement("div",{className:_[r]}))}var te=function(){return e.createElement("div",null,e.createElement("h2",null,"Spacing"),e.createElement("div",{className:r(M||(M=l(["\n display: flex;\n flex-direction: column;\n gap: ","px;\n "])),W[100])},Object.keys(W).filter((function(e){return 0===Number(e)||Number(e)>25})).map((function(t){return e.createElement(ee,{space:t,key:t})}))))},re=function(){return e.createElement("div",null,e.createElement("h2",null,"Typescales"),Object.keys(Y).map((function(t){var a=t;return e.createElement("div",{key:a,className:r(B||(B=l(["\n font-family: ",";\n font-size: ","px;\n line-height: ","px;\n margin: ","px 0;\n "])),a.includes("code")?Q.code:Q.default,Y[a].fontSize,Y[a].lineHeight,W[3])},e.createElement("div",null,a))})))},ae=function(){return e.createElement("div",null,e.createElement("h2",null,"Font Families"),Object.keys(Q).map((function(t){var a=t;return e.createElement("div",{key:a,className:r(R||(R=l(["\n font-family: ",";\n margin: ","px 0;\n "])),Q[a],W[3])},e.createElement("div",null,a))})))},ne=function(){var n=function(e){return"dark"===e?"light":"dark"},i=function(e){return r(V||(V=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 "])),W[2],"dark"===e?a.white:a.black,"dark"===e?a.black:a.white,"dark"===e?a.gray.light3:a.gray.dark3,W[3],W[4],W[3])},c=r(q||(q=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 "])),Q.default,Y.body2.fontSize,W[2],W[1],X);return e.createElement("div",null,e.createElement("h2",null,"Interaction States"),e.createElement("div",null,Object.values(o).map((function(o){return e.createElement("div",{key:o,className:i(o)},Object.keys(U[o]).map((function(i){var d=i;return e.createElement("button",{key:d,className:r(G||(G=l(["\n ",";\n background-color: ",";\n color: ",";\n &:hover {\n box-shadow: ",";\n }\n &:focus {\n box-shadow: ",";\n }\n "])),c,a[d]["".concat(o,"3")],a[d]["".concat(n(o),"2")],U[o][d],K[o].default)},t(d))})),e.createElement("input",{type:"text",placeholder:"Input",className:r(J||(J=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")],U[o].gray,K[o].input)}))}))))};ne.parameters={chromatic:{disableSnapshot:!0}};export{ae as FontFamilies,ne as InteractionRings,te as Spacing,re as TypeScales,Z 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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
126737
62
1613