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

badger-ui

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

badger-ui - npm Package Compare versions

Comparing version 0.12.0 to 0.12.1

4

CHANGELOG.md

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

### 0.12.0 (2021-05-22)
#### 0.12.1 (2021-05-23)
##### Bug Fixes
* default support for dark mode ([18ef5c2a](https://github.com/IgorSzyporyn/badger-ui/commit/18ef5c2a87135cd9e8264bf1250df2b472b89f8a))
* adding named color options to color prop on theme ([d4a29053](https://github.com/IgorSzyporyn/badger-ui/commit/d4a290534940ccf1b5efcf0fa365a804ee5f8fa8))

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

import type { Theme, ThemeOptions } from './types';
export declare function createTheme<T = Record<string, string>>({ type, ...options }: ThemeOptions<T>, customThemeValues?: Record<string, any>): Theme<T>;
import type { Theme, ThemeOptions, ThemeNamedOptions } from './types';
export declare function createTheme<T = ThemeNamedOptions>({ type, ...options }: ThemeOptions<T>, customThemeValues?: Record<string, any>): Theme<T>;
export declare const defaultTheme: Theme<{}>;

@@ -63,2 +63,14 @@ "use strict";

});
Object.keys(config.named).forEach(function (key) {
var colorType = key;
var colorScale = color_1.createColorScale({
color: config.color[colorType],
themeType: type,
scaleType: 'color',
wcag: wcag,
});
if (colorScale) {
theme.color[colorType] = colorScale;
}
});
var bodyColorScale = color_1.createColorScale({

@@ -80,19 +92,2 @@ color: config.background.body,

};
Object.keys(config.named).forEach(function (key) {
var namedKey = key;
var _named = config.named;
var named = _named;
var color = named[namedKey];
var colorScale = color_1.createColorScale({
color: color,
themeType: type,
scaleType: 'color',
wcag: wcag,
});
var _themeNamed = theme.named;
var themeNamed = _themeNamed;
if (colorScale) {
themeNamed[namedKey] = colorScale;
}
});
theme.metrics = {

@@ -99,0 +94,0 @@ gutter: config.gutter + "px",

@@ -350,4 +350,3 @@ "use strict";

elevations: [],
named: {},
};
//# sourceMappingURL=options.js.map

@@ -135,6 +135,7 @@ import React, { CSSProperties } from 'react';

};
export declare type ThemeNamedOptions = Record<string, string>;
export interface Theme<T = Record<string, string>> {
wcag: ThemeWCAGRatingType;
type: ThemeType;
color: ThemeColor;
color: ThemeColor & Record<keyof T, ThemeColorScale & ThemeTypographyScale>;
background: ThemeBackground;

@@ -145,3 +146,2 @@ metrics: ThemeMetrics;

size: ThemeSize;
named: Record<keyof T, ThemeColorScale & ThemeTypographyScale>;
}

@@ -148,0 +148,0 @@ export interface ThemeOptions<T = Record<string, string>> {

{
"name": "badger-ui",
"description": "Theming framework for JSS based applications",
"version": "0.12.0",
"version": "0.12.1",
"license": "MIT",

@@ -6,0 +6,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc