@loadsmart/miranda-tokens
Advanced tools
Comparing version 1.0.2 to 1.1.0
export { default as getToken } from './utils/get-token'; | ||
export { default as toCSSVariable } from './utils/to-css-variable'; | ||
export { default as toCSSValue } from './utils/to-css-value'; | ||
export type { TokenValue, Token, BorderToken, ColorToken, ElevationToken, FontFamilyToken, FontSizeToken, FontWeightToken, GlowToken, LineHeightToken, OpacityToken, SpacingToken, } from './types'; | ||
export type { TokenValue, Token, ColorToken, BackgroundColorToken, SpacingToken, FontFamilyToken, FontSizeToken, FontWeightToken, LineHeightToken, BorderToken, BorderRadiusToken, BorderWidthToken, OpacityToken, ElevationToken, GlowToken, } from './types'; | ||
export { TOKENS, COLOR_TOKENS, BACKGROUND_COLOR_TOKENS, SPACING_TOKENS, FONT_FAMILY_TOKENS, FONT_SIZE_TOKENS, FONT_WEIGHT_TOKENS, LINE_HEIGHT_TOKENS, BORDER_TOKENS, BORDER_RADIUS_TOKENS, BORDER_WIDTH_TOKENS, OPACITY_TOKENS, ELEVATION_TOKENS, GLOW_TOKENS, } from './types'; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("./loadsmart.theme-8a606bdd.js");function r(r){return t.LoadsmartTheme[r]}function e(t){var e=r(t);return null==e?e:"--m-".concat(t)}exports.getToken=r,exports.toCSSValue=function(t,a){var o=r(t);return null==o?"":t.startsWith("color-")?"rgba(var(".concat(e(t),", ").concat(o,"), ").concat(null!=a?a:1,")"):"var(".concat(e(t),", ").concat(o,")")},exports.toCSSVariable=e; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("./loadsmart.theme-081f0615.js");function t(t){return r.LoadsmartTheme[t]}function e(r){var e=t(r);return null==e?e:"--m-".concat(r)}var o=Object.keys(r.LoadsmartTheme).filter((function(r){return!r.startsWith("brand-")&&!r.startsWith("platform-")}));function n(r){return o.filter((function(t){return t.startsWith(r)}))}var s=n("color-"),a=n("color-background-"),O=n("spacing-"),c=n("font-family-"),i=n("font-size-"),T=n("font-weight-"),u=n("line-height-"),E=n("border-"),p=n("border-radius-"),_=n("opacity-"),l=n("elevation-"),N=n("glow-");exports.BACKGROUND_COLOR_TOKENS=a,exports.BORDER_RADIUS_TOKENS=p,exports.BORDER_TOKENS=E,exports.BORDER_WIDTH_TOKENS=["border-none","border-thin","border-medium","border-thick"],exports.COLOR_TOKENS=s,exports.ELEVATION_TOKENS=l,exports.FONT_FAMILY_TOKENS=c,exports.FONT_SIZE_TOKENS=i,exports.FONT_WEIGHT_TOKENS=T,exports.GLOW_TOKENS=N,exports.LINE_HEIGHT_TOKENS=u,exports.OPACITY_TOKENS=_,exports.SPACING_TOKENS=O,exports.TOKENS=o,exports.getToken=t,exports.toCSSValue=function(r,o){var n=t(r);return null==n?"":r.startsWith("color-")?"rgba(var(".concat(e(r),", ").concat(n,"), ").concat(null!=o?o:1,")"):"var(".concat(e(r),", ").concat(n,")")},exports.toCSSVariable=e; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./loadsmart.theme-8a606bdd.js");exports.LoadsmartTheme=e.LoadsmartTheme; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./loadsmart.theme-081f0615.js");exports.LoadsmartTheme=e.LoadsmartTheme; |
/** | ||
* Do not edit directly | ||
* Generated on Fri, 07 Oct 2022 21:18:51 GMT | ||
* Generated on Mon, 10 Oct 2022 14:08:09 GMT | ||
*/ | ||
@@ -5,0 +5,0 @@ declare const _default: { |
@@ -14,32 +14,53 @@ import { LoadsmartTheme } from './themes'; | ||
}; | ||
export declare const TOKENS: Token[]; | ||
export declare type ColorToken = keyof { | ||
[Color in Token as Color extends `color-${infer Token}` ? Color : never]: Token; | ||
}; | ||
export declare const COLOR_TOKENS: ("color-background-primary" | "color-background-secondary" | "color-background-tertiary" | "color-background-highlight" | "color-background-inverted" | "color-background-secondary-inverted" | "color-border" | "color-divider" | "color-brand" | "color-brand-accent-1" | "color-brand-accent-2" | "color-primary-20" | "color-primary-60" | "color-primary-100" | "color-accent-20" | "color-accent-60" | "color-accent-100" | "color-neutral-0" | "color-neutral-10" | "color-neutral-20" | "color-neutral-40" | "color-neutral-60" | "color-neutral-80" | "color-neutral-90" | "color-neutral-100" | "color-success-20" | "color-success-60" | "color-success-100" | "color-danger-20" | "color-danger-60" | "color-danger-100" | "color-warning-20" | "color-warning-60" | "color-warning-100" | "color-text-primary" | "color-text-secondary" | "color-text-tertiary" | "color-text-placeholder" | "color-text-disabled" | "color-text-inverted" | "color-text-secondary-inverted" | "color-text-error" | "color-text-highlight" | "color-text-link")[]; | ||
export declare type BackgroundColorToken = keyof { | ||
[Color in Token as Color extends `color-background-${infer Token}` ? Color : never]: Token; | ||
}; | ||
export declare const BACKGROUND_COLOR_TOKENS: ("color-background-primary" | "color-background-secondary" | "color-background-tertiary" | "color-background-highlight" | "color-background-inverted" | "color-background-secondary-inverted")[]; | ||
export declare type SpacingToken = keyof { | ||
[Spacing in Token as Spacing extends `spacing-${infer Token}` ? Spacing : never]: Token; | ||
}; | ||
export declare const SPACING_TOKENS: ("spacing-1" | "spacing-2" | "spacing-3" | "spacing-4" | "spacing-5" | "spacing-6" | "spacing-8" | "spacing-10" | "spacing-12" | "spacing-14" | "spacing-16" | "spacing-20" | "spacing-30" | "spacing-0-5")[]; | ||
export declare type FontFamilyToken = keyof { | ||
[Spacing in Token as Spacing extends `font-family-${infer Token}` ? Spacing : never]: Token; | ||
}; | ||
export declare const FONT_FAMILY_TOKENS: ("font-family-default" | "font-family-title")[]; | ||
export declare type FontSizeToken = keyof { | ||
[Spacing in Token as Spacing extends `font-size-${infer Token}` ? Spacing : never]: Token; | ||
}; | ||
export declare const FONT_SIZE_TOKENS: ("font-size-1" | "font-size-2" | "font-size-3" | "font-size-4" | "font-size-5" | "font-size-6")[]; | ||
export declare type FontWeightToken = keyof { | ||
[Spacing in Token as Spacing extends `font-weight-${infer Token}` ? Spacing : never]: Token; | ||
}; | ||
export declare const FONT_WEIGHT_TOKENS: ("font-weight-regular" | "font-weight-medium" | "font-weight-bold")[]; | ||
export declare type LineHeightToken = keyof { | ||
[Glow in Token as Glow extends `line-height-${infer Token}` ? Glow : never]: Token; | ||
}; | ||
export declare const LINE_HEIGHT_TOKENS: ("line-height-1" | "line-height-2" | "line-height-3" | "line-height-4" | "line-height-5")[]; | ||
export declare type BorderToken = keyof { | ||
[Border in Token as Border extends `border-${infer Token}` ? Border : never]: Token; | ||
}; | ||
export declare const BORDER_TOKENS: ("border-radius-none" | "border-radius-s" | "border-radius-m" | "border-radius-l" | "border-radius-circle" | "border-none" | "border-thin" | "border-medium" | "border-thick")[]; | ||
export declare type BorderRadiusToken = keyof { | ||
[Border in Token as Border extends `border-radius-${infer Token}` ? Border : never]: Token; | ||
}; | ||
export declare const BORDER_RADIUS_TOKENS: ("border-radius-none" | "border-radius-s" | "border-radius-m" | "border-radius-l" | "border-radius-circle")[]; | ||
export declare const BORDER_WIDTH_TOKENS: readonly ["border-none", "border-thin", "border-medium", "border-thick"]; | ||
export declare type BorderWidthToken = typeof BORDER_WIDTH_TOKENS[number]; | ||
export declare type OpacityToken = keyof { | ||
[Opacity in Token as Opacity extends `opacity-${infer Token}` ? Opacity : never]: Token; | ||
}; | ||
export declare const OPACITY_TOKENS: ("opacity-0" | "opacity-20" | "opacity-40" | "opacity-60" | "opacity-100")[]; | ||
export declare type ElevationToken = keyof { | ||
[Elevation in Token as Elevation extends `elevation-${infer Token}` ? Elevation : never]: Token; | ||
}; | ||
export declare const ELEVATION_TOKENS: ("elevation-1" | "elevation-2" | "elevation-3" | "elevation-4")[]; | ||
export declare type GlowToken = keyof { | ||
[Glow in Token as Glow extends `glow-${infer Token}` ? Glow : never]: Token; | ||
}; | ||
export declare const GLOW_TOKENS: ("glow-primary" | "glow-warning")[]; | ||
export {}; |
{ | ||
"name": "@loadsmart/miranda-tokens", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"description": "Design tokens for the Miranda Design System", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
28699
329