@uidu/theme
Advanced tools
Comparing version 0.1.15 to 0.1.16
# @uidu/theme | ||
## 0.1.16 | ||
### Patch Changes | ||
- [patch][dc083d7](https://github.org/uidu-org/guidu/commits/dc083d7): | ||
Small changes to components | ||
## 0.1.15 | ||
- [patch] [4a4aff7](https://github.org/uidu-org/guidu/commits/4a4aff7): | ||
- [patch][4a4aff7](https://github.org/uidu-org/guidu/commits/4a4aff7): | ||
- Better package json organization | ||
## 0.1.14 | ||
- [patch] [fd321d7](https://github.org/uidu-org/guidu/commits/fd321d7): | ||
- [patch][fd321d7](https://github.org/uidu-org/guidu/commits/fd321d7): | ||
- Removed unused dependencies | ||
## 0.1.13 | ||
- [patch] [e3fc364](https://github.org/uidu-org/guidu/commits/e3fc364): | ||
- [patch][e3fc364](https://github.org/uidu-org/guidu/commits/e3fc364): | ||
- Remove some tests, fix travis cache timeout, migrate accordion to typescript | ||
## 0.1.12 | ||
- [patch] [f9bf957](https://github.org/uidu-org/guidu/commits/f9bf957): | ||
- [patch][f9bf957](https://github.org/uidu-org/guidu/commits/f9bf957): | ||
- Bump dependencies | ||
## 0.1.11 | ||
- [patch] [33713cc](https://github.org/uidu-org/guidu/commits/33713cc): | ||
- [patch][33713cc](https://github.org/uidu-org/guidu/commits/33713cc): | ||
- Remove some dependencies | ||
@@ -27,0 +40,0 @@ |
@@ -6,10 +6,9 @@ /* | ||
*/ | ||
export { default as getTheme } from './utils/getTheme'; | ||
export { default as themed } from './utils/themed'; | ||
export { default as Appearance } from './components/Appearance'; | ||
export { default as AtlaskitThemeProvider } from './components/AtlaskitThemeProvider'; | ||
export { default as Appearance } from './components/Appearance'; // New API | ||
export { ResetTheme, Reset } from './components/Reset'; | ||
export { Reset, ResetTheme } from './components/Reset'; | ||
export { default } from './components/Theme'; | ||
export { withTheme } from './hoc'; | ||
export { createTheme } from './utils/createTheme'; | ||
export { createTheme } from './utils/createTheme'; | ||
export { default as getTheme } from './utils/getTheme'; | ||
export { default as themed } from './utils/themed'; // New API |
@@ -8,6 +8,6 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck"; | ||
import _defineProperty from "@babel/runtime/helpers/defineProperty"; | ||
import React, { Component } from 'react'; | ||
import exenv from 'exenv'; | ||
import PropTypes from 'prop-types'; | ||
import React, { Component, Node } from 'react'; | ||
import styled, { ThemeProvider } from 'styled-components'; | ||
import exenv from 'exenv'; | ||
import * as colors from '../colors'; | ||
@@ -14,0 +14,0 @@ import { CHANNEL, DEFAULT_THEME_MODE } from '../constants'; // For forward-compat until everything is upgraded. |
@@ -8,6 +8,6 @@ import _extends from "@babel/runtime/helpers/extends"; | ||
import React from 'react'; | ||
import React, { Node } from 'react'; | ||
import styled, { css } from 'styled-components'; | ||
import * as colors from '../colors'; | ||
import { createTheme } from '../utils/createTheme'; | ||
import { createTheme, ThemeProp } from '../utils/createTheme'; | ||
@@ -14,0 +14,0 @@ var orTextColor = function orTextColor(preferred) { |
{ | ||
"name": "@uidu/theme", | ||
"version": "0.1.15", | ||
"version": "0.1.16", | ||
"sideEffects": false | ||
} |
import _extends from "@babel/runtime/helpers/extends"; | ||
import React, { forwardRef } from 'react'; | ||
import React from 'react'; | ||
import Theme from './components/Theme'; // Pre-executes the theme and passes it as a prop to the supplied component. | ||
@@ -8,10 +8,9 @@ // This is useful for ensuring that the current theme is accessible as props | ||
export function withTheme(InnerComponent) { | ||
return forwardRef(function (props, ref) { | ||
return function ComponentWithTheme(props) { | ||
return React.createElement(Theme.Consumer, null, function (tokens) { | ||
return React.createElement(InnerComponent, _extends({}, props, { | ||
ref: ref, | ||
theme: tokens | ||
})); | ||
}); | ||
}); | ||
}; | ||
} |
{ | ||
"name": "@uidu/theme", | ||
"version": "0.1.15", | ||
"version": "0.1.16", | ||
"description": "The Atlaskit theme framework", | ||
@@ -9,4 +9,6 @@ "repository": "https://github.com/uidu-org/guidu.git", | ||
"sideEffects": false, | ||
"module": "index.js", | ||
"module": "dist/esm/index.js", | ||
"main": "dist/cjs/index.js", | ||
"types": "index.d.ts", | ||
"uidu:src": "src/index.js", | ||
"dependencies": { | ||
@@ -17,3 +19,3 @@ "exenv": "^1.2.2", | ||
"devDependencies": { | ||
"@uidu/button": "^0.1.42", | ||
"@uidu/button": "^0.1.44", | ||
"@uidu/docs": "^0.1.32", | ||
@@ -34,4 +36,3 @@ "@uidu/lozenge": "^0.1.12", | ||
"Kang C" | ||
], | ||
"uidu:src": "src/index.js" | ||
} | ||
] | ||
} |
import { css } from 'styled-components'; | ||
import * as colors from './colors'; | ||
import { fontSize, gridSize } from './index'; | ||
import { gridSize, fontSize } from './constants'; | ||
@@ -28,3 +28,3 @@ var baseHeading = function baseHeading(size, lineHeight) { | ||
export var h300 = function h300() { | ||
return css(["\n ", " color: ", ";\n font-weight: 600;\n margin-top: ", "px;\n\n"], baseHeading(12, 16), colors.heading, gridSize() * 2.5); | ||
return css(["\n ", " color: ", ";\n font-weight: 600;\n margin-top: ", "px;\n text-transform: uppercase;\n"], baseHeading(12, 16), colors.heading, gridSize() * 2.5); | ||
}; | ||
@@ -31,0 +31,0 @@ export var h200 = function h200() { |
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties"; | ||
import React, { createContext } from 'react'; | ||
import React, { ComponentType, createContext, Node } from 'react'; | ||
export function createTheme(defaultThemeFn) { | ||
@@ -4,0 +4,0 @@ var emptyThemeFn = function emptyThemeFn(tokens, props) { |
import { DEFAULT_THEME_MODE } from '../constants'; | ||
var defaultTheme = { | ||
mode: DEFAULT_THEME_MODE | ||
}; | ||
import { Theme, ThemeProps } from '../types'; | ||
export default function getTheme(props) { | ||
@@ -16,3 +14,5 @@ if (props && props.theme && props.theme.__ATLASKIT_THEME__) { | ||
return defaultTheme; | ||
return { | ||
mode: DEFAULT_THEME_MODE | ||
}; | ||
} |
@@ -1,5 +0,2 @@ | ||
import { ThemeProps, ThemedValue } from '../types'; | ||
/* eslint-disable prefer-rest-params */ | ||
import { css } from 'styled-components'; | ||
import getTheme from './getTheme'; | ||
@@ -15,7 +12,7 @@ | ||
if (modes) { | ||
return css(["\n ", "\n "], modes[theme.mode]); | ||
return modes[theme.mode]; | ||
} | ||
} | ||
return css([""]); | ||
return ''; | ||
}; | ||
@@ -32,4 +29,4 @@ } | ||
var theme = getTheme(props); | ||
return css(["\n ", "\n "], modes[theme.mode]); | ||
return modes[theme.mode]; | ||
}; | ||
} |
{ | ||
"name": "@uidu/theme", | ||
"version": "0.1.15", | ||
"version": "0.1.16", | ||
"sideEffects": false | ||
} |
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
69975
1110