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

@loadsmart/miranda-tokens

Package Overview
Dependencies
Maintainers
19
Versions
291
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@loadsmart/miranda-tokens - npm Package Compare versions

Comparing version 2.3.1 to 2.3.2

dist/loadsmart.theme.js

4

dist/index.d.ts

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

export type { BackgroundColorToken, BorderRadiusToken, BorderToken, BorderWidthToken, ColorToken, ElevationToken, FontFamilyToken, FontSizeToken, FontWeightToken, GlobalToken, GlowToken, LineHeightToken, OpacityToken, SpacingToken, SpacingTokenWithNone, Token, } from './types';
export * from './values';
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, ColorToken, BackgroundColorToken, SpacingToken, SpacingTokenWithNone, FontFamilyToken, FontSizeToken, FontWeightToken, LineHeightToken, BorderToken, BorderRadiusToken, BorderWidthToken, OpacityToken, ElevationToken, GlowToken, GlobalToken, } from './types';
export { TOKENS, COLOR_TOKENS, BACKGROUND_COLOR_TOKENS, SPACING_TOKENS, SPACING_TOKENS_WITH_NONE, 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, GLOBAL_TOKENS, } from './types';

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

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("./loadsmart.theme-5f1620e9.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 a=n("color-"),s=n("color-background-"),c=n("spacing-"),O=function(r,t,e){if(e||2===arguments.length)for(var o,n=0,a=t.length;n<a;n++)!o&&n in t||(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return r.concat(o||Array.prototype.slice.call(t))}(["none"],c,!0),i=n("font-family-"),l=n("font-size-"),p=n("font-weight-"),T=n("line-height-"),E=n("border-"),N=n("border-radius-"),_=n("opacity-"),u=n("elevation-"),S=n("glow-"),x=n("global-");exports.BACKGROUND_COLOR_TOKENS=s,exports.BORDER_RADIUS_TOKENS=N,exports.BORDER_TOKENS=E,exports.BORDER_WIDTH_TOKENS=["border-none","border-thin","border-medium","border-thick"],exports.COLOR_TOKENS=a,exports.ELEVATION_TOKENS=u,exports.FONT_FAMILY_TOKENS=i,exports.FONT_SIZE_TOKENS=l,exports.FONT_WEIGHT_TOKENS=p,exports.GLOBAL_TOKENS=x,exports.GLOW_TOKENS=S,exports.LINE_HEIGHT_TOKENS=T,exports.OPACITY_TOKENS=_,exports.SPACING_TOKENS=c,exports.SPACING_TOKENS_WITH_NONE=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;
"use strict";var r=require("./loadsmart.theme.js");function t(r,t){return r.filter((function(r){return r.startsWith(t)}))}function o(r,t){return r.filter((function(r){return!r.startsWith(t)}))}var e=o(o(Object.keys(r.LoadsmartTheme),"brand-"),"platform-"),n=t(e,"color-background-"),a=t(e,"border-radius-"),s=t(e,"border-"),c=t(e,"color-"),O=t(e,"elevation-"),i=t(e,"font-family-"),l=t(e,"font-size-"),T=t(e,"font-weight-"),p=t(e,"global-"),E=t(e,"glow-"),N=t(e,"line-height-"),u=t(e,"opacity-"),S=t(e,"spacing-"),_=function(r,t,o){if(o||2===arguments.length)for(var e,n=0,a=t.length;n<a;n++)!e&&n in t||(e||(e=Array.prototype.slice.call(t,0,n)),e[n]=t[n]);return r.concat(e||Array.prototype.slice.call(t))}(["none"],S,!0);function x(t){return r.LoadsmartTheme[t]}function f(r){var t=x(r);return null==t?t:"--m-".concat(r)}exports.BACKGROUND_COLOR_TOKENS=n,exports.BORDER_RADIUS_TOKENS=a,exports.BORDER_TOKENS=s,exports.BORDER_WIDTH_TOKENS=["border-none","border-thin","border-medium","border-thick"],exports.COLOR_TOKENS=c,exports.ELEVATION_TOKENS=O,exports.FONT_FAMILY_TOKENS=i,exports.FONT_SIZE_TOKENS=l,exports.FONT_WEIGHT_TOKENS=T,exports.GLOBAL_TOKENS=p,exports.GLOW_TOKENS=E,exports.LINE_HEIGHT_TOKENS=N,exports.OPACITY_TOKENS=u,exports.SPACING_TOKENS=S,exports.SPACING_TOKENS_WITH_NONE=_,exports.TOKENS=e,exports.getToken=x,exports.toCSSValue=function(r,t){var o=x(r);return null==o?"":r.startsWith("color-")?"rgba(var(".concat(f(r),", ").concat(o,"), ").concat(null!=t?t:1,")"):"var(".concat(f(r),", ").concat(o,")")},exports.toCSSVariable=f;

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

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./loadsmart.theme-5f1620e9.js");exports.LoadsmartTheme=e.LoadsmartTheme;
"use strict";var e=require("./loadsmart.theme.js");exports.LoadsmartTheme=e.LoadsmartTheme;
/**
* Auto-generated file
* Do not edit directly
* Generated on Wed, 03 May 2023 17:10:10 GMT
*/

@@ -5,0 +5,0 @@ declare const _default: {

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

import { LoadsmartTheme } from './themes';
import type { BACKGROUND_COLOR_TOKENS, BORDER_RADIUS_TOKENS, BORDER_TOKENS, BORDER_WIDTH_TOKENS, COLOR_TOKENS, ELEVATION_TOKENS, FONT_FAMILY_TOKENS, FONT_SIZE_TOKENS, FONT_WEIGHT_TOKENS, GLOBAL_TOKENS, GLOW_TOKENS, LINE_HEIGHT_TOKENS, OPACITY_TOKENS, SPACING_TOKENS, SPACING_TOKENS_WITH_NONE, TOKENS } from './values';
type DashPrefix<T extends string> = T extends '' ? '' : `-${T}`;

@@ -11,62 +11,18 @@ export type DashNestedKeys<T> = T extends string | number ? '' : (T extends object ? {

export type FlattenedTheme<T extends FlattenableTheme> = Record<DashNestedKeys<T>, TokenValue>;
export type Token = keyof {
[TokenCandidate in keyof typeof LoadsmartTheme as TokenCandidate extends `${'platform' | `brand`}-${infer Token}` ? never : TokenCandidate]: Token;
};
export declare const TOKENS: Token[];
export 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 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 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 type SpacingTokenWithNone = SpacingToken | 'none';
export declare const SPACING_TOKENS_WITH_NONE: SpacingTokenWithNone[];
export 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 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" | "font-size-7" | "font-size-8" | "font-size-9")[];
export 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 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" | "line-height-6")[];
export 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 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 type BackgroundColorToken = (typeof BACKGROUND_COLOR_TOKENS)[number];
export type BorderToken = (typeof BORDER_TOKENS)[number];
export type BorderRadiusToken = (typeof BORDER_RADIUS_TOKENS)[number];
export type BorderWidthToken = (typeof BORDER_WIDTH_TOKENS)[number];
export 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 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 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 type GlobalToken = keyof {
[Global in Token as Global extends `global-${infer Token}` ? Global : never]: Token;
};
export declare const GLOBAL_TOKENS: ("glow-primary" | "glow-warning")[];
export type ColorToken = (typeof COLOR_TOKENS)[number];
export type ElevationToken = (typeof ELEVATION_TOKENS)[number];
export type FontFamilyToken = (typeof FONT_FAMILY_TOKENS)[number];
export type FontSizeToken = (typeof FONT_SIZE_TOKENS)[number];
export type FontWeightToken = (typeof FONT_WEIGHT_TOKENS)[number];
export type GlowToken = (typeof GLOW_TOKENS)[number];
export type GlobalToken = (typeof GLOBAL_TOKENS)[number];
export type LineHeightToken = (typeof LINE_HEIGHT_TOKENS)[number];
export type OpacityToken = (typeof OPACITY_TOKENS)[number];
export type SpacingToken = (typeof SPACING_TOKENS)[number];
export type SpacingTokenWithNone = (typeof SPACING_TOKENS_WITH_NONE)[number];
export type Token = (typeof TOKENS)[number];
export {};
{
"name": "@loadsmart/miranda-tokens",
"version": "2.3.1",
"version": "2.3.2",
"description": "Design tokens for the Miranda Design System",

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

"scripts": {
"prebuild-tokens": "rimraf dist",
"build-tokens": "node ./src/scripts/build-tokens.js",
"build": "npm run build-tokens && rollup --config rollup.config.ts --configPlugin typescript --environment BUILD:prod",
"clean": "rimraf dist",
"prebuild-tokens": "npm run clean",
"build-tokens": "ts-node ./src/scripts/build-tokens.ts",
"build": "rollup --config rollup.config.ts --configPlugin typescript --environment BUILD:prod",
"test": "jest",

@@ -31,2 +32,3 @@ "release": "semantic-release",

"jest": "^29.4.1",
"rimraf": "^5.0.0",
"style-dictionary": "^3.7.2"

@@ -44,3 +46,29 @@ },

},
"homepage": "https://github.com/loadsmart/miranda-wc#readme"
"homepage": "https://github.com/loadsmart/miranda-wc#readme",
"nx": {
"targets": {
"build-tokens": {
"dependsOn": [
"^build",
"^build-tokens"
],
"inputs": [
"{projectRoot}/src/scripts/build-tokens.js",
"{projectRoot}/src/tokens/brands/**",
"{projectRoot}/src/tokens/globals/**",
"{projectRoot}/src/tokens/platforms/**"
],
"outputs": [
"{projectRoot}/dist/tokens/**",
"{projectRoot}/src/themes/*.theme.ts"
]
},
"build": {
"dependsOn": [
"build-tokens",
"^build"
]
}
}
}
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc