@leafygreen-ui/tokens
Advanced tools
Comparing version 2.7.0 to 2.8.0
# @leafygreen-ui/tokens | ||
## 2.8.0 | ||
### Minor Changes | ||
- 7bc4fcde: - Improves semantics of color token segment type names (e.g. `Type` -> `Property`, `State` -> `InteractionState`). | ||
- Adds TSDoc to color types | ||
- Deprecates `Mode` enum in favor if `Theme` (exported from `lib`) | ||
### Patch Changes | ||
- Updated dependencies [7bc4fcde] | ||
- @leafygreen-ui/lib@13.5.0 | ||
## 2.7.0 | ||
@@ -4,0 +17,0 @@ |
@@ -1,2 +0,5 @@ | ||
declare const Type: { | ||
/** | ||
* The element property a color token applies to | ||
*/ | ||
declare const Property: { | ||
readonly Background: "background"; | ||
@@ -7,3 +10,6 @@ readonly Border: "border"; | ||
}; | ||
type Type = (typeof Type)[keyof typeof Type]; | ||
type Property = (typeof Property)[keyof typeof Property]; | ||
/** | ||
* The context variant in which a color token should be applied | ||
*/ | ||
declare const Variant: { | ||
@@ -23,3 +29,6 @@ readonly Disabled: "disabled"; | ||
type Variant = (typeof Variant)[keyof typeof Variant]; | ||
declare const State: { | ||
/** | ||
* The interaction state in which a color token should be applied | ||
*/ | ||
declare const InteractionState: { | ||
readonly Default: "default"; | ||
@@ -29,6 +38,14 @@ readonly Hover: "hover"; | ||
}; | ||
type State = (typeof State)[keyof typeof State]; | ||
export type VariantColorRecord = Partial<Record<Variant, Record<State, string>>>; | ||
export type ModeColorRecord = Record<Type, VariantColorRecord>; | ||
export { State, Type, Variant }; | ||
type InteractionState = (typeof InteractionState)[keyof typeof InteractionState]; | ||
/** | ||
* A partial Record, | ||
* mapping a subset of {@link Variant} keys | ||
* to a Record of {@link InteractionState} color tokens | ||
*/ | ||
export type VariantColorRecord = Partial<Record<Variant, Record<InteractionState, string>>>; | ||
/** | ||
* A Record mapping {@link Property} keys to {@link VariantColorRecord} | ||
*/ | ||
export type PropertyColorRecord = Record<Property, VariantColorRecord>; | ||
export { InteractionState, Property, Variant }; | ||
//# sourceMappingURL=color.types.d.ts.map |
export { color } from './color'; | ||
export { State, Type, Variant } from './color.types'; | ||
export { InteractionState, Property, Variant } from './color.types'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,2 +0,2 @@ | ||
import{palette as e}from"@leafygreen-ui/palette";var r={0:0,50:2,100:4,150:6,200:8,300:12,400:16,500:20,600:24},a={Mobile:320,Tablet:768,Desktop:1024,XLDesktop:1440};function o(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 t(e,r,a){return(r=o(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={Background:"background",Border:"border",Icon:"icon",Text:"text"},u={Disabled:"disabled",Placeholder:"placeholder",Primary:"primary",Secondary:"secondary",InversePrimary:"inversePrimary",InverseSecondary:"inverseSecondary",Info:"info",Warning:"warning",Error:"error",Success:"success",Link:"link"},s={Default:"default",Hover:"hover",Focus:"focus"},c=e.black,d=e.blue,g=e.gray,n=e.green,f=e.red,h=e.white,v=e.yellow,k={background:t(t(t(t(t(t(t(t({},u.Primary,t(t(t({},s.Default,c),s.Hover,g.dark2),s.Focus,d.dark3)),u.Secondary,t(t(t({},s.Default,g.dark4),s.Hover,g.dark2),s.Focus,d.dark3)),u.InversePrimary,t(t(t({},s.Default,g.light2),s.Hover,g.light3),s.Focus,d.light2)),u.Info,t(t(t({},s.Default,d.dark3),s.Hover,d.dark3),s.Focus,d.dark3)),u.Warning,t(t(t({},s.Default,v.dark3),s.Hover,v.dark3),s.Focus,v.dark3)),u.Success,t(t(t({},s.Default,n.dark3),s.Hover,n.dark3),s.Focus,n.dark3)),u.Error,t(t(t({},s.Default,f.dark3),s.Hover,f.dark3),s.Focus,f.dark3)),u.Disabled,t(t(t({},s.Default,g.dark3),s.Hover,g.dark3),s.Focus,g.dark3)),border:t(t(t(t(t({},u.Primary,t(t(t({},s.Default,g.base),s.Hover,g.base),s.Focus,d.light1)),u.Secondary,t(t(t({},s.Default,g.dark2),s.Hover,g.dark2),s.Focus,d.light1)),u.Success,t(t(t({},s.Default,n.dark1),s.Hover,n.dark1),s.Focus,d.light1)),u.Error,t(t(t({},s.Default,f.light1),s.Hover,f.light1),s.Focus,d.light1)),u.Disabled,t(t(t({},s.Default,g.dark2),s.Hover,g.dark2),s.Focus,g.dark2)),icon:t(t(t(t(t(t(t(t({},u.Primary,t(t(t({},s.Default,g.light1),s.Hover,g.light3),s.Focus,d.light3)),u.Secondary,t(t(t({},s.Default,g.base),s.Hover,g.light3),s.Focus,d.light3)),u.InversePrimary,t(t(t({},s.Default,h),s.Hover,c),s.Focus,d.dark2)),u.Info,t(t(t({},s.Default,d.light1),s.Hover,d.light1),s.Focus,d.light1)),u.Warning,t(t(t({},s.Default,v.base),s.Hover,v.base),s.Focus,v.base)),u.Success,t(t(t({},s.Default,n.base),s.Hover,n.base),s.Focus,n.base)),u.Error,t(t(t({},s.Default,f.light1),s.Hover,f.light1),s.Focus,f.light1)),u.Disabled,t(t(t({},s.Default,g.dark1),s.Hover,g.dark1),s.Focus,g.dark1)),text:t(t(t(t(t(t(t(t({},u.Primary,t(t(t({},s.Default,g.light2),s.Hover,g.light2),s.Focus,d.light3)),u.Placeholder,t(t(t({},s.Default,g.dark1),s.Hover,g.dark1),s.Focus,g.dark1)),u.Secondary,t(t(t({},s.Default,g.light1),s.Hover,g.light2),s.Focus,d.light3)),u.InversePrimary,t(t(t({},s.Default,c),s.Hover,c),s.Focus,d.dark2)),u.InverseSecondary,t(t(t({},s.Default,g.dark2),s.Hover,c),s.Focus,d.dark2)),u.Error,t(t(t({},s.Default,f.light1),s.Hover,f.light1),s.Focus,f.light1)),u.Disabled,t(t(t({},s.Default,g.dark1),s.Hover,g.dark1),s.Focus,g.dark1)),u.Link,t(t(t({},s.Default,d.light1),s.Hover,d.light1),s.Focus,d.light1))},D=e.black,b=e.blue,H=e.gray,F=e.green,y=e.red,m=e.white,S=e.yellow,p={background:t(t(t(t(t(t(t(t({},u.Primary,t(t(t({},s.Default,m),s.Hover,H.light2),s.Focus,b.light3)),u.Secondary,t(t(t({},s.Default,H.light3),s.Hover,H.light2),s.Focus,b.light3)),u.InversePrimary,t(t(t({},s.Default,D),s.Hover,H.dark3),s.Focus,b.dark2)),u.Info,t(t(t({},s.Default,b.light3),s.Hover,b.light3),s.Focus,b.light3)),u.Warning,t(t(t({},s.Default,S.light3),s.Hover,S.light3),s.Focus,S.light3)),u.Success,t(t(t({},s.Default,F.light3),s.Hover,F.light3),s.Focus,F.light3)),u.Error,t(t(t({},s.Default,y.light3),s.Hover,y.light3),s.Focus,y.light3)),u.Disabled,t(t(t({},s.Default,H.light2),s.Hover,H.light2),s.Focus,H.light2)),border:t(t(t(t(t({},u.Primary,t(t(t({},s.Default,H.base),s.Hover,H.base),s.Focus,b.light1)),u.Secondary,t(t(t({},s.Default,H.light2),s.Hover,H.light2),s.Focus,b.light1)),u.Success,t(t(t({},s.Default,F.dark1),s.Hover,F.dark1),s.Focus,b.light1)),u.Error,t(t(t({},s.Default,y.base),s.Hover,y.base),s.Focus,b.light1)),u.Disabled,t(t(t({},s.Default,H.light1),s.Hover,H.light1),s.Focus,H.light1)),icon:t(t(t(t(t(t(t(t({},u.Primary,t(t(t({},s.Default,H.dark1),s.Hover,D),s.Focus,b.dark1)),u.Secondary,t(t(t({},s.Default,H.base),s.Hover,D),s.Focus,b.dark1)),u.InversePrimary,t(t(t({},s.Default,m),s.Hover,m),s.Focus,b.light2)),u.Info,t(t(t({},s.Default,b.base),s.Hover,b.base),s.Focus,b.base)),u.Warning,t(t(t({},s.Default,S.dark2),s.Hover,S.dark2),s.Focus,S.dark2)),u.Success,t(t(t({},s.Default,F.dark1),s.Hover,F.dark1),s.Focus,F.dark1)),u.Error,t(t(t({},s.Default,y.base),s.Hover,y.base),s.Focus,y.base)),u.Disabled,t(t(t({},s.Default,H.base),s.Hover,H.base),s.Focus,H.base)),text:t(t(t(t(t(t(t(t({},u.Primary,t(t(t({},s.Default,D),s.Hover,D),s.Focus,b.dark1)),u.Secondary,t(t(t({},s.Default,H.dark1),s.Hover,D),s.Focus,b.dark1)),u.InversePrimary,t(t(t({},s.Default,m),s.Hover,m),s.Focus,b.light2)),u.InverseSecondary,t(t(t({},s.Default,H.light1),s.Hover,m),s.Focus,b.light2)),u.Error,t(t(t({},s.Default,y.base),s.Hover,y.base),s.Focus,y.base)),u.Disabled,t(t(t({},s.Default,H.base),s.Hover,H.base),s.Focus,H.base)),u.Placeholder,t(t(t({},s.Default,H.base),s.Hover,H.base),s.Focus,H.base)),u.Link,t(t(t({},s.Default,b.base),s.Hover,b.base),s.Focus,b.base))},P=t(t({},l.Dark,k),l.Light,p),x=t(t({},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)}),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)}),I={default:"'Euclid Circular A', 'Helvetica Neue', Helvetica, Arial, sans-serif",serif:"'MongoDB Value Serif', 'Times New Roman', serif",code:"'Source Code Pro', Menlo, monospace"},w={regular:400,medium:500,bold:700},E=t(t({},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)}),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)}),L={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},W={Body1:13,Body2:16},T={body1:{fontSize:W.Body1,lineHeight:20},body2:{fontSize:W.Body2,lineHeight:28},code1:{fontSize:13,lineHeight:20},code2:{fontSize:15,lineHeight:24},disclaimer:{fontSize:12,lineHeight:20},large:{fontSize:18,lineHeight:24}};export{W as BaseFontSize,l as Mode,L as Size,s as State,i as Type,u as Variant,r as borderRadius,a as breakpoints,P as color,x as focusRing,I as fontFamilies,w as fontWeights,E as hoverRing,B as spacing,z as transitionDuration,T as typeScales}; | ||
import{Theme as e}from"@leafygreen-ui/lib";import{palette as r}from"@leafygreen-ui/palette";var a={0:0,50:2,100:4,150:6,200:8,300:12,400:16,500:20,600:24},o={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 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 l(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 i={Background:"background",Border:"border",Icon:"icon",Text:"text"},u={Disabled:"disabled",Placeholder:"placeholder",Primary:"primary",Secondary:"secondary",InversePrimary:"inversePrimary",InverseSecondary:"inverseSecondary",Info:"info",Warning:"warning",Error:"error",Success:"success",Link:"link"},s={Default:"default",Hover:"hover",Focus:"focus"},c=r.black,d=r.blue,g=r.gray,n=r.green,f=r.red,h=r.white,v=r.yellow,k={background:l(l(l(l(l(l(l(l({},u.Primary,l(l(l({},s.Default,c),s.Hover,g.dark2),s.Focus,d.dark3)),u.Secondary,l(l(l({},s.Default,g.dark4),s.Hover,g.dark2),s.Focus,d.dark3)),u.InversePrimary,l(l(l({},s.Default,g.light2),s.Hover,g.light3),s.Focus,d.light2)),u.Info,l(l(l({},s.Default,d.dark3),s.Hover,d.dark3),s.Focus,d.dark3)),u.Warning,l(l(l({},s.Default,v.dark3),s.Hover,v.dark3),s.Focus,v.dark3)),u.Success,l(l(l({},s.Default,n.dark3),s.Hover,n.dark3),s.Focus,n.dark3)),u.Error,l(l(l({},s.Default,f.dark3),s.Hover,f.dark3),s.Focus,f.dark3)),u.Disabled,l(l(l({},s.Default,g.dark3),s.Hover,g.dark3),s.Focus,g.dark3)),border:l(l(l(l(l({},u.Primary,l(l(l({},s.Default,g.base),s.Hover,g.base),s.Focus,d.light1)),u.Secondary,l(l(l({},s.Default,g.dark2),s.Hover,g.dark2),s.Focus,d.light1)),u.Success,l(l(l({},s.Default,n.dark1),s.Hover,n.dark1),s.Focus,d.light1)),u.Error,l(l(l({},s.Default,f.light1),s.Hover,f.light1),s.Focus,d.light1)),u.Disabled,l(l(l({},s.Default,g.dark2),s.Hover,g.dark2),s.Focus,g.dark2)),icon:l(l(l(l(l(l(l(l({},u.Primary,l(l(l({},s.Default,g.light1),s.Hover,g.light3),s.Focus,d.light3)),u.Secondary,l(l(l({},s.Default,g.base),s.Hover,g.light3),s.Focus,d.light3)),u.InversePrimary,l(l(l({},s.Default,h),s.Hover,c),s.Focus,d.dark2)),u.Info,l(l(l({},s.Default,d.light1),s.Hover,d.light1),s.Focus,d.light1)),u.Warning,l(l(l({},s.Default,v.base),s.Hover,v.base),s.Focus,v.base)),u.Success,l(l(l({},s.Default,n.base),s.Hover,n.base),s.Focus,n.base)),u.Error,l(l(l({},s.Default,f.light1),s.Hover,f.light1),s.Focus,f.light1)),u.Disabled,l(l(l({},s.Default,g.dark1),s.Hover,g.dark1),s.Focus,g.dark1)),text:l(l(l(l(l(l(l(l({},u.Primary,l(l(l({},s.Default,g.light2),s.Hover,g.light2),s.Focus,d.light3)),u.Placeholder,l(l(l({},s.Default,g.dark1),s.Hover,g.dark1),s.Focus,g.dark1)),u.Secondary,l(l(l({},s.Default,g.light1),s.Hover,g.light2),s.Focus,d.light3)),u.InversePrimary,l(l(l({},s.Default,c),s.Hover,c),s.Focus,d.dark2)),u.InverseSecondary,l(l(l({},s.Default,g.dark2),s.Hover,c),s.Focus,d.dark2)),u.Error,l(l(l({},s.Default,f.light1),s.Hover,f.light1),s.Focus,f.light1)),u.Disabled,l(l(l({},s.Default,g.dark1),s.Hover,g.dark1),s.Focus,g.dark1)),u.Link,l(l(l({},s.Default,d.light1),s.Hover,d.light1),s.Focus,d.light1))},D=r.black,b=r.blue,H=r.gray,F=r.green,y=r.red,m=r.white,S=r.yellow,p={background:l(l(l(l(l(l(l(l({},u.Primary,l(l(l({},s.Default,m),s.Hover,H.light2),s.Focus,b.light3)),u.Secondary,l(l(l({},s.Default,H.light3),s.Hover,H.light2),s.Focus,b.light3)),u.InversePrimary,l(l(l({},s.Default,D),s.Hover,H.dark3),s.Focus,b.dark2)),u.Info,l(l(l({},s.Default,b.light3),s.Hover,b.light3),s.Focus,b.light3)),u.Warning,l(l(l({},s.Default,S.light3),s.Hover,S.light3),s.Focus,S.light3)),u.Success,l(l(l({},s.Default,F.light3),s.Hover,F.light3),s.Focus,F.light3)),u.Error,l(l(l({},s.Default,y.light3),s.Hover,y.light3),s.Focus,y.light3)),u.Disabled,l(l(l({},s.Default,H.light2),s.Hover,H.light2),s.Focus,H.light2)),border:l(l(l(l(l({},u.Primary,l(l(l({},s.Default,H.base),s.Hover,H.base),s.Focus,b.light1)),u.Secondary,l(l(l({},s.Default,H.light2),s.Hover,H.light2),s.Focus,b.light1)),u.Success,l(l(l({},s.Default,F.dark1),s.Hover,F.dark1),s.Focus,b.light1)),u.Error,l(l(l({},s.Default,y.base),s.Hover,y.base),s.Focus,b.light1)),u.Disabled,l(l(l({},s.Default,H.light1),s.Hover,H.light1),s.Focus,H.light1)),icon:l(l(l(l(l(l(l(l({},u.Primary,l(l(l({},s.Default,H.dark1),s.Hover,D),s.Focus,b.dark1)),u.Secondary,l(l(l({},s.Default,H.base),s.Hover,D),s.Focus,b.dark1)),u.InversePrimary,l(l(l({},s.Default,m),s.Hover,m),s.Focus,b.light2)),u.Info,l(l(l({},s.Default,b.base),s.Hover,b.base),s.Focus,b.base)),u.Warning,l(l(l({},s.Default,S.dark2),s.Hover,S.dark2),s.Focus,S.dark2)),u.Success,l(l(l({},s.Default,F.dark1),s.Hover,F.dark1),s.Focus,F.dark1)),u.Error,l(l(l({},s.Default,y.base),s.Hover,y.base),s.Focus,y.base)),u.Disabled,l(l(l({},s.Default,H.base),s.Hover,H.base),s.Focus,H.base)),text:l(l(l(l(l(l(l(l({},u.Primary,l(l(l({},s.Default,D),s.Hover,D),s.Focus,b.dark1)),u.Secondary,l(l(l({},s.Default,H.dark1),s.Hover,D),s.Focus,b.dark1)),u.InversePrimary,l(l(l({},s.Default,m),s.Hover,m),s.Focus,b.light2)),u.InverseSecondary,l(l(l({},s.Default,H.light1),s.Hover,m),s.Focus,b.light2)),u.Error,l(l(l({},s.Default,y.base),s.Hover,y.base),s.Focus,y.base)),u.Disabled,l(l(l({},s.Default,H.base),s.Hover,H.base),s.Focus,H.base)),u.Placeholder,l(l(l({},s.Default,H.base),s.Hover,H.base),s.Focus,H.base)),u.Link,l(l(l({},s.Default,b.base),s.Hover,b.base),s.Focus,b.base))},P=l(l({},e.Dark,k),e.Light,p),x={Dark:"dark",Light:"light"},I=l(l({},x.Light,{default:"0 0 0 2px ".concat(r.white,", 0 0 0 4px ").concat(r.blue.light1),input:"0 0 0 3px ".concat(r.blue.light1)}),x.Dark,{default:"0 0 0 2px ".concat(r.black,", 0 0 0 4px ").concat(r.blue.light1),input:"0 0 0 3px ".concat(r.blue.light1)}),w={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={regular:400,medium:500,bold:700},L=l(l({},x.Light,{gray:"0 0 0 3px ".concat(r.gray.light2),green:"0 0 0 3px ".concat(r.green.light2),red:"0 0 0 3px ".concat(r.red.light2)}),x.Dark,{gray:"0 0 0 3px ".concat(r.gray.dark2),green:"0 0 0 3px ".concat(r.green.dark3),red:"0 0 0 3px ".concat(r.yellow.dark3)}),B={XSmall:"xsmall",Small:"small",Default:"default",Large:"large"},z={0:0,25:1,50:2,100:4,150:6,200:8,300:12,400:16,500:20,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},T={faster:100,default:150,slower:300,slowest:500},W={Body1:13,Body2:16},j={body1:{fontSize:W.Body1,lineHeight:20},body2:{fontSize:W.Body2,lineHeight:28},code1:{fontSize:13,lineHeight:20},code2:{fontSize:15,lineHeight:24},disclaimer:{fontSize:12,lineHeight:20},large:{fontSize:18,lineHeight:24}};export{W as BaseFontSize,s as InteractionState,x as Mode,i as Property,B as Size,s as State,i as Type,u as Variant,a as borderRadius,o as breakpoints,P as color,I as focusRing,w as fontFamilies,E as fontWeights,L as hoverRing,z as spacing,T as transitionDuration,j as typeScales}; | ||
//# sourceMappingURL=index.js.map |
export { default as borderRadius } from './borderRadius'; | ||
export { default as breakpoints } from './breakpoints'; | ||
export { color, State, Type, Variant } from './color'; | ||
export { color, InteractionState, Property, Variant } from './color'; | ||
export { | ||
/** @deprecated - Prefer {@link InteractionState} */ | ||
InteractionState as State, // Re-exporting for API consistency | ||
/** @deprecated - Prefer {@link Property} */ | ||
Property as Type, } from './color'; | ||
export { default as focusRing } from './focusRing'; | ||
@@ -5,0 +10,0 @@ export { default as fontFamilies } from './fontFamilies'; |
@@ -1,2 +0,2 @@ | ||
!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";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 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 t(e,r,t){return(r=a(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var o={Dark:"dark",Light:"light"},l={Disabled:"disabled",Placeholder:"placeholder",Primary:"primary",Secondary:"secondary",InversePrimary:"inversePrimary",InverseSecondary:"inverseSecondary",Info:"info",Warning:"warning",Error:"error",Success:"success",Link:"link"},i={Default:"default",Hover:"hover",Focus:"focus"},u=r.palette.black,s=r.palette.blue,c=r.palette.gray,n=r.palette.green,d=r.palette.red,g=r.palette.white,f=r.palette.yellow,h={background:t(t(t(t(t(t(t(t({},l.Primary,t(t(t({},i.Default,u),i.Hover,c.dark2),i.Focus,s.dark3)),l.Secondary,t(t(t({},i.Default,c.dark4),i.Hover,c.dark2),i.Focus,s.dark3)),l.InversePrimary,t(t(t({},i.Default,c.light2),i.Hover,c.light3),i.Focus,s.light2)),l.Info,t(t(t({},i.Default,s.dark3),i.Hover,s.dark3),i.Focus,s.dark3)),l.Warning,t(t(t({},i.Default,f.dark3),i.Hover,f.dark3),i.Focus,f.dark3)),l.Success,t(t(t({},i.Default,n.dark3),i.Hover,n.dark3),i.Focus,n.dark3)),l.Error,t(t(t({},i.Default,d.dark3),i.Hover,d.dark3),i.Focus,d.dark3)),l.Disabled,t(t(t({},i.Default,c.dark3),i.Hover,c.dark3),i.Focus,c.dark3)),border:t(t(t(t(t({},l.Primary,t(t(t({},i.Default,c.base),i.Hover,c.base),i.Focus,s.light1)),l.Secondary,t(t(t({},i.Default,c.dark2),i.Hover,c.dark2),i.Focus,s.light1)),l.Success,t(t(t({},i.Default,n.dark1),i.Hover,n.dark1),i.Focus,s.light1)),l.Error,t(t(t({},i.Default,d.light1),i.Hover,d.light1),i.Focus,s.light1)),l.Disabled,t(t(t({},i.Default,c.dark2),i.Hover,c.dark2),i.Focus,c.dark2)),icon:t(t(t(t(t(t(t(t({},l.Primary,t(t(t({},i.Default,c.light1),i.Hover,c.light3),i.Focus,s.light3)),l.Secondary,t(t(t({},i.Default,c.base),i.Hover,c.light3),i.Focus,s.light3)),l.InversePrimary,t(t(t({},i.Default,g),i.Hover,u),i.Focus,s.dark2)),l.Info,t(t(t({},i.Default,s.light1),i.Hover,s.light1),i.Focus,s.light1)),l.Warning,t(t(t({},i.Default,f.base),i.Hover,f.base),i.Focus,f.base)),l.Success,t(t(t({},i.Default,n.base),i.Hover,n.base),i.Focus,n.base)),l.Error,t(t(t({},i.Default,d.light1),i.Hover,d.light1),i.Focus,d.light1)),l.Disabled,t(t(t({},i.Default,c.dark1),i.Hover,c.dark1),i.Focus,c.dark1)),text:t(t(t(t(t(t(t(t({},l.Primary,t(t(t({},i.Default,c.light2),i.Hover,c.light2),i.Focus,s.light3)),l.Placeholder,t(t(t({},i.Default,c.dark1),i.Hover,c.dark1),i.Focus,c.dark1)),l.Secondary,t(t(t({},i.Default,c.light1),i.Hover,c.light2),i.Focus,s.light3)),l.InversePrimary,t(t(t({},i.Default,u),i.Hover,u),i.Focus,s.dark2)),l.InverseSecondary,t(t(t({},i.Default,c.dark2),i.Hover,u),i.Focus,s.dark2)),l.Error,t(t(t({},i.Default,d.light1),i.Hover,d.light1),i.Focus,d.light1)),l.Disabled,t(t(t({},i.Default,c.dark1),i.Hover,c.dark1),i.Focus,c.dark1)),l.Link,t(t(t({},i.Default,s.light1),i.Hover,s.light1),i.Focus,s.light1))},v=r.palette.black,k=r.palette.blue,b=r.palette.gray,D=r.palette.green,H=r.palette.red,p=r.palette.white,y=r.palette.yellow,F={background:t(t(t(t(t(t(t(t({},l.Primary,t(t(t({},i.Default,p),i.Hover,b.light2),i.Focus,k.light3)),l.Secondary,t(t(t({},i.Default,b.light3),i.Hover,b.light2),i.Focus,k.light3)),l.InversePrimary,t(t(t({},i.Default,v),i.Hover,b.dark3),i.Focus,k.dark2)),l.Info,t(t(t({},i.Default,k.light3),i.Hover,k.light3),i.Focus,k.light3)),l.Warning,t(t(t({},i.Default,y.light3),i.Hover,y.light3),i.Focus,y.light3)),l.Success,t(t(t({},i.Default,D.light3),i.Hover,D.light3),i.Focus,D.light3)),l.Error,t(t(t({},i.Default,H.light3),i.Hover,H.light3),i.Focus,H.light3)),l.Disabled,t(t(t({},i.Default,b.light2),i.Hover,b.light2),i.Focus,b.light2)),border:t(t(t(t(t({},l.Primary,t(t(t({},i.Default,b.base),i.Hover,b.base),i.Focus,k.light1)),l.Secondary,t(t(t({},i.Default,b.light2),i.Hover,b.light2),i.Focus,k.light1)),l.Success,t(t(t({},i.Default,D.dark1),i.Hover,D.dark1),i.Focus,k.light1)),l.Error,t(t(t({},i.Default,H.base),i.Hover,H.base),i.Focus,k.light1)),l.Disabled,t(t(t({},i.Default,b.light1),i.Hover,b.light1),i.Focus,b.light1)),icon:t(t(t(t(t(t(t(t({},l.Primary,t(t(t({},i.Default,b.dark1),i.Hover,v),i.Focus,k.dark1)),l.Secondary,t(t(t({},i.Default,b.base),i.Hover,v),i.Focus,k.dark1)),l.InversePrimary,t(t(t({},i.Default,p),i.Hover,p),i.Focus,k.light2)),l.Info,t(t(t({},i.Default,k.base),i.Hover,k.base),i.Focus,k.base)),l.Warning,t(t(t({},i.Default,y.dark2),i.Hover,y.dark2),i.Focus,y.dark2)),l.Success,t(t(t({},i.Default,D.dark1),i.Hover,D.dark1),i.Focus,D.dark1)),l.Error,t(t(t({},i.Default,H.base),i.Hover,H.base),i.Focus,H.base)),l.Disabled,t(t(t({},i.Default,b.base),i.Hover,b.base),i.Focus,b.base)),text:t(t(t(t(t(t(t(t({},l.Primary,t(t(t({},i.Default,v),i.Hover,v),i.Focus,k.dark1)),l.Secondary,t(t(t({},i.Default,b.dark1),i.Hover,v),i.Focus,k.dark1)),l.InversePrimary,t(t(t({},i.Default,p),i.Hover,p),i.Focus,k.light2)),l.InverseSecondary,t(t(t({},i.Default,b.light1),i.Hover,p),i.Focus,k.light2)),l.Error,t(t(t({},i.Default,H.base),i.Hover,H.base),i.Focus,H.base)),l.Disabled,t(t(t({},i.Default,b.base),i.Hover,b.base),i.Focus,b.base)),l.Placeholder,t(t(t({},i.Default,b.base),i.Hover,b.base),i.Focus,b.base)),l.Link,t(t(t({},i.Default,k.base),i.Hover,k.base),i.Focus,k.base))},m=t(t({},o.Dark,h),o.Light,F),S=t(t({},o.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)}),o.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)}),P=t(t({},o.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)}),o.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)}),x={Body1:13,Body2:16},I={body1:{fontSize:x.Body1,lineHeight:20},body2:{fontSize:x.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=x,e.Mode=o,e.Size={XSmall:"xsmall",Small:"small",Default:"default",Large:"large"},e.State=i,e.Type={Background:"background",Border:"border",Icon:"icon",Text:"text"},e.Variant=l,e.borderRadius={0:0,50:2,100:4,150:6,200:8,300:12,400:16,500:20,600:24},e.breakpoints={Mobile:320,Tablet:768,Desktop:1024,XLDesktop:1440},e.color=m,e.focusRing=S,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=P,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=I})); | ||
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("@leafygreen-ui/lib"),require("@leafygreen-ui/palette")):"function"==typeof define&&define.amd?define(["exports","@leafygreen-ui/lib","@leafygreen-ui/palette"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self)["@leafygreen-ui/tokens"]={},e["@leafygreen-ui/lib"],e["@leafygreen-ui/palette"])}(this,(function(e,r,a){"use strict";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 l(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 o={Background:"background",Border:"border",Icon:"icon",Text:"text"},i={Disabled:"disabled",Placeholder:"placeholder",Primary:"primary",Secondary:"secondary",InversePrimary:"inversePrimary",InverseSecondary:"inverseSecondary",Info:"info",Warning:"warning",Error:"error",Success:"success",Link:"link"},u={Default:"default",Hover:"hover",Focus:"focus"},s=a.palette.black,c=a.palette.blue,n=a.palette.gray,d=a.palette.green,g=a.palette.red,f=a.palette.white,h=a.palette.yellow,v={background:l(l(l(l(l(l(l(l({},i.Primary,l(l(l({},u.Default,s),u.Hover,n.dark2),u.Focus,c.dark3)),i.Secondary,l(l(l({},u.Default,n.dark4),u.Hover,n.dark2),u.Focus,c.dark3)),i.InversePrimary,l(l(l({},u.Default,n.light2),u.Hover,n.light3),u.Focus,c.light2)),i.Info,l(l(l({},u.Default,c.dark3),u.Hover,c.dark3),u.Focus,c.dark3)),i.Warning,l(l(l({},u.Default,h.dark3),u.Hover,h.dark3),u.Focus,h.dark3)),i.Success,l(l(l({},u.Default,d.dark3),u.Hover,d.dark3),u.Focus,d.dark3)),i.Error,l(l(l({},u.Default,g.dark3),u.Hover,g.dark3),u.Focus,g.dark3)),i.Disabled,l(l(l({},u.Default,n.dark3),u.Hover,n.dark3),u.Focus,n.dark3)),border:l(l(l(l(l({},i.Primary,l(l(l({},u.Default,n.base),u.Hover,n.base),u.Focus,c.light1)),i.Secondary,l(l(l({},u.Default,n.dark2),u.Hover,n.dark2),u.Focus,c.light1)),i.Success,l(l(l({},u.Default,d.dark1),u.Hover,d.dark1),u.Focus,c.light1)),i.Error,l(l(l({},u.Default,g.light1),u.Hover,g.light1),u.Focus,c.light1)),i.Disabled,l(l(l({},u.Default,n.dark2),u.Hover,n.dark2),u.Focus,n.dark2)),icon:l(l(l(l(l(l(l(l({},i.Primary,l(l(l({},u.Default,n.light1),u.Hover,n.light3),u.Focus,c.light3)),i.Secondary,l(l(l({},u.Default,n.base),u.Hover,n.light3),u.Focus,c.light3)),i.InversePrimary,l(l(l({},u.Default,f),u.Hover,s),u.Focus,c.dark2)),i.Info,l(l(l({},u.Default,c.light1),u.Hover,c.light1),u.Focus,c.light1)),i.Warning,l(l(l({},u.Default,h.base),u.Hover,h.base),u.Focus,h.base)),i.Success,l(l(l({},u.Default,d.base),u.Hover,d.base),u.Focus,d.base)),i.Error,l(l(l({},u.Default,g.light1),u.Hover,g.light1),u.Focus,g.light1)),i.Disabled,l(l(l({},u.Default,n.dark1),u.Hover,n.dark1),u.Focus,n.dark1)),text:l(l(l(l(l(l(l(l({},i.Primary,l(l(l({},u.Default,n.light2),u.Hover,n.light2),u.Focus,c.light3)),i.Placeholder,l(l(l({},u.Default,n.dark1),u.Hover,n.dark1),u.Focus,n.dark1)),i.Secondary,l(l(l({},u.Default,n.light1),u.Hover,n.light2),u.Focus,c.light3)),i.InversePrimary,l(l(l({},u.Default,s),u.Hover,s),u.Focus,c.dark2)),i.InverseSecondary,l(l(l({},u.Default,n.dark2),u.Hover,s),u.Focus,c.dark2)),i.Error,l(l(l({},u.Default,g.light1),u.Hover,g.light1),u.Focus,g.light1)),i.Disabled,l(l(l({},u.Default,n.dark1),u.Hover,n.dark1),u.Focus,n.dark1)),i.Link,l(l(l({},u.Default,c.light1),u.Hover,c.light1),u.Focus,c.light1))},b=a.palette.black,k=a.palette.blue,D=a.palette.gray,y=a.palette.green,H=a.palette.red,p=a.palette.white,F=a.palette.yellow,m={background:l(l(l(l(l(l(l(l({},i.Primary,l(l(l({},u.Default,p),u.Hover,D.light2),u.Focus,k.light3)),i.Secondary,l(l(l({},u.Default,D.light3),u.Hover,D.light2),u.Focus,k.light3)),i.InversePrimary,l(l(l({},u.Default,b),u.Hover,D.dark3),u.Focus,k.dark2)),i.Info,l(l(l({},u.Default,k.light3),u.Hover,k.light3),u.Focus,k.light3)),i.Warning,l(l(l({},u.Default,F.light3),u.Hover,F.light3),u.Focus,F.light3)),i.Success,l(l(l({},u.Default,y.light3),u.Hover,y.light3),u.Focus,y.light3)),i.Error,l(l(l({},u.Default,H.light3),u.Hover,H.light3),u.Focus,H.light3)),i.Disabled,l(l(l({},u.Default,D.light2),u.Hover,D.light2),u.Focus,D.light2)),border:l(l(l(l(l({},i.Primary,l(l(l({},u.Default,D.base),u.Hover,D.base),u.Focus,k.light1)),i.Secondary,l(l(l({},u.Default,D.light2),u.Hover,D.light2),u.Focus,k.light1)),i.Success,l(l(l({},u.Default,y.dark1),u.Hover,y.dark1),u.Focus,k.light1)),i.Error,l(l(l({},u.Default,H.base),u.Hover,H.base),u.Focus,k.light1)),i.Disabled,l(l(l({},u.Default,D.light1),u.Hover,D.light1),u.Focus,D.light1)),icon:l(l(l(l(l(l(l(l({},i.Primary,l(l(l({},u.Default,D.dark1),u.Hover,b),u.Focus,k.dark1)),i.Secondary,l(l(l({},u.Default,D.base),u.Hover,b),u.Focus,k.dark1)),i.InversePrimary,l(l(l({},u.Default,p),u.Hover,p),u.Focus,k.light2)),i.Info,l(l(l({},u.Default,k.base),u.Hover,k.base),u.Focus,k.base)),i.Warning,l(l(l({},u.Default,F.dark2),u.Hover,F.dark2),u.Focus,F.dark2)),i.Success,l(l(l({},u.Default,y.dark1),u.Hover,y.dark1),u.Focus,y.dark1)),i.Error,l(l(l({},u.Default,H.base),u.Hover,H.base),u.Focus,H.base)),i.Disabled,l(l(l({},u.Default,D.base),u.Hover,D.base),u.Focus,D.base)),text:l(l(l(l(l(l(l(l({},i.Primary,l(l(l({},u.Default,b),u.Hover,b),u.Focus,k.dark1)),i.Secondary,l(l(l({},u.Default,D.dark1),u.Hover,b),u.Focus,k.dark1)),i.InversePrimary,l(l(l({},u.Default,p),u.Hover,p),u.Focus,k.light2)),i.InverseSecondary,l(l(l({},u.Default,D.light1),u.Hover,p),u.Focus,k.light2)),i.Error,l(l(l({},u.Default,H.base),u.Hover,H.base),u.Focus,H.base)),i.Disabled,l(l(l({},u.Default,D.base),u.Hover,D.base),u.Focus,D.base)),i.Placeholder,l(l(l({},u.Default,D.base),u.Hover,D.base),u.Focus,D.base)),i.Link,l(l(l({},u.Default,k.base),u.Hover,k.base),u.Focus,k.base))},S=l(l({},r.Theme.Dark,v),r.Theme.Light,m),P={Dark:"dark",Light:"light"},x=l(l({},P.Light,{default:"0 0 0 2px ".concat(a.palette.white,", 0 0 0 4px ").concat(a.palette.blue.light1),input:"0 0 0 3px ".concat(a.palette.blue.light1)}),P.Dark,{default:"0 0 0 2px ".concat(a.palette.black,", 0 0 0 4px ").concat(a.palette.blue.light1),input:"0 0 0 3px ".concat(a.palette.blue.light1)}),I=l(l({},P.Light,{gray:"0 0 0 3px ".concat(a.palette.gray.light2),green:"0 0 0 3px ".concat(a.palette.green.light2),red:"0 0 0 3px ".concat(a.palette.red.light2)}),P.Dark,{gray:"0 0 0 3px ".concat(a.palette.gray.dark2),green:"0 0 0 3px ".concat(a.palette.green.dark3),red:"0 0 0 3px ".concat(a.palette.yellow.dark3)}),w={Body1:13,Body2:16},E={body1:{fontSize:w.Body1,lineHeight:20},body2:{fontSize:w.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=w,e.InteractionState=u,e.Mode=P,e.Property=o,e.Size={XSmall:"xsmall",Small:"small",Default:"default",Large:"large"},e.State=u,e.Type=o,e.Variant=i,e.borderRadius={0:0,50:2,100:4,150:6,200:8,300:12,400:16,500:20,600:24},e.breakpoints={Mobile:320,Tablet:768,Desktop:1024,XLDesktop:1440},e.color=S,e.focusRing=x,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=I,e.spacing={0:0,25:1,50:2,100:4,150:6,200:8,300:12,400:16,500:20,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=E})); | ||
//# sourceMappingURL=index.js.map |
@@ -0,1 +1,2 @@ | ||
/** @deprecated prefer Theme */ | ||
declare const Mode: { | ||
@@ -5,4 +6,5 @@ readonly Dark: "dark"; | ||
}; | ||
/** @deprecated prefer Theme */ | ||
type Mode = (typeof Mode)[keyof typeof Mode]; | ||
export { Mode }; | ||
//# sourceMappingURL=mode.d.ts.map |
@@ -10,2 +10,3 @@ declare const spacing: { | ||
readonly 400: 16; | ||
readonly 500: 20; | ||
readonly 600: 24; | ||
@@ -12,0 +13,0 @@ readonly 800: 32; |
{ | ||
"name": "@leafygreen-ui/tokens", | ||
"version": "2.7.0", | ||
"version": "2.8.0", | ||
"description": "leafyGreen UI Kit Tokens", | ||
@@ -25,3 +25,3 @@ "main": "./dist/index.js", | ||
"dependencies": { | ||
"@leafygreen-ui/lib": "^13.4.0", | ||
"@leafygreen-ui/lib": "^13.5.0", | ||
"@leafygreen-ui/palette": "^4.0.9" | ||
@@ -28,0 +28,0 @@ }, |
@@ -1,4 +0,4 @@ | ||
import { Mode } from '../mode'; | ||
import { Theme } from '@leafygreen-ui/lib'; | ||
import { ModeColorRecord } from './color.types'; | ||
import { PropertyColorRecord } from './color.types'; | ||
import { darkModeColors } from './darkModeColors'; | ||
@@ -8,4 +8,4 @@ import { lightModeColors } from './lightModeColors'; | ||
export const color = { | ||
[Mode.Dark]: darkModeColors, | ||
[Mode.Light]: lightModeColors, | ||
} as const satisfies Record<Mode, ModeColorRecord>; | ||
[Theme.Dark]: darkModeColors, | ||
[Theme.Light]: lightModeColors, | ||
} as const satisfies Record<Theme, PropertyColorRecord>; |
@@ -1,2 +0,5 @@ | ||
const Type = { | ||
/** | ||
* The element property a color token applies to | ||
*/ | ||
const Property = { | ||
Background: 'background', | ||
@@ -7,4 +10,7 @@ Border: 'border', | ||
} as const; | ||
type Type = (typeof Type)[keyof typeof Type]; | ||
type Property = (typeof Property)[keyof typeof Property]; | ||
/** | ||
* The context variant in which a color token should be applied | ||
*/ | ||
const Variant = { | ||
@@ -25,3 +31,6 @@ Disabled: 'disabled', | ||
const State = { | ||
/** | ||
* The interaction state in which a color token should be applied | ||
*/ | ||
const InteractionState = { | ||
Default: 'default', | ||
@@ -31,9 +40,19 @@ Hover: 'hover', | ||
} as const; | ||
type State = (typeof State)[keyof typeof State]; | ||
type InteractionState = | ||
(typeof InteractionState)[keyof typeof InteractionState]; | ||
/** | ||
* A partial Record, | ||
* mapping a subset of {@link Variant} keys | ||
* to a Record of {@link InteractionState} color tokens | ||
*/ | ||
export type VariantColorRecord = Partial< | ||
Record<Variant, Record<State, string>> | ||
Record<Variant, Record<InteractionState, string>> | ||
>; | ||
export type ModeColorRecord = Record<Type, VariantColorRecord>; | ||
export { State, Type, Variant }; | ||
/** | ||
* A Record mapping {@link Property} keys to {@link VariantColorRecord} | ||
*/ | ||
export type PropertyColorRecord = Record<Property, VariantColorRecord>; | ||
export { InteractionState, Property, Variant }; |
import { palette } from '@leafygreen-ui/palette'; | ||
import { | ||
ModeColorRecord, | ||
State, | ||
InteractionState, | ||
type PropertyColorRecord, | ||
Variant, | ||
VariantColorRecord, | ||
type VariantColorRecord, | ||
} from './color.types'; | ||
@@ -14,40 +14,40 @@ | ||
[Variant.Primary]: { | ||
[State.Default]: black, | ||
[State.Hover]: gray.dark2, | ||
[State.Focus]: blue.dark3, | ||
[InteractionState.Default]: black, | ||
[InteractionState.Hover]: gray.dark2, | ||
[InteractionState.Focus]: blue.dark3, | ||
}, | ||
[Variant.Secondary]: { | ||
[State.Default]: gray.dark4, | ||
[State.Hover]: gray.dark2, | ||
[State.Focus]: blue.dark3, | ||
[InteractionState.Default]: gray.dark4, | ||
[InteractionState.Hover]: gray.dark2, | ||
[InteractionState.Focus]: blue.dark3, | ||
}, | ||
[Variant.InversePrimary]: { | ||
[State.Default]: gray.light2, | ||
[State.Hover]: gray.light3, | ||
[State.Focus]: blue.light2, | ||
[InteractionState.Default]: gray.light2, | ||
[InteractionState.Hover]: gray.light3, | ||
[InteractionState.Focus]: blue.light2, | ||
}, | ||
[Variant.Info]: { | ||
[State.Default]: blue.dark3, | ||
[State.Hover]: blue.dark3, | ||
[State.Focus]: blue.dark3, | ||
[InteractionState.Default]: blue.dark3, | ||
[InteractionState.Hover]: blue.dark3, | ||
[InteractionState.Focus]: blue.dark3, | ||
}, | ||
[Variant.Warning]: { | ||
[State.Default]: yellow.dark3, | ||
[State.Hover]: yellow.dark3, | ||
[State.Focus]: yellow.dark3, | ||
[InteractionState.Default]: yellow.dark3, | ||
[InteractionState.Hover]: yellow.dark3, | ||
[InteractionState.Focus]: yellow.dark3, | ||
}, | ||
[Variant.Success]: { | ||
[State.Default]: green.dark3, | ||
[State.Hover]: green.dark3, | ||
[State.Focus]: green.dark3, | ||
[InteractionState.Default]: green.dark3, | ||
[InteractionState.Hover]: green.dark3, | ||
[InteractionState.Focus]: green.dark3, | ||
}, | ||
[Variant.Error]: { | ||
[State.Default]: red.dark3, | ||
[State.Hover]: red.dark3, | ||
[State.Focus]: red.dark3, | ||
[InteractionState.Default]: red.dark3, | ||
[InteractionState.Hover]: red.dark3, | ||
[InteractionState.Focus]: red.dark3, | ||
}, | ||
[Variant.Disabled]: { | ||
[State.Default]: gray.dark3, | ||
[State.Hover]: gray.dark3, | ||
[State.Focus]: gray.dark3, | ||
[InteractionState.Default]: gray.dark3, | ||
[InteractionState.Hover]: gray.dark3, | ||
[InteractionState.Focus]: gray.dark3, | ||
}, | ||
@@ -58,25 +58,25 @@ } as const satisfies VariantColorRecord; | ||
[Variant.Primary]: { | ||
[State.Default]: gray.base, | ||
[State.Hover]: gray.base, | ||
[State.Focus]: blue.light1, | ||
[InteractionState.Default]: gray.base, | ||
[InteractionState.Hover]: gray.base, | ||
[InteractionState.Focus]: blue.light1, | ||
}, | ||
[Variant.Secondary]: { | ||
[State.Default]: gray.dark2, | ||
[State.Hover]: gray.dark2, | ||
[State.Focus]: blue.light1, | ||
[InteractionState.Default]: gray.dark2, | ||
[InteractionState.Hover]: gray.dark2, | ||
[InteractionState.Focus]: blue.light1, | ||
}, | ||
[Variant.Success]: { | ||
[State.Default]: green.dark1, | ||
[State.Hover]: green.dark1, | ||
[State.Focus]: blue.light1, | ||
[InteractionState.Default]: green.dark1, | ||
[InteractionState.Hover]: green.dark1, | ||
[InteractionState.Focus]: blue.light1, | ||
}, | ||
[Variant.Error]: { | ||
[State.Default]: red.light1, | ||
[State.Hover]: red.light1, | ||
[State.Focus]: blue.light1, | ||
[InteractionState.Default]: red.light1, | ||
[InteractionState.Hover]: red.light1, | ||
[InteractionState.Focus]: blue.light1, | ||
}, | ||
[Variant.Disabled]: { | ||
[State.Default]: gray.dark2, | ||
[State.Hover]: gray.dark2, | ||
[State.Focus]: gray.dark2, | ||
[InteractionState.Default]: gray.dark2, | ||
[InteractionState.Hover]: gray.dark2, | ||
[InteractionState.Focus]: gray.dark2, | ||
}, | ||
@@ -87,40 +87,40 @@ } as const satisfies VariantColorRecord; | ||
[Variant.Primary]: { | ||
[State.Default]: gray.light1, | ||
[State.Hover]: gray.light3, | ||
[State.Focus]: blue.light3, | ||
[InteractionState.Default]: gray.light1, | ||
[InteractionState.Hover]: gray.light3, | ||
[InteractionState.Focus]: blue.light3, | ||
}, | ||
[Variant.Secondary]: { | ||
[State.Default]: gray.base, | ||
[State.Hover]: gray.light3, | ||
[State.Focus]: blue.light3, | ||
[InteractionState.Default]: gray.base, | ||
[InteractionState.Hover]: gray.light3, | ||
[InteractionState.Focus]: blue.light3, | ||
}, | ||
[Variant.InversePrimary]: { | ||
[State.Default]: white, | ||
[State.Hover]: black, | ||
[State.Focus]: blue.dark2, | ||
[InteractionState.Default]: white, | ||
[InteractionState.Hover]: black, | ||
[InteractionState.Focus]: blue.dark2, | ||
}, | ||
[Variant.Info]: { | ||
[State.Default]: blue.light1, | ||
[State.Hover]: blue.light1, | ||
[State.Focus]: blue.light1, | ||
[InteractionState.Default]: blue.light1, | ||
[InteractionState.Hover]: blue.light1, | ||
[InteractionState.Focus]: blue.light1, | ||
}, | ||
[Variant.Warning]: { | ||
[State.Default]: yellow.base, | ||
[State.Hover]: yellow.base, | ||
[State.Focus]: yellow.base, | ||
[InteractionState.Default]: yellow.base, | ||
[InteractionState.Hover]: yellow.base, | ||
[InteractionState.Focus]: yellow.base, | ||
}, | ||
[Variant.Success]: { | ||
[State.Default]: green.base, | ||
[State.Hover]: green.base, | ||
[State.Focus]: green.base, | ||
[InteractionState.Default]: green.base, | ||
[InteractionState.Hover]: green.base, | ||
[InteractionState.Focus]: green.base, | ||
}, | ||
[Variant.Error]: { | ||
[State.Default]: red.light1, | ||
[State.Hover]: red.light1, | ||
[State.Focus]: red.light1, | ||
[InteractionState.Default]: red.light1, | ||
[InteractionState.Hover]: red.light1, | ||
[InteractionState.Focus]: red.light1, | ||
}, | ||
[Variant.Disabled]: { | ||
[State.Default]: gray.dark1, | ||
[State.Hover]: gray.dark1, | ||
[State.Focus]: gray.dark1, | ||
[InteractionState.Default]: gray.dark1, | ||
[InteractionState.Hover]: gray.dark1, | ||
[InteractionState.Focus]: gray.dark1, | ||
}, | ||
@@ -131,40 +131,40 @@ } as const satisfies VariantColorRecord; | ||
[Variant.Primary]: { | ||
[State.Default]: gray.light2, | ||
[State.Hover]: gray.light2, | ||
[State.Focus]: blue.light3, | ||
[InteractionState.Default]: gray.light2, | ||
[InteractionState.Hover]: gray.light2, | ||
[InteractionState.Focus]: blue.light3, | ||
}, | ||
[Variant.Placeholder]: { | ||
[State.Default]: gray.dark1, | ||
[State.Hover]: gray.dark1, | ||
[State.Focus]: gray.dark1, | ||
[InteractionState.Default]: gray.dark1, | ||
[InteractionState.Hover]: gray.dark1, | ||
[InteractionState.Focus]: gray.dark1, | ||
}, | ||
[Variant.Secondary]: { | ||
[State.Default]: gray.light1, | ||
[State.Hover]: gray.light2, | ||
[State.Focus]: blue.light3, | ||
[InteractionState.Default]: gray.light1, | ||
[InteractionState.Hover]: gray.light2, | ||
[InteractionState.Focus]: blue.light3, | ||
}, | ||
[Variant.InversePrimary]: { | ||
[State.Default]: black, | ||
[State.Hover]: black, | ||
[State.Focus]: blue.dark2, | ||
[InteractionState.Default]: black, | ||
[InteractionState.Hover]: black, | ||
[InteractionState.Focus]: blue.dark2, | ||
}, | ||
[Variant.InverseSecondary]: { | ||
[State.Default]: gray.dark2, | ||
[State.Hover]: black, | ||
[State.Focus]: blue.dark2, | ||
[InteractionState.Default]: gray.dark2, | ||
[InteractionState.Hover]: black, | ||
[InteractionState.Focus]: blue.dark2, | ||
}, | ||
[Variant.Error]: { | ||
[State.Default]: red.light1, | ||
[State.Hover]: red.light1, | ||
[State.Focus]: red.light1, | ||
[InteractionState.Default]: red.light1, | ||
[InteractionState.Hover]: red.light1, | ||
[InteractionState.Focus]: red.light1, | ||
}, | ||
[Variant.Disabled]: { | ||
[State.Default]: gray.dark1, | ||
[State.Hover]: gray.dark1, | ||
[State.Focus]: gray.dark1, | ||
[InteractionState.Default]: gray.dark1, | ||
[InteractionState.Hover]: gray.dark1, | ||
[InteractionState.Focus]: gray.dark1, | ||
}, | ||
[Variant.Link]: { | ||
[State.Default]: blue.light1, | ||
[State.Hover]: blue.light1, | ||
[State.Focus]: blue.light1, | ||
[InteractionState.Default]: blue.light1, | ||
[InteractionState.Hover]: blue.light1, | ||
[InteractionState.Focus]: blue.light1, | ||
}, | ||
@@ -178,2 +178,2 @@ } as const satisfies VariantColorRecord; | ||
text: darkModeTextColors, | ||
} as const satisfies ModeColorRecord; | ||
} as const satisfies PropertyColorRecord; |
export { color } from './color'; | ||
export { State, Type, Variant } from './color.types'; | ||
export { InteractionState, Property, Variant } from './color.types'; |
import { palette } from '@leafygreen-ui/palette'; | ||
import { | ||
ModeColorRecord, | ||
State, | ||
InteractionState, | ||
type PropertyColorRecord, | ||
Variant, | ||
VariantColorRecord, | ||
type VariantColorRecord, | ||
} from './color.types'; | ||
@@ -14,40 +14,40 @@ | ||
[Variant.Primary]: { | ||
[State.Default]: white, | ||
[State.Hover]: gray.light2, | ||
[State.Focus]: blue.light3, | ||
[InteractionState.Default]: white, | ||
[InteractionState.Hover]: gray.light2, | ||
[InteractionState.Focus]: blue.light3, | ||
}, | ||
[Variant.Secondary]: { | ||
[State.Default]: gray.light3, | ||
[State.Hover]: gray.light2, | ||
[State.Focus]: blue.light3, | ||
[InteractionState.Default]: gray.light3, | ||
[InteractionState.Hover]: gray.light2, | ||
[InteractionState.Focus]: blue.light3, | ||
}, | ||
[Variant.InversePrimary]: { | ||
[State.Default]: black, | ||
[State.Hover]: gray.dark3, | ||
[State.Focus]: blue.dark2, | ||
[InteractionState.Default]: black, | ||
[InteractionState.Hover]: gray.dark3, | ||
[InteractionState.Focus]: blue.dark2, | ||
}, | ||
[Variant.Info]: { | ||
[State.Default]: blue.light3, | ||
[State.Hover]: blue.light3, | ||
[State.Focus]: blue.light3, | ||
[InteractionState.Default]: blue.light3, | ||
[InteractionState.Hover]: blue.light3, | ||
[InteractionState.Focus]: blue.light3, | ||
}, | ||
[Variant.Warning]: { | ||
[State.Default]: yellow.light3, | ||
[State.Hover]: yellow.light3, | ||
[State.Focus]: yellow.light3, | ||
[InteractionState.Default]: yellow.light3, | ||
[InteractionState.Hover]: yellow.light3, | ||
[InteractionState.Focus]: yellow.light3, | ||
}, | ||
[Variant.Success]: { | ||
[State.Default]: green.light3, | ||
[State.Hover]: green.light3, | ||
[State.Focus]: green.light3, | ||
[InteractionState.Default]: green.light3, | ||
[InteractionState.Hover]: green.light3, | ||
[InteractionState.Focus]: green.light3, | ||
}, | ||
[Variant.Error]: { | ||
[State.Default]: red.light3, | ||
[State.Hover]: red.light3, | ||
[State.Focus]: red.light3, | ||
[InteractionState.Default]: red.light3, | ||
[InteractionState.Hover]: red.light3, | ||
[InteractionState.Focus]: red.light3, | ||
}, | ||
[Variant.Disabled]: { | ||
[State.Default]: gray.light2, | ||
[State.Hover]: gray.light2, | ||
[State.Focus]: gray.light2, | ||
[InteractionState.Default]: gray.light2, | ||
[InteractionState.Hover]: gray.light2, | ||
[InteractionState.Focus]: gray.light2, | ||
}, | ||
@@ -58,25 +58,25 @@ } as const satisfies VariantColorRecord; | ||
[Variant.Primary]: { | ||
[State.Default]: gray.base, | ||
[State.Hover]: gray.base, | ||
[State.Focus]: blue.light1, | ||
[InteractionState.Default]: gray.base, | ||
[InteractionState.Hover]: gray.base, | ||
[InteractionState.Focus]: blue.light1, | ||
}, | ||
[Variant.Secondary]: { | ||
[State.Default]: gray.light2, | ||
[State.Hover]: gray.light2, | ||
[State.Focus]: blue.light1, | ||
[InteractionState.Default]: gray.light2, | ||
[InteractionState.Hover]: gray.light2, | ||
[InteractionState.Focus]: blue.light1, | ||
}, | ||
[Variant.Success]: { | ||
[State.Default]: green.dark1, | ||
[State.Hover]: green.dark1, | ||
[State.Focus]: blue.light1, | ||
[InteractionState.Default]: green.dark1, | ||
[InteractionState.Hover]: green.dark1, | ||
[InteractionState.Focus]: blue.light1, | ||
}, | ||
[Variant.Error]: { | ||
[State.Default]: red.base, | ||
[State.Hover]: red.base, | ||
[State.Focus]: blue.light1, | ||
[InteractionState.Default]: red.base, | ||
[InteractionState.Hover]: red.base, | ||
[InteractionState.Focus]: blue.light1, | ||
}, | ||
[Variant.Disabled]: { | ||
[State.Default]: gray.light1, | ||
[State.Hover]: gray.light1, | ||
[State.Focus]: gray.light1, | ||
[InteractionState.Default]: gray.light1, | ||
[InteractionState.Hover]: gray.light1, | ||
[InteractionState.Focus]: gray.light1, | ||
}, | ||
@@ -87,40 +87,40 @@ } as const satisfies VariantColorRecord; | ||
[Variant.Primary]: { | ||
[State.Default]: gray.dark1, | ||
[State.Hover]: black, | ||
[State.Focus]: blue.dark1, | ||
[InteractionState.Default]: gray.dark1, | ||
[InteractionState.Hover]: black, | ||
[InteractionState.Focus]: blue.dark1, | ||
}, | ||
[Variant.Secondary]: { | ||
[State.Default]: gray.base, | ||
[State.Hover]: black, | ||
[State.Focus]: blue.dark1, | ||
[InteractionState.Default]: gray.base, | ||
[InteractionState.Hover]: black, | ||
[InteractionState.Focus]: blue.dark1, | ||
}, | ||
[Variant.InversePrimary]: { | ||
[State.Default]: white, | ||
[State.Hover]: white, | ||
[State.Focus]: blue.light2, | ||
[InteractionState.Default]: white, | ||
[InteractionState.Hover]: white, | ||
[InteractionState.Focus]: blue.light2, | ||
}, | ||
[Variant.Info]: { | ||
[State.Default]: blue.base, | ||
[State.Hover]: blue.base, | ||
[State.Focus]: blue.base, | ||
[InteractionState.Default]: blue.base, | ||
[InteractionState.Hover]: blue.base, | ||
[InteractionState.Focus]: blue.base, | ||
}, | ||
[Variant.Warning]: { | ||
[State.Default]: yellow.dark2, | ||
[State.Hover]: yellow.dark2, | ||
[State.Focus]: yellow.dark2, | ||
[InteractionState.Default]: yellow.dark2, | ||
[InteractionState.Hover]: yellow.dark2, | ||
[InteractionState.Focus]: yellow.dark2, | ||
}, | ||
[Variant.Success]: { | ||
[State.Default]: green.dark1, | ||
[State.Hover]: green.dark1, | ||
[State.Focus]: green.dark1, | ||
[InteractionState.Default]: green.dark1, | ||
[InteractionState.Hover]: green.dark1, | ||
[InteractionState.Focus]: green.dark1, | ||
}, | ||
[Variant.Error]: { | ||
[State.Default]: red.base, | ||
[State.Hover]: red.base, | ||
[State.Focus]: red.base, | ||
[InteractionState.Default]: red.base, | ||
[InteractionState.Hover]: red.base, | ||
[InteractionState.Focus]: red.base, | ||
}, | ||
[Variant.Disabled]: { | ||
[State.Default]: gray.base, | ||
[State.Hover]: gray.base, | ||
[State.Focus]: gray.base, | ||
[InteractionState.Default]: gray.base, | ||
[InteractionState.Hover]: gray.base, | ||
[InteractionState.Focus]: gray.base, | ||
}, | ||
@@ -131,40 +131,40 @@ } as const satisfies VariantColorRecord; | ||
[Variant.Primary]: { | ||
[State.Default]: black, | ||
[State.Hover]: black, | ||
[State.Focus]: blue.dark1, | ||
[InteractionState.Default]: black, | ||
[InteractionState.Hover]: black, | ||
[InteractionState.Focus]: blue.dark1, | ||
}, | ||
[Variant.Secondary]: { | ||
[State.Default]: gray.dark1, | ||
[State.Hover]: black, | ||
[State.Focus]: blue.dark1, | ||
[InteractionState.Default]: gray.dark1, | ||
[InteractionState.Hover]: black, | ||
[InteractionState.Focus]: blue.dark1, | ||
}, | ||
[Variant.InversePrimary]: { | ||
[State.Default]: white, | ||
[State.Hover]: white, | ||
[State.Focus]: blue.light2, | ||
[InteractionState.Default]: white, | ||
[InteractionState.Hover]: white, | ||
[InteractionState.Focus]: blue.light2, | ||
}, | ||
[Variant.InverseSecondary]: { | ||
[State.Default]: gray.light1, | ||
[State.Hover]: white, | ||
[State.Focus]: blue.light2, | ||
[InteractionState.Default]: gray.light1, | ||
[InteractionState.Hover]: white, | ||
[InteractionState.Focus]: blue.light2, | ||
}, | ||
[Variant.Error]: { | ||
[State.Default]: red.base, | ||
[State.Hover]: red.base, | ||
[State.Focus]: red.base, | ||
[InteractionState.Default]: red.base, | ||
[InteractionState.Hover]: red.base, | ||
[InteractionState.Focus]: red.base, | ||
}, | ||
[Variant.Disabled]: { | ||
[State.Default]: gray.base, | ||
[State.Hover]: gray.base, | ||
[State.Focus]: gray.base, | ||
[InteractionState.Default]: gray.base, | ||
[InteractionState.Hover]: gray.base, | ||
[InteractionState.Focus]: gray.base, | ||
}, | ||
[Variant.Placeholder]: { | ||
[State.Default]: gray.base, | ||
[State.Hover]: gray.base, | ||
[State.Focus]: gray.base, | ||
[InteractionState.Default]: gray.base, | ||
[InteractionState.Hover]: gray.base, | ||
[InteractionState.Focus]: gray.base, | ||
}, | ||
[Variant.Link]: { | ||
[State.Default]: blue.base, | ||
[State.Hover]: blue.base, | ||
[State.Focus]: blue.base, | ||
[InteractionState.Default]: blue.base, | ||
[InteractionState.Hover]: blue.base, | ||
[InteractionState.Focus]: blue.base, | ||
}, | ||
@@ -178,2 +178,2 @@ } as const satisfies VariantColorRecord; | ||
text: lightModeTextColors, | ||
} as const satisfies ModeColorRecord; | ||
} as const satisfies PropertyColorRecord; |
export { default as borderRadius } from './borderRadius'; | ||
export { default as breakpoints } from './breakpoints'; | ||
export { color, State, Type, Variant } from './color'; | ||
export { color, InteractionState, Property, Variant } from './color'; | ||
export { | ||
/** @deprecated - Prefer {@link InteractionState} */ | ||
InteractionState as State, // Re-exporting for API consistency | ||
/** @deprecated - Prefer {@link Property} */ | ||
Property as Type, // Re-exporting for API consistency | ||
} from './color'; | ||
export { default as focusRing } from './focusRing'; | ||
@@ -5,0 +11,0 @@ export { default as fontFamilies } from './fontFamilies'; |
@@ -0,1 +1,2 @@ | ||
/** @deprecated prefer Theme */ | ||
const Mode = { | ||
@@ -6,4 +7,5 @@ Dark: 'dark', | ||
/** @deprecated prefer Theme */ | ||
type Mode = (typeof Mode)[keyof typeof Mode]; | ||
export { Mode }; |
@@ -10,2 +10,3 @@ const spacing = { | ||
400: 16, | ||
500: 20, | ||
600: 24, | ||
@@ -12,0 +13,0 @@ 800: 32, |
@@ -1,1 +0,1 @@ | ||
import e from"react";import t from"lodash/startCase";import{css as a}from"@leafygreen-ui/emotion";import{Theme as n}from"@leafygreen-ui/lib";import{palette as r}from"@leafygreen-ui/palette";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 n=a.call(e,t);if("object"!=typeof n)return n;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}function c(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var o,d,s,u,g,h,m,p,b,k,f,x,y,v,E,w,N,S,j,z,O,H={Dark:"dark",Light:"light"},D=8,M="disabled",P="placeholder",C="primary",L="secondary",T="inversePrimary",A="inverseSecondary",F="info",I="warning",B="error",R="success",V="link",q="default",G="hover",J="focus",K=r.black,Q=r.blue,U=r.gray,W=r.green,X=r.red,Y=r.white,Z=r.yellow,$={background:i(i(i(i(i(i(i(i({},C,i(i(i({},q,K),G,U.dark2),J,Q.dark3)),L,i(i(i({},q,U.dark4),G,U.dark2),J,Q.dark3)),T,i(i(i({},q,U.light2),G,U.light3),J,Q.light2)),F,i(i(i({},q,Q.dark3),G,Q.dark3),J,Q.dark3)),I,i(i(i({},q,Z.dark3),G,Z.dark3),J,Z.dark3)),R,i(i(i({},q,W.dark3),G,W.dark3),J,W.dark3)),B,i(i(i({},q,X.dark3),G,X.dark3),J,X.dark3)),M,i(i(i({},q,U.dark3),G,U.dark3),J,U.dark3)),border:i(i(i(i(i({},C,i(i(i({},q,U.base),G,U.base),J,Q.light1)),L,i(i(i({},q,U.dark2),G,U.dark2),J,Q.light1)),R,i(i(i({},q,W.dark1),G,W.dark1),J,Q.light1)),B,i(i(i({},q,X.light1),G,X.light1),J,Q.light1)),M,i(i(i({},q,U.dark2),G,U.dark2),J,U.dark2)),icon:i(i(i(i(i(i(i(i({},C,i(i(i({},q,U.light1),G,U.light3),J,Q.light3)),L,i(i(i({},q,U.base),G,U.light3),J,Q.light3)),T,i(i(i({},q,Y),G,K),J,Q.dark2)),F,i(i(i({},q,Q.light1),G,Q.light1),J,Q.light1)),I,i(i(i({},q,Z.base),G,Z.base),J,Z.base)),R,i(i(i({},q,W.base),G,W.base),J,W.base)),B,i(i(i({},q,X.light1),G,X.light1),J,X.light1)),M,i(i(i({},q,U.dark1),G,U.dark1),J,U.dark1)),text:i(i(i(i(i(i(i(i({},C,i(i(i({},q,U.light2),G,U.light2),J,Q.light3)),P,i(i(i({},q,U.dark1),G,U.dark1),J,U.dark1)),L,i(i(i({},q,U.light1),G,U.light2),J,Q.light3)),T,i(i(i({},q,K),G,K),J,Q.dark2)),A,i(i(i({},q,U.dark2),G,K),J,Q.dark2)),B,i(i(i({},q,X.light1),G,X.light1),J,X.light1)),M,i(i(i({},q,U.dark1),G,U.dark1),J,U.dark1)),V,i(i(i({},q,Q.light1),G,Q.light1),J,Q.light1))},_=r.black,ee=r.blue,te=r.gray,ae=r.green,ne=r.red,re=r.white,le=r.yellow,ie={background:i(i(i(i(i(i(i(i({},C,i(i(i({},q,re),G,te.light2),J,ee.light3)),L,i(i(i({},q,te.light3),G,te.light2),J,ee.light3)),T,i(i(i({},q,_),G,te.dark3),J,ee.dark2)),F,i(i(i({},q,ee.light3),G,ee.light3),J,ee.light3)),I,i(i(i({},q,le.light3),G,le.light3),J,le.light3)),R,i(i(i({},q,ae.light3),G,ae.light3),J,ae.light3)),B,i(i(i({},q,ne.light3),G,ne.light3),J,ne.light3)),M,i(i(i({},q,te.light2),G,te.light2),J,te.light2)),border:i(i(i(i(i({},C,i(i(i({},q,te.base),G,te.base),J,ee.light1)),L,i(i(i({},q,te.light2),G,te.light2),J,ee.light1)),R,i(i(i({},q,ae.dark1),G,ae.dark1),J,ee.light1)),B,i(i(i({},q,ne.base),G,ne.base),J,ee.light1)),M,i(i(i({},q,te.light1),G,te.light1),J,te.light1)),icon:i(i(i(i(i(i(i(i({},C,i(i(i({},q,te.dark1),G,_),J,ee.dark1)),L,i(i(i({},q,te.base),G,_),J,ee.dark1)),T,i(i(i({},q,re),G,re),J,ee.light2)),F,i(i(i({},q,ee.base),G,ee.base),J,ee.base)),I,i(i(i({},q,le.dark2),G,le.dark2),J,le.dark2)),R,i(i(i({},q,ae.dark1),G,ae.dark1),J,ae.dark1)),B,i(i(i({},q,ne.base),G,ne.base),J,ne.base)),M,i(i(i({},q,te.base),G,te.base),J,te.base)),text:i(i(i(i(i(i(i(i({},C,i(i(i({},q,_),G,_),J,ee.dark1)),L,i(i(i({},q,te.dark1),G,_),J,ee.dark1)),T,i(i(i({},q,re),G,re),J,ee.light2)),A,i(i(i({},q,te.light1),G,re),J,ee.light2)),B,i(i(i({},q,ne.base),G,ne.base),J,ne.base)),M,i(i(i({},q,te.base),G,te.base),J,te.base)),P,i(i(i({},q,te.base),G,te.base),J,te.base)),V,i(i(i({},q,ee.base),G,ee.base),J,ee.base))},ce=i(i({},H.Dark,$),H.Light,ie),oe=i(i({},H.Light,{default:"0 0 0 2px ".concat(r.white,", 0 0 0 4px ").concat(r.blue.light1),input:"0 0 0 3px ".concat(r.blue.light1)}),H.Dark,{default:"0 0 0 2px ".concat(r.black,", 0 0 0 4px ").concat(r.blue.light1),input:"0 0 0 3px ".concat(r.blue.light1)}),de={default:"'Euclid Circular A', 'Helvetica Neue', Helvetica, Arial, sans-serif",serif:"'MongoDB Value Serif', 'Times New Roman', serif",code:"'Source Code Pro', Menlo, monospace"},se=i(i({},H.Light,{gray:"0 0 0 3px ".concat(r.gray.light2),green:"0 0 0 3px ".concat(r.green.light2),red:"0 0 0 3px ".concat(r.red.light2)}),H.Dark,{gray:"0 0 0 3px ".concat(r.gray.dark2),green:"0 0 0 3px ".concat(r.green.dark3),red:"0 0 0 3px ".concat(r.yellow.dark3)}),ue={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},ge=100,he={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}},me=function(t){var r=t.children,l=t.darkMode,i=l?n.Dark:n.Light;return e.createElement("div",{className:a(o||(o=c(["\n padding: 24px;\n min-height: 68px; // 48px + 20px (padding + line-height)\n border-radius: 24px;\n color: ",";\n background-color: ",";\n border: 1px solid ",";\n box-shadow: ",";\n "])),ce[i].text.primary.default,ce[i].background.primary.default,ce[i].border.secondary.default,l?"box-shadow: 0 4px 20px -4px #01121A":"0 4px 10px -4px rgba(0, 30, 43, 0.3)")},r)},pe={title:"Components/Tokens",component:null,parameters:{default:"Spacing"}},be=a(d||(d=c(["\n margin-left: ","px;\n"])),ue[3]),ke=Object.keys(ue).filter((function(e){return 0===Number(e)||Number(e)>25})).reduce((function(e,t,n){var l=t;return e[l]=a(s||(s=c(["\n background-color: ",";\n width: ","px;\n height: ","px;\n "])),r.purple.light2,ue[l],ue[l]),e}),{});function fe(t){var a=t.space;return e.createElement("div",{className:be},e.createElement("code",null,"spacing[",a,"]: ",ue[a]),e.createElement("div",{className:ke[a]}))}var xe=function(){return e.createElement("div",null,e.createElement("h2",null,"Spacing"),e.createElement("div",{className:a(u||(u=c(["\n display: flex;\n flex-direction: column;\n gap: ","px;\n "])),ue[100])},Object.keys(ue).filter((function(e){return 0===Number(e)||Number(e)>25})).map((function(t){return e.createElement(fe,{space:t,key:t})}))))},ye=function(){return e.createElement("div",null,e.createElement("h2",null,"Typescales"),Object.keys(he).map((function(t){var n=t;return e.createElement("div",{key:n,className:a(g||(g=c(["\n font-family: ",";\n font-size: ","px;\n line-height: ","px;\n margin: ","px 0;\n "])),n.includes("code")?de.code:de.default,he[n].fontSize,he[n].lineHeight,ue[3])},e.createElement("div",null,n))})))},ve=function(){return e.createElement("div",null,e.createElement("h2",null,"Font Families"),Object.keys(de).map((function(t){var n=t;return e.createElement("div",{key:n,className:a(h||(h=c(["\n font-family: ",";\n margin: ","px 0;\n "])),de[n],ue[3])},e.createElement("div",null,n))})))},Ee=function(){return e.createElement("div",{className:a(N||(N=c(["\n display: flex;\n flex-direction: column;\n gap: ","px;\n "])),ue[400])},e.createElement("h2",null,"Color Tokens"),Object.values(n).map((function(t){return function(t){var r=!(t!==n.Dark);return e.createElement(me,{darkMode:r},e.createElement("h3",{className:a(m||(m=c(["\n color: ",";\n text-transform: capitalize;\n "])),ce[t].text.primary.default)},t," Mode"),e.createElement("div",{className:a(p||(p=c(["\n display: flex;\n gap: ","px;\n "])),ue[400])},Object.keys(ce[t]).map((function(n){return e.createElement(me,{darkMode:r,key:"color-".concat(t,"-").concat(n)},e.createElement("table",{className:a(b||(b=c(["\n border-spacing: ","px;\n "])),ue[400])},e.createElement("thead",{className:a(k||(k=c(["\n font-size: 10px;\n text-align: left;\n "])))},e.createElement("tr",null,e.createElement("th",{className:a(f||(f=c(["\n color: ",";\n width: 100px;\n "])),ce[t].text.primary.default)},e.createElement("code",null,n)),e.createElement("th",{className:a(x||(x=c(["\n width: ","px;\n "])),ue[1600])},e.createElement("code",null,"default")),e.createElement("th",{className:a(y||(y=c(["\n width: ","px;\n "])),ue[1600])},e.createElement("code",null,"hover")),e.createElement("th",{className:a(v||(v=c(["\n width: ","px;\n "])),ue[1600])},e.createElement("code",null,"focus")))),Object.keys(ce[t][n]).map((function(r){return e.createElement("tbody",{key:"color-".concat(t,"-").concat(n,"-").concat(r),className:a(E||(E=c(["\n font-size: 10px;\n "])))},e.createElement("tr",null,e.createElement("td",null,e.createElement("code",null,r)),Object.keys(ce[t][n][r]).map((function(l){return e.createElement("td",{key:"color-".concat(t,"-").concat(n,"-").concat(r,"-").concat(l)},e.createElement("div",{className:a(w||(w=c(["\n aspect-ratio: 1/1;\n border: 1px solid\n ",";\n background-color: ",";\n border-radius: ","px;\n "])),ce[t].border.primary.default,ce[t][n][r][l],D)}))}))))}))))}))))}(t)})))};Ee.parameters={chromatic:{disableSnapshot:!0}};var we=function(){var n=function(e){return"dark"===e?"light":"dark"},l=function(e){return a(S||(S=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 "])),ue[2],"dark"===e?r.white:r.black,"dark"===e?r.black:r.white,"dark"===e?r.gray.light3:r.gray.dark3,ue[3],ue[4],ue[3])},i=a(j||(j=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 "])),de.default,he.body2.fontSize,ue[2],ue[1],ge);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:l(o)},Object.keys(se[o]).map((function(l){var d=l;return e.createElement("button",{key:d,className:a(z||(z=c(["\n ",";\n background-color: ",";\n color: ",";\n &:hover {\n box-shadow: ",";\n }\n &:focus {\n box-shadow: ",";\n }\n "])),i,r[d]["".concat(o,"3")],r[d]["".concat(n(o),"2")],se[o][d],oe[o].default)},t(d))})),e.createElement("input",{type:"text",placeholder:"Input",className:a(O||(O=c(["\n ",";\n border: 1px solid ",";\n &:hover {\n box-shadow: ",";\n }\n &:focus {\n box-shadow: ",";\n }\n "])),i,r.gray["".concat(o,"1")],se[o].gray,oe[o].input)}))}))))};we.parameters={chromatic:{disableSnapshot:!0}};export{Ee as Colors,ve as FontFamilies,we as InteractionRings,xe as Spacing,ye as TypeScales,pe as default}; | ||
import e from"react";import t from"lodash/startCase";import{css as a}from"@leafygreen-ui/emotion";import{Theme as n}from"@leafygreen-ui/lib";import{palette as r}from"@leafygreen-ui/palette";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 n=a.call(e,t);if("object"!=typeof n)return n;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}function c(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var o,d,s,u,g,h,m,p,b,k,f,x,y,v,E,w,N,S,j,z,O,H={Dark:"dark",Light:"light"},D=8,M="disabled",P="placeholder",C="primary",L="secondary",T="inversePrimary",A="inverseSecondary",F="info",I="warning",B="error",R="success",V="link",q="default",G="hover",J="focus",K=r.black,Q=r.blue,U=r.gray,W=r.green,X=r.red,Y=r.white,Z=r.yellow,$={background:i(i(i(i(i(i(i(i({},C,i(i(i({},q,K),G,U.dark2),J,Q.dark3)),L,i(i(i({},q,U.dark4),G,U.dark2),J,Q.dark3)),T,i(i(i({},q,U.light2),G,U.light3),J,Q.light2)),F,i(i(i({},q,Q.dark3),G,Q.dark3),J,Q.dark3)),I,i(i(i({},q,Z.dark3),G,Z.dark3),J,Z.dark3)),R,i(i(i({},q,W.dark3),G,W.dark3),J,W.dark3)),B,i(i(i({},q,X.dark3),G,X.dark3),J,X.dark3)),M,i(i(i({},q,U.dark3),G,U.dark3),J,U.dark3)),border:i(i(i(i(i({},C,i(i(i({},q,U.base),G,U.base),J,Q.light1)),L,i(i(i({},q,U.dark2),G,U.dark2),J,Q.light1)),R,i(i(i({},q,W.dark1),G,W.dark1),J,Q.light1)),B,i(i(i({},q,X.light1),G,X.light1),J,Q.light1)),M,i(i(i({},q,U.dark2),G,U.dark2),J,U.dark2)),icon:i(i(i(i(i(i(i(i({},C,i(i(i({},q,U.light1),G,U.light3),J,Q.light3)),L,i(i(i({},q,U.base),G,U.light3),J,Q.light3)),T,i(i(i({},q,Y),G,K),J,Q.dark2)),F,i(i(i({},q,Q.light1),G,Q.light1),J,Q.light1)),I,i(i(i({},q,Z.base),G,Z.base),J,Z.base)),R,i(i(i({},q,W.base),G,W.base),J,W.base)),B,i(i(i({},q,X.light1),G,X.light1),J,X.light1)),M,i(i(i({},q,U.dark1),G,U.dark1),J,U.dark1)),text:i(i(i(i(i(i(i(i({},C,i(i(i({},q,U.light2),G,U.light2),J,Q.light3)),P,i(i(i({},q,U.dark1),G,U.dark1),J,U.dark1)),L,i(i(i({},q,U.light1),G,U.light2),J,Q.light3)),T,i(i(i({},q,K),G,K),J,Q.dark2)),A,i(i(i({},q,U.dark2),G,K),J,Q.dark2)),B,i(i(i({},q,X.light1),G,X.light1),J,X.light1)),M,i(i(i({},q,U.dark1),G,U.dark1),J,U.dark1)),V,i(i(i({},q,Q.light1),G,Q.light1),J,Q.light1))},_=r.black,ee=r.blue,te=r.gray,ae=r.green,ne=r.red,re=r.white,le=r.yellow,ie={background:i(i(i(i(i(i(i(i({},C,i(i(i({},q,re),G,te.light2),J,ee.light3)),L,i(i(i({},q,te.light3),G,te.light2),J,ee.light3)),T,i(i(i({},q,_),G,te.dark3),J,ee.dark2)),F,i(i(i({},q,ee.light3),G,ee.light3),J,ee.light3)),I,i(i(i({},q,le.light3),G,le.light3),J,le.light3)),R,i(i(i({},q,ae.light3),G,ae.light3),J,ae.light3)),B,i(i(i({},q,ne.light3),G,ne.light3),J,ne.light3)),M,i(i(i({},q,te.light2),G,te.light2),J,te.light2)),border:i(i(i(i(i({},C,i(i(i({},q,te.base),G,te.base),J,ee.light1)),L,i(i(i({},q,te.light2),G,te.light2),J,ee.light1)),R,i(i(i({},q,ae.dark1),G,ae.dark1),J,ee.light1)),B,i(i(i({},q,ne.base),G,ne.base),J,ee.light1)),M,i(i(i({},q,te.light1),G,te.light1),J,te.light1)),icon:i(i(i(i(i(i(i(i({},C,i(i(i({},q,te.dark1),G,_),J,ee.dark1)),L,i(i(i({},q,te.base),G,_),J,ee.dark1)),T,i(i(i({},q,re),G,re),J,ee.light2)),F,i(i(i({},q,ee.base),G,ee.base),J,ee.base)),I,i(i(i({},q,le.dark2),G,le.dark2),J,le.dark2)),R,i(i(i({},q,ae.dark1),G,ae.dark1),J,ae.dark1)),B,i(i(i({},q,ne.base),G,ne.base),J,ne.base)),M,i(i(i({},q,te.base),G,te.base),J,te.base)),text:i(i(i(i(i(i(i(i({},C,i(i(i({},q,_),G,_),J,ee.dark1)),L,i(i(i({},q,te.dark1),G,_),J,ee.dark1)),T,i(i(i({},q,re),G,re),J,ee.light2)),A,i(i(i({},q,te.light1),G,re),J,ee.light2)),B,i(i(i({},q,ne.base),G,ne.base),J,ne.base)),M,i(i(i({},q,te.base),G,te.base),J,te.base)),P,i(i(i({},q,te.base),G,te.base),J,te.base)),V,i(i(i({},q,ee.base),G,ee.base),J,ee.base))},ce=i(i({},n.Dark,$),n.Light,ie),oe=i(i({},H.Light,{default:"0 0 0 2px ".concat(r.white,", 0 0 0 4px ").concat(r.blue.light1),input:"0 0 0 3px ".concat(r.blue.light1)}),H.Dark,{default:"0 0 0 2px ".concat(r.black,", 0 0 0 4px ").concat(r.blue.light1),input:"0 0 0 3px ".concat(r.blue.light1)}),de={default:"'Euclid Circular A', 'Helvetica Neue', Helvetica, Arial, sans-serif",serif:"'MongoDB Value Serif', 'Times New Roman', serif",code:"'Source Code Pro', Menlo, monospace"},se=i(i({},H.Light,{gray:"0 0 0 3px ".concat(r.gray.light2),green:"0 0 0 3px ".concat(r.green.light2),red:"0 0 0 3px ".concat(r.red.light2)}),H.Dark,{gray:"0 0 0 3px ".concat(r.gray.dark2),green:"0 0 0 3px ".concat(r.green.dark3),red:"0 0 0 3px ".concat(r.yellow.dark3)}),ue={0:0,25:1,50:2,100:4,150:6,200:8,300:12,400:16,500:20,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},ge=100,he={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}},me=function(t){var r=t.children,l=t.darkMode,i=l?n.Dark:n.Light;return e.createElement("div",{className:a(o||(o=c(["\n padding: 24px;\n min-height: 68px; // 48px + 20px (padding + line-height)\n border-radius: 24px;\n color: ",";\n background-color: ",";\n border: 1px solid ",";\n box-shadow: ",";\n "])),ce[i].text.primary.default,ce[i].background.primary.default,ce[i].border.secondary.default,l?"box-shadow: 0 4px 20px -4px #01121A":"0 4px 10px -4px rgba(0, 30, 43, 0.3)")},r)},pe={title:"Components/Tokens",component:null,parameters:{default:"Spacing"}},be=a(d||(d=c(["\n margin-left: ","px;\n"])),ue[3]),ke=Object.keys(ue).filter((function(e){return 0===Number(e)||Number(e)>25})).reduce((function(e,t,n){var l=t;return e[l]=a(s||(s=c(["\n background-color: ",";\n width: ","px;\n height: ","px;\n "])),r.purple.light2,ue[l],ue[l]),e}),{});function fe(t){var a=t.space;return e.createElement("div",{className:be},e.createElement("code",null,"spacing[",a,"]: ",ue[a]),e.createElement("div",{className:ke[a]}))}var xe=function(){return e.createElement("div",null,e.createElement("h2",null,"Spacing"),e.createElement("div",{className:a(u||(u=c(["\n display: flex;\n flex-direction: column;\n gap: ","px;\n "])),ue[100])},Object.keys(ue).filter((function(e){return 0===Number(e)||Number(e)>25})).map((function(t){return e.createElement(fe,{space:t,key:t})}))))},ye=function(){return e.createElement("div",null,e.createElement("h2",null,"Typescales"),Object.keys(he).map((function(t){var n=t;return e.createElement("div",{key:n,className:a(g||(g=c(["\n font-family: ",";\n font-size: ","px;\n line-height: ","px;\n margin: ","px 0;\n "])),n.includes("code")?de.code:de.default,he[n].fontSize,he[n].lineHeight,ue[3])},e.createElement("div",null,n))})))},ve=function(){return e.createElement("div",null,e.createElement("h2",null,"Font Families"),Object.keys(de).map((function(t){var n=t;return e.createElement("div",{key:n,className:a(h||(h=c(["\n font-family: ",";\n margin: ","px 0;\n "])),de[n],ue[3])},e.createElement("div",null,n))})))},Ee=function(){return e.createElement("div",{className:a(N||(N=c(["\n display: flex;\n flex-direction: column;\n gap: ","px;\n "])),ue[400])},e.createElement("h2",null,"Color Tokens"),Object.values(n).map((function(t){return function(t){var r=!(t!==n.Dark);return e.createElement(me,{darkMode:r},e.createElement("h3",{className:a(m||(m=c(["\n color: ",";\n text-transform: capitalize;\n "])),ce[t].text.primary.default)},t," Mode"),e.createElement("div",{className:a(p||(p=c(["\n display: flex;\n gap: ","px;\n "])),ue[400])},Object.keys(ce[t]).map((function(n){return e.createElement(me,{darkMode:r,key:"color-".concat(t,"-").concat(n)},e.createElement("table",{className:a(b||(b=c(["\n border-spacing: ","px;\n "])),ue[400])},e.createElement("thead",{className:a(k||(k=c(["\n font-size: 10px;\n text-align: left;\n "])))},e.createElement("tr",null,e.createElement("th",{className:a(f||(f=c(["\n color: ",";\n width: 100px;\n "])),ce[t].text.primary.default)},e.createElement("code",null,n)),e.createElement("th",{className:a(x||(x=c(["\n width: ","px;\n "])),ue[1600])},e.createElement("code",null,"default")),e.createElement("th",{className:a(y||(y=c(["\n width: ","px;\n "])),ue[1600])},e.createElement("code",null,"hover")),e.createElement("th",{className:a(v||(v=c(["\n width: ","px;\n "])),ue[1600])},e.createElement("code",null,"focus")))),Object.keys(ce[t][n]).map((function(r){return e.createElement("tbody",{key:"color-".concat(t,"-").concat(n,"-").concat(r),className:a(E||(E=c(["\n font-size: 10px;\n "])))},e.createElement("tr",null,e.createElement("td",null,e.createElement("code",null,r)),Object.keys(ce[t][n][r]).map((function(l){return e.createElement("td",{key:"color-".concat(t,"-").concat(n,"-").concat(r,"-").concat(l)},e.createElement("div",{className:a(w||(w=c(["\n aspect-ratio: 1/1;\n border: 1px solid\n ",";\n background-color: ",";\n border-radius: ","px;\n "])),ce[t].border.primary.default,ce[t][n][r][l],D)}))}))))}))))}))))}(t)})))};Ee.parameters={chromatic:{disableSnapshot:!0}};var we=function(){var n=function(e){return"dark"===e?"light":"dark"},l=function(e){return a(S||(S=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 "])),ue[2],"dark"===e?r.white:r.black,"dark"===e?r.black:r.white,"dark"===e?r.gray.light3:r.gray.dark3,ue[3],ue[4],ue[3])},i=a(j||(j=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 "])),de.default,he.body2.fontSize,ue[2],ue[1],ge);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:l(o)},Object.keys(se[o]).map((function(l){var d=l;return e.createElement("button",{key:d,className:a(z||(z=c(["\n ",";\n background-color: ",";\n color: ",";\n &:hover {\n box-shadow: ",";\n }\n &:focus {\n box-shadow: ",";\n }\n "])),i,r[d]["".concat(o,"3")],r[d]["".concat(n(o),"2")],se[o][d],oe[o].default)},t(d))})),e.createElement("input",{type:"text",placeholder:"Input",className:a(O||(O=c(["\n ",";\n border: 1px solid ",";\n &:hover {\n box-shadow: ",";\n }\n &:focus {\n box-shadow: ",";\n }\n "])),i,r.gray["".concat(o,"1")],se[o].gray,oe[o].input)}))}))))};we.parameters={chromatic:{disableSnapshot:!0}};export{Ee as Colors,ve as FontFamilies,we as InteractionRings,xe as Spacing,ye as TypeScales,pe as default}; |
@@ -19,2 +19,5 @@ { | ||
{ | ||
"path": "../lib" | ||
}, | ||
{ | ||
"path": "../palette" | ||
@@ -21,0 +24,0 @@ } |
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
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
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
150333
1894
Updated@leafygreen-ui/lib@^13.5.0