@exivity/ui
Advanced tools
Comparing version 0.2.9 to 0.2.10
@@ -5,2 +5,7 @@ # Change Log | ||
<a name="0.2.10"></a> | ||
## [0.2.10](https://github.com/exivity/ui/compare/v0.2.9...v0.2.10) (2019-03-02) | ||
<a name="0.2.9"></a> | ||
@@ -7,0 +12,0 @@ ## [0.2.9](https://github.com/exivity/ui/compare/v0.2.8...v0.2.9) (2019-03-01) |
@@ -7,6 +7,5 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) { | ||
import styled from 'styled-components'; | ||
import theme from '../theme'; | ||
var SubLabelWrapper = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n width: 33%;\n min-width: 250px;\n"], ["\n display: flex;\n flex-direction: column;\n width: 33%;\n min-width: 250px;\n"]))); | ||
var TopLabel = styled.span(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-weight: 600;\n color: #444444;\n"], ["\n font-weight: 600;\n color: #444444;\n"]))); | ||
var SubLabel = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n margin-top: 5px;\n font-size: 12px;\n color: ", ";\n"], ["\n margin-top: 5px;\n font-size: 12px;\n color: ", ";\n"])), function (p) { return p.theme.colors.gray; }); | ||
var TopLabel = styled.span(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-family: ", ";\n color: ", ";\n"], ["\n font-family: ", ";\n color: ", ";\n"])), function (p) { return p.theme.global.fontFamily; }, function (p) { return p.theme.colors.dark; }); | ||
var SubLabel = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n font-family: ", ";\n margin-top: 5px;\n font-size: 12px;\n color: ", ";\n"], ["\n font-family: ", ";\n margin-top: 5px;\n font-size: 12px;\n color: ", ";\n"])), function (p) { return p.theme.global.fontFamily; }, function (p) { return p.theme.colors.gray; }); | ||
var LabelContent = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n padding-left: 40px;\n"], ["\n padding-left: 40px;\n"]))); | ||
@@ -18,3 +17,3 @@ var Label = function (_a) { | ||
<TopLabel>{name}</TopLabel> | ||
<SubLabel theme={theme}>{description}</SubLabel> | ||
<SubLabel>{description}</SubLabel> | ||
</SubLabelWrapper> | ||
@@ -21,0 +20,0 @@ <LabelContent> |
{ | ||
"name": "@exivity/ui", | ||
"version": "0.2.9", | ||
"version": "0.2.10", | ||
"description": "A collection of components to build interfaces", | ||
@@ -31,4 +31,4 @@ "keywords": [ | ||
"test:update": "react-scripts test --update", | ||
"docs:watch": "start-storybook -p 9009 -s docs-public", | ||
"docs:build": "build-storybook -s docs-public -o docs-static", | ||
"docs:watch": "start-storybook -p 9009 -c docs -s docs/public", | ||
"docs:build": "build-storybook -c docs -s docs/public -o docs/static", | ||
"docs:publish": "bash scripts/publish-docs.sh", | ||
@@ -124,3 +124,2 @@ "start": "run-p test:watch docs:watch", | ||
"standard-version": "^4.4.0", | ||
"storybook-addon-styled-component-theme": "^1.1.1", | ||
"tslint": "^5.12.1", | ||
@@ -127,0 +126,0 @@ "tslint-config-standard": "^8.0.1", |
import { DeepReadonly } from './utils/types'; | ||
import './assets/styles/fonts.css'; | ||
declare const theme: { | ||
fonts: { | ||
custom: { | ||
families: string[]; | ||
urls: string[]; | ||
}; | ||
}; | ||
global: { | ||
@@ -4,0 +11,0 @@ margin: string; |
14
theme.js
@@ -0,5 +1,17 @@ | ||
import './assets/styles/fonts.css'; | ||
var theme = { | ||
fonts: { | ||
custom: { | ||
families: [ | ||
'Fira Mono', | ||
'Pt Sans' | ||
], | ||
urls: [ | ||
'./assets/styles/fonts.css' | ||
] | ||
} | ||
}, | ||
global: { | ||
margin: '20px !default', | ||
fontFamily: 'Fira Mono Latin Regular' | ||
fontFamily: 'Pt Sans' | ||
}, | ||
@@ -6,0 +18,0 @@ colors: { |
import React from 'react'; | ||
import { Theme } from '../theme'; | ||
interface ThemeAndFontProviderProps { | ||
fontsConfig?: object; | ||
theme?: Theme; | ||
@@ -6,0 +5,0 @@ onFontStatus?: (status: string) => void; |
@@ -5,8 +5,7 @@ import React from 'react'; | ||
import WebfontLoader from '@dr-kobros/react-webfont-loader'; | ||
import { fontConfig } from '../fontConfig'; | ||
import mainTheme from '../theme'; | ||
export var ThemeAndFontProvider = function (_a) { | ||
var _b = _a.fontsConfig, fontsConfig = _b === void 0 ? fontConfig : _b, _c = _a.theme, theme = _c === void 0 ? mainTheme : _c, onFontStatus = _a.onFontStatus, children = _a.children; | ||
var _b = _a.theme, theme = _b === void 0 ? mainTheme : _b, onFontStatus = _a.onFontStatus, children = _a.children; | ||
return (<ThemeProvider theme={theme}> | ||
<WebfontLoader config={fontsConfig} onStatus={onFontStatus && onFontStatus}> | ||
<WebfontLoader config={theme.fonts} onStatus={onFontStatus && onFontStatus}> | ||
{children} | ||
@@ -13,0 +12,0 @@ </WebfontLoader> |
@@ -1,2 +0,2 @@ | ||
import { MapItem } from '../helpers'; | ||
import { MapItem } from '../utils'; | ||
export declare const PARENT = "expandable-list-parent"; | ||
@@ -3,0 +3,0 @@ export declare const CHILDREN = "expandable-list-children"; |
@@ -1,2 +0,2 @@ | ||
import { Map } from '../helpers'; | ||
import { Map } from '../utils'; | ||
import { IterateItem } from './helpers'; | ||
@@ -3,0 +3,0 @@ declare type ListItem<T> = T & IterateItem; |
@@ -14,3 +14,3 @@ var __assign = (this && this.__assign) || function () { | ||
import { useState } from 'react'; | ||
import { createMap } from '../helpers'; | ||
import { createMap } from '../utils'; | ||
import { areEqual, CHILDREN, iterateAllChildren, iterateAllParents, PARENT } from './helpers'; | ||
@@ -17,0 +17,0 @@ export function transformAndOrder(map, expanded) { |
@@ -0,1 +1,2 @@ | ||
import { Theme } from '../theme'; | ||
export declare type primitive = string | number | boolean | undefined | null; | ||
@@ -9,1 +10,4 @@ export declare type DeepReadonly<T> = T extends primitive ? T : DeepReadonlyObject<T>; | ||
} | ||
export interface StyledProps { | ||
theme: Theme; | ||
} |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
34891
39
602
0
39